/* The room: the player's 3D room as the TCG's home screen (room/room.js).
   Only applies while body.room-ui is set (the room has loaded, the screen is big enough and the player
   hasn't chosen the classic menu). Everything else is the game's own css/style.css. */

#room-canvas { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 19; display: none; }
body.room-ui.room-home #room-canvas { display: block; }

/* the title screen becomes a see-through layer over the room: its own backdrop, menu, host and dock give way to the room
   and the menu on your table; the level/Carats bar, daily pill, profile, quests and packs stay floating */
body.room-ui #title { background: transparent; pointer-events: none; }
body.room-ui #title::after, body.room-ui #title .menu-sky, body.room-ui #title .menu-portal, body.room-ui #title .menu-cards,
body.room-ui #title .menu-vignette, body.room-ui #title .title-main, body.room-ui #title .dock, body.room-ui #title #arcfab { display: none !important; }
body.room-ui #title > * { pointer-events: auto; }

/* your companion: the game's own 2D host (art, poses, speech bubble), moved to the bottom-right corner until the
   3D companions are finished; its art already fades out at the bottom, so the portrait's edge never shows */
body.room-ui #title .title-inner { display: block; position: static; padding: 0; pointer-events: none; }
body.room-ui #title .title-host { position: fixed; z-index: 2; right: 10px; bottom: 0; width: clamp(170px, 16vw, 250px); }
body.room-ui #title .host-bubble { right: 30%; max-width: 230px; font-size: 0.86rem; }
body.room-ui.room-menu #title .title-host, body.room-ui.room-watch #title .title-host { display: none; }
.room-tease { display: none; }
body.room-ui .room-tease { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 6px 14px; border-radius: 12px; white-space: nowrap; background: rgba(7, 4, 15, .78); backdrop-filter: blur(10px);
  box-shadow: inset 0 0 0 1px rgba(56, 243, 255, .55), 0 0 18px rgba(56, 243, 255, .25); overflow: hidden; }
