/* 俐方體 11 號：繁體中文像素字型（授權見 assets/font/LICENSE_Cubic11_OFL.txt） */
@font-face { font-family: "Cubic 11"; src: url("assets/font/Cubic_11.woff2") format("woff2"); font-display: swap; }
/* 放榜那天｜手機直式版面（v8）
   整個遊戲是一欄，寬度上限 460px；電腦上看起來就是置中的一支手機。 */
:root {
  --navy: #27466b;
  --blue: #3d7cc9;
  --cream: #fff6dc;
  --ink: #3a2a14;
  --muted: #6b5a3a;
  --gold1: #ffd76a;
  --gold2: #f0a020;
  --goldEdge: #8a5412;
  --good: #2f8f3b;
  --bad: #c2453b;
  --font: "Cubic 11", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  background: #2d4d73;
  background-image:
    linear-gradient(45deg, rgba(255,255,255,.04) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.04) 75%),
    linear-gradient(45deg, rgba(255,255,255,.04) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.04) 75%);
  background-size: 24px 24px;
  background-position: 0 0, 12px 12px;
  color: var(--ink);
  font-family: var(--font);
  touch-action: manipulation;          /* 連點不要放大畫面 */
  -webkit-text-size-adjust: 100%;
}
button { font-family: var(--font); cursor: pointer; color: var(--ink); }
#game {
  max-width: 460px; margin: 0 auto; min-height: 100dvh;
  padding: calc(8px + env(safe-area-inset-top)) 10px 0;
  display: flex; flex-direction: column; gap: 6px;
}

