:root {
  --body: #1c1b18;
  --plate: #272622;
  --plate-2: #312f2a;
  --plate-3: #3b3832;
  --line: #4b473f;
  --text: #f3eee3;
  --muted: #b3ac9f;
  --amber: #f5a623;
  --amber-dim: #7a5512;
  --lcd: #14110a;
  --green: #5dcaa5;
  --red: #ec5a50;
  --base: 20px;
  --mono: "Share Tech Mono", ui-monospace, Menlo, monospace;
}
html[data-size="xl"] { --base: 24px; }
* { box-sizing: border-box; }
html { font-size: var(--base); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--body);
  color: var(--text);
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  line-height: 1.6;
}
.wrap { max-width: 560px; margin: 0 auto; padding: 16px 16px 64px; }
.wrap.wide { max-width: 1100px; }

/* 機殼面板 */
.plate {
  position: relative;
  background: var(--plate);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px 18px 20px;
  margin-bottom: 18px;
}
.plate::before, .plate::after {
  content: "";
  position: absolute; top: 9px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--plate-3);
  border: 1px solid #5a564c;
}
.plate::before { left: 9px; }
.plate::after { right: 9px; }

.brand-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.brand { font-family: var(--mono); font-size: .7rem; letter-spacing: .2em; color: var(--muted); }
/* 橫式會徽標題：會徽在左，中文大字、英文在下，寬度自動縮放剛好排滿一行 */
.org-banner { container-type: inline-size; display: flex; align-items: center; gap: 10px; margin: 0 0 6px; }
.org-banner img { width: 64px; height: 64px; flex: none; }
.org-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.org-banner .zh {
  font-weight: 900; color: var(--text); white-space: nowrap; line-height: 1.15; letter-spacing: .02em;
  font-size: 5vw; font-size: calc((100cqw - 74px) / 12.4);
}
.org-banner .en {
  font-family: "Montserrat", "Noto Sans TC", sans-serif; font-weight: 800; color: var(--muted);
  white-space: nowrap; line-height: 1.2; letter-spacing: .01em;
  font-size: 2.3vw; font-size: calc((100cqw - 74px) / 26.5);
}
.size-row { display: flex; justify-content: flex-end; margin-bottom: 10px; }
.org { display: flex; align-items: center; gap: 12px; min-width: 0; }
.org img { width: 56px; height: 56px; flex: none; }
.org b { display: block; font-size: .85rem; line-height: 1.35; color: var(--text); }
.org small { display: block; font-family: var(--mono); font-size: .65rem; letter-spacing: .25em; color: var(--muted); margin-top: 2px; }.size-btn {
  background: var(--plate-2); color: var(--text); border: 1px solid var(--line);
  border-radius: 8px; padding: 6px 12px; font-size: .75rem; font-family: inherit; cursor: pointer;
  white-space: nowrap; flex: none;
}
.brand-row { gap: 10px; }

