/* 抽籤點名(ffn-lunch.js)、計時器(ffn-timer.js)改成和班級主頁一樣的手帳風:
   牛皮紙點點底、厚咖啡邊框 + 硬陰影、粉彩按鈕。只覆蓋顏色/邊框,不動版面與功能。
   兩支工具的樣式是開啟時才塞進 <head>,所以這裡用 html body 提高優先權。 */

/* ===== 共用:蓋板背景、紙卡面板 ===== */
html body .ln, html body .tb-w { background: rgba(62, 39, 35, .62); backdrop-filter: blur(3px); color: #3e2723; }
html body .ln .m, html body .tb-m, html body .ft-card {
  background: #faf6ee radial-gradient(#efe7c8 10%, transparent 10%) 0 0 / 18px 18px; color: #3e2723;
  border: 3.5px solid #3e2723; border-radius: 22px; box-shadow: 6px 8px 0 #3e2723;
}
html body .ln .hd, html body .tb-m .hd { border-bottom: 2.5px dashed #e0d3ad; }
html body .ln .hd h2, html body .tb-m .hd h2, html body .ft-card h2 { color: #3e2723; }
html body .ln .hd p { color: #7a6a5c; }
html body .ln .hd i { background: #fff3c4; color: #3e2723; border: 2.5px solid #3e2723; box-shadow: 2px 3px 0 #3e2723; }
html body .ln .x, html body .tb-i { background: #fff; color: #3e2723; border: 2.5px solid #3e2723; border-radius: 12px; box-shadow: 2px 3px 0 #3e2723; font-weight: 800; }
html body .ln .x:active, html body .tb-i:active { transform: translate(2px, 3px); box-shadow: none; }

/* ===== 抽籤點名 ===== */
html body .ln .bx { background: #fff; border: 2.5px solid #3e2723; border-radius: 16px; }
html body .ln .t1 { color: #3e2723; }
html body .ln .t2 { color: #7a6a5c; }
html body .ln .bx .t1[style], html body .ln .bx .t2[style] { color: #7a6a5c !important; }
html body .ln .t2 b { color: #14532d !important; }
html body .ln .md button, html body .ln .pre button, html body .ln .cn .c {
  background: #fff; color: #3e2723; border: 2.5px solid #3e2723; box-shadow: 2px 3px 0 #3e2723; font-weight: 800;
}
html body .ln .md .inc { background: #bff0d4; color: #14532d; border-color: #3e2723; box-shadow: 2px 3px 0 #3e2723; }
html body .ln .md .exc { background: #fecdd3; color: #881337; border-color: #3e2723; box-shadow: 2px 3px 0 #3e2723; }
html body .ln .pre .g { background: #fff3c4; color: #451a03; border-color: #3e2723; }
html body .ln .cn .c.on { background: #ffd45a; color: #451a03; border-color: #3e2723; }
html body .ln .mx button { background: #fff; color: #3e2723; border: 2.5px solid #3e2723; box-shadow: 2px 3px 0 #3e2723; }
html body .ln .mx button em { background: #fff3c4; color: #3e2723; border: 1.5px solid #3e2723; }
html body .ln .mx .si { background: #bff0d4; border-color: #3e2723; color: #14532d; box-shadow: 2px 3px 0 #3e2723; }
html body .ln .mx .se { background: #fecdd3; border-color: #3e2723; color: #881337; box-shadow: none; opacity: .8; }
html body .ln .st { background: #fff; border: 2.5px solid #3e2723; }
html body .ln .st button { background: #fff3c4; color: #3e2723; border: 2px solid #3e2723; }
html body .ln .st input { color: #3e2723; }
html body .ln .spin { background: #fff; border: 2.5px solid #3e2723; }
html body .ln .spin span { color: #7a6a5c; }
html body .ln .spin div { color: #3e2723; }
html body .ln .go {
  background: #ffd45a; color: #451a03; border: 3.5px solid #3e2723; box-shadow: 3px 4px 0 #3e2723; transition: transform .15s, box-shadow .15s;
}
html body .ln .go:hover:not(:disabled) { background: #ffe58a; transform: translate(1px, -1px); }
html body .ln .go:active:not(:disabled) { transform: translate(2px, 3px); box-shadow: none; }
html body .ln .go:disabled { background: #e9e1cf; color: #7a6a5c; box-shadow: none; }
html body .ln .rs .tag { background: #bff0d4; color: #14532d; border: 2px solid #3e2723; }
html body .ln .rs h3 { color: #3e2723; }
html body .ln .w { background: #fff3c4; color: #3e2723; border: 3px solid #3e2723; box-shadow: 4px 5px 0 #3e2723; }
html body .ln .w .a { color: #7a6a5c; }
html body .ln .w .e { background: #3e2723; color: #fff3c4; }
html body .ln .ac button { border: 3px solid #3e2723; box-shadow: 2.5px 3.5px 0 #3e2723; }
html body .ln .ac .p { background: #bff0d4; color: #14532d; }
html body .ln .ac .y { background: #ffd45a; color: #451a03; }
html body .ln .ac .z { background: #fff; color: #3e2723; border: 2.5px solid #3e2723; }
html body .ln .toast { background: #d9f99d; color: #365314; border: 3px solid #3e2723; box-shadow: 2px 3px 0 #3e2723; }

/* ===== 計時器 ===== */
html body .tb-t { background: #fff; border: 2.5px solid #3e2723; }
html body .tb-t button { color: #7a6a5c; }
html body .tb-t button.a1 { background: #ffd45a; color: #451a03; border: 2px solid #3e2723; }
html body .tb-t button.a2 { background: #bff0d4; color: #14532d; border: 2px solid #3e2723; }
html body .tb-d { background: #fff; border: 3px solid #3e2723; }
html body .tb-d .n { color: #3e2723; text-shadow: none; }
html body .tb-d .n.g { color: #14532d; text-shadow: none; }
html body .tb-d .set { border-top: 2.5px dashed #e0d3ad; color: #7a6a5c; }
html body .tb-d .set input, html body .ft-card input[type=number] { background: #fff; border: 2.5px solid #3e2723; color: #3e2723; }
html body .tb-p button { background: #fff; color: #3e2723; border: 2.5px solid #3e2723; box-shadow: 2px 3px 0 #3e2723; }
html body .tb-p button:active { transform: translate(2px, 3px); box-shadow: none; }
html body .tb-o { background: #fff3c4; border: 2.5px solid #3e2723; color: #3e2723; }
html body .tb-r button { border: 3px solid #3e2723; box-shadow: 2.5px 3.5px 0 #3e2723; color: #451a03; }
html body .tb-r .main { background: #ffd45a; }
html body .tb-r .sub { background: #fff; color: #3e2723; border: 3px solid #3e2723; }
html body .tb-laps div { background: #fff; border: 2px solid #3e2723; color: #3e2723; }
html body .tb-mini { background: #faf6ee; border: 3px solid #3e2723; box-shadow: 4px 5px 0 #3e2723; color: #3e2723; }
html body .tb-mini b { color: #3e2723; }
html body .tb-mini button { background: #fff3c4; color: #3e2723; border: 2px solid #3e2723; }
html body .ft-b { border: 3px solid #3e2723; box-shadow: 2.5px 3.5px 0 #3e2723; color: #3e2723; }
html body .rd { background: #faf6ee; color: #3e2723; border: 3.5px solid #3e2723; box-shadow: 6px 8px 0 #3e2723; }

/* ---- 班級百寶箱:寶物卡 ---- */
.tr-head{display:flex;align-items:center;gap:10px;margin-bottom:12px}
.tr-head h2{margin:0;font-size:20px}
.tr-n{margin-left:auto;background:#fff3c4;border:2.5px solid #3e2723;border-radius:99px;padding:3px 14px;font-weight:900;font-size:13px;box-shadow:2px 3px 0 #3e2723}
.tr-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:16px}
.tr{position:relative;border:3px solid #3e2723;border-radius:24px;box-shadow:0 5px 0 #3e2723;padding:18px 12px 14px;text-align:center;display:flex;flex-direction:column;align-items:center;gap:6px;overflow:hidden}
.tr0{background:linear-gradient(180deg,#fff7d6,#ffe49a)}.tr1{background:linear-gradient(180deg,#e9fbe5,#bfeab5)}.tr2{background:linear-gradient(180deg,#e8f3ff,#bcd8fb)}.tr3{background:linear-gradient(180deg,#fdebf3,#f9c2da)}
.tr:before{content:"";position:absolute;inset:0;background:repeating-conic-gradient(from 0deg at 50% 38%,rgba(255,255,255,.35) 0 8deg,transparent 8deg 22deg);pointer-events:none}
.tr .med{position:relative;width:92px;height:92px;border-radius:50%;display:grid;place-items:center;font-size:46px;line-height:1;background:radial-gradient(circle at 35% 30%,#fffbe0,#ffd75e 55%,#e8a01c);border:3px solid #3e2723;box-shadow:inset 0 -7px 0 rgba(0,0,0,.12),0 0 0 6px rgba(255,255,255,.6),0 4px 0 #3e2723}
.tr b{position:relative;font-size:17px;line-height:1.3;color:#3e2723;min-height:2.6em;display:flex;align-items:center;justify-content:center}
.tr .row{margin-top:auto!important}
.tr .dt{position:relative;background:#fff;border:2px solid #3e2723;border-radius:99px;padding:1px 10px;font-size:12px;font-weight:800;color:#6a5a4c}
.tr .sp{position:absolute;right:14px;top:10px;color:#f59e0b;font-style:normal;font-size:18px;animation:trtw 1.8s ease-in-out infinite alternate}
@keyframes trtw{from{opacity:.3;transform:scale(.8)}to{opacity:1;transform:scale(1.25)}}
.tr-empty{display:flex;flex-direction:column;align-items:center;gap:6px;padding:26px 10px;border:3px dashed #d9c98f;border-radius:22px;background:#fffdf3;text-align:center;font-weight:800;color:#6a5a4c}