body.room-ui .room-tease b { font: 400 12px 'Russo One', Outfit, sans-serif; letter-spacing: .06em; color: #c9fbff; }
body.room-ui .room-tease b::before { content: '◈ '; color: #38f3ff; }
body.room-ui .room-tease span { font: 400 10px 'Share Tech Mono', monospace; letter-spacing: .3em; text-transform: uppercase; color: #ffd27a; }
body.room-ui .room-tease::after { content: ''; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.22), transparent); transform: skewX(-18deg); animation: room-tease 4.5s ease-in-out infinite; }
@keyframes room-tease { 0%, 60% { left: -60%; } 100% { left: 130%; } }
@media (prefers-reduced-motion: reduce) { body.room-ui .room-tease::after { animation: none; } }
body.room-ui.room-menu #title .hub-left, body.room-ui.room-watch #title > * { display: none !important; }

/* the three minigame cards: a small row at the bottom centre, under the table's front edge */
body.room-ui #dsfab, body.room-ui #ckfab, body.room-ui #apefab { left: auto !important; right: auto !important; bottom: 12px !important; width: 54px !important; gap: 5px; }
body.room-ui #dsfab { left: calc(50% - 107px) !important; }
body.room-ui #ckfab { left: calc(50% - 27px) !important; }
body.room-ui #apefab { left: calc(50% + 53px) !important; }
body.room-ui #dsfab .bd, body.room-ui #ckfab .bd, body.room-ui #apefab img { width: 54px !important; }
body.room-ui #dsfab .gl4, body.room-ui #ckfab .gl3, body.room-ui #apefab .gl2 { width: 96px !important; height: 96px !important; margin: -48px 0 0 -48px !important; }
body.room-ui #dsfab .lb, body.room-ui #ckfab .lb, body.room-ui #apefab .lb { display: block !important; position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); font-size: 9px; opacity: 0; pointer-events: none; transition: opacity .2s; }
body.room-ui #dsfab:hover .lb, body.room-ui #ckfab:hover .lb, body.room-ui #apefab:hover .lb { opacity: 1; }
body.room-ui.room-watch #dsfab, body.room-ui.room-watch #ckfab, body.room-ui.room-watch #apefab { display: none; }

/* the room's own controls */
.room-ui-only { display: none; }
body.room-ui.room-home .room-ui-only { display: revert; }
#room-views { position: fixed; z-index: 22; left: 16px; bottom: 70px; display: none; padding: 4px; gap: 2px; border-radius: 999px; background: rgba(14, 10, 32, .7); backdrop-filter: blur(14px); box-shadow: inset 0 0 0 1px rgba(200, 210, 255, .18); }
body.room-ui.room-home #room-views { display: flex; }
#room-views button { border: 0; background: none; border-radius: 999px; padding: 7px 13px; font: 600 12px Outfit, system-ui; color: #9a9cc4; cursor: pointer; }
#room-views button.on { background: #38f3ff; color: #02161a; }
#room-reset { position: fixed; z-index: 22; left: 16px; bottom: 16px; display: none; align-items: center; gap: 8px; padding: 10px 16px 10px 12px; border-radius: 999px; font-size: 20px; border: 1px solid #38f3ff88; background: #07161ccc; color: #c9fbff; box-shadow: 0 0 18px #38f3ff33; cursor: pointer; }
#room-reset span { font: 600 13px Outfit, system-ui; }
body.room-ui.room-home #room-reset { display: flex; }
#room-tools { position: fixed; z-index: 22; left: 16px; bottom: 118px; display: none; padding: 6px 8px; border-radius: 12px; font: 600 12px Outfit, system-ui; color: #9a9cc4; background: rgba(14, 10, 32, .7); backdrop-filter: blur(14px); box-shadow: inset 0 0 0 1px rgba(200, 210, 255, .18); }
body.room-ui.room-home #room-tools { display: block; }
#room-tools summary { cursor: pointer; }
#room-tools button { display: block; width: 100%; margin-top: 4px; padding: 5px 10px; border-radius: 8px; border: 1px solid #5a3fb0; background: #1d1048cc; color: #ecebff; font: 600 12px Outfit, system-ui; cursor: pointer; text-align: left; }
#room-tools button.on { background: #ffc23d; color: #1a0f00; border-color: #ffc23d; }
body.room-ui.room-watch #room-views, body.room-ui.room-watch #room-reset, body.room-ui.room-watch #room-tools, body.room-ui.room-watch #room-labels, body.room-ui.room-watch #room-panel { display: none !important; }
#room-watch { position: fixed; z-index: 22; left: 50%; bottom: 18px; transform: translateX(-50%); display: none; gap: 10px; align-items: center; padding: 6px 6px 6px 16px; border-radius: 999px; background: rgba(14, 10, 32, .75); backdrop-filter: blur(14px); box-shadow: inset 0 0 0 1px rgba(200, 210, 255, .18); color: #ecebff; font: 500 13px Outfit, system-ui; }
#room-watch button { border: 1px solid #5a3fb0; background: #1d1048cc; color: #ecebff; border-radius: 999px; padding: 7px 12px; font: 600 12px Outfit, system-ui; cursor: pointer; }
body.room-ui.room-home.room-watch #room-watch { display: flex; }

#room-tip { position: fixed; z-index: 23; pointer-events: none; padding: 5px 9px; border-radius: 7px; background: #120a2ae6; border: 1px solid #ffc23d; color: #ecebff; font: 600 12px Outfit, system-ui; display: none; white-space: nowrap; }
#room-panel { position: fixed; z-index: 22; right: clamp(190px, 17.5vw, 270px); bottom: 110px; width: 310px; padding: 14px 16px; border-radius: 12px; background: #120a2af0; border: 1px solid #5a3fb0; color: #ecebff; display: none; font-family: Outfit, system-ui; }
#room-panel h3 { margin: 0 0 6px; font: 600 16px Outfit, system-ui; color: #ffc23d; }
#room-panel p { margin: 0 0 10px; color: #c9c6ee; line-height: 1.45; font-size: 13px; }
#room-panel .acts { display: flex; flex-wrap: wrap; gap: 6px; }
#room-panel .acts button { font: 600 12px Outfit, system-ui; padding: 6px 11px; border-radius: 9px; border: 1px solid #5a3fb0; background: #1d1048cc; color: #ecebff; cursor: pointer; }
#room-panel .acts button:hover { border-color: #ffc23d; }
#room-panel .x { position: absolute; right: 8px; top: 6px; background: none; border: 0; color: #ecebff; font-size: 18px; cursor: pointer; }
body:not(.room-home) #room-panel, body:not(.room-home) #room-tip { display: none !important; }
#room-labels .lbl { position: fixed; z-index: 21; transform: translate(-50%, -100%); pointer-events: none; font: 600 11px Outfit, system-ui; padding: 3px 7px; border-radius: 6px; background: #07040fcc; border: 1px solid #ffc23d88; color: #ffe7b0; white-space: nowrap; }
#room-labels.off, body:not(.room-home) #room-labels, body.room-menu #room-labels { display: none; }

/* back to the room after choosing the classic menu */
#room-back { position: fixed; z-index: 22; left: 16px; bottom: 16px; display: none; padding: 8px 14px; border-radius: 999px; border: 1px solid #38f3ff88; background: #07161ccc; color: #c9fbff; font: 600 12px Outfit, system-ui; cursor: pointer; }
body.room-classic.room-title #room-back { display: block; }

/* the display card picker: the cards you own, to show on a pedestal */
#room-picker { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 16px; background: rgba(3, 2, 8, .6); backdrop-filter: blur(3px); }
#room-picker[hidden] { display: none; }
#room-picker .rp-box { position: relative; width: min(820px, 100%); max-height: calc(100vh - 32px); display: grid; grid-template-rows: auto auto auto 1fr auto; gap: 10px; padding: 18px 18px 14px;
  border-radius: 16px; background: linear-gradient(160deg, rgba(26, 16, 54, .98), rgba(10, 6, 24, .98)); border: 1px solid rgba(56, 243, 255, .45); box-shadow: 0 0 30px rgba(56, 243, 255, .15), 0 18px 40px rgba(0, 0, 0, .6); color: #ecebff; font-family: Outfit, system-ui; }
#room-picker h3 { margin: 0; font: 400 20px 'Russo One', Outfit; letter-spacing: .03em; color: #ffc23d; }
#room-picker .rp-sub { margin: 0; color: #9a9cc4; font-size: 13px; }
#room-picker input { padding: 9px 12px; border-radius: 10px; border: 1px solid #5a3fb0; background: #0b0820; color: #ecebff; font: 500 14px Outfit; }
#room-picker .rp-grid { overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 10px; padding: 2px 4px 2px 0; min-height: 120px; }
#room-picker .rp-card { display: grid; gap: 4px; padding: 6px; border-radius: 10px; border: 1px solid rgba(200, 210, 255, .15); background: rgba(255, 255, 255, .03); color: #ecebff; cursor: pointer; text-align: left; }
#room-picker .rp-card:hover { border-color: #38f3ff; background: rgba(56, 243, 255, .08); }
#room-picker .rp-card[hidden] { display: none; }
#room-picker .rp-card img { width: 100%; aspect-ratio: 1890 / 2640; object-fit: cover; border-radius: 6px; background: #1d1048; }
#room-picker .rp-card b { font: 600 12px Outfit; line-height: 1.2; }
#room-picker .rp-card i { font: 400 10px 'Share Tech Mono', monospace; letter-spacing: .08em; text-transform: uppercase; font-style: normal; color: var(--r); }
#room-picker .rp-foot { display: flex; justify-content: flex-end; gap: 8px; }
#room-picker .rp-card.on { border-color: #ffc23d; box-shadow: 0 0 0 1px #ffc23d inset; }
#room-picker .rp-remove, #room-picker .rp-view { border: 1px solid #5a3fb0; background: #1d1048cc; color: #ecebff; border-radius: 9px; padding: 7px 12px; font: 600 12px Outfit; cursor: pointer; }
#room-picker .rp-remove[hidden], #room-picker .rp-view[hidden] { display: none; }
#room-picker .x { position: absolute; right: 10px; top: 8px; background: none; border: 0; color: #ecebff; font-size: 22px; cursor: pointer; }

/* Sandy's onboarding guide: in the bottom-right corner where your companion sits, its panel just above her (clear of the
   table menu); the usual companion and its speech bubble step aside while she guides */
body.room-ui.room-home .sguide { background: none; pointer-events: none; padding: 0; }
body.room-ui.room-home .sguide .sg-card { pointer-events: auto; position: fixed; right: 10px; bottom: 0; width: min(430px, calc(100vw - 20px)); flex-direction: column; align-items: flex-end; }
body.room-ui.room-home .sguide .sg-body { order: 1; padding: 16px 18px; margin: 0 0 -4px; align-self: stretch; }
body.room-ui.room-home .sguide .sg-art { order: 2; width: clamp(170px, 16vw, 250px); margin: 0; -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent 100%); mask-image: linear-gradient(to bottom, #000 72%, transparent 100%); }
body.room-ui.room-home:has(#sguide) #title .title-host { display: none; }
