/* ============================================================
   原点 · 私人主页
   ============================================================ */

:root {
  --accent: #ff8a5c;
  --accent-2: #ffd166;
  --text: #f8f4ee;
  --text-soft: rgba(248, 244, 238, 0.74);
  --muted: rgba(248, 244, 238, 0.5);
  --faint: rgba(248, 244, 238, 0.32);
  --border: rgba(255, 255, 255, 0.105);
  --border-strong: rgba(255, 255, 255, 0.18);
  --glass: rgba(17, 15, 23, 0.44);
  --glass-strong: rgba(17, 15, 23, 0.84);
  --bg-dim: 0.32;
  --bg-blur: 0px;
  --danger: #ff8585;
  --radius: 16px;
  --font: "Inter", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", "Songti SC", "Noto Serif CJK SC", "Noto Serif SC", Georgia, serif;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  min-height: 100%;
}

body {
  min-height: 100dvh;
  background: #0b0a0f;
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection {
  background: var(--accent);
  color: #1b0d08;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.is-hidden {
  display: none !important;
}

.icon {
  display: inline-block;
  flex: none;
  vertical-align: middle;
}

/* ---------- 背景 ---------- */

.bg-layer {
  position: fixed;
  z-index: -2;
  inset: -40px;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  filter: blur(var(--bg-blur)) saturate(1.06);
  transform: scale(1.02);
  transition: background-color 0.5s ease, filter 0.2s ease;
}

.bg-veil {
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(5, 4, 9, 0.38) 0%, rgba(5, 4, 9, 0.04) 34%, rgba(5, 4, 9, 0.62) 100%),
    rgba(4, 3, 8, var(--bg-dim));
}

/* ---------- 品牌 ---------- */

.mini-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.06em;
  opacity: 0.94;
  transition: opacity 0.2s;
}

.mini-brand:hover {
  opacity: 1;
}

.brand-mark {
  position: relative;
  display: inline-block;
  width: 20px;
  height: 20px;
  flex: none;
  border-radius: 50%;
  border: 1.5px solid color-mix(in srgb, var(--accent) 70%, transparent);
  box-shadow: 0 0 16px color-mix(in srgb, var(--accent) 28%, transparent);
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-size: 9.5px;
  font-weight: 650;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

/* ---------- 登录 ---------- */

.login-view {
  position: relative;
  z-index: 2;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 26px clamp(20px, 4vw, 46px) 22px;
}

.login-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.login-domain {
  color: var(--faint);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.login-card {
  width: min(424px, 100%);
  margin: auto;
  padding: 38px 34px 28px;
  border: 1px solid var(--border);
  border-radius: 26px;
  background: linear-gradient(160deg, rgba(29, 26, 36, 0.62), rgba(13, 12, 18, 0.72));
  box-shadow: 0 34px 100px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.055);
  backdrop-filter: blur(30px) saturate(1.1);
  animation: rise 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.login-card h1 {
  margin: 18px 0 0;
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.18;
}

.login-sub {
  margin: 12px 0 28px;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.7;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.login-field {
  display: block;
}

.login-field > span:first-child {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.06em;
}

.login-field input {
  width: 100%;
  height: 47px;
  padding: 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.035);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.login-field input::placeholder {
  color: var(--faint);
}

.login-field input:focus {
  border-color: color-mix(in srgb, var(--accent) 65%, transparent);
  background: rgba(255, 255, 255, 0.055);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent);
}

.password-wrap {
  position: relative;
  display: block;
}

.password-wrap input {
  padding-right: 44px;
}

.eye-btn {
  position: absolute;
  right: 7px;
  top: 7px;
  display: grid;
  place-items: center;
  width: 33px;
  height: 33px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--faint);
}

.eye-btn:hover {
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.06);
}

.primary-btn {
  height: 47px;
  margin-top: 5px;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #1b0d08;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 12px 30px color-mix(in srgb, var(--accent) 22%, transparent);
  transition: filter 0.2s, transform 0.15s, opacity 0.2s;
}

.primary-btn:hover {
  filter: brightness(1.06);
}

.primary-btn:active {
  transform: translateY(1px);
}

.primary-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.form-error {
  min-height: 17px;
  margin: 2px 0 0;
  color: var(--danger);
  font-size: 12px;
  text-align: center;
}

.login-foot {
  margin: 24px 0 0;
  color: var(--faint);
  font-size: 10.5px;
  text-align: center;
}

.login-footer {
  color: var(--faint);
  font-size: 10.5px;
  text-align: center;
  letter-spacing: 0.05em;
}

.shake {
  animation: shake 0.36s ease;
}

/* ---------- 顶栏 ---------- */