/* ---------- 上方狀態 ---------- */
.topbar {
  background: var(--cream); border: 3px solid var(--navy); border-radius: 12px;
  padding: 6px 8px; box-shadow: 0 3px 0 #1a2f4a; display: grid; gap: 5px;
}
.row1, .row2 { display: flex; gap: 5px; align-items: center; }
.title { font-size: 19px; color: var(--navy); margin-right: auto; letter-spacing: 1px; white-space: nowrap; }
.chip {
  background: #fff; border: 2px solid var(--navy); border-radius: 8px; padding: 2px 7px;
  display: flex; gap: 5px; align-items: center; white-space: nowrap;
}
.chip span { font-size: 11px; color: var(--muted); }
.chip b { font-size: 14px; font-weight: normal; font-variant-numeric: tabular-nums; }
.chip.date { background: var(--blue); }
.chip.date b { color: #fff; }
.chip.gear { font-size: 17px; line-height: 1; padding: 3px 9px; min-height: 30px; }
.row2 .chip { flex: 1; justify-content: center; }
.chip.meter i { flex: 1; min-width: 28px; height: 9px; background: #e6dcc0; border: 1px solid var(--navy); border-radius: 99px; overflow: hidden; }
.chip.meter em { display: block; height: 100%; background: var(--good); width: 50%; transition: width .25s; }
.chip.meter em.low { background: var(--bad); }
.chip.meter em.mid { background: var(--gold2); }

/* ---------- 房間 ---------- */
.stage {
  position: relative; border: 3px solid var(--navy); border-radius: 12px; overflow: hidden;
  background: #1a2f4a; box-shadow: 0 3px 0 #1a2f4a;
}
canvas { display: block; }
#c { width: 100%; height: auto; image-rendering: pixelated; }
.ticker {
  position: absolute; left: 6px; right: 6px; bottom: 6px; text-align: center;
  background: rgba(20, 30, 50, .85); color: #fff; font-size: 13px; line-height: 1.4;
  padding: 4px 8px; border-radius: 8px; border: 2px solid rgba(255,255,255,.35);
  opacity: 0; transition: opacity .25s; pointer-events: none;
}
.ticker.show { opacity: 1; }
.ticker .good { color: #9ff0a8; }
.ticker .bad { color: #ffb3aa; }
.banner {
  position: absolute; top: 30%; left: 0; right: 0; text-align: center; pointer-events: none;
  font-size: 36px; color: #fff; opacity: 0;
  text-shadow: 3px 3px 0 var(--goldEdge), -2px -2px 0 var(--goldEdge), 2px -2px 0 var(--goldEdge), -2px 2px 0 var(--goldEdge);
}
.banner.show { animation: banner 1.8s ease-out; }
@keyframes banner {
  0% { opacity: 0; transform: translateX(40%) scale(.9); }
  15% { opacity: 1; transform: translateX(0) scale(1.05); }
  80% { opacity: 1; transform: translateX(0) scale(1); }
  100% { opacity: 0; transform: translateX(-30%); }
}

/* ---------- 視窗 ---------- */
.window { background: var(--cream); border: 3px solid var(--navy); border-radius: 12px; box-shadow: 0 3px 0 #1a2f4a; overflow: hidden; }
.win-title {
  background: linear-gradient(#5b97e0, var(--blue)); color: #fff; padding: 3px 10px;
  display: flex; justify-content: space-between; align-items: center; font-size: 14px; border-bottom: 3px solid var(--navy);
}
.win-title .next { font-size: 12px; opacity: .95; }
.win-title .link { background: none; border: none; color: #fff; font-size: 12px; text-decoration: underline; padding: 4px 0 4px 12px; }
.win-body { padding: 6px 8px; }
.hidden { display: none !important; }

/* ---------- 成績單：五科直條 ---------- */
.subjects { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.subc { display: grid; justify-items: center; gap: 1px; font-size: 12px; }
.vtrack { position: relative; width: 100%; height: 34px; background: #e6dcc0; border: 2px solid var(--navy); border-radius: 6px; overflow: hidden; }
.vfill { position: absolute; left: 0; right: 0; bottom: 0; background: var(--blue); transition: height .3s; }
.vfill.under { background: var(--bad); }
.vline { position: absolute; left: 0; right: 0; height: 2px; background: var(--ink); }
.vnum { position: absolute; inset: 0; display: grid; place-items: center; font-size: 14px; color: #fff; text-shadow: 1px 1px 0 rgba(0,0,0,.55), -1px -1px 0 rgba(0,0,0,.35); }
.subc i { font-style: normal; font-size: 10px; color: var(--goldEdge); }
.minor { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 6px; }
.minor div { background: #fff; border: 2px solid var(--navy); border-radius: 8px; padding: 2px 4px; text-align: center; display: flex; justify-content: center; gap: 6px; align-items: baseline; }
.minor span { font-size: 10px; color: var(--muted); }
.minor b { font-weight: normal; font-size: 14px; }
.trait { font-size: 11px; margin: 6px 0 0; color: var(--navy); line-height: 1.4; }
.status { font-size: 12px; margin: 2px 0 0; color: var(--bad); min-height: 0; }
.status:empty, .trait:empty { display: none; }

/* ---------- 排行程 ---------- */
.slots { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; margin-bottom: 6px; }
.slot {
  background: #fff; border: 2px dashed #b9a676; border-radius: 8px; min-height: 40px; font-size: 13px; color: #9a8a6a;
  display: grid; place-items: center; text-align: center; padding: 0;
}
.slot.filled { border-style: solid; border-color: var(--navy); color: var(--ink); box-shadow: 0 2px 0 var(--navy); }
.slot.now { background: #ffe9a8; }
.slot.locked { background: #e9e2cf; border-style: solid; border-color: #c9bd9c; color: #b0a27c; font-size: 11px; }
.palette { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.act {
  background: #fff; border: 2px solid var(--navy); border-radius: 9px; padding: 2px; min-height: 40px; font-size: 14px; line-height: 1.25;
  box-shadow: 0 2px 0 var(--navy);
}
.act small { display: block; font-size: 10px; color: var(--muted); white-space: nowrap; }
.act:active:not(:disabled) { transform: translateY(2px); box-shadow: none; }
.act:disabled { opacity: .45; }
.act.study { background: #eaf3ff; }

.credit { color: rgba(255,255,255,.5); font-size: 10px; margin: 0; text-align: center; line-height: 1.4; }

/* ---------- 底部固定：開始這個月 ---------- */
.gobar {
  position: sticky; bottom: 0; margin: auto -10px 0; padding: 4px 10px calc(8px + env(safe-area-inset-bottom));
  background: linear-gradient(rgba(45,77,115,0), #2d4d73 28%); position: sticky;
}
.saved { position: absolute; left: 0; right: 0; top: -16px; color: #fff; font-size: 11px; text-align: center; opacity: 0; transition: opacity .4s; pointer-events: none; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.saved.show { opacity: 1; }
.gold {
  background: linear-gradient(var(--gold1), var(--gold2)); border: 3px solid var(--goldEdge); border-radius: 12px;
  padding: 10px 8px; font-size: 15px; box-shadow: 0 3px 0 var(--goldEdge); line-height: 1.35;
}
.gold:active:not(:disabled) { transform: translateY(3px); box-shadow: none; }
.gold:disabled { filter: grayscale(.7); opacity: .7; }
.go { width: 100%; font-size: 18px; padding: 10px; }

/* ---------- 彈出視窗 ---------- */
.modal { position: fixed; inset: 0; z-index: 10; background: rgba(10, 20, 40, .6); display: grid; place-items: center; padding: 10px; }
.modal .window { width: min(440px, 100%); max-height: calc(100dvh - 20px); overflow-y: auto; }
.modal .win-title { font-size: 16px; padding: 5px 10px; position: sticky; top: 0; z-index: 1; }
.modal .win-body { padding: 10px; }
#modalBody { font-size: 15px; line-height: 1.65; margin-bottom: 10px; }
#modalBody p { margin: 0 0 8px; }
.opts { display: grid; gap: 8px; }
.pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pick canvas { width: 64px; height: 96px; image-rendering: pixelated; margin: 0 auto 4px; }
.scores { width: 100%; border-collapse: collapse; margin: 6px 0; }
.scores td { padding: 3px 6px; border-bottom: 1px dashed #c9bd9c; }
.scores td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.big { font-size: 26px; color: var(--navy); text-align: center; margin: 4px 0 8px; }
.sum { background: #fff; border: 2px solid var(--navy); border-radius: 10px; padding: 8px 10px; font-size: 13px; }
.promo { font-size: 12px; color: var(--muted); margin-top: 10px; text-align: center; }
.promo a { color: var(--blue); }
.q-note { font-size: 12px; color: var(--muted); }
.good { color: var(--good); }
.bad { color: var(--bad); }
.pts { text-align: center; font-size: 14px; color: var(--goldEdge); margin: 8px 0 0; }
.newtag { color: var(--bad); font-size: 11px; font-weight: normal; }
.ev { width: 100%; max-width: 360px; margin: 0 auto 10px; image-rendering: pixelated; border: 3px solid var(--navy); border-radius: 8px; background: #cfe7f0; }

/* 骰子 */
.dice { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.die-wrap { background: #fff; border: 3px solid var(--navy); border-radius: 10px; padding: 6px 2px; display: grid; justify-items: center; gap: 2px; box-shadow: 0 3px 0 var(--navy); }
.die-wrap.locked { background: #ffe9a8; border-color: var(--goldEdge); box-shadow: 0 3px 0 var(--goldEdge); }
.die-wrap b { font-weight: normal; font-size: 12px; }
.die-wrap small { font-size: 10px; color: var(--muted); }
.die-wrap i { font-style: normal; font-size: 10px; color: #9a8a6a; }
.die { width: 40px; height: 40px; background: #fffdf5; border: 3px solid var(--ink); border-radius: 8px; padding: 4px;
  display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); gap: 1px; }
.die span { border-radius: 50%; }
.die span.on { background: var(--ink); }
.die.v6 span.on, .die.v5 span.on { background: var(--bad); }
.die.rolling { animation: shake .14s infinite; }
@keyframes shake { 0% { transform: rotate(-8deg); } 50% { transform: rotate(8deg) translateY(-3px); } 100% { transform: rotate(-8deg); } }
.dice-sum { text-align: center; font-size: 13px; color: var(--muted); margin: 8px 0 0; }

/* 商店與圖鑑 */
.row {
  width: 100%; text-align: left; background: #fff; border: 3px solid var(--navy); border-radius: 10px;
  padding: 6px 10px; margin-bottom: 8px; display: grid; grid-template-columns: 1fr auto; gap: 2px 8px;
  font-size: 14px; box-shadow: 0 3px 0 var(--navy);
}
.row b { font-weight: normal; }
.row small { grid-column: 1 / -1; font-size: 11px; color: var(--muted); }
.row b small { font-size: 11px; }
.row:disabled { opacity: .5; }
.cost { color: var(--goldEdge); }
.codex { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.codex span { background: #fff; border: 2px solid var(--navy); border-radius: 99px; padding: 1px 8px; font-size: 12px; }
.codex span.off { color: #b0a27c; border-color: #c9bd9c; background: #f1ead6; }

/* ---------- v9：過場卡（月份開場、月底結算、考試前）---------- */
.veil {
  position: absolute; inset: 0; z-index: 3; background: rgba(18, 28, 48, .86); color: #fff;
  display: grid; align-content: center; justify-items: center; gap: 6px; padding: 10px; text-align: center;
  opacity: 0; pointer-events: none; transition: opacity .22s;
}
.veil.show { opacity: 1; pointer-events: auto; }
.veil b { font-weight: normal; font-size: 30px; letter-spacing: 2px;
  text-shadow: 2px 2px 0 var(--goldEdge), -1px -1px 0 var(--goldEdge), 2px -1px 0 var(--goldEdge), -1px 2px 0 var(--goldEdge); }
.veil.show b { animation: veilIn .35s ease-out; }
@keyframes veilIn { from { transform: translateY(10px) scale(.92); opacity: 0; } }
.veil span { font-size: 14px; color: #ffe9a8; }
.veil small { position: absolute; bottom: 6px; left: 0; right: 0; font-size: 10px; color: rgba(255,255,255,.5); }
.sumrow { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 10px; }
.sumrow span { font-size: 13px; color: #fff; }
.sumrow i { font-style: normal; }
.sumrow i.up { color: #9ff0a8; }
.sumrow i.down { color: #ffb3aa; }
/* 彈出視窗滑進來，不要啪一下出現 */
.modal { animation: fadeIn .2s ease-out; }
.modal .window { animation: popIn .26s ease-out; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes popIn { from { transform: translateY(16px) scale(.96); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .modal, .modal .window, .veil.show b, .banner.show { animation: none; } }

/* v10：月底結算卡要等人看完，提示字放大並閃動 */
.veil.hold small { font-size: 13px; color: #ffe9a8; bottom: 10px; animation: blink 1.2s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .35; } }
.veil.hold .sumrow span { font-size: 15px; }

/* v11：爸媽的期望、福利社 */
.expect { font-size: 12px; margin: 6px 0 0; color: var(--ink); line-height: 1.4; }
.expect b { font-weight: normal; color: var(--bad); }
.expect:empty { display: none; }
button.chip { font-family: var(--font); cursor: pointer; }

/* v12：選單、讀書方法、同學、科系 */
.minor { grid-template-columns: repeat(4, 1fr); gap: 4px; }
.minor div { gap: 4px; padding: 2px; }
.gobar { display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: end; }
.gobar .menu { padding: 10px 14px; font-size: 16px; }
.mate { display: grid; grid-template-columns: 40px 1fr; gap: 8px; align-items: center; background: #fff; border: 2px solid var(--navy); border-radius: 10px; padding: 6px 8px; margin-bottom: 6px; font-size: 14px; line-height: 1.4; }
.mate b { font-weight: normal; }
.mate small { font-size: 11px; color: var(--muted); }
.mate small.good { color: var(--good); }
.mface { width: 36px; height: 40px; image-rendering: pixelated; }
.mbar { height: 8px; background: #e6dcc0; border: 1px solid var(--navy); border-radius: 99px; overflow: hidden; margin: 2px 0; }
.mbar i { display: block; height: 100%; background: #ff7fa8; }
.dept { font-size: 18px; color: var(--goldEdge); }
.later { background: #fff; border: 2px dashed var(--navy); border-radius: 10px; padding: 6px 10px; font-size: 13px; line-height: 1.6; }
.later b { font-weight: normal; color: var(--navy); }
.sum b { font-weight: normal; color: var(--navy); }

/* v13 */
.sumrow .lvup { color: #ffe08a; }
.subc i { white-space: nowrap; font-size: 9px; }

/* v14：性別與名字、寵物、裝潢 */
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 8px; }
.act.on, .skinbtn.on { background: #ffe9a8; border-color: var(--goldEdge); box-shadow: 0 2px 0 var(--goldEdge); }
.skinbtn { background: #fff; border: 3px solid var(--navy); border-radius: 10px; padding: 4px; box-shadow: 0 3px 0 var(--navy); }
.pick small { display: block; text-align: center; font-size: 12px; }
.namerow { display: grid; grid-template-columns: 1fr auto; gap: 6px; }
.namerow input { font-family: var(--font); font-size: 18px; padding: 6px 10px; border: 3px solid var(--navy); border-radius: 10px; background: #fff; color: var(--ink); min-width: 0; }
.petpic { width: 72px; height: 66px; image-rendering: pixelated; margin: 0 auto; }
.shop.two { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.shop.two .row { margin-bottom: 0; }
.who { text-align: center; font-size: 15px; color: var(--muted); margin: 0 !important; }
p.q-note.good { color: var(--good); }

/* v15：寵物還沒餵時，選單按鈕右上角亮紅點 */
.gobar .menu { position: relative; }
.gobar .menu.dot::after { content: ''; position: absolute; top: -4px; right: -4px; width: 12px; height: 12px;
  background: #e5484d; border: 2px solid #fff; border-radius: 50%; }

/* v16：寵物頭像（LPC 貓狗素材） */
.pick canvas.petpic, .mate canvas.petpic { width: 72px; height: 66px; }
.mate.petrow { grid-template-columns: 72px 1fr; }

/* v21：行動變 13 個，改成一排五個才放得進手機一個畫面 */
.palette { grid-template-columns: repeat(5, 1fr); gap: 4px; }
.palette .act { padding-left: 1px; padding-right: 1px; font-size: 13px; letter-spacing: -0.3px; }
.palette .act small { font-size: 9px; letter-spacing: -0.3px; overflow: hidden; }
.palette .act { min-height: 38px; }

/* v23：同學畫面的「約他」按鈕 */
.mate .hang { display: block; width: 100%; margin-top: 4px; min-height: 0; padding: 3px 6px; font-size: 13px; text-align: left; }
.mate .hang small { display: inline; margin-left: 6px; }
.mate .hang:disabled { opacity: .45; }

/* v25：成績單小格多一個體魄；過場卡裡的小動畫 */
.minor { grid-template-columns: repeat(5, 1fr); gap: 3px; }
.minor div { gap: 3px; padding: 2px 1px; }
.veil .ev { width: 64%; max-width: 250px; margin: 2px auto; border-width: 2px; }
/* v25：小格變六個（人際／歷程／體魄／魅力／領悟／效率） */
.minor { grid-template-columns: repeat(6, 1fr); gap: 2px; }
.minor div { gap: 2px; padding: 2px 0; }
.minor span { font-size: 9px; }
.minor b { font-size: 13px; }

/* v27：結果卡的浮層、結局頁的分享按鈕 */
.sharebox { position: fixed; inset: 0; z-index: 50; background: rgba(18, 28, 48, .92); display: none; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 14px; }
.sharebox.show { display: flex; }
.sharebox img { max-width: 100%; max-height: 72vh; border: 3px solid #fff; border-radius: 8px; }
.sharebox p { color: #ffe9a8; font-size: 13px; margin: 0; }
.sharebox div { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.sharebox .gold { padding: 8px 16px; font-size: 16px; text-decoration: none; display: inline-block; }
.row.share { width: 100%; margin-top: 8px; }
.win-title .link { font-size: 12px; }

/* v28：送禮、幫在意的人取名字 */
.mate .rename { display: inline-block; width: auto; min-height: 0; padding: 0 8px; font-size: 11px; margin-left: 4px; vertical-align: middle; }
.mate small.bday, .q-note b.bday { color: #c0392b; }

/* v29：備份代碼、結局導流 */
textarea.bk { width: 100%; box-sizing: border-box; font-family: ui-monospace, Menlo, monospace; font-size: 11px; line-height: 1.3; padding: 6px 8px; border: 2px solid var(--navy); border-radius: 8px; background: #fff; color: var(--ink); resize: none; word-break: break-all; }
.bkbtn { min-height: 0; padding: 4px 14px; margin: 4px 0 8px; }
.promo .promoline { display: block; font-size: 13px; color: var(--ink); line-height: 1.5; margin-bottom: 4px; }

/* v31：數學青於藍使用中的小標 */
.subc .appmark { display: block; font-style: normal; font-size: 9px; line-height: 1.2; color: #fff; background: #3d5fc4; border-radius: 6px; padding: 0 3px; margin: 1px auto 0; width: max-content; }

/* v33：雲端存檔 */
.cloudcode { font-size: 28px; letter-spacing: 3px; text-align: center; color: var(--navy); background: #fff; border: 3px solid var(--navy); border-radius: 10px; padding: 6px 4px; margin: 6px 0; user-select: all; -webkit-user-select: all; }
.bkbox { border: 2px solid var(--navy); border-radius: 10px; padding: 8px 10px; margin: 8px 0; background: rgba(255,255,255,.5); }
.bkbox > b { font-weight: normal; font-size: 16px; }
.bkbox summary { cursor: pointer; font-size: 14px; }
.bkbox .namerow input { text-transform: uppercase; letter-spacing: 2px; }

/* v34：排行榜 */
.board { max-height: 46vh; overflow-y: auto; border: 2px solid var(--navy); border-radius: 10px; background: #fff; }
.brow { display: grid; grid-template-columns: 26px 1fr auto; column-gap: 6px; align-items: baseline; padding: 4px 8px; border-bottom: 1px dashed #d8cfb8; font-size: 14px; line-height: 1.25; }
.brow:last-child { border-bottom: 0; }
.brow i { font-style: normal; color: var(--muted); grid-row: span 2; align-self: center; text-align: center; }
.brow b { font-weight: normal; }
.brow span { text-align: right; color: var(--navy); }
.brow small { grid-column: 2 / 4; font-size: 11px; color: var(--muted); }
.brow.me { background: #fff3c4; }
.seg.seg3 { grid-template-columns: 1fr 1fr 1fr; }
.q-note .rename { display: inline-block; width: auto; min-height: 0; padding: 0 8px; font-size: 11px; margin-left: 4px; vertical-align: middle; }

/* v35：人物傳記 */
.biochart { display: block; width: 100%; height: 62px; background: #fff; border: 2px solid var(--navy); border-radius: 8px; margin: 2px 0 6px; }
table.biot { font-size: 12px; }
table.biot th { font-weight: normal; color: var(--muted); font-size: 11px; text-align: right; padding: 2px 3px; }
table.biot th:first-child, table.biot td:first-child { text-align: left; white-space: nowrap; }
table.biot td { padding: 2px 3px; text-align: right; }
.tl { border-left: 3px solid var(--navy); margin: 4px 0 8px 4px; padding-left: 8px; }
.tl div { display: grid; grid-template-columns: 62px 1fr; gap: 6px; font-size: 13px; line-height: 1.35; padding: 2px 0; }
.tl i { font-style: normal; color: var(--muted); font-size: 11px; padding-top: 2px; }

/* v36：錄取通知書 */
.letter { position: relative; background: #fffdf2; border: 3px solid var(--navy); outline: 1px solid #c9a44a; outline-offset: -8px; border-radius: 4px; padding: 20px 18px 16px; margin: 4px 0 10px; text-align: center; box-shadow: 0 3px 0 #1a2f4a; }
.letter .lt-c { position: absolute; width: 12px; height: 12px; background: var(--navy); box-shadow: inset 0 0 0 3px var(--navy), inset 0 0 0 12px #c9a44a; }
.letter .lt-c.tl { left: -3px; top: -3px; } .letter .lt-c.tr { right: -3px; top: -3px; } .letter .lt-c.bl { left: -3px; bottom: -3px; } .letter .lt-c.br { right: -3px; bottom: -3px; }
.letter .lt-top { font-size: 12px; color: var(--muted); letter-spacing: 1px; }
.letter .lt-title { font-size: 30px; letter-spacing: 8px; margin: 2px 0 2px 8px; color: var(--ink); }
.letter .lt-rule { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 8px; }
.letter .lt-rule span { width: 70px; height: 2px; background: #c9a44a; } .letter .lt-rule b { font-weight: normal; color: #c9a44a; font-size: 12px; }
.letter .lt-to { text-align: left; margin: 0 4px; font-size: 14px; } .letter .lt-to b { font-weight: normal; font-size: 20px; }
.letter .lt-body { text-align: left; margin: 4px 4px; font-size: 14px; color: #5b4a2e; }
.letter .lt-school { font-size: 30px; color: #b23a2f; margin: 8px 0 0; line-height: 1.2; }
.letter .lt-dept { font-size: 20px; color: #7a5a1e; margin: 2px 0 8px; line-height: 1.25; }
.letter .lt-foot { display: flex; justify-content: space-between; align-items: flex-end; margin: 8px 4px 0; font-size: 11px; color: var(--muted); text-align: left; }
.letter .lt-seal { display: grid; grid-template-columns: 1fr 1fr; width: 58px; height: 58px; border: 3px solid #c2332a; outline: 1px solid #c2332a; outline-offset: -6px; color: #c2332a; transform: rotate(-9deg); opacity: .86; align-items: center; justify-items: center; padding: 6px; box-sizing: border-box; animation: sealIn .5s ease-out .5s backwards; }
.letter .lt-seal b { font-weight: normal; font-size: 19px; line-height: 1; }
@keyframes sealIn { from { transform: rotate(-9deg) scale(2.2); opacity: 0; } to { transform: rotate(-9deg) scale(1); opacity: .86; } }
@media (prefers-reduced-motion: reduce) { .letter .lt-seal { animation: none; } }
