/* 上班啟示錄 UI（v0.7）：A＝員工證／打卡鐘（骨架、數據、面板）、B＝綜藝字卡（事件瞬間）、C＝手帳（故事收藏）
   跟 GPT 討論後的定案：米白紙＋藏青墨＋警示紅，字用 Noto Sans TC（子集，tools/build_font.py）＋Bungee 數字
   這支檔案蓋在 index.html 原本的樣式上面：版面位置沿用，外觀換掉 */
@font-face { font-family: 'A4Sans'; src: url(../fonts/noto-tc-sub.woff2?v=0.19.3) format('woff2'); font-weight: 500 900; font-display: swap; }
@font-face { font-family: 'A4Num'; src: url(../fonts/bungee-sub.woff2?v=0.19.3) format('woff2'); font-display: swap; }
:root {
  --paper: #f5e7c8; --paper2: #fffdf8; --kraft: #e9c98f; --ink: #142b45; --ink2: #2c4566;
  --gold: #ffc343; --red: #ef443c; --green: #32b95a; --pink: #ff3d6e; --line: #e3d2b2;
  --grid: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22'%3E%3Cpath d='M22 0H0v22' fill='none' stroke='%23e3d2b2' stroke-width='1'/%3E%3C/svg%3E");
  --sans: 'A4Sans', -apple-system, 'PingFang TC', 'Noto Sans TC', sans-serif;
  --num: 'A4Num', 'A4Sans', -apple-system, sans-serif;
}
html, body, button { font-family: var(--sans); }
.num { font-family: var(--num); font-weight: 400; letter-spacing: .5px; }

/* ================= 標題：掛著吊繩的員工識別證 ＋ 打卡上班 ================= */
#cover { background: var(--paper) var(--grid); color: var(--ink); justify-content: flex-start; gap: 0; padding: calc(env(safe-area-inset-top) + 0px) 22px calc(env(safe-area-inset-bottom) + 18px); overflow: hidden auto; touch-action: pan-y; }
/* ================= 小劇場（Kairosoft 式框框演出） ================= */
/* 舞台那塊要透明（3D 畫在底下的 canvas 上），其他地方用舞台的巨大陰影壓暗 */
#theater { position: fixed; inset: 0; z-index: 8; display: none; align-items: center; justify-content: center; padding: 14px; overflow: hidden; }
#theater.on { display: flex; }
#theater .th-card { position: relative; width: min(400px, 100%); display: flex; flex-direction: column; animation: talkIn .35s cubic-bezier(.2,1.4,.4,1); }
#theater .th-title { position: relative; z-index: 2; align-self: center; margin-bottom: -2px; padding: 8px 22px 7px; background: var(--ink); color: var(--gold); font-size: 16px; font-weight: 900; letter-spacing: 2px; border-radius: 12px 12px 0 0; }
#theater .th-stage { position: relative; z-index: 1; width: 100%; aspect-ratio: 16 / 10; border-radius: 6px; box-shadow: 0 0 0 5px var(--ink), 0 0 0 9px var(--paper2), 0 0 0 11px var(--ink), 0 0 0 100vmax #142b45b8; }
#theater.gain .th-stage { aspect-ratio: 16 / 11; }
#theater .th-talk { position: relative; z-index: 2; display: flex; gap: 10px; align-items: flex-end; margin-top: 18px; }
#theater .th-pic { width: 84px; height: 84px; flex: none; border-radius: 12px; object-fit: cover; background: var(--paper); box-shadow: 0 0 0 3px var(--ink), 0 4px 0 3px var(--ink); }
#theater .th-bubble { position: relative; flex: 1; min-height: 96px; background: var(--paper2); border-radius: 14px; box-shadow: 0 0 0 3px var(--ink), 0 5px 0 3px var(--ink); padding: 20px 14px 18px; color: var(--ink); font-size: 16px; font-weight: 800; line-height: 1.55; }
#theater .th-name { position: absolute; left: 12px; top: -13px; background: var(--ink); color: var(--gold); font-size: 12px; font-weight: 900; padding: 3px 10px; border-radius: 6px; letter-spacing: 2px; }
#theater .th-next { position: absolute; right: 12px; bottom: 6px; color: var(--red); font-style: normal; font-size: 12px; animation: blink 1s infinite; }
#theater .th-list { position: relative; z-index: 2; margin-top: 18px; background: var(--paper2); border-radius: 14px; box-shadow: 0 0 0 3px var(--ink), 0 5px 0 3px var(--ink); padding: 14px 16px; color: var(--ink); font-weight: 800; font-size: 15px; line-height: 1.6; }
#theater .th-list b { display: block; font-size: 17px; color: var(--red); margin-bottom: 6px; letter-spacing: 1px; }
#theater .th-list div { padding: 3px 0; border-bottom: 1px dashed var(--line); } #theater .th-list div:last-child { border: 0; }
#theater .th-list .gain-name { font-size: 20px; text-align: center; border: 0; } #theater .th-list small { display: block; text-align: center; color: #6b5a40; font-weight: 700; font-size: 13px; }
#theater .th-btns { position: relative; z-index: 2; display: flex; gap: 10px; } #theater .th-btns .a4btn { flex: 1; }
#theater .th-btns:empty { display: none; }
#theater .th-skip { position: absolute; z-index: 3; right: 6px; top: 6px; border: 0; border-radius: 10px; background: #ffffffd9; color: var(--ink); font: 900 12px var(--sans); padding: 6px 10px; box-shadow: 0 0 0 2px var(--ink); }
#theater.gain .th-skip { display: none; }

