/* Floralia — หอคอยนิรันดร์'s full screen (js/tower.js, G.overlay 'tower'), MIR4's tower screen re-skinned: floor cards on
   the left, the floor's painting in the middle of a near-black stage, lore top right, the skill / CP / auto / เข้า panel
   bottom right, ดูรางวัลทั้งหมด along the bottom. Obsidian + gold; numbers crisp, no glow round text. */
#towerui { position: fixed; inset: 0; z-index: 900; pointer-events: auto; overflow: hidden; user-select: none; font-family: 'Mali', sans-serif; color: #efe6d2;
  background: radial-gradient(ellipse 70% 80% at 48% 46%, #1d1913 0%, #0f0d0b 55%, #070605 100%); animation: t2In 0.2s ease-out both; }
@keyframes t2In { from { opacity: 0; } to { opacity: 1; } }
#towerui[hidden], #towerui [hidden] { display: none !important; }
#towerui button { font-family: 'Mali', sans-serif; color: inherit; }
#towerui .t2-stage { position: absolute; left: 0; top: 0; transform-origin: 0 0; display: flex; flex-direction: column; }

/* ---- the top bar ---- */
#towerui .t2-top { flex: none; height: 60px; display: flex; align-items: center; gap: 18px; padding: 0 12px 0 18px; background: linear-gradient(#0b0907, #17130d); border-bottom: 1px solid rgba(214, 176, 92, 0.5); position: relative; z-index: 3; }
#towerui .t2-title { display: flex; align-items: center; gap: 10px; flex: none; }
#towerui .t2-title img { width: 44px; height: 44px; object-fit: contain; }
#towerui .t2-title b { font: 800 26px/1 Mali, sans-serif; color: #f3e2b0; }
#towerui .t2-title small { font: 600 13px Fredoka, sans-serif; color: #a8946a; letter-spacing: 1px; }
#towerui .t2-prog { display: flex; align-items: center; gap: 10px; min-width: 0; }
#towerui .t2-prog span { font: 600 15px Mali, sans-serif; color: #d9c79c; white-space: nowrap; }
#towerui .t2-prog span b { font: 800 19px Fredoka, sans-serif; color: #ffe39a; }
#towerui .t2-prog i { width: 180px; height: 8px; border-radius: 4px; background: #070605; box-shadow: inset 0 0 0 1px rgba(214, 176, 92, 0.45); overflow: hidden; }
#towerui .t2-prog u { display: block; height: 100%; background: linear-gradient(90deg, #9fd8ff, #f2c14e); }
#towerui .t2-cur { margin-left: auto; display: flex; gap: 8px; }
#towerui .t2-chip { display: flex; align-items: center; gap: 6px; height: 32px; min-width: 96px; padding: 0 12px 0 6px; border-radius: 6px; background: #080706; box-shadow: inset 0 0 0 1px rgba(214, 176, 92, 0.42); cursor: pointer; }
#towerui .t2-chip img { width: 24px; height: 24px; object-fit: contain; }
#towerui .t2-chip em { margin-left: auto; font: 700 15px Fredoka, sans-serif; font-style: normal; color: #f6eedc; font-variant-numeric: tabular-nums; }
#towerui .t2-x { flex: none; width: 44px; height: 44px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
#towerui .t2-x i { width: 36px; height: 36px; background: var(--uib-btn_close, url(../assets/ui_book/btn_close.png)) center / contain no-repeat; }
#towerui .t2-x:hover i, #towerui .t2-x:focus-visible i { filter: brightness(1.2); transform: scale(1.08); }

/* ---- the body: list | picture | side ---- */
#towerui .t2-body { flex: 1; min-height: 0; position: relative; --lw: 360px; --sw: 370px; }
#towerui .t2-hero { position: absolute; left: var(--lw); right: 0; top: 0; bottom: 0; }
#towerui .t2-art { position: absolute; left: 0; right: var(--sw); top: 0; bottom: 0; overflow: hidden; }
#towerui .t2-art::before { content: ''; position: absolute; left: 50%; top: 4%; width: 80%; height: 92%; transform: translateX(-50%);
  background: radial-gradient(ellipse 45% 52% at 50% 46%, rgba(255, 226, 160, 0.16), rgba(255, 226, 160, 0.04) 60%, transparent 75%); }
#towerui .t2-paint { position: absolute; left: 50%; top: 47%; height: 100%; aspect-ratio: 1; transform: translate(-50%, -50%); object-fit: cover;
  -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 62%, transparent 100%); mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 62%, transparent 100%);
  opacity: 0; transition: opacity 0.35s; }
#towerui .t2-art.painted .t2-paint { opacity: 1; }
#towerui .t2-art::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 34%; pointer-events: none;
  background: linear-gradient(rgba(7, 6, 5, 0), rgba(7, 6, 5, 0.55) 45%, rgba(7, 6, 5, 0.86)); }
