:root {
  --bg: #f5f5f7;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --faint: #86868b;
  --line: #d2d2d7;
  --card: #ffffff;
  --soft: #fbfbfd;
  --black: #1d1d1f;
  --blue: #0071e3;
  --green: #1d7a3a;
  --red: #b42318;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.08);
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: "Cascadia Mono", "Segoe UI Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  overflow-x: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
::selection { background: #d6e8ff; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
[hidden] { display: none !important; }

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--black);
  color: #fff;
  padding: 8px 12px;
  z-index: 50;
  border-radius: 8px;
}
.skip:focus { top: 12px; }
.noscript { padding: 24px; }

.wrap { width: min(1080px, calc(100% - 48px)); margin: 0 auto; }
.top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(245, 245, 247, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 64px;
}
.brand { display: flex; align-items: center; gap: 11px; color: var(--ink); padding: 8px 0; }
.mark {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 10px;
  background: url("../assets/logo.svg") center / 100% 100% no-repeat;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.16), 0 0 0 1px rgba(0, 0, 0, 0.04);
}
.brand b { display: block; font-size: 17px; font-weight: 650; letter-spacing: -0.03em; line-height: 1.1; }
.brand small { color: var(--faint); font-size: 12px; letter-spacing: 0; }
.nav-links { display: flex; gap: 4px; margin-left: 18px; }
.nav-links button { color: var(--muted); padding: 8px 12px; border-radius: 8px; font-size: 15px; }
.nav-links button[aria-current="page"] { color: var(--ink); background: rgba(0, 0, 0, 0.05); }
.rate-pill {
  margin-left: auto;
  color: var(--muted);
  font-size: 14px;
  padding: 6px 2px;
  white-space: nowrap;
}
.nav-cta { margin-left: 12px; }
.nav-auth { display: flex; align-items: center; gap: 8px; margin-left: 8px; }
.nav-user { max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
.nav-extra { display: none; }
.nav-toggle { display: none; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.nav-mask {
  position: fixed;
  inset: 0;
  z-index: 18;
  margin: 0;
  padding: 0;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: rgba(0, 0, 0, 0.18);
}
@media (min-width: 721px) {
  .nav-mask { display: none; }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 550;
}
.btn.primary { background: var(--black); color: #fff; }
.btn.primary:hover { background: #000; }
.btn.ghost { background: var(--card); border-color: var(--line); color: var(--ink); }
.btn.ghost:hover { background: #f0f0f2; }
.btn.small { min-height: 36px; padding: 6px 12px; font-size: 14px; border-radius: 10px; }
.btn.danger { background: #fff; border-color: #f0c9c4; color: var(--red); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: start;
  padding: 72px 0 24px;
}
.eyebrow { margin: 0 0 14px; color: var(--muted); font-size: 14px; font-weight: 550; }
h1, h2, h3 { font-weight: 640; letter-spacing: -0.035em; line-height: 1.12; }
h1 { font-size: clamp(44px, 5.4vw, 68px); margin: 0 0 18px; }
.lede { margin: 0; color: var(--muted); font-size: 18px; max-width: 34em; }
.how { list-style: none; padding: 0; margin: 36px 0 0; display: grid; gap: 18px; }
.how li { display: grid; grid-template-columns: 36px 1fr; gap: 14px; align-items: start; }
.how b {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--black);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 600;
}
.how strong { display: block; font-size: 17px; }
.how span { display: block; color: var(--muted); margin-top: 2px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }

.panel, .sheet, .order, .plan, .tool, .compare article {
  background: var(--card);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 20px;
}
.calc { padding: 28px 28px 22px; box-shadow: var(--shadow); }
.panel-kicker { margin: 0 0 18px; font-size: 13px; font-weight: 600; color: var(--faint); }
.calc .label { display: block; font-size: 15px; color: var(--ink); margin-bottom: 4px; }
.face-line { display: flex; align-items: baseline; gap: 2px; border-bottom: 1px solid var(--line); }
.face-line span { font-size: 32px; font-weight: 560; color: var(--faint); }
.face-line input {
  font-size: 56px;
  font-weight: 600;
  letter-spacing: -0.045em;
  width: 100%;
  background: transparent;
  border: 0;
  padding: 0 0 6px;
  line-height: 1;
}
.presets { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 8px; }
.presets button, .chip {
  border-radius: 999px;
  border: 1px solid var(--line);
  padding: 7px 12px;
  background: var(--card);
  color: var(--ink);
  font-size: 14px;
}
.presets button.on, .chip.on { background: var(--black); color: #fff; border-color: var(--black); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.keep-line { margin: 22px 0 8px; }
.keep-line span { color: var(--muted); font-size: 14px; }
.keep-line strong { display: block; font-size: 52px; letter-spacing: -0.045em; line-height: 1.05; font-weight: 640; }
.sum { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; padding: 10px 0; border-top: 1px solid #ececef; }
.sum strong { font-size: 17px; font-weight: 600; }
.sum.big strong { font-size: 28px; letter-spacing: -0.03em; }
.fits-label { margin: 16px 0 0; color: var(--faint); font-size: 13px; }
.fits { list-style: none; padding: 0; margin: 4px 0 0; }
.fits li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; font-size: 14px; border-top: 1px solid #f0f0f2; }
.fits b { font-weight: 600; }
.r-note, .fine, .hint { color: var(--faint); font-size: 13px; }
.calc-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.calc-actions .btn { flex: 1; }

.block { padding: 64px 0 8px; }
.block h2 { font-size: clamp(28px, 3vw, 40px); margin: 0 0 8px; }
.sub { color: var(--muted); margin: 0; max-width: 36em; }
.split { display: flex; justify-content: space-between; gap: 16px; align-items: end; margin-bottom: 22px; }

.plan-grid { display: grid; grid-template-columns: 1fr; gap: 8px; }
.plan.pick {
  min-height: 0;
  padding: 12px 14px;
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: center;
  gap: 8px 12px;
  width: 100%;
  text-align: left;
  border-radius: 14px;
}
.plan.pick:hover { border-color: #b8b8be; }
.plan.picked { border-color: var(--black); box-shadow: inset 0 0 0 1px var(--black); }
.pick-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid #c7c7cc;
  flex: none;
}
.plan.picked .pick-dot { border: 5px solid var(--black); }
.pick-main { display: grid; gap: 2px; min-width: 0; flex: 1 1 140px; }
.pick-main b { font-size: 16px; font-weight: 600; letter-spacing: -0.02em; }
.pick-main small { color: var(--faint); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.pick-price { margin-left: auto; text-align: right; flex: 1 1 200px; min-width: 0; }
.pick-price b { display: block; font-size: 17px; font-weight: 640; letter-spacing: -0.02em; }
.pick-price small { font-size: 16px; color: var(--ink); font-weight: 640; }
.pick-price em { display: block; font-style: normal; color: var(--muted); font-size: 12px; line-height: 1.4; margin-top: 2px; }

.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.compare article { padding: 28px; }
.compare h3 { margin: 0 0 10px; font-size: 22px; }
.compare p { margin: 0; color: var(--muted); font-size: 17px; }
.compare .paper { background: var(--black); color: #fff; border-color: var(--black); }
.compare .paper p { color: rgba(255, 255, 255, 0.78); }

.faq details { border-top: 1px solid #e3e3e6; padding: 16px 0; }
.faq details:last-child { border-bottom: 1px solid #e3e3e6; }
.faq summary { cursor: pointer; font-size: 17px; font-weight: 560; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq p { color: var(--muted); margin: 8px 0 0; max-width: 46em; }

.foot { display: grid; gap: 8px; padding: 48px 0 56px; color: var(--muted); }
.foot strong { color: var(--ink); }
.foot p { margin: 4px 0; }
.foot .links { display: flex; gap: 16px; }
.foot button { color: var(--blue); padding: 0; }

.page-head { padding: 48px 0 8px; }
.page-head h1 { font-size: clamp(36px, 5vw, 56px); }
.wizard-grid { display: grid; grid-template-columns: 1.4fr 0.75fr; gap: 20px; align-items: start; padding: 18px 0 12px; }
.sheet { padding: 22px; }
.setup { max-width: 440px; }
.setup .btn { margin-top: 18px; }
.side { position: sticky; top: 84px; }
.receipt {
  background: var(--card);
  color: var(--ink);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 20px;
  padding: 22px;
  box-shadow: var(--shadow);
}
.r-kicker { margin: 0; color: var(--faint); font-size: 13px; }
.r-title { margin: 6px 0 14px; font-size: 26px; }
.progress { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; list-style: none; padding: 0; margin: 22px 0 0; }
.progress li { color: var(--faint); font-size: 14px; font-weight: 550; border-top: 2px solid #e3e3e6; padding-top: 10px; }
.progress li.now { color: var(--ink); border-color: var(--black); }
.progress li.did { color: var(--green); border-color: var(--green); }
.choice { display: grid; grid-template-columns: 18px 1fr; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; margin-bottom: 10px; background: var(--soft); }
.choice:has(input:checked) { border-color: var(--black); background: #fff; }
.choice small { display: block; color: var(--muted); }
.card-block { margin: 8px 0 18px; }
.upload {
  display: grid;
  gap: 14px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.upload-empty {
  display: grid;
  justify-items: center;
  padding: 0;
}
.plastic {
  width: min(100%, 460px);
  margin: 0 auto;
  perspective: 1600px;
  perspective-origin: 50% 35%;
  padding: 8px 0 0;
}
.plastic-tilt {
  position: relative;
  transform: rotateX(16deg) rotateY(-18deg) rotateZ(-0.6deg);
  transform-style: preserve-3d;
  animation: card-sway 8s ease-in-out infinite;
}
.plastic-card {
  position: relative;
  z-index: 2;
  border-radius: 24px;
  overflow: hidden;
  transform: translateZ(12px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -2px 4px rgba(0, 0, 0, 0.04),
    0 1px 0 #e3e3e8,
    0 3px 0 #c4c4c9,
    0 6px 0 #b0b0b5,
    0 14px 28px rgba(0, 0, 0, 0.16),
    0 28px 48px rgba(0, 0, 0, 0.1);
}
.plastic-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.35) 0%, transparent 42%, transparent 58%, rgba(0, 0, 0, 0.04) 100%);
  pointer-events: none;
  z-index: 2;
}
.plastic-face {
  width: 100%;
  height: auto;
  display: block;
  transform: translateZ(1px);
}
.plastic-shadow {
  display: block;
  width: 84%;
  height: 28px;
  margin: 6px auto 0;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.28) 0%, rgba(0, 0, 0, 0.08) 45%, transparent 72%);
  filter: blur(2px);
  transform: rotateX(72deg) scaleY(0.45);
  transform-origin: center top;
  animation: shadow-breathe 8s ease-in-out infinite;
}
.plastic-glint {
  position: absolute;
  inset: -10% -30%;
  z-index: 3;
  background: linear-gradient(105deg, transparent 42%, rgba(255, 255, 255, 0.55) 49%, rgba(255, 255, 255, 0.12) 52%, transparent 58%);
  mix-blend-mode: soft-light;
  transform: translateX(-120%) skewX(-8deg);
  animation: card-shine 6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes card-sway {
  0%, 100% { transform: rotateX(15deg) rotateY(-20deg) rotateZ(-0.6deg) translateY(0); }
  50% { transform: rotateX(19deg) rotateY(-10deg) rotateZ(0.2deg) translateY(-10px); }
}
@keyframes shadow-breathe {
  0%, 100% { transform: rotateX(72deg) scaleY(0.45) scaleX(1); opacity: 0.9; }
  50% { transform: rotateX(72deg) scaleY(0.38) scaleX(0.88); opacity: 0.55; }
}
@keyframes card-shine {
  0%, 55% { transform: translateX(-120%) skewX(-8deg); }
  100% { transform: translateX(120%) skewX(-8deg); }
}
.upload-actions {
  width: min(100%, 460px);
  margin: 4px auto 0;
}
.upload-empty b { font-size: 18px; }
.upload-empty span:last-child { color: var(--muted); font-size: 14px; }
.upload-preview {
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  border-radius: 12px;
  background: #fff;
  display: block;
}
.upload-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.upload-actions .btn { width: 100%; min-height: 48px; }
.card-photo { height: auto; max-height: 280px; object-fit: contain; border-radius: 12px; margin-top: 8px; background: #f5f5f7; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.card-row { display: grid; grid-template-columns: 0.8fr 0.7fr 0.9fr auto; gap: 10px; align-items: end; margin: 12px 0; }
.field label, .sheet h2 { display: block; }
.sheet h2 { margin: 0 0 6px; font-size: 24px; }
.field label { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
input, select, textarea {
  width: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
}
textarea { min-height: 88px; resize: vertical; }
.face-line input { border: 0; border-radius: 0; padding: 0; background: transparent; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.error { color: var(--red); background: #fff4f2; border: 1px solid #f3c7c0; padding: 10px 12px; border-radius: 12px; }
.agree { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0; }
.agree input { width: auto; margin-top: 4px; }
.callout { margin: 12px 0 0; padding: 12px 14px; background: #f5f5f7; border-radius: 12px; color: var(--muted); }
.dock {
  position: sticky;
  bottom: 16px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 12px 12px 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: var(--shadow);
  margin: 8px 0 48px;
}
.dock small { color: var(--faint); display: block; font-size: 12px; }
.dock strong { font-size: 16px; }
.dock .short { color: var(--red); }
.dock-actions { display: flex; gap: 8px; }

.lookup, .lock { max-width: 560px; display: grid; gap: 12px; }
.order { padding: 18px; margin-bottom: 12px; }
.order header { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.order p { margin: 8px 0; }
.order ul { margin: 8px 0; padding-left: 18px; }
.status { border-radius: 999px; padding: 4px 10px; font-size: 12px; background: #f2f2f4; color: var(--muted); white-space: nowrap; }
.status.pending { background: #f4f1ea; color: #7a5b20; }
.status.checking { background: #eef4ff; color: #1d4e89; }
.status.doing { background: #f3eeff; color: #5536a3; }
.status.done { background: #e9f7ee; color: var(--green); }
.status.rejected { background: #fff1ee; color: var(--red); }
.timeline { display: flex; gap: 8px; list-style: none; padding: 0; margin: 14px 0; }
.timeline li { flex: 1; font-size: 13px; color: var(--faint); border-top: 2px solid #e3e3e6; padding-top: 8px; }
.timeline li.now { color: var(--ink); border-color: var(--black); }
.timeline li.did { color: var(--green); border-color: var(--green); }
.reply { background: #f5f5f7; border-radius: 12px; padding: 12px; }
.mono { font-family: var(--mono); letter-spacing: 0.03em; }
.desk-tools { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 12px; margin: 8px 0 16px; }
.tool { padding: 18px; }
.tool h2 { font-size: 22px; margin: 0 0 8px; }
.price-row { display: grid; grid-template-columns: 1fr 120px; gap: 8px; align-items: center; margin-bottom: 8px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 14px; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.cs-float {
  position: fixed;
  right: max(16px, calc((100vw - 1080px) / 2 + 16px));
  bottom: max(20px, env(safe-area-inset-bottom, 0px) + 16px);
  z-index: 45;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  pointer-events: none;
}
.cs-float > * { pointer-events: auto; }
.cs-panel {
  width: min(320px, calc(100vw - 32px));
  padding: 16px 16px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.14);
  transform: translateY(10px) scale(0.96);
  opacity: 0;
  transition: opacity 0.22s ease, transform 0.22s ease;
  transform-origin: bottom right;
}
.cs-float.open .cs-panel {
  opacity: 1;
  transform: none;
}
.cs-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.cs-head b { font-size: 17px; font-weight: 650; }
.cs-close {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  font-size: 22px;
  line-height: 1;
  color: var(--muted);
  background: #f2f2f4;
}
.cs-hint { margin: 0 0 12px; font-size: 14px; color: var(--muted); }
.cs-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.cs-list li {
  padding: 12px;
  border-radius: 12px;
  background: var(--soft);
  border: 1px solid rgba(0, 0, 0, 0.04);
}
.cs-row { display: flex; flex-direction: column; gap: 2px; }
.cs-kind { font-size: 12px; color: var(--faint); }
.cs-list strong { font-size: 15px; font-weight: 600; word-break: break-all; }
.cs-note { display: block; margin-top: 6px; font-size: 12px; color: var(--faint); }
.cs-actions { display: flex; gap: 8px; margin-top: 10px; }
.cs-go {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  background: var(--black);
  color: #fff;
}
.cs-go.ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.cs-hours { margin: 12px 0 0; font-size: 12px; color: var(--faint); text-align: center; }
.cs-fab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 18px 0 14px;
  border-radius: 999px;
  background: var(--black);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}
.cs-fab-icon { flex-shrink: 0; }
.cs-float.open .cs-fab { box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18); }
body.has-dock .cs-float {
  bottom: calc(96px + env(safe-area-inset-bottom, 0px));
}

.backup-note { margin-bottom: 12px; font-size: 14px; line-height: 1.55; }
.btn-link {
  display: inline;
  padding: 0 2px;
  margin: 0 2px;
  font: inherit;
  font-weight: 600;
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 3px;
  background: none;
  border: 0;
  cursor: pointer;
}
.btn-link:hover { color: #0077ed; }

.auth-lock { overflow: hidden; }
.auth-lock .cs-float { display: none; }
.auth-mask {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  overflow-y: auto;
  background: rgba(245, 245, 247, 0.92);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}
.auth-page-full {
  min-height: calc(100vh - 64px);
  margin: 0;
  width: 100%;
  display: grid;
  place-items: center;
  padding: 24px 16px 40px;
  background: var(--bg);
  box-sizing: border-box;
}
.auth-card {
  position: relative;
  width: min(400px, 100%);
  min-height: 0;
  height: auto;
  overflow: visible;
  padding: 36px 28px 28px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.1);
  display: grid;
  align-content: start;
  gap: 20px;
  box-sizing: border-box;
}
.auth-card.signup { width: min(520px, 100%); }
.auth-x { position: absolute; top: 14px; right: 14px; }
.auth-top { text-align: center; }
.auth-top .auth-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 14px;
}
.auth-brand b { font-size: 16px; }
.auth-card h2 {
  margin: 0 0 6px;
  font-size: 28px;
  letter-spacing: -0.03em;
  font-weight: 650;
}
.auth-card .sub { margin: 0 auto; max-width: 22em; }
.auth-form { display: grid; gap: 14px; align-content: start; }
.auth-form.login,
.auth-form.signup { max-width: none; grid-template-columns: 1fr; }
.auth-form.signup { grid-template-columns: 1fr 1fr; }
.auth-form.signup .field:nth-child(n+3),
.auth-form.signup .agree,
.auth-form.signup .error,
.auth-form.signup .auth-submit { grid-column: 1 / -1; }
.auth-span { grid-column: 1 / -1; }
.auth-form .field { margin: 0; }
.auth-form input, .auth-form select { padding: 13px 14px; border-radius: 14px; }
.auth-form .agree { margin: 2px 0 0; text-align: left; }
.auth-pass-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
.auth-pass-row label { margin-bottom: 0; }
.auth-submit {
  width: 100%;
  min-height: 48px;
  justify-self: stretch;
  margin-top: 4px;
}
.auth-switch { margin: 0; color: var(--muted); font-size: 14px; text-align: center; }
.auth-forgot { justify-self: end; font-size: 13px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  background: var(--black);
  color: #fff;
  padding: 12px 16px;
  border-radius: 999px;
  z-index: 40;
}
.success-id { font-family: var(--mono); font-size: 28px; letter-spacing: 0.03em; }
.account-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding-top: 36px;
  padding-bottom: 18px;
}
.account-head h1 { font-size: clamp(34px, 4.4vw, 48px); margin: 0; }
.account-head .eyebrow { margin-bottom: 8px; }
.wallet {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 8% -10%, rgba(255, 255, 255, 0.18), transparent 46%),
    linear-gradient(160deg, #3a3a3c 0%, #1d1d1f 52%, #111113 100%);
  color: #fff;
  border-radius: 28px;
  padding: 28px 28px 22px;
  display: grid;
  gap: 22px;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.18);
}
.wallet::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -50px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.12), transparent 68%);
  pointer-events: none;
}
.wallet-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.62);
}
.wallet-chip {
  max-width: 62%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 12px;
  font-weight: 550;
  letter-spacing: 0;
}
.wallet-chip.muted { color: rgba(255, 255, 255, 0.55); }
.wallet-num { display: block; font-size: clamp(44px, 7vw, 64px); letter-spacing: -0.05em; line-height: 1; font-weight: 640; }
.wallet-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.wallet-stats span {
  display: grid;
  gap: 4px;
  padding: 12px 12px 11px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
}
.wallet-stats b { font-size: 18px; font-weight: 620; color: #fff; letter-spacing: -0.03em; }
.wallet .field { margin: 0; }
.wallet .field label { color: rgba(255, 255, 255, 0.58); }
.withdraw-row { display: flex; gap: 10px; align-items: end; }
.withdraw-row .field { flex: 1; }
.withdraw-input {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.withdraw-input span { color: rgba(255, 255, 255, 0.5); font-weight: 600; }
.withdraw-input input {
  flex: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.03em;
}
.withdraw-input input::placeholder { color: rgba(255, 255, 255, 0.28); }
.wallet-btn {
  min-height: 48px;
  padding: 0 20px;
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  font-weight: 620;
  white-space: nowrap;
}
.wallet-btn:hover { background: #f2f2f4; }
.wallet-empty { margin: 0; color: rgba(255, 255, 255, 0.62); }
.wallet-fine { margin: 0; color: rgba(255, 255, 255, 0.42); font-size: 12px; line-height: 1.5; }
.account-grid { display: grid; grid-template-columns: 0.86fr 1.14fr; gap: 16px; padding: 22px 0 48px; align-items: start; }
.account-grid h2 { margin: 0 0 6px; font-size: 20px; }
.pay-card { padding: 24px; }
.pay-card .btn { width: 100%; margin-top: 6px; }
.later { margin-top: 28px; padding-top: 22px; border-top: 1px solid #ececef; }
.cash-list { list-style: none; padding: 0; margin: 4px 0 0; }
.cash-list li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid #ececef; font-size: 15px; }
.cash-list li:first-child { border-top: 0; }
.cash-list small { display: block; margin-top: 2px; color: var(--faint); font-size: 12px; font-weight: 400; }
.cash-list b { text-align: right; font-weight: 620; }
.cash-list .hint { border: 0; color: var(--faint); }
.empty-orders { padding: 28px 22px; display: grid; gap: 14px; justify-items: start; }
.order-col .order { background: #fff; }

.pay-top-host {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 85;
  display: flex;
  justify-content: center;
  padding: calc(8px + env(safe-area-inset-top, 0px)) 14px 0;
  pointer-events: none;
}
.pay-top-sheet {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  pointer-events: auto;
  width: min(100%, 400px);
  margin: 0;
  padding: 11px 14px 11px 11px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 22px;
  background: linear-gradient(
    165deg,
    rgba(255, 255, 255, 0.92) 0%,
    rgba(255, 255, 255, 0.68) 42%,
    rgba(245, 245, 247, 0.58) 100%
  );
  backdrop-filter: blur(32px) saturate(190%);
  -webkit-backdrop-filter: blur(32px) saturate(190%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -0.5px 0 rgba(255, 255, 255, 0.35),
    0 16px 48px rgba(0, 0, 0, 0.14),
    0 2px 6px rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  gap: 11px;
  text-align: left;
  cursor: pointer;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  -webkit-tap-highlight-color: transparent;
  animation: pay-top-in 0.44s cubic-bezier(0.32, 0.72, 0, 1);
  will-change: transform, opacity;
}
.pay-top-sheet::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    125deg,
    rgba(255, 255, 255, 0.55) 0%,
    rgba(255, 255, 255, 0.08) 38%,
    transparent 55%,
    rgba(255, 255, 255, 0.12) 100%
  );
  pointer-events: none;
}
.pay-top-sheet::after {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.98), transparent);
  pointer-events: none;
}
.pay-top-sheet.pay-top-out {
  animation: pay-top-out 0.36s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.pay-top-app {
  position: relative;
  z-index: 1;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 11px;
  object-fit: cover;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.14);
}
.pay-top-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.pay-top-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.pay-top-head strong {
  font-size: 15px;
  font-weight: 650;
  color: #1d1d1f;
  letter-spacing: -0.02em;
}
.pay-top-head em {
  flex-shrink: 0;
  font-style: normal;
  font-size: 13px;
  font-weight: 400;
  color: rgba(60, 60, 67, 0.55);
}
.pay-top-msg {
  font-size: 15px;
  font-weight: 400;
  color: #1d1d1f;
  line-height: 1.3;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@keyframes pay-top-in {
  from { transform: translateY(calc(-100% - 20px)); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes pay-top-out {
  from { transform: translateY(0); opacity: 1; }
  to { transform: translateY(calc(-100% - 20px)); opacity: 0; }
}

@media (max-width: 900px) {
  .hero, .compare, .wizard-grid, .desk-tools, .plan-grid, .account-grid { grid-template-columns: 1fr; }
  .hero { gap: 22px; padding: 28px 0 12px; }
  .side { position: static; }
  .card-row, .grid-2 { grid-template-columns: 1fr 1fr; }
  .calc-actions .btn { flex: 1 1 100%; }
  .auth-card { padding: 28px 20px 22px; }
  .block { padding-top: 36px; }
  .split { flex-direction: column; align-items: stretch; }
}
@media (max-width: 720px) {
  .wrap { width: min(1080px, calc(100% - 28px)); }
  .bar { min-height: 56px; gap: 6px; }
  .mark { width: 28px; height: 28px; border-radius: 8px; }
  .brand { gap: 8px; padding: 6px 0; }
  .brand b { font-size: 16px; }
  .brand small { font-size: 11px; }
  .nav-auth, .rate-pill, .nav-cta { display: none; }
  .nav-toggle { display: inline-flex; margin-left: auto; min-height: 36px; }
  .nav-links {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    z-index: 21;
    flex-direction: column;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    padding: 8px;
    box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
  .nav-links button { min-height: 44px; text-align: left; padding: 10px 12px; }
  .nav-extra { display: block; font-weight: 600; color: var(--ink); }
  h1 { font-size: clamp(32px, 10vw, 40px); }
  .lede { font-size: 16px; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
  .face-line input, .keep-line strong { font-size: 36px; }
  .calc { padding: 20px 16px 16px; }
  .card-row, .grid-2, .price-row, .upload-actions { grid-template-columns: 1fr; }
  .plan.pick {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: start;
    column-gap: 12px;
    row-gap: 6px;
    padding: 14px 12px;
  }
  .pick-dot { grid-row: 1 / span 2; margin-top: 4px; }
  .pick-main { flex: none; }
  .pick-price {
    grid-column: 2;
    width: auto;
    margin: 0;
    text-align: left;
  }
  .pick-price b { font-size: 15px; }
  .pick-price em { font-size: 12px; }
  .page-head { padding-top: 24px; }
  .page-head h1 { font-size: clamp(28px, 8vw, 36px); }
  .dock {
    position: sticky;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    flex-direction: column;
    align-items: stretch;
    margin: 8px 0 80px;
    padding: 12px;
  }
  .dock-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .dock-actions .btn { width: 100%; }
  .withdraw-row { align-items: stretch; flex-direction: column; }
  .wallet { padding: 20px 16px 16px; border-radius: 22px; gap: 16px; }
  .wallet-chip { max-width: 70%; }
  .wallet-stats { grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
  .wallet-stats span { padding: 10px 8px; font-size: 11px; }
  .wallet-stats b { font-size: 14px; }
  .account-head { align-items: flex-start; flex-wrap: wrap; padding-top: 24px; }
  .timeline { flex-wrap: wrap; }
  .cs-float {
    right: 12px;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  }
  body.has-dock .cs-float { bottom: calc(108px + env(safe-area-inset-bottom, 0px)); }
  .cs-fab { min-height: 46px; padding: 0 14px 0 12px; }
  .cs-panel { width: min(320px, calc(100vw - 24px)); }
  .auth-mask, .auth-page-full {
    padding: 16px 12px calc(16px + env(safe-area-inset-bottom, 0px));
    align-items: start;
  }
  .auth-card {
    width: min(400px, 100%);
    min-height: 0;
    padding: 28px 18px 20px;
    gap: 16px;
    margin: auto 0;
  }
  .auth-card.signup { width: min(400px, 100%); }
  .auth-form.signup { grid-template-columns: 1fr; }
  .auth-form.signup .field,
  .auth-form.signup .agree,
  .auth-form.signup .error,
  .auth-form.signup .auth-submit { grid-column: 1; }
  .auth-card h2 { font-size: 26px; }
  .auth-x { top: 10px; right: 10px; }
  .foot { padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px)); }
  .toast { bottom: calc(16px + env(safe-area-inset-bottom, 0px)); left: 16px; right: 16px; transform: none; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