/* ================= C：離職結局（手帳：方格紙＋紙膠帶劇照＋旁白） ================= */
#ending { position: fixed; inset: 0; z-index: 9; display: none; align-items: center; justify-content: center; background: #fbf8f1 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20'%3E%3Cpath d='M20 0H0v20' fill='none' stroke='%23dfe9f2' stroke-width='1'/%3E%3C/svg%3E"); padding: 18px; }
#ending.on { display: flex; }
#ending::before { content: ''; position: absolute; left: 26px; top: 0; bottom: 0; border-left: 2px solid #f4a7a7; }
#ending .en-page { position: relative; width: min(460px, 100%); display: flex; flex-direction: column; align-items: center; gap: 16px; }
#ending .en-head { font-size: 18px; font-weight: 900; color: #3a3a3a; background: linear-gradient(transparent 55%, #ffe36e 55% 90%, transparent 90%); padding: 0 6px; }
#ending .en-photo { position: relative; width: 100%; background: #fff; padding: 10px 10px 12px; box-shadow: 0 10px 24px #0002; transition: transform .3s; }
#ending .en-photo.in { animation: enIn .45s cubic-bezier(.2,1.3,.4,1); } @keyframes enIn { from { opacity: 0; transform: translateY(24px) rotate(-6deg) scale(.94); } }
#ending .en-photo img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #eee; }
#ending .tape { position: absolute; width: 90px; height: 26px; background: #ffd27acc; top: -12px; z-index: 1; } #ending .tape.a { left: -14px; transform: rotate(-28deg); } #ending .tape.b { right: -14px; transform: rotate(24deg); background: #9fd9d4cc; }
#ending .en-text { margin: 0; min-height: 84px; width: 100%; background: #fffdf8; border: 2px dashed #e07a3a; border-radius: 6px; padding: 12px 14px; font-size: 16px; font-weight: 700; line-height: 1.7; color: #333; }
#ending .en-next { font-size: 12px; color: #e07a3a; font-weight: 800; animation: blink 1s infinite; }
#ending .en-skip { position: absolute; right: 0; top: -6px; border: 0; border-radius: 10px; background: #fff; color: #555; font: 800 12px var(--sans); padding: 6px 10px; box-shadow: 0 2px 6px #0002; }
#ending .en-btns { display: flex; gap: 10px; width: 100%; } #ending .en-btns:empty { display: none; } #ending .en-btns .a4btn { flex: 1; margin-top: 0; }
#ending .en-photo.card { aspect-ratio: auto; } #ending .en-card { aspect-ratio: 4 / 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; background: #fffaf0; position: relative; }
#ending .en-card b { font-size: 56px; } #ending .en-card h2 { margin: 0; font-size: 26px; color: #2b2b2b; }
#ending .en-stamp { position: absolute; right: 14px; bottom: 14px; width: 86px; height: 86px; border: 4px solid var(--red); border-radius: 50%; color: var(--red); display: flex; align-items: center; justify-content: center; text-align: center; font-weight: 900; font-size: 15px; line-height: 1.15; transform: rotate(14deg); }
#finale .quit { background: #fff; color: var(--red); border: 2px dashed var(--red); box-shadow: none; display: none; }
/* 存檔面板的結局收藏 */
.endc { display: flex; gap: 12px; align-items: center; margin-top: 12px; background: var(--paper2); border-radius: 12px; padding: 10px; box-shadow: 0 0 0 2px var(--ink), 0 3px 0 var(--ink); }
.endc img, .endc .lockimg { width: 96px; height: 72px; object-fit: cover; border-radius: 6px; flex: none; background: #d9ccb4; display: flex; align-items: center; justify-content: center; font-size: 26px; }
.endc .tx { flex: 1; } .endc b { display: block; font-size: 16px; } .endc small { color: #6b5a40; font-weight: 700; font-size: 12px; }
.endc .a4btn { width: auto; margin-top: 6px; min-height: 36px; padding: 4px 12px; font-size: 13px; }

/* 颱風季：畫面上的雨；加班地獄：夜色 */
body.rain::after { content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 1; background: repeating-linear-gradient(105deg, transparent 0 18px, #9fc4e655 18px 19px); background-size: 200% 200%; animation: rainFall .5s linear infinite; mix-blend-mode: multiply; }
@keyframes rainFall { to { background-position: -40px 120px; } }
body.night { background: #1d2540; }
body.snow::after { content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 1; background-image: radial-gradient(#fff 1.4px, transparent 2px), radial-gradient(#ffffffcc 1px, transparent 1.6px); background-size: 46px 46px, 29px 29px; background-position: 0 0, 13px 7px; animation: snowFall 6s linear infinite; opacity: .85; }
@keyframes snowFall { to { background-position: 30px 460px, 0 290px; } }
/* 小米客訴週：靠近客訴的客人時，下方跳出退款／重做 */
#cplBar { position: absolute; left: 10px; right: 10px; bottom: calc(118px + env(safe-area-inset-bottom)); display: none; pointer-events: auto; background: #fffdf6; border: 3px solid #13294b; border-radius: 10px; padding: 8px 10px 10px; box-shadow: 0 4px 0 #13294b; }
#cplBar p { margin: 0 0 7px; font-weight: 900; font-size: 14px; color: #13294b; }
#cplBar div { display: flex; gap: 8px; }
#cplBar .a4btn { flex: 1; font-size: 13px; padding: 9px 6px; }
/* ================= 開場 START ================= */
#splash { position: fixed; inset: 0; z-index: 10; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22'%3E%3Cpath d='M22 0H0v22' fill='none' stroke='%23ffffff10' stroke-width='1'/%3E%3C/svg%3E"); color: var(--paper); text-align: center; padding: 24px; transition: opacity .45s, transform .45s; }
#splash.out { opacity: 0; transform: scale(1.06); pointer-events: none; }
#splash .logo small { font: 400 11px var(--num); letter-spacing: 4px; color: #9fb1cf; }
#splash h1 { margin: 10px 0 6px; font-size: min(17vw, 84px); font-weight: 900; color: var(--paper2); letter-spacing: 2px; text-shadow: 0 6px 0 var(--red); line-height: 1.05; }
#splash .en { font: 400 14px var(--num); color: var(--gold); letter-spacing: 3px; }
#splashBtn { min-width: 220px; min-height: 60px; border: 3px solid var(--paper2); border-radius: 16px; background: var(--red); color: #fff; font: 400 28px var(--num); letter-spacing: 3px; box-shadow: 0 6px 0 #0b1322; }
#splashBtn:not(:disabled) { animation: splashBlink 1.1s ease-in-out infinite; }
#splashBtn:disabled { background: transparent; border-color: #ffffff44; color: #9fb1cf; font-size: 18px; box-shadow: none; }
@keyframes splashBlink { 50% { transform: scale(1.06); filter: brightness(1.15); } }
#splash p { margin: 0; font-size: 13px; color: #9fb1cf; font-weight: 700; }
/* 標題進場：識別證從上面掉下來、彈一下、晃幾下，按鈕依序滑上來 */
#cover .badge { display: flex; flex-direction: column; align-items: center; flex: none; width: 100%; }
#cover.enter .badge { animation: badgeDrop 1s cubic-bezier(.3, 1.3, .5, 1) both; }
@keyframes badgeDrop { 0% { transform: translateY(-110vh); } 100% { transform: translateY(0); } }
#cover.enter .idcard { animation: idSwingIn 1.8s .55s ease-out both, idSwing 3.2s 2.35s ease-in-out infinite; }
@keyframes idSwingIn { 0% { transform: rotate(-2.5deg); } 15% { transform: rotate(-13deg); } 35% { transform: rotate(8deg); } 55% { transform: rotate(-7deg); } 75% { transform: rotate(2deg); } 100% { transform: rotate(-2.5deg); } }
#cover.enter #start, #cover.enter .tabs, #cover.enter #coverVer { animation: coverUp .5s cubic-bezier(.3, 1.4, .5, 1) both; }
#cover.enter #start { animation-delay: .8s; } #cover.enter .tabs { animation-delay: 1s; } #cover.enter #coverVer { animation-delay: 1.2s; }
@keyframes coverUp { from { opacity: 0; transform: translateY(40px); } }
#cover .lanyard { width: 46px; height: clamp(70px, 17vh, 170px); flex: none; background: repeating-linear-gradient(90deg, var(--ink) 0 6px, var(--ink2) 6px 12px); position: relative; }
#cover .lanyard::after { content: 'A4 OFFICE · A4 OFFICE'; position: absolute; inset: 0; writing-mode: vertical-rl; color: var(--gold); font: 400 10px var(--num); letter-spacing: 3px; text-align: center; padding-top: 6px; overflow: hidden; }
#cover .clip { width: 34px; height: 26px; margin-top: -4px; flex: none; background: linear-gradient(#e2e6ec, #9aa3ad); border-radius: 6px; box-shadow: 0 2px 0 #6f7882; z-index: 1; }
#cover .idcard { position: relative; width: min(320px, 100%); flex: none; margin-top: -4px; transform: rotate(-2.5deg); background: var(--paper2); border-radius: 18px; box-shadow: 0 16px 30px #5a3a1a33, 0 0 0 1px var(--line); text-align: left; animation: idSwing 3.2s ease-in-out infinite; transform-origin: 50% -40px; }
@keyframes idSwing { 50% { transform: rotate(-1deg); } }
#cover .idcard .hd { background: var(--ink); color: #fff; padding: 11px 16px 9px; border-radius: 18px 18px 0 0; display: flex; justify-content: space-between; align-items: center; }
#cover .idcard .hd b { font-size: 13px; letter-spacing: 3px; color: var(--gold); font-weight: 900; } #cover .idcard .hd span { font: 400 11px var(--num); color: #9fb1cf; }
#cover .idcard .bd { display: flex; gap: 14px; padding: 14px 16px 6px; }
#cover .idcard .pic { width: 92px; height: 112px; border-radius: 10px; background: #ffe2c0 url(../icons/kui-180.png) 50% 20% / 150% no-repeat; border: 3px solid var(--ink); flex: none; }
#cover .idcard h1 { margin: 0; font-size: 34px; font-weight: 900; color: var(--ink); line-height: 1.05; letter-spacing: 1px; text-shadow: none; }
#cover .idcard .en { font: 400 10px var(--num); color: var(--red); letter-spacing: 1px; margin-top: 4px; }
#cover .idcard dl { margin: 8px 0 0; font-size: 12px; color: #5b6676; line-height: 1.65; }
#cover .idcard dl div { display: flex; gap: 6px; } #cover .idcard dt { font-weight: 900; color: var(--ink); } #cover .idcard dd { margin: 0; font-weight: 700; }
#cover .idcard .barcode { height: 24px; margin: 6px 16px 14px; background: repeating-linear-gradient(90deg, var(--ink) 0 2px, #fff0 2px 4px, var(--ink) 4px 7px, #fff0 7px 9px, var(--ink) 9px 10px, #fff0 10px 13px); opacity: .85; }
#cover .idcard .stamp { position: absolute; right: -8px; bottom: -14px; width: 86px; height: 86px; border: 4px solid var(--red); border-radius: 50%; color: var(--red); font-weight: 900; font-size: 15px; display: flex; align-items: center; justify-content: center; text-align: center; line-height: 1.1; transform: rotate(16deg); background: #fffdf8cc; }
#cover .idcard .stamp.ok { border-color: var(--green); color: var(--green); }
#cover button { font-family: var(--sans); }
#cover #start { margin-top: clamp(26px, 5vh, 46px); width: min(330px, 100%); display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--paper2); color: var(--ink); border: 2px solid var(--ink); box-shadow: 0 6px 0 var(--ink); text-align: left; font-size: 16px; }
#cover #start:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--ink); }
#cover #start:disabled { background: #efe4cf; box-shadow: 0 6px 0 #8a9ab0; border-color: #8a9ab0; color: #8a9ab0; }
#cover #start .clk { width: 70px; height: 46px; flex: none; border-radius: 8px; background: var(--ink); color: var(--gold); font: 400 18px var(--num); display: flex; align-items: center; justify-content: center; }
#cover #start .tx { flex: 1; display: flex; flex-direction: column; } #cover #start .tx b { font-size: 24px; font-weight: 900; line-height: 1.15; } #cover #start .tx small { font-size: 12px; color: #8a7a62; font-weight: 700; opacity: 1; }
#cover .tabs { width: min(330px, 100%); display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
#cover .tabs button { display: block !important; position: relative; font-size: 14px; font-weight: 900; padding: 13px 8px 11px; border: 0; border-radius: 4px 14px 10px 10px; background: var(--kraft); color: #5a3a1a; box-shadow: 0 3px 0 #c9a465; min-height: 48px; }
#cover .tabs button::before { content: ''; position: absolute; left: 10px; top: -7px; width: 44%; height: 9px; border-radius: 6px 6px 0 0; background: inherit; }
#cover .tabs button:disabled { opacity: .55; }
#cover .tabs #swap { background: var(--gold); box-shadow: 0 3px 0 #d39a1a; }
#cover #coverVer { margin-top: auto; margin-bottom: 0; padding: 8px 14px; border: 0; background: transparent; box-shadow: none; border-radius: 10px; font: 700 12px var(--sans); color: #8a7a62; letter-spacing: 1px; text-decoration: underline; text-underline-offset: 3px; min-height: 40px; }
#cover #coverVer .num { text-decoration: none; }
/* 修改歷程：版本時間軸（跟往年回顧同一套） */
#changelog .yr b { display: flex; justify-content: space-between; align-items: baseline; } #changelog .yr b em { font: 400 11px var(--num); color: #8a7a62; font-style: normal; }
#changelog .yr ul { margin: 6px 0 0; padding-left: 18px; font-size: 13px; line-height: 1.6; color: #3b4a5c; font-weight: 700; }
#changelog .yr.new { box-shadow: 0 0 0 2px var(--red), 0 3px 0 var(--ink); } #changelog .yr.new::before { background: var(--red); color: #fff; }
#cover p#coverTxt { display: none; }

/* ================= 共用：紙卡面板（設定、存檔、選單、採購部…） ================= */
.a4sheet { position: fixed; inset: 0; z-index: 8; display: none; align-items: center; justify-content: center; background: #142b45aa; padding: 16px; }
.a4sheet.on { display: flex; }
.a4sheet .card, #menu .card, #moveAsk .card, #finale .card { background: var(--paper) var(--grid); border: 0; border-radius: 18px; box-shadow: 0 0 0 2px var(--ink), 0 8px 0 var(--ink), 0 18px 40px #0006; color: var(--ink); }
.a4sheet .card { width: min(360px, 100%); max-height: 88vh; overflow: auto; padding: 0 14px 16px; touch-action: pan-y; animation: talkIn .3s cubic-bezier(.2,1.4,.4,1); }
.a4label { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 -14px 12px; padding: 12px 14px; background: var(--ink); color: #fff; border-radius: 16px 16px 0 0; position: sticky; top: 0; z-index: 2; }
.a4label b { font-size: 18px; font-weight: 900; letter-spacing: 2px; } .a4label small { color: var(--gold); font: 400 11px var(--num); letter-spacing: 1px; }
.a4label button { width: 34px; height: 34px; border: 0; border-radius: 10px; background: #ffffff22; color: #fff; font-size: 16px; font-weight: 900; }
.a4btn { display: block; width: 100%; margin-top: 10px; min-height: 48px; border: 2px solid var(--ink); border-radius: 12px; background: var(--paper2); color: var(--ink); font-size: 15px; font-weight: 900; padding: 10px 12px; box-shadow: 0 4px 0 var(--ink); text-align: center; }
.a4btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.a4btn.main { background: var(--gold); } .a4btn.red { background: var(--red); color: #fff; } .a4btn.ghost { background: transparent; box-shadow: none; border-style: dashed; color: #6b5a40; }
.a4btn:disabled { opacity: .45; }
.a4row { display: flex; gap: 8px; } .a4row .a4btn { flex: 1; }
.a4note { font-size: 12px; color: #7a6a52; font-weight: 700; line-height: 1.6; margin: 10px 2px 0; }

/* 設定 */
#settings .icons { display: flex; gap: 10px; justify-content: center; margin-top: 8px; }
#settings .icons button { width: 56px; height: 56px; border-radius: 12px; border: 3px solid var(--paper2); background: #fff center / cover; box-shadow: 0 0 0 2px var(--line); }
#settings .icons button.on { box-shadow: 0 0 0 3px var(--red); transform: scale(1.08); }
#settings .vol { display: flex; align-items: center; gap: 10px; text-align: left; }
#settings .vol input { flex: 1; accent-color: var(--red); height: 28px; }
#settings .vol span { font: 400 13px var(--num); min-width: 40px; text-align: right; }
#settings h4 { margin: 16px 2px 2px; font-size: 13px; color: #8a6a4c; letter-spacing: 1px; }

/* 存檔：檔案夾卡 */
.slot { position: relative; display: flex; gap: 12px; align-items: center; margin-top: 16px; padding: 12px; min-height: 104px; border-radius: 4px 14px 14px 14px; background: var(--paper2); box-shadow: 0 0 0 2px var(--ink), 0 4px 0 var(--ink); text-align: left; width: 100%; border: 0; color: var(--ink); }
.slot::before { content: attr(data-tag); position: absolute; left: -2px; top: -16px; padding: 2px 10px; background: var(--ink); color: var(--gold); font: 400 10px var(--num); border-radius: 6px 6px 0 0; letter-spacing: 1px; }
.slot .pic { width: 64px; height: 76px; border-radius: 8px; border: 2px solid var(--ink); background: #ffe2c0 center 20% / 150% no-repeat; flex: none; }
.slot .tx { flex: 1; min-width: 0; } .slot .tx b { display: block; font-size: 17px; font-weight: 900; } .slot .tx span { display: block; font-size: 13px; font-weight: 700; color: #5b6676; line-height: 1.5; }
.slot .tx .money { font: 400 18px var(--num); color: var(--ink); } .slot .tx small { font-size: 11px; color: #9a8a72; font-weight: 700; }
.slot .stamp { position: absolute; right: 10px; top: 10px; border: 3px solid var(--red); color: var(--red); border-radius: 50%; width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 900; transform: rotate(14deg); }
.slot.empty { justify-content: center; box-shadow: none; border: 2px dashed #b9a684; background: transparent; font-size: 17px; font-weight: 900; color: #6b5a40; }
.slot.cur { box-shadow: 0 0 0 3px var(--red), 0 4px 0 var(--ink); }
.slot-acts { display: flex; gap: 8px; margin-top: 8px; } .slot-acts .a4btn { margin-top: 0; min-height: 40px; font-size: 13px; padding: 6px; }
/* 往年回顧：年報時間軸 */
.years { position: relative; margin-top: 8px; padding-left: 30px; }
.years::before { content: ''; position: absolute; left: 12px; top: 8px; bottom: 8px; border-left: 3px dotted var(--ink); }
.yr { position: relative; margin-top: 12px; background: var(--paper2); border-radius: 12px; padding: 10px 12px; box-shadow: 0 0 0 2px var(--ink), 0 3px 0 var(--ink); }
.yr::before { content: attr(data-n); position: absolute; left: -32px; top: 10px; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: var(--gold); font: 400 12px var(--num); display: flex; align-items: center; justify-content: center; }
.yr b { font-size: 16px; font-weight: 900; } .yr small { display: block; font-size: 12px; color: #6b5a40; font-weight: 700; margin: 2px 0 6px; }
.yr .a4row .a4btn { margin-top: 0; min-height: 40px; font-size: 13px; padding: 6px; box-shadow: 0 3px 0 var(--ink); }
.yr.lock { opacity: .5; box-shadow: 0 0 0 2px #9aa3ad; } .yr.lock::before { background: #9aa3ad; }
.yr .star { color: var(--red); }

/* ================= 遊戲中 HUD：員工證、收據、打卡卡、便利貼 ================= */
#me { background: var(--paper2); color: var(--ink); border-radius: 12px; padding: 5px 10px 6px 5px; box-shadow: 0 0 0 2px var(--ink), 0 4px 0 var(--ink); top: calc(14px + env(safe-area-inset-top)); }
#me::before { content: ''; position: absolute; left: 20px; top: -12px; width: 16px; height: 14px; border-radius: 4px; background: linear-gradient(#e2e6ec, #9aa3ad); }
#me .face { border-radius: 7px; border: 2px solid var(--ink); width: 36px; height: 42px; background-color: #ffe2c0; }
#me .t { font-size: 13px; color: var(--ink); }
#me .bar { background: #e9dcc2; height: 5px; width: 92px; } #me .bar i { background: var(--gold); }
#money { background: var(--paper2); color: var(--ink); border-radius: 2px; padding: 4px 12px 12px 10px; font: 400 21px var(--num); box-shadow: 0 6px 12px #0003; clip-path: polygon(0 0, 100% 0, 100% 86%, 93% 100%, 86% 86%, 79% 100%, 72% 86%, 65% 100%, 58% 86%, 51% 100%, 44% 86%, 37% 100%, 30% 86%, 23% 100%, 16% 86%, 9% 100%, 0 86%); flex-direction: column; align-items: flex-end; gap: 0; top: calc(10px + env(safe-area-inset-top)); }
#money i { display: none; }
#money::before { content: '存款'; align-self: flex-start; font: 700 10px var(--sans); color: #8a7a62; letter-spacing: 2px; }
#ver { top: auto; bottom: calc(112px + env(safe-area-inset-bottom)); right: 12px; font-family: var(--num); }
#year { background: var(--paper2); color: var(--ink); border-radius: 10px; box-shadow: 0 0 0 2px var(--ink); padding: 6px 8px 7px; top: calc(70px + env(safe-area-inset-top)); width: min(310px, 80vw); }
#year .row { font-size: 12px; } #year #yearNum { font: 400 11px var(--num); color: #6b5a40; }
#year .bar { display: none; }
#year .qs { gap: 5px; margin-top: 5px; }
#year .qs b { --p: 0%; position: relative; height: 22px; border-radius: 5px; background: transparent; border: 1.5px dashed #b9a684; font: 400 10px var(--num); color: #b9a684; display: flex; align-items: center; justify-content: center; overflow: hidden; }
#year .qs b.cur { border: 1.5px solid var(--ink); color: var(--ink); background: linear-gradient(90deg, #ffc34366 var(--p), transparent var(--p)); }
#year .qs b.on { border: 1.5px solid var(--red); color: var(--red); background: #ef443c12; }
#year .qs b.on::after { content: '✓'; position: absolute; right: 3px; top: -2px; font: 900 13px var(--sans); }
#year .qs b.on.miss { border-color: #c98a2e; color: #c98a2e; background: #c98a2e12; } #year .qs b.on.miss::after { content: '△'; }   /* 時間到但沒達標 */
#year #moveBtn { background: var(--red); border-radius: 8px; box-shadow: 0 3px 0 #9c2420; font-size: 12px; }
#chips { top: calc(136px + env(safe-area-inset-top)); flex-wrap: wrap; justify-content: center; width: 94vw; }
#chips.low { top: calc(168px + env(safe-area-inset-top)); }
#chips span { background: #fff27a; color: #4a3d08; border-radius: 2px; box-shadow: 0 3px 6px #0002; transform: rotate(-2deg); }
#chips span:nth-child(even) { background: #bfe6ff; color: #173a55; transform: rotate(2deg); }
#chips .rush { background: var(--red) !important; color: #fff !important; transform: rotate(-1deg); }
#hint { background: var(--paper2); color: var(--ink); border-radius: 4px; border-left: 6px solid var(--red); box-shadow: 0 0 0 2px var(--ink), 0 4px 0 var(--ink); font-weight: 900; }
#menuBtn { background: var(--ink); border-radius: 12px; padding: 9px 14px; font-size: 13px; box-shadow: 0 3px 0 #0b1322; min-height: 40px; }
#swapHud { background: var(--kraft); color: #5a3a1a; border-radius: 4px 12px 10px 10px; box-shadow: 0 3px 0 #c9a465; padding: 9px 12px; min-height: 40px; }
#miBtn { border-radius: 12px; min-height: 40px; }
#toast { background: #fff27a; color: #4a3d08; border-radius: 3px; box-shadow: 0 6px 14px #0003; transform: translate(-50%, -50%) rotate(-2deg) scale(.8); }
#toast.on { transform: translate(-50%, -50%) rotate(-2deg) scale(1); }

/* ================= B：事件瞬間＝綜藝字卡 ================= */
#banner .b-title { background: #111; color: #fff; border-radius: 0; padding: 10px 28px 12px; font-size: 32px; transform: skewX(-10deg) rotate(-3deg); -webkit-text-stroke: 0; text-shadow: 3px 3px 0 var(--bc); box-shadow: 8px 8px 0 var(--bc), 0 0 0 4px #111; }
#banner .b-sub { background: var(--gold); color: #111; border-radius: 0; transform: skewX(-10deg) rotate(-3deg); margin-top: 14px; box-shadow: 4px 4px 0 #111; padding: 6px 16px; }
#banner .b-stars { color: var(--gold); text-shadow: 0 3px 0 #111, 0 0 14px #ffc343; }

/* 選單／搬家確認／尾牙結算：換成紙卡 */
#menu { background: #142b45aa; }
#menu .card { padding: 0 14px 16px; overflow: hidden; }
#menu h2 { margin: 0 -14px; padding: 12px; background: var(--ink); color: #fff; font-size: 18px; letter-spacing: 3px; }
#menu .info { color: #6b5a40; margin: 10px 0 4px; }
#menu button { border: 2px solid var(--ink); border-radius: 12px; background: var(--paper2); color: var(--ink); box-shadow: 0 3px 0 var(--ink); min-height: 46px; }
#menu button.main { background: var(--gold); color: var(--ink); box-shadow: 0 4px 0 var(--ink); }
#menu button.move { background: var(--red); color: #fff; box-shadow: 0 3px 0 var(--ink); }
#menu button.out { background: transparent; border-style: dashed; box-shadow: none; }
#moveAsk .card h2, #finale .card h2 { color: var(--red); }
#moveAsk .go, #finale .move { background: var(--red); box-shadow: 0 4px 0 var(--ink); border: 2px solid var(--ink); }
#moveAsk .no, #finale .stay { background: var(--paper2); color: var(--ink); border: 2px solid var(--ink); box-shadow: 0 4px 0 var(--ink); }
#finale .stats div { background: var(--paper2); box-shadow: 0 0 0 1.5px var(--ink); border-radius: 8px; }
#finale .stats b { font-family: var(--num); font-weight: 400; color: var(--ink); }
/* 採購部、電梯、家具型錄：底部抽屜 */
#shop, #elev, #room { background: var(--paper) var(--grid); box-shadow: 0 0 0 2px var(--ink), 0 6px 0 var(--ink), 0 14px 30px #0005; border-radius: 16px; }
#shop h3, #elev h3, #room h3 { color: var(--ink); font-weight: 900; }
#shop .it:nth-child(even) { background: #fffdf866; }
#shop .buy { background: var(--green); border: 2px solid var(--ink); box-shadow: 0 3px 0 var(--ink); border-radius: 10px; }
#shop .buy:disabled { background: #d9ccb4; box-shadow: 0 3px 0 #8a9ab0; border-color: #8a9ab0; }
#shop .buy.done { background: var(--gold); border-color: var(--ink); }
#elevList button { background: var(--ink); box-shadow: 0 4px 0 #0b1322; border-radius: 12px; }
#elevList button:disabled { background: #e9dcc2; color: #8a7a66; }
#room .hdr { background: var(--ink); border-radius: 6px; }
/* 對話框：便條紙＋名牌 */
#talk .bubble { background: var(--paper2); border: 2px solid var(--ink); box-shadow: 0 5px 0 var(--ink), 0 10px 20px #0003; color: var(--ink); border-radius: 14px; }
#talk .bubble::before { border-right-color: var(--ink); }
#talk .name { background: var(--ink); color: var(--gold); box-shadow: none; border-radius: 6px; letter-spacing: 2px; }
#talk .next { color: var(--red); }
#talk img { border-radius: 12px; border-color: var(--paper2); box-shadow: 0 0 0 2px var(--ink), 0 4px 0 var(--ink); }
#talk .skip { background: var(--paper2); color: var(--ink); box-shadow: 0 0 0 2px var(--ink); }

/* 片頭：白閃改成紙張擦過去 */
#intro .wipe { position: absolute; top: -10%; bottom: -10%; width: 70%; left: 0; transform: translateX(-120%) skewX(-12deg); background: var(--paper) var(--grid); box-shadow: 0 0 0 6px var(--ink), 16px 0 0 0 var(--red); pointer-events: none; }
#intro .title h1 { font-family: var(--sans); color: var(--paper2); -webkit-text-stroke-color: var(--ink); text-shadow: 0 10px 0 var(--red); }
#intro .stamp { border-color: var(--red); color: var(--red); }
#intro .skip { background: var(--paper2); color: var(--ink); box-shadow: 0 0 0 2px var(--ink); }
#intro .clock b { font-family: var(--num); font-weight: 400; }

/* ---------- 2F 員工辦公室布置模式（動森風，v0.16） ---------- */
body.decoOn #hud, body.decoOn #elev, body.decoOn #stick { display: none !important; }
#decoBtn { position: absolute; left: 10px; bottom: calc(66px + env(safe-area-inset-bottom)); display: none; pointer-events: auto; background: #7aa874; color: #fff; border: 0; border-radius: 12px; font: inherit; font-size: 13px; font-weight: 900; padding: 9px 12px; box-shadow: 0 0 0 2px var(--ink), 0 4px 0 var(--ink); }
#deco { position: fixed; inset: 0; z-index: 6; display: none; pointer-events: none; }
#deco.on { display: block; }
#deco button { font: inherit; color: var(--ink); -webkit-tap-highlight-color: transparent; }
#deco .dc-top { position: absolute; top: calc(env(safe-area-inset-top) + 10px); left: 12px; right: 12px; display: flex; justify-content: space-between; align-items: flex-start; }
#deco .dc-score { pointer-events: auto; background: var(--paper2); box-shadow: 0 0 0 2px var(--ink), 0 4px 0 var(--ink); border-radius: 10px; padding: 6px 12px; display: flex; flex-direction: column; }
#deco .dc-score b { font-size: 20px; font-weight: 900; color: #c8902a; }
#deco .dc-score small { font-size: 11px; font-weight: 700; color: var(--ink2); }
#deco .dc-done { pointer-events: auto; background: #7aa874; color: #fff !important; border: 0; border-radius: 10px; padding: 10px 16px; font-weight: 900; font-size: 15px; box-shadow: 0 0 0 2px var(--ink), 0 4px 0 var(--ink); }
#deco .dc-parts { position: absolute; top: calc(env(safe-area-inset-top) + 74px); left: 12px; display: flex; flex-wrap: wrap; gap: 4px; max-width: 70vw; }
#deco .dc-parts span { background: #fffdf8d9; border-radius: 6px; padding: 2px 6px; font-size: 10px; font-weight: 800; color: var(--ink2); box-shadow: 0 0 0 1px #142b4533; }
#deco .dc-panel { position: absolute; left: 0; right: 0; bottom: 0; pointer-events: auto; background: var(--paper2); box-shadow: 0 -2px 0 var(--ink), 0 -10px 24px #0002; border-radius: 16px 16px 0 0; padding: 10px 10px calc(10px + env(safe-area-inset-bottom)); }
#deco .dc-tabs { display: flex; gap: 5px; overflow-x: auto; scrollbar-width: none; padding-bottom: 6px; touch-action: pan-x; }
#deco .dc-tabs button { flex: none; border: 2px solid var(--ink); background: #fff; border-radius: 8px; padding: 5px 10px; font-size: 13px; font-weight: 900; }
#deco .dc-tabs button.on { background: #7aa874; color: #fff; }
#deco .dc-list { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 4px 2px 8px; touch-action: pan-x; }
#deco .dc-card { flex: none; width: 92px; border: 2px solid #142b4533; background: #fbf5ea; border-radius: 10px; padding: 4px 4px 6px; display: flex; flex-direction: column; align-items: center; gap: 1px; }
#deco .dc-card i { width: 76px; height: 76px; background: center / contain no-repeat; }
#deco .dc-card i.sw { border-radius: 8px; background-size: 140%; box-shadow: inset 0 0 0 1px #0002; width: 70px; height: 52px; margin: 6px 0 4px; }
#deco .dc-card b { font-size: 12px; font-weight: 900; line-height: 1.2; text-align: center; }
#deco .dc-card small { font-size: 11px; font-weight: 800; color: #c8902a; text-align: center; line-height: 1.2; }
#deco .dc-card em { font-style: normal; font-size: 10px; color: #8a7a64; }
#deco .dc-card.cur { border-color: #7aa874; background: #eef6ea; }
#deco .dc-card.lock { opacity: .55; } #deco .dc-card.lock small { color: #8a7a64; }
#deco .dc-acts { display: flex; gap: 8px; }
#deco .dc-acts button { flex: 1; border: 2px solid var(--ink); background: #fff; border-radius: 12px; padding: 6px 0 4px; font-size: 22px; font-weight: 900; display: flex; flex-direction: column; align-items: center; line-height: 1.1; box-shadow: 0 3px 0 var(--ink); }
#deco .dc-acts button small { font-size: 11px; font-weight: 800; }
#deco .dc-acts button.main { background: #7aa874; color: #fff; }
#deco .dc-acts button:disabled { opacity: .4; }