.home-view {
  position: relative;
  z-index: 2;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px clamp(18px, 3.6vw, 42px);
  animation: fade 0.6s ease both;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.clock {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-right: 5px;
  color: var(--muted);
  font-size: 10.5px;
  white-space: nowrap;
}

.clock strong {
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.03em;
}

.pill-btn,
.ghost-btn {
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text-soft);
  font-size: 11.5px;
  backdrop-filter: blur(12px);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.pill-btn:hover,
.ghost-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  color: var(--text);
}

.pill-btn.is-active {
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  color: var(--text);
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--text-soft);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.075);
  color: var(--text);
}

.avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 25%, color-mix(in srgb, var(--accent) 65%, white 10%), transparent 55%),
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 85%, #1b0d08), #221826);
  color: #fff8f2;
  font-size: 12.5px;
  font-weight: 700;
  box-shadow: 0 4px 18px color-mix(in srgb, var(--accent) 18%, transparent);
}

/* ---------- 主舞台 ---------- */

.stage {
  flex: 1;
  width: min(1040px, calc(100% - 36px));
  margin: 0 auto;
  padding: clamp(34px, 7vh, 88px) 0 34px;
  display: flex;
  flex-direction: column;
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: fadeUp 0.65s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.greeting {
  margin: 0 0 12px;
  padding: 6px 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text-soft);
  font-size: 11px;
  letter-spacing: 0.04em;
  backdrop-filter: blur(12px);
}

.wordmark {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(66px, 9.6vw, 112px);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.065em;
  text-shadow: 0 18px 60px rgba(0, 0, 0, 0.32);
}

.wordmark-dot {
  color: var(--accent);
  text-shadow: 0 0 36px color-mix(in srgb, var(--accent) 45%, transparent);
}

.tagline {
  margin: 13px 0 0;
  color: var(--text-soft);
  font-size: 11.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.4);
}

.search-wrap {
  position: relative;
  width: min(672px, 100%);
  margin-top: clamp(26px, 4vh, 38px);
}

.search-bar {
  display: flex;
  align-items: center;
  height: 58px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: rgba(18, 16, 24, 0.5);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.055);
  backdrop-filter: blur(22px) saturate(1.15);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.search-bar:focus-within {
  border-color: color-mix(in srgb, var(--accent) 58%, transparent);
  background: rgba(18, 16, 24, 0.68);
  box-shadow:
    0 0 0 4px color-mix(in srgb, var(--accent) 11%, transparent),
    0 20px 60px rgba(0, 0, 0, 0.34);
}

.engine-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 100%;
  padding: 0 14px 0 17px;
  border: 0;
  border-right: 1px solid var(--border);
  border-radius: 999px 0 0 999px;
  background: transparent;
  color: var(--text-soft);
  font-size: 11.5px;
  white-space: nowrap;
}

.engine-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
}

.engine-logo {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font);
}

.engine-btn .chev {
  display: inline-flex;
  margin-left: 1px;
  color: var(--faint);
}

.search-bar input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0 18px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 14.5px;
  outline: none;
}

.search-bar input::placeholder {
  color: var(--faint);
}

.search-submit {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-right: 8px;
  flex: none;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #1b0d08;
  box-shadow: 0 6px 20px color-mix(in srgb, var(--accent) 24%, transparent);
  transition: transform 0.16s, filter 0.2s;
}

.search-submit:hover {
  filter: brightness(1.07);
  transform: scale(1.04);
}

.engine-menu {
  position: absolute;
  z-index: 20;
  top: 66px;
  left: 6px;
  width: 194px;
  padding: 6px;
  border: 1px solid var(--border-strong);
  border-radius: 13px;
  background: rgba(23, 21, 30, 0.97);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(20px);
  animation: fade 0.16s ease both;
}

.engine-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text-soft);
  font-size: 12.5px;
  text-align: left;
}

.engine-item:hover,
.engine-item.is-active {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
}

.engine-item em {
  margin-left: auto;
  color: var(--faint);
  font-style: normal;
  font-size: 9.5px;
}

.hint-row {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 13px 0 0;
  color: var(--faint);
  font-size: 10px;
  letter-spacing: 0.03em;
}

kbd {
  display: inline-block;
  min-width: 17px;
  padding: 1px 4px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  font-family: var(--font);
  font-size: 9.5px;
  text-align: center;
}

/* ---------- 区块 ---------- */

.section {
  margin-top: clamp(38px, 6vh, 58px);
  animation: fadeUp 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 15px;
}

.section-head h2 {
  margin: 0;
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.section-note {
  color: var(--faint);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.section-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.text-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 7px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  transition: color 0.2s, background 0.2s;
}

.text-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.055);
}