#towerui .t2-art.painted .t2-stand { display: none; }
#towerui .t2-stand { position: absolute; left: 0; right: 0; top: 12%; bottom: 22%; display: flex; align-items: flex-end; justify-content: center; gap: 2%; }
#towerui .t2-stand img { height: 62%; max-width: 30%; object-fit: contain; filter: drop-shadow(0 18px 18px rgba(0, 0, 0, 0.6)); }
#towerui .t2-stand.n1 img { height: 92%; max-width: 70%; }
#towerui .t2-stand.n2 img:nth-child(2), #towerui .t2-stand.n3 img:nth-child(2) { height: 78%; }
#towerui .t2-name { position: absolute; z-index: 1; left: 0; right: var(--sw); bottom: 58px; display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center; pointer-events: none; }
#towerui .t2-name b { font: 800 46px/1 Fredoka, Mali, sans-serif; color: #fff1cc; letter-spacing: 1px; }
#towerui .t2-name span { font: 700 18px Mali, sans-serif; color: #f2d48a; }
#towerui .t2-name span i { font: 700 14px Fredoka, sans-serif; font-style: normal; color: #ffb4a0; margin-left: 4px; }
#towerui .t2-name small { font: 600 13px Mali, sans-serif; color: #b7a582; }
#towerui .t2-mobs { display: flex; gap: 6px; margin-top: 6px; pointer-events: auto; }
#towerui .t2-mob { width: 42px; height: 42px; padding: 0; border-radius: 50%; border: 0; cursor: pointer; background: radial-gradient(#2c251a, #120f0b); box-shadow: inset 0 0 0 1px rgba(214, 176, 92, 0.55); display: grid; place-items: center; }
#towerui .t2-mob img { width: 36px; height: 36px; object-fit: contain; }
#towerui .t2-mob.boss { box-shadow: inset 0 0 0 2px #f2c14e; }
#towerui .t2-mob:hover, #towerui .t2-mob:focus-visible { filter: brightness(1.2); transform: translateY(-2px); }

/* ---- the floor cards ---- */
#towerui .t2-list { position: absolute; left: 0; top: 0; bottom: 48px; width: var(--lw); overflow-y: auto; padding: 12px 10px 12px 34px; scrollbar-width: thin; scrollbar-color: #6a5630 transparent; }
#towerui .t2-fl { position: relative; margin-bottom: 10px; padding: 9px 10px 10px 30px; min-height: 96px; border-radius: 3px; cursor: pointer;
  background: linear-gradient(180deg, rgba(110, 92, 58, 0.62), rgba(52, 43, 30, 0.9) 42%, rgba(34, 28, 20, 0.94)); box-shadow: inset 0 0 0 1px rgba(214, 176, 92, 0.32), inset 0 1px 0 rgba(255, 236, 190, 0.18); }
#towerui .t2-fl:hover { filter: brightness(1.08); }
#towerui .t2-fl.sel { box-shadow: inset 0 0 0 2px #f2c14e, inset 0 1px 0 rgba(255, 236, 190, 0.25); }
#towerui .t2-fl.cur { background: linear-gradient(180deg, rgba(150, 120, 60, 0.72), rgba(70, 54, 28, 0.94) 45%, rgba(40, 31, 18, 0.96)); }
#towerui .t2-fl.lock { opacity: 0.88; }
#towerui .t2-fl.lock .t2-fh b, #towerui .t2-fl.lock .t2-fh em { opacity: 0.75; }   /* (the things keep their true tier colours) */
#towerui .t2-fl.boss .t2-fh b { color: #ffd78a; }
#towerui .t2-med { position: absolute; left: -24px; top: 50%; width: 44px; height: 44px; margin-top: -22px; border-radius: 50%; font-style: normal; display: grid; place-items: center;
  background: radial-gradient(circle at 40% 35%, #3b3123, #16120d 70%); box-shadow: 0 0 0 2px #8a7140, 0 0 0 4px rgba(0, 0, 0, 0.6); color: #8a7140; font: 800 16px Fredoka, sans-serif; }
#towerui .t2-fl.got .t2-med { background: radial-gradient(circle at 40% 32%, #fff3c4, #e6b84e 45%, #9a6a1c 100%); box-shadow: 0 0 0 2px #fbe7a6, 0 0 0 4px rgba(40, 26, 6, 0.85); }
#towerui .t2-fl.got .t2-med::after { content: ''; width: 18px; height: 9px; margin-top: -5px; border-left: 4px solid #3a2405; border-bottom: 4px solid #3a2405; transform: rotate(-45deg); }
#towerui .t2-fl.cur .t2-med { color: #ffe39a; box-shadow: 0 0 0 2px #f2c14e, 0 0 0 4px rgba(0, 0, 0, 0.6); }
#towerui .t2-fl.lock .t2-med { opacity: 0.5; }
#towerui .t2-fh { display: flex; align-items: baseline; gap: 10px; }
#towerui .t2-fh b { font: 800 19px Mali, sans-serif; color: #f3e3b5; white-space: nowrap; }
#towerui .t2-fh em { font: 700 12px Fredoka, Mali, sans-serif; font-style: normal; letter-spacing: 1px; color: #cdb784; white-space: nowrap; }
#towerui .t2-fl.cur .t2-fh em { color: #9fe8ff; }
#towerui .t2-fl.owe .t2-fh em { color: #ff9f8a; }
#towerui .t2-fl.owe .t2-cash { visibility: hidden; }
/* gold and EXP as plain numbers (the coin, the word EXP), never as an item frame */
#towerui .t2-cash { margin-left: auto; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
#towerui .t2-coin { display: flex; align-items: center; gap: 3px; font: 700 13px Fredoka, sans-serif; color: #ffe39a; cursor: pointer; font-variant-numeric: tabular-nums; }
#towerui .t2-coin img { width: 18px; height: 18px; object-fit: contain; }
#towerui .t2-xp { display: flex; align-items: center; gap: 4px; font: 700 13px Fredoka, sans-serif; color: #d9f0c4; font-variant-numeric: tabular-nums; }
#towerui .t2-xp i, #towerui .t2-xpb { font: 800 10px/1 Fredoka, sans-serif; font-style: normal; letter-spacing: 0.5px; padding: 3px 4px; border-radius: 4px; color: #e4dcff; background: #2c2552; box-shadow: inset 0 0 0 1px rgba(207, 195, 255, 0.55); }
#towerui .t2-xpb { font-size: 13px; padding: 5px 7px; }
#towerui .t2-first .t2-cash { display: inline-flex; margin-left: 4px; vertical-align: middle; }
#towerui .t2-fr { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
#towerui .t2-claim { position: absolute; right: 8px; top: 7px; height: 26px; padding: 0 10px; border: 0; border-radius: 5px; cursor: pointer; font: 800 12.5px Mali, sans-serif; color: #2a1806 !important; background: linear-gradient(#ffe39a, #d79a34); }

/* a reward slot: the game's metal frame and plate of its tier, the count in the corner */
#towerui .t2-slot { --rf: url(../assets/ui_book/metal/frame_g2.png); --rp: url(../assets/ui_book/plates/plate_g2.png);
  position: relative; flex: none; width: 46px; height: 46px; cursor: pointer; background: var(--rf) center / 100% 100% no-repeat; }
