/* OD-LAYOUT-PRIMITIVES v1 — structure only: display, flex/grid, overflow, wrapping, ratio, geometry.
   Put this @layer first; product CSS outside the layer always wins. */
@layer od-layout {
  :where(.od-stack,.od-row,.od-row-top,.od-cluster,.od-grid,.od-field,.od-stat,.od-cell,.od-tile) > :where(*) { min-width: 0; }
  .od-stack   { display: flex; flex-direction: column; gap: var(--od-gap, 8px); }
  .od-row     { display: flex; align-items: center; gap: var(--od-gap, 8px); }
  .od-row-top { display: flex; align-items: flex-start; gap: var(--od-gap, 8px); }
  .od-cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--od-gap, 8px); }
  .od-fill    { flex: 1 1 0; min-width: 0; }
  .od-fixed   { flex: none; }
  .od-grid    { display: grid; gap: var(--od-gap, 12px); grid-template-columns: repeat(var(--od-cols, 3), minmax(0, 1fr)); }
  .od-stat, .od-field, .od-cell { display: grid; gap: var(--od-gap, 2px); }
  :where(.od-stat,.od-field,.od-cell) > :where(*) { display: block; }
  .od-tile { display: grid; grid-template-rows: auto 1fr; }
  :where(.od-tile) > :where(*) { display: block; }
  .od-media { display: block; width: 100%; height: auto; aspect-ratio: var(--od-ratio, auto); }
  .od-media-cover { object-fit: cover; }
  .od-icon { display: inline-block; inline-size: var(--od-icon-size, 1em); block-size: var(--od-icon-size, 1em); flex: none; }
  .od-truncate { display: block; max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .od-clamp-2, .od-clamp-3 { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
  .od-clamp-2 { -webkit-line-clamp: 2; }
  .od-clamp-3 { -webkit-line-clamp: 3; }
  .od-lines-2 { min-height: calc(2 * 1.4em); }
  .od-nowrap  { white-space: nowrap; }
  .od-keep    { word-break: keep-all; overflow-wrap: anywhere; }
  .od-screen { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; height: 100%; }
  .od-scroll { overflow-y: auto; overscroll-behavior: contain; min-height: 0; }
  .od-rail { display: flex; gap: var(--od-gap, 8px); overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none;
             padding-inline: var(--od-rail-pad, 16px); scroll-padding-inline: var(--od-rail-pad, 16px); }
  .od-rail::-webkit-scrollbar { display: none; }
  :where(.od-rail) > :where(*) { flex: none; scroll-snap-align: start; }
  :where(.od-rail) > :where(:last-child) { margin-inline-end: var(--od-rail-pad, 16px); }
  .od-spacer { flex: none; visibility: hidden; pointer-events: none; }
  .od-touch  { min-width: 44px; min-height: 44px; }
}
/* /OD-LAYOUT-PRIMITIVES v1 */

/* ===== Product tokens（沿用「羊躍新局」報到系統視覺） ===== */
:root {
  --bg: #eef1f6;
  --surface: #ffffff;
  --surface-2: #f6f8fc;
  --line: #dde3ee;
  --text: #15203f;
  --muted: #5f6a88;
  --blue: #2b48a8;
  --blue-d: #1d327a;
  --cyan: #1173a8;
  --pink: #c93a84;
  --grad: linear-gradient(95deg, #1596d7 0%, #2b48a8 55%, #e0509a 100%);
  --danger: #c23a52;
  --ok: #138a63;
  --radius: 16px;
  --radius-sm: 12px;
  --serif: "Noto Serif TC", "Songti TC", serif;
  --sans: "Noto Sans TC", -apple-system, "PingFang TC", "Microsoft JhengHei", sans-serif;
  --product-bg: radial-gradient(900px 420px at 12% -8%, #e4ecfa 0%, rgba(238,241,246,0) 70%),
                radial-gradient(760px 380px at 92% 0%, #fae3ef 0%, rgba(238,241,246,0) 70%), #eef1f6;
  --shadow: 0 4px 18px rgba(27,45,100,.06);
  --focus: 0 0 0 3px rgba(43,72,168,.3);
  --t-fast: 160ms;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--sans); color: var(--text); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
:focus-visible { outline: none; box-shadow: var(--focus); }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.eyebrow { letter-spacing: .28em; font-size: 12px; color: var(--blue); text-transform: uppercase; font-weight: 500; }

/* ===== Presentation chrome（展示用，不屬於產品介面） ===== */
.pres-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 8px 6px 16px; background: #15203f; color: #c9d1e6; font: 500 13px/1.4 var(--sans); }
.pres-bar span { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pres-bar b { color: #fff; font-weight: 700; }
.pres-bar a { flex: none; display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 999px; background: rgba(255,255,255,.12); color: #fff; text-decoration: none; }
@media (hover: hover) { .pres-bar a:hover { background: rgba(255,255,255,.22); } }

/* ===== Page shells：所有畫面都是流動版面，不鎖定裝置尺寸 ===== */
.page { min-height: 100dvh; background: var(--product-bg); background-attachment: fixed; }
.g-page { padding: 0 0 env(safe-area-inset-bottom); }
.app-page { position: relative; }
.stage-poster { display: grid; place-items: center; padding: 32px 16px; min-height: calc(100dvh - 48px); }

/* ===== Product components ===== */
.btn {
  appearance: none; border: 0; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px;
  background: var(--grad); background-size: 160% 100%; color: #fff; font-weight: 700; letter-spacing: .08em;
  padding: 12px 24px; border-radius: 999px; font-size: 16px; box-shadow: 0 4px 14px rgba(43,72,168,.22);
  transition: background-position 400ms ease-out, transform var(--t-fast) ease-out;
}
@media (hover: hover) { .btn:hover { background-position: 100% 0; } }
.btn:active { transform: scale(.98); }
.btn.ghost { background: var(--surface); color: var(--blue); border: 1px solid var(--line); font-weight: 500; box-shadow: none; }
@media (hover: hover) { .btn.ghost:hover { border-color: var(--blue); background: #f3f6fd; } }
.btn.danger { background: var(--surface); border: 1px solid rgba(194,58,82,.45); color: var(--danger); font-weight: 500; box-shadow: none; }
.btn.danger-solid { background: var(--danger); box-shadow: none; }
.btn.small { min-height: 44px; padding: 8px 16px; font-size: 14px; letter-spacing: .04em; }
.btn.block { width: 100%; }
.btn.lg { min-height: 56px; font-size: 18px; }
.btn.is-disabled { opacity: .45; box-shadow: none; pointer-events: none; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.kv-wrap { border-radius: 14px; overflow: hidden; box-shadow: 0 6px 24px rgba(27,45,100,.10); background: #fff; }

/* ----- 來賓手機 ----- */
.g-wrap { padding: 12px 16px 32px; }
.g-head { text-align: center; margin-bottom: 20px; }
.g-head h1 { font-family: var(--serif); font-size: 22px; line-height: 1.4; margin: 16px 0 4px; font-weight: 700; }
.g-head h1 em, .grad-text { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.g-head .sub { color: var(--muted); font-size: 14px; }
.form { padding: 24px 20px; }
.scan { position: relative; border: 1px dashed #b9c6e4; border-radius: 12px; padding: 16px; margin-bottom: 24px; background: #f8faff; text-align: center; }
.scan .btn { width: 100%; }
.scan .alt { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; font-size: 14px; color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.scan .hint { font-size: 13px; color: var(--muted); line-height: 1.6; }
.scan .bar { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; margin-top: 16px; }
.scan .bar i { display: block; height: 100%; width: 100%; background: var(--grad); transform-origin: left; transform: scaleX(var(--p, 0)); }
.scan .ptext { font-size: 13px; color: var(--muted); margin-top: 8px; text-align: left; }
.scan .msg { font-size: 14px; margin-top: 12px; line-height: 1.6; text-align: left; display: flex; gap: 8px; align-items: flex-start; }
.scan .msg.ok { color: var(--ok); }
.scan-link { display: block; text-decoration: none; color: inherit; }
.field { display: grid; gap: 8px; margin-bottom: 20px; text-decoration: none; color: inherit; }
.field .lbl { font-size: 14px; color: var(--muted); font-weight: 500; }
.field .lbl b { color: var(--pink); }
.field .lbl i { font-style: normal; font-size: 12px; color: var(--blue); background: #eaf1fb; border-radius: 999px; padding: 2px 9px; margin-left: 6px; }
.input { display: block; width: 100%; min-height: 52px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 13px 14px; font-size: 17px; line-height: 1.5; color: var(--text); overflow-wrap: anywhere; }
.input.ph { color: #8a93ad; }
.input.area { min-height: 108px; }
.input.filled { border-color: rgba(21,150,215,.6); background: #f2f8fe; }
a.field:focus-visible .input { box-shadow: var(--focus); }
.row2 { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 12px; }
.row2 .field { margin-bottom: 8px; }
.note { font-size: 13px; color: var(--muted); margin: 0 0 20px; }
.count { text-align: right; font-size: 12px; color: var(--muted); margin-top: -12px; margin-bottom: 20px; }
.divider { display: flex; align-items: center; gap: 12px; margin: 24px 0 20px; color: var(--muted); font-size: 13px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.privacy { display: block; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); padding: 12px 16px; text-decoration: none; color: inherit; }
.privacy .sum { display: flex; align-items: center; gap: 8px; min-height: 28px; font-size: 14px; color: var(--blue); font-weight: 500; }
.privacy .sum .tri { font-size: 11px; width: 12px; flex: none; }
.privacy .pbody { font-size: 13px; line-height: 1.75; color: var(--muted); margin-top: 12px; }
.privacy .pbody b { display: block; color: var(--text); font-weight: 700; }
.privacy .pbody p { margin: 8px 0 0; }
.consent { display: flex; align-items: flex-start; gap: 12px; margin: 16px 0 8px; font-size: 15px; line-height: 1.5; min-height: 44px; text-decoration: none; color: inherit; }
.box { flex: none; width: 22px; height: 22px; margin-top: 1px; border: 2px solid #8a93ad; border-radius: 5px; background: #fff; display: grid; place-items: center; color: #fff; --od-icon-size: 16px; }
.box.on { background: var(--blue); border-color: var(--blue); }
.box.bad { border-color: var(--danger); }
.ferr { display: flex; gap: 6px; align-items: flex-start; font-size: 14px; color: var(--danger); margin-bottom: 8px; }
.ferr .dot { flex: none; width: 16px; height: 16px; margin-top: 2px; border-radius: 50%; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.submit-area { display: grid; gap: 12px; margin-top: 16px; }
.form-note { text-align: center; font-size: 13px; color: var(--muted); margin: 0; }
.done { padding: 32px 20px; text-align: center; }
.check { width: 76px; height: 76px; border-radius: 50%; margin: 0 auto 16px; display: grid; place-items: center; background: var(--grad); color: #fff; --od-icon-size: 38px; }
.done h2 { font-family: var(--serif); font-size: 26px; margin: 0 0 8px; }
.done .who { margin-top: 20px; display: grid; gap: 2px; }
.done .who .co { font-size: 15px; color: var(--cyan); font-weight: 500; }
.done .who .nm { font-size: 22px; font-weight: 700; }
.done .who .en { font-size: 15px; color: var(--muted); }
.done .who .tt { font-size: 15px; color: var(--muted); }
.wishq { font-family: var(--serif); font-size: 17px; line-height: 1.75; margin: 24px 0 0; padding: 16px 20px; border-radius: var(--radius-sm); background: var(--surface-2); text-align: left; overflow-wrap: anywhere; position: relative; }
.wishq::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 3px; background: var(--grad); }
.evinfo { margin-top: 24px; padding-top: 20px; border-top: 1px dashed var(--line); font-size: 14px; line-height: 1.9; color: var(--muted); text-align: left; display: grid; gap: 2px; }
.evinfo .r { display: grid; grid-template-columns: 3.4em minmax(0,1fr); }
.evinfo .r b { color: var(--blue); font-weight: 500; }
.evinfo .r small { display: block; font-size: 13px; }

/* ----- Admin ----- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 24px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); position: sticky; top: 0; z-index: 5; }
.brand { display: flex; align-items: center; gap: 14px; }
.brand::before { content: ""; width: 5px; height: 40px; border-radius: 3px; background: var(--grad); flex: none; }
.brand .sub { display: block; font-size: 12px; color: var(--muted); letter-spacing: .1em; }
.brand h1 { font-family: var(--serif); font-size: 20px; margin: 0; line-height: 1.3; }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin-right: 4px; }
.live .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(19,138,99,.15); }
.a-main { padding: 20px 24px 40px; }
.latest { padding: 20px 24px; margin-bottom: 16px; display: flex; gap: 20px; align-items: center; border-color: rgba(21,150,215,.45); box-shadow: 0 0 0 4px rgba(21,150,215,.10), var(--shadow); }
.lt-tag { flex: none; background: var(--grad); color: #fff; font-size: 15px; font-weight: 700; padding: 10px 20px; border-radius: 999px; letter-spacing: .06em; white-space: nowrap; }
.lt-body { min-width: 0; display: grid; gap: 2px; }
.lt-co { font-size: 14px; color: var(--cyan); font-weight: 500; }
.lt-nm { font-size: 24px; font-weight: 700; line-height: 1.3; }
.lt-tt { font-size: 15px; color: var(--muted); }
.lt-w { font-family: var(--serif); color: #35406a; margin-top: 6px; font-size: 16px; line-height: 1.6; }
.lt-time { margin-left: auto; flex: none; font-size: 13px; color: var(--muted); white-space: nowrap; align-self: flex-start; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; margin-bottom: 20px; }
.stat { padding: 16px 20px 16px 24px; position: relative; overflow: hidden; }
.stat::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--grad); }
.stat .n { font-family: var(--serif); font-size: 44px; color: var(--blue); line-height: 1.15; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat .l { color: var(--muted); font-size: 14px; }
.toolbar { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.search { position: relative; flex: 0 1 380px; display: block; text-decoration: none; color: inherit; }
.search .input { padding-left: 42px; min-height: 44px; font-size: 16px; padding-top: 9px; padding-bottom: 9px; background: #fff; }
.search .s-ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); --od-icon-size: 18px; }
.search .clear { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); --od-icon-size: 16px; }
.shown { font-size: 14px; color: var(--muted); }
.sample-note { margin-left: auto; font-size: 12px; color: var(--pink); background: #fbe9f2; border-radius: 999px; padding: 2px 10px; white-space: nowrap; }
.list { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; align-items: start; }
.g { padding: 16px 20px; display: grid; gap: 2px; }
.g.is-new { border-color: rgba(21,150,215,.55); }
.g .co { font-size: 13px; color: var(--cyan); font-weight: 500; letter-spacing: .04em; }
.g .nm { font-size: 19px; font-weight: 700; }
.g .nm small { font-size: 14px; font-weight: 400; color: var(--muted); margin-left: 6px; }
.g .tt { font-size: 14px; color: var(--muted); }
.g .w { font-family: var(--serif); margin-top: 8px; line-height: 1.65; font-size: 15px; color: #35406a; }
.g .meta { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font-size: 12px; color: var(--muted); }
.g .del { display: inline-flex; align-items: center; min-height: 32px; padding: 0 8px; margin-right: -8px; border-radius: 8px; color: var(--muted); text-decoration: none; font-size: 13px; }
@media (hover: hover) { .g .del:hover { color: var(--danger); background: #fdf1f3; } }
.badge-new { justify-self: start; font-size: 11px; color: #fff; background: var(--grad); border-radius: 999px; padding: 1px 8px; margin-bottom: 4px; }
.gate { min-height: calc(100dvh - 48px); display: grid; place-items: center; padding: 24px; }
.gate .card { padding: 36px 32px; width: min(380px, 100%); text-align: center; }
.gate h2 { font-family: var(--serif); margin: 10px 0 0; font-size: 24px; }
.gate .pin { margin: 20px 0 16px; text-align: center; letter-spacing: .5em; font-size: 24px; padding-left: 24px; }
.overlay { position: fixed; inset: 0; padding: 16px; background: rgba(21,32,63,.45); display: grid; place-items: center; z-index: 30; }
.dialog { width: min(440px, 100%); background: #fff; border-radius: var(--radius); padding: 24px; box-shadow: 0 24px 60px rgba(21,32,63,.3); display: grid; gap: 16px; }
.dialog h2 { font-family: var(--serif); font-size: 20px; margin: 0; }
.dialog p { margin: 0; color: var(--muted); line-height: 1.7; }
.dialog .acts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ----- Draw ----- */
.d-layout { display: grid; grid-template-columns: minmax(0,1fr) 320px; min-height: calc(100dvh - 48px); }
.d-stage { display: flex; flex-direction: column; align-items: center; text-align: center; padding-bottom: 32px; }
.d-stage .kvbar img { display: block; width: 100%; height: auto; }
.d-stage .kvbar { width: 100%; }
.d-stage h1 { font-family: var(--serif); font-size: 34px; margin: 16px 0 4px; }
.d-stage h1 em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pool { color: var(--muted); font-size: 16px; }
.pool b { color: var(--blue); font-weight: 700; }
.reel { margin: 20px 0 24px; width: calc(100% - 64px); min-height: 280px; padding: 28px 32px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  border-radius: 24px; border: 1px solid var(--line); background: #fff; box-shadow: 0 10px 40px rgba(27,45,100,.10); position: relative; overflow: hidden; text-decoration: none; color: inherit; }
.reel::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: var(--grad); }
.reel.win { box-shadow: 0 16px 60px rgba(43,72,168,.22); }
.reel .placeholder { color: var(--muted); font-family: var(--serif); font-size: 28px; }
.r-co { font-size: 24px; color: var(--cyan); letter-spacing: .06em; font-weight: 500; }
.r-nm { font-family: var(--serif); font-size: 80px; font-weight: 700; line-height: 1.15; margin: 4px 0; color: var(--blue-d); }
.r-en { font-size: 22px; color: var(--muted); }
.r-tt { font-size: 20px; color: var(--text); opacity: .8; margin-top: 4px; }
.r-wish { font-family: var(--serif); font-size: 22px; line-height: 1.6; margin-top: 20px; color: var(--pink); max-width: 680px; }
.reel.spinning .r-nm { filter: blur(1.5px); opacity: .55; }
.reel.spinning .r-co, .reel.spinning .r-tt { opacity: .4; filter: blur(1px); }
.spin-label { margin-top: 16px; font-size: 14px; color: var(--muted); letter-spacing: .2em; }
.go { font-size: 22px; padding: 16px 56px; min-height: 64px; }
.d-hint { margin-top: 12px; font-size: 13px; color: var(--muted); }
.d-aside { border-left: 1px solid var(--line); padding: 24px 22px; background: #fff; display: flex; flex-direction: column; }
.d-aside h2 { font-family: var(--serif); font-size: 20px; margin: 6px 0 12px; }
.wl { list-style: none; padding: 0; margin: 0; flex: 1; }
.wl li { padding: 12px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 32px minmax(0,1fr); gap: 8px; }
.wl .no { font-family: var(--serif); color: var(--pink); font-size: 18px; }
.wl .n { display: block; font-weight: 700; }
.wl .c { display: block; color: var(--muted); font-size: 13px; }
.wl li.absent .n { text-decoration: line-through; color: var(--muted); }
.wl li.absent .tag { display: inline-block; margin-top: 4px; font-size: 12px; color: var(--danger); background: #fbe9ec; border-radius: 999px; padding: 0 8px; }
.wl .empty { display: block; color: var(--muted); border: 0; padding: 12px 0; }
.side-actions { display: grid; gap: 8px; margin-top: 16px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--text); color: #fff; padding: 12px 20px; border-radius: 999px; font-size: 14px; white-space: nowrap; z-index: 20; }

/* ----- QR 立牌 ----- */
.poster { width: min(620px, 100%); text-align: center; padding: 0 0 40px; border: 1px solid var(--line); border-radius: 20px; background: #fff; overflow: hidden; box-shadow: 0 8px 30px rgba(27,45,100,.08); }
.poster .inner { padding: 28px 36px 0; }
.poster h1 { font-family: var(--serif); font-size: 34px; margin: 6px 0; line-height: 1.35; }
.poster h1 em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.qr { display: inline-block; background: #fff; padding: 16px; border-radius: 18px; margin: 24px 0 20px; border: 1px solid var(--line); text-decoration: none; }
@media (hover: hover) { .qr:hover { border-color: var(--blue); } }
.qr img { display: block; width: clamp(200px, 62vw, 280px); height: auto; aspect-ratio: 1; image-rendering: pixelated; }
.steps { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; font-size: 15px; color: var(--muted); }
.steps b { color: var(--pink); margin-right: 4px; }
.poster .evinfo { border: 0; text-align: center; margin-top: 16px; padding-top: 0; }
.poster .url { font-size: 13px; color: var(--muted); margin-top: 8px; }

/* ----- 畫面總覽 ----- */
.hub { min-height: 100dvh; background: var(--product-bg); padding: 40px 32px 64px; }
.hub-in { max-width: 1240px; margin: 0 auto; }
.hub-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 32px; align-items: center; margin-bottom: 32px; }
.hub-head h1 { font-family: var(--serif); font-size: 32px; margin: 8px 0 8px; line-height: 1.35; }
.hub-head p { margin: 0; color: var(--muted); line-height: 1.7; }
.flows { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 20px; align-items: start; }
.flow { padding: 20px; }
.flow h2 { font-family: var(--serif); font-size: 20px; margin: 4px 0 4px; }
.flow .dev { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.steps-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.steps-list a { display: grid; grid-template-columns: 40px minmax(0,1fr); gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); text-decoration: none; color: inherit; transition: border-color var(--t-fast), background var(--t-fast); }
@media (hover: hover) { .steps-list a:hover { border-color: var(--blue); background: #fff; } }
.steps-list .code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px; font-weight: 700; color: var(--blue); text-align: center; background: #eaf1fb; border-radius: 8px; padding: 4px 0; }
.steps-list .t { display: block; font-weight: 500; font-size: 15px; }
.steps-list .d { display: block; font-size: 13px; color: var(--muted); }
.hub-foot { margin-top: 24px; font-size: 13px; color: var(--muted); }
@media (max-width: 1000px) { .flows { grid-template-columns: 1fr; } .hub-head { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .hub { padding: 24px 16px 48px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: 1ms !important; } }

/* ===== RWD：375 / 768 / 1024 / 1440 ===== */
/* 來賓頁：手機滿版，平板以上置中單欄（表單最佳閱讀寬度） */
.g-wrap { max-width: 560px; margin: 0 auto; }
.g-head h1 { font-size: clamp(22px, 5.6vw, 30px); }
@media (min-width: 768px) {
  .g-wrap { padding: 40px 24px 64px; }
  .form, .done { padding: 32px; }
}
@media (max-width: 360px) { .row2 { grid-template-columns: 1fr; gap: 0; } }

/* Admin 看板 */
.a-main { max-width: 1440px; margin: 0 auto; }
.top { flex-wrap: wrap; }
.stat .n { font-size: clamp(30px, 6vw, 44px); }
@media (min-width: 1440px) { .list { grid-template-columns: repeat(4, minmax(0,1fr)); } }
@media (max-width: 1023px) {
  .list { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .top { position: static; }
}
@media (max-width: 767px) {
  .top { padding: 12px 16px; }
  .brand h1 { font-size: 17px; }
  .actions { width: 100%; }
  .actions .btn.small { flex: 1 1 auto; padding: 8px 12px; }
  .live { width: 100%; }
  .a-main { padding: 16px 16px 32px; }
  .latest { flex-direction: column; align-items: flex-start; gap: 12px; padding: 16px; }
  .lt-time { margin-left: 0; order: -1; }
  .lt-nm { font-size: 22px; }
  .stats { gap: 8px; }
  .stat { padding: 12px 12px 12px 16px; }
  .stat .l { font-size: 13px; }
  .toolbar { flex-wrap: wrap; }
  .search { flex: 1 1 100%; }
  .sample-note { margin-left: auto; }
  .list { grid-template-columns: 1fr; }
}

/* 抽籤：寬螢幕左右兩欄，平板直式與手機改上下排列 */
.d-stage h1 { font-size: clamp(24px, 4vw, 38px); padding: 0 16px; }
.r-co { font-size: clamp(16px, 2.6vw, 26px); }
.r-nm { font-size: clamp(44px, 9vw, 88px); }
.r-en { font-size: clamp(16px, 2.4vw, 24px); }
.r-tt { font-size: clamp(15px, 2.2vw, 22px); }
.r-wish { font-size: clamp(16px, 2.4vw, 24px); }
.pool { padding: 0 16px; }
@media (max-width: 1023px) {
  .d-layout { grid-template-columns: 1fr; min-height: 0; }
  .d-aside { border-left: 0; border-top: 1px solid var(--line); }
  .side-actions { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 767px) {
  .reel { width: calc(100% - 32px); min-height: 220px; padding: 24px 16px; border-radius: 20px; }
  .go { width: calc(100% - 32px); padding: 14px 24px; }
  .d-aside { padding: 20px 16px; }
  .side-actions { grid-template-columns: 1fr; }
}

/* 立牌 */
@media (max-width: 767px) {
  .poster .inner { padding: 24px 20px 0; }
  .poster h1 { font-size: clamp(26px, 7vw, 34px); }
}

/* 對話框 */
@media (max-width: 400px) { .dialog .acts { grid-template-columns: 1fr; } }
