/* DUO 증강 2048 (2026-11-18) — js/2048/ttfe-main.js 와 짝 */
:root {
  --tt-bg: #141022; --tt-bg2: #1d1730; --tt-panel: #221b36; --tt-line: #3a2f57; --tt-ink: #f4efff; --tt-mut: #a99fc2;
  --tt-gold: #ffcc3d; --tt-acc: #7c5cff; --tt-ok: #3ddc97; --tt-bad: #ff5d73;
  --tt-board: #2a2142; --tt-cell: #362b55; --tt-gap: 2.6%;
  --tt-dur: 110ms;
}
body.tt-body { background: radial-gradient(1200px 600px at 50% -10%, #2b1f4d 0%, var(--tt-bg) 60%) fixed, var(--tt-bg); color: var(--tt-ink); min-height: 100vh; }
body.tt-fast { --tt-dur: 70ms; }
#ttApp { max-width: 1280px; margin: 0 auto; padding: 14px 16px 24px; box-sizing: border-box; }
.tt-scr { display: none; } .tt-scr.active { display: block; }
.tt-muted { color: var(--tt-mut); font-size: 13px; }
.tt-err { color: var(--tt-bad); text-align: center; min-height: 1.2em; font-weight: 700; }
.hidden { display: none !important; }
.tt-body [hidden] { display: none !important; }
.tt-solo-opts { max-width: 720px; margin: 14px auto 0; padding: 12px 14px; }
.tt-best-line { text-align: center; color: var(--px-cream, #fff7e8); font-family: var(--px-font, inherit); margin: 8px 0 0; font-size: 14px; }

/* 버튼·패널 */
.tt-btn { font: inherit; font-weight: 800; color: var(--tt-ink); background: #2f2650; border: 1px solid #4a3d75; border-radius: 12px; padding: 10px 16px; cursor: pointer; transition: transform .12s, filter .12s, background .12s; }
.tt-btn:hover:not(:disabled) { filter: brightness(1.15); transform: translateY(-1px); }
.tt-btn:disabled { opacity: .5; cursor: default; }
.tt-btn.sm { padding: 6px 11px; font-size: 13px; border-radius: 10px; }
.tt-btn.lg { padding: 13px 26px; font-size: 17px; }
.tt-btn.gold { background: linear-gradient(180deg, #ffd85a, #f2a91f); color: #2a1a00; border-color: #ffe08a; }
.tt-panel { background: var(--tt-panel); border: 1px solid var(--tt-line); border-radius: 16px; padding: 12px 14px; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); }
.tt-panel h3 { margin: 0 0 10px; font-size: 15px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.tt-check { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; margin: 10px 0; cursor: pointer; line-height: 1.4; }
.tt-check.strong { font-weight: 800; }
.tt-check input { margin-top: 3px; }
.tt-opt { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 10px 0; font-size: 14px; }
.tt-opt select, .tt-in { font: inherit; background: #15102a; color: var(--tt-ink); border: 1px solid var(--tt-line); border-radius: 9px; padding: 6px 9px; }

/* 대기실 */
.tt-lobby { max-width: 1100px; margin: 0 auto; }
.tt-lobby-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.tt-lobby-head h2 { margin: 0; font-size: 24px; }
.tt-code-card { display: flex; align-items: center; gap: 10px; background: var(--tt-panel); border: 1px solid var(--tt-line); border-radius: 14px; padding: 8px 12px; flex-wrap: wrap; }
.tt-code-label { font-size: 12px; color: var(--tt-mut); }
.tt-code { font: inherit; font-size: 22px; font-weight: 900; letter-spacing: 4px; background: #15102a; color: var(--tt-gold); border: 1px dashed #5a4a8a; border-radius: 10px; padding: 4px 12px; cursor: pointer; }
.tt-code-btns { display: flex; gap: 6px; }
.tt-lobby-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.tt-modes { display: grid; gap: 8px; }
.tt-mode { font: inherit; text-align: left; color: var(--tt-ink); background: #1a1430; border: 2px solid var(--tt-line); border-radius: 12px; padding: 10px 12px; cursor: pointer; display: grid; gap: 3px; }
.tt-mode span { font-size: 12px; color: var(--tt-mut); }
.tt-mode.on { border-color: var(--tt-gold); box-shadow: 0 0 0 3px rgba(255, 204, 61, .18); }
.tt-mode:disabled { cursor: default; }
.tt-roster { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; max-height: 380px; overflow: auto; }
.tt-roster li { display: flex; align-items: center; gap: 7px; background: #1a1430; border-radius: 10px; padding: 6px 8px; font-size: 13px; min-width: 0; }
.tt-roster li.dc { opacity: .5; }
.tt-roster li.empty { opacity: .35; border: 1px dashed var(--tt-line); background: transparent; }
.tt-roster .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tt-roster em { color: var(--tt-gold); font-style: normal; font-size: 11px; }
.tt-roster small { color: var(--tt-mut); font-size: 10px; }
.tt-kick { background: none; border: 0; color: var(--tt-bad); cursor: pointer; font-weight: 900; }
.tt-av { width: 26px; height: 26px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 900; color: #fff; object-fit: cover; }
.tt-spect { font-size: 13px; color: var(--tt-mut); margin-top: 8px; }
.tt-rule-box { margin-top: 10px; font-size: 13px; color: #d9d0ef; background: #1a1430; border-radius: 10px; padding: 8px 12px; }
.tt-rule-box ul { margin: 6px 0 0; padding-left: 18px; } .tt-rule-box li { margin: 3px 0; }
.tt-lobby-actions { display: flex; justify-content: center; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.tt-stream-box { margin-top: 12px; border-top: 1px dashed var(--tt-line); padding-top: 8px; }
.tt-st-plat { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; }
.tt-seg { display: inline-flex; border: 1px solid var(--tt-line); border-radius: 9px; overflow: hidden; }
.tt-seg button { font: inherit; font-size: 12px; background: #1a1430; color: var(--tt-ink); border: 0; padding: 5px 10px; cursor: pointer; }
.tt-seg button.on { background: var(--tt-acc); }
.tt-st-rules .row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 5px 0; font-size: 13px; }
.tt-st-rules input { width: 86px; font: inherit; background: #15102a; color: var(--tt-ink); border: 1px solid var(--tt-line); border-radius: 8px; padding: 4px 6px; }
.tt-st-rules select { font: inherit; font-size: 12px; background: #15102a; color: var(--tt-ink); border: 1px solid var(--tt-line); border-radius: 8px; padding: 3px; }
.tt-link-st { font-size: 12px; color: var(--tt-mut); } .tt-link-st.connected { color: var(--tt-ok); } .tt-link-st.error { color: var(--tt-bad); }
.tt-donlog { font-size: 12px; color: #d9d0ef; margin-top: 8px; display: grid; gap: 3px; max-height: 140px; overflow: auto; }
.tt-donlog small { color: var(--tt-mut); }

/* 게임 화면 */
.tt-hud { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.tt-hud-l, .tt-hud-r { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.tt-chip { font-size: 13px; font-weight: 800; padding: 5px 10px; border-radius: 99px; background: #2a2145; border: 1px solid var(--tt-line); }
.tt-spect-chip { background: #3a2a10; border-color: #8a6a20; }
.tt-icon { font-size: 18px; background: #2a2145; border: 1px solid var(--tt-line); border-radius: 10px; width: 40px; height: 40px; cursor: pointer; color: var(--tt-ink); }
.tt-icon.on { background: var(--tt-acc); }
.tt-clock { display: flex; align-items: center; gap: 6px; font-size: 24px; font-weight: 900; padding: 4px 16px; border-radius: 14px; background: #15102a; border: 2px solid var(--tt-line); font-variant-numeric: tabular-nums; }
.tt-clock.warn { border-color: var(--tt-bad); color: #ffb3bf; animation: ttPulse 1s infinite; }
.tt-clock.prep { border-color: var(--tt-gold); color: var(--tt-gold); }
.tt-main { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.tt-play { display: flex; flex-direction: column; align-items: center; gap: 10px; min-width: 0; }
.tt-scores { display: flex; gap: 8px; width: min(100%, 500px); }
.tt-sbox { flex: 1; position: relative; background: #2a2145; border-radius: 12px; padding: 6px 10px; text-align: center; border: 1px solid var(--tt-line); min-width: 0; }
.tt-sbox small { display: block; font-size: 11px; color: var(--tt-mut); font-weight: 700; }
.tt-sbox b { font-size: 22px; font-variant-numeric: tabular-nums; }
.tt-sbox i { position: absolute; right: 8px; top: 2px; font-style: normal; font-weight: 900; color: var(--tt-ok); opacity: 0; pointer-events: none; }
.tt-sbox i.show { animation: ttGain .7s ease-out; }
.tt-buffs { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; min-height: 0; }
.tt-buff { font-size: 12px; font-weight: 800; padding: 3px 9px; border-radius: 99px; background: #3a1f10; border: 1px solid #ff8a3c; color: #ffd0a8; }
.tt-buff.god { background: #3d2a00; border-color: var(--tt-gold); color: #ffe9a8; box-shadow: 0 0 12px rgba(255, 204, 61, .4); }
.tt-buff.exp { background: #102a3d; border-color: #2ec4f1; color: #bfeeff; }

/* 판 */
.tt-board-wrap { position: relative; width: min(100%, 500px); touch-action: none; user-select: none; -webkit-user-select: none; }
.tt-board { position: relative; width: 100%; aspect-ratio: 1; background: linear-gradient(160deg, #2f2550, var(--tt-board)); border-radius: 18px; box-shadow: 0 0 0 3px #3d3166, 0 16px 40px rgba(0, 0, 0, .45), inset 0 2px 0 rgba(255, 255, 255, .06); overflow: hidden; --n: 4; --cs: calc((100% - (var(--n) + 1) * var(--tt-gap)) / var(--n)); }
.tt-board.expanded { box-shadow: 0 0 0 3px #2ec4f1, 0 0 40px rgba(46, 196, 241, .45), 0 16px 40px rgba(0, 0, 0, .45); }
.tt-board.frenzy { box-shadow: 0 0 0 3px #ff8a3c, 0 0 36px rgba(255, 138, 60, .5), 0 16px 40px rgba(0, 0, 0, .45); }
.tt-board.god { box-shadow: 0 0 0 3px var(--tt-gold), 0 0 48px rgba(255, 204, 61, .65), 0 16px 40px rgba(0, 0, 0, .45); }
.tt-cells, .tt-tiles { position: absolute; inset: 0; }
.tt-cell, .tt-tile { position: absolute; width: var(--cs); height: var(--cs); left: calc(var(--tt-gap) + var(--c) * (var(--cs) + var(--tt-gap))); top: calc(var(--tt-gap) + var(--r) * (var(--cs) + var(--tt-gap))); border-radius: 10%; box-sizing: border-box; }
.tt-cell { background: var(--tt-cell); box-shadow: inset 0 2px 6px rgba(0, 0, 0, .25); }
.tt-board.targeting .tt-cell { cursor: crosshair; }
.tt-cell.can { box-shadow: inset 0 0 0 3px rgba(124, 92, 255, .7); }
.tt-cell.sel { box-shadow: inset 0 0 0 4px var(--tt-gold), 0 0 16px rgba(255, 204, 61, .6); }
.tt-tile { display: flex; align-items: center; justify-content: center; font-family: "Black Han Sans", "Jua", sans-serif; font-weight: 400; color: #2a1f3d; pointer-events: none; transition: left var(--tt-dur) ease-out, top var(--tt-dur) ease-out; will-change: left, top; z-index: 2; font-size: calc(var(--fs, 1) * min(9vw, 44px)); background: var(--bg); box-shadow: 0 4px 0 rgba(0, 0, 0, .18), inset 0 -4px 0 rgba(0, 0, 0, .12), inset 0 2px 0 rgba(255, 255, 255, .35); text-shadow: 0 1px 0 rgba(255, 255, 255, .25); }
.tt-board[style*="--n: 5"] .tt-tile, .tt-board.n5 .tt-tile { font-size: calc(var(--fs, 1) * min(7.2vw, 35px)); }
.tt-tile[data-d="3"] { --fs: .82; } .tt-tile[data-d="4"] { --fs: .66; } .tt-tile[data-d="5"] { --fs: .54; } .tt-tile[data-d="6"] { --fs: .45; }
.tt-tile.new { animation: ttAppear calc(var(--tt-dur) * 1.8) ease-out both; animation-delay: var(--tt-dur); }
.tt-tile.merged { animation: ttPop calc(var(--tt-dur) * 2) ease-out both; z-index: 3; }
.tt-tile.sink { z-index: 1; }
.tt-tile.fx-pop { animation: ttVanish .35s ease-in forwards; }
.tt-tile.fx-grow { animation: ttPop .4s ease-out; }
.tt-tile.fx-morph { animation: ttMorph .45s ease-out; }
.tt-tile.fx-dup { animation: ttDup .45s ease-out; }
.tt-tile.fx-tele { animation: ttTele .4s ease-out; }
.tt-tile.fx-shuffle { animation: ttShuffle .5s ease-out; }
.tt-tile.v2 { --bg: linear-gradient(160deg, #fbf7ef, #e9e1d2); }
.tt-tile.v4 { --bg: linear-gradient(160deg, #fbe8bd, #efd08d); }
.tt-tile.v8 { --bg: linear-gradient(160deg, #ffc387, #ff9f4a); color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, .18); }
.tt-tile.v16 { --bg: linear-gradient(160deg, #ffa077, #ff7448); color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, .18); }
.tt-tile.v32 { --bg: linear-gradient(160deg, #ff8686, #f24d5c); color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, .2); }
.tt-tile.v64 { --bg: linear-gradient(160deg, #ff6a95, #e82765); color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, .2); }
.tt-tile.v128 { --bg: linear-gradient(160deg, #ffe16b, #f7b928); color: #4a2d00; box-shadow: 0 0 18px rgba(255, 210, 63, .55), 0 4px 0 rgba(0, 0, 0, .18), inset 0 -4px 0 rgba(0, 0, 0, .1); }
.tt-tile.v256 { --bg: linear-gradient(160deg, #c3f07d, #79c93b); color: #173000; box-shadow: 0 0 20px rgba(155, 225, 93, .55), 0 4px 0 rgba(0, 0, 0, .18); }
.tt-tile.v512 { --bg: linear-gradient(160deg, #7ef0c2, #23b884); color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, .2); box-shadow: 0 0 22px rgba(61, 220, 151, .6), 0 4px 0 rgba(0, 0, 0, .18); }
.tt-tile.v1024 { --bg: linear-gradient(160deg, #78ddff, #1d9fd8); color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, .2); box-shadow: 0 0 26px rgba(46, 196, 241, .65), 0 4px 0 rgba(0, 0, 0, .18); }
.tt-tile.v2048 { --bg: linear-gradient(160deg, #a58bff, #6a3cf0); color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, .25); box-shadow: 0 0 34px rgba(124, 92, 255, .85), 0 4px 0 rgba(0, 0, 0, .18); animation: ttGlow 2s ease-in-out infinite; }
.tt-tile.v4096 { --bg: linear-gradient(160deg, #e48bff, #a325d8); color: #fff; box-shadow: 0 0 36px rgba(200, 75, 255, .85); }
.tt-tile.vbig { --bg: linear-gradient(160deg, #2a2a3a, #0e0e16); color: #fff; box-shadow: 0 0 0 3px #ff6bd5, 0 0 36px rgba(255, 107, 213, .7); }
.tt-tile.gold::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 4px #ffd84a, 0 0 18px rgba(255, 216, 74, .9); background: linear-gradient(115deg, transparent 30%, rgba(255, 246, 200, .7) 45%, transparent 60%) 0 0 / 250% 100%; animation: akShine 1.8s linear infinite; pointer-events: none; }
.tt-tile.gold::before { content: "★"; position: absolute; top: 4%; right: 8%; font-size: 30%; color: #ffd84a; text-shadow: 0 0 6px #000; }
.tt-tile.hint-glow { box-shadow: 0 0 0 3px #5ee6ff, 0 0 18px rgba(94, 230, 255, .8); }
.tt-hint { position: absolute; z-index: 4; font-size: 54px; color: rgba(94, 230, 255, .85); text-shadow: 0 0 16px rgba(94, 230, 255, .8); pointer-events: none; animation: ttHint 1.2s ease-in-out infinite; }
.tt-hint[data-d="0"] { left: 50%; top: 4%; transform: translateX(-50%); } .tt-hint[data-d="1"] { right: 2%; top: 50%; transform: translateY(-50%); }
.tt-hint[data-d="2"] { left: 50%; bottom: 4%; transform: translateX(-50%); } .tt-hint[data-d="3"] { left: 2%; top: 50%; transform: translateY(-50%); }
.tt-boomfx { position: absolute; z-index: 6; pointer-events: none; border-radius: 50%; background: radial-gradient(circle, #fff6c8 0%, #ffb24a 35%, rgba(255, 90, 40, .6) 60%, transparent 72%); animation: ttBoom .5s ease-out forwards; }
.tt-board.shake { animation: ttShake .4s; }
.tt-board-over { position: absolute; inset: 0; z-index: 8; border-radius: 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: rgba(15, 10, 28, .74); backdrop-filter: blur(2px); text-align: center; padding: 16px; }
.tt-board-over b { font-size: 34px; font-family: "Black Han Sans", sans-serif; } .tt-board-over p { margin: 0; color: #d9d0ef; }
.tt-bigview { width: 100%; aspect-ratio: 1; border-radius: 18px; display: block; background: var(--tt-board); }
.tt-target-bar { position: absolute; left: 0; right: 0; top: -6px; transform: translateY(-100%); display: flex; gap: 8px; align-items: center; justify-content: center; background: #3a2a10; border: 1px solid var(--tt-gold); color: #ffe9a8; font-weight: 800; font-size: 13px; padding: 6px 10px; border-radius: 12px; z-index: 9; }
.tt-next { width: min(100%, 500px); font-size: 12px; color: var(--tt-mut); }
.tt-next .bar { height: 7px; background: #2a2145; border-radius: 4px; overflow: hidden; margin-top: 4px; }
.tt-next .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--tt-acc), #ff7ad9); transition: width .3s; }
.tt-augbar { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; width: min(100%, 560px); }
.tt-aug { position: relative; display: flex; align-items: center; gap: 8px; background: #241d33; border: 0; border-radius: 14px; padding: 5px 10px 5px 5px; box-shadow: inset 0 0 0 2px var(--rc); color: var(--tt-ink); font: inherit; font-size: 12px; font-weight: 800; text-align: left; max-width: 220px; }
.tt-aug .art { width: 36px; height: 36px; border-radius: 10px; overflow: hidden; flex: none; } .tt-aug .art svg { width: 100%; height: 100%; display: block; }
.tt-aug .tx { display: grid; min-width: 0; } .tt-aug .tx small { color: var(--tt-mut); font-weight: 700; font-size: 10px; }
.tt-aug .key { position: absolute; top: -6px; left: -4px; font-size: 10px; background: #000; color: #fff; border-radius: 6px; padding: 0 4px; }
.tt-aug.usable { cursor: pointer; } .tt-aug.usable:hover:not(:disabled) { transform: translateY(-2px); }
.tt-aug.armed { box-shadow: inset 0 0 0 2px #fff, 0 0 0 3px var(--rc), 0 0 18px var(--rc); }
.tt-aug:disabled, .tt-aug.spent { opacity: .45; cursor: default; }
.tt-aug .ch { background: var(--rc); color: #fff; border-radius: 8px; padding: 0 6px; font-size: 11px; margin-left: auto; }
.tt-aug.flash { animation: ttFlash .6s; }
.tt-syn { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; font-size: 12px; }
.tt-syn span { padding: 2px 8px; border-radius: 99px; background: #1a1430; border: 1px solid var(--tt-line); color: var(--tt-mut); }
.tt-syn span.on { color: #ffe9a8; border-color: var(--tt-gold); }
.tt-keys { margin: 0; }

/* 옆 패널 */
.tt-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.tt-rank { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; max-height: 300px; overflow: auto; counter-reset: none; }
.tt-rank li { display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: 6px; font-size: 13px; padding: 4px 6px; border-radius: 8px; background: #1a1430; cursor: pointer; transition: background .2s; }
.tt-rank li.me { background: #3a2a62; box-shadow: inset 0 0 0 1px var(--tt-acc); }
.tt-rank li.dead { opacity: .55; }
.tt-rank li.up { animation: ttUp .8s; }
.tt-rank .pl { font-weight: 900; text-align: center; color: var(--tt-mut); } .tt-rank li:nth-child(1) .pl { color: #ffd84a; } .tt-rank li:nth-child(2) .pl { color: #d8dbe8; } .tt-rank li:nth-child(3) .pl { color: #e89a5a; }
.tt-rank .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tt-rank .sc { font-weight: 900; font-variant-numeric: tabular-nums; }
.tt-rank small { color: var(--tt-mut); font-size: 10px; margin-left: 4px; }
.tt-minis { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.tt-mini { position: relative; background: #1a1430; border-radius: 10px; padding: 4px; cursor: pointer; border: 1px solid transparent; }
.tt-mini.focus { border-color: var(--tt-gold); }
.tt-mini canvas { width: 100%; aspect-ratio: 1; display: block; border-radius: 7px; }
.tt-mini .nm { font-size: 11px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 3px; }
.tt-mini .sc { font-size: 11px; color: var(--tt-gold); font-weight: 900; }
.tt-mini .emo { position: absolute; top: 18%; left: 50%; transform: translateX(-50%); font-size: 34px; animation: ttEmo 1.6s ease-out forwards; pointer-events: none; }
.tt-mini.dead canvas { filter: grayscale(.8) brightness(.6); }
.tt-feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; max-height: 200px; overflow: auto; font-size: 12px; }
.tt-feed li { background: #1a1430; border-radius: 8px; padding: 5px 8px; line-height: 1.35; animation: ttIn .3s; }
.tt-feed li.legendary { border-left: 3px solid #f2b02a; } .tt-feed li.epic { border-left: 3px solid #a66bff; } .tt-feed li.lead { border-left: 3px solid #ff5d73; } .tt-feed li.don { border-left: 3px solid var(--tt-ok); }
.tt-emotes { display: flex; gap: 4px; margin-top: 8px; flex-wrap: wrap; }
.tt-emotes button { font-size: 18px; background: #1a1430; border: 1px solid var(--tt-line); border-radius: 9px; padding: 3px 7px; cursor: pointer; }
.tt-solo-panel .stat { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; border-bottom: 1px dashed var(--tt-line); }
.tt-stream-panel .tt-st-btns { display: flex; flex-wrap: wrap; gap: 5px; }

/* 방송 화면 */
body.tt-cast .tt-main { grid-template-columns: minmax(0, 1fr) minmax(380px, 46%); }
body.tt-cast .tt-rank { max-height: 52vh; } body.tt-cast .tt-rank li { font-size: 17px; padding: 7px 10px; }
body.tt-cast .tt-rank .sc { font-size: 19px; }
body.tt-cast .tt-minis { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
body.tt-cast .tt-feed { font-size: 15px; max-height: 260px; }
body.tt-cast .tt-clock { font-size: 34px; }
body.tt-cast .topbar, body.tt-cast .tt-keys, body.tt-cast #ttSeo { display: none; }

/* 결과 · 모달 */
.tt-modal { position: fixed; inset: 0; z-index: 8500; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(8, 5, 18, .78); opacity: 0; transition: opacity .2s; }
.tt-modal.open { opacity: 1; } .tt-modal[hidden] { display: none; }
.tt-dialog { background: var(--tt-bg2); border: 1px solid var(--tt-line); border-radius: 18px; padding: 18px; width: min(100%, 440px); max-height: calc(100vh - 32px); overflow: auto; box-sizing: border-box; }
.tt-dialog.wide { width: min(100%, 940px); }
.tt-dialog h3 { margin: 0 0 12px; }
.tt-dialog-btns { display: flex; justify-content: center; gap: 8px; margin-top: 14px; }
.tt-set-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 8px 0; }
.tt-tabs { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.tt-tabs button { font: inherit; font-weight: 800; background: #1a1430; color: var(--tt-ink); border: 1px solid var(--tt-line); border-radius: 10px; padding: 6px 12px; cursor: pointer; }
.tt-tabs button.on { background: var(--tt-acc); border-color: var(--tt-acc); }
.tt-help-body { font-size: 14px; line-height: 1.6; }
.tt-help-body ul { padding-left: 20px; } .tt-help-body li { margin: 4px 0; }
.tt-dex-filter { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.tt-dex { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.tt-dex-card { display: grid; grid-template-columns: 54px 1fr; gap: 10px; background: #1a1430; border-radius: 12px; padding: 8px; box-shadow: inset 0 0 0 1.5px var(--rc); }
.tt-dex-card .art { width: 54px; height: 54px; border-radius: 10px; overflow: hidden; } .tt-dex-card .art svg { width: 100%; height: 100%; }
.tt-dex-card b { font-size: 14px; } .tt-dex-card p { margin: 3px 0 0; font-size: 12px; line-height: 1.45; color: #d9d0ef; }
.tt-dex-card .meta { font-size: 11px; color: var(--tt-mut); }
.tt-result { position: relative; background: var(--tt-bg2); border: 1px solid var(--tt-line); border-radius: 20px; padding: 18px; width: min(100%, 720px); max-height: calc(100vh - 32px); overflow: auto; box-sizing: border-box; text-align: center; }
.tt-confetti { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.tt-result-title { font-size: 28px; font-family: "Black Han Sans", sans-serif; margin-bottom: 8px; }
.tt-podium { display: flex; justify-content: center; align-items: flex-end; gap: 10px; margin: 6px 0 14px; }
.tt-pod { width: 120px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.tt-pod .blk { width: 100%; border-radius: 10px 10px 0 0; display: flex; align-items: flex-start; justify-content: center; font-size: 26px; font-weight: 900; padding-top: 6px; }
.tt-pod.p1 .blk { height: 90px; background: linear-gradient(180deg, #ffd84a, #c98f10); } .tt-pod.p2 .blk { height: 66px; background: linear-gradient(180deg, #e6e9f4, #9aa0b8); } .tt-pod.p3 .blk { height: 50px; background: linear-gradient(180deg, #f0a46a, #a65a20); }
.tt-pod .nm { font-weight: 800; font-size: 13px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .tt-pod .sc { color: var(--tt-gold); font-weight: 900; }
.tt-res-wrap { max-height: 38vh; overflow: auto; }
.tt-res-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.tt-res-table th, .tt-res-table td { padding: 6px; border-bottom: 1px solid var(--tt-line); text-align: left; }
.tt-res-table tr.me td { background: #3a2a62; }
.tt-res-table .augs { display: flex; gap: 2px; } .tt-res-table .augs span { width: 20px; height: 20px; border-radius: 5px; overflow: hidden; display: inline-block; } .tt-res-table .augs svg { width: 100%; height: 100%; }
.tt-result-btns { display: flex; justify-content: center; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.tt-win { text-align: center; } .tt-win-tile { width: 120px; height: 120px; margin: 0 auto 10px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-family: "Black Han Sans", sans-serif; font-size: 40px; color: #fff; background: linear-gradient(160deg, #a58bff, #6a3cf0); box-shadow: 0 0 40px rgba(124, 92, 255, .9); animation: ttGlow 1.6s infinite; }

.tt-toasts { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 9800; display: flex; flex-direction: column; gap: 6px; align-items: center; pointer-events: none; }
.tt-toast { background: rgba(20, 14, 36, .95); border: 1px solid var(--tt-line); color: var(--tt-ink); padding: 8px 14px; border-radius: 12px; font-size: 14px; font-weight: 700; transition: opacity .4s, transform .4s; max-width: 90vw; }
.tt-toast.warn { border-color: var(--tt-bad); } .tt-toast.out { opacity: 0; transform: translateY(8px); }
.tt-banner { position: fixed; left: 50%; top: 22%; transform: translateX(-50%); z-index: 9600; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 26px; border-radius: 16px; background: rgba(20, 14, 36, .94); border: 2px solid var(--tt-acc); box-shadow: 0 0 40px rgba(124, 92, 255, .5); text-align: center; pointer-events: none; }
.tt-banner.show { animation: ttBanner .5s cubic-bezier(.2, .9, .3, 1.3); }
.tt-banner b { font-size: 22px; } .tt-banner span { font-size: 14px; color: #d9d0ef; }
.tt-banner.lead { border-color: var(--tt-bad); box-shadow: 0 0 40px rgba(255, 93, 115, .5); } .tt-banner.legend { border-color: #f2b02a; box-shadow: 0 0 50px rgba(242, 176, 42, .6); } .tt-banner.don { border-color: var(--tt-ok); }
.tt-seo { max-width: 960px; margin: 30px auto 20px; padding: 0 16px; color: #cfc6e6; font-size: 14px; line-height: 1.7; }
.tt-seo h2 { font-size: 18px; color: var(--tt-ink); } .tt-seo a { color: #b9a6ff; }
.tt-seo[hidden] { display: none; }

@keyframes ttAppear { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes ttPop { 0% { transform: scale(.7); } 55% { transform: scale(1.18); } 100% { transform: scale(1); } }
@keyframes ttVanish { to { transform: scale(0) rotate(30deg); opacity: 0; } }
@keyframes ttMorph { 0% { filter: brightness(2.2) hue-rotate(90deg); transform: scale(.85); } 100% { filter: none; transform: scale(1); } }
@keyframes ttDup { 0% { transform: scale(.2) translateY(-20%); opacity: 0; } 70% { transform: scale(1.12); opacity: 1; } 100% { transform: scale(1); } }
@keyframes ttTele { 0% { transform: scale(0) rotate(-180deg); filter: brightness(3); } 100% { transform: none; filter: none; } }
@keyframes ttShuffle { 0% { transform: rotateY(90deg) scale(.6); } 100% { transform: none; } }
@keyframes ttGlow { 50% { filter: brightness(1.18); } }
@keyframes ttGain { 0% { opacity: 1; transform: translateY(6px); } 100% { opacity: 0; transform: translateY(-16px); } }
@keyframes ttPulse { 50% { transform: scale(1.04); } }
@keyframes ttHint { 50% { opacity: .35; } }
@keyframes ttBoom { from { transform: scale(.2); opacity: 1; } to { transform: scale(1.4); opacity: 0; } }
@keyframes ttShake { 20% { transform: translate(-6px, 2px); } 40% { transform: translate(5px, -3px); } 60% { transform: translate(-3px, 2px); } 80% { transform: translate(2px, 0); } }
@keyframes ttFlash { 50% { filter: brightness(1.8); transform: scale(1.06); } }
@keyframes ttUp { from { background: #2f5a3a; } }
@keyframes ttEmo { 0% { opacity: 0; transform: translate(-50%, 10px) scale(.5); } 20% { opacity: 1; transform: translate(-50%, 0) scale(1.1); } 100% { opacity: 0; transform: translate(-50%, -30px); } }
@keyframes ttIn { from { opacity: 0; transform: translateX(10px); } }
@keyframes ttBanner { from { opacity: 0; transform: translate(-50%, 16px) scale(.85); } }

@media (max-width: 980px) {
  .tt-main, body.tt-cast .tt-main { grid-template-columns: 1fr; }
  .tt-side { order: 2; }
  .tt-lobby-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  #ttApp { padding: 8px 10px 16px; }
  .tt-clock { font-size: 20px; padding: 3px 10px; }
  .tt-icon { width: 36px; height: 36px; font-size: 16px; }
  .tt-sbox b { font-size: 18px; }
  .tt-aug { max-width: calc(50% - 4px); flex: 1 1 calc(50% - 4px); }
  .tt-keys { display: none; }
  .tt-minis { grid-template-columns: repeat(4, 1fr); }
  .tt-pod { width: 92px; }
  body.tt-in-game .topbar { display: none; }
}
@media (prefers-reduced-motion: reduce) { .tt-tile, .tt-tile.new, .tt-tile.merged { animation: none !important; transition: none; } .tt-hint, .tt-clock.warn { animation: none; } }

/* 랭킹 (2026-11-18) */
.rk-me { margin: 4px 0 10px; padding: 8px 12px; border-radius: 10px; background: #2a2145; border: 1px solid var(--tt-line); font-size: 14px; }
.rk-guest { font-size: 10px; color: var(--tt-mut); border: 1px solid var(--tt-line); border-radius: 6px; padding: 0 4px; }
#mdRank .tt-tabs { margin-bottom: 8px; }
.tt-res-rank { color: var(--tt-gold); font-weight: 800; }
/* 랭킹 프로필 (2026-11-18) */
.rk-who { display: inline-flex; align-items: center; gap: 7px; min-width: 0; }
.rk-nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 160px; }
.rk-av { border-radius: 50%; object-fit: cover; flex: none; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 900; vertical-align: middle; box-shadow: 0 0 0 2px rgba(255, 255, 255, .15); }
.rk-av.guest { color: #cfc8e6; }
.rk-me { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tt-res-table .rk-av { margin-right: 2px; }