#towerui .t2-slot.t0 { --rf: url(../assets/ui_book/metal/frame_g0.png); --rp: url(../assets/ui_book/plates/plate_g0.png); }
#towerui .t2-slot.t1 { --rf: url(../assets/ui_book/metal/frame_g1.png); --rp: url(../assets/ui_book/plates/plate_g1.png); }
#towerui .t2-slot.t3 { --rf: url(../assets/ui_book/metal/frame_g3.png); --rp: url(../assets/ui_book/plates/plate_g3.png); }
#towerui .t2-slot.t4 { --rf: url(../assets/ui_book/metal/frame_g4.png); --rp: url(../assets/ui_book/plates/plate_g4.png); }
#towerui .t2-slot.t5 { --rf: url(../assets/ui_book/metal/frame_g5.png); --rp: url(../assets/ui_book/plates/plate_g5.png); }
#towerui .t2-slot::before { content: ''; position: absolute; inset: 11.5%; border-radius: 5%; background: var(--rp) center / 100% 100% no-repeat; }
#towerui .t2-slot img { position: absolute; inset: 14%; width: 72%; height: 72%; object-fit: contain; z-index: 1; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.45)); }
#towerui .t2-slot em { position: absolute; right: 3px; bottom: 3px; z-index: 2; min-width: 14px; padding: 0 3px; border-radius: 6px; background: rgba(14, 10, 6, 0.9); color: #fff;
  font: 700 11.5px/1.3 Fredoka, sans-serif; font-style: normal; text-align: center; font-variant-numeric: tabular-nums; }
#towerui .t2-slot .t2-g { position: absolute; left: 2px; top: 2px; z-index: 2; padding: 0 3px; border-radius: 5px; background: rgba(14, 10, 6, 0.9); font: 800 9.5px/1.35 Mali, sans-serif; font-style: normal; }
#towerui .t2-slot:hover, #towerui .t2-slot:focus-visible { transform: translateY(-2px); }

/* ---- the right side: lore, then the panel ---- */
#towerui .t2-side { position: absolute; right: 0; top: 0; bottom: 0; width: var(--sw); display: flex; flex-direction: column; padding: 14px 16px 14px 18px; gap: 12px;
  background: linear-gradient(90deg, rgba(7, 6, 5, 0) 0%, rgba(7, 6, 5, 0.72) 22%, rgba(7, 6, 5, 0.9) 100%); }
