:root {
  color-scheme: light;
  --pine: #123e32;
  --pine-2: #1c5947;
  --pine-3: #2d735c;
  --mint: #dbe9dc;
  --mint-2: #edf4ec;
  --cream: #f6f4ed;
  --paper: #fffefa;
  --ink: #1f3029;
  --muted: #78847c;
  --line: #e5e8df;
  --red: #b84943;
  --gold: #d99a40;
  --shadow: 0 18px 55px rgba(28, 49, 38, .09);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--cream); }
body { min-height: 100vh; margin: 0; color: var(--ink); background: var(--cream); }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .48; }
a { color: inherit; }
.page-noise { position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .24; background-image: radial-gradient(rgba(18, 62, 50, .12) .55px, transparent .55px); background-size: 7px 7px; mask-image: linear-gradient(to bottom, #000, transparent 78%); }
.app-shell { width: min(1120px, calc(100% - 44px)); margin: 0 auto; padding: 28px 0 72px; }
.initial-loader { min-height: 70vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: var(--muted); font-size: 14px; }
.initial-loader img { width: 72px; height: 72px; border-radius: 50%; box-shadow: 0 8px 25px rgba(0,0,0,.12); }

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 34px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--pine); text-decoration: none; font-size: 17px; font-weight: 800; letter-spacing: -.04em; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; overflow: hidden; border: 2px solid rgba(18,62,50,.14); border-radius: 50%; background: #171516; box-shadow: 0 5px 14px rgba(18,62,50,.14); }
.brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.user-chip { display: flex; align-items: center; gap: 9px; padding: 5px 12px 5px 5px; border: 1px solid var(--line); border-radius: 99px; color: var(--ink); background: rgba(255,254,250,.8); cursor: pointer; text-align: left; }
.user-chip img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.user-chip span { font-size: 13px; font-weight: 700; }

.auth-layout { min-height: calc(100vh - 100px); display: grid; grid-template-columns: 1fr minmax(340px, 440px); align-items: center; gap: clamp(32px, 7vw, 92px); padding: 28px 0 70px; }
.auth-intro { max-width: 540px; padding: 12px 0 32px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--pine-2); font-size: 11px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.eyebrow::before { content: ''; width: 22px; height: 1px; background: var(--gold); }
.auth-intro h1 { max-width: 560px; margin: 18px 0 20px; color: var(--pine); font-size: clamp(42px, 6.6vw, 76px); line-height: .99; letter-spacing: -.07em; }
.auth-intro h1 span { color: var(--red); }
.auth-intro p { max-width: 410px; color: var(--muted); font-size: 16px; line-height: 1.8; }
.auth-art { position: relative; width: min(100%, 390px); aspect-ratio: 1; margin-top: 42px; border-radius: 50%; background: radial-gradient(circle at 50% 42%, #fefcf4 0 34%, #e5eddf 34.5% 57%, #d5e3d5 57.5%); }
.auth-art::before, .auth-art::after { position: absolute; content: ''; border: 1px solid rgba(18,62,50,.13); border-radius: 50%; }
.auth-art::before { inset: 8%; }
.auth-art::after { inset: 17%; }
.auth-art img { position: absolute; z-index: 2; width: 42%; left: 29%; top: 28%; border-radius: 50%; box-shadow: 0 14px 35px rgba(0,0,0,.2); }
.art-star { position: absolute; z-index: 3; color: var(--gold); font-size: 30px; }
.art-star.one { top: 17%; right: 21%; }
.art-star.two { left: 18%; bottom: 24%; font-size: 21px; }
.art-label { position: absolute; left: 50%; bottom: 9%; transform: translateX(-50%); color: var(--pine); font-size: 10px; font-weight: 800; letter-spacing: .18em; white-space: nowrap; }
.auth-card { padding: clamp(24px, 4vw, 36px); border: 1px solid rgba(18,62,50,.08); border-radius: var(--radius-xl); background: var(--paper); box-shadow: var(--shadow); }
.auth-card h2 { margin: 0 0 8px; color: var(--pine); font-size: 26px; letter-spacing: -.05em; }
.subtle { color: var(--muted); font-size: 13px; line-height: 1.65; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 25px 0 22px; padding: 4px; border-radius: 13px; background: #f1f2ec; }
.auth-tabs button { padding: 11px 8px; border: 0; border-radius: 10px; color: var(--muted); background: transparent; font-size: 13px; font-weight: 800; }
.auth-tabs button.active { color: var(--pine); background: white; box-shadow: 0 2px 8px rgba(18,62,50,.08); }
.form-stack { display: grid; gap: 14px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: grid; gap: 7px; }
.field label { color: #52645a; font-size: 12px; font-weight: 800; }
.field input { width: 100%; min-height: 47px; padding: 0 14px; border: 1px solid #dfe5dc; outline: none; border-radius: 12px; color: var(--ink); background: #fff; font-size: 14px; transition: border .18s, box-shadow .18s; }
.field input:focus { border-color: #6d9b83; box-shadow: 0 0 0 3px rgba(45,115,92,.1); }
.field input[type=file] { padding: 11px; font-size: 12px; }
.phone-input { display: flex; align-items: center; min-height: 47px; overflow: hidden; border: 1px solid #dfe5dc; border-radius: 12px; background: #fff; transition: border .18s, box-shadow .18s; }
.phone-input:focus-within { border-color: #6d9b83; box-shadow: 0 0 0 3px rgba(45,115,92,.1); }
.phone-prefix { display: flex; align-items: center; align-self: stretch; padding: 0 13px; border-right: 1px solid #e8ece5; color: var(--pine); background: #f7faf5; font-size: 14px; font-weight: 800; }
.phone-input input.field-phone, .phone-input input { min-width: 0; min-height: 45px; flex: 1; padding: 0 13px; border: 0; border-radius: 0; outline: none; box-shadow: none; letter-spacing: .03em; }
.phone-input input:focus { border: 0; outline: none; box-shadow: none; }
.field-hint { color: #929b94; font-size: 11px; }
.form-error { display: none; padding: 11px 13px; border-radius: 11px; color: #913e39; background: #fbedeb; font-size: 12px; line-height: 1.55; }
.form-error.visible { display: block; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 45px; padding: 0 17px; border: 1px solid transparent; border-radius: 12px; text-decoration: none; font-size: 13px; font-weight: 800; transition: transform .16s, background .16s, border-color .16s; }
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn-primary { color: #fff; background: var(--pine); box-shadow: 0 7px 16px rgba(18,62,50,.15); }
.btn-primary:hover:not(:disabled) { background: var(--pine-2); }
.btn-secondary { color: var(--pine); border-color: #dbe3d9; background: #f7faf5; }
.btn-ghost { color: var(--pine-2); border-color: transparent; background: transparent; }
.btn-danger { color: #a33f39; border-color: #f0d8d5; background: #fff6f4; }
.btn-gold { color: #51330f; background: #efbd6f; }
.btn-block { width: 100%; }
.btn-small { min-height: 36px; padding: 0 12px; font-size: 12px; }

.invite-preview { display: flex; align-items: center; gap: 13px; margin: 0 0 20px; padding: 12px; border: 1px solid #e5eadf; border-radius: 14px; background: #f8faf5; }
.invite-preview img { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; background: var(--mint); }
.invite-preview strong { display: block; color: var(--pine); font-size: 14px; }
.closed-panel { margin: 20px 0; padding: 22px; border: 1px solid #eadbd4; border-radius: 18px; background: #fff9f4; }
.closed-panel strong { color: #9e4c3f; }

.dashboard-hero { position: relative; display: grid; grid-template-columns: 1fr 245px; align-items: center; gap: 25px; overflow: hidden; margin-bottom: 35px; padding: clamp(25px, 5vw, 48px); border-radius: var(--radius-xl); color: #fff; background: radial-gradient(circle at 83% 13%, rgba(217,154,64,.28), transparent 25%), linear-gradient(125deg, #103a30, #205c49 72%, #2b7057); box-shadow: 0 18px 42px rgba(18,62,50,.18); }
.dashboard-hero::after { position: absolute; content: '✳'; right: 29%; top: -43px; color: rgba(255,255,255,.08); font-size: 210px; line-height: 1; transform: rotate(17deg); }
.dashboard-hero .eyebrow { color: #d7e9da; }
.dashboard-hero h1 { position: relative; z-index: 1; max-width: 580px; margin: 13px 0 10px; font-size: clamp(30px, 4.3vw, 48px); line-height: 1.05; letter-spacing: -.065em; }
.dashboard-hero p { position: relative; z-index: 1; max-width: 470px; margin: 0; color: rgba(255,255,255,.73); font-size: 14px; line-height: 1.7; }
.hero-orbit { position: relative; z-index: 1; width: 210px; height: 210px; justify-self: center; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.22); border-radius: 50%; background: rgba(255,255,255,.06); }
.hero-orbit::before, .hero-orbit::after { position: absolute; content: ''; border: 1px solid rgba(255,255,255,.17); border-radius: 50%; }
.hero-orbit::before { inset: 17px; }
.hero-orbit::after { inset: 38px; }
.hero-orbit img { z-index: 2; width: 104px; height: 104px; border: 4px solid rgba(255,255,255,.8); border-radius: 50%; object-fit: cover; box-shadow: 0 12px 30px rgba(0,0,0,.23); }
.hero-orbit .orbit-star { position: absolute; color: #f1c77c; font-size: 22px; }
.hero-orbit .s1 { top: 20px; right: 32px; }
.hero-orbit .s2 { bottom: 22px; left: 26px; font-size: 14px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 15px; margin: 0 0 18px; }
.section-heading h2 { margin: 0; color: var(--pine); font-size: 22px; letter-spacing: -.05em; }
.section-heading p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.room-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.room-card { overflow: hidden; border: 1px solid #e5e8df; border-radius: 19px; background: var(--paper); box-shadow: 0 5px 20px rgba(28,49,38,.035); transition: transform .18s, box-shadow .18s; }
.room-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.room-card-main { display: flex; align-items: center; gap: 13px; width: 100%; padding: 18px 17px 13px; border: 0; color: inherit; text-align: left; background: transparent; }
.room-cover { width: 66px; height: 66px; flex: 0 0 66px; display: grid; place-items: center; overflow: hidden; border-radius: 16px; color: var(--pine); background: linear-gradient(135deg, #e4eee0, #f6e6ce); }
.room-cover img { width: 100%; height: 100%; object-fit: cover; }
.room-cover span { font-size: 27px; }
.room-card-info { min-width: 0; flex: 1; }
.room-card-info strong { display: block; overflow: hidden; color: var(--pine); font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.room-card-info small { display: block; margin-top: 6px; color: var(--muted); font-size: 11px; }
.room-card-bottom { display: flex; align-items: center; justify-content: space-between; padding: 11px 17px 15px; border-top: 1px solid #f0f1eb; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border-radius: 99px; color: #31644c; background: #edf5eb; font-size: 10px; font-weight: 800; }
.status-pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-pill.drawn { color: #956329; background: #fff3df; }
.room-arrow { color: #9aa59b; font-size: 18px; }
.empty-state { display: flex; flex-direction: column; align-items: center; padding: 56px 24px; border: 1px dashed #ccd7ca; border-radius: 22px; background: rgba(255,254,250,.68); text-align: center; }
.empty-state-icon { width: 70px; height: 70px; display: grid; place-items: center; margin-bottom: 15px; border-radius: 50%; background: #e9f0e6; font-size: 31px; }
.empty-state h3 { margin: 0 0 7px; color: var(--pine); font-size: 19px; }
.empty-state p { max-width: 340px; margin: 0 0 20px; color: var(--muted); font-size: 13px; line-height: 1.7; }

.room-header { margin-bottom: 23px; }
.back-link { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 17px; padding: 0; border: 0; color: var(--muted); background: none; font-size: 12px; font-weight: 800; }
.room-hero { display: flex; align-items: center; gap: 21px; padding: clamp(20px, 4vw, 31px); border: 1px solid rgba(18,62,50,.08); border-radius: var(--radius-xl); background: var(--paper); box-shadow: 0 8px 30px rgba(28,49,38,.04); }
.room-hero-cover { width: 104px; height: 104px; flex: 0 0 104px; display: grid; place-items: center; overflow: hidden; border-radius: 23px; background: linear-gradient(135deg, #e6efe1, #fae8cf); }
.room-hero-cover img { width: 100%; height: 100%; object-fit: cover; }
.room-hero-cover span { font-size: 43px; }
.room-hero-copy { min-width: 0; flex: 1; }
.room-hero-copy h1 { margin: 8px 0 6px; color: var(--pine); font-size: clamp(25px, 4vw, 36px); letter-spacing: -.06em; overflow-wrap: anywhere; }
.room-meta { display: flex; flex-wrap: wrap; gap: 9px 15px; color: var(--muted); font-size: 11px; }
.room-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; align-items: start; gap: 20px; margin-top: 20px; }
.panel { padding: 22px; border: 1px solid #e5e8df; border-radius: 20px; background: var(--paper); box-shadow: 0 5px 20px rgba(28,49,38,.035); }
.panel h2 { margin: 0; color: var(--pine); font-size: 18px; letter-spacing: -.04em; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 17px; }
.count-badge { display: inline-grid; min-width: 28px; height: 28px; place-items: center; padding: 0 8px; border-radius: 99px; color: var(--pine); background: var(--mint-2); font-size: 11px; font-weight: 800; }
.member-list { display: grid; gap: 4px; }
.member-row { display: flex; align-items: center; gap: 12px; padding: 10px 3px; }
.member-row + .member-row { border-top: 1px solid #f0f1eb; }
.member-row img { width: 43px; height: 43px; border: 2px solid #eef2e9; border-radius: 50%; object-fit: cover; }
.member-info { min-width: 0; flex: 1; }
.member-info strong { display: block; color: #30443a; font-size: 13px; }
.member-info small { display: block; margin-top: 3px; color: #9aa49b; font-size: 10px; }
.organizer-tag { padding: 5px 8px; border-radius: 8px; color: #9a6b29; background: #fff3de; font-size: 9px; font-weight: 800; }
.side-stack { display: grid; gap: 14px; }
.action-panel { padding: 21px; border-radius: 20px; color: #fff; background: linear-gradient(145deg, #123e32, #235d49); box-shadow: 0 12px 25px rgba(18,62,50,.13); }
.action-panel h2 { margin: 0 0 7px; font-size: 18px; letter-spacing: -.04em; }
.action-panel p { margin: 0 0 17px; color: rgba(255,255,255,.7); font-size: 12px; line-height: 1.65; }
.action-panel .btn-primary { color: var(--pine); background: #fffefa; box-shadow: none; }
.action-panel .btn-primary:hover:not(:disabled) { background: #eff4e9; }
.action-panel .btn-gold { color: #563b16; }
.action-divider { height: 1px; margin: 16px 0; background: rgba(255,255,255,.17); }
.invite-link-box { display: grid; gap: 10px; }
.invite-link-box p { margin: 0; }
.invite-url { overflow: hidden; padding: 10px 11px; border: 1px solid rgba(255,255,255,.2); border-radius: 10px; color: #e6f0e8; background: rgba(0,0,0,.14); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.organizer-actions { display: grid; gap: 8px; padding: 17px; border: 1px solid #e5e8df; border-radius: 18px; background: #fffefa; }
.organizer-actions h3 { margin: 0 0 4px; color: var(--pine); font-size: 12px; }
.organizer-actions .subtle { font-size: 11px; }

.profile-page { width: min(100%, 720px); margin: 0 auto; }
.profile-card, .profile-form-card { padding: clamp(22px, 5vw, 38px); border: 1px solid rgba(18,62,50,.08); border-radius: var(--radius-xl); background: var(--paper); box-shadow: var(--shadow); }
.profile-heading { display: flex; align-items: center; gap: 25px; margin-bottom: 30px; }
.profile-avatar-button { position: relative; width: 154px; height: 154px; flex: 0 0 154px; padding: 0; overflow: hidden; border: 5px solid #fff; border-radius: 50%; background: #e8eee5; box-shadow: 0 8px 26px rgba(18,62,50,.15); }
.profile-avatar-button img { display: block; width: 100%; height: 100%; object-fit: cover; }
.profile-avatar-edit { position: absolute; right: 5px; bottom: 5px; display: grid; width: 36px; height: 36px; place-items: center; border: 3px solid #fff; border-radius: 50%; color: #fff; background: var(--pine); font-size: 19px; }
.profile-heading-copy h1, .profile-form-card h1 { margin: 9px 0 7px; color: var(--pine); font-size: clamp(27px, 5vw, 36px); letter-spacing: -.06em; }
.profile-heading-copy p, .profile-form-card > .subtle { margin: 0; }
.profile-details { display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; margin: 0 0 24px; border: 1px solid #e7ebe3; border-radius: 16px; }
.profile-detail { display: grid; gap: 6px; min-width: 0; padding: 16px 18px; }
.profile-detail:nth-child(2) { border-left: 1px solid #e7ebe3; }
.profile-detail:nth-child(3) { grid-column: 1 / -1; border-top: 1px solid #e7ebe3; }
.profile-detail span { color: var(--muted); font-size: 11px; font-weight: 700; }
.profile-detail strong { overflow-wrap: anywhere; color: var(--ink); font-size: 15px; }
.profile-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.profile-form-card { width: min(100%, 600px); margin: 0 auto; }
.profile-form-card > .subtle { margin: 0 0 25px; }
.profile-form-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin-top: 5px; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }

.result-section { margin-top: 17px; }
.result-cta { padding: 24px; border: 1px solid #e6e9df; border-radius: 20px; background: linear-gradient(135deg, #fffefa, #f4f5e9); text-align: center; }
.result-cta .gift-icon { font-size: 32px; }
.result-cta h2 { margin: 8px 0; color: var(--pine); font-size: 21px; letter-spacing: -.04em; }
.result-cta p { max-width: 380px; margin: 0 auto 17px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.result-card { display: flex; align-items: center; gap: 17px; padding: 22px; border: 1px solid #e5d6bd; border-radius: 20px; background: radial-gradient(circle at 90% 5%, rgba(217,154,64,.17), transparent 33%), linear-gradient(135deg, #fffefa, #f8f0df); box-shadow: 0 12px 26px rgba(130,91,35,.08); }
.result-card img { width: 76px; height: 76px; flex: 0 0 76px; border: 4px solid #fff; border-radius: 50%; object-fit: cover; box-shadow: 0 5px 17px rgba(82,55,22,.12); }
.result-copy small { display: block; color: #98703b; font-size: 10px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.result-copy h2 { margin: 6px 0 0; color: var(--pine); font-size: clamp(21px, 3vw, 28px); line-height: 1.15; letter-spacing: -.05em; }
.result-copy p { margin: 6px 0 0; color: #8b7d67; font-size: 11px; }

.roulette-card-wrap { margin-top: 18px; padding: 20px 0 18px; overflow: hidden; border: 1px solid #e3e8dc; border-radius: 20px; background: #fdfdf8; }
.roulette-caption { padding: 0 20px 13px; color: var(--muted); font-size: 11px; font-weight: 800; text-align: center; }
.roulette-window { position: relative; height: 148px; overflow: hidden; }
.roulette-window::before, .roulette-window::after { position: absolute; z-index: 2; top: 0; bottom: 0; width: min(12%, 100px); content: ''; pointer-events: none; }
.roulette-window::before { left: 0; background: linear-gradient(90deg, #fdfdf8, rgba(253,253,248,0)); }
.roulette-window::after { right: 0; background: linear-gradient(270deg, #fdfdf8, rgba(253,253,248,0)); }
.roulette-pointer { position: absolute; z-index: 4; top: 0; bottom: 0; left: 50%; width: 2px; background: var(--gold); transform: translateX(-50%); box-shadow: 0 0 0 1px rgba(217,154,64,.12); }
.roulette-pointer::before { position: absolute; top: 0; left: 50%; content: ''; border: 7px solid transparent; border-top: 10px solid var(--gold); transform: translateX(-50%); }
.roulette-track { position: absolute; top: 5px; left: 0; display: flex; align-items: stretch; gap: 9px; width: max-content; height: 132px; padding: 0 20px; will-change: transform; }
.roulette-card { width: 92px; flex: 0 0 92px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; padding: 9px 6px; border: 1px solid #e9ece4; border-radius: 13px; background: #fff; }
.roulette-card img { width: 57px; height: 57px; border: 2px solid #eef1e9; border-radius: 50%; object-fit: cover; }
.roulette-card span { display: block; width: 100%; overflow: hidden; color: #526159; font-size: 9px; font-weight: 800; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.roulette-card.winner { border: 2px solid var(--gold); background: #fff3dc; box-shadow: 0 5px 20px rgba(217,154,64,.24); transform: scale(1.04); }
.roulette-card.winner img { border-color: var(--gold); }
.roulette-note { margin: 12px 20px 0; color: #9aa49b; font-size: 10px; text-align: center; }

.modal-backdrop { position: fixed; z-index: 20; inset: 0; display: grid; place-items: center; overflow-y: auto; padding: 20px; background: rgba(12,32,26,.55); backdrop-filter: blur(5px); }
.modal-card { width: min(100%, 460px); max-height: calc(100vh - 40px); overflow-y: auto; padding: 25px; border-radius: 23px; background: var(--paper); box-shadow: 0 25px 80px rgba(0,0,0,.24); }
.modal-head { display: flex; align-items: start; justify-content: space-between; gap: 15px; margin-bottom: 17px; }
.modal-head h2 { margin: 0; color: var(--pine); font-size: 22px; letter-spacing: -.05em; }
.modal-close { width: 33px; height: 33px; border: 0; border-radius: 50%; color: var(--muted); background: #f0f2eb; font-size: 19px; }
.modal-actions { display: flex; justify-content: end; flex-wrap: wrap; gap: 9px; margin-top: 19px; }
.toast-region { position: fixed; z-index: 50; right: 18px; bottom: 18px; display: grid; gap: 8px; width: min(360px, calc(100% - 36px)); }
.toast { padding: 13px 16px; border: 1px solid rgba(255,255,255,.12); border-radius: 13px; color: #fff; background: #173f33; box-shadow: 0 10px 30px rgba(0,0,0,.2); font-size: 12px; line-height: 1.55; animation: toast-in .2s ease-out; }
.toast.error { background: #90423c; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.spinner { width: 17px; height: 17px; border: 2px solid rgba(255,255,255,.35); border-top-color: currentColor; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-line { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 22px; color: var(--muted); font-size: 12px; }
.loading-line .spinner { color: var(--pine); border-color: #dfe8dc; border-top-color: var(--pine); }
.footer-note { margin: 30px 0 0; color: #a1aaa2; font-size: 10px; text-align: center; }

@media (max-width: 850px) {
  .auth-layout { grid-template-columns: 1fr minmax(320px, 410px); gap: 30px; }
  .auth-art { width: min(100%, 300px); }
  .room-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .room-layout { grid-template-columns: minmax(0, 1fr) 285px; }
}
@media (max-width: 680px) {
  .app-shell { width: min(100% - 28px, 520px); padding-top: 16px; padding-bottom: 40px; }
  .topbar { margin-bottom: 20px; }
  .brand { font-size: 15px; }
  .brand-mark { width: 37px; height: 37px; }
  .user-chip { padding-right: 7px; }
  .user-chip span { display: block; max-width: 105px; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
  .auth-layout { display: flex; flex-direction: column; align-items: stretch; gap: 18px; min-height: auto; padding: 30px 0; }
  .auth-intro { padding: 0; text-align: center; }
  .auth-intro .eyebrow { justify-content: center; }
  .auth-intro h1 { max-width: 470px; margin: 13px auto 11px; font-size: clamp(41px, 11vw, 56px); }
  .auth-intro p { margin: 0 auto; font-size: 13px; }
  .auth-art { display: none; }
  .auth-card { padding: 23px; }
  .dashboard-hero { grid-template-columns: 1fr; min-height: 235px; padding: 25px; }
  .dashboard-hero h1 { font-size: 34px; }
  .dashboard-hero p { max-width: 360px; font-size: 12px; }
  .hero-orbit { position: absolute; right: -35px; bottom: -47px; width: 160px; height: 160px; opacity: .45; }
  .hero-orbit img { width: 80px; height: 80px; }
  .dashboard-hero::after { right: -20px; top: 70px; font-size: 145px; }
  .section-heading { align-items: center; }
  .section-heading h2 { font-size: 19px; }
  .room-grid { grid-template-columns: 1fr; gap: 10px; }
  .room-card-main { padding: 13px 14px 10px; }
  .room-cover { width: 57px; height: 57px; flex-basis: 57px; border-radius: 14px; }
  .room-card-bottom { padding: 9px 14px 12px; }
  .room-hero { align-items: flex-start; gap: 14px; padding: 17px; border-radius: 20px; }
  .room-hero-cover { width: 75px; height: 75px; flex-basis: 75px; border-radius: 17px; }
  .room-hero-copy h1 { margin-top: 5px; font-size: 24px; }
  .room-meta { gap: 7px 10px; font-size: 10px; }
  .room-layout { display: flex; flex-direction: column; gap: 12px; }
  .room-layout > * { width: 100%; }
  .panel { padding: 18px; }
  .side-stack { order: -1; }
  .action-panel { padding: 19px; }
  .organizer-actions { padding: 15px; }
  .result-card { gap: 13px; padding: 17px; }
  .result-card img { width: 62px; height: 62px; flex-basis: 62px; }
  .result-copy h2 { font-size: 21px; }
  .roulette-card-wrap { padding-top: 15px; }
  .roulette-window { height: 134px; }
  .roulette-track { height: 120px; }
  .roulette-card { width: 84px; flex-basis: 84px; height: 120px; }
  .roulette-card img { width: 52px; height: 52px; }
  .form-row { grid-template-columns: 1fr; }
  .profile-heading { align-items: center; flex-direction: column; gap: 15px; text-align: center; }
  .profile-avatar-button { width: 138px; height: 138px; flex-basis: 138px; }
  .profile-actions { grid-template-columns: 1fr; }
  .profile-detail { padding: 14px; }
  .profile-detail strong { font-size: 14px; }
}
@media (max-width: 380px) {
  .app-shell { width: calc(100% - 22px); }
  .auth-card { padding: 19px; }
  .room-hero-cover { width: 62px; height: 62px; flex-basis: 62px; }
  .room-hero-copy h1 { font-size: 21px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
