:root { --ink:#171816; --paper:#f3f2ed; --acid:#d9f46b; --muted:#73746e; --line:#d7d7cf; --night:#1b1e1c; }
* { box-sizing:border-box; }
body { margin:0; color:var(--ink); background:var(--paper); font-family:"Noto Sans KR",system-ui,sans-serif; }
button,input { font:inherit; }
.app-shell { min-height:100vh; display:grid; grid-template-columns:minmax(340px,42%) 1fr; }
.brand-panel { color:#f5f5ef; background:var(--night); padding:42px clamp(32px,5vw,80px); display:flex; flex-direction:column; position:relative; overflow:hidden; }
.brand-panel::after { content:""; position:absolute; width:460px; height:460px; border:1px solid rgba(217,244,107,.2); border-radius:50%; right:-255px; bottom:-160px; }
.brand { color:inherit; text-decoration:none; display:flex; align-items:center; gap:10px; font-weight:800; font-size:13px; line-height:11px; letter-spacing:-.8px; }
.brand-mark { display:grid; place-items:center; width:27px; height:27px; border-radius:50%; color:var(--ink); background:var(--acid); font-size:16px; }
.hero-copy { margin:auto 0; padding:72px 0; position:relative; z-index:1; }
.eyebrow,.section-label,.topline,.lobby-footer,.room-meta { font-weight:500; font-size:10px; line-height:1.3; letter-spacing:.08em; }
.eyebrow { display:flex; align-items:center; gap:9px; color:#bec0b7; }
.eyebrow span { width:7px; height:7px; border-radius:50%; background:var(--acid); box-shadow:0 0 0 4px rgba(217,244,107,.1); }
h1 { margin:22px 0; max-width:550px; font-size:clamp(48px,6vw,92px); line-height:.99; letter-spacing:-.07em; font-weight:700; }
h1 em { color:var(--acid); font-weight:400; }
.intro { color:#b9bbb2; font-size:15px; line-height:1.8; }
.connection-note { display:flex; gap:10px; align-items:flex-start; color:#b9bbb2; font-size:11px; line-height:1.45; }
.connection-note i,.live-dot { width:8px; height:8px; margin-top:3px; border-radius:50%; background:var(--acid); display:block; }
.content-panel { min-width:0; padding:42px clamp(32px,8vw,135px); display:flex; flex-direction:column; }
.lobby,.chat { min-height:calc(100vh - 84px); display:flex; flex-direction:column; width:min(100%,610px); margin:auto; }
.topline { display:flex; justify-content:space-between; color:var(--muted); }
.lobby-content { margin:auto 0; }
.section-label { color:#77796f; margin:0 0 14px; }
h2 { font-size:clamp(32px,4vw,53px); letter-spacing:-.065em; line-height:1.08; margin:0 0 38px; }
#join-form { display:grid; gap:18px; max-width:410px; }
label { display:grid; gap:9px; font-size:12px; font-weight:700; }
input { width:100%; background:transparent; border:0; border-bottom:1px solid #bdbeb6; padding:8px 0 12px; outline:0; color:var(--ink); font-size:16px; }
input:focus { border-color:var(--ink); }
input::placeholder { color:#a6a7a0; }
#join-form button { border:0; background:var(--ink); color:#fff; margin-top:10px; padding:16px 19px; cursor:pointer; text-align:left; display:flex; align-items:center; justify-content:space-between; font-weight:700; }
#join-form button:hover { background:#3d403b; }
#join-form button span { color:var(--acid); font-size:21px; }
.form-hint,.privacy-note { color:var(--muted); font-size:11px; line-height:1.6; margin:18px 0 0; }
.form-error { color:#ba251d; min-height:18px; font-size:12px; }
.lobby-footer { display:flex; gap:18px; color:var(--muted); }
.chat-header { display:flex; justify-content:space-between; align-items:flex-start; gap:20px; }
.chat-header h2 { margin:0; font-size:28px; letter-spacing:-.04em; }
.copy-button { border:1px solid var(--line); background:transparent; padding:10px 12px; cursor:pointer; font-size:11px; white-space:nowrap; }
.copy-button:hover { background:#e6e5dd; }
.room-meta { display:flex; align-items:center; gap:7px; color:var(--muted); margin:21px 0 17px; }
.room-meta #peer-count { color:var(--ink); }
.live-dot { width:6px; height:6px; margin:0 2px 0 8px; }
.members { display:flex; flex-wrap:wrap; gap:8px; padding-bottom:20px; border-bottom:1px solid var(--line); }
.member { display:flex; gap:7px; align-items:center; border:1px solid var(--line); padding:6px 9px 6px 6px; font-size:11px; }
.member-avatar { width:21px; height:21px; border-radius:50%; display:grid; place-items:center; background:var(--acid); font-weight:700; font-size:10px; }
.member.me .member-avatar { background:var(--ink); color:var(--acid); }
.messages { flex:1; padding:28px 0; display:flex; flex-direction:column; gap:17px; overflow:auto; }
.message-row { display:flex; flex-direction:column; align-self:flex-start; width:fit-content; max-width:82%; gap:4px; }
.message-row.mine { align-self:flex-end; align-items:flex-end; }
.message-sender { color:var(--muted); font-size:10px; }
.message-bubble { background:#e4e4dd; padding:11px 13px; line-height:1.55; font-size:14px; word-break:break-word; }
.mine .message-bubble { background:var(--ink); color:#fff; }
.system-message { align-self:center; color:var(--muted); font-size:11px; text-align:center; }
.message-form { display:flex; gap:9px; align-items:center; border-top:1px solid var(--line); padding-top:17px; }
.message-form input { border:0; padding:11px 0; }
.message-form button { width:43px; height:43px; border:0; color:var(--ink); background:var(--acid); font-size:21px; cursor:pointer; }
.message-form button:hover { background:#c8e654; }
.privacy-note { text-align:center; padding-bottom:3px; }
@media (max-width:760px) { .app-shell { grid-template-columns:1fr; } .brand-panel { min-height:360px; padding:28px; } .hero-copy { padding:45px 0; } h1 { font-size:52px; } .content-panel { padding:28px; } .lobby,.chat { min-height:calc(100vh - 56px); } }

/* Minimal private-room interface */
.app-shell { display:block; min-height:100vh; }
.content-panel { max-width:720px; min-height:100vh; padding:28px 20px; margin:0 auto; }
.lobby,.chat { min-height:calc(100vh - 56px); width:100%; }
.lobby-content { margin:auto; text-align:center; }
.lobby h1 { color:var(--ink); font-size:34px; letter-spacing:-.05em; margin:0 0 20px; }
#create-room { color:#fff; border:0; background:var(--ink); padding:14px 18px; cursor:pointer; font-size:14px; font-weight:700; }
#create-room:hover { background:#333; }
.room-title-field { width:min(100%,360px); margin:0 auto 10px; text-align:left; color:var(--muted); font-size:12px; }
.room-title-field input { margin-top:2px; font-size:15px; }
.room-title-hint { width:min(100%,360px); margin:0 auto 18px; color:var(--muted); font-size:11px; line-height:1.5; text-align:left; }
.chat-header { padding-bottom:17px; border-bottom:1px solid var(--line); }
.chat-header h2 { font-weight:500; font-size:14px; letter-spacing:0; }
.chat-header { min-height:18px; justify-content:flex-end; }
.destroy-button { border:1px solid #d9aaa5; border-radius:999px; background:#fff7f6; color:#9d2d28; cursor:pointer; padding:6px 10px; font-size:12px; font-weight:700; line-height:1; white-space:nowrap; }
.destroy-button:hover { background:#f8e2df; }
.room-meta { margin:16px 0; }
.members { padding-bottom:16px; }
.messages { min-height:280px; }
.message-form { position:relative; }
.emoji-wrap { position:relative; }
.emoji-button { width:38px; height:38px; border:0; background:transparent; color:var(--ink); cursor:pointer; font-size:20px; }
.emoji-picker { position:absolute; z-index:2; bottom:47px; right:0; width:min(400px,calc(100vw - 40px)); padding:8px; background:#fff; border:1px solid var(--line); }
.emoji-picker:not([hidden]) { display:block; }
.emoji-grid { display:grid; grid-template-columns:repeat(4, 1fr); grid-template-rows:repeat(5, 92px); gap:4px; }
.emoji-grid button { display:grid; place-items:center; width:100%; height:92px; border:0; background:transparent; padding:2px; cursor:pointer; overflow:hidden; }
.emoji-grid button:hover { background:#eee; }
.emoji-grid img { display:block; width:87px; height:87px; object-fit:contain; }
.emoji-pager { min-height:25px; display:flex; align-items:center; justify-content:center; gap:15px; margin-top:6px; font-size:12px; }
.emoji-pager button { border:0; background:transparent; cursor:pointer; font-size:20px; line-height:1; }
.emoji-pager button:disabled { opacity:.3; cursor:default; }
.sticker-row .message-bubble { padding:5px; }
.sticker-row .message-bubble img { display:block; width:92px; height:92px; object-fit:contain; }
.person-1 .message-bubble { background:#dceeff; }
.person-2 .message-bubble { background:#f9e1dc; }
.person-3 .message-bubble { background:#e5f2d1; }
.person-4 .message-bubble { background:#eee3fb; }
.mine .message-bubble { color:var(--ink); }
.message-form button:disabled,.emoji-button:disabled { cursor:not-allowed; opacity:.45; }
.chat { height:calc(100dvh - 56px); min-height:0; overflow:hidden; }
.messages { flex:1 1 auto; min-height:0; padding:28px 14px; overflow-y:auto; scrollbar-gutter:stable; }
.room-meta { display:block; margin:16px 0; padding-bottom:17px; border-bottom:1px solid var(--line); font-size:12px; }
.room-topline { display:flex; align-items:center; gap:7px; min-width:0; }
.room-topline #room-title { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:700; }
.room-presence { display:flex; align-items:center; gap:7px; margin-top:14px; min-width:0; font-size:10px; }
.room-presence #peer-count { flex:0 0 auto; color:var(--ink); }
.copy-title-button { border:1px solid var(--line); border-radius:999px; background:#fff; color:var(--ink); cursor:pointer; padding:5px 8px; font-size:11px; white-space:nowrap; }
.copy-title-button:hover { background:#e6e5dd; }
.room-topline .notification-toggle { margin-left:auto; }
.notification-toggle { display:inline-flex; align-items:center; gap:7px; border:0; background:transparent; color:var(--muted); cursor:pointer; padding:4px 0; font-size:12px; }
.notification-toggle:disabled { cursor:not-allowed; opacity:.55; }
.toggle-track { display:flex; align-items:center; width:31px; height:18px; padding:2px; border-radius:999px; background:#c8c9c2; transition:background .18s ease; }
.toggle-track > span { width:14px; height:14px; border-radius:50%; background:#fff; box-shadow:0 1px 2px rgba(0,0,0,.18); transition:transform .18s ease; }
.notification-toggle.is-on { color:var(--ink); }
.notification-toggle.is-on .toggle-track { background:var(--acid); }
.notification-toggle.is-on .toggle-track > span { transform:translateX(13px); }
.chat-header { display:none; }
.members { flex:1; flex-wrap:nowrap; gap:7px; padding:0; border:0; overflow-x:auto; }
.member { flex:0 0 auto; border:0; padding:4px 6px; font-size:10px; align-items:center; }
.kick-button { margin-left:2px; border:0; border-left:1px solid rgba(23,24,22,.18); background:transparent; color:#9d2d28; cursor:pointer; padding:0 0 0 7px; font-size:11px; }
.kick-button:hover { text-decoration:underline; }
.member.person-1 { background:#dceeff; }
.member.person-2 { background:#f9e1dc; }
.member.person-3 { background:#e5f2d1; }
.member.person-4 { background:#eee3fb; }
.message-bubble { font-size:15px; }
.message-sender,.system-message { font-size:12px; }
#create-room { font-size:16px; }
@media (max-width:760px) {
  html,body { height:var(--chat-viewport-height,100dvh); min-height:0; overflow:hidden; overscroll-behavior:none; }
  .app-shell { position:fixed; inset:0; width:100%; height:var(--chat-viewport-height,100dvh); min-height:0; overflow:hidden; overscroll-behavior:none; }
  .content-panel { height:var(--chat-viewport-height,100dvh); min-height:0; padding:20px 20px 10px; overflow:hidden; }
  .lobby { min-height:calc(100vh - 40px); }
  .chat { height:100%; min-height:0; margin:0; }
  .room-meta { margin:0 0 12px; }
  .message-form { flex:0 0 auto; padding-top:8px; }
  .message-row { max-width:90%; }
}
