/*
 * 新介面：登入頁 + 文件列印頁（正式版用 theme-g + layout-5）
 * 配色 theme-a 至 theme-g、登入頁版面 layout-1 至 layout-7（預覽頁可以即時切換比較）
 * 全部顏色用 CSS 變數，換風格只係換 body 的 class。
 * 只影響螢幕顯示；列印（@media print）唔受影響。
 */

:root {
  --font: "Noto Sans TC", "Microsoft JhengHei", "PingFang TC", system-ui, sans-serif;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 22px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

.theme-a {
  --bg: #F4F5F7; --surface: #FFFFFF; --surface-2: #F8F9FB;
  --ink: #16181D; --muted: #667085; --line: #E4E7EC;
  --brand: #E60012; --brand-ink: #FFFFFF; --brand-soft: #FDECEE;
  --btn: #E60012; --btn-ink: #FFFFFF; --btn-hover: #C70010;
  --field: #F8F9FB; --focus: rgba(230, 0, 18, .16);
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 14px 36px rgba(16, 24, 40, .08);
  --visual-tint: linear-gradient(180deg, rgba(230, 0, 18, 0) 35%, rgba(150, 0, 12, .88) 100%);
}
.theme-b {
  color-scheme: dark;
  --bg: #0E1014; --surface: #161920; --surface-2: #1C2029;
  --ink: #F2F4F7; --muted: #98A2B3; --line: #2A2F3A;
  --brand: #FF2D3D; --brand-ink: #FFFFFF; --brand-soft: rgba(255, 45, 61, .14);
  --btn: #F2F4F7; --btn-ink: #0E1014; --btn-hover: #FFFFFF;
  --field: #1C2029; --focus: rgba(255, 45, 61, .30);
  --shadow: 0 0 0 1px rgba(255, 255, 255, .04), 0 24px 60px rgba(0, 0, 0, .5);
  --visual-tint: linear-gradient(180deg, rgba(14, 16, 20, .15) 0%, rgba(14, 16, 20, .55) 55%, rgba(14, 16, 20, .96) 100%);
}
.theme-c {
  --bg: #F7F1E8; --surface: #FFFCF7; --surface-2: #FBF6EE;
  --ink: #2B2118; --muted: #8C7A66; --line: #E8DCCB;
  --brand: #B4532A; --brand-ink: #FFFFFF; --brand-soft: #F6E7DA;
  --btn: #2B2118; --btn-ink: #FFFCF7; --btn-hover: #46372A;
  --field: transparent; --focus: rgba(180, 83, 42, .18);
  --shadow: 0 1px 2px rgba(60, 40, 20, .05), 0 18px 44px rgba(60, 40, 20, .10);
  --visual-tint: linear-gradient(180deg, rgba(43, 33, 24, 0) 40%, rgba(43, 33, 24, .82) 100%);
}

.theme-d {
  --bg: #F3F5F9; --surface: #FFFFFF; --surface-2: #F7F9FC;
  --ink: #0F1B2D; --muted: #5B6B82; --line: #E1E6EF;
  --brand: #1D3B70; --brand-ink: #FFFFFF; --brand-soft: #E8EEF8;
  --btn: #1D3B70; --btn-ink: #FFFFFF; --btn-hover: #15305E;
  --field: #F7F9FC; --focus: rgba(29, 59, 112, .16);
  --shadow: 0 1px 2px rgba(15, 27, 45, .05), 0 14px 36px rgba(15, 27, 45, .09);
}
.theme-e {
  --bg: #F2F7F6; --surface: #FFFFFF; --surface-2: #F6FAF9;
  --ink: #10221F; --muted: #5A706B; --line: #DCE8E5;
  --brand: #0F766E; --brand-ink: #FFFFFF; --brand-soft: #E3F3F1;
  --btn: #0F766E; --btn-ink: #FFFFFF; --btn-hover: #0B5E58;
  --field: #F6FAF9; --focus: rgba(15, 118, 110, .16);
  --shadow: 0 1px 2px rgba(16, 34, 31, .05), 0 14px 36px rgba(16, 34, 31, .08);
}
.theme-f {
  --bg: #ECEDEF; --surface: #FFFFFF; --surface-2: #F5F6F7;
  --ink: #18181B; --muted: #6B6B73; --line: #E2E2E6;
  --brand: #E60012; --brand-ink: #FFFFFF; --brand-soft: #FDECEE;
  --btn: #18181B; --btn-ink: #FFFFFF; --btn-hover: #2E2E33;
  --field: #F5F6F7; --focus: rgba(24, 24, 27, .12);
  --shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 14px 36px rgba(0, 0, 0, .08);
}
.theme-g {
  --bg: #FFF7F2; --surface: #FFFFFF; --surface-2: #FFF9F5;
  --ink: #2A1A14; --muted: #8A6A5C; --line: #F3E1D6;
  --brand: #EE3A1F; --brand-ink: #FFFFFF; --brand-soft: #FFEDE5;
  --btn: linear-gradient(135deg, #E60012 0%, #FF5A2C 55%, #FF9A3C 100%); --btn-ink: #FFFFFF;
  --btn-hover: linear-gradient(135deg, #CC0010 0%, #F04A1E 55%, #FF8A2C 100%);
  --field: #FFF9F5; --focus: rgba(238, 58, 31, .18);
  --shadow: 0 1px 2px rgba(80, 30, 10, .05), 0 16px 40px rgba(238, 58, 31, .12);
}

/* ---------- 共用小元件 ---------- */
.ico { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.brandmark { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  border-radius: 12px; background: var(--brand); color: var(--brand-ink); flex: none; }
.brandmark .ico { width: 22px; height: 22px; }

.themebar { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 1000;
  display: flex; align-items: center; gap: 4px; padding: 5px; border-radius: 999px;
  background: rgba(20, 22, 28, .86); color: #fff; font: 13px/1 var(--font);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25); backdrop-filter: blur(10px); }
.themebar span { padding: 0 10px 0 12px; opacity: .75; }
.themebar, .themebar a { white-space: nowrap; }
.themebar-sep { width: 1px; height: 20px; background: rgba(255, 255, 255, .25); margin: 0 4px; }
@media (max-width: 760px) { .themebar { flex-wrap: wrap; justify-content: center; width: max-content; max-width: calc(100vw - 24px); border-radius: 18px; } .themebar span { display: none; } .themebar a { padding: 7px 10px; } .themebar-sep { display: none; } }
.themebar a { color: #fff; text-decoration: none; padding: 8px 14px; border-radius: 999px; transition: background .2s; }
.themebar a:hover { background: rgba(255, 255, 255, .12); }
.themebar a[aria-current="true"] { background: #fff; color: #111; }

/* ================================================================
 * 登入頁
 * ================================================================ */
.lp { margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink); font-family: var(--font);
  -webkit-font-smoothing: antialiased; }
.lp * { box-sizing: border-box; }
.lp-wrap { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }

/* 左邊面板（唔用相片）：layout-1 資訊面板、layout-2 品牌圖案；layout-3 冇面板 */
.theme-a { --panel-bg: #E60012; --panel-ink: #FFFFFF; --panel-accent: rgba(255, 255, 255, .16); --panel-card: rgba(255, 255, 255, .13); }
.theme-b { --panel-bg: #161920; --panel-ink: #F2F4F7; --panel-accent: #FF2D3D; --panel-card: rgba(255, 255, 255, .05); }
.theme-c { --panel-bg: #2B2118; --panel-ink: #FBF6EE; --panel-accent: #B4532A; --panel-card: rgba(255, 255, 255, .07); }
.theme-d { --panel-bg: #13294B; --panel-ink: #FFFFFF; --panel-accent: rgba(255, 255, 255, .12); --panel-card: rgba(255, 255, 255, .08); }
.theme-e { --panel-bg: #0F766E; --panel-ink: #FFFFFF; --panel-accent: rgba(255, 255, 255, .14); --panel-card: rgba(255, 255, 255, .12); }
.theme-f { --panel-bg: #232326; --panel-ink: #FAFAFA; --panel-accent: #E60012; --panel-card: rgba(255, 255, 255, .06); }
.theme-g { --panel-bg: linear-gradient(140deg, #E60012 0%, #FF5A2C 50%, #FFA53C 100%); --panel-ink: #FFFFFF; --panel-accent: rgba(255, 255, 255, .18); --panel-card: rgba(255, 255, 255, .16); }
.theme-d .lp-stripes path, .theme-e .lp-stripes path, .theme-g .lp-stripes path { stroke: var(--panel-accent); }
.theme-g .brandmark, .theme-g .avatar { background: linear-gradient(135deg, #E60012, #FF7A33); }
.lp-panel { position: relative; overflow: hidden; margin: 20px; border-radius: var(--r-lg); min-height: 560px; padding: 36px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 28px;
  background: var(--panel-bg); color: var(--panel-ink); animation: lpFade .8s var(--ease) both; }
.lp-panel > * { position: relative; }
.theme-b .lp-panel { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }
.lp-chip { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; padding: 7px 13px 7px 9px; border-radius: 999px;
  background: var(--panel-card); border: 1px solid rgba(255, 255, 255, .2); font-size: 13px; letter-spacing: .3px; }
.lp-chip .ico { width: 16px; height: 16px; }
.lp-greet { margin: 0 0 8px; font-size: clamp(34px, 3.6vw, 52px); font-weight: 700; letter-spacing: .5px; line-height: 1.2; }
.lp-date { margin: 0; font-size: 15px; opacity: .85; }

/* layout-1：資訊面板 */
.lp-info::before { content: ""; position: absolute; width: 520px; height: 520px; right: -180px; top: -200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .16), transparent 65%); }
.theme-b .lp-info::before { background: radial-gradient(circle, rgba(255, 45, 61, .22), transparent 65%); }
.theme-c .lp-info::before { background: radial-gradient(circle, rgba(180, 83, 42, .35), transparent 65%); }
.lp-clock b { display: block; font-size: clamp(72px, 8vw, 116px); font-weight: 500; line-height: 1; letter-spacing: 2px;
  font-variant-numeric: tabular-nums; }
.lp-clock span { display: block; margin-top: 14px; font-size: 16px; opacity: .88; }
.lp-prices { background: var(--panel-card); border: 1px solid rgba(255, 255, 255, .18); border-radius: 18px; padding: 18px 22px;
  backdrop-filter: blur(6px); }
.lp-prices-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; font-size: 14px; opacity: .9; }
.lp-prices-head small { font-size: 12px; opacity: .8; }
.lp-price { display: flex; justify-content: space-between; align-items: baseline; padding: 9px 0; border-top: 1px solid rgba(255, 255, 255, .14); font-size: 16px; }
.lp-price b { font-size: 26px; font-weight: 500; font-variant-numeric: tabular-nums; }
.theme-b .lp-price b { color: #fff; }
.lp-prices-foot { display: block; margin-top: 8px; font-size: 12px; opacity: .75; }

/* layout-2：品牌圖案 */
.lp-stripes { position: absolute; inset: 0; width: 100%; height: 100%; }
.lp-stripes path { stroke: var(--panel-accent); }
.theme-a .lp-stripes path { stroke: rgba(255, 255, 255, .16); }
.theme-a .lp-stripes path:first-child { stroke: rgba(255, 255, 255, .24); }
.lp-stripes path { stroke-dasharray: 1200; stroke-dashoffset: 1200; animation: lpDraw 1.6s var(--ease) forwards; }
.lp-stripes path:nth-child(2) { animation-delay: .15s; }
.lp-stripes path:nth-child(3) { animation-delay: .3s; }
.lp-stripes path:nth-child(4) { animation-delay: .45s; }
.lp-art-text { margin-top: auto; }
.theme-c .lp-greet { font-family: "Noto Serif TC", serif; }

/* layout-3：置中卡片 */
.layout-3 .lp-wrap { grid-template-columns: 1fr; place-items: center;
  background: radial-gradient(var(--line) 1.2px, transparent 1.3px) 0 0 / 24px 24px, var(--bg) !important; }
.layout-3 .lp-side { width: 100%; background: none !important; }
.layout-3 .lp-card { max-width: 430px; background: var(--surface); padding: 42px 38px 34px; border-radius: 26px;
  border: 1px solid var(--line); box-shadow: var(--shadow); }
.layout-3 .lp-head { flex-direction: column; text-align: center; gap: 12px; margin-bottom: 24px; }
.layout-3 .lp-head .brandmark { width: 58px; height: 58px; border-radius: 18px; box-shadow: 0 10px 24px var(--focus); }
.layout-3 .lp-head .brandmark .ico { width: 30px; height: 30px; }
.layout-3 .lp-head b { font-size: 18px; }
.layout-3 .lp-title, .layout-3 .lp-sub { text-align: center; }
.layout-3 .lp-title { font-size: 24px; }

/* 右邊：登入表格 */
.lp-side { display: flex; align-items: center; justify-content: center; padding: 48px 28px 96px; }
.lp-card { width: 100%; max-width: 400px; animation: lpUp .7s .1s var(--ease) both; }
.lp-head { display: flex; align-items: center; gap: 12px; margin-bottom: 30px; }
.lp-head b { display: block; font-size: 16px; }
.lp-head small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.lp-title { margin: 0 0 6px; font-size: 28px; font-weight: 700; letter-spacing: .3px; }
.lp-sub { margin: 0 0 26px; color: var(--muted); font-size: 15px; }

.lp-alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; margin-bottom: 18px;
  border-radius: var(--r-sm); background: var(--brand-soft); color: var(--brand); font-size: 14px; line-height: 1.5;
  animation: lpShake .45s var(--ease); }
.lp-alert .ico { margin-top: 1px; }
.lp-alert.ok { background: #E8F7EE; color: #157F3C; animation: lpUp .4s var(--ease); }
.lp .avatar { width: 40px; height: 40px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center;
  background: var(--brand); color: var(--brand-ink); font-size: 17px; font-weight: 700; }
.theme-g .lp .avatar, .lp.theme-g .avatar { background: linear-gradient(135deg, #E60012, #FF7A33); }

.fld { display: block; margin-bottom: 16px; }
.fld-lbl { display: block; font-size: 13px; color: var(--muted); margin-bottom: 7px; }
.fld-box { position: relative; display: flex; align-items: center; }
.fld-box > .ico { position: absolute; left: 14px; color: var(--muted); pointer-events: none; transition: color .2s; }
.fld input { width: 100%; height: 50px; padding: 0 48px 0 44px; font: 16px var(--font); color: var(--ink);
  background: var(--field); border: 1.5px solid var(--line); border-radius: var(--r-sm); outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s; }
.fld input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--focus); background: var(--surface); }
.fld-box:focus-within > .ico { color: var(--brand); }
.fld-eye { position: absolute; right: 6px; width: 38px; height: 38px; border: 0; border-radius: 8px; background: none;
  color: var(--muted); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.fld-eye:hover { color: var(--ink); background: var(--surface-2); }
.fld-eye .off { display: none; }
.fld-eye[aria-pressed="true"] .on { display: none; }
.fld-eye[aria-pressed="true"] .off { display: block; }
.caps { display: none; margin-top: 7px; font-size: 13px; color: var(--brand); }
.caps.show { display: block; }

.btn-main { position: relative; width: 100%; height: 52px; margin-top: 8px; border: 0; border-radius: var(--r-sm);
  background: var(--btn); color: var(--btn-ink); font: 600 16px var(--font); letter-spacing: 1px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: background .2s, transform .12s, box-shadow .2s; box-shadow: 0 8px 20px var(--focus); }
.btn-main:hover { background: var(--btn-hover); }
.btn-main:active { transform: scale(.985); }
.btn-main .ico { transition: transform .25s var(--ease); }
.btn-main:hover .ico { transform: translateX(3px); }
.btn-main .spin { display: none; width: 20px; height: 20px; border-radius: 50%;
  border: 2.5px solid currentColor; border-right-color: transparent; animation: lpSpin .7s linear infinite; }
.btn-main.loading { pointer-events: none; }
.btn-main.loading .spin { display: block; }
.btn-main.loading .lbl, .btn-main.loading .ico { display: none; }
.btn-main:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }

.lp-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 26px; font-size: 13px; color: var(--muted); }
.lp-foot a { color: var(--muted); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.lp-foot a:hover { color: var(--ink); }
.lp-foot .ico { width: 16px; height: 16px; }
.lp-secure { display: inline-flex; align-items: center; gap: 6px; }

/* 風格細節 */
.theme-a .lp-side, .theme-d .lp-side, .theme-e .lp-side, .theme-f .lp-side, .theme-g .lp-side { background: var(--surface); }
.theme-a .lp-wrap { background: var(--bg); }
.theme-b .lp-card { background: var(--surface); padding: 34px 30px; border-radius: var(--r-lg); box-shadow: var(--shadow); }
.theme-b .lp-side { background: radial-gradient(600px 400px at 80% 10%, rgba(255, 45, 61, .10), transparent 70%); }
.theme-c .lp-title { font-family: "Noto Serif TC", serif; font-weight: 700; font-size: 32px; }
.theme-c .fld input { border-width: 0 0 1.5px; border-radius: 0; padding-left: 32px; background: transparent; }
.theme-c .fld input:focus { box-shadow: none; background: transparent; }
.theme-c .fld-box > .ico { left: 2px; }
.theme-c .btn-main { border-radius: 999px; box-shadow: none; }

@media (max-width: 900px) {
  .lp-wrap { grid-template-columns: 1fr; }
  .lp-panel { min-height: 0; margin: 12px 12px 0; padding: 22px; gap: 18px; }
  .theme-a .lp-wrap { background: var(--surface); }
  .lp-clock b { font-size: 46px; }
  .lp-clock span { margin-top: 6px; font-size: 13px; }
  .lp-prices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 12px 14px; }
  .lp-prices-head, .lp-prices-foot { grid-column: 1 / -1; }
  .lp-prices-head { margin-bottom: 4px; }
  .lp-price { flex-direction: column; align-items: flex-start; gap: 2px; padding: 6px 0 2px; font-size: 12px; }
  .lp-price span { opacity: .85; }
  .lp-price b { font-size: 20px; }
  .lp-art { min-height: 210px; }
  .lp-greet { font-size: 30px; }
  .lp-side { padding: 28px 20px 110px; }
  .theme-b .lp-card { padding: 26px 20px; }
  .layout-3 .lp-card { padding: 32px 22px 26px; }
}

/* ---------- layout-4：頂部橫幅 ---------- */
.lp.layout-4 .lp-wrap { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
.lp-band { position: relative; overflow: hidden; padding: 46px 6vw 150px; background: var(--panel-bg); color: var(--panel-ink);
  animation: lpFade .8s var(--ease) both; }
.lp-band::after { content: ""; position: absolute; right: -120px; top: -180px; width: 520px; height: 520px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .16), transparent 65%); }
.lp-band-in { position: relative; z-index: 1; max-width: 1100px; margin: 0 auto; display: flex; justify-content: space-between;
  align-items: flex-end; gap: 28px; flex-wrap: wrap; }
.lp-band .lp-greet { margin: 18px 0 8px; }
.lp-band-prices { display: flex; gap: 12px; flex-wrap: wrap; }
.lp-band-prices div { min-width: 124px; padding: 12px 18px; border-radius: 16px; background: var(--panel-card); border: 1px solid rgba(255, 255, 255, .2); }
.lp-band-prices span { display: block; font-size: 13px; opacity: .85; }
.lp-band-prices b { display: block; margin-top: 2px; font-size: 26px; font-weight: 500; font-variant-numeric: tabular-nums; }
.lp.layout-4 .lp-side { background: none; align-items: flex-start; margin-top: -112px; padding-top: 0; }
.lp.layout-4 .lp-card, .lp.layout-5 .lp-card, .lp.layout-7 .lp-card { max-width: 430px; padding: 38px 34px 30px; border-radius: 24px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }

/* ---------- layout-5：玻璃動態背景 ---------- */
.theme-a { --blob2: #FF8A3D; --blob3: #FFB4B4; }
.theme-b { --blob2: #6D28D9; --blob3: #1D4ED8; }
.theme-c { --blob2: #E9A66B; --blob3: #D6B08C; }
.theme-d { --blob2: #3B82F6; --blob3: #93C5FD; }
.theme-e { --blob2: #34D399; --blob3: #5EEAD4; }
.theme-f { --blob2: #9CA3AF; --blob3: #E60012; }
.theme-g { --blob2: #FFB347; --blob3: #FF5A2C; }
.lp.layout-5 .lp-wrap { grid-template-columns: 1fr; place-items: center; }
.lp.layout-5 .lp-side { position: relative; z-index: 2; width: 100%; background: none; }
.lp-blobs { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: var(--bg); }
.lp-blobs i { position: absolute; width: 46vmax; height: 46vmax; border-radius: 50%; filter: blur(70px); opacity: .55;
  animation: lpBlob 18s ease-in-out infinite alternate; }
.lp-blobs i:nth-child(1) { background: var(--brand); left: -12vmax; top: -14vmax; }
.lp-blobs i:nth-child(2) { background: var(--blob2); right: -14vmax; top: 8vh; animation-delay: -6s; }
.lp-blobs i:nth-child(3) { background: var(--blob3); left: 18vw; bottom: -22vmax; animation-delay: -12s; }
.lp-blobs i:nth-child(4) { background: var(--blob2); width: 24vmax; height: 24vmax; left: 55vw; top: -6vmax; opacity: .35; animation-delay: -3s; }
.theme-b .lp-blobs i { opacity: .38; }
.lp.layout-5 .lp-card { background: color-mix(in srgb, var(--surface) 62%, transparent); backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4); border: 1px solid rgba(255, 255, 255, .55); }
.theme-b.layout-5 .lp-card { border-color: rgba(255, 255, 255, .10); }
.lp.layout-5 .fld input { background: color-mix(in srgb, var(--surface) 70%, transparent); }
.lp-corner { position: fixed; z-index: 3; left: 28px; right: 28px; top: 24px; display: flex; justify-content: space-between; align-items: center; }
.lp.layout-5 .lp-chip { background: color-mix(in srgb, var(--surface) 55%, transparent); border-color: var(--line); color: var(--ink); backdrop-filter: blur(10px); }
.lp-corner-date { font-size: 14px; color: var(--muted); }

/* ---------- layout-6：大字編輯風 ---------- */
.lp.layout-6 .lp-wrap { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); max-width: 1260px; margin: 0 auto; align-items: center; }
.lp-edit { padding: 64px 60px; border-right: 1px solid var(--line); animation: lpUp .7s var(--ease) both; }
.lp-edit-kicker { margin: 0; font-size: 14px; font-weight: 500; letter-spacing: 3px; color: var(--brand); }
.lp-edit-big { margin: 16px 0 20px; font-size: clamp(64px, 6.6vw, 124px); white-space: nowrap; font-weight: 700; line-height: 1; letter-spacing: -2px; color: var(--ink); }
.theme-c .lp-edit-big { font-family: "Noto Serif TC", serif; }
.theme-g .lp-edit-big { background: linear-gradient(135deg, #E60012, #FF5A2C 55%, #FF9A3C); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lp-edit-line { margin: 0; font-size: 17px; color: var(--muted); }
.lp-edit-line b { color: var(--ink); font-variant-numeric: tabular-nums; }
.lp-edit-prices { display: flex; gap: 44px; margin: 52px 0 0; padding-top: 24px; border-top: 1px solid var(--line); }
.lp-edit-prices dt { font-size: 13px; color: var(--muted); }
.lp-edit-prices dd { margin: 4px 0 0; font-size: 32px; font-weight: 500; font-variant-numeric: tabular-nums; }
.lp.layout-6 .lp-side { background: none; }
.lp.layout-6 .lp-card { background: none; box-shadow: none; border: 0; padding: 0; }
.lp.layout-6 .lp-head { display: none; }

/* ---------- layout-7：便當格 ---------- */
.lp.layout-7 .lp-wrap { grid-template-columns: minmax(0, 430px) minmax(0, 1fr); gap: 22px; max-width: 1200px; margin: 0 auto;
  padding: 40px 24px 100px; align-items: center; }
.lp.layout-7 .lp-side { background: none; padding: 0; }
.lp-bento { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: 150px 150px 132px auto; gap: 16px;
  animation: lpUp .7s .15s var(--ease) both; }
.tile { min-width: 0; padding: 20px 22px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  display: flex; flex-direction: column; justify-content: space-between; }
.tile small, .tile span { font-size: 13px; color: var(--muted); }
.tile b { font-size: 30px; font-weight: 500; font-variant-numeric: tabular-nums; }
.tile-clock { position: relative; overflow: hidden; grid-column: span 2; grid-row: span 2; justify-content: flex-end;
  background: var(--panel-bg); color: var(--panel-ink); border: 0; }
.tile-clock::before { content: ""; position: absolute; right: -120px; top: -140px; width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .16), transparent 65%); }
.tile-clock b, .tile-clock span { position: relative; }
.tile-clock b { font-size: clamp(80px, 8.5vw, 128px); line-height: 1; letter-spacing: 2px; }
.tile-clock span { margin-top: 12px; font-size: 15px; color: inherit; opacity: .85; }
.tile-shift { grid-row: span 2; background: var(--brand-soft); border-color: transparent; }
.tile-shift b { font-size: 46px; color: var(--brand); }
.tile-shift span { color: var(--ink); font-size: 15px; }
.tile-price b { font-size: 30px; }
.tile-note { grid-column: span 3; flex-direction: row; justify-content: flex-start; align-items: center; gap: 10px; padding: 14px 20px; box-shadow: none; background: transparent; }
.tile-note .ico { color: var(--brand); width: 18px; height: 18px; }
.tile-note br { display: none; }

@media (max-width: 900px) {
  .lp-band { padding: 26px 20px 112px; }
  .lp-band .lp-greet { font-size: 28px; }
  .lp-band-prices { gap: 8px; width: 100%; }
  .lp-band-prices div { flex: 1; min-width: 0; padding: 10px 12px; }
  .lp-band-prices b { font-size: 19px; }
  .lp.layout-4 .lp-side { margin-top: -88px; }
  .lp.layout-4 .lp-card, .lp.layout-5 .lp-card, .lp.layout-7 .lp-card { padding: 28px 22px 24px; }
  .lp-corner { left: 16px; right: 16px; top: 16px; }
  .lp-corner-date { display: none; }
  .lp.layout-5 .lp-side { padding-top: 80px; }
  .lp.layout-6 .lp-wrap { grid-template-columns: 1fr; }
  .lp-edit { padding: 40px 24px 8px; border-right: 0; }
  .lp-edit-big { font-size: clamp(48px, 15vw, 76px); margin: 10px 0 14px; }
  .lp-edit-line { font-size: 14px; }
  .lp-edit-prices { gap: 22px; margin-top: 26px; padding-top: 16px; }
  .lp-edit-prices dd { font-size: 22px; }
  .lp.layout-7 .lp-wrap { grid-template-columns: 1fr; padding: 16px 16px 110px; }
  .lp-bento { grid-template-rows: auto; grid-auto-rows: auto; gap: 10px; }
  .tile { padding: 14px 16px; border-radius: 18px; }
  .tile-clock { grid-column: span 3; grid-row: auto; min-height: 130px; }
  .tile-clock b { font-size: 54px; }
  .tile-shift { grid-column: span 3; grid-row: auto; flex-direction: row; align-items: center; gap: 10px; }
  .tile-shift b { font-size: 24px; }
  .tile-price b { font-size: 19px; }
}
@keyframes lpBlob { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(6vw, 4vh) scale(1.1); } 100% { transform: translate(-4vw, 8vh) scale(.95); } }

@keyframes lpFade { from { opacity: 0; transform: scale(.98); } to { opacity: 1; transform: none; } }
@keyframes lpUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes lpDraw { to { stroke-dashoffset: 0; } }
@keyframes lpSpin { to { transform: rotate(360deg); } }
@keyframes lpShake { 0%, 100% { transform: none; } 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }

/* ================================================================
 * 文件列印頁（只改螢幕顯示，列印出嚟的表格完全唔變）
 * ================================================================ */
@media screen {
  body.dv2 { --panel: var(--surface); --border: var(--line); --field: var(--surface-2);
    background: var(--bg); color: var(--ink); font-family: var(--font); -webkit-font-smoothing: antialiased; }
  body.dv2.theme-c { --field: var(--surface-2); }

  /* 頂部 App bar */
  .appbar { position: sticky; top: 0; z-index: 60; background: color-mix(in srgb, var(--surface) 82%, transparent);
    backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
  .appbar-in { max-width: 1120px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 14px; }
  .appbar-brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); }
  .appbar-brand .brandmark { width: 36px; height: 36px; border-radius: 11px; }
  .appbar-brand b { display: block; font-size: 15px; }
  .appbar-brand small { display: block; font-size: 12px; color: var(--muted); }
  .appbar-clock { margin-left: auto; text-align: right; font-variant-numeric: tabular-nums; }
  .appbar-clock b { display: block; font-size: 15px; }
  .appbar-clock small { display: block; font-size: 12px; color: var(--muted); }

  .usermenu { position: relative; }
  .usermenu summary { list-style: none; display: flex; align-items: center; gap: 10px; cursor: pointer;
    padding: 5px 10px 5px 5px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
    transition: border-color .2s, box-shadow .2s; }
  .usermenu summary::-webkit-details-marker { display: none; }
  .usermenu summary:hover, .usermenu[open] summary { border-color: var(--brand); box-shadow: 0 0 0 4px var(--focus); }
  .avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--brand); color: var(--brand-ink);
    display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; }
  .usermenu .who b { display: block; font-size: 14px; line-height: 1.2; }
  .usermenu .who small { display: inline-block; font-size: 11px; color: var(--brand); background: var(--brand-soft);
    padding: 1px 7px; border-radius: 999px; margin-top: 2px; }
  .usermenu .chev { width: 16px; height: 16px; color: var(--muted); transition: transform .2s; }
  .usermenu[open] .chev { transform: rotate(180deg); }
  .usermenu-pop { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; padding: 6px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow);
    animation: lpUp .18s var(--ease); }
  .usermenu-pop a, .usermenu-pop button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px;
    border: 0; border-radius: 9px; background: none; color: var(--ink); font: 14px var(--font); text-decoration: none; cursor: pointer; }
  .usermenu-pop a:hover, .usermenu-pop button:hover { background: var(--surface-2); }
  .usermenu-pop .ico { width: 18px; height: 18px; color: var(--muted); }
  .usermenu-pop hr { border: 0; border-top: 1px solid var(--line); margin: 6px 4px; }
  .usermenu-pop form { margin: 0; }
  .usermenu-pop .danger, .usermenu-pop .danger .ico { color: var(--brand); }
  .usermenu-pop [hidden] { display: none; }
  #ab-push[data-state="on"] .ico { color: #16A34A; }
  #ab-push[data-state="denied"], #ab-push[data-state="unsupported"] { color: var(--muted); }
  #ab-push:disabled { opacity: .6; cursor: wait; }

  /* 原本的標題區 */
  body.dv2 .topbar { margin-top: 26px; }
  body.dv2 .topbar h1 { font-size: 30px; letter-spacing: .5px; }
  body.dv2 .topbar .sub { color: var(--muted); font-size: 15px; }
  body.dv2 .hero { border-radius: var(--r-lg); box-shadow: var(--shadow); }

  /* 分頁：帶圖示的膠囊 */
  body.dv2 .tabs { gap: 8px; padding: 5px; background: var(--surface); border: 1px solid var(--line);
    border-radius: 16px; box-shadow: var(--shadow); width: fit-content; max-width: 100%; }
  body.dv2 .tab { display: inline-flex; align-items: center; gap: 7px; border: 0; background: none; color: var(--muted);
    font-size: 15px; padding: 9px 15px; border-radius: 12px; min-height: 42px; transition: background .2s, color .2s; }
  body.dv2 .tab:hover { color: var(--ink); background: var(--surface-2); }
  body.dv2 .tab[aria-selected="true"] { background: var(--btn); color: var(--btn-ink); box-shadow: 0 6px 16px var(--focus); }
  body.dv2 .tab::before { content: ""; width: 18px; height: 18px; flex: none; background: currentColor;
    -webkit-mask: var(--tab-ico) center / contain no-repeat; mask: var(--tab-ico) center / contain no-repeat; }
  body.dv2 .tab[data-tab="wc"] { --tab-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 5H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2h-2'/%3E%3Crect x='9' y='3' width='6' height='4' rx='1'/%3E%3Cpath d='m9 14 2 2 4-4'/%3E%3C/svg%3E"); }
  body.dv2 .tab[data-tab="meter"] { --tab-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='13' r='8'/%3E%3Cpath d='M12 13l3-3M12 5V3M8 21h8'/%3E%3C/svg%3E"); }
  body.dv2 .tab[data-tab="cash"] { --tab-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='6' width='18' height='12' rx='2'/%3E%3Ccircle cx='12' cy='12' r='2.5'/%3E%3Cpath d='M6 9v.01M18 15v.01'/%3E%3C/svg%3E"); }
  body.dv2 .tab[data-tab="goods"] { --tab-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l8 4.5v9L12 21l-8-4.5v-9L12 3z'/%3E%3Cpath d='M12 12l8-4.5M12 12v9M12 12L4 7.5'/%3E%3C/svg%3E"); }
  body.dv2 .tab[data-tab="unload"] { --tab-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 18V8a1 1 0 0 1 1-1h9v11M13 10h4l4 4v4h-2'/%3E%3Ccircle cx='7.5' cy='18' r='2'/%3E%3Ccircle cx='17' cy='18' r='2'/%3E%3Cpath d='M9.5 18h5.5'/%3E%3C/svg%3E"); }

  /* 設定欄 */
  body.dv2 .panel { border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 18px 22px; }
  body.dv2 .field { color: var(--muted); }
  body.dv2 .field input, body.dv2 .field select { border-radius: 10px; border: 1.5px solid var(--line);
    background: var(--surface-2); color: var(--ink); min-height: 44px; transition: border-color .2s, box-shadow .2s; }
  body.dv2 .field input:focus, body.dv2 .field select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--focus); }
  body.dv2 .check { color: var(--ink); }
  body.dv2 .check input { accent-color: var(--brand); }
  body.dv2 .print-btn { display: inline-flex; align-items: center; gap: 9px; background: var(--btn); color: var(--btn-ink);
    border-radius: 12px; min-height: 48px; padding: 10px 28px; box-shadow: 0 8px 20px var(--focus);
    transition: background .2s, transform .12s; }
  body.dv2 .print-btn:hover { opacity: 1; background: var(--btn-hover); }
  body.dv2 .print-btn:active { transform: scale(.97); }
  body.dv2 .print-btn::before { content: ""; width: 20px; height: 20px; background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9V3h12v6M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2'/%3E%3Crect x='6' y='14' width='12' height='7' rx='1'/%3E%3C/svg%3E") center / contain no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9V3h12v6M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2'/%3E%3Crect x='6' y='14' width='12' height='7' rx='1'/%3E%3C/svg%3E") center / contain no-repeat; }
  body.dv2 .hint { color: var(--muted); }
  body.dv2 .xsheet, body.dv2 .sheet { border-radius: 4px; box-shadow: 0 1px 3px rgba(0, 0, 0, .08), 0 18px 40px rgba(0, 0, 0, .12); }
  body.dv2.theme-b .xsheet, body.dv2.theme-b .sheet { box-shadow: 0 30px 70px rgba(0, 0, 0, .55); }

  /* ---- 特效 6：列印按鈕變形（轉圈 → ✓ 已送出 → 變返原狀）---- */
  body.dv2 .print-btn { position: relative; overflow: hidden; justify-content: center;
    transition: background .35s var(--ease), transform .12s, box-shadow .35s, min-width .3s; }
  body.dv2 .print-btn .pb-label { display: inline-flex; align-items: center; transition: opacity .2s, transform .25s var(--ease); }
  body.dv2 .print-btn .pb-spin, body.dv2 .print-btn .pb-done { position: absolute; inset: 0; display: flex; align-items: center;
    justify-content: center; gap: 8px; opacity: 0; transform: scale(.6); transition: opacity .25s, transform .35s var(--ease); pointer-events: none; }
  body.dv2 .print-btn .pb-spin i { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid currentColor;
    border-right-color: transparent; animation: lpSpin .7s linear infinite; }
  body.dv2 .print-btn .pb-done svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 3;
    stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 24; stroke-dashoffset: 24; }
  body.dv2 .print-btn.pb-busy::before, body.dv2 .print-btn.pb-ok::before { opacity: 0; }
  body.dv2 .print-btn.pb-busy .pb-label, body.dv2 .print-btn.pb-ok .pb-label { opacity: 0; transform: translateY(-8px); }
  body.dv2 .print-btn.pb-busy .pb-spin { opacity: 1; transform: none; }
  body.dv2 .print-btn.pb-busy { transform: scale(.97); pointer-events: none; }
  body.dv2 .print-btn.pb-ok { background: linear-gradient(135deg, #16A34A, #22C55E); color: #fff; box-shadow: 0 8px 22px rgba(22, 163, 74, .35); }
  body.dv2 .print-btn.pb-ok .pb-done { opacity: 1; transform: none; }
  body.dv2 .print-btn.pb-ok .pb-done svg { animation: pbDraw .45s .1s var(--ease) forwards; }
  body.dv2 .print-btn.pb-ok::after { content: ""; position: absolute; inset: 0; border-radius: inherit;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, .55); animation: pbPulse .8s ease-out; }
  @keyframes pbDraw { to { stroke-dashoffset: 0; } }
  @keyframes pbPulse { to { box-shadow: 0 0 0 14px rgba(34, 197, 94, 0); } }

  /* ---- 特效 7：卡片光影跟隨 + 輕微立體傾斜（只限有滑鼠的裝置）---- */
  .fx-card { isolation: isolate; transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
    transition: transform .5s var(--ease), box-shadow .3s; will-change: transform; }
  .fx-card.fx-on { transition: transform .08s linear, box-shadow .3s; box-shadow: 0 2px 6px rgba(0, 0, 0, .05), 0 22px 50px rgba(238, 58, 31, .12); }
  .fx-card::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none; opacity: 0;
    background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--brand) 13%, transparent), transparent 60%);
    transition: opacity .35s; }
  .fx-card.fx-on::after { opacity: 1; }
  .fx-card > * { position: relative; }
  body.dv2 .panel.fx-card, body.dv2 .tabs.fx-card, .pushbar-in.fx-card { position: relative; }
  @media (prefers-reduced-motion: reduce) {
    .fx-card { transform: none !important; }
    body.dv2 .print-btn .pb-spin i, body.dv2 .print-btn.pb-ok::after { animation: none; }
  }

  /* 開啟通知提示橫幅 */
  .pushbar { position: sticky; top: 57px; z-index: 55; padding: 10px 16px 0; animation: lpUp .45s var(--ease) both; }
  .pushbar[hidden] { display: none; }
  .pushbar-in { max-width: 1120px; margin: 0 auto; display: flex; align-items: center; gap: 14px; padding: 12px 14px 12px 16px;
    border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
  .pushbar-ico { flex: none; width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
    background: var(--brand-soft); color: var(--brand); }
  .pushbar-ico .ico { width: 22px; height: 22px; animation: pbRing 2.6s ease-in-out 1s infinite; transform-origin: 50% 10%; }
  .pushbar-text { flex: 1; min-width: 0; }
  .pushbar-text b { display: block; font-size: 15px; }
  .pushbar-text small { display: block; margin-top: 2px; font-size: 13px; color: var(--muted); }
  .pushbar-btns { flex: none; display: flex; gap: 8px; }
  .pushbar-btns button { font: 500 14px var(--font); border-radius: 10px; padding: 9px 16px; cursor: pointer; border: 0; }
  .pushbar-later { background: none; color: var(--muted); }
  .pushbar-later:hover { background: var(--surface-2); color: var(--ink); }
  .pushbar-go { background: var(--btn); color: var(--btn-ink); box-shadow: 0 6px 16px var(--focus); }
  .pushbar-go:hover { background: var(--btn-hover); }
  .pushbar-go:disabled { opacity: .6; cursor: wait; }
  @keyframes pbRing { 0%, 60%, 100% { transform: rotate(0); } 65% { transform: rotate(14deg); } 72% { transform: rotate(-12deg); } 79% { transform: rotate(8deg); } 86% { transform: rotate(-4deg); } }
  @media (max-width: 760px) {
    .pushbar-in { flex-wrap: wrap; gap: 10px 12px; }
    .pushbar-btns { width: 100%; justify-content: flex-end; }
  }

  /* 列印提示 */
  .toast { position: fixed; right: 20px; bottom: 76px; z-index: 900; display: flex; align-items: center; gap: 10px;
    padding: 13px 16px; border-radius: 14px; background: var(--ink); color: var(--bg); font: 14px var(--font);
    box-shadow: 0 16px 40px rgba(0, 0, 0, .25); transform: translateY(20px); opacity: 0; pointer-events: none;
    transition: transform .35s var(--ease), opacity .35s var(--ease); }
  .toast.show { transform: none; opacity: 1; }
  .toast { max-width: min(560px, calc(100vw - 40px)); line-height: 1.55; align-items: flex-start; }
  .toast .ico { flex: none; margin-top: 1px; }
  .toast .ico { color: #22C55E; }

  @media (max-width: 760px) {
    .appbar-clock { display: none; }
    .usermenu { margin-left: auto; }
    .usermenu .who { display: none; }
    body.dv2 .tabs { width: auto; }
  }
}
@media print {
  .appbar, .themebar, .toast, .pushbar { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  .lp-panel, .lp-card, .lp-alert, .lp-stripes path, .lp-band, .lp-blobs i, .lp-edit, .lp-bento { animation: none !important; stroke-dashoffset: 0; }
}

/* 登入頁：公開檔案連結（files.gudiyuen.com） */
.lp-public { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 16px; padding: 10px; border-radius: 12px;
  border: 1px dashed var(--line); color: var(--muted); font-size: 14px; text-decoration: none; transition: color .2s, border-color .2s; }
.lp-public:hover { color: var(--brand); border-color: var(--brand); }
.lp-public .ico { width: 18px; height: 18px; }
