:root {
  --f-bg: #f8f7f5;
  --f-surface: #fff;
  --f-surface-soft: #fbf9fd;
  --f-ink: #241e32;
  --f-muted: #655e72;
  --f-faint: #867c91;
  --f-border: #e9e4ed;
  --f-accent: #724bdc;
  --f-accent-dark: #5834bd;
  --f-accent-ink: #5630b8;
  --f-accent-bg: #f0ebfc;
  --f-focus: #906de5;
  --f-good: #246e52;
  --f-good-bg: #e9f5ed;
  --f-danger: #9f394f;
  --f-danger-bg: #fcecf1;
  --f-warn: #805616;
  --f-warn-bg: #fcf0d9;
  --f-shadow: 0 1px 2px #22163e08, 0 5px 18px #22163e07;
  --f-transition: 130ms ease-out;
  color-scheme: light;
}
:root[data-front-theme="dark"] {
  --f-bg: #18151e;
  --f-surface: #231e2b;
  --f-surface-soft: #292333;
  --f-ink: #f3edf8;
  --f-muted: #c3b9cf;
  --f-faint: #aaa0b7;
  --f-border: #3d3449;
  --f-accent: #8860f0;
  --f-accent-dark: #7950e2;
  --f-accent-ink: #d8c4ff;
  --f-accent-bg: #392c51;
  --f-focus: #c0a1ff;
  --f-good: #a0dfba;
  --f-good-bg: #223d32;
  --f-danger: #ffa9b8;
  --f-danger-bg: #482932;
  --f-warn: #f1cf92;
  --f-warn-bg: #47371f;
  --f-shadow: 0 3px 18px #09070e2b;
  color-scheme: dark;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--f-bg);
  color: var(--f-ink);
  font: 14px/1.6 "Microsoft YaHei UI", "PingFang SC", "Noto Sans SC", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
input, button, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button:disabled { cursor: not-allowed; }
a { text-decoration: none; color: var(--f-accent-ink); }
a:hover { text-decoration: underline; }
:where(button, a, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--f-focus);
  outline-offset: 3px;
}
:where(h1,h2,h3,p,dl,dd) { margin: 0; }
h1, h2, h3 { line-height: 1.3; letter-spacing: -.015em; }
h1 { font-size: clamp(24px, 3.4vw, 34px); }
h2 { font-size: 19px; }
h3 { font-size: 15px; }
small { font-size: 12px; }
img, video { display: block; max-width: 100%; }
[hidden] { display: none !important; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 12px; overflow-wrap: anywhere; }
.sr-only { position: absolute; clip: rect(0,0,0,0); width: 1px; height: 1px; overflow: hidden; white-space: nowrap; }
.muted { color: var(--f-muted); }
.prewrap { white-space: pre-wrap; overflow-wrap: anywhere; }
.nowrap { white-space: nowrap; }
.danger-text { color: var(--f-danger); }