.text-btn.danger {
  color: var(--danger);
}

/* ---------- 服务卡片 ---------- */

.services {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}

.service-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 17px 17px 17px 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 17px;
  background: rgba(20, 18, 27, 0.38);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(18px);
  cursor: pointer;
  transition: transform 0.22s, border-color 0.22s, background 0.22s;
}

.service-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(220px 130px at 13% 0%, var(--tile-soft), transparent 72%);
  opacity: 0.72;
  pointer-events: none;
}

.service-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--tile) 35%, var(--border));
  background: rgba(25, 22, 33, 0.55);
}

.service-icon {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 47px;
  height: 47px;
  flex: none;
  border: 1px solid color-mix(in srgb, var(--tile) 30%, transparent);
  border-radius: 14px;
  background: var(--tile-soft);
  color: var(--tile);
  font-size: 18px;
  font-weight: 650;
}

.icon-text {
  font-family: var(--font);
  line-height: 1;
}

.service-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.service-copy strong {
  overflow: hidden;
  color: var(--text);
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.service-copy span {
  overflow: hidden;
  color: var(--muted);
  font-size: 10.5px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.service-arrow {
  position: relative;
  z-index: 1;
  margin-left: auto;
  color: var(--faint);
  transition: transform 0.2s, color 0.2s;
}

.service-card:hover .service-arrow {
  color: var(--text-soft);
  transform: translate(2px, -2px);
}

/* ---------- 快捷链接 ---------- */

.links {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 9px;
}

.link-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 14px 6px 11px;
  border: 1px solid transparent;
  border-radius: 15px;
  background: transparent;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s, border-color 0.2s;
}

.link-card:hover {
  transform: translateY(-2px);
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.055);
}

.link-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid color-mix(in srgb, var(--tile) 26%, transparent);
  border-radius: 16px;
  background: var(--tile-soft);
  color: var(--tile);
  font-size: 20px;
  font-weight: 650;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(12px);
}

.link-title {
  width: 100%;
  overflow: hidden;
  color: var(--text-soft);
  font-size: 11px;
  text-align: center;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.add-link {
  color: var(--faint);
}

.add-link .link-icon {
  border-style: dashed;
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.022);
  color: var(--faint);
}

.add-link:hover .link-icon {
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  color: var(--accent);
}

.links-empty {
  margin: 2px 0 0;
  color: var(--faint);
  font-size: 11px;
}

/* 编辑工具 */

.tile-tools {
  position: absolute;
  z-index: 3;
  top: 5px;
  right: 5px;
  display: flex;
  gap: 2px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-2px);
  transition: opacity 0.18s, transform 0.18s;
}

.home-view.is-editing .tile-tools {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.tile-tool {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: rgba(16, 14, 21, 0.86);
  color: var(--text-soft);
  backdrop-filter: blur(8px);
}

.tile-tool:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.12);
}

.tile-tool.danger:hover {
  color: var(--danger);
}

/* ---------- 页脚 ---------- */

.home-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-top: 64px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--faint);
  font-size: 9.5px;
  letter-spacing: 0.06em;
}

/* ---------- 抽屉 ---------- */

.drawer {
  position: fixed;
  z-index: 120;
  top: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  width: min(410px, 100%);
  height: 100dvh;
  border-left: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(20, 18, 27, 0.94), rgba(12, 11, 17, 0.97));
  box-shadow: -30px 0 90px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(32px) saturate(1.1);
  transform: translateX(104%);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.drawer.is-open {
  transform: translateX(0);
}

.drawer-mask {
  position: fixed;
  z-index: 110;
  inset: 0;
  background: rgba(4, 3, 8, 0.5);
  backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.drawer-mask.is-open {
  opacity: 1;
  pointer-events: auto;
}

.drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 26px 24px 18px;
  border-bottom: 1px solid var(--border);
}

.drawer-head h2 {
  margin: 7px 0 0;
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 4px 24px 38px;
}

.drawer-section {
  padding: 22px 0;
  border-bottom: 1px solid var(--border);
}

.drawer-section:last-child {
  border-bottom: 0;
}

.drawer-section h3 {
  margin: 0 0 13px;
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.09em;
}

/* 主题 */

.theme-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.theme-card {
  padding: 7px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.022);
  color: var(--text-soft);
  text-align: left;
  transition: border-color 0.2s, background 0.2s;
}

.theme-card:hover {
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.04);
}

.theme-card.is-active {
  border-color: color-mix(in srgb, var(--accent) 60%, transparent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 12%, transparent);
}

