:root {
  color-scheme: light;
  --ink: #1c1c1e;
  --teal: #00708a;
  --deep: #005a6f;
  --muted: #505c61;
  --line: #d4dfe1;
  --mono: 'IBM Plex Mono', 'Cascadia Mono', Consolas, monospace;
  font: 16px/1.58 Inter, 'Noto Sans TC', 'Microsoft JhengHei', sans-serif;
  color: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; background: #fff; }
[hidden] { display: none !important; }
button, a { font: inherit; touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .62; }
a, .text-action { color: var(--teal); text-underline-offset: .21em; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--teal); outline-offset: 4px; }
.mast, main { width: min(100% - 48px, 980px); margin: 0 auto; }
.mast { min-height: 70px; border-bottom: 1px solid var(--ink); display: flex; align-items: center; justify-content: space-between; }
.mast img { display: block; object-fit: contain; }
.mast button { color: var(--ink); background: #fff; padding: 8px 16px; border: 1px solid var(--line); border-radius: 24px; min-height: 44px; font-size: .89rem; }
h1, h2, p, dl, dd, ol { margin: 0; }
.heading { padding: clamp(21px, 4vw, 40px) 0 19px; }
.eyebrow { color: var(--teal); font-size: .82rem; font-weight: 750; letter-spacing: .04em; }
h1 { font-size: clamp(2rem, 5vw, 3.45rem); letter-spacing: -.045em; line-height: 1.14; margin: .17em 0; }
h2 { font-size: 1.2rem; line-height: 1.4; }
.heading > p:last-child, .intake > p, .sample-files > p, #history-empty, footer, small { color: var(--muted); }
.workbench { display: grid; grid-template-columns: .94fr 1.06fr; gap: 20px; align-items: stretch; }
.balance, .intake { border-radius: 10px; padding: clamp(16px, 2.6vw, 28px); min-width: 0; }
.balance { color: var(--ink); background: #edf6f7; border: 1px solid #b2cdd1; border-top: 4px solid var(--teal); }
.panel-head, .section-row, footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
#order-code { font: 600 .86rem/1.25 var(--mono); color: var(--deep); overflow-wrap: anywhere; text-align: right; }
.counter { display: flex; align-items: baseline; gap: 8px; color: var(--deep); margin: 7px 0 3px; }
.counter strong { font: 700 clamp(3.4rem, 6vw, 5.1rem)/1.02 Inter, 'Segoe UI', sans-serif; font-variant-numeric: tabular-nums; letter-spacing: -.055em; overflow-wrap: anywhere; }
.counter span { font-weight: 650; }
#balance-hint { color: #34525a; font-size: .92rem; overflow-wrap: anywhere; }
.track { height: 6px; overflow: hidden; border-radius: 3px; background: #cbdfe2; margin: 15px 0 12px; }
.track > span { display: block; height: 100%; width: 0; background: var(--teal); }
.numbers { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.numbers > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; }
.numbers dt { font-size: .84rem; color: #385259; }
.numbers dd { font-weight: 750; font-variant-numeric: tabular-nums; }
.company-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; margin-top: 13px; border-top: 1px solid #b2cdd1; color: var(--deep); font-weight: 720; text-decoration: none; }
.company-link:hover span:first-child { text-decoration: underline; }
.intake { border: 1px solid var(--line); background: #fff; }
.intake > p { font-size: .92rem; margin: 5px 0 12px; }
.primary, .dropzone { display: flex; align-items: center; width: 100%; min-height: 48px; border-radius: 6px; }
.primary { border: 0; justify-content: space-between; background: var(--teal); color: white; font-weight: 720; padding: 10px 16px; text-align: left; }
.primary::after { content: '→'; padding-left: .5rem; }
.primary:hover { background: var(--deep); }
.dropzone { border: 1.5px dashed #7b999f; gap: 11px; padding: 9px 13px; margin-top: 10px; background: #fafcfc; color: var(--ink); text-align: left; }
.dropzone:hover, .dropzone.dragging { background: #e5f3f5; border-color: var(--deep); }
.dropzone b { color: var(--teal); font-size: 1.45rem; font-weight: 550; }
.dropzone strong, .dropzone small { display: block; }
.dropzone small { font-size: .79rem; }
.feedback:not(:empty) { border-left: 3px solid var(--teal); margin-top: 12px; padding: 2px 9px; font-size: .88rem; overflow-wrap: anywhere; }
.feedback .issue { color: #8d3515; }
.history, .sample-files { margin-top: 28px; border-top: 1px solid var(--line); padding-top: 16px; }
.text-action { background: none; border: 0; text-decoration: underline; font-weight: 650; padding: 8px 0; min-height: 44px; font-size: .88rem; }
#history-empty, .sample-files > p { margin: 5px 0 8px; font-size: .93rem; }
#ledger { padding: 0; list-style: none; }
.entry { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; align-items: center; gap: 6px 16px; padding: 11px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.entry strong, .entry small { display: block; }
.entry small { font: .77rem/1.55 var(--mono); }
.entry .count { text-align: right; color: var(--deep); font-weight: 700; }
.entry .note { color: var(--muted); font-size: .88rem; }
.downloads { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.downloads a { display: block; border: 1px solid var(--line); border-radius: 6px; padding: 10px 13px; color: var(--ink); text-decoration: none; }
.downloads a:hover { border-color: var(--teal); }
.downloads span { font-size: .94rem; font-weight: 650; }
.downloads small { display: block; color: var(--teal); font: .8rem/1.6 var(--mono); }
footer { margin: 22px 0; padding-top: 10px; border-top: 1px solid var(--line); font-size: .83rem; }
noscript { display: block; text-align: center; }
@media (max-width: 695px) {
  .mast, main { width: calc(100% - 30px); }
  .mast { min-height: 57px; }
  .mast img { width: 112px; }
  .mast button { padding: 4px 12px; }
  .heading { padding: 13px 0 12px; }
  .heading > p:last-child { font-size: .9rem; }
  .workbench { grid-template-columns: minmax(0, 1fr); gap: 11px; }
  .balance, .intake { padding: 14px 16px; }
  .counter { margin-block: 2px; }
  .track { margin: 8px 0; }
  .history, .sample-files { margin-top: 19px; }
  .entry { grid-template-columns: minmax(0, 1fr) auto; }
  .entry .note { grid-column: 1/-1; grid-row: 2; }
  .entry .count { grid-column: 2; grid-row: 1; }
  .downloads { grid-template-columns: 1fr; gap: 6px; }
  .downloads a { display: flex; align-items: center; justify-content: space-between; gap: 5px; min-height: 44px; }
}
@media (max-width: 360px) { .mast, main { width: calc(100% - 24px); } .balance, .intake { padding: 11px 12px; } }

.studio-back,.studio-contact a{display:inline-flex;align-items:center;min-height:44px;color:#00708a;font-weight:650;text-underline-offset:3px}.studio-contact{margin-top:22px;padding-top:12px;border-top:1px solid #ced9d6}.studio-contact p{margin:0;color:#505c61;font-size:.88rem}@media print{.studio-contact{display:none}}
