/* User-specified palette and jelly finish: soft gradients and inset highlights are intentional. */
@font-face {
  font-family: Geist;
  src: url('/fonts/geist-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
:root {
  --ground: #f4f3f9;
  --surface: #fff;
  --ink: #302d42;
  --muted: #676178;
  --accent: #6a55f8;
  --accent-dark: #5842df;
  --accent-soft: #eeebff;
  --pink: #ca48f6;
  --peach: #f8ae6b;
  --line: #e8e4f2;
  --control: #d5cfe4;
  --text-sm: 14px;
  --text-base: 15px;
  --text-control: 15px;
  --text-section: 18px;
  --text-title: 24px;
  --text-value: 28px;
  --radius: 24px;
  --radius-control: 16px;
  --gap: 24px;
  color-scheme: light;
  font-family: Geist, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: var(--text-base);
  font-synthesis: none;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  background: var(--ground);
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input { font: inherit; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 4px; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
button, a, input, summary { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, .dropzone:focus-within {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}
input { color: var(--ink); accent-color: var(--accent); }
[hidden] { display: none !important; }
h1, h2, p { margin: 0; }
h1 { font-size: var(--text-title); font-weight: 650; line-height: 1.4; letter-spacing: -.02em; }
h2 { font-size: var(--text-section); font-weight: 600; line-height: 1.5; }
p { line-height: 1.75; }
.muted { color: var(--muted); }
.small, small { font-size: var(--text-sm); line-height: 1.65; }
.error { color: #a33258; font-size: var(--text-sm); line-height: 1.65; margin: 14px 0; }
.sidebar {
  width: 232px;
  position: fixed;
  inset: 0 auto 0 0;
  padding: 38px 24px 28px;
  display: flex;
  flex-direction: column;
  background: #eeecf5;
}
.brand { display: flex; align-items: center; gap: 12px; font-size: 22px; font-weight: 650; line-height: 1.4; }
.brand svg { color: var(--accent); flex-shrink: 0; }
.brand:hover { text-decoration: none; }
.brand-sub { display: block; font-size: var(--text-sm); color: var(--muted); font-weight: 400; margin-top: 3px; }
.sidebar nav { display: grid; gap: 10px; margin-top: 44px; }
.sidebar nav a { padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; color: var(--muted); border-radius: var(--radius-control); min-height: 48px; font-weight: 500; }
.sidebar nav a:hover { color: var(--accent-dark); background: #e8e3fa; text-decoration: none; }
.sidebar nav a[aria-current=page] { background: #fff; color: var(--accent-dark); box-shadow: 0 4px 14px #302d4205; } /* taste-skill-ignore: user-requested jelly highlights */
.sidebar-foot { margin-top: auto; display: grid; gap: 20px; font-size: var(--text-sm); color: var(--muted); }
.sidebar-foot span:empty { display: none; }
main { margin-left: 232px; max-width: 1600px; padding: 40px 40px 24px; }
.page-header { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 32px; }
.page-header p { margin-top: 8px; color: var(--muted); }
.balance { border: 0; background: var(--surface); padding: 12px 16px; min-height: 48px; border-radius: 18px; display: flex; gap: 12px; align-items: center; white-space: nowrap; color: var(--ink); font-size: var(--text-sm); }
.balance > span:first-child { font-size: var(--text-section); font-weight: 600; }
.balance > span:last-child { background: var(--accent-soft); border-radius: 50%; color: var(--accent-dark); width: 26px; height: 26px; display: grid; place-items: center; font-size: 18px; }
.notice { padding: 16px 20px; background: var(--accent-soft); color: var(--accent-dark); margin-bottom: 24px; line-height: 1.7; border-radius: var(--radius-control); }
.panel { padding: 30px; background: var(--surface); border: 0; border-radius: var(--radius); min-width: 0; box-shadow: 0 6px 24px #302d4204; } /* taste-skill-ignore: user-requested jelly highlights */
.panel-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 24px; }
.work-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--gap); }
.dropzone { margin-top: 24px; min-height: 208px; border: 1.5px dashed #c9bff0; border-radius: 20px; background: #f7f5ff; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 12px; padding: 24px 16px; text-align: center; cursor: pointer; position: relative; }
.dropzone svg { color: var(--accent); }
#upload-title { font-weight: 500; }
.dropzone:hover, .dropzone.dragging { background: #eeebff; border-color: var(--accent); }
.dropzone input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.file-preview { display: flex; align-items: center; gap: 12px; margin-top: 20px; padding: 12px; background: #f7f5fb; border-radius: 16px; }
.file-preview img { width: 48px; height: 48px; object-fit: cover; border-radius: 12px; background: var(--accent-soft); }
.file-preview > div { min-width: 0; flex: 1; }
.file-preview p { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scale-field { border: 0; padding: 0; margin: 26px 0; display: flex; gap: 12px; }
.scale-field legend { margin-bottom: 12px; font-weight: 500; }
.scale-field label { flex: 1; position: relative; min-width: 0; }
.scale-field input { position: absolute; opacity: 0; }
.scale-field label > span { padding: 16px; display: flex; justify-content: space-between; align-items: center; border: 1.5px solid transparent; background: #f6f5f9; border-radius: var(--radius-control); cursor: pointer; gap: 8px; }
.scale-field strong { font-weight: 600; font-size: var(--text-control); white-space: nowrap; }
.scale-field small { color: var(--muted); white-space: nowrap; }
.scale-field input:checked + span { border-color: #b4a6fc; background: var(--accent-soft); color: var(--accent-dark); box-shadow: inset 0 2px 3px #ffffffc0; } /* taste-skill-ignore: user-requested jelly highlights */
.scale-field input:checked + span small { color: #645694; }
.scale-field input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 3px; }
.cost-row { display: flex; justify-content: space-between; align-items: center; padding: 0 0 20px; gap: 12px; }
.cost-row strong { font-size: var(--text-section); font-weight: 600; }
.primary, .secondary { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 20px; border-radius: var(--radius-control); border: 1px solid transparent; font-size: var(--text-control); font-weight: 600; text-align: center; gap: 8px; line-height: 1.5; }
.primary { background: linear-gradient(180deg, #7560f2, #6a55f8); color: #fff; border-color: #7763f6; box-shadow: inset 0 1px 1px #ffffff55, 0 4px 0 #5842df; } /* taste-skill-ignore: user-requested jelly highlights */
.primary:hover { background: linear-gradient(180deg, #725df8, #604ae9); text-decoration: none; } /* taste-skill-ignore: user-requested jelly highlights */
.primary:active:not(:disabled) { transform: translateY(2px); box-shadow: inset 0 1px 1px #ffffff55, 0 2px 0 #5842df; } /* taste-skill-ignore: user-requested jelly highlights */
.primary:disabled { background: #e6e1f4; color: #665b80; border-color: transparent; box-shadow: inset 0 1px 1px #ffffffb3; } /* taste-skill-ignore: user-requested jelly highlights */
.secondary { background: #f2effa; color: #5c527a; box-shadow: inset 0 1px 1px #fff; } /* taste-skill-ignore: user-requested jelly highlights */
.secondary:hover { background: #e9e3fa; color: var(--accent-dark); }
.secondary:disabled { opacity: .6; }
.full { width: 100%; }
.text-button { padding: 8px 0; min-height: 40px; font-size: var(--text-sm); color: var(--accent-dark); background: none; border: 0; text-underline-offset: 4px; white-space: nowrap; }
.text-button:hover { text-decoration: underline; }
.upload-panel > .muted { margin-top: 20px; }
.status { font-size: var(--text-sm); border-radius: 20px; background: color-mix(in srgb, var(--pink) 10%, white); color: #83508f; padding: 6px 12px; white-space: nowrap; }
.status.success { color: #28614b; background: #e5f4ec; }
.status.failed { background: #fbeaf1; color: #a33258; }
.result-empty { min-height: 410px; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 10px; }
.result-empty > p:first-of-type { font-size: var(--text-control); font-weight: 500; }
.enlarge-demo { display: flex; align-items: flex-end; gap: 18px; margin-bottom: 22px; }
.enlarge-demo span { width: 70px; height: 70px; display: grid; place-items: center; background: color-mix(in srgb, var(--peach) 25%, white); color: #925325; border-radius: 22px; font-size: 22px; font-weight: 600; box-shadow: inset 0 2px 2px #fff9, 0 5px 0 #efd0b6; transform: rotate(-9deg); } /* taste-skill-ignore: user-requested jelly highlights */
.enlarge-demo span:last-child { width: 108px; height: 108px; font-size: var(--text-value); color: #fff; background: linear-gradient(145deg, #b5a6ff, #6a55f8); border-radius: 28px; box-shadow: inset 0 2px 2px #ffffff70, 0 6px 0 #d9d0f9; transform: rotate(7deg); } /* taste-skill-ignore: user-requested jelly highlights */
.result-image-wrap { height: 312px; display: flex; align-items: center; justify-content: center; background: #f4f1fa; overflow: hidden; margin-top: 20px; border-radius: 20px; }
.result-image-wrap img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
.compare-tabs { display: flex; gap: 8px; padding: 5px; background: #f3f0fa; border-radius: 16px; width: fit-content; }
.compare-tabs button { min-height: 40px; padding: 8px 20px; font-size: var(--text-sm); background: transparent; box-shadow: none; border-radius: 12px; } /* taste-skill-ignore: user-requested jelly highlights */
.compare-tabs button[aria-pressed=true] { background: white; color: var(--accent-dark); }
#result-details { margin: 16px 0; }
.footnote { display: flex; justify-content: space-between; gap: 16px; color: var(--muted); font-size: var(--text-sm); margin: 20px 4px 0; }
.wallet-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 24px; align-items: start; }
.wallet-summary { padding: 30px; border-radius: var(--radius); background: #eae5fd; position: relative; overflow: hidden; }
.wallet-summary > p:last-child { margin-top: 28px; }
.wallet-balance { margin-top: 28px; margin-bottom: 16px; }
.wallet-balance > span { font-size: var(--text-value); font-weight: 650; line-height: 1.4; }
.wallet-balance small { margin-left: 12px; color: #645b7b; }
.wallet-summary .muted { color: #645b7b; }
.preset-row { display: flex; gap: 12px; margin: 24px 0; }
.preset-row button { flex: 1; padding: 12px 8px; }
.preset-row button.selected { border-color: #b4a6fc; background: var(--accent-soft); color: var(--accent-dark); }
.field { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; font-weight: 500; }
.field .small { font-weight: 400; }
.field input { height: 48px; border: 1.5px solid var(--control); border-radius: 14px; padding: 12px 16px; background: #fcfbfe; min-width: 0; width: 100%; font-size: 16px; font-weight: 400; }
.field input:focus { border-color: var(--accent); background: #fff; }
.agreement { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 24px; line-height: 1.75; font-size: var(--text-sm); color: var(--muted); }
.agreement input { width: 18px; height: 18px; flex: none; margin: 4px 0 0; }
.agreement a { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 3px; }
#payment-hint { margin-top: 20px; }
.records { margin-top: 24px; }
.record-list { margin-top: 20px; }
.record-row { display: flex; align-items: center; gap: 16px; padding: 20px 0; border-bottom: 1px solid #f0edf5; min-height: 80px; }
.record-row:last-child { border-bottom: 0; }
.record-main { flex: 1; min-width: 0; }
.record-main > p { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.record-main > .small { margin-top: 5px; }
.record-value { text-align: right; white-space: nowrap; }
.record-actions { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.record-actions button, .record-actions a { font-size: var(--text-sm); }
.record-actions a { text-decoration: underline; text-underline-offset: 4px; }
.record-thumb { height: 48px; width: 48px; object-fit: cover; border-radius: 12px; background: var(--accent-soft); }
.empty { color: var(--muted); padding: 24px 0; }
.narrow { max-width: 760px; }
.narrow > p { margin: 20px 0; }
.account-logout { margin-top: 20px; }
.prose h2:not(:first-child) { margin-top: 32px; }
.prose p { line-height: 1.9; }
.prose p:last-child { margin-bottom: 0; }
footer { margin-top: 32px; padding: 16px 4px 0; display: flex; justify-content: space-between; gap: 16px; font-size: var(--text-sm); color: var(--muted); }
footer > div { display: flex; gap: 20px; flex-wrap: wrap; }
dialog { border: 0; border-radius: 28px; padding: 32px; max-width: 450px; width: calc(100% - 32px); color: var(--ink); background: #fff; box-shadow: 0 24px 90px #302d422b; max-height: 90dvh; overflow-y: auto; } /* taste-skill-ignore: user-requested jelly highlights */
dialog::backdrop { background: #302d4266; }
.dialog-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 16px; }
.dialog-header h2 { font-size: 22px; }
.close-dialog { font-size: 24px; background: #f3f0fa; border: 0; border-radius: 50%; min-width: 36px; min-height: 36px; padding: 0; color: #706580; line-height: 1; }
#auth-subtitle { margin-bottom: 28px; }
.auth-switch { display: block; margin: 20px auto 0; }
.checkout-total { font-size: var(--text-value); font-weight: 650; text-align: center; margin-top: 24px; }
#checkout-description, #checkout-status { text-align: center; margin: 12px 0; }
.payment-qr { display: block; width: 230px; max-width: 100%; height: auto; margin: 20px auto; border-radius: 16px; }
#checkout-dialog > .secondary { margin-top: 16px; }
#checkout-order { margin-top: 20px; overflow-wrap: anywhere; text-align: center; font-size: var(--text-sm); }
#toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; border-radius: 18px; padding: 14px 22px; max-width: calc(100% - 32px); z-index: 20; box-shadow: 0 8px 30px #302d4226; font-size: var(--text-sm); line-height: 1.65; } /* taste-skill-ignore: user-requested jelly highlights */
@media (min-width: 1800px) {
  main { margin-right: auto; margin-left: auto; padding-left: 272px; max-width: 1840px; }
}
@media (max-width: 1200px) and (min-width: 1101px) {
  main { padding: 32px 24px 24px; }
  .panel { padding: 24px; }
  .scale-field label > span { flex-direction: column; align-items: flex-start; gap: 4px; }
}
@media (max-width: 1100px) {
  .sidebar { position: relative; width: auto; height: auto; display: block; padding: 24px; }
  .brand { font-size: 22px; display: inline-flex; }
  .brand-sub { display: inline; margin-left: 10px; }
  .sidebar nav { display: flex; margin-top: 24px; gap: 8px; }
  .sidebar nav a { padding: 12px 18px; }
  .sidebar nav a > span { display: none; }
  .sidebar-foot { display: block; position: absolute; top: 24px; right: 24px; }
  .sidebar-foot p, #sidebar-user { display: none; }
  .sidebar-foot .secondary { min-height: 40px; padding: 8px 16px; background: #fff; font-size: var(--text-sm); }
  main { margin-left: 0; padding: 32px 24px 24px; }
  .panel { padding: 26px; }
  .scale-field label > span { padding: 14px 12px; flex-direction: column; align-items: flex-start; gap: 4px; }
  .result-image-wrap { height: 300px; }
  .footnote { display: block; }
  .footnote p + p { margin-top: 6px; }
}
@media (max-width: 680px) {
  :root { --text-title: 22px; --gap: 20px; --radius: 22px; }
  .sidebar { padding: 20px 16px 16px; }
  .brand { font-size: 20px; gap: 10px; }
  .brand svg { width: 26px; height: 26px; }
  .brand-sub { display: block; margin-left: 0; font-size: var(--text-sm); }
  .sidebar-foot { top: 25px; right: 16px; }
  .sidebar nav { margin-top: 22px; justify-content: space-between; gap: 2px; }
  .sidebar nav a { font-size: var(--text-sm); padding: 11px 5px; min-height: 44px; white-space: nowrap; border-radius: 14px; }
  main { padding: 26px 16px 20px; }
  .page-header { margin-bottom: 24px; gap: 12px; align-items: flex-start; }
  .page-header > div { min-width: 0; }
  .page-header p { font-size: var(--text-sm); max-width: 240px; line-height: 1.75; }
  .balance { gap: 6px; padding: 10px; min-height: 44px; border-radius: 15px; }
  .balance > span:first-child { font-size: 16px; }
  .balance > span:last-child { width: 22px; height: 22px; font-size: 16px; }
  .work-grid, .wallet-grid { grid-template-columns: 1fr; gap: 20px; }
  .panel { padding: 24px 20px; }
  .dropzone { min-height: 190px; padding: 24px 12px; margin-top: 20px; }
  .scale-field label > span { padding: 14px; flex-direction: column; align-items: flex-start; gap: 6px; }
  .result-empty { min-height: 280px; }
  .result-image-wrap { height: 280px; }
  .wallet-summary { padding: 26px 24px; }
  .wallet-summary > p:last-child { margin-top: 20px; }
  .wallet-balance { margin-top: 20px; }
  .records { margin-top: 20px; }
  .record-row { gap: 12px; flex-wrap: wrap; }
  .record-main { min-width: 120px; }
  .record-actions { width: 100%; justify-content: flex-end; gap: 16px; }
  .preset-row { gap: 8px; }
  .preset-row button { font-size: var(--text-sm); padding: 12px 6px; }
  footer { display: block; margin-top: 28px; line-height: 1.8; }
  footer > div { margin-top: 8px; }
  dialog { padding: 28px 24px; border-radius: 24px; }
  .dialog-header h2 { font-size: 20px; }
}
@media (prefers-reduced-motion: no-preference) {
  button, a, .scale-field label > span, .dropzone { transition: background-color .16s, border-color .16s, transform .16s; }
}