.theme-preview {
  height: 48px;
  margin-bottom: 7px;
  border-radius: 8px;
  background: var(--preview);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.theme-card span {
  display: block;
  padding: 0 3px 2px;
  font-size: 10.5px;
}

/* 强调色 */

.accent-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.color-well {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 10.5px;
}

.color-well input[type="color"] {
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  background: transparent;
  cursor: pointer;
}

.color-well input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 2px;
}

.color-well input[type="color"]::-webkit-color-swatch {
  border: 0;
  border-radius: 6px;
}

.color-well.small input[type="color"] {
  width: 28px;
  height: 28px;
}

.accent-presets {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.accent-dot {
  width: 25px;
  height: 25px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 50%;
  background: var(--dot);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18);
  transition: transform 0.15s, border-color 0.2s;
}

.accent-dot:hover {
  transform: scale(1.1);
}

.accent-dot.is-active {
  border-color: var(--text);
}

/* 背景 */

.segmented {
  display: flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
}

.segmented button {
  flex: 1;
  height: 30px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 10.5px;
}

.segmented button.is-active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

.inline-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 13px;
  color: var(--muted);
  font-size: 10.5px;
}

.upload-box {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 13px;
  padding: 13px;
  border: 1px dashed var(--border-strong);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.018);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.upload-box:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  background: color-mix(in srgb, var(--accent) 5%, transparent);
}

.upload-box.is-loading {
  opacity: 0.6;
  pointer-events: none;
}

.upload-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  color: var(--accent);
}

.upload-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.upload-copy strong {
  color: var(--text-soft);
  font-size: 11.5px;
  font-weight: 550;
}

.upload-copy em {
  color: var(--faint);
  font-style: normal;
  font-size: 9.5px;
}

.bg-preview-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

.bg-preview-row img {
  width: 78px;
  height: 48px;
  object-fit: cover;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.slider-row {
  display: grid;
  grid-template-columns: 42px 1fr 26px;
  align-items: center;
  gap: 9px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 10.5px;
}

.slider-row input[type="range"] {
  height: 16px;
  accent-color: var(--accent);
}

.slider-row em {
  color: var(--faint);
  font-style: normal;
  font-size: 9.5px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* 表单 */

.select-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--text-soft);
  font-size: 11.5px;
}

.select-wrap {
  position: relative;
  display: inline-flex;
}

.select-wrap::after {
  content: "";
  position: absolute;
  right: 11px;
  top: 50%;
  width: 5px;
  height: 5px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

select {
  appearance: none;
  height: 34px;
  padding: 0 28px 0 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text-soft);
  font-size: 11.5px;
  outline: none;
  cursor: pointer;
}

.field {
  display: block;
  margin-top: 12px;
}

.field > span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 10.5px;
}

.field input {
  width: 100%;
  height: 38px;
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-size: 12px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field input:focus {
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 10%, transparent);
}

.field input[readonly] {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.015);
}

.password-form {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.password-form .ghost-btn {
  align-self: flex-start;
  margin-top: 12px;
}

.logout-btn {
  width: 100%;
  height: 40px;
  border: 1px solid rgba(255, 107, 107, 0.25);
  border-radius: 10px;
  background: rgba(255, 107, 107, 0.07);
  color: #ff9a9a;
  font-size: 12px;
  transition: background 0.2s;
}

.logout-btn:hover {
  background: rgba(255, 107, 107, 0.13);
}

.drawer-foot {
  margin: 16px 0 0;
  color: var(--faint);
  font-size: 9px;
  text-align: center;
  letter-spacing: 0.05em;
}

/* ---------- 弹窗 ---------- */

.modal-mask {
  position: fixed;
  z-index: 140;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(4, 3, 8, 0.62);
  backdrop-filter: blur(8px);
  animation: fade 0.18s ease both;
}

.modal {
  width: min(460px, 100%);
  max-height: 90dvh;
  overflow-y: auto;
  padding: 24px;
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  background: linear-gradient(165deg, #1d1a24, #121016);
  box-shadow: 0 34px 100px rgba(0, 0, 0, 0.55);
  animation: rise 0.25s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.modal-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
}

.modal-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.6;
}

.modal .field {
  margin-top: 13px;
}

.modal .field input {
  height: 40px;
  background: rgba(255, 255, 255, 0.04);
}

.modal .field-row {
  display: grid;
  grid-template-columns: 1fr 92px;
  gap: 10px;
}

.icon-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.icon-choice {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
}

.icon-choice:hover,
.icon-choice.is-active {
  border-color: color-mix(in srgb, var(--accent) 50%, transparent);
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.check-row {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 16px;
  color: var(--text-soft);
  font-size: 11.5px;
  cursor: pointer;
}

.check-row input {
  width: 15px;
  height: 15px;
  accent-color: var(--accent);
}

.color-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 7px;
}

.color-choice {
  width: 22px;
  height: 22px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 50%;
  background: var(--dot);
}

.color-choice.is-active {
  border-color: var(--text);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 22px;
}

.modal-actions .ghost-btn,
.modal-actions .primary-btn {
  height: 38px;
  margin: 0;
  padding: 0 18px;
  border-radius: 9px;
  font-size: 12px;
}

.modal-actions .primary-btn {
  width: auto;
}

.modal-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

/* ---------- Toast ---------- */

.toast-root {
  position: fixed;
  z-index: 200;
  bottom: 24px;
  right: 22px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 330px;
  padding: 10px 13px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: rgba(27, 24, 34, 0.97);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.45);
  color: var(--text-soft);
  font-size: 11.5px;
  animation: toastIn 0.25s ease both;
}

