/* UNRINKED shared UI. The tutorial's playful blue button is the reference. */
body.clubhouse-home {
  --ui-ink:#124886; --ui-ink-strong:#08285b; --ui-muted:#416b98;
  --ui-ice:#c5eafa; --ui-surface:#f4fbff; --ui-line:#b4d8ee;
  --ui-primary-fill:linear-gradient(180deg,#63dfff 0%,#168bd7 68%,#0870bd 100%);
  --ui-primary-edge:#126cb6; --ui-primary-shadow:0 3px 0 #075991,inset 0 2px 0 #e4ffff;
  --ui-secondary-fill:linear-gradient(180deg,#f9fdff,#dceffc);
  --ui-secondary-shadow:0 2px 0 #86b4d2,inset 0 1px 0 #fff;
  --ui-panel-fill:linear-gradient(150deg,#f7fdff,#e1f1fc);
  --ui-panel-shadow:0 3px 0 #90b9d180,0 10px 24px #164b7319;
  --ui-display:'Lilita One','Nunito',system-ui,sans-serif;
  --ui-body:'Nunito',system-ui,sans-serif;
  --ui-radius:16px; --ui-panel-radius:24px;
  font-family:var(--ui-body);
}
/* One primary action family, with distinct disabled and pressed feedback. */
body.clubhouse-home #html-lobby:not(.room-view) #lobby-play,
body.clubhouse-home #html-lobby #queue-panel #queue-launch,
body.clubhouse-home #html-lobby #room-panel .room-actions :is(#lobby-start,#lobby-guest-start),
body.clubhouse-home #html-lobby:not(.room-view) #friends-panel #lobby-host,
body.clubhouse-home #play-guide #guide-done,
body.clubhouse-home #boot .boot-dock #boot-retry,
body.clubhouse-home #flow-recovery #flow-retry,
body.clubhouse-home .penguin-preview .preview-done,
body.clubhouse-home #touch-controls > .snow-lock,
body.clubhouse-home #spectate-leave,
body.clubhouse-home #back-to-game {
  border:2px solid var(--ui-primary-edge); border-radius:var(--ui-radius);
  background:var(--ui-primary-fill); color:#fff; box-shadow:var(--ui-primary-shadow);
  font-family:var(--ui-display); font-weight:400; letter-spacing:.025em;
  text-shadow:0 1px 0 #075991; cursor:pointer;
  transition:transform .12s ease,box-shadow .12s ease,filter .12s ease;
}
body.clubhouse-home #html-lobby:not(.room-view) #lobby-play { font-size:clamp(26px,7vw,34px); }
body.clubhouse-home #html-lobby #queue-panel #queue-launch,
body.clubhouse-home #html-lobby #room-panel .room-actions :is(#lobby-start,#lobby-guest-start),
body.clubhouse-home #play-guide #guide-done,
body.clubhouse-home #boot .boot-dock #boot-retry,
body.clubhouse-home .penguin-preview .preview-done { min-height:52px; font-size:24px; }
body.clubhouse-home #html-lobby:not(.room-view) #friends-panel #lobby-host,
body.clubhouse-home #flow-recovery #flow-retry,
body.clubhouse-home #spectate-leave,
body.clubhouse-home #back-to-game { font-size:20px; }
body.clubhouse-home #touch-controls > .snow-lock { min-height:76px; font-size:clamp(27px,7.5vw,34px); }
body.clubhouse-home #html-lobby:not(.room-view) #lobby-play:active:not(:disabled),
body.clubhouse-home #html-lobby #queue-panel #queue-launch:active:not(:disabled),
body.clubhouse-home #html-lobby #room-panel .room-actions :is(#lobby-start,#lobby-guest-start):active:not(:disabled),
body.clubhouse-home #html-lobby:not(.room-view) #friends-panel #lobby-host:active:not(:disabled),
body.clubhouse-home #play-guide #guide-done:active,
body.clubhouse-home #boot .boot-dock #boot-retry:active,
body.clubhouse-home #flow-recovery #flow-retry:active,
body.clubhouse-home .penguin-preview .preview-done:active:not(:disabled),
body.clubhouse-home #touch-controls > .snow-lock:active:not(:disabled),
body.clubhouse-home #back-to-game:active { transform:translateY(2px); box-shadow:0 1px 0 #075991,inset 0 1px 0 #d9faff; }
body.clubhouse-home #spectate-leave:active { transform:translateX(-50%) translateY(2px); box-shadow:0 1px 0 #075991,inset 0 1px 0 #d9faff; }
body.clubhouse-home #html-lobby:not(.room-view) #lobby-play:disabled,
body.clubhouse-home #html-lobby #queue-panel #queue-launch:disabled,
body.clubhouse-home #html-lobby #room-panel .room-actions :is(#lobby-start,#lobby-guest-start):disabled,
body.clubhouse-home #html-lobby:not(.room-view) #friends-panel #lobby-host:disabled,
body.clubhouse-home .penguin-preview .preview-done:disabled,
body.clubhouse-home #touch-controls > .snow-lock:disabled {
  background:linear-gradient(#d7edf9,#b8d8ed); border-color:#94bbd5; color:#416b88;
  box-shadow:0 2px 0 #8aaec5; text-shadow:none; opacity:1; cursor:default;
}
/* Shared panel finish, without putting opaque paint over the Unity model. */
body.clubhouse-home #play-guide,
body.clubhouse-home #flow-recovery,
body.clubhouse-home #html-lobby #queue-panel,
body.clubhouse-home #html-lobby.room-view #home-card,
body.clubhouse-home #mobile-settings #mobile-settings-panel,
body.clubhouse-home .preview-header,
body.clubhouse-home .preview-controls,
body.clubhouse-home.coming-soon main {
  border:1px solid #c4e5f8; border-top-color:#fff; border-radius:var(--ui-panel-radius);
  background:var(--ui-panel-fill); color:var(--ui-ink);
  box-shadow:var(--ui-panel-shadow); backdrop-filter:none;
}
body.clubhouse-home #html-lobby #queue-panel { padding:22px; text-align:center; }
body.clubhouse-home #play-guide,
body.clubhouse-home #flow-recovery { padding:28px 22px 24px; font-family:var(--ui-body); }
body.clubhouse-home :is(#play-guide,#flow-recovery)::backdrop { background:#08285ba8; backdrop-filter:blur(3px); }
body.clubhouse-home :is(#guide-title,#flow-recovery-title),
body.clubhouse-home #queue-panel h2,
body.clubhouse-home #room-panel .room-heading h2,
body.clubhouse-home .penguin-preview h1,
body.clubhouse-home.coming-soon h1 {
  color:var(--ui-ink); font-family:var(--ui-display); font-size:28px; font-weight:400;
  line-height:1.1; letter-spacing:.015em; text-shadow:none;
}
body.clubhouse-home :is(.flow-copy,.guide-tip,.queue-sub,.preview-note,.collection-count,.preview-color-name),
body.clubhouse-home #room-panel :is(.lobby-status-line,.fill-hint,.start-hint,.host-settings-label,.lobby-roster-count),
body.clubhouse-home #mobile-settings-panel small { color:var(--ui-muted); font-family:var(--ui-body); }
body.clubhouse-home #guide-intro { font-size:14px; }
body.clubhouse-home .guide-steps h3 { font:400 19px/1.2 var(--ui-display); color:var(--ui-ink); }
body.clubhouse-home .guide-steps p { color:var(--ui-muted); font:800 13px/1.5 var(--ui-body); }
body.clubhouse-home .guide-number { background:#168bd7; font-family:var(--ui-display); }
body.clubhouse-home .guide-tip { font-size:12px; border:1px solid #c8e4f3; background:#ffffff8c; }
body.clubhouse-home .guide-lock-art { border:1px solid var(--ui-primary-edge); border-radius:10px; background:var(--ui-primary-fill); box-shadow:0 2px 0 #075991,inset 0 1px 0 #e4ffff; font:400 12px/1.1 var(--ui-display); }
/* Secondary actions and icon controls share a quieter blue treatment. */
body.clubhouse-home #html-lobby:not(.room-view) #friends-panel #lobby-join,
body.clubhouse-home #room-panel :is(.room-leave,.fill-pick,.bot-stepper button),
body.clubhouse-home .flow-actions button,
body.clubhouse-home #play-guide #guide-skip,
body.clubhouse-home .penguin-preview :is(.preview-close,.collection-back,.view-all),
body.clubhouse-home .collection-filters button,
body.clubhouse-home #mobile-settings :is(#mobile-settings-toggle,#music-mute,#unity-fullscreen-button,#effects-mute),
body.clubhouse-home > :is(#music-mute,#unity-fullscreen-button) {
  min-height:44px; border:1px solid #9dcdf1; border-radius:13px;
  background:var(--ui-secondary-fill); color:var(--ui-ink); box-shadow:var(--ui-secondary-shadow);
  font-family:var(--ui-body); font-weight:900; text-shadow:none; letter-spacing:0;
}
body.clubhouse-home #room-panel :is(.room-leave,.fill-pick,.bot-stepper button),
body.clubhouse-home .flow-actions button,
body.clubhouse-home #play-guide #guide-skip { font-size:13px; }
body.clubhouse-home #room-panel .room-leave { padding:8px 12px; }
body.clubhouse-home #room-panel .fill-pick.on,
body.clubhouse-home .collection-filters button[aria-pressed=true] {
  border-color:var(--ui-primary-edge); background:var(--ui-primary-fill); color:#fff;
  box-shadow:0 2px 0 #075991,inset 0 1px 0 #e4ffff; text-shadow:0 1px 0 #075991;
}
body.clubhouse-home #room-panel :is(.fill-pick,.bot-stepper button):active:not(:disabled),
body.clubhouse-home .flow-actions button:active:not(:disabled),
body.clubhouse-home .penguin-preview :is(.preview-close,.collection-back,.view-all):active:not(:disabled),
body.clubhouse-home .collection-filters button:active { transform:translateY(1px); box-shadow:0 1px 0 #86b4d2; }
body.clubhouse-home #room-panel .bot-stepper button:disabled { opacity:.45; box-shadow:none; }
body.clubhouse-home #html-lobby #queue-panel #queue-cancel {
  border:0; border-radius:12px; background:none; box-shadow:none; color:var(--ui-muted);
  font:900 14px/1.2 var(--ui-body); text-shadow:none; letter-spacing:0; min-height:44px;
}
body.clubhouse-home #html-lobby #queue-panel .queue-seats i { border:1px solid #b5d8ed; box-shadow:none; background-color:#e0eff9; }
body.clubhouse-home #html-lobby #queue-panel .queue-seats i.on { border-color:#168bd7; box-shadow:0 0 0 1px #168bd7; }
body.clubhouse-home #html-lobby #queue-panel .queue-status { color:var(--ui-ink); letter-spacing:0; font:900 14px/1.4 var(--ui-body); }
body.clubhouse-home #html-lobby #queue-panel .queue-pulse { background:#168bd7; box-shadow:none; }
/* Room form and roster retain their scroll/fixed-action behavior. */
body.clubhouse-home #html-lobby:not(.room-view) #friends-panel { border:1px solid #c4e5f8; background:var(--ui-panel-fill); box-shadow:0 2px 0 #90b9d14d; }
body.clubhouse-home #room-panel .room-body > .lobby-meta { border:1px solid var(--ui-line); border-radius:16px; background:#ffffffb8; }
body.clubhouse-home #room-panel #lobby-room { color:var(--ui-ink); font:400 30px/1.2 var(--ui-display); letter-spacing:.1em; }
body.clubhouse-home #room-panel #lobby-roster-list li { border:1px solid var(--ui-line); border-radius:12px; background:#f7fcff; color:var(--ui-ink); }
body.clubhouse-home #room-panel #lobby-roster-list li.is-you { border-color:#168bd7; background:#dff3ff; }
body.clubhouse-home #room-panel #lobby-roster-list li .tag { color:var(--ui-muted); font-family:var(--ui-body); }
body.clubhouse-home #html-lobby:not(.room-view) #friends-panel #lobby-code,
body.clubhouse-home .penguin-preview #skin-search,
body.clubhouse-home #flow-invite-url {
  min-height:46px; border:1px solid #9dcdf1; border-radius:13px; background:#fff;
  color:var(--ui-ink); box-shadow:inset 0 2px 4px #1248860b; font-family:var(--ui-body);
}
body.clubhouse-home #html-lobby:not(.room-view) #friends-panel #lobby-code[aria-invalid=true] { border-color:#ae465c; }
/* Wardrobe uses the same panels and blue actions, while skins remain the focus. */
body.clubhouse-home .penguin-preview { --wardrobe-ink:var(--ui-ink); box-shadow:none; font-family:var(--ui-body); }
body.clubhouse-home .preview-header { padding:12px 14px; }
body.clubhouse-home .preview-eyebrow { color:var(--ui-muted); letter-spacing:1.6px; }
body.clubhouse-home .preview-stage { border:0; box-shadow:none; background:none; }
body.clubhouse-home .preview-nameplate { border:1px solid #c4e5f8; border-radius:14px; background:#edf9ffdf; box-shadow:0 2px 0 #9bc2da70; }
body.clubhouse-home .penguin-preview .preview-outfit-name { color:var(--ui-ink); font:400 26px/1.1 var(--ui-display); text-shadow:none; }
body.clubhouse-home .preview-controls { padding:12px; }
body.clubhouse-home .penguin-preview .preview-section-heading h2 { color:var(--ui-ink); font:400 22px/1.2 var(--ui-display); }
body.clubhouse-home .penguin-preview .view-all { font-size:12px!important; }
body.clubhouse-home .penguin-preview .preview-skin {
  border:1px solid #b5d8ed; border-radius:14px; background:linear-gradient(#f6fcff,#e4f3fc);
  box-shadow:0 2px 0 #9fc4db80; color:var(--ui-ink);
}
body.clubhouse-home .penguin-preview .preview-skin[aria-pressed=true] { border:2px solid #168bd7; padding:3px 3px 6px; background:#d9f1ff; box-shadow:0 2px 0 #168bd7; }
body.clubhouse-home .preview-card-name { font-family:var(--ui-display); font-size:14px; letter-spacing:.01em; }
body.clubhouse-home .collection-grid .preview-card-name { font-size:16px; }
body.clubhouse-home .preview-card-rarity { font-family:var(--ui-body); }
body.clubhouse-home .preview-equipped { border:1px solid #e4f7ff; border-radius:6px; background:#126cb6; font:900 9px/1.2 var(--ui-body); }
body.clubhouse-home .preview-note { font-size:11px; }
body.clubhouse-home .penguin-preview[data-collection=true] { background:var(--ui-ice); }
body.clubhouse-home .collection-filters button { font-size:12px; }
body.clubhouse-home .preview-color-name { font-size:12px; }
/* Settings: matched specificity deliberately replaces the old beveled tile. */
body.clubhouse-home #mobile-settings #mobile-settings-toggle {
  display:grid; place-items:center; width:44px; height:44px; padding:9px;
  border-radius:14px; box-shadow:var(--ui-secondary-shadow);
}
body.clubhouse-home #mobile-settings #mobile-settings-toggle .home-gear { width:25px; height:25px; }
body.clubhouse-home #mobile-settings #mobile-settings-panel { padding:12px; gap:9px; width:154px; border-radius:18px; }
body.clubhouse-home #mobile-settings #mobile-settings-panel[hidden] { display:none; }
body.clubhouse-home #mobile-settings #mobile-settings-panel :is(#music-mute,#unity-fullscreen-button) { width:48px; height:48px; }
body.clubhouse-home #mobile-settings #mobile-settings-panel #effects-mute { font-size:13px; }
body.clubhouse-home #mobile-settings #mobile-settings-panel :is(#music-mute,#effects-mute).is-muted,
body.clubhouse-home > #music-mute.is-muted { background:#d1e4f1; border-color:#91b7d1; color:#53758e; }
body.clubhouse-home #mobile-settings #audio-credits { color:var(--ui-muted); font:800 12px/1.4 var(--ui-body); }
body.clubhouse-home #mobile-settings-panel small { font-size:12px; }
/* Recovery is recognizably part of the same game, with semantic errors retained. */
body.clubhouse-home #unity-warning > div { border:1px solid #b4d8ee; border-radius:16px; background:#eff9ff!important; color:var(--ui-ink)!important; box-shadow:var(--ui-panel-shadow); font:800 14px/1.5 var(--ui-body); }
body.clubhouse-home #unity-warning > div[data-tone=error] { border-color:#c77988; }
body.clubhouse-home #unity-warning > div[data-tone=warning] { border-color:#cfb36a; }
body.clubhouse-home #flow-result-note { border:1px solid #b4d8ee; background:#f3fbfff2; color:var(--ui-ink); font:900 13px/1.4 var(--ui-body); box-shadow:0 2px 8px #12488615; }
body.clubhouse-home #lobby-code-error { color:#96374d; }
/* Home keeps its art, icons and layout; name fits actual letter widths. */
body.clubhouse-home .home-name { flex:0 1 auto; max-width:68%; min-width:0; }
body.clubhouse-home #html-lobby:not(.room-view) #lobby-name { flex:0 1 auto; min-width:3ch; max-width:calc(100% - 37px); padding-inline:3px; box-sizing:content-box; }
body.clubhouse-home #html-lobby:not(.room-view) #lobby-play svg { width:29px; height:29px; }
body.clubhouse-home #html-lobby:not(.room-view) .home-menu-action,
body.clubhouse-home #html-lobby:not(.room-view) #guest-wardrobe { color:var(--ui-ink-strong); }
/* Loading uses the shared blue finish but preserves live progress behavior. */
body.clubhouse-home #boot .boot-bar { height:10px; border:1px solid #9dcdf1; background:#d7eaf7; box-shadow:inset 0 1px 2px #12488615; }
body.clubhouse-home #boot .boot-bar > i { background:var(--ui-primary-fill); }
body.clubhouse-home #boot :is(.boot-status,.boot-pct,.boot-tip) { color:var(--ui-muted); font-family:var(--ui-body); text-shadow:none; }
body.clubhouse-home #boot .boot-pct { font-weight:900; }
/* Common focus feedback. Existing hidden/state rules and dial geometry are untouched. */
body.clubhouse-home :is(#html-lobby,#mobile-settings,#play-guide,#flow-recovery,.penguin-preview) :is(button,a,input):focus-visible,
body.clubhouse-home > :is(#music-mute,#unity-fullscreen-button):focus-visible,
body.clubhouse-home #back-to-game:focus-visible { outline:2px solid #126cb6; outline-offset:3px; }
body.clubhouse-home .penguin-preview :is(.preview-skin,.preview-swatch):focus-visible { outline:none; box-shadow:inset 0 0 0 2px #126cb6; }
body.clubhouse-home #touch-controls > .snow-lock:focus-visible { outline:2px solid #126cb6; outline-offset:5px; }
@media (max-height:700px) and (orientation:portrait) {
  body.clubhouse-home .preview-header { padding-block:7px; }
  body.clubhouse-home .penguin-preview .preview-outfit-name { font-size:22px; }
  body.clubhouse-home .preview-controls { padding-block:8px; }
  body.clubhouse-home .penguin-preview .preview-done { min-height:46px; font-size:22px!important; }
  body.clubhouse-home .preview-card-name { font-size:12px; }
}
@media (orientation:landscape) and (max-height:540px) {
  body.clubhouse-home #touch-controls > .snow-lock { min-height:62px; font-size:27px; }
}
@media (prefers-reduced-motion:reduce) { body.clubhouse-home :is(button,a) { transition:none!important; } }
/* Remove legacy decoration and duplicate affordances in the room flow. */
body.clubhouse-home #html-lobby #home-card::before,
body.clubhouse-home #html-lobby #home-card::after { display:none; content:none; }
body.clubhouse-home #html-lobby #friends-panel > summary { display:none; }
body.clubhouse-home #room-panel :is(.lobby-roster-label,.host-settings-label) { font:900 12px/1.4 var(--ui-body); letter-spacing:.025em; }
body.clubhouse-home #room-panel :is(.lobby-status-line,.fill-hint,.start-hint,.lobby-roster-count) { font-size:13px; }
body.clubhouse-home #room-panel #lobby-roster-list li .tag { font-size:11px; letter-spacing:.02em; }
body.clubhouse-home #room-panel .player-dot { background:#168bd7; }
body.clubhouse-home #play-guide .guide-close {
  display:grid; place-items:center; width:44px; height:44px; padding:0;
  border:1px solid #9dcdf1; border-radius:13px; background:var(--ui-secondary-fill);
  color:var(--ui-ink); box-shadow:var(--ui-secondary-shadow); font:800 28px/1 var(--ui-body);
}
body.clubhouse-home #mobile-settings #mobile-settings-panel :is(#music-mute,#effects-mute).is-muted,
body.clubhouse-home > #music-mute.is-muted {
  background:#bedcee; border-color:#79a7c5; color:#315f82;
  box-shadow:inset 0 2px 3px #1d58822b;
}
/* Match the same ten-seat artwork on mouse and touch entry points. */
body.clubhouse-home #html-lobby #queue-panel .queue-seats { max-width:264px; gap:8px; margin:18px auto; }
body.clubhouse-home #html-lobby #queue-panel .queue-seats i { background-position:center; background-size:122%; background-repeat:no-repeat; filter:grayscale(1) opacity(.4); }
body.clubhouse-home #html-lobby #queue-panel .queue-seats i.on { filter:none; transform:translateY(-2px); }
body.clubhouse-home #queue-panel .queue-seats i:nth-child(1) { background-image:url('queue-portraits/portrait_0.png'); }
body.clubhouse-home #queue-panel .queue-seats i:nth-child(2) { background-image:url('queue-portraits/portrait_1.png'); }
body.clubhouse-home #queue-panel .queue-seats i:nth-child(3) { background-image:url('queue-portraits/portrait_2.png'); }
body.clubhouse-home #queue-panel .queue-seats i:nth-child(4) { background-image:url('queue-portraits/portrait_3.png'); }
body.clubhouse-home #queue-panel .queue-seats i:nth-child(5) { background-image:url('queue-portraits/portrait_4.png'); }
body.clubhouse-home #queue-panel .queue-seats i:nth-child(6) { background-image:url('queue-portraits/portrait_5.png'); }
body.clubhouse-home #queue-panel .queue-seats i:nth-child(7) { background-image:url('queue-portraits/portrait_6.png'); }
body.clubhouse-home #queue-panel .queue-seats i:nth-child(8) { background-image:url('queue-portraits/portrait_7.png'); }
body.clubhouse-home #queue-panel .queue-seats i:nth-child(9) { background-image:url('queue-portraits/portrait_8.png'); }
body.clubhouse-home #queue-panel .queue-seats i:nth-child(10) { background-image:url('queue-portraits/portrait_9.png'); }
body.clubhouse-home #html-lobby :is(#lobby-play,#queue-launch,#lobby-host,#lobby-join,#lobby-start,#lobby-guest-start):disabled,
body.clubhouse-home .penguin-preview button:disabled,
body.clubhouse-home #touch-controls > .snow-lock:disabled { transform:none; }
/* Short portrait screens keep identity below the penguins. Scale the art by
   width and reserve its illustrated height; let the menu scroll naturally. */
@media (max-width:599px) and (max-height:700px) and (orientation:portrait) {
  body.clubhouse-home #boot,
  body.clubhouse-home #html-lobby { background-size:100% auto; }
  body.clubhouse-home #html-lobby:not(.room-view) .lobby-hero {
    height:calc(108vw + env(safe-area-inset-top,0px));
    min-height:0;
  }
}
@media (max-width:359px) {
  body.clubhouse-home #html-lobby.room-view #home-card {
    width:calc(100% - 24px); padding:14px 12px;
  }
  body.clubhouse-home #room-panel .room-heading { gap:8px; }
  body.clubhouse-home #room-panel .room-heading h2 { font-size:24px; }
  body.clubhouse-home #room-panel .room-leave { padding-inline:9px; }
  body.clubhouse-home #html-lobby #room-panel .room-actions :is(#lobby-start,#lobby-guest-start) { font-size:22px; }
}
/* Wide screens use an at-least-850px backdrop. Reserve its illustrated portion
   before the menu rather than placing navy identity text on the penguin. */
@media (min-width:600px) {
  body.clubhouse-home #html-lobby:not(.room-view) .lobby-hero { height:max(510px,60svh); }
}
/* Keep the artwork registered to the scrolling menu. Viewport-based image
   height prevents an expanded private-room form from enlarging the art. */
body.clubhouse-home #boot,
body.clubhouse-home #html-lobby { background-size:auto max(100svh,740px); }
body.clubhouse-home #html-lobby { background-attachment:local; }
@media (min-width:600px) {
  body.clubhouse-home #boot,
  body.clubhouse-home #html-lobby { background-size:auto max(100svh,850px); }
}
@media (max-width:599px) and (max-height:700px) and (orientation:portrait) {
  body.clubhouse-home #boot,
  body.clubhouse-home #html-lobby { background-size:100% auto; }
}