.front-loading { display: grid; justify-content: center; align-items: center; gap: 12px; min-height: 60vh; text-align: center; color: var(--f-muted); }
.front-loading .brand-mark { margin: auto; }
.front-shell { min-height: 100vh; }
.private-view { display: grid; grid-template-columns: minmax(192px, 220px) minmax(0, 1fr); }
.front-side {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: sticky;
  top: 0;
  max-height: 100vh;
  padding: 22px 14px 16px;
  background: var(--f-surface);
  border-right: 1px solid var(--f-border);
}
.front-brand { display: inline-flex; align-items: center; gap: 11px; color: var(--f-ink); font-size: 17px; font-weight: 750; line-height: 1.15; letter-spacing: -.02em; white-space: nowrap; }
.front-brand:hover { text-decoration: none; }
.front-brand small { display: block; margin-top: 5px; color: var(--f-muted); font-size: 10px; font-weight: 550; }
.front-side .front-brand { margin: 6px 9px 32px; }
.brand-mark { width: 34px; height: 34px; border-radius: 11px; display: inline-grid; place-items: center; color: white; background: #724bdc; font-size: 21px; line-height: 1; flex: 0 0 auto; }
.front-side nav { display: grid; gap: 5px; }
.front-side nav a { display: flex; min-height: 42px; align-items: center; gap: 13px; border-radius: 8px; padding: 8px 12px; color: var(--f-muted); font-weight: 600; white-space: nowrap; transition: background var(--f-transition), color var(--f-transition); }
.front-side nav a span { width: 16px; font-size: 16px; text-align: center; line-height: 1; }
.front-side nav a:hover, .front-side nav a[aria-current] { text-decoration: none; background: var(--f-accent-bg); color: var(--f-accent-ink); }
.side-account { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 6px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--f-border); }
.side-account > span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; color: var(--f-muted); }
.side-account .f-button { padding-inline: 4px; }
.avatar { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; color: var(--f-accent-ink); background: var(--f-accent-bg); font-weight: 700; }
.front-main { min-width: 0; }
.front-top {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  min-height: 63px;
  padding: 10px clamp(16px, 3vw, 43px);
  background: var(--f-surface);
  border-bottom: 1px solid var(--f-border);
}
.top-current { color: var(--f-muted); font-size: 13px; font-weight: 620; white-space: nowrap; }
.top-actions, .public-view .front-top nav { display: flex; gap: 12px; align-items: center; white-space: nowrap; }
.public-view .front-top nav { margin-left: auto; }
.balance-chip { display: inline-flex; align-items: center; color: var(--f-accent-ink); background: var(--f-accent-bg); font-weight: 720; border-radius: 99px; padding: 6px 13px; font-size: 12px; }
#front-content:focus { outline: none; }
.front-inner { width: min(100%, 1470px); margin-inline: auto; padding: clamp(17px, 2.7vw, 35px) clamp(16px, 3vw, 44px) 56px; }
.guest-home, .public-view .front-inner { width: min(100%, 1240px); }
.front-inner > section + section { margin-top: 27px; }
.guest-home > section > h2 { margin-bottom: 12px; }
.front-heading, .section-title { display: flex; gap: 10px; justify-content: space-between; align-items: center; }
.front-heading { margin-bottom: 21px; }
.front-heading p { color: var(--f-muted); margin-top: 6px; }
.section-title { margin-bottom: 13px; }
.section-title a { font-size: 12px; white-space: nowrap; }

