/* DearTable — 시안: 밤의 도시가 보이는 방, 따뜻한 원탁 조명, 유리 카드, 파란 버튼 */
:root {
  --bg: #0a0f1e;
  --bg2: #0e1528;
  --card: #121a30;
  --card2: #172039;
  --glass: rgba(16, 23, 42, .72);
  --line: rgba(255, 255, 255, .08);
  --line2: rgba(255, 255, 255, .15);
  --ink: #eef1f8;
  --ink2: #b9c2d9;
  --muted: #7c87a5;
  --blue: #3c6cf0;
  --blue2: #5d88ff;
  --blueSoft: rgba(76, 120, 255, .16);
  --gold: #f5c886;
  --gold2: #e5a15c;
  --red: #ff6b6b;
  --green: #4fd1a1;
  --top: 60px;
  --tabs: 64px;
  --radius: 18px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui, 'Apple SD Gothic Neo', sans-serif;
  font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
button:disabled { cursor: default; opacity: .55; }
input, textarea { font: inherit; color: var(--ink); }
img { display: block; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid var(--blue2); outline-offset: 2px; border-radius: 8px; }
.muted { color: var(--muted); }
.err { color: var(--red); font-size: 14px; margin: 0; }
.warn { color: var(--gold); font-size: 14px; }
.tiny { font-size: 12px; color: var(--muted); }
.empty { color: var(--muted); text-align: center; padding: 40px 20px; }

/* ── 머리 · 탭 ── */
.top { position: sticky; top: 0; z-index: 40; height: var(--top); display: flex; align-items: center; gap: 20px; padding: 0 max(16px, env(safe-area-inset-left)); background: rgba(10, 15, 30, .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: baseline; gap: 10px; }
.brand .dw { display: none; align-items: center; gap: 5px; font-size: 12px; color: var(--ink2); }
.brand .dw svg { width: 14px; height: 14px; }
.brand b, .logo { font-weight: 800; letter-spacing: -.02em; background: linear-gradient(180deg, #ffe9d2, #e9b88e); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand b { font-size: 22px; }
.topnav { display: none; gap: 4px; margin-left: auto; }
.topnav a { padding: 8px 14px; border-radius: 99px; color: var(--ink2); font-weight: 600; font-size: 14.5px; }
.topnav a.on { background: var(--blueSoft); color: #fff; }
.top-me { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink2); }
.top-me .pill { padding: 7px 14px; border-radius: 99px; border: 1px solid var(--line2); color: var(--ink); font-weight: 600; }
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; height: calc(var(--tabs) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); display: grid; grid-template-columns: repeat(4, 1fr); background: rgba(10, 15, 30, .92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
.tabs a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font-size: 11px; font-weight: 600; }
.tabs a.on { color: #fff; }
.tabs a.on svg { stroke: var(--gold); }
.main { padding-bottom: calc(var(--tabs) + 20px + env(safe-area-inset-bottom)); min-height: calc(100dvh - var(--top)); }
body.in-room .tabs, body.in-room .top { display: none; }
body.in-room .main { padding-bottom: 0; }
@media (min-width: 900px) {
  .brand .dw { display: inline-flex; }
  .topnav { display: flex; }
  .top-me { margin-left: 10px; }
  .tabs { display: none; }
  .main { padding-bottom: 40px; }
  body.in-room { overflow: hidden; }
}
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }

/* ── 버튼 ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 22px; border-radius: 14px; font-weight: 700; font-size: 15px; transition: transform .1s, background .2s; }
.btn:active { transform: scale(.98); }
.btn svg { width: 18px; height: 18px; }
.btn-cta { background: linear-gradient(180deg, var(--blue2), var(--blue)); color: #fff; box-shadow: 0 8px 24px rgba(60, 108, 240, .35); }
.btn-gold { background: linear-gradient(180deg, #ffe0b6, var(--gold2)); color: #2a1a0c; box-shadow: 0 8px 26px rgba(229, 161, 92, .3); }
.btn-ghost { border: 1px solid var(--line2); color: var(--ink); background: rgba(255, 255, 255, .03); }
.btn-danger { background: #c94545; color: #fff; }
.btn-sm { height: 38px; padding: 0 14px; font-size: 13.5px; border-radius: 11px; }
.btn-block { width: 100%; }
.link { color: var(--blue2); font-weight: 600; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 8px; background: rgba(255, 255, 255, .06); border: 1px solid var(--line); color: var(--ink2); font-size: 12.5px; white-space: nowrap; }
.pill-label { display: inline-block; padding: 4px 14px; border-radius: 99px; background: linear-gradient(180deg, #f3e3cf, #d9c0a2); color: #2a1d12; font-size: 12px; font-weight: 800; letter-spacing: .08em; }

/* ── 국기 · 얼굴 ── */
.flag { display: inline-block; width: 20px; height: 14px; border-radius: 3px; overflow: hidden; flex: none; box-shadow: 0 0 0 1px rgba(255, 255, 255, .15); vertical-align: -2px; }
.flag svg { width: 100%; height: 100%; display: block; stroke: none; }
.flag.lg { width: 34px; height: 24px; border-radius: 4px; }
.flag.xl { width: 48px; height: 34px; border-radius: 6px; }
.pic { border-radius: 50%; object-fit: cover; background: var(--card2); flex: none; }
.host-pic { display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #3b4f86, #1a2443); color: #cfe0ff; flex: none; }
.host-pic svg { width: 58%; height: 58%; }
.uav { display: inline-block; border-radius: 50%; padding: 2px; background: var(--ring, #f7838f); flex: none; }
.uav img { width: 100%; height: 100%; border-radius: 50%; background: #fff; object-fit: cover; }
.ring0 { --ring: #f7838f; } .ring1 { --ring: #f6b26b; } .ring2 { --ring: #ffd966; } .ring3 { --ring: #93c47d; }
.ring4 { --ring: #76a5af; } .ring5 { --ring: #6fa8dc; } .ring6 { --ring: #8e7cc3; } .ring7 { --ring: #c27ba0; }
.badge-ai, .badge-human { display: inline-block; padding: 1px 9px; border-radius: 6px; font-size: 11px; font-weight: 700; }
.badge-ai { background: rgba(76, 120, 255, .28); color: #c8d6ff; }
.badge-human { background: linear-gradient(180deg, #5d88ff, #3c6cf0); color: #fff; }

/* ── 오늘 (홈) ── */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero::before { content: ''; position: absolute; inset: 0; background: url(/img/table-bg.jpg) center / cover; opacity: .55; }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 15, 30, .2), rgba(10, 15, 30, .65) 60%, var(--bg)); }
.hero-in { position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; padding: 28px 16px 26px; display: grid; gap: 22px; }
.hero h1.logo { font-size: 44px; line-height: 1.05; margin: 0; }
.hero .tagline { font-size: 17px; color: #f1e6da; margin: 6px 0 0; }
.hero .lede { color: var(--ink2); margin: 12px 0 0; max-width: 460px; font-size: 14.5px; }
.topic-hero { background: var(--glass); border: 1px solid var(--line2); border-radius: 22px; padding: 22px 18px 18px; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); text-align: center; position: relative; }
.topic-hero .pill-label { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); }
.topic-hero h2 { font-size: 21px; line-height: 1.4; margin: 8px 34px 6px; font-weight: 800; letter-spacing: -.01em; word-break: keep-all; }
.topic-hero .sub { color: var(--ink2); font-size: 14px; margin: 0; word-break: keep-all; }
.topic-hero .tags { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
.topic-hero .arr { position: absolute; top: 50%; transform: translateY(-80%); width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--ink2); }
.topic-hero .arr:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.topic-hero .arr.l { left: 6px; } .topic-hero .arr.r { right: 6px; }
.topic-hero .arr svg { width: 20px; height: 20px; }
.seat-strip { display: flex; justify-content: center; margin: 16px 0 4px; }
.seat-strip > span { position: relative; margin: 0 -5px; }
.seat-strip .pic, .seat-strip .uav { width: 46px; height: 46px; border: 2.5px solid #141c33; }
.seat-strip .uav { padding: 0; background: #141c33; }
.seat-strip .flag { position: absolute; bottom: -2px; right: 2px; width: 16px; height: 11px; }
.topic-hero .who { color: var(--muted); font-size: 12.5px; margin: 6px 0 14px; }
.topic-hero .cta-row { display: grid; gap: 8px; }
@media (min-width: 900px) {
  .hero-in { grid-template-columns: 1fr 540px; align-items: center; padding: 64px 24px 56px; gap: 40px; }
  .hero h1.logo { font-size: 72px; }
  .hero .tagline { font-size: 22px; }
  .topic-hero { padding: 30px 30px 24px; }
  .topic-hero h2 { font-size: 25px; }
  .topic-hero .cta-row { grid-template-columns: 1.4fr 1fr; }
}
.section { max-width: 1180px; margin: 0 auto; padding: 26px 16px 0; }
.section-h { display: flex; align-items: baseline; justify-content: space-between; margin: 0 0 12px; }
.section-h h3 { margin: 0; font-size: 17px; font-weight: 800; }
.section-h a, .section-h button { color: var(--ink2); font-size: 13.5px; }
.grid2 { display: grid; gap: 14px; }
@media (min-width: 900px) { .grid2 { grid-template-columns: 1.3fr 1fr; gap: 20px; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }

/* 내 테이블 목록 */
.tlist { display: grid; gap: 8px; }
.trow { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.trow:hover { border-color: var(--line2); }
.trow .ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; background: var(--card2); flex: none; }
.trow .t { flex: 1; min-width: 0; }
.trow .t b { display: block; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trow .t small { color: var(--muted); font-size: 12.5px; }
.trow .res { text-align: right; font-size: 12px; color: var(--ink2); flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.trow .res b { font-size: 15px; color: var(--gold); }
.live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--green); margin-right: 5px; box-shadow: 0 0 0 3px rgba(79, 209, 161, .2); }

/* 세계 거울 */
.mirror { padding: 18px; }
.mirror h4 { margin: 0 0 2px; font-size: 15px; }
.mirror p.muted { margin: 0 0 14px; font-size: 13px; }
.bars { display: grid; gap: 9px; }
.bar-row { display: grid; grid-template-columns: 22px 70px 1fr 40px; gap: 8px; align-items: center; font-size: 13px; }
.bar-row .track { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.bar-row .track i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--blue), var(--blue2)); transition: width .8s ease; }
.bar-row.top .track i { background: linear-gradient(90deg, var(--gold2), var(--gold)); }
.bar-row b { text-align: right; font-variant-numeric: tabular-nums; }

/* ── 안건 고르기 ── */
.page-h { max-width: 1180px; margin: 0 auto; padding: 22px 16px 8px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.page-h h1 { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -.01em; }
.page-h p { margin: 4px 0 0; color: var(--ink2); font-size: 14px; }
.cats { display: flex; gap: 6px; overflow-x: auto; padding: 6px 16px 14px; max-width: 1180px; margin: 0 auto; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cats button { padding: 7px 16px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); color: var(--ink2); font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.cats button.on { background: linear-gradient(180deg, #a98bff, #7a5cf0); border-color: transparent; color: #fff; }
.topics { max-width: 1180px; margin: 0 auto; padding: 0 16px; display: grid; gap: 10px; }
@media (min-width: 700px) { .topics { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1050px) { .topics { grid-template-columns: 1fr 1fr 1fr; } }
.tcard { display: flex; gap: 14px; align-items: center; text-align: left; padding: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; transition: border-color .2s, transform .1s; }
.tcard:hover { border-color: rgba(167, 139, 255, .5); }
.tcard:active { transform: scale(.99); }
.tcard .tile { width: 64px; height: 64px; border-radius: 16px; display: grid; place-items: center; font-size: 30px; flex: none; }
.tcard .tx { min-width: 0; }
.tcard b { display: block; font-size: 15px; line-height: 1.4; word-break: keep-all; }
.tcard .tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 7px; }
.tcard .tags .chip { font-size: 11.5px; padding: 2px 8px; }
.tcard.today { border-color: rgba(245, 200, 134, .45); background: linear-gradient(135deg, rgba(245, 200, 134, .08), var(--card) 50%); }
.tile.Work { background: linear-gradient(135deg, #2b3d73, #1b2648); }
.tile.Family { background: linear-gradient(135deg, #5a3a2b, #2e1f1a); }
.tile.Love { background: linear-gradient(135deg, #6b2f4b, #331828); }
.tile.Daily { background: linear-gradient(135deg, #2c5a52, #16302b); }
.tile.Money { background: linear-gradient(135deg, #5e5326, #2e2a14); }
.tile.Manners { background: linear-gradient(135deg, #4a3570, #251a3a); }
.tile.Society { background: linear-gradient(135deg, #2f4f6f, #182838); }
.tile.Yours { background: linear-gradient(135deg, #3c6cf0, #1f2f6b); }
.ask { max-width: 1180px; margin: 22px auto 0; padding: 0 16px; }
.ask .card { padding: 18px; }
.ask h3 { margin: 0 0 4px; font-size: 16px; }
.ask p { margin: 0 0 12px; color: var(--ink2); font-size: 13.5px; }
.ask form { display: flex; gap: 8px; }
.ask input { flex: 1; min-width: 0; height: 48px; border-radius: 14px; border: 1px solid var(--line2); background: rgba(255, 255, 255, .04); padding: 0 14px; outline: none; }
.ask input:focus { border-color: var(--blue2); }

/* ── 테이블 방 ── */
.room { position: relative; }
.stage { position: relative; overflow: hidden; background: #0b1122; }
.stage::before { content: ''; position: absolute; inset: -20px; background: url(/img/table-bg.jpg) center 30% / cover; opacity: .9; }
.stage::after { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 75%, rgba(255, 190, 120, .16), transparent 55%), linear-gradient(180deg, rgba(8, 12, 26, .55), rgba(8, 12, 26, .25) 40%, rgba(8, 12, 26, .7)); }
.stage > * { position: relative; z-index: 1; }
.room-head { display: flex; align-items: center; gap: 8px; padding: calc(10px + env(safe-area-inset-top)) 12px 0; }
.room-head .back { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: rgba(10, 15, 30, .5); border: 1px solid var(--line); }
.room-head .count { white-space: nowrap; margin-left: auto; display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 12px; background: rgba(10, 15, 30, .55); border: 1px solid var(--line); font-size: 13px; color: var(--ink2); }
.room-head .count b { color: var(--gold); }
@media (max-width: 420px) { .room-head .count { gap: 4px; padding: 6px 9px; } .room-head .count .flag { width: 16px; height: 11px; } }
.room-head .leave { display: flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 12px; background: rgba(10, 15, 30, .55); border: 1px solid var(--line2); font-size: 13.5px; font-weight: 600; }
.room-head .leave svg { width: 16px; height: 16px; }
.room-topic { margin: 10px 12px 0; padding: 14px 44px 12px; text-align: center; background: rgba(14, 20, 38, .62); border: 1px solid var(--line2); border-radius: 18px; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); position: relative; }
.room-topic .pill-label { font-size: 10.5px; padding: 3px 11px; }
.room-topic h2 { margin: 6px 0 2px; font-size: 16.5px; line-height: 1.4; font-weight: 800; word-break: keep-all; }
.room-topic p { margin: 0; color: var(--ink2); font-size: 12.5px; word-break: keep-all; }
.room-topic .sample-tag { position: absolute; top: 10px; right: 12px; font-size: 10.5px; color: var(--gold); border: 1px solid rgba(245, 200, 134, .4); padding: 1px 7px; border-radius: 6px; }

.tablezone { position: relative; height: 260px; margin-top: 4px; }
.round { position: absolute; left: 50%; top: 72%; width: 92%; height: 50%; transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(ellipse at 50% 45%, rgba(46, 76, 140, .55), rgba(16, 26, 54, .9) 55%, rgba(8, 12, 26, .95) 70%),
    repeating-radial-gradient(ellipse at 50% 50%, transparent 0 14px, rgba(120, 160, 255, .05) 14px 15px);
  box-shadow: 0 0 0 6px rgba(178, 120, 70, .55), 0 0 0 9px rgba(70, 44, 26, .9), 0 30px 60px rgba(0, 0, 0, .6), inset 0 0 50px rgba(120, 170, 255, .15), 0 -10px 80px rgba(255, 180, 110, .18); }
.round .emblem { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); text-align: center; }
.round .emblem b { display: block; font-family: 'Instrument Serif', serif; font-style: italic; font-weight: 400; font-size: 26px; color: #f4f6ff; letter-spacing: .01em; text-shadow: 0 0 18px rgba(140, 180, 255, .5); }
.round .emblem span { display: block; font-family: 'Instrument Serif', serif; font-style: italic; font-size: 12px; color: #c8d3ee; }
.seat { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 4px; z-index: 2; transition: transform .2s; }
.seat .ph { position: relative; }
.seat .pic, .seat .uav { width: 50px; height: 50px; box-shadow: 0 6px 18px rgba(0, 0, 0, .5); }
.seat .pic { border: 2px solid rgba(255, 255, 255, .25); }
.seat .tag { display: flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: 8px; background: rgba(10, 15, 30, .72); border: 1px solid var(--line2); font-size: 11.5px; font-weight: 700; white-space: nowrap; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.seat .tag .flag { width: 15px; height: 10px; }
.seat .tag small { display: none; }
.seat.talking .pic { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(245, 200, 134, .25), 0 0 26px rgba(245, 200, 134, .55); }
.seat .typing { position: absolute; top: -8px; right: -12px; padding: 4px 6px; border-radius: 10px; background: #fff; display: none; }
.seat.talking .typing { display: block; }
.seat.focus .pic { border-color: var(--blue2); box-shadow: 0 0 0 4px rgba(93, 136, 255, .3); }
.seat.has-you .pic { box-shadow: 0 0 0 3px rgba(93, 136, 255, .55), 0 6px 18px rgba(0, 0, 0, .5); }
.seat.me .tag { background: rgba(60, 108, 240, .35); border-color: rgba(120, 160, 255, .5); }
.seat.me.away { opacity: .45; }
.seat button.hit { position: absolute; inset: -6px; border-radius: 16px; }
.you-token { position: absolute; z-index: 3; transform: translate(-50%, -50%); transition: left .7s cubic-bezier(.5, 0, .2, 1), top .7s cubic-bezier(.5, 0, .2, 1), opacity .3s; pointer-events: none; display: flex; align-items: center; gap: 3px; padding: 3px 7px 3px 3px; border-radius: 99px; background: linear-gradient(180deg, var(--blue2), var(--blue)); box-shadow: 0 6px 18px rgba(60, 108, 240, .5); font-size: 11px; font-weight: 800; }
.you-token .uav { width: 22px; height: 22px; padding: 1px; }
.you-token[hidden] { display: none; }
.seat-menu { position: absolute; z-index: 10; min-width: 190px; background: #161f3a; border: 1px solid var(--line2); border-radius: 14px; padding: 6px; box-shadow: 0 16px 40px rgba(0, 0, 0, .55); transform: translate(-50%, 8px); }
.seat-menu header { display: flex; gap: 8px; align-items: center; padding: 6px 8px 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; font-size: 13px; }
.seat-menu button, .seat-menu a { display: flex; width: 100%; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 10px; font-size: 13.5px; text-align: left; }
.seat-menu button:hover, .seat-menu a:hover { background: rgba(255, 255, 255, .06); }

/* 무대 위 말풍선 (시안 가운데 아래) */
.spot { display: flex; gap: 12px; align-items: flex-end; padding: 0 12px 12px; }
.spot .who { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: none; }
.spot .who .pic { width: 64px; height: 64px; border: 2px solid rgba(255, 255, 255, .3); }
.spot .who .tag { font-size: 11.5px; font-weight: 700; display: flex; gap: 4px; align-items: center; padding: 2px 8px; border-radius: 8px; background: rgba(10, 15, 30, .7); }
.spot .bubble { flex: 1; position: relative; background: #f7f8fc; color: #151b2e; border-radius: 18px; padding: 12px 14px; font-size: 14.5px; line-height: 1.55; box-shadow: 0 12px 30px rgba(0, 0, 0, .35); word-break: keep-all; }
.spot .bubble::before { content: ''; position: absolute; left: -7px; bottom: 18px; border: 8px solid transparent; border-right-color: #f7f8fc; border-left: 0; }
.spot .bubble .to { display: block; font-size: 11.5px; color: #5d6789; font-weight: 700; margin-bottom: 2px; }
.reacts { display: flex; gap: 6px; overflow-x: auto; padding: 0 12px 14px; scrollbar-width: none; }
.reacts::-webkit-scrollbar { display: none; }
.reacts button { display: inline-flex; align-items: center; gap: 6px; padding: 8px 13px; border-radius: 12px; background: rgba(14, 20, 38, .78); border: 1px solid var(--line2); font-size: 13px; font-weight: 600; white-space: nowrap; flex: none; }
.reacts button:hover { border-color: rgba(255, 255, 255, .3); }
.reacts button.on { background: var(--blueSoft); border-color: var(--blue2); color: #fff; }
.reacts button svg { width: 16px; height: 16px; }

/* 오른쪽 판: 대화 / 요약 */
.panel { background: var(--bg2); display: flex; flex-direction: column; min-height: 0; }
.ptabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 12px 12px 0; padding: 4px; border-radius: 14px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); }
.ptabs button { height: 36px; border-radius: 10px; font-weight: 700; font-size: 14px; color: var(--muted); }
.ptabs button.on { background: rgba(76, 120, 255, .22); color: #fff; }
.ptabs button .dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); margin-left: 5px; vertical-align: 2px; }
.pbody { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 12px 10px; overscroll-behavior: contain; }
.chat { display: flex; flex-direction: column; gap: 12px; }
.msg { display: flex; gap: 9px; align-items: flex-start; }
.msg .pic, .msg .host-pic { width: 36px; height: 36px; }
.msg .body { min-width: 0; max-width: 86%; }
.msg .name { display: flex; gap: 5px; align-items: center; font-size: 12.5px; font-weight: 700; color: var(--ink2); margin: 0 0 4px 2px; }
.msg .name .flag { width: 16px; height: 11px; }
.msg .name small { font-weight: 500; color: var(--muted); }
.msg .bub { display: inline-block; background: var(--card2); border: 1px solid var(--line); padding: 9px 12px; border-radius: 4px 16px 16px 16px; font-size: 14.5px; line-height: 1.55; word-break: keep-all; overflow-wrap: anywhere; text-align: left; transition: border-color .2s; }
.msg.tap .bub { cursor: pointer; }
.msg.tap .bub:hover { border-color: var(--line2); }
.msg.sel .bub { border-color: var(--blue2); box-shadow: 0 0 0 3px rgba(93, 136, 255, .18); }
.msg .bub .to { display: block; font-size: 11.5px; color: var(--blue2); font-weight: 700; margin-bottom: 1px; }
.msg .react-tag { display: inline-block; margin: 4px 0 0 4px; font-size: 11.5px; color: var(--muted); }
.msg.host .bub { background: rgba(154, 167, 199, .1); border-style: dashed; }
.msg.me { flex-direction: row-reverse; }
.msg.me .body { text-align: right; }
.msg.me .bub { background: linear-gradient(180deg, var(--blue2), var(--blue)); border: 0; color: #fff; border-radius: 16px 4px 16px 16px; }
.msg.me .bub .to { color: #dbe5ff; }
.msg.me .uav { width: 36px; height: 36px; }
.event { align-self: center; display: flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 99px; background: rgba(76, 120, 255, .12); border: 1px solid rgba(93, 136, 255, .3); font-size: 12.5px; color: #c8d6ff; }
.typing-row { display: flex; gap: 9px; align-items: center; color: var(--muted); font-size: 12.5px; }
.typing-row .pic, .typing-row .host-pic { width: 28px; height: 28px; }
.dots { display: inline-flex; gap: 3px; }
.dots i { width: 5px; height: 5px; border-radius: 50%; background: #8d9bd0; animation: bounce 1.2s infinite; }
.dots i:nth-child(2) { animation-delay: .15s; } .dots i:nth-child(3) { animation-delay: .3s; }
.seat .typing .dots i { background: #4a5680; }
@keyframes bounce { 0%, 60%, 100% { transform: translateY(0); opacity: .6; } 30% { transform: translateY(-4px); opacity: 1; } }
.inline-reacts { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.inline-reacts button { padding: 5px 10px; border-radius: 10px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line2); font-size: 12px; font-weight: 600; }
.inline-reacts button.on { background: var(--blueSoft); border-color: var(--blue2); }

.actions { display: flex; gap: 6px; padding: 8px 12px 0; }
.actions button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; border-radius: 11px; border: 1px solid var(--line2); font-size: 13px; font-weight: 600; color: var(--ink2); background: rgba(255, 255, 255, .03); }
.actions button svg { width: 16px; height: 16px; }
.actions button.gold { border-color: rgba(245, 200, 134, .45); color: var(--gold); }
.composer { padding: 8px 12px calc(10px + env(safe-area-inset-bottom)); }
.composer form { display: flex; gap: 8px; align-items: flex-end; }
.composer .field { flex: 1; min-width: 0; border-radius: 14px; border: 1px solid var(--line2); background: rgba(255, 255, 255, .04); padding: 4px 4px 4px 12px; display: flex; flex-direction: column; }
.composer .field:focus-within { border-color: var(--blue2); }
.composer .target { display: inline-flex; align-self: flex-start; align-items: center; gap: 4px; margin: 4px 0 0; font-size: 12px; color: var(--blue2); font-weight: 700; }
.composer .target button { color: var(--muted); font-size: 15px; padding: 0 4px; }
.composer textarea { width: 100%; resize: none; border: 0; outline: none; background: transparent; padding: 9px 0; max-height: 110px; line-height: 1.45; }
.composer .send { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(180deg, var(--blue2), var(--blue)); color: #fff; flex: none; }
.composer .send svg { width: 20px; height: 20px; }
.closed-note { padding: 12px; text-align: center; color: var(--muted); font-size: 13px; }
.sample-cta { margin: 10px 12px calc(12px + env(safe-area-inset-bottom)); }

/* 모바일: 무대는 위, 대화는 아래, 입력창은 바닥에 */
@media (max-width: 899px) {
  .room { display: flex; flex-direction: column; min-height: 100dvh; }
  .panel { flex: 1; }
  .pbody { overflow: visible; padding-bottom: 150px; }
  .panel-foot { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: rgba(14, 21, 40, .96); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
  .spot .bubble { font-size: 14px; }
  .reacts { padding-bottom: 12px; }
}
/* 데스크톱: 시안처럼 왼쪽 큰 무대 + 오른쪽 대화 판 */
@media (min-width: 900px) {
  .room { display: grid; grid-template-columns: 1fr 400px; height: 100dvh; }
  .stage { display: flex; flex-direction: column; min-height: 0; }
  .room-head { padding: 16px 20px 0; }
  .room-topic { margin: 6px auto 0; width: min(620px, 80%); padding: 18px 56px 16px; }
  .room-topic h2 { font-size: 22px; }
  .room-topic p { font-size: 14px; }
  .tablezone { flex: 1; height: auto; min-height: 300px; }
  .round { top: 76%; width: 80%; height: 52%; }
  .round .emblem b { font-size: 44px; }
  .round .emblem span { font-size: 16px; }
  .seat .pic, .seat .uav { width: 86px; height: 86px; }
  .seat .tag { padding: 5px 11px; font-size: 15px; border-radius: 12px; flex-direction: column; gap: 1px; }
  .seat .tag .nm { display: flex; align-items: center; gap: 6px; }
  .seat .tag .flag { width: 22px; height: 15px; }
  .seat .tag small { display: block; font-weight: 500; font-size: 11.5px; color: var(--ink2); }
  .you-token { font-size: 12px; padding: 4px 9px 4px 4px; }
  .you-token .uav { width: 28px; height: 28px; }
  .spot { width: min(760px, 92%); margin: 0 auto; padding-bottom: 12px; }
  .spot .who .pic { width: 92px; height: 92px; }
  .spot .bubble { font-size: 16px; padding: 16px 20px; }
  .reacts { justify-content: center; padding-bottom: 22px; }
  .reacts button { padding: 10px 16px; font-size: 14px; }
  .panel { border-left: 1px solid var(--line); height: 100dvh; }
  .panel-foot { border-top: 1px solid var(--line); }
}

/* 요약: WORLD VERDICT */
.verdict h3 { display: flex; align-items: center; gap: 10px; margin: 2px 0 2px; font-size: 22px; font-weight: 900; letter-spacing: .01em; color: #8fb0ff; }
.verdict h3 svg { width: 30px; height: 30px; stroke: #8fb0ff; }
.verdict .headline { margin: 0 0 14px; color: var(--ink2); font-size: 14px; word-break: keep-all; }
.stances { display: grid; gap: 6px; margin-bottom: 16px; }
.stance { display: grid; grid-template-columns: 34px 74px 1fr; gap: 8px; align-items: center; padding: 9px 10px; border-radius: 12px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); font-size: 13.5px; }
.stance .c { color: var(--ink2); font-size: 12.5px; }
.stance .s { font-weight: 700; word-break: keep-all; display: flex; align-items: center; gap: 6px; }
.stance .mood { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.mood.yes { background: var(--green); } .mood.no { background: var(--red); } .mood.depends { background: var(--gold); }
.stance.mine { border-color: rgba(93, 136, 255, .45); background: rgba(76, 120, 255, .08); }
.closest { padding: 18px 14px; text-align: center; }
.closest h4 { margin: 0 0 8px; font-size: 15px; font-weight: 700; word-break: keep-all; }
.gauge { position: relative; width: 170px; height: 170px; margin: 0 auto; }
.gauge svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.gauge circle { stroke-width: 12; fill: none; }
.gauge .bg { stroke: rgba(255, 255, 255, .07); }
.gauge .fg { stroke: url(#gaugeGrad); stroke-linecap: round; transition: stroke-dashoffset 1.2s cubic-bezier(.3, .8, .3, 1); }
.gauge .in { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; }
.gauge .in b { font-size: 34px; font-weight: 900; line-height: 1; }
.gauge .in span { font-size: 13px; color: var(--ink2); }
.ally { display: inline-block; margin-top: 10px; padding: 5px 12px; border-radius: 99px; background: linear-gradient(180deg, #f3e3cf, #d9c0a2); color: #2a1d12; font-size: 12.5px; font-weight: 800; }
.ally-why { margin: 8px 6px 0; color: var(--ink2); font-size: 13px; word-break: keep-all; }
.near { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 14px; }
.near div { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; color: var(--ink2); }
.near b { color: var(--ink); font-size: 13px; }
.near .flag { width: 30px; height: 21px; }
.share { margin-top: 16px; }
.wait-verdict { text-align: center; padding: 34px 12px; color: var(--ink2); }
.wait-verdict .spinner { margin-bottom: 12px; }
.wait-verdict h4 { margin: 0 0 6px; font-size: 16px; color: var(--ink); }
.wait-verdict p { margin: 0 0 16px; font-size: 13.5px; word-break: keep-all; }

/* ── 대표 ── */
.dgrid { max-width: 1180px; margin: 0 auto; padding: 0 16px; display: grid; gap: 12px; }
@media (min-width: 700px) { .dgrid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1050px) { .dgrid { grid-template-columns: 1fr 1fr 1fr; } }
.dcard { display: flex; flex-direction: column; gap: 10px; padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: 20px; position: relative; overflow: hidden; }
.dcard:hover { border-color: var(--line2); }
.dcard::before { content: ''; position: absolute; inset: 0 0 auto; height: 70px; background: linear-gradient(180deg, var(--c, #4f7cff), transparent); opacity: .18; }
.dcard .head { display: flex; gap: 12px; align-items: center; position: relative; }
.dcard .head .pic, .dcard .head .host-pic { width: 64px; height: 64px; border: 2px solid rgba(255, 255, 255, .2); }
.dcard h3 { margin: 0; font-size: 18px; display: flex; align-items: center; gap: 7px; }
.dcard .meta { color: var(--ink2); font-size: 13px; }
.dcard .tagline { margin: 0; font-size: 14px; }
.dcard q { color: var(--muted); font-size: 13px; font-style: italic; }
.dcard .vals { display: flex; gap: 5px; flex-wrap: wrap; }
.dcard .near-me { position: absolute; top: 14px; right: 14px; font-size: 12px; color: var(--gold); font-weight: 700; }
.dprof { max-width: 720px; margin: 0 auto; padding: 0 16px; }
.dprof .cover { height: 130px; margin: 0 -16px; background: linear-gradient(160deg, var(--c), transparent 80%), url(/img/table-bg.jpg) center / cover; opacity: .7; }
.dprof .who { display: flex; flex-direction: column; align-items: center; text-align: center; margin-top: -64px; gap: 6px; }
.dprof .who .pic, .dprof .who .host-pic { width: 124px; height: 124px; border: 4px solid var(--bg); }
.dprof h1 { margin: 6px 0 0; font-size: 26px; display: flex; align-items: center; gap: 8px; }
.dprof .meta { color: var(--ink2); font-size: 14px; }
.dprof blockquote { margin: 12px 0 0; font-family: 'Instrument Serif', serif; font-style: italic; font-size: 20px; color: #e8edff; line-height: 1.35; }
.dprof .bio { color: var(--ink2); font-size: 14.5px; margin: 14px 0 0; word-break: keep-all; }
.dprof .kv { display: grid; gap: 12px; margin-top: 20px; }
.dprof .kv h4 { margin: 0 0 6px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.mem { display: block; padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.mem b { display: block; font-size: 14px; }
.mem q { display: block; color: var(--ink2); font-size: 13px; margin-top: 4px; }
.mem time { font-size: 11.5px; color: var(--muted); }
.bar { position: sticky; top: var(--top); z-index: 20; display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 10px; background: rgba(10, 15, 30, .85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.bar h1 { margin: 0; font-size: 16px; }
.bar .ibtn { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; }

/* ── 나 ── */
.mehead { max-width: 720px; margin: 0 auto; padding: 24px 16px 0; display: flex; gap: 16px; align-items: center; }
.mehead h1 { margin: 0; font-size: 22px; }
.mehead p { margin: 4px 0 0; color: var(--ink2); font-size: 14px; }
.me-body { max-width: 720px; margin: 0 auto; padding: 0 16px; display: grid; gap: 14px; }
.seatcard { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.seatcard .tx { flex: 1; }
.seatcard .tx small { display: block; color: var(--muted); font-size: 12px; }
.seatcard .tx b { font-size: 16px; }
.menu { display: grid; background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.menu a, .menu button { display: flex; align-items: center; gap: 10px; padding: 14px 16px; text-align: left; font-size: 14.5px; border-top: 1px solid var(--line); }
.menu > :first-child { border-top: 0; }
.menu .danger { color: var(--red); }
.countries { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.countries button { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; border-radius: 14px; background: rgba(255, 255, 255, .04); border: 1.5px solid var(--line); font-size: 13px; font-weight: 600; }
.countries button.on { border-color: var(--blue2); background: var(--blueSoft); }

/* ── 시트 · 입장 · 토스트 ── */
.toast { position: fixed; left: 50%; bottom: calc(var(--tabs) + 24px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); background: rgba(240, 243, 252, .96); color: #111829; padding: 10px 18px; border-radius: 99px; font-size: 14px; font-weight: 600; opacity: 0; pointer-events: none; transition: .25s; z-index: 300; max-width: 90vw; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
body.in-room .toast { bottom: calc(150px + env(safe-area-inset-bottom)); }
@media (min-width: 900px) { .toast { bottom: 28px; } body.in-room .toast { bottom: 28px; } }
.modal, .overlay { position: fixed; inset: 0; z-index: 90; background: rgba(4, 7, 16, .6); display: grid; place-items: end center; }
.modal[hidden] { display: none; }
@media (min-width: 600px) { .modal, .overlay { place-items: center; } .sheet { border-radius: 24px !important; } }
.sheet { width: 100%; max-width: 460px; background: #121a31; border: 1px solid var(--line2); border-radius: 24px 24px 0 0; padding: 26px 22px calc(24px + env(safe-area-inset-bottom)); position: relative; max-height: 92dvh; overflow: auto; display: flex; flex-direction: column; gap: 12px; }
.sheet h2 { margin: 0; font-size: 21px; }
.sheet p { margin: 0; }
.sheet label { font-size: 14px; }
.sheet-x { position: absolute; top: 12px; right: 14px; font-size: 26px; color: var(--muted); width: 36px; height: 36px; }
.sheet textarea, .sheet input[type=text] { width: 100%; border: 1px solid var(--line2); border-radius: 14px; padding: 12px 14px; background: rgba(255, 255, 255, .04); outline: none; }
.sheet textarea:focus, .sheet input[type=text]:focus { border-color: var(--blue2); }
.fb-stars { display: flex; gap: 6px; }
.fb-stars button { font-size: 30px; color: rgba(255, 255, 255, .15); }
.fb-stars button.on { color: #f5b942; }
.opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.opts button { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; border-radius: 16px; background: rgba(255, 255, 255, .04); border: 1.5px solid transparent; font-size: 12.5px; }
.opts button.on { border-color: var(--blue2); background: var(--blueSoft); }
.opts .uav { width: 56px; height: 56px; }
.keep { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--ink2); }
.gbtn { min-height: 44px; display: grid; place-items: center; }
.face-row { display: flex; justify-content: center; margin-bottom: 4px; }
.face-row img { width: 46px; height: 46px; border-radius: 50%; border: 3px solid var(--bg); margin-left: -10px; object-fit: cover; }
.dw-gate { position: fixed; inset: 0; z-index: 200; background: var(--bg); display: grid; place-items: center; padding: 24px; }
.dw-gate::before { content: ''; position: absolute; inset: 0; background: url(/img/table-bg.jpg) center / cover; opacity: .35; }
.gate-card { position: relative; width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 14px; text-align: center; }
.gate-card .logo { font-size: 46px; margin: 0; }
.gate-card .logo sup { font-size: 12px; color: var(--gold); -webkit-text-fill-color: var(--gold); margin-left: 4px; font-weight: 600; }
.gate-card p { margin: 0; color: var(--ink2); }
.gate-card input { height: 50px; border-radius: 14px; border: 1px solid var(--line2); padding: 0 16px; text-align: center; outline: none; background: rgba(255, 255, 255, .05); }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .15); border-top-color: var(--blue2); animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { display: grid; place-items: center; padding: 80px 0; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.fade-up { animation: fadeUp .35s ease both; }

/* ── 바닥: 의견 · 자매품 ── */
.foot { max-width: 720px; margin: 0 auto; padding: 34px 16px 10px; text-align: center; }
.foot-link { color: var(--muted); font-size: 13.5px; text-decoration: underline; }
.sisters { margin-top: 22px; text-align: left; }
.sisters-title { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px 4px; }
.sisters ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
@media (min-width: 700px) { .sisters ul { grid-template-columns: 1fr 1fr; } }
.sisters a { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.sisters img { width: 44px; height: 44px; border-radius: 22%; background: rgba(255, 255, 255, .9); }
.sisters b { display: block; font-size: 14px; }
.sisters small { color: var(--muted); font-size: 12.5px; }

/* ── 앱 설치 팝업 (install.js, DearWorld 공통) ── */
.dwi { position: fixed; left: 0; right: 0; bottom: 0; z-index: 140; display: flex; justify-content: center; padding: 0 12px calc(var(--tabs) + 12px + env(safe-area-inset-bottom)); pointer-events: none; animation: fadeUp .4s ease both; }
.dwi-card { pointer-events: auto; width: min(440px, 100%); background: #f4f6fc; color: #111829; border-radius: 18px; padding: 16px 16px 14px; box-shadow: 0 18px 50px rgba(0, 0, 0, .45); display: flex; flex-direction: column; gap: 12px; }
.dwi-head { display: flex; gap: 12px; align-items: flex-start; }
.dwi-head img { width: 48px; height: 48px; border-radius: 12px; flex: none; }
.dwi-head b { display: block; font-weight: 700; font-size: 16px; }
.dwi-head p { margin: 3px 0 0; font-size: 13px; line-height: 1.5; color: #4a5470; }
.dwi-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.dwi-btn { padding: 9px 14px; border-radius: 999px; font-size: 13px; color: #111829; }
.dwi-main { background: linear-gradient(180deg, var(--blue2), var(--blue)); color: #fff; }
.dwi-ghost { border: 1px solid #cdd3e3; color: #4a5470; }
.dwi-more { font-size: 13.5px; color: #111829; }
.dwi-steps { margin: 0; padding-left: 20px; line-height: 1.9; }
.dwi-ico { display: inline-flex; vertical-align: -4px; padding: 2px 4px; border-radius: 6px; background: #e6eaf5; color: #2f7cf6; }
.dwi-ico svg { width: 16px; height: 16px; }
.dwi-guide { margin: 0 0 8px; line-height: 1.6; }
@media (min-width: 900px) { .dwi { padding-bottom: 20px; } }