#towerui .t2-lore { flex: 0 1 auto; min-height: 0; overflow-y: auto; scrollbar-width: thin; }
#towerui .t2-lore p { margin: 0 0 8px; font: 500 14.5px/1.65 Mali, sans-serif; color: #e7dcc3; }
#towerui .t2-lore span { display: block; font: 600 13.5px Mali, sans-serif; color: #c9b27a; }
#towerui .t2-panel { margin-top: auto; display: flex; flex-direction: column; gap: 6px; }
#towerui .t2-panel h5 { display: flex; align-items: center; gap: 7px; margin: 6px 0 0; font: 800 15px Mali, sans-serif; color: #f0deb0; }
#towerui .t2-dia { width: 14px; height: 14px; transform: rotate(45deg); border: 2px solid #c9a24a; border-radius: 2px; background: #1a150e; }
#towerui .t2-sk { display: flex; gap: 10px; align-items: flex-start; padding: 2px 0 4px; }
#towerui .t2-skic { flex: none; width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(#3a2f1e, #120e09); box-shadow: inset 0 0 0 2px #b8913f; }
#towerui .t2-skic img { width: 42px; height: 42px; object-fit: contain; }
#towerui .t2-sk b { display: block; font: 800 14.5px Mali, sans-serif; color: #ffe1a1; }
#towerui .t2-sk small { display: block; font: 500 12.5px/1.45 Mali, sans-serif; color: #cdbf9f; }
#towerui .t2-cp { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
#towerui .t2-cp li { display: flex; align-items: center; gap: 8px; padding: 4px 2px; border-bottom: 1px solid rgba(214, 176, 92, 0.18); font: 600 13.5px Mali, sans-serif; color: #d7c9a6; }
#towerui .t2-cp li::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: #c9a24a; }
#towerui .t2-cp li b { margin-left: auto; font: 700 17px Fredoka, sans-serif; color: #fff; font-variant-numeric: tabular-nums; }
#towerui .t2-cp li.ok b { color: #9be89a; }
#towerui .t2-cp li.low b { color: #ff8f80; }
#towerui .t2-first i { display: block; font: 600 12.5px/1.4 Mali, sans-serif; font-style: normal; color: #b9d7a0; }
#towerui .t2-first i.t2-done { color: #cdb784; }
#towerui .t2-first i.t2-owe { color: #ff9f8a; }
#towerui .t2-now { padding: 5px 8px; border-radius: 5px; background: rgba(159, 232, 255, 0.08); box-shadow: inset 0 0 0 1px rgba(159, 232, 255, 0.35); font: 700 13px Mali, sans-serif; color: #bfeeff; }
#towerui .t2-auto { display: flex; gap: 9px; align-items: flex-start; margin: 4px 0 2px; cursor: pointer; }
#towerui .t2-auto input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: #d6a63c; cursor: pointer; }
#towerui .t2-auto b { display: block; font: 800 14px Mali, sans-serif; color: #f3e3b5; }
#towerui .t2-auto small { display: block; font: 500 11.5px/1.4 Mali, sans-serif; color: #e08f80; }
#towerui .t2-go { height: 54px; border: 0; border-radius: 4px; cursor: pointer; font: 800 21px Mali, sans-serif; letter-spacing: 1px; color: #2a1806 !important;
  background: linear-gradient(#ffe7a6, #e2b04d 48%, #b07a26); box-shadow: inset 0 0 0 1px #fff2c8, 0 0 0 1px #6a4a14, 0 4px 10px rgba(0, 0, 0, 0.5); }
#towerui .t2-go:hover, #towerui .t2-go:focus-visible { filter: brightness(1.08); }
#towerui .t2-go:disabled { cursor: default; filter: grayscale(0.7) brightness(0.65); font-size: 16px; }
#towerui .t2-go.leave { color: #ffe4dc !important; background: linear-gradient(#7a3a30, #4a1f19); box-shadow: inset 0 0 0 1px #ff9f8a, 0 0 0 1px #2a0e0a; font-size: 18px; }
#towerui .t2-go.leave.armed { background: linear-gradient(#c0392b, #7a1f16); }
#towerui .t2-go.leave.small { height: 38px; font-size: 15px; }
#towerui .t2-go.claim { height: 42px; font-size: 16px; color: #1a2a10 !important; background: linear-gradient(#d8ffb0, #7fc75a); box-shadow: inset 0 0 0 1px #f0ffe0, 0 0 0 1px #2e5a1a; }

/* ---- the bottom strip ---- */
#towerui .t2-foot { position: absolute; left: 0; bottom: 0; right: var(--sw); height: 48px; display: flex; align-items: center; gap: 10px; padding: 0 14px; border-top: 1px solid rgba(214, 176, 92, 0.32);
  background: linear-gradient(rgba(8, 7, 5, 0.6), rgba(8, 7, 5, 0.95)); }
#towerui .t2-foot button { height: 34px; padding: 0 14px; border: 0; border-radius: 4px; cursor: pointer; font: 700 14px Mali, sans-serif; color: #f0deb0; background: rgba(214, 176, 92, 0.1); box-shadow: inset 0 0 0 1px rgba(214, 176, 92, 0.5); display: flex; align-items: center; gap: 8px; }
#towerui .t2-foot button:hover, #towerui .t2-foot button:focus-visible { background: rgba(214, 176, 92, 0.22); }
#towerui .t2-all i { width: 12px; height: 12px; transform: rotate(45deg); border: 2px solid #c9a24a; border-radius: 2px; }
#towerui .t2-rk { margin-left: auto; }