.front-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 190px;
  display: flex;
  align-items: center;
  padding: 26px clamp(18px, 3.7vw, 50px);
  margin-bottom: 26px;
  border-radius: 16px;
  color: #fff;
  background: radial-gradient(ellipse at 80% 28%, #664a91, transparent 58%), linear-gradient(109deg, #251b39, #302145 56%, #40295e);
}
.front-hero > div:first-child { position: relative; z-index: 1; }
.front-hero h1 { font-size: clamp(28px, 4vw, 49px); font-weight: 740; letter-spacing: -.035em; }
.front-hero p { margin: 9px 0 20px; color: #e9ddfc; }
.hero-form { position: absolute; pointer-events: none; inset: 0; overflow: hidden; }
.hero-form::before, .hero-form::after {
  content: "";
  position: absolute;
  top: -117px;
  right: 4%;
  width: min(39%, 414px);
  height: 525px;
  border-radius: 49% 37% 52% 35%;
  transform: rotate(41deg);
  border: 1px solid #d9befb66;
  background: radial-gradient(circle at 65% 40%, #e0c2fb72, transparent 64%);
  box-shadow: 0 0 0 14px #edcdff0b, 0 0 0 30px #e1bdff0c, 0 0 0 49px #e1bdff0b;
}
.hero-form::after { top: -132px; right: 9%; transform: rotate(57deg); opacity: .6; background: none; box-shadow: none; }
.creation-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 25px; }
.creation-tile {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  min-height: 75px;
  padding: 13px;
  border: 1px solid var(--f-border);
  border-radius: 12px;
  background: var(--f-surface);
  color: var(--f-ink);
  box-shadow: var(--f-shadow);
  transition: background var(--f-transition), border-color var(--f-transition);
}
.creation-tile:hover { text-decoration: none; border-color: var(--f-focus); background: var(--f-surface-soft); }
.creation-tile strong, .creation-tile small { display: block; }
.creation-tile strong { font-size: 14px; }
.creation-tile small { margin-top: 2px; color: var(--f-muted); line-height: 1.35; }
.tile-icon { display: grid; place-items: center; width: 39px; height: 39px; border-radius: 11px; color: var(--f-accent-ink); background: var(--f-accent-bg); font-size: 24px; line-height: 1; }
.tile-1 .tile-icon, .tile-5 .tile-icon { color: #8a426d; background: #faeaf5; }
.tile-2 .tile-icon, .tile-4 .tile-icon { color: #3a609a; background: #e9effa; }
.tile-3 .tile-icon { color: #8d5d2c; background: #f9eee3; }
.tile-arrow { color: var(--f-faint); }
.home-columns { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 15px; }
.front-panel { border: 1px solid var(--f-border); border-radius: 13px; background: var(--f-surface); box-shadow: var(--f-shadow); padding: 18px; min-width: 0; }
.recent-list { display: grid; }
.recent-task { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 5px; border: 0; border-top: 1px solid var(--f-border); background: transparent; color: inherit; text-align: left; }
.recent-task:hover { background: var(--f-surface-soft); }
.recent-task > span:first-child { min-width: 0; }
.recent-task small { display: block; color: var(--f-muted); overflow: hidden; text-overflow: ellipsis; }
.credit-mini { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 9px 0 13px; }
.credit-mini > div { display: grid; gap: 2px; border-radius: 10px; padding: 11px; background: var(--f-accent-bg); color: var(--f-accent-ink); }
.credit-mini strong { font-size: 28px; line-height: 1.32; font-variant-numeric: tabular-nums; }
.credit-mini span, .home-credit p { font-size: 12px; }
.home-credit p { color: var(--f-muted); }

.f-button {
  display: inline-flex; min-height: 34px; justify-content: center; align-items: center;
  gap: 5px; padding: 6px 11px; border: 1px solid transparent; border-radius: 8px;
  color: var(--f-ink); background: transparent; font-weight: 660; font-size: 12px; line-height: 1.3;
  white-space: nowrap; vertical-align: middle; transition: background var(--f-transition), color var(--f-transition), border-color var(--f-transition);
}
.f-button:hover { text-decoration: none; }
.f-button.primary { background: var(--f-accent); color: white; }
.f-button.primary:hover:not(:disabled) { background: var(--f-accent-dark); }
.f-button.secondary { color: var(--f-ink); background: var(--f-surface); border-color: var(--f-border); }
.f-button.secondary:hover:not(:disabled), .f-button.ghost:hover:not(:disabled), .f-button[aria-pressed="true"] { background: var(--f-accent-bg); color: var(--f-accent-ink); }
.f-button.ghost { color: var(--f-accent-ink); }
.f-button.hero-link { color: #2a1b40; background: #f0e7fd; padding-inline: 14px; }
.f-button.hero-link:hover { background: #fff; }
.f-button.danger-button { color: var(--f-danger); background: var(--f-danger-bg); }
.f-button.danger-button:hover:not(:disabled) { border-color: var(--f-danger); }
.f-button:disabled { opacity: .47; }
.badge { display: inline-flex; align-items: center; line-height: 1.4; padding: 3px 7px; border-radius: 99px; background: var(--f-accent-bg); color: var(--f-accent-ink); font-size: 11px; font-weight: 650; white-space: nowrap; }
.tone-succeeded, .tone-ready { color: var(--f-good); background: var(--f-good-bg); }
.tone-failed { color: var(--f-danger); background: var(--f-danger-bg); }
.tone-partially_succeeded, .test-tag { color: var(--f-warn); background: var(--f-warn-bg); }
.tone-canceled { color: var(--f-muted); background: var(--f-surface-soft); border: 1px solid var(--f-border); }
.front-empty { display: grid; gap: 9px; justify-items: center; align-content: center; min-height: 128px; padding: 18px; text-align: center; color: var(--f-muted); }
.front-empty > span { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: var(--f-accent-ink); background: var(--f-accent-bg); font-size: 19px; }
.feedback { padding: 10px 12px; border: 1px solid var(--f-border); border-radius: 8px; color: var(--f-muted); background: var(--f-surface-soft); overflow-wrap: anywhere; }
.feedback.danger { color: var(--f-danger); background: var(--f-danger-bg); }
.feedback small { display: block; margin-top: 3px; }
.front-notice {
  position: fixed; z-index: 20; right: 18px; bottom: 18px; padding: 10px 14px;
  max-width: min(480px, calc(100vw - 36px)); border-radius: 9px; border: 1px solid var(--f-border);
  background: var(--f-surface); color: var(--f-ink); box-shadow: var(--f-shadow); overflow-wrap: anywhere;
}
.front-notice:empty { display: none; }
.front-notice.danger { color: var(--f-danger); background: var(--f-danger-bg); }

.auth-layout { width: min(850px, calc(100% - 32px)); display: grid; grid-template-columns: 1fr 1.1fr; margin: clamp(30px, 8vh, 88px) auto; border-radius: 16px; box-shadow: var(--f-shadow); overflow: hidden; }
.auth-decoration { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 12px; min-height: 290px; padding: clamp(20px, 4vw, 50px); color: #fff; background: linear-gradient(146deg, #2d2145, #512f77); }
.auth-decoration h2 { font-size: clamp(23px, 3vw, 31px); }
.auth-decoration p { color: #efe4fb; }
.auth-waves { position: absolute; z-index: -1; width: 88%; height: 115%; right: -57%; bottom: -23%; border-radius: 45%; transform: rotate(30deg); border: 1px solid #edd8ff55; box-shadow: 0 0 0 20px #ecd6ff1e, 0 0 0 43px #ecd6ff13, 0 0 0 70px #ecd6ff0a; }
.auth-panel { border-radius: 0 16px 16px 0; padding: clamp(22px, 4vw, 46px); }
.auth-panel > p { margin: 9px 0 18px; color: var(--f-muted); }
.auth-links { display: flex; justify-content: space-between; gap: 10px; margin-top: 15px; font-size: 13px; }
.front-stack { display: grid; align-content: start; gap: 13px; }
.field, .field-pair { min-width: 0; }
.field { display: grid; gap: 5px; align-content: start; color: var(--f-ink); font-weight: 600; font-size: 12px; }
.field input, .field select, .field textarea {
  width: 100%; min-width: 0; min-height: 37px; padding: 6px 9px; border: 1px solid var(--f-border); border-radius: 7px;
  color: var(--f-ink); background: var(--f-surface); font-weight: 450; font-size: 13px;
}
.field textarea { resize: vertical; min-height: 74px; }
.field :is(input,textarea)::placeholder { color: var(--f-faint); opacity: 1; }
.field-pair, .field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.field-pair { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
.toggle { display: inline-flex; align-items: center; gap: 6px; color: var(--f-muted); font-size: 12px; padding-block: 8px; }
.toggle input, .select-work input { width: 15px; height: 15px; accent-color: var(--f-accent); }
.front-filter { display: flex; flex-wrap: wrap; gap: 9px; align-items: end; margin: 0 0 15px; }
.front-filter .field { flex: 0 1 auto; }
.front-filter input:not([type=date]) { min-width: 146px; }
.front-filter .f-button { min-height: 37px; }
.create-switch { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 15px; }
.create-switch a { color: var(--f-muted); font-size: 12px; font-weight: 620; border: 1px solid var(--f-border); background: var(--f-surface); border-radius: 7px; padding: 6px 9px; }
.create-switch a:hover, .create-switch a[aria-current] { text-decoration: none; color: var(--f-accent-ink); background: var(--f-accent-bg); border-color: var(--f-accent-bg); }
.create-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(283px, 1fr); gap: 14px; align-items: start; }
.preview-panel { position: sticky; top: 12px; }
.empty-preview { display: grid; justify-items: center; align-content: center; gap: 9px; min-height: 274px; text-align: center; padding: 18px; color: var(--f-muted); background: var(--f-surface-soft); border: 1px dashed var(--f-border); border-radius: 11px; }
.empty-preview > span { font-size: 29px; line-height: 1; background: var(--f-accent-bg); color: var(--f-accent-ink); width: 55px; height: 55px; display: grid; place-items: center; border-radius: 16px; margin-bottom: 4px; }
.empty-preview strong { color: var(--f-ink); }
.empty-preview p { font-size: 12px; }
.quote-bar { position: sticky; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 13px 0 4px; border-top: 1px solid var(--f-border); background: var(--f-surface); z-index: 1; }
#quote-display strong { color: var(--f-ink); font-variant-numeric: tabular-nums; }
#quote-display small { display: block; color: var(--f-muted); }
#creation-feedback:empty { display: none; }
.material-group { margin-top: 8px; }
.material-label { display: flex; justify-content: space-between; gap: 4px; margin-bottom: 5px; font-size: 12px; }
.material-label span { color: var(--f-muted); }
.drop-zone { display: flex; justify-content: space-between; align-items: center; gap: 3px; min-height: 57px; border: 1px dashed var(--f-border); border-radius: 9px; padding: 6px 8px; background: var(--f-surface-soft); transition: background var(--f-transition), border-color var(--f-transition); }
.drop-zone.is-dragging { background: var(--f-accent-bg); border-color: var(--f-accent); }
.drop-pick { position: relative; min-height: 34px; display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--f-muted); padding: 3px; cursor: pointer; }
.drop-pick:focus-within { outline: 2px solid var(--f-focus); border-radius: 6px; }
.drop-pick input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.drop-pick span:first-child { font-size: 16px; color: var(--f-accent-ink); }
.material-files { padding-inline: 4px; }
.file-row { min-height: 29px; display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 12px; }
.file-row > span { white-space: nowrap; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.file-row .f-button { min-height: 25px; padding-block: 3px; }
.upload-progress { display: flex; align-items: center; gap: 5px; }
.upload-progress progress { width: clamp(40px, 7vw, 90px); height: 8px; accent-color: var(--f-accent); }
.test-field { display: flex; align-items: end; gap: 8px; padding: 8px; border-radius: 8px; background: var(--f-surface-soft); border: 1px solid var(--f-border); }
.test-field .field { flex: 1; }
.test-field .badge { margin-bottom: 7px; }
.voice-sample { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12px; color: var(--f-muted); }
.voice-sample audio, .work-dialog-media audio, .task-media audio { max-width: 100%; }

.case-grid, .work-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 208px), 1fr)); gap: 13px; }
.case-card, .work-card { overflow: hidden; padding: 0; }
.case-card { display: flex; flex-direction: column; }
.case-cover, .work-media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--f-accent-bg); color: var(--f-accent-ink); display: grid; place-items: center; }
.case-cover > span:first-child { font-size: 38px; line-height: 1; }
.cover-1 { background: #eee4f6; color: #673e7c; }
.cover-2 { background: #e6edf6; color: #345686; }
.cover-3 { background: #f8ede9; color: #8a5145; }
.cover-4 { background: #e9f1ea; color: #45654c; }
.case-cover img, .work-media img, .work-media video, .picker-media img, .picker-media video { width: 100%; height: 100%; object-fit: cover; }
.cover-tag { display: inline-block; position: absolute; right: 7px; top: 7px; padding: 3px 7px; border-radius: 99px; background: #251b3acc; color: #fff; font-size: 10px; }
.case-copy, .work-copy { display: grid; align-content: start; gap: 7px; padding: 12px; min-width: 0; }
.case-copy { flex: 1; grid-template-rows: auto auto minmax(48px, 1fr) auto auto; }
.case-copy > .badge { justify-self: start; }
.case-copy p, .work-copy small, .case-spec { font-size: 12px; color: var(--f-muted); }
.case-spec { padding-bottom: 5px; border-bottom: 1px solid var(--f-border); }
.card-actions, .detail-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.card-actions { justify-content: flex-end; }
.work-media .select-work { position: absolute; left: 8px; top: 8px; }
.select-work { display: inline-grid; place-items: center; width: 27px; height: 27px; background: var(--f-surface); border: 1px solid var(--f-border); border-radius: 7px; }
.select-work input { margin: 0; }
.work-card.is-selected { border-color: var(--f-accent); box-shadow: 0 0 0 1px var(--f-focus); }
.front-table tr.is-selected { background: var(--f-accent-bg); }
.work-toolbar { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; align-items: center; margin: 6px 0 11px; }
.work-toolbar > div, .layout-controls { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.work-toolbar span { color: var(--f-muted); font-size: 12px; }
.work-dialog-media, .task-media, .picker-media, .example-grid img { overflow: hidden; border-radius: 8px; background: var(--f-surface-soft); }
.work-dialog-media :is(img,video) { max-height: min(460px, 43vh); margin-inline: auto; }
.work-clips { border-top: 1px solid var(--f-border); padding-top: 12px; }
.work-clips h3 { margin: 0; }
.task-media :is(img,video) { max-height: 340px; margin-inline: auto; }
.media-placeholder { display: grid; min-height: 44px; place-items: center; color: var(--f-accent-ink); font-size: 24px; }
.example-grid, .picker-grid, .output-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 142px), 1fr)); gap: 8px; }
.picker-card, .output-card { display: grid; gap: 7px; align-content: start; padding: 8px; border: 1px solid var(--f-border); border-radius: 9px; min-width: 0; }
.picker-card strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker-card small, .output-card p { font-size: 12px; color: var(--f-muted); }
.picker-media { aspect-ratio: 16 / 9; display: grid; place-items: center; }
.task-title { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.task-title span:not(.badge) { color: var(--f-muted); }
.task-settlement, .wallet-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 121px), 1fr)); gap: 9px; }
.task-settlement > div { display: grid; border: 1px solid var(--f-border); border-radius: 8px; padding: 8px; }
.task-settlement span, .wallet-summary span { color: var(--f-muted); font-size: 12px; }
.task-settlement strong { font-size: 17px; }
.wallet-summary { margin-bottom: 13px; }
.wallet-count, .wallet-email { display: grid; gap: 3px; }
.wallet-count strong { font-size: 29px; line-height: 1.24; font-variant-numeric: tabular-nums; color: var(--f-accent-ink); }
.wallet-email strong { overflow-wrap: anywhere; }
.wallet-ledger { margin-top: 12px; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.detail-grid > div { padding: 6px 8px; border-radius: 7px; background: var(--f-surface-soft); }
.detail-grid dt { font-size: 11px; color: var(--f-muted); }
.detail-grid dd { overflow-wrap: anywhere; }
.parameter-json { white-space: pre-wrap; overflow-wrap: anywhere; border-radius: 8px; background: var(--f-surface-soft); color: var(--f-muted); padding: 10px; font-size: 12px; margin: 5px 0 0; }
details summary { cursor: pointer; color: var(--f-accent-ink); }

.table-panel { padding: 0; }
.table-scroll { width: 100%; overflow: auto; }
.front-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 12px; }
.front-table th, .front-table td { padding: 9px 10px; border-bottom: 1px solid var(--f-border); min-width: 62px; }
.front-table th { color: var(--f-muted); white-space: nowrap; font-weight: 650; }
.front-table td small { display: block; color: var(--f-muted); font-size: 11px; }
.front-table td strong { white-space: nowrap; }
.front-table td .f-button { min-height: 27px; padding: 4px 6px; font-size: 11px; }
.pager { display: flex; gap: 6px; align-items: center; justify-content: flex-end; padding: 8px 9px; color: var(--f-muted); font-size: 12px; }

#front-dialog { padding: 0; width: min(700px, calc(100% - 24px)); max-height: calc(100dvh - 29px); border: 1px solid var(--f-border); border-radius: 13px; color: var(--f-ink); background: var(--f-surface); box-shadow: 0 18px 70px #1a102857; }
#front-dialog::backdrop { background: #2118327c; }
.dialog-title { display: flex; justify-content: space-between; align-items: center; gap: 9px; padding: 12px 17px; border-bottom: 1px solid var(--f-border); background: var(--f-surface); position: sticky; top: 0; z-index: 1; }
.dialog-body { padding: 15px 17px 18px; }
.dialog-body > * + * { margin-top: 9px; }
.dialog-feedback:empty { display: none; }

@media (max-width: 1050px) {
  .private-view { grid-template-columns: 173px minmax(0, 1fr); }
  .creation-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .front-filter { gap: 8px; }
  .front-table th, .front-table td { padding-inline: 7px; }
}
@media (max-width: 760px) {
  .private-view { display: block; }
  .front-side {
    position: relative; min-height: unset; display: grid; grid-template-columns: 1fr auto; padding: 9px 14px 4px; border-right: 0; border-bottom: 1px solid var(--f-border); gap: 8px;
  }
  .front-side .front-brand { margin: 0; }
  .front-side nav { display: flex; overflow: auto; justify-content: flex-start; grid-column: 1 / -1; grid-row: 2; gap: 5px; }
  .front-side nav a { min-height: 33px; padding: 5px 7px; gap: 4px; font-size: 12px; }
  .front-side nav a span { width: 13px; font-size: 13px; }
  .side-account { border: 0; padding: 0; max-width: min(190px, 42vw); margin: 0; }
  .front-top { min-height: 48px; padding: 5px 14px; }
  .create-layout { grid-template-columns: minmax(0, 1fr); }
  .preview-panel { position: static; }
  .front-hero { min-height: 155px; }
  .hero-form { opacity: .68; }
  .home-columns { grid-template-columns: minmax(0, 1fr); }
  .empty-preview { min-height: 170px; }
}
@media (max-width: 490px) {
  .front-heading { align-items: flex-start; }
  .front-heading h1 { font-size: 24px; }
  .public-view .front-top { flex-wrap: wrap; gap: 5px 8px; }
  .top-actions, .public-view .front-top nav { gap: 5px; }
  .creation-tiles { gap: 8px; }
  .creation-tile { gap: 6px; min-height: 65px; padding: 8px; }
  .creation-tile strong { font-size: 12px; }
  .creation-tile small { font-size: 10px; }
  .tile-icon { width: 28px; height: 28px; font-size: 18px; border-radius: 8px; }
  .tile-arrow { display: none; }
  .auth-layout { grid-template-columns: 1fr; }
  .auth-decoration { display: none; }
  .auth-panel { border-radius: 15px; }
  .front-panel:not(.case-card):not(.work-card):not(.table-panel) { padding: 12px; }
  .quote-bar .f-button { white-space: normal; }
  .table-scroll.front-panel { padding: 0; }
  .front-side nav { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; }
  .front-side nav a { justify-content: center; padding-inline: 4px; }
  .front-side nav a > span { display: none; }
  .wallet-email { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; }
}

.brand-mark.approved-mark { overflow: hidden; background: var(--f-surface); border: 1px solid var(--f-border); }
.approved-mark img { width: 100%; height: 100%; object-fit: contain; padding: 2px; }
@media (max-width: 490px) {
  .front-top .test-tag { display: inline-flex; font-size: 9px; padding-inline: 4px; }
}