.toast.is-error {
  border-color: rgba(255, 107, 107, 0.32);
  color: #ffb3b3;
}

.toast .icon {
  color: var(--accent);
}

.toast.is-error .icon {
  color: var(--danger);
}

/* ---------- 动画 ---------- */

@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.988);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shake {
  10%,
  90% {
    transform: translateX(-1px);
  }
  20%,
  80% {
    transform: translateX(2px);
  }
  30%,
  50%,
  70% {
    transform: translateX(-4px);
  }
  40%,
  60% {
    transform: translateX(4px);
  }
}

:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 70%, white 10%);
  outline-offset: 2px;
}

/* ---------- 响应式 ---------- */

@media (max-width: 860px) {
  .clock {
    display: none;
  }

  .services {
    grid-template-columns: 1fr;
  }

  .service-card {
    padding: 14px 16px;
  }

  .stage {
    padding-top: 38px;
  }

  .wordmark {
    font-size: clamp(64px, 15vw, 92px);
  }

  .links {
    grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  }
}

@media (max-width: 620px) {
  .topbar {
    padding: 16px 16px;
  }

  .mini-brand {
    font-size: 14px;
  }

  .brand-mark {
    width: 18px;
    height: 18px;
  }

  .brand-mark::after {
    inset: 5px;
  }

  .top-actions {
    gap: 6px;
  }

  .pill-btn {
    padding: 0 11px;
    font-size: 10.5px;
  }

  .icon-btn {
    width: 33px;
    height: 33px;
  }

  .avatar {
    width: 33px;
    height: 33px;
  }

  .stage {
    width: calc(100% - 28px);
    padding-top: 28px;
  }

  .greeting {
    font-size: 10px;
    margin-bottom: 10px;
  }

  .wordmark {
    font-size: clamp(58px, 18vw, 76px);
  }

  .tagline {
    margin-top: 9px;
    font-size: 9.5px;
    letter-spacing: 0.2em;
  }

  .search-wrap {
    margin-top: 26px;
  }

  .search-bar {
    height: 52px;
  }

  .engine-btn {
    padding: 0 10px 0 12px;
    gap: 6px;
  }

  .engine-name {
    display: none;
  }

  .engine-btn .chev {
    display: none;
  }

  .search-bar input {
    padding: 0 12px;
    font-size: 13.5px;
  }

  .search-submit {
    width: 38px;
    height: 38px;
    margin-right: 7px;
  }

  .engine-menu {
    top: 59px;
  }

  .hint-row {
    font-size: 9px;
    gap: 7px;
  }

  .section {
    margin-top: 36px;
  }

  .section-head {
    margin-bottom: 11px;
  }

  .section-note {
    display: none;
  }

  .links {
    grid-template-columns: repeat(4, 1fr);
    gap: 3px;
  }

  .link-card {
    padding: 10px 2px 8px;
  }

  .link-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
  }

  .link-title {
    font-size: 10px;
  }

  .home-footer {
    margin-top: 42px;
    font-size: 8.5px;
  }

  .drawer {
    width: 100%;
  }

  .toast-root {
    bottom: 16px;
    right: 12px;
    left: 12px;
    align-items: center;
  }

  .toast {
    max-width: 100%;
  }

  .login-view {
    padding: 18px;
  }

  .login-card {
    padding: 30px 24px 24px;
  }

  .login-card h1 {
    font-size: 29px;
  }

  .login-domain {
    display: none;
  }

  .modal {
    padding: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.modal-actions .danger-btn {
  background: linear-gradient(135deg, #ff6b6b, #ff9a6c);
  color: #240b0b;
  box-shadow: 0 10px 26px rgba(255, 107, 107, 0.2);
}