/* ---- ดูรางวัลทั้งหมด / the ranking ---- */
#towerui .t2-modal { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; background: rgba(4, 3, 2, 0.72); }
#towerui .t2-mbox { width: min(1040px, 94%); max-height: 90%; display: flex; flex-direction: column; border-radius: 6px; background: linear-gradient(#1c1710, #0f0c08); box-shadow: inset 0 0 0 1px rgba(214, 176, 92, 0.55), 0 12px 40px rgba(0, 0, 0, 0.7); }
#towerui .t2-mbox header { flex: none; display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 14px; border-bottom: 1px solid rgba(214, 176, 92, 0.35); }
#towerui .t2-mtabs { display: flex; gap: 6px; }
#towerui .t2-mtabs button { height: 34px; padding: 0 16px; border: 0; border-radius: 4px; cursor: pointer; font: 700 15px Mali, sans-serif; color: #cdb784; background: transparent; box-shadow: inset 0 0 0 1px rgba(214, 176, 92, 0.3); }
#towerui .t2-mtabs button.on { color: #2a1806; background: linear-gradient(#ffe7a6, #d6a63c); }
#towerui .t2-mbox header .t2-x { margin-left: auto; }
#towerui .t2-mbody { flex: 1; min-height: 0; overflow-y: auto; padding: 6px 18px 18px; }
#towerui .t2-mbody h4 { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; margin: 14px 0 8px; font: 800 17px Mali, sans-serif; color: #f3e2b0; }
#towerui .t2-mbody h4 small { font: 500 12.5px Mali, sans-serif; color: #b7a582; }
#towerui .t2-bosses { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
#towerui .t2-bosses li { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 4px; background: rgba(214, 176, 92, 0.06); box-shadow: inset 0 0 0 1px rgba(214, 176, 92, 0.2); }
#towerui .t2-bosses li > b { flex: none; width: 64px; font: 800 14px Mali, sans-serif; color: #f0deb0; }
#towerui .t2-bosses li > span { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
#towerui .t2-bosses li .t2-cash { margin-left: auto; }
#towerui .t2-bosses li > em { flex: none; min-width: 64px; text-align: right; font: 700 13px Mali, sans-serif; font-style: normal; color: #9c8a66; }
#towerui .t2-bosses li.got > em { color: #e6c46a; }
#towerui .t2-bosses li.got > span { opacity: 0.6; }
#towerui .t2-bosses li.next { box-shadow: inset 0 0 0 2px #f2c14e; }
#towerui .t2-bosses li.next > em { color: #9fe8ff; }
/* the five themes: four floors and the top one as small framed rows */
#towerui .t2-themes { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
#towerui .t2-themes > li { padding: 8px 10px; border-radius: 4px; background: rgba(214, 176, 92, 0.06); box-shadow: inset 0 0 0 1px rgba(214, 176, 92, 0.2); }
#towerui .t2-th { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; margin-bottom: 6px; }
#towerui .t2-th b { font: 800 15px Mali, sans-serif; color: #f0deb0; }
#towerui .t2-th small { font: 500 12.5px Mali, sans-serif; color: #b7a582; }
#towerui .t2-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
#towerui .t2-mini { display: flex; flex-direction: column; gap: 3px; }
#towerui .t2-mini > small { font: 700 11.5px Mali, sans-serif; color: #cdb784; }
#towerui .t2-mini.got > small { color: #e6c46a; }
#towerui .t2-mini.got > small::after { content: ' ✓'; }
#towerui .t2-mini > span { display: flex; gap: 4px; }
#towerui .t2-to { align-self: center; font: 800 16px Fredoka, sans-serif; font-style: normal; color: #8a7a58; }
#towerui .t2-sum { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
#towerui .t2-big { display: flex; align-items: center; gap: 8px; padding: 6px 14px 6px 8px; border-radius: 6px; background: #090806; box-shadow: inset 0 0 0 1px rgba(214, 176, 92, 0.45); }
#towerui .t2-big img { width: 28px; height: 28px; object-fit: contain; }
#towerui .t2-big b { font: 800 16px Fredoka, Mali, sans-serif; color: #fff; }
#towerui .t2-sumr { display: flex; flex-wrap: wrap; gap: 6px; }
#towerui .t2-mnote { margin: 12px 0 0; font: 500 12.5px/1.5 Mali, sans-serif; color: #a8946a; }
#towerui .t2-rank { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; max-width: 560px; }
#towerui .t2-rank li { display: flex; align-items: center; gap: 12px; padding: 7px 12px; border-radius: 4px; background: rgba(214, 176, 92, 0.06); box-shadow: inset 0 0 0 1px rgba(214, 176, 92, 0.2); font: 600 15px Mali, sans-serif; }
#towerui .t2-rank li.me { box-shadow: inset 0 0 0 2px #f2c14e; }
#towerui .t2-rank li > b { width: 28px; font: 800 17px Fredoka, sans-serif; color: #f2c14e; text-align: center; }
#towerui .t2-rank li small { color: #a8946a; }
#towerui .t2-rank li em { margin-left: auto; font: 700 15px Mali, sans-serif; font-style: normal; color: #ffe39a; }
#towerui .t2-rank li.none { color: #a8946a; }