/* LCD 顯示幕 */
.lcd {
  background: var(--lcd);
  border: 1px solid #000;
  border-radius: 8px;
  padding: 14px 16px;
  box-shadow: inset 0 0 0 1px #2e2a20;
}
.lcd .ch { font-family: var(--mono); font-size: .7rem; color: var(--amber-dim); letter-spacing: .15em; }
.lcd h1 { margin: 2px 0 2px; font-size: 1.45rem; font-weight: 700; color: var(--amber); line-height: 1.3; }
.lcd .sub { color: #d9b56e; font-size: .9rem; }
.lcd .big-date { font-family: var(--mono); font-size: 2.6rem; color: var(--amber); line-height: 1; }

.vu { display: flex; gap: 3px; margin: 12px 0 6px; }
.vu span { flex: 1; height: 10px; border-radius: 1px; background: #2c2920; }
.vu span.on.g { background: var(--green); }
.vu span.on.a { background: var(--amber); }
.vu span.on.r { background: var(--red); }
.vu-label { font-family: var(--mono); font-size: .75rem; color: #9c8a63; }

.schedule { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin-top: 14px; }
.schedule b { font-family: var(--mono); color: var(--amber); font-weight: 400; font-size: 1.05rem; }
.place { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.place a { color: var(--amber); }

/* 區段（像音響的頻道） */
.step-label { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.step-no {
  font-family: var(--mono); font-size: .75rem; color: var(--lcd); background: var(--amber);
  border-radius: 4px; padding: 2px 8px; letter-spacing: .1em;
}
.step-label h2 { margin: 0; font-size: 1.15rem; font-weight: 700; }
.hint { color: var(--muted); font-size: .85rem; margin: 4px 0 10px; }

/* 輸入框 */
input[type=text], input[type=tel], textarea {
  width: 100%;
  background: var(--plate-2);
  color: var(--text);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 14px 14px;
  font-size: 1rem;
  font-family: inherit;
}
input:focus, textarea:focus { outline: none; border-color: var(--amber); }
input::placeholder, textarea::placeholder { color: #7f796d; }
label.field { display: block; margin: 14px 0 6px; font-size: .9rem; color: var(--muted); }

/* 店名搜尋結果 */
.matches { display: grid; gap: 8px; margin-top: 10px; }
.match {
  text-align: left; background: var(--plate-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 10px; padding: 14px; font-size: 1rem;
  font-family: inherit; cursor: pointer;
}
.match:active { background: var(--plate-3); }
.match mark { background: none; color: var(--amber); }
.chosen {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: var(--lcd); border: 1.5px solid var(--amber); border-radius: 10px; padding: 14px;
}
.chosen .name { color: var(--amber); font-size: 1.15rem; font-weight: 700; }
.link-btn { background: none; border: none; color: var(--muted); text-decoration: underline; font-size: .85rem; font-family: inherit; cursor: pointer; white-space: nowrap; }

/* 大按鈕選擇 */
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice button {
  background: var(--plate-2); color: var(--text); border: 2px solid var(--line);
  border-radius: 12px; padding: 18px 8px; font-size: 1.1rem; font-family: inherit; font-weight: 700; cursor: pointer;
}
.choice button[aria-pressed=true] { border-color: var(--amber); background: var(--lcd); color: var(--amber); }

/* 旋鈕式加減 */
.counter { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.counter:last-child { border-bottom: none; }
.counter .lbl { font-size: 1.05rem; }
.counter .lbl small { display: block; color: var(--muted); font-size: .75rem; }
.counter .ctrl { display: flex; align-items: center; gap: 14px; }
.knob {
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--plate-3); color: var(--text);
  border: 3px solid #5f5a50; font-size: 1.6rem; line-height: 1; cursor: pointer; font-family: var(--mono);
  display: flex; align-items: center; justify-content: center;
}
.knob.plus { border-color: var(--amber); color: var(--amber); }
.knob:active { transform: scale(.94); }
.counter .val { font-family: var(--mono); font-size: 2rem; color: var(--amber); min-width: 2.2ch; text-align: center; }

/* 費用表 */
.bill { background: var(--lcd); border-radius: 10px; padding: 14px 16px; font-family: var(--mono); }
.bill .row { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; color: #d9c9a3; font-family: "Noto Sans TC", sans-serif; font-size: .95rem; }
.bill .row span:last-child { font-family: var(--mono); }
.bill .total { border-top: 1px dashed var(--amber-dim); margin-top: 6px; padding-top: 10px; color: var(--amber); font-size: 1.2rem; font-weight: 700; }
.bill .total span:last-child { font-size: 1.6rem; }
.toggle { display: flex; gap: 12px; align-items: flex-start; margin: 14px 0 4px; cursor: pointer; }
.toggle input { width: 28px; height: 28px; accent-color: var(--amber); flex: none; margin-top: 2px; }

.bank { margin-top: 14px; border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.bank .acc { font-family: var(--mono); font-size: 1.5rem; color: var(--amber); letter-spacing: .04em; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--plate-2); color: var(--text); border: 1.5px solid var(--line);
  border-radius: 10px; padding: 12px 16px; font-size: .95rem; font-family: inherit; cursor: pointer; text-decoration: none;
}
.btn:active { background: var(--plate-3); }
.btn-primary {
  width: 100%; background: var(--amber); color: #1c1b18; border: none;
  border-radius: 12px; padding: 20px; font-size: 1.3rem; font-weight: 700; font-family: inherit; cursor: pointer;
}
.btn-primary:active { transform: scale(.99); }
.btn-primary[disabled] { opacity: .6; }

.upload {
  display: block; text-align: center; border: 2px dashed var(--line); border-radius: 12px;
  padding: 22px 14px; cursor: pointer; color: var(--muted);
}
.upload strong { display: block; color: var(--text); font-size: 1.05rem; }
.upload input { display: none; }
.upload img { max-width: 100%; max-height: 220px; border-radius: 8px; margin-top: 10px; }

.error { color: var(--red); font-size: .9rem; margin-top: 8px; }
.notice { background: #3a2f17; border: 1px solid var(--amber-dim); color: #f1d9a4; border-radius: 10px; padding: 12px 14px; font-size: .9rem; margin-bottom: 14px; }

/* 完成畫面 */
.done { text-align: center; }
.stamp {
  display: inline-flex; align-items: center; justify-content: center;
  width: 150px; height: 150px; border-radius: 50%;
  border: 5px solid var(--red); color: var(--red);
  font-size: 2rem; font-weight: 900; transform: rotate(-12deg); margin: 10px 0 20px;
  letter-spacing: .1em;
}
.summary { text-align: left; }
.summary .row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed var(--line); }

/* 回憶：卡帶牆 */
.tapes { display: grid; gap: 14px; }
.tape {
  background: #d8cfbd; color: #2a2620; border-radius: 10px; padding: 12px; cursor: pointer;
  border: none; text-align: left; font-family: inherit; width: 100%;
}
.tape .label { background: #f3ecdc; border-radius: 4px; padding: 8px 10px; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.tape .label .yr { font-family: var(--mono); font-size: 1.4rem; color: #b3261e; }
.tape .label .t { font-weight: 700; font-size: 1rem; }
.tape .window { margin: 10px auto 0; width: 70%; height: 46px; background: #2a2620; border-radius: 23px; display: flex; align-items: center; justify-content: space-around; padding: 0 14px; }
.tape .reel { width: 30px; height: 30px; border-radius: 50%; border: 4px dashed #d8cfbd; }
.tape.playing .reel { animation: spin 2.4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .tape.playing .reel { animation: none; } }
.tape .note { font-size: .8rem; margin-top: 8px; color: #5a5348; text-align: center; }
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.gallery .ph:first-child { grid-column: 1 / -1; }
.gallery .ph { display: block; padding: 0; margin: 0; border: 0; background: none; color: var(--muted); text-align: left; cursor: zoom-in; font-family: inherit; }
.gallery img { display: block; width: 100%; aspect-ratio: 3/2; object-fit: cover; border-radius: 6px; background: var(--plate-2); }
.gallery .ph span { display: block; font-size: .72rem; line-height: 1.4; margin-top: 4px; }
.video-box { position: relative; aspect-ratio: 16/9; margin-top: 12px; border-radius: 8px; overflow: hidden; background: #000; }
.video-box iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.empty-mem { color: var(--muted); font-size: .9rem; margin-top: 10px; text-align: center; border: 1px dashed var(--line); border-radius: 8px; padding: 18px; }

.lightbox { position: fixed; inset: 0; background: rgba(10,9,7,.96); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; z-index: 50; padding: 64px 12px 20px; }
.lb-close { position: absolute; top: 12px; right: 12px; }
.lb-fig { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; max-width: 100%; }
.lb-fig img { max-width: 100%; max-height: 68vh; border-radius: 6px; }
.lb-fig figcaption { color: var(--text); font-size: .95rem; text-align: center; padding: 0 8px; }
.lb-nav { display: flex; align-items: center; gap: 12px; }
.lb-nav .btn { padding: 14px 18px; font-size: 1rem; }
.lb-count { font-family: var(--mono); color: var(--amber); min-width: 4ch; text-align: center; }

.footer { text-align: center; color: var(--muted); font-size: .8rem; margin-top: 24px; }
.footer a { color: var(--amber); }
[hidden] { display: none !important; }