/* a small card for the chest / special piece / mount slots, and the page's own toast */
#towerui .t2-pop { position: absolute; z-index: 6; width: 260px; padding: 10px 12px; border-radius: 6px; background: #120f0a; box-shadow: inset 0 0 0 1px #c9a24a, 0 8px 24px rgba(0, 0, 0, 0.7); }
#towerui .t2-pop b { display: block; font: 800 14px Mali, sans-serif; color: #ffe1a1; }
#towerui .t2-pop small { display: block; margin-top: 4px; font: 500 12.5px/1.45 Mali, sans-serif; color: #d2c4a2; }
#towerui .t2-say { position: absolute; left: 50%; top: 76px; z-index: 7; transform: translateX(-50%); padding: 9px 18px; border-radius: 6px; background: #120f0a; box-shadow: inset 0 0 0 1px #c9a24a; font: 700 15px Mali, sans-serif; color: #ffe1a1; white-space: nowrap; }
#towerui .t2-say.in { animation: t2Say 0.25s ease-out; }
@keyframes t2Say { from { opacity: 0; transform: translate(-50%, -6px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---- a phone: one column that scrolls (the picture, the panel, the lore, the floors) ---- */
#towerui.t2-narrow .t2-top { height: 52px; gap: 8px; padding: 0 6px 0 10px; }
#towerui.t2-narrow .t2-title img { width: 34px; height: 34px; }
#towerui.t2-narrow .t2-title b { font-size: 19px; }
#towerui.t2-narrow .t2-title small, #towerui.t2-narrow .t2-cur { display: none; }
#towerui.t2-narrow .t2-prog { margin-left: auto; }
#towerui.t2-narrow .t2-prog i { display: none; }
#towerui.t2-narrow .t2-prog span { font-size: 13px; }
#towerui.t2-narrow .t2-body { overflow-y: auto; display: flex; flex-direction: column; --lw: 0px; --sw: 0px; }
#towerui.t2-narrow .t2-hero { position: relative; left: 0; flex: none; height: auto; }
#towerui.t2-narrow .t2-art { position: relative; right: auto; height: 300px; }
#towerui.t2-narrow .t2-art::after { height: 22%; }
#towerui.t2-narrow .t2-name { position: relative; right: auto; bottom: auto; margin-top: -26px; padding-bottom: 8px; }
#towerui.t2-narrow .t2-name b { font-size: 34px; }
#towerui.t2-narrow .t2-name span { font-size: 15px; }
#towerui.t2-narrow .t2-mob { width: 36px; height: 36px; }
#towerui.t2-narrow .t2-mob img { width: 30px; height: 30px; }
#towerui.t2-narrow .t2-side { position: relative; width: auto; flex: none; padding: 10px 12px; background: #0b0907; order: 2; }
#towerui.t2-narrow .t2-lore { order: 2; }
#towerui.t2-narrow .t2-lore p { font-size: 13px; }
#towerui.t2-narrow .t2-panel { order: 1; margin-top: 0; }
#towerui.t2-narrow .t2-list { position: relative; width: auto; flex: none; overflow: visible; order: 3; padding: 8px 8px 8px 30px; bottom: auto; }
#towerui.t2-narrow .t2-foot { position: sticky; right: auto; bottom: 0; order: 4; flex: none; z-index: 2; }
#towerui.t2-narrow .t2-mbox { width: 96%; max-height: 92%; }
#towerui.t2-narrow .t2-mbody { padding: 4px 10px 14px; }
#towerui.t2-narrow .t2-bosses li { flex-wrap: wrap; }
#towerui.t2-narrow .t2-bosses li .t2-cash { margin-left: 0; }
#towerui.t2-narrow .t2-say { white-space: normal; width: 90%; text-align: center; }

/* ---- the floor card (js/content.js towerCardHtml, 2026-10-19, the user: "แก้ ui หน่อยครับมันยังไม่สวยและดูใหญ่เกินไป"):
   a small obsidian card under the run bar, the fight stays in sight. The title sits on the forge's winged banner
   (fx_fg_banner, Codex) with its star burst behind; the reward kind is a small tag; EXP / gold / the things share ONE row
   of MIR4 plates (assets/ui_slot_mir4) with the count on each (a tap: the thing's card); ชั้นถัดไป gold, ปิด dark. Text
   is crisp: at most a 1px dark ring, no glow. ---- */
#tw-card.tw2 { top: 112px; animation: tw2In 0.3s cubic-bezier(.2, 1.3, .4, 1) both; }
@keyframes tw2In { from { opacity: 0; transform: translate(-50%, -10px) scale(0.94); } to { opacity: 1; transform: translate(-50%, 0) scale(1); } }
#tw-card.tw2 .tw2-in { pointer-events: auto; position: relative; box-sizing: border-box; width: min(372px, calc(100vw - 24px)); display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 0 14px 11px; border-radius: 10px; overflow: visible; color: #efe6d2; text-align: center; font-family: Mali, var(--thai), sans-serif;
  background: linear-gradient(180deg, rgba(29, 24, 17, 0.97), rgba(11, 9, 7, 0.97)); border: 1px solid rgba(214, 176, 92, 0.7);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.55), 0 10px 26px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 232, 170, 0.1); }
/* the banner + the star burst */
#tw-card.tw2 .tw2-head { position: relative; flex: none; width: 320px; max-width: calc(100% + 20px); aspect-ratio: 4 / 1; margin: -34px 0 -6px; display: grid; place-items: center; padding-top: 3%; box-sizing: border-box; z-index: 0; }
#tw-card.tw2 .tw2-head::before { content: ''; position: absolute; inset: 0; z-index: 0; background: url(../assets/fx/forge/fx_fg_banner.png) center / 100% 100% no-repeat; }
#tw-card.tw2 .tw2-burst { position: absolute; left: 50%; top: 36%; width: 116px; height: 116px; margin: -58px 0 0 -58px; z-index: -1; pointer-events: none;
  animation: tw2Burst 0.7s ease-out both, tw2Spin 24s linear 0.7s infinite; }
@keyframes tw2Burst { from { opacity: 0; transform: scale(0.3) rotate(-30deg); } 60% { opacity: 1; transform: scale(1.12); } to { opacity: 0.85; transform: scale(1); } }
@keyframes tw2Spin { from { transform: rotate(0); } to { transform: rotate(360deg); } }
#tw-card.tw2 .tw2-title { position: relative; z-index: 1; max-width: 64%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 800 21px/1.25 Mali, var(--thai), sans-serif; letter-spacing: 0.3px;
  color: #ffe08a; text-shadow: 1px 0 0 #2a1806, -1px 0 0 #2a1806, 0 1px 0 #2a1806, 0 -1px 0 #2a1806; }
#tw-card.tw2.big .tw2-title { color: #ffd0a0; }
/* the reward kind (everything under the banner sits above the star's rays) */
#tw-card.tw2 .tw2-in > :not(.tw2-head):not(.tw2-time) { position: relative; z-index: 1; }
#tw-card.tw2 .tw2-tag { flex: none; padding: 1px 10px; border-radius: 99px; font: 700 11.5px/1.5 Mali, var(--thai), sans-serif; font-style: normal; color: #f3dca0;
  background: #2a2317; box-shadow: inset 0 0 0 1px rgba(214, 176, 92, 0.55); }
#tw-card.tw2 .tag-boss .tw2-tag, #tw-card.tw2 .tag-top .tw2-tag { color: #ffd1c2; background: #3a1d16; box-shadow: inset 0 0 0 1px rgba(255, 140, 110, 0.6); }
#tw-card.tw2 .tag-again .tw2-tag { color: #c9d6e2; background: #1f2328; box-shadow: inset 0 0 0 1px rgba(160, 190, 220, 0.4); }
#tw-card.tw2 .tag-held .tw2-tag { color: #ffd59a; background: #33240f; box-shadow: inset 0 0 0 1px rgba(240, 160, 60, 0.6); }
/* one row of plates: EXP, gold, the things */
#tw-card.tw2 .tw2-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; max-width: 100%; }
#tw-card.tw2 .tw2-sl { position: relative; flex: none; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 9%; cursor: default;
  background: url(../assets/ui_slot_mir4/slot_g0.png) center / 100% 100% no-repeat; opacity: 0; animation: tw2Pop 0.32s cubic-bezier(.2, 1.5, .4, 1) var(--d, 0s) forwards; }
@keyframes tw2Pop { from { opacity: 0; transform: translateY(5px) scale(0.7); } to { opacity: 1; transform: none; } }
#tw-card.tw2 .tw2-sl.g1 { background-image: url(../assets/ui_slot_mir4/slot_g1.png); }
#tw-card.tw2 .tw2-sl.g2 { background-image: url(../assets/ui_slot_mir4/slot_g2.png); }
#tw-card.tw2 .tw2-sl.g3 { background-image: url(../assets/ui_slot_mir4/slot_g3.png); }
#tw-card.tw2 .tw2-sl.g4 { background-image: url(../assets/ui_slot_mir4/slot_g4.png); }
#tw-card.tw2 .tw2-sl.g5 { background-image: url(../assets/ui_slot_mir4/slot_g5.png); }
#tw-card.tw2 .tw2-sl.xp, #tw-card.tw2 .tw2-sl.gold { background-image: url(../assets/ui_slot_mir4/slot_empty.png); box-shadow: inset 0 0 0 1px rgba(214, 176, 92, 0.45); }
#tw-card.tw2 .tw2-sl[data-info], #tw-card.tw2 .tw2-sl[data-twu] { cursor: pointer; }
#tw-card.tw2 .tw2-sl[data-info]:hover, #tw-card.tw2 .tw2-sl[data-twu]:hover, #tw-card.tw2 .tw2-sl:focus-visible { filter: brightness(1.15); outline: none; }
#tw-card.tw2 .tw2-sl img { width: 74%; height: 74%; object-fit: contain; margin-top: -4px; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.45)); }
#tw-card.tw2 .tw2-sl.gold img { width: 60%; height: 60%; margin-top: -10px; }
#tw-card.tw2 .tw2-xp { margin-top: -12px; font: 800 15px/1 Fredoka, sans-serif; font-style: normal; letter-spacing: 0.6px; color: #d9ccff; }
#tw-card.tw2 .tw2-sl b { position: absolute; right: 4px; bottom: 2px; font: 700 12px/1 Fredoka, sans-serif; color: #fff; font-variant-numeric: tabular-nums;
  text-shadow: 1px 0 0 #000, -1px 0 0 #000, 0 1px 0 #000, 0 -1px 0 #000; }
#tw-card.tw2 .tw2-sl.xp b, #tw-card.tw2 .tw2-sl.gold b { left: 0; right: 0; bottom: 4px; text-align: center; font-size: 12.5px; }
#tw-card.tw2 .tw2-sl.xp b { color: #c8f5b0; }
#tw-card.tw2 .tw2-sl.gold b { color: #ffe08a; }
#tw-card.tw2 .tw2-pvp { position: absolute; left: 50%; top: -5px; transform: translateX(-50%); padding: 0 4px; border-radius: 4px; background: #8a1a14; color: #fff; font: 800 9px/1.4 Fredoka, sans-serif; font-style: normal; }
#tw-card.tw2 .tw2-luck { position: absolute; left: 2px; top: 0; font-style: normal; font-size: 13px; color: #ffe27a; text-shadow: 1px 1px 0 #3a2410; }
/* a note (a full bag) */
#tw-card.tw2 .tw2-note { margin: 0; display: flex; align-items: center; gap: 8px; width: 100%; box-sizing: border-box; padding: 6px 10px; border-radius: 6px; text-align: left;
  font: 600 12px/1.35 Mali, var(--thai), sans-serif; color: #ecdcb8; background: rgba(0, 0, 0, 0.3); border-left: 3px solid #d9a443; }
#tw-card.tw2 .tw2-note img { width: 24px; height: 24px; flex: none; object-fit: contain; }
/* the buttons, the hint, the auto climb's run-out bar */
#tw-card.tw2 .tw2-btns { display: flex; justify-content: center; gap: 8px; margin-top: 2px; }
#tw-card.tw2 .tw2-btns button { height: 34px; padding: 0 16px; border-radius: 5px; cursor: pointer; font: 800 14.5px Mali, var(--thai), sans-serif; text-shadow: none !important; }
#tw-card.tw2 .tw2-go { min-width: 128px; border: 0; color: #2a1806 !important; background: linear-gradient(#ffe7a6, #e2b04d 48%, #b07a26);
  box-shadow: inset 0 0 0 1px #fff2c8, 0 0 0 1px #6a4a14, 0 3px 8px rgba(0, 0, 0, 0.45); }
#tw-card.tw2 .tw2-ok { min-width: 84px; border: 1px solid #6b5a3a; color: #e6d3a3 !important; background: linear-gradient(#2c2620, #1d1914); font-weight: 700; }
#tw-card.tw2 .tw2-btns button:hover, #tw-card.tw2 .tw2-btns button:focus-visible { filter: brightness(1.12); outline: none; }
#tw-card.tw2 .tw2-btns button:active { transform: translateY(1px); }
#tw-card.tw2 .tw2-hint { margin-top: -3px; font: 600 11.5px/1.3 Mali, var(--thai), sans-serif; color: #a9c7d8; opacity: 1; }
#tw-card.tw2 .tw2-time { position: absolute; left: 10px; right: 10px; bottom: 0; height: 2px; border-radius: 2px; background: linear-gradient(90deg, #f2c14e, #ffe7a6); transform-origin: 0 50%; animation: tw2Time 2.6s linear both; }
@keyframes tw2Time { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@media (prefers-reduced-motion: reduce) {
  #tw-card.tw2, #tw-card.tw2 .tw2-burst, #tw-card.tw2 .tw2-sl { animation: none; opacity: 1; }
  #tw-card.tw2 .tw2-burst { opacity: 0.85; }
}
@media (max-width: 760px) { #tw-card.tw2 { top: 124px; } }
/* a phone: a little smaller, still one row for the usual 3-6 things */
@media (max-width: 560px) {
  #tw-card.tw2 { top: 128px; }
  #tw-card.tw2 .tw2-head { width: 280px; margin-top: -30px; }
  #tw-card.tw2 .tw2-burst { width: 100px; height: 100px; margin: -50px 0 0 -50px; }
  #tw-card.tw2 .tw2-title { font-size: 18px; }
  #tw-card.tw2 .tw2-sl { width: 46px; height: 46px; }
  #tw-card.tw2 .tw2-sl b { font-size: 11px; }
  #tw-card.tw2 .tw2-sl.xp b, #tw-card.tw2 .tw2-sl.gold b { font-size: 11px; bottom: 3px; }
  #tw-card.tw2 .tw2-xp { font-size: 13px; }
}
/* a short screen (a phone on its side): tight under the bar */
@media (max-height: 480px) {
  #tw-card.tw2 { top: 96px; }
  #tw-card.tw2 .tw2-in { gap: 5px; padding-bottom: 8px; width: min(340px, calc(100vw - 24px)); }
  #tw-card.tw2 .tw2-head { width: 250px; margin-top: -26px; }
  #tw-card.tw2 .tw2-burst { width: 90px; height: 90px; margin: -45px 0 0 -45px; }
  #tw-card.tw2 .tw2-title { font-size: 16.5px; }
  #tw-card.tw2 .tw2-sl { width: 42px; height: 42px; }
  #tw-card.tw2 .tw2-sl b, #tw-card.tw2 .tw2-sl.xp b, #tw-card.tw2 .tw2-sl.gold b { font-size: 10.5px; bottom: 2px; }
  #tw-card.tw2 .tw2-xp { font-size: 12px; }
  #tw-card.tw2 .tw2-btns button { height: 30px; font-size: 13.5px; }
  #tw-card.tw2 .tw2-hint { display: none; }
}
