/* Royal Hunt UI polish shared by Home, Store, Profile, Mail and Clover Road. */

:root {
  --royal-glass: linear-gradient(145deg, rgba(43, 27, 112, .94), rgba(18, 10, 60, .94));
  --royal-line: rgba(255, 220, 116, .55);
  --royal-shadow: 0 18px 40px rgba(8, 3, 32, .48);
}

button, [role="button"] { transition: transform .16s ease, filter .16s ease, box-shadow .2s ease, background .2s ease; }
button:hover:not(:disabled) { filter: brightness(1.08); }
button:focus-visible, [role="button"]:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid #72e7ff;
  outline-offset: 3px;
}

/* Home and the compact top taskbar */
.home { background: #1c0b58 url(img/home-royal.webp) center/cover no-repeat; }
.home::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 42%, transparent 22%, rgba(12, 5, 44, .2) 64%, rgba(7, 2, 30, .72) 100%), linear-gradient(180deg, rgba(56, 28, 135, .12), rgba(13, 6, 45, .28));
}
.profile-card, .currency-bar .cur, .top-right {
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
}
.profile-card { border: 1px solid rgba(255, 223, 125, .45); box-shadow: var(--royal-shadow), inset 0 0 20px rgba(255,255,255,.05); }
.top-right {
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 24px;
  background: rgba(12, 7, 49, .52);
  box-shadow: 0 10px 26px rgba(0,0,0,.32);
}
.top-right .round-btn { width: 54px; height: 54px; border-radius: 16px; }
.top-right .round-btn .ico { width: 31px; height: 31px; }
#bellBtn.ringing { box-shadow: inset 0 3px 0 rgba(255,255,255,.35), 0 0 0 4px #70450a, 0 0 22px rgba(255,216,102,.75); }
.side-col { padding: 12px 10px; border-radius: 28px; background: rgba(10,5,42,.42); border: 1px solid rgba(255,255,255,.14); backdrop-filter: blur(8px); }
.mode-tile { isolation: isolate; }
.mode-tile:hover { transform: translateY(-5px); }

/* Read-only profile and the held name card */
.name-card-soon {
  position: relative;
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin: 14px 0;
  padding: 15px 18px;
  overflow: hidden;
  border-radius: 20px;
  color: #fff4c9;
  background: linear-gradient(120deg, rgba(128,67,20,.88), rgba(72,30,98,.92));
  box-shadow: inset 0 0 0 2px rgba(255,217,102,.65), 0 9px 20px rgba(0,0,0,.28);
}
.name-card-soon::after { content: 'GRANT ONLY'; position: absolute; right: -30px; top: 13px; width: 126px; padding: 4px 0; transform: rotate(38deg); text-align: center; font: 800 11px system-ui,sans-serif; letter-spacing: .12em; color: #3a1d00; background: #ffd866; }
.name-card-soon.ready::after { content: 'READY'; }
.ncs-art { width: 62px; height: 62px; display: grid; place-items: center; border-radius: 15px; font-size: 40px; color: #ffe78e; background: radial-gradient(circle, #b62d47, #4a164f); box-shadow: inset 0 0 0 3px #f6c84d, 0 0 18px rgba(255,208,82,.35); }
.name-card-soon b { font: 900 23px Cinzel,serif; }
.name-card-soon p { margin: 3px 0 0; color: #e6d9ff; font: 15px/1.35 system-ui,sans-serif; }

/* Store catalogue */
.royal-portraits { background: linear-gradient(145deg, rgba(42,26,112,.8), rgba(18,10,62,.8)); }
.av-grid.small span { position: relative; box-shadow: inset 0 0 0 2px rgba(255,255,255,.2), 0 5px 12px rgba(0,0,0,.28); }
.av-grid.small span.new { box-shadow: inset 0 0 0 3px #ffd866, 0 0 18px rgba(255,216,102,.32); }
.av-grid.small span em { position: absolute; right: -3px; top: -5px; padding: 2px 6px; border-radius: 8px; font: 800 9px system-ui,sans-serif; color: #3d2100; background: #ffd866; }
.emoji-market-head, .skin-market-head { margin: 5px 0 9px; padding: 10px 14px; border-radius: 14px; background: rgba(255,216,102,.09); box-shadow: inset 4px 0 0 #ffd866; }
.emoji-market-head p, .skin-market-head p { margin: 3px 0 0; }
.emoji-market { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.emoji-shelf { padding: 10px; border-radius: 18px; background: rgba(0,0,0,.2); }
.emoji-shelf h4 { margin: 0 0 8px; color: #ffe28a; }
.emoji-products { display: grid; gap: 7px; }
.emoji-product { display: grid; grid-template-columns: 50px minmax(0, 1fr) auto; gap: 9px; align-items: center; min-height: 62px; padding: 7px 8px; border-radius: 14px; background: linear-gradient(135deg, rgba(255,255,255,.11), rgba(255,255,255,.035)); box-shadow: inset 0 0 0 1px rgba(255,255,255,.13); }
.emoji-product.owned { background: linear-gradient(135deg, rgba(75,192,83,.19), rgba(255,255,255,.03)); box-shadow: inset 0 0 0 1px rgba(115,232,126,.42); }
.emoji-preview { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 13px; font-size: 31px; background: rgba(7,3,30,.42); }
.emoji-product > div { min-width: 0; display: flex; flex-direction: column; }
.emoji-product small, .skin-info small { color: var(--muted); font: 12px/1.3 system-ui,sans-serif; }
.emoji-product .price-btn { padding: 7px 10px; white-space: nowrap; }
.skin-market { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.skin-product { display: flex; align-items: center; gap: 13px; min-height: 170px; padding: 12px; border-radius: 18px; background: linear-gradient(145deg, rgba(117,35,53,.35), rgba(39,23,103,.68)); box-shadow: inset 0 0 0 2px rgba(255,209,96,.22), 0 8px 18px rgba(0,0,0,.2); }
.skin-product.owned { box-shadow: inset 0 0 0 3px #70d779, 0 0 20px rgba(80,220,110,.15); }
.skin-art { width: 94px; height: 132px; flex: none; border-radius: 11px; background: center/100% 100% no-repeat; box-shadow: 0 8px 18px rgba(0,0,0,.42), 0 0 0 2px rgba(255,231,154,.45); }
.skin-info { min-width: 0; display: flex; flex: 1; flex-direction: column; gap: 4px; }
.skin-info > b { color: #ffe28a; font-size: 19px; }
.skin-buy { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 9px; }
.skin-buy .price-btn { min-width: 94px; padding: 8px 10px; }
.skin-buy .price-btn.gem { background: linear-gradient(180deg, #a772ff, #6233bd); }
.skin-buy .or { font: 800 10px system-ui,sans-serif; color: var(--muted); }
.owned-pill { padding: 7px 13px; border-radius: 12px; color: #dfffe0; background: rgba(56,173,70,.3); box-shadow: inset 0 0 0 1px #68dd75; }
.modal-box.purchase-pop { animation: purchasePop .65s ease both; }
@keyframes purchasePop { 35% { box-shadow: 0 0 0 6px #fff4b0, 0 0 50px #ffd866, 0 24px 60px rgba(0,0,0,.7); } }

/* Treasury loadouts and achievements */
.lo-slot.empty { flex-direction: column; color: #bdb6df; background: rgba(255,255,255,.06); border: 2px dashed rgba(255,255,255,.25); box-shadow: none; }
.lo-slot.empty span { font-size: 22px; line-height: 20px; }
.lo-slot.empty small { font: 9px system-ui,sans-serif; }
.lo-remove { margin-top: 8px; color: #ffc3bc; background: rgba(168,44,34,.45); }
.achievement-hero { display: flex; gap: 15px; align-items: center; margin-bottom: 12px; padding: 13px 16px; border-radius: 18px; background: linear-gradient(120deg, rgba(151,80,20,.55), rgba(54,27,117,.72)); box-shadow: inset 0 0 0 2px rgba(255,215,103,.45); }
.achievement-hero > span { font-size: 44px; }
.achievement-hero p { margin: 2px 0; color: #eee8ff; font: 14px system-ui,sans-serif; }
.achievement-hero small { color: #ffe395; }
.achievement-progress { width: 260px; max-width: 100%; height: 8px; margin-top: 5px; overflow: hidden; border-radius: 4px; background: rgba(0,0,0,.35); }
.achievement-progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #60df72, #ffd866); }
.tr-title { position: relative; overflow: hidden; }
.tr-title .title-role { position: absolute; left: 8px; top: 6px; opacity: .5; }
.tr-title em { padding: 1px 7px; border-radius: 8px; font: 800 10px system-ui,sans-serif; font-style: normal; color: #291400; background: #dab367; }
.tr-title.r-diamond em { background: #9cecff; }
.tr-title.r-gold em { background: #ffe073; }
.tr-title.current { transform: translateY(-2px); box-shadow: inset 0 0 0 3px #ffd866, 0 8px 18px rgba(255,216,102,.2); }

/* Read-only player collection showcase */
.modal-body.collection-body { min-height: 0; overflow: hidden; padding-bottom: 12px; }
.collection-shell { display: flex; min-height: 0; height: 100%; flex-direction: column; }
.collection-head { display: grid; grid-template-columns: 72px minmax(0,1fr) auto; gap: 14px; align-items: center; margin-bottom: 12px; padding: 10px 14px; border-radius: 18px; background: linear-gradient(120deg,rgba(130,67,20,.52),rgba(48,28,123,.78)); box-shadow: inset 0 0 0 2px rgba(255,216,102,.42); }
.collection-head .avatar-box { width: 68px; height: 68px; border: 3px solid #ffd866; }
.collection-head > div { display: flex; min-width: 0; flex-direction: column; }
.collection-head > div > b { color: #fff0b2; font: 900 23px Cinzel,serif; }
.collection-head > div > span { color: #d9cff5; font: 13px system-ui,sans-serif; }
.collection-head > em { padding: 5px 9px; border-radius: 9px; color: #392100; background: #ffd866; font: 900 10px system-ui,sans-serif; font-style: normal; letter-spacing: .08em; }
.collection-layout { display: grid; grid-template-columns: 155px minmax(0,1fr); gap: 12px; min-height: 0; flex: 1 1 auto; overflow: hidden; }
.collection-cats { display: flex; flex-direction: column; gap: 7px; }
.collection-cats button { padding: 11px 10px; border: 1px solid rgba(255,255,255,.2); border-radius: 12px; color: #e9e3ff; background: rgba(255,255,255,.08); text-align: left; font-size: 15px; }
.collection-cats button.on { color: #3f2400; background: linear-gradient(180deg,#ffe476,#e6a72a); box-shadow: inset 0 0 0 2px #fff1ae; }
.collection-main { min-width: 0; min-height: 0; overflow: auto; padding: 4px 6px 8px; border-radius: 16px; background: rgba(8,4,35,.22); overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.collection-backbar { display: flex; flex: 0 0 auto; justify-content: center; padding: 10px 0 1px; background: linear-gradient(180deg,rgba(30,18,96,0),rgba(30,18,96,.96) 32%); }
.collection-hero { display: flex; align-items: center; gap: 14px; margin-bottom: 11px; padding: 16px; border-radius: 16px; background: linear-gradient(135deg,rgba(92,55,187,.7),rgba(156,73,30,.5)); }
.collection-hero > span { font-size: 48px; }
.collection-hero b { color: #ffe995; font: 900 22px Cinzel,serif; }
.collection-hero p { margin: 4px 0 0; color: #eee8ff; }
.collection-stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; margin-bottom: 9px; }
.collection-stats > div { display: flex; flex-direction: column; align-items: center; padding: 11px 6px; border-radius: 13px; background: rgba(53,34,130,.78); }
.collection-stats b { color: #ffe06e; font-size: 24px; }
.collection-stats span { color: #cfc7ef; font: 11px system-ui,sans-serif; }
.collection-stats.game > div { background: rgba(29,21,86,.78); }
.collection-note { padding: 10px 12px; border-left: 4px solid #6fe8ff; color: #d8d0ef; background: rgba(105,239,255,.07); font: 13px/1.4 system-ui,sans-serif; }
.collection-grid { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 8px; }
.collection-grid.cards { grid-template-columns: repeat(4,minmax(0,1fr)); }
.collection-item { position: relative; display: flex; min-width: 0; flex-direction: column; align-items: center; gap: 4px; padding: 8px; border: 1px solid rgba(255,255,255,.13); border-radius: 13px; background: rgba(255,255,255,.07); text-align: center; }
.collection-item.owned { border-color: rgba(105,221,120,.48); }
.collection-item.equipped { border-color: #ffd866; box-shadow: inset 0 0 0 2px #ffd866,0 0 16px rgba(255,216,102,.22); }
.collection-item.locked { filter: grayscale(.55); opacity: .68; }
.collection-item .avatar-box { width: 64px; height: 64px; border: 2px solid rgba(255,255,255,.4); }
.collection-item b { overflow: hidden; max-width: 100%; color: #f4efff; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.collection-item small { color: #c9c0e9; font: 9px system-ui,sans-serif; }
.collection-item > em { padding: 1px 5px; border-radius: 6px; color: #3d2500; background: #dcb45d; font: 800 8px system-ui,sans-serif; font-style: normal; }
.collection-card-art { width: 59px; height: 83px; border-radius: 6px; background: center/100% 100% no-repeat; box-shadow: 0 4px 8px rgba(0,0,0,.38); }
.collection-item.reaction > span { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 13px; background: rgba(8,4,35,.48); font-size: 33px; }
.collection-section-title { margin: 4px 0 8px; color: #ffe38a; }
.collection-section-title:not(:first-child) { margin-top: 14px; }
.collection-texts { display: flex; flex-wrap: wrap; gap: 7px; }
.collection-texts span { padding: 6px 10px; border-radius: 999px; color: #e9e2ff; background: rgba(92,68,187,.7); }
.collection-texts span.equipped { color: #3a2300; background: #ffd866; }
.collection-titles { grid-template-columns: repeat(4,minmax(0,1fr)); }

/* Mail and notification centre */
.mail-row { transition: background .18s ease, transform .18s ease; }
.mail-row:hover { transform: translateX(3px); }
.mail-row.unread { box-shadow: inset 4px 0 0 #ff5656; }
.mr-preview { display: block; overflow: hidden; color: #f0edff; font: 12px/1.25 system-ui,sans-serif; text-overflow: ellipsis; white-space: nowrap; }
.notification-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 11px; padding: 10px 14px; border-radius: 16px; background: rgba(0,0,0,.22); }
.notification-head p { margin: 2px 0 0; font: 14px system-ui,sans-serif; }
.note-row { transition: transform .18s ease, box-shadow .18s ease; }
.note-row:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 2px #ffd866, 0 8px 18px rgba(0,0,0,.25); }
.connection-banner { position: fixed; left: 50%; top: calc(10px + env(safe-area-inset-top)); z-index: 180; transform: translateX(-50%); padding: 8px 18px; border-radius: 16px; color: #fff0cf; background: rgba(151,39,28,.94); box-shadow: 0 0 0 2px #ffb19f, 0 8px 24px rgba(0,0,0,.38); font: 800 14px system-ui,sans-serif; animation: reconnectPulse 1.2s ease-in-out infinite alternate; }
@keyframes reconnectPulse { to { filter: brightness(1.2); } }

/* Clover Road uses the same royal landscape pair as the home screen, following the active day/night theme. */
.cr-wrap { background: #17143b url(img/home-royal.webp) center 48%/cover no-repeat; transition: background-image 1.2s ease, background-color 1.2s ease; }
.cr-wrap::after { content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none; background: linear-gradient(180deg, rgba(9,13,38,.06) 0 43%, rgba(23,14,66,.18) 62%, rgba(8,12,32,.48) 100%); transition: background 1.2s ease; }
.cr-view, .cr-lane, .cr-claim { z-index: 1; }
.cr-track { background-color: transparent !important; }
.crn { backdrop-filter: blur(5px); }
.crn { border: 1px solid rgba(255,221,133,.72); background: linear-gradient(150deg, rgba(74,47,126,.96), rgba(25,17,62,.97)); box-shadow: inset 0 0 0 2px rgba(255,255,255,.06), 0 5px 14px rgba(0,0,0,.42); }
.crn::before { content: '♛'; position: absolute; top: 4px; right: 8px; color: rgba(255,224,143,.38); font: 15px/1 Georgia,serif; pointer-events: none; }
.crn:hover { transform: translateY(-3px); filter: brightness(1.12); }
.crn-ico { width: 48px; height: 48px; border: 1px solid rgba(255,221,133,.55); border-radius: 13px; background: linear-gradient(145deg, rgba(255,218,120,.22), rgba(112,75,180,.25)); box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 3px 8px rgba(0,0,0,.24); }
.crn.k-box, .crn.k-item { border-color: #ffd866; background: linear-gradient(150deg, rgba(112,54,31,.98), rgba(48,21,30,.98)); box-shadow: inset 0 0 0 2px rgba(255,216,102,.16), 0 0 15px rgba(255,188,73,.22), 0 5px 14px rgba(0,0,0,.42); }
.crn.k-box .crn-ico, .crn.k-item .crn-ico { border-color: rgba(255,216,102,.82); background: linear-gradient(145deg, rgba(255,213,112,.42), rgba(157,76,33,.52)); }
.crn.k-box .crn-ico::after, .crn.k-item .crn-ico::after { content: '👑'; position: absolute; top: 1px; right: 7px; font: 11px/1 sans-serif; filter: drop-shadow(0 1px 1px rgba(0,0,0,.6)); }
.crn.claim { border-color: #fff0ae; box-shadow: 0 0 0 2px rgba(255,216,102,.8), 0 0 22px rgba(255,194,72,.72); animation: cloverRoyalPulse .9s ease-in-out infinite alternate; }
.crn.claim .crn-st { background: linear-gradient(180deg, #ffe78b, #d29224); color: #422300; font-weight: 900; }
.crn-st { background: linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,.08)); color: #ffe7a1; border: 1px solid rgba(255,221,133,.22); }
.crm { background: linear-gradient(145deg, #5a469b, #241b53); color: #fff1bd; border-color: #d9b754; box-shadow: 0 3px 8px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.25); font-weight: 800; }
.crm.done { background: linear-gradient(145deg, #fff0a0, #c98a25); color: #4a2600; border-color: #fff0ae; }
.cr-road { border: 4px solid #936322; background: linear-gradient(180deg, #ffe6a0, #c68b32 48%, #7d4a20); box-shadow: 0 4px 12px rgba(0,0,0,.5), inset 0 2px 0 rgba(255,255,255,.45), inset 0 -3px 0 rgba(69,36,14,.46); }
.cr-done { background: linear-gradient(90deg, #fff2a3, #ffd04e); box-shadow: 0 0 10px rgba(255,216,102,.95); }
@keyframes cloverRoyalPulse { from { transform: translateY(0); } to { transform: translateY(-3px); } }

/* Empty/error friendly layouts and narrow modal content. */
.notes-empty { padding: 20px; border-radius: 20px; background: rgba(0,0,0,.13); }
.panel, .shop-card, .bag-card, .set-group { border: 1px solid rgba(255,255,255,.06); }

/* Room rules and lobby social actions. Controls occupy separate zones so the
   magic-card marker can never share the Kick Out touch target. */
.room-rule-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 9px 0; padding: 10px 12px; border-radius: 14px; background: rgba(0,0,0,.18); }
.room-gate .panel { margin-bottom: 0; }
.room-rule-row > div:first-child { display: flex; min-width: 0; flex-direction: column; }
.room-rule-row .seg { flex: none; margin: 0; }
.lobby .slot { padding-bottom: 32px; cursor: default; }
.lobby .slot.social-player { cursor: pointer; }
/* The magic-card marker sits on the avatar's lower-left corner: away from Kick Out (top right), the
   voice badges (top left) and the level line, and it never takes taps. */
.slot .sl-av { position: relative; display: block; flex: none; line-height: 0; }
.slot .sl-av .sl-item { position: absolute; top: auto; right: auto; left: -8px; bottom: -8px; z-index: 2; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; font-size: 18px; line-height: 1; background-color: rgba(26,12,74,.92); background-size: 78%; box-shadow: 0 0 0 2px #ffd866, 0 3px 6px rgba(0,0,0,.45); pointer-events: none; }
.slot .sl-lv { max-width: calc(100% - 16px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lobby .slot .sl-kick { top: 5px; right: 5px; z-index: 8; width: 34px; height: 34px; }
.sl-social { position: absolute; left: 8px; right: 8px; bottom: 7px; z-index: 6; min-height: 24px; border: 1px solid rgba(255,255,255,.42); border-radius: 9px; color: #fff; background: rgba(22,12,69,.88); font: 800 10px/1 system-ui,sans-serif; letter-spacing: .035em; }
button.sl-social { width: calc(100% - 16px); }
.sl-social.add { color: #332000; background: linear-gradient(180deg,#ffe676,#e5a523); }
.sl-social.sent { color: #ecdeff; background: linear-gradient(180deg,#7658d8,#4831a3); }
.sl-social.friend { display: grid; place-items: center; color: #dcffe1; background: rgba(35,132,53,.88); }
.sl-social.received { display: grid; grid-template-columns: 1fr 30px; overflow: hidden; }
.sl-social.received button { min-width: 0; color: #fff; background: #278c45; font: inherit; }
.sl-social.received button:last-child { background: #b83c32; }
.note-row.expired { opacity: .68; filter: saturate(.55); }

@media (max-height: 620px) {
  .modal-box { height: calc(100% - 20px); max-height: 540px; }
  .modal-body { padding-bottom: 14px; }
  .store-sub button, .tr-cats button { padding-top: 9px; padding-bottom: 9px; }
  .room-gate .rg-side { gap: 6px; }
  .room-gate .panel { padding: 9px 12px; }
  .room-gate h3 { margin-bottom: 4px; }
  .room-gate .rg-side p { margin: 4px 0; }
  .room-gate .room-rule-row { margin: 5px 0; padding: 7px 9px; }
  .collection-head { grid-template-columns: 54px minmax(0,1fr) auto; gap: 9px; margin-bottom: 8px; padding: 7px 10px; }
  .collection-head .avatar-box { width: 50px; height: 50px; }
  .collection-head > div > b { font-size: 18px; }
  .collection-cats { gap: 5px; }
  .collection-cats button { padding: 8px; font-size: 13px; }
  .collection-backbar { padding-top: 7px; }
}

@media (max-width: 980px) {
  .store-split, .treasury { grid-template-columns: 150px minmax(0, 1fr); }
  .emoji-market, .skin-market { grid-template-columns: 1fr; }
  .tr-main .bag-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .tr-titles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mail-wrap { grid-template-columns: 250px minmax(0, 1fr); }
  .collection-layout { grid-template-columns: 130px minmax(0,1fr); }
  .collection-grid, .collection-grid.cards { grid-template-columns: repeat(3,minmax(0,1fr)); }
}

@media (orientation: portrait) and (max-width: 900px) {
  body::before { content: ''; position: fixed; inset: 0; z-index: 10000; background: radial-gradient(circle at 50% 35%, #45299b, #100634 70%); }
  body::after { content: '↻  Rotate your device\A Royal Hunt is designed for landscape play'; white-space: pre; position: fixed; left: 8vw; right: 8vw; top: 50%; z-index: 10001; transform: translateY(-50%); color: #ffe184; text-align: center; font: 900 7vw/1.5 Cinzel,serif; text-shadow: 0 3px 0 #482600; }
}

@media (prefers-reduced-motion: reduce) {
  .mode-tile, .tile-art, .chest, #bellBtn .ico, .crn, .modal-box.purchase-pop { animation: none !important; transition-duration: .01ms !important; }
}

/* Store: premium quick texts on themed shelves. */
.text-market { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.text-shelf { padding: 10px 12px; border-radius: 16px; background: rgba(0,0,0,.18); box-shadow: inset 0 0 0 1px rgba(255,255,255,.07); }
.text-shelf h4 { margin: 0 0 8px; font: 900 16px Cinzel,serif; color: #ffe395; }
.text-products { display: grid; gap: 7px; }
.text-product { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 8px 7px 12px; border-radius: 12px; background: linear-gradient(120deg, rgba(110,62,210,.45), rgba(40,20,110,.55)); box-shadow: inset 0 0 0 1px rgba(255,216,102,.18); }
.text-product.owned { opacity: .72; }
.text-preview { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 16px; color: #fff3cf; }
.text-product .price-btn { flex: none; }
/* Treasury: when every owned reaction is in a slot. */
.lo-more { width: 100%; padding: 10px 12px; border-radius: 12px; color: #d9d0ff; background: rgba(0,0,0,.2); font: 14px system-ui,sans-serif; text-align: center; }
.lo-more b { color: #ffd866; }
@media (max-width: 700px) { .text-market { grid-template-columns: 1fr; } }

/* Settings → About: the Royal Hunt logo. */
.about-logo { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 2px 0 8px; }
.about-logo img.about-company { width: 230px; filter: none; opacity: .95; }
/* The company logo, small at the bottom of the loading screen. */
.load-company { position: absolute; left: 50%; bottom: 26px; width: 190px; transform: translateX(-50%); opacity: .9; pointer-events: none; }
.about-logo img { width: 240px; max-width: 70%; height: auto; filter: drop-shadow(0 6px 12px rgba(0,0,0,.45)); }

/* /admin feature switches: hidden controls disappear; paused ones stay greyed (Play tiles get a PAUSED tag). */
[data-feature].feature-paused:not(.mode-tile) { filter: grayscale(.95) brightness(.85); opacity: .6; }
.feature-off { display: none !important; }
.mode-tile.feature-paused { background: radial-gradient(circle at 50% 35%, #9a9aa8 0%, #6c6c7c 50%, #4a4a58 100%); }
.mode-tile.feature-paused .tile-art, .mode-tile.feature-paused .tile-text, .mode-tile.feature-paused .tile-sub { filter: grayscale(.85) brightness(.85); }
.paused-tag { display: none; position: absolute; left: 50%; top: 16px; z-index: 3; transform: translateX(-50%) rotate(-4deg); padding: 6px 16px; border-radius: 12px; color: #3a1d00; background: #ffd866; font: 900 15px/1 system-ui,sans-serif; letter-spacing: .1em; white-space: nowrap; box-shadow: 0 0 0 3px #7a4a00, 0 4px 0 rgba(0,0,0,.35); }
.mode-tile.feature-paused .paused-tag { display: block; }
.mode-tile.feature-paused:hover { transform: none; }

/* Kingdom Deeds: achievement cards with rarity colours and progress. */
.deeds-head { display: flex; align-items: baseline; justify-content: space-between; margin: 16px 2px 8px; }
.deeds-head b { font: 900 19px Cinzel,serif; color: #ffe395; }
.deeds-head span { color: #d7cdf7; font: 700 13px system-ui,sans-serif; }
.deeds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.deed { --rc: #c99a62; display: grid; grid-template-columns: 50px minmax(0, 1fr); gap: 11px; align-items: center; padding: 10px 12px; border-radius: 15px; background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); opacity: .82; }
.deed.r-rare { --rc: #5fb8ff; } .deed.r-epic { --rc: #c07bff; } .deed.r-legendary { --rc: #ffcf4a; }
.deed.done { opacity: 1; background: linear-gradient(120deg, color-mix(in srgb, var(--rc) 22%, transparent), rgba(30,16,80,.55)); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--rc) 70%, transparent), 0 6px 14px rgba(0,0,0,.25); }
.deed-ico { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 13px; font-size: 27px; background: radial-gradient(circle, color-mix(in srgb, var(--rc) 40%, #2a1660), #1c0d48); box-shadow: inset 0 0 0 2px var(--rc); filter: grayscale(.7); }
.deed.done .deed-ico { filter: none; }
.deed-top { display: flex; align-items: center; gap: 7px; min-width: 0; }
.deed-top b { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 15px; }
.deed-top em { flex: none; padding: 1px 7px; border-radius: 8px; font: 800 10px system-ui,sans-serif; font-style: normal; letter-spacing: .04em; color: #1b0d38; background: var(--rc); }
.deed small { display: block; color: #d8cff5; font: 12px/1.3 system-ui,sans-serif; }
.deed-bar { height: 6px; margin: 5px 0 2px; overflow: hidden; border-radius: 3px; background: rgba(0,0,0,.35); }
.deed-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, color-mix(in srgb, var(--rc) 70%, #fff), var(--rc)); }
.deed .deed-n { color: #fff3c4; font-weight: 700; }
@media (max-width: 980px) { .deeds { grid-template-columns: 1fr; } }

/* ---------- Room lobby (Room Card and multi-game card): two columns ----------
   Left: compact player boxes, three per column, host first. Right: the room panel (info, status, the shared
   Magic Cards rule, my magic item, series standings, actions) with Start at the bottom. Every control has its
   own zone, so names, badges, Kick Out and friend buttons never overlap. */
.lobby.room-mode .lobby-main { left: 88px; right: 20px; top: 80px; bottom: 14px; display: grid; grid-template-columns: minmax(0, 1.38fr) minmax(330px, 1fr); grid-template-rows: auto auto minmax(0, auto) minmax(0, 1fr); grid-template-areas: "slots panel" "slots item" "slots series" "slots ."; column-gap: 24px; row-gap: 10px; align-items: start; justify-items: stretch; }
.lobby.room-mode .lobby-title { display: none; }
/* The original big player cards: the host and one player on the first row, three players on the second. A
   six-track grid lets each card span two tracks, so the two-card row sits centred over the three-card row. */
.lobby.room-mode .slots { grid-area: slots; align-self: center; display: grid; grid-template-columns: repeat(6, 90px); justify-content: center; align-content: center; gap: 18px 0; width: 100%; }
.lobby.room-mode .slots > .slot { grid-column: span 2; justify-self: center; width: 168px; height: 226px; }
.lobby.room-mode .slots > .slot:nth-child(1) { grid-column: 2 / span 2; }
.lobby.room-mode .slots > .slot:nth-child(2) { grid-column: 4 / span 2; }
.lobby.room-mode #roomPanel { grid-area: panel; }
.lobby.room-mode .series-box { grid-area: series; max-width: none; max-height: 100px; margin: 0; overflow-y: auto; font-size: .8em; }
.lobby.room-mode .item-pick { grid-area: item; display: grid; grid-template-columns: auto 56px minmax(0, 1fr); align-items: center; gap: 10px; padding: 8px 12px; border-radius: 14px; background: rgba(0,0,0,.24); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.lobby.room-mode .item-label { font-size: 15px; }
.lobby.room-mode .item-slot { width: 56px; height: 56px; border-radius: 14px; }
.lobby.room-mode .item-slot .plus-big { font-size: 30px; }
.lobby.room-mode .item-name { width: auto; font-size: 14px; line-height: 1.25; }
/* the top bar keeps the Room ID; its buttons move into the room panel */
.lobby.room-mode #roomSetBtn { display: none !important; }
.lobby.room-mode .slot .sl-av { position: relative; }
/* status dot on the avatar: green ready, orange reconnecting, blue still on the results */
.lobby.room-mode .slot.st-ready .sl-av::after, .lobby.room-mode .slot.st-away .sl-av::after, .lobby.room-mode .slot.st-results .sl-av::after { content: ''; position: absolute; right: -4px; bottom: -4px; width: 16px; height: 16px; border-radius: 50%; background: #3ddc6a; box-shadow: 0 0 0 3px #241263, 0 0 8px rgba(61,220,106,.7); }
.lobby.room-mode .slot.st-away .sl-av::after { background: #ffa04a; box-shadow: 0 0 0 3px #241263, 0 0 8px rgba(255,160,74,.7); }
.lobby.room-mode .slot.st-results .sl-av::after { background: #5fb8ff; box-shadow: 0 0 0 3px #241263, 0 0 8px rgba(95,184,255,.7); }
.sl-status { display: none; }
.lobby.room-mode .sl-status { display: block; max-width: 156px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font: 700 11px/1.2 system-ui, sans-serif; }
.lobby.room-mode .sl-status.ready { display: none; }
.lobby.room-mode .sl-status.away { color: #ffb36a; }
.lobby.room-mode .sl-status.results { color: #9fd0ff; }
.lobby.room-mode .sl-status.open { color: #bdb3e6; font-weight: 600; }

.room-panel { display: flex; flex-direction: column; gap: 9px; padding: 12px 14px; border-radius: 18px; background: linear-gradient(160deg, rgba(92,56,200,.55), rgba(24,12,74,.82)); box-shadow: inset 0 0 0 1px rgba(255,216,102,.3), 0 10px 22px rgba(0,0,0,.3); }
.rp-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rp-head b { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font: 900 20px Cinzel, serif; color: #ffe08a; }
.rp-status { flex: none; padding: 3px 10px; border-radius: 999px; background: rgba(80,160,255,.2); color: #cfe9ff; font: 700 12px system-ui, sans-serif; white-space: nowrap; }
.rp-status.live { background: rgba(255,170,60,.24); color: #ffe3b0; }
.rp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rp-chips span { max-width: 100%; overflow: hidden; padding: 4px 9px; border-radius: 10px; background: rgba(0,0,0,.26); color: #e8e0ff; font: 700 12px system-ui, sans-serif; white-space: nowrap; text-overflow: ellipsis; }
.rp-rule { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 11px; border-radius: 14px; background: rgba(255,216,102,.1); box-shadow: inset 0 0 0 1px rgba(255,216,102,.38); }
.rp-rule > div:first-child { min-width: 0; }
.rp-rule b { display: block; color: #fff0a6; font-size: 16px; }
.rp-rule small { display: block; color: #d8cff5; font: 12px/1.3 system-ui, sans-serif; }
.rp-rule.paused { opacity: .75; }
.rp-rule .seg { flex: none; margin: 0; }
.rp-rule .seg button { padding: 6px 14px; font-size: 14px; }
.lobby.room-mode .lobby-bottom { left: auto; right: 20px; bottom: 12px; width: calc((100% - 132px) * .42); flex-direction: column; align-items: stretch; gap: 4px; }
.lobby.room-mode .lobby-status { font-size: 13px; text-align: center; line-height: 1.2; }
.lobby.room-mode #startBtn { width: 100%; padding: 12px 18px; font-size: 24px; }
/* Voice in a room lobby: speaker and mic stacked just below the CHAT tab on the left edge. */
.lobby.room-mode .lobby-voice { left: 0; right: auto; top: 300px; bottom: auto; width: 64px; flex-direction: column; gap: 10px; padding: 10px 0; border-radius: 0 18px 18px 0; background: rgba(10,6,40,.72); box-shadow: 0 0 0 2px rgba(255,255,255,.18); }
.lobby.room-mode .lobby-voice .mic-btn { width: 48px; height: 48px; }
.lobby.room-mode .lobby-voice .spk-btn { width: 42px; height: 42px; }
.lobby.room-mode .lobby-voice .lv-label { display: none; }
.lobby.room-mode .series-box .sr-head { padding-bottom: 4px; }
.lobby.room-mode .series-box .notes-empty { display: flex; align-items: center; gap: 8px; margin: 4px 0 0; padding: 6px 10px; font-size: 16px; }
.lobby.room-mode .series-box .notes-empty p { margin: 0; font-size: 12px; }

/* ---------- Room screen: join (narrow, left) and create (wide, right) ---------- */
.room-gate.v2 { display: grid; grid-template-columns: minmax(230px, .7fr) minmax(0, 1.6fr); gap: 14px; height: 100%; min-height: 0; }
.room-gate.v2 h3 { margin: 0 0 8px; font-size: 18px; }
.rg-card { padding: 12px 14px; border-radius: 18px; background: rgba(0,0,0,.2); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); min-width: 0; }
.rg-join-col { display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.rg-join { background: linear-gradient(150deg, rgba(60,120,255,.28), rgba(20,12,70,.4)); box-shadow: inset 0 0 0 1px rgba(110,170,255,.35); }
.rg-join-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.rg-join-row .room-input { width: 100%; min-width: 0; height: 44px; padding: 0 10px; font-size: 20px; letter-spacing: .14em; text-align: center; }
.rg-join-row .big-btn { padding: 8px 14px; font-size: 16px; }
.rg-public { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.rg-public-head { display: flex; align-items: center; justify-content: space-between; }
.rg-public-head h3 { margin: 0; }
.rg-public-head .pill-btn { padding: 4px 10px; }
.rg-list { flex: 1; min-height: 0; margin-top: 8px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.rg-room { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 12px; background: rgba(255,255,255,.06); }
.rg-room .avatar-box { width: 34px; height: 34px; border-radius: 10px; }
.rg-room b { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 14px; }
.rg-room small { display: block; color: #cfc6f2; font: 12px system-ui, sans-serif; }
.rg-room .big-btn { padding: 5px 10px; font-size: 13px; }
.rg-empty { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: rgba(0,0,0,.18); font-size: 24px; }
.rg-empty span { color: #d6cdf6; font: 12px/1.35 system-ui, sans-serif; }
.rg-create { display: flex; flex-direction: column; gap: 10px; background: linear-gradient(150deg, rgba(255,190,70,.16), rgba(70,30,150,.35)); box-shadow: inset 0 0 0 1px rgba(255,216,102,.32); }
.rg-create h3 { color: #ffe08a; }
.rg-create-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; flex: 1; min-height: 0; }
.rg-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; min-height: 0; }
.rg-label { color: #ffd866; font: 800 11px system-ui, sans-serif; letter-spacing: .1em; text-transform: uppercase; }
.rg-vis { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rg-opt, .rg-format { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 9px 11px; border-radius: 14px; text-align: left; color: #fff; background: rgba(255,255,255,.07); box-shadow: inset 0 0 0 2px rgba(255,255,255,.1); transition: transform .12s, box-shadow .12s; }
.rg-opt b, .rg-format b { font-size: 15px; }
.rg-opt small, .rg-format small { color: #d8cff5; font: 12px/1.3 system-ui, sans-serif; }
.rg-opt:hover, .rg-format:hover { transform: translateY(-1px); }
.rg-opt.private.on { background: linear-gradient(150deg, rgba(150,90,255,.55), rgba(70,30,160,.65)); box-shadow: inset 0 0 0 2px #c9a8ff, 0 0 14px rgba(170,120,255,.4); }
.rg-opt.public.on { background: linear-gradient(150deg, rgba(40,190,170,.5), rgba(20,90,110,.65)); box-shadow: inset 0 0 0 2px #7ff0dc, 0 0 14px rgba(80,230,200,.35); }
.rg-rule { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 11px; border-radius: 14px; background: rgba(255,216,102,.1); box-shadow: inset 0 0 0 1px rgba(255,216,102,.38); }
.rg-rule b { display: block; color: #fff0a6; font-size: 15px; }
.rg-rule small { display: block; color: #d8cff5; font: 12px/1.3 system-ui, sans-serif; }
.rg-rule.off { opacity: .75; }
.rg-rule .seg { flex: none; margin: 0; }
.rg-rule .seg button { padding: 6px 13px; font-size: 14px; }
.rg-formats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; overflow-y: auto; min-height: 0; padding: 2px; }
.rg-format.standard, .rg-format.more { grid-column: 1 / -1; }
.rg-format.series { padding: 7px 8px; }
.rg-format.series b { font-size: 14px; white-space: nowrap; }
.rg-format.standard.on { background: linear-gradient(150deg, rgba(255,190,70,.55), rgba(170,90,10,.6)); box-shadow: inset 0 0 0 2px #ffd866, 0 0 14px rgba(255,200,80,.4); }
.rg-format.series.on { background: linear-gradient(150deg, rgba(255,90,140,.5), rgba(130,30,100,.65)); box-shadow: inset 0 0 0 2px #ff9ec4, 0 0 14px rgba(255,120,170,.38); }
.rg-format.more { border: 1px dashed rgba(255,255,255,.28); background: transparent; }
.rg-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 8px; border-top: 1px solid rgba(255,216,102,.2); }
.rg-uses { color: #ffe9b0; font: 700 13px system-ui, sans-serif; }
.rg-foot .big-btn { flex: none; padding: 10px 26px; font-size: 20px; }
@media (max-height: 620px) {
  .room-gate.v2 h3 { font-size: 16px; margin-bottom: 6px; }
  .rg-card { padding: 9px 11px; }
  .rg-opt, .rg-format { padding: 7px 9px; }
}
.lobby.room-mode .lobby-voice .mic-btn em { display: none; }

/* Result board: finishing place and 👍 */
.res-card .rc-place { position: relative; z-index: 1; margin: -2px auto 4px; width: max-content; padding: 2px 10px; border-radius: 999px; background: rgba(0,0,0,.3); color: #d9d0ff; font: 800 12px system-ui, sans-serif; letter-spacing: .03em; }
.res-card .rc-place.first { background: linear-gradient(180deg, #ffe680, #e3a224); color: #3a1d00; box-shadow: 0 0 12px rgba(255,214,90,.55); }
.res-card.winner { box-shadow: 0 0 0 3px #ffd866, 0 0 26px rgba(255,214,90,.45), 0 14px 28px rgba(0,0,0,.54); }
.res-card .rc-like { position: relative; z-index: 2; margin: 6px auto 0; display: flex; align-items: center; gap: 5px; padding: 4px 12px; border-radius: 999px; background: rgba(255,255,255,.1); box-shadow: inset 0 0 0 1px rgba(255,255,255,.22); color: #fff; font: 800 14px system-ui, sans-serif; }
.res-card .rc-like:hover:not(:disabled) { background: rgba(255,216,102,.22); }
.res-card .rc-like.on { background: linear-gradient(180deg, #5fd17a, #23863f); box-shadow: none; }
.res-card .rc-like.busy { opacity: .6; }
.res-mine .rm-place { color: #ffe08a; }
/* Profile: likes beside Honor, Magic Cards Used */
.pp-side { display: flex; flex-direction: column; gap: 8px; min-width: 130px; }
.likes-stat b { color: #ffe08a; }
.magic-stat .magic-ico { margin-right: 6px; font-style: normal; filter: drop-shadow(0 0 6px rgba(255,216,102,.8)); }
.magic-stat sup { font-size: .55em; color: #cfc6f2; }
.big-btn.liked { background: linear-gradient(180deg, #5fd17a, #23863f); color: #fff; }
/* Match history: who was at the table */
.hp-people { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.hp-av { width: 30px; height: 30px; border-radius: 9px; background: #3a2390 center/cover no-repeat; box-shadow: 0 0 0 2px rgba(255,255,255,.55); cursor: pointer; }
.hp-av:hover { box-shadow: 0 0 0 2px #ffd866, 0 0 10px rgba(255,216,102,.6); }
.hp-av.bot { cursor: default; opacity: .55; box-shadow: 0 0 0 2px rgba(255,255,255,.2); }
.hp-name { padding: 2px 8px; border-radius: 8px; background: rgba(255,216,102,.14); color: #ffe9a8; font: inherit; text-decoration: underline dotted; }
/* Store: royal portraits for sale */
.portrait-market { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.portrait-product { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px; border-radius: 16px; background: linear-gradient(160deg, rgba(150,90,255,.35), rgba(40,20,110,.6)); box-shadow: inset 0 0 0 1px rgba(255,216,102,.3); }
.portrait-product i { width: 100%; aspect-ratio: 1; border-radius: 12px; background: center/cover no-repeat; box-shadow: 0 0 0 2px #ffd866; }
.portrait-product .price-btn { width: 100%; justify-content: center; }
.portrait-product.owned { opacity: .7; }
@media (max-width: 980px) { .portrait-market { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Betting panel: Match Wallet − fee = Betting Wallet */
.bet-drawer .bd-wallet { display: flex; align-items: stretch; justify-content: center; gap: 6px; padding: 8px; border-radius: 14px; background: rgba(0,0,0,.28); }
.bd-wallet .bdw { display: flex; flex-direction: column; align-items: center; min-width: 0; padding: 4px 8px; border-radius: 10px; background: rgba(255,255,255,.06); }
.bd-wallet .bdw small { color: #cfc6f2; font: 700 11px system-ui, sans-serif; white-space: nowrap; }
.bd-wallet .bdw b { display: flex; align-items: center; gap: 4px; font-size: 20px; }
.bd-wallet .bdw b .ico { width: 20px; height: 20px; }
.bd-wallet .bdw.bet { background: linear-gradient(180deg, rgba(95,209,122,.35), rgba(35,134,63,.35)); box-shadow: inset 0 0 0 1px rgba(150,255,170,.45); }
.bd-wallet .bdw.bet b { color: #c9ffd5; }
.bd-wallet .bdw-op { align-self: center; color: #ffd866; font-size: 20px; font-weight: 900; }

/* ---------- Day theme (body[data-daytime="day"]) ----------
   Daylight versions of the backgrounds and lighter ambient light. Panels, cards, text and timers keep their own
   dark backing, so contrast stays the same in both themes. Backgrounds cross-fade when the theme changes. */
.home, .arena-bg, .lobby, .loading, .results::before { transition: background-image 1.2s ease, background-color 1.2s ease, background 1.2s ease; }
body[data-daytime="day"] .cr-wrap { background-color: #8fc3ee; background-image: url(img/home-day.webp); }
body[data-daytime="day"] .cr-wrap::after { background: linear-gradient(180deg, rgba(20,42,100,.02) 0 43%, rgba(26,49,110,.08) 62%, rgba(10,28,76,.3) 100%); }
body[data-daytime="day"] .home { background-color: #8fc3ee; background-image: url(img/home-day.webp); }
body[data-daytime="day"] .home::before { background: radial-gradient(circle at 50% 42%, transparent 30%, rgba(30, 50, 110, .14) 70%, rgba(20, 30, 80, .42) 100%), linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(20, 40, 100, .16)); }
body[data-daytime="day"] .arena-bg { background-image: url("img/arena-day.webp"); filter: saturate(1.02) contrast(1.03); }
body[data-daytime="day"] .game { background: radial-gradient(circle at 50% 44%, rgba(120, 170, 240, .3), transparent 54%), #24406e; }
body[data-daytime="day"] .results { background: #1d3561; }
body[data-daytime="day"] .results::before { background: linear-gradient(180deg, rgba(20, 40, 90, .12), rgba(14, 26, 70, .62)), url("img/arena-day.webp") center / cover no-repeat; }
body[data-daytime="day"] .lobby { background: radial-gradient(ellipse at 50% 26%, #6da6ea 0%, #2f5aa8 52%, #142a63 100%); }
body[data-daytime="day"] .lobby::before { background: url(img/home-day.webp) center/cover; opacity: .32; filter: blur(3px); }
body[data-daytime="day"] .loading { background: radial-gradient(ellipse at 50% 40%, #6aa4ea 0%, #2b55a6 58%, #10245c 100%); }
/* the floating title and section headers keep a dark outline on the brighter sky */
/* (the gold titles are gradient-filled text: a text-shadow would paint over the gold, so they get a drop-shadow) */
body[data-daytime="day"] .lobby-title { text-shadow: 0 3px 0 #2a1600, 0 0 18px rgba(10, 20, 60, .55); }
body[data-daytime="day"] .res-title { filter: drop-shadow(0 3px 0 #3a1d00) drop-shadow(0 0 14px rgba(10, 20, 60, .6)); }
@media (prefers-reduced-motion: reduce) { .home, .arena-bg, .lobby, .loading, .results::before { transition: none; } }
/* The small mic in the room lobby: the "off" slash is sized to the smaller button. */
.lobby.room-mode .lobby-voice .mic-btn:not(.live)::after { left: 22px; top: 9px; width: 4px; height: 30px; }
.lobby.room-mode .lobby-voice .mic-btn .ico { width: 28px; height: 28px; }

/* Multi-game card results: the countdown in the middle of the screen, outside the standings board; the board's
   actions keep only End Session (no divider line). */
/* below the player cards (left of the standings board) */
.res-count { position: absolute; left: 24px; right: 530px; top: 330px; z-index: 4; display: flex; align-items: center; justify-content: center; gap: 12px; pointer-events: none; }
.res-count small { color: #f4ecff; font: 900 26px Lilita, system-ui, sans-serif; letter-spacing: .04em; text-shadow: 0 3px 10px rgba(0,0,0,.6); }
.res-count b { min-width: 76px; padding: 6px 16px; border-radius: 20px; text-align: center; color: #3a1d00; background: linear-gradient(180deg, #fff1a6, #f2b230 60%, #c07a10); font: 900 48px/1 Cinzel, serif; box-shadow: 0 0 0 4px rgba(255,255,255,.5), 0 0 30px rgba(255,210,90,.55), 0 8px 18px rgba(0,0,0,.45); animation: countPulse 1s ease-in-out infinite; }
@keyframes countPulse { 50% { transform: scale(1.08); } }
.results.series-mode .sr-actions { border-top: 0; justify-content: center; min-height: 0; padding-top: 6px; }
.sr-my-item { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 10px; margin: 0 0 8px; padding: 8px 11px; border-radius: 13px; background: rgba(150,90,255,.16); box-shadow: inset 0 0 0 1px rgba(200,160,255,.35); }
.sr-item-pic { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 11px; background: rgba(0,0,0,.3) center/80% no-repeat; box-shadow: inset 0 0 0 2px #ffd866; color: #cfc6f2; font-size: 22px; }
.sr-my-item b { display: block; color: #fff0a6; font-size: 15px; }
.sr-my-item small { display: block; color: #d8cff5; font: 12px/1.3 system-ui, sans-serif; }
@media (orientation: portrait) { .res-count { left: 32px; right: 32px; top: auto; bottom: 200px; transform: none; } }
@media (prefers-reduced-motion: reduce) { .res-count b { animation: none; } }
/* Result actions: Play Again beside Home */
.res-actions #resAgain { min-width: 190px; }
/* History: computer players carry a robot badge */
.hp-av { position: relative; }
.hp-av.bot { cursor: help; opacity: .75; }
.hp-av.bot i { position: absolute; right: -5px; bottom: -5px; font-size: 13px; font-style: normal; line-height: 1; filter: drop-shadow(0 1px 1px rgba(0,0,0,.7)); }
.hp-av.real { box-shadow: 0 0 0 2px #ffd866; }
/* Royal Spin: notes, odds link and Watch Ad on one line under the buttons, never on top of each other */
.spin-foot { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px 14px; width: 100%; margin-top: 8px; }
.spin-foot .spin-meta { flex: 1 1 360px; margin: 0; text-align: center; }
.spin2 .spin-ad { position: static; flex: none; }

/* ---------- Pop-up notifications: themed cards ----------
   Every pop-up has a theme colour (--nc), a deeper shade (--nd) and a glow (--ng): a glassy dark card tinted with
   the theme, a glowing accent edge on the left, a round medallion for the icon, a small coloured label, and a
   matching countdown bar. Errors shake once; rewards get a soft shine. */
.note { --nc: #6aa8ff; --nd: #1d2f7a; --ng: rgba(106,168,255,.45);
  width: 410px; gap: 14px; align-items: center; padding: 14px 44px 16px 18px; border-radius: 20px;
  background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--nc) 26%, transparent), transparent 55%), linear-gradient(135deg, color-mix(in srgb, var(--nd) 92%, #000) 0%, #120a3a 100%);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--nc) 70%, transparent), 0 0 24px var(--ng), 0 18px 36px rgba(0,0,0,.55);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.note::before { content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 5px; border-radius: 0 6px 6px 0; background: linear-gradient(180deg, color-mix(in srgb, var(--nc) 60%, #fff), var(--nc)); box-shadow: 0 0 14px var(--ng); }
.note .n-glow { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,.1) 50%, transparent 60%); transform: translateX(-100%); }
.note .n-ico { position: relative; width: 52px; height: 52px; flex: none; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--nc) 55%, #fff) 0%, var(--nc) 45%, var(--nd) 100%); box-shadow: 0 0 0 3px rgba(255,255,255,.18), 0 0 18px var(--ng), inset 0 -4px 8px rgba(0,0,0,.25); }
.note .n-ico i { font-style: normal; font-size: 26px; line-height: 1; filter: drop-shadow(0 2px 2px rgba(0,0,0,.35)); }
.note .n-body { font-size: 18px; }
.note .n-body > b:first-child { color: color-mix(in srgb, var(--nc) 45%, #fff); font: 900 19px Lilita, system-ui, sans-serif; letter-spacing: .02em; }
.note .n-kind { display: inline-block; margin-bottom: 4px; padding: 2px 9px; border-radius: 999px; font: 800 11px system-ui, sans-serif; font-style: normal; letter-spacing: .1em; text-transform: uppercase; color: #fff; background: color-mix(in srgb, var(--nc) 55%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--nc) 80%, #fff); }
.note .n-text { font-size: 15.5px; line-height: 1.38; color: #f4f0ff; }
.note .n-x { top: 50%; right: 10px; transform: translateY(-50%); background: rgba(255,255,255,.1); color: #fff; }
.note .n-x:hover { background: rgba(255,255,255,.22); }
.note .n-timer { height: 3px; background: linear-gradient(90deg, color-mix(in srgb, var(--nc) 40%, #fff), var(--nc)); box-shadow: 0 0 8px var(--ng); }
.note .n-btn { background: linear-gradient(180deg, color-mix(in srgb, var(--nc) 75%, #fff), var(--nd)); }
.note.nt-err { --nc: #ff5a6a; --nd: #6e0f24; --ng: rgba(255,80,100,.5); animation: noteIn .35s cubic-bezier(.2, 1.3, .4, 1), noteShake .45s .35s ease-in-out; }
.note.nt-warn { --nc: #ffb33a; --nd: #6b3b05; --ng: rgba(255,180,60,.45); }
.note.nt-reward, .note.nt-success { --nc: #3fd47a; --nd: #0d4d2c; --ng: rgba(255,214,90,.5); box-shadow: inset 0 0 0 1.5px #ffd866, 0 0 26px rgba(255,214,90,.45), 0 18px 36px rgba(0,0,0,.55); }
.note.nt-reward .n-glow, .note.nt-success .n-glow { animation: noteShine 2.4s .3s ease-in-out infinite; }
.note.nt-reward .n-ico { background: radial-gradient(circle at 35% 30%, #fff6c4 0%, #ffd866 40%, #b9770e 100%); }
.note.nt-invite { --nc: #5fe07a; --nd: #0f5a2a; --ng: rgba(95,224,122,.5); }
.note.nt-social { --nc: #ff7ab8; --nd: #6a1748; --ng: rgba(255,122,184,.45); }
.note.nt-info { --nc: #6aa8ff; --nd: #1d2f7a; --ng: rgba(106,168,255,.4); }
.note.err, .note.invite { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--nc) 70%, transparent), 0 0 24px var(--ng), 0 18px 36px rgba(0,0,0,.55); }
@keyframes noteShake { 20% { transform: translateX(-7px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(2px); } }
@keyframes noteShine { 0%, 55% { transform: translateX(-100%); } 85%, 100% { transform: translateX(100%); } }

/* In-game toast (top centre) with the same themes */
.toast { --nc: #6aa8ff; --nd: #1d2f7a; --ng: rgba(106,168,255,.4); display: flex; align-items: center; gap: 10px; padding: 10px 22px 10px 12px; border-radius: 999px; font-size: 17px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--nd) 92%, #000), #120a3a); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--nc) 75%, transparent), 0 0 22px var(--ng), 0 10px 22px rgba(0,0,0,.5); }
.toast .t-ico { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 50%; font-style: normal; font-size: 18px; background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--nc) 55%, #fff), var(--nc) 50%, var(--nd)); box-shadow: 0 0 12px var(--ng); }
.toast.nt-err { --nc: #ff5a6a; --nd: #6e0f24; --ng: rgba(255,80,100,.5); }
.toast.nt-warn { --nc: #ffb33a; --nd: #6b3b05; --ng: rgba(255,180,60,.45); }
.toast.nt-reward, .toast.nt-success { --nc: #3fd47a; --nd: #0d4d2c; --ng: rgba(255,214,90,.5); }
.toast.nt-social { --nc: #ff7ab8; --nd: #6a1748; --ng: rgba(255,122,184,.45); }
@media (prefers-reduced-motion: reduce) { .note.nt-err { animation: noteIn .35s ease-out; } .note .n-glow { animation: none !important; } }
.sr-my-item small b { display: inline; color: #fff; font-size: inherit; }

/* Result title: the game number badge before MATCH COMPLETE */
.res-title .res-num { display: inline-block; vertical-align: middle; margin-right: 14px; padding: 4px 14px; border-radius: 14px; font: 900 .5em/1.2 Lilita, system-ui, sans-serif; letter-spacing: .06em; color: #3a1d00; -webkit-text-fill-color: #3a1d00; background: linear-gradient(180deg, #fff1a6, #f2b230 60%, #c07a10); box-shadow: 0 0 0 3px rgba(255,255,255,.45), 0 6px 14px rgba(0,0,0,.4); text-shadow: none; position: relative; top: -.12em; }

/* Store → Coins → Gold: Watch ads */
.ad-panel { display: flex; flex-direction: column; gap: 10px; background: linear-gradient(135deg, rgba(60,120,255,.25), rgba(30,16,90,.6)); box-shadow: inset 0 0 0 1px rgba(110,170,255,.4); }
.ad-head { display: flex; align-items: center; gap: 12px; }
.ad-ico { width: 52px; height: 52px; flex: none; display: grid; place-items: center; border-radius: 50%; font-size: 26px; background: radial-gradient(circle at 35% 30%, #cfe3ff, #4f8cf0 50%, #1d3b8a); box-shadow: 0 0 16px rgba(106,168,255,.5); }
.ad-head b { font-size: 19px; color: #e8f1ff; }
.ad-head p { margin: 2px 0 0; }
.ad-dots { display: flex; align-items: center; gap: 6px; }
.ad-dots i { width: 22px; height: 8px; border-radius: 4px; background: rgba(255,255,255,.15); }
.ad-dots i.on { background: linear-gradient(90deg, #ffe680, #f2b230); box-shadow: 0 0 8px rgba(255,214,90,.6); }
.ad-dots span { margin-left: 6px; color: #d8cff5; font: 700 13px system-ui, sans-serif; }
.ad-btn { align-self: flex-start; }

/* Result actions (Quick Play and one-room matches): SHARE RESULT bottom-right, PLAY AGAIN and HOME in the middle.
   Multi-game cards keep their own layout (standings board on the right, no share). */
.results .res-share { position: absolute; right: 30px; bottom: 24px; z-index: 4; min-height: 52px; padding: 12px 24px; font-size: 20px; }
.results.series-mode .res-share { display: none; }
.results:not(.series-mode) .res-actions { left: 50%; right: auto; transform: translateX(-50%); }
/* Voice on the result board (1 Nov 2026): a Room keeps talking until it closes. */
/* Friends → Search: players by name or Player ID (3 Nov 2026) */
.fr-search { width: 240px; box-sizing: border-box; font: 600 17px system-ui, sans-serif; padding: 9px 12px; border-radius: 12px; border: 2px solid rgba(255, 216, 102, .55); background: rgba(10, 6, 40, .75); color: #fff; outline: none; }
.fr-search:focus { border-color: #ffd866; }
.fr-count { margin: 6px 4px; }
/* ---------- Chat: friends search and filters (3 Nov 2026) ---------- */
.chat-ftools { position: sticky; top: 0; z-index: 2; padding: 6px 4px 8px; background: inherit; }
.chat-fsearch { width: 100%; box-sizing: border-box; font: 600 16px system-ui, sans-serif; letter-spacing: 0; padding: 9px 12px; border-radius: 12px; border: 2px solid rgba(255, 216, 102, .55); background: rgba(10, 6, 40, .75); color: #fff; outline: none; }
.chat-fsearch:focus { border-color: #ffd866; }
.chat-fsearch::placeholder { color: rgba(255, 255, 255, .55); }
/* Chat → Friends (4 Nov 2026): search with Add beside it, one segmented filter bar with counts, recent chats first. */
.cf-top { display: flex; gap: 8px; align-items: stretch; }
.cf-top .chat-fsearch { flex: 1; min-width: 0; }
.cf-add { flex: none; display: inline-flex; align-items: center; gap: 4px; padding: 0 14px; border: 0; border-radius: 12px; background: linear-gradient(180deg, #6fe05a, #2f9a2a); box-shadow: inset 0 2px 0 rgba(255,255,255,.35), 0 3px 0 #1a5a10; color: #fff; font: 800 16px 'Lilita', system-ui, sans-serif; letter-spacing: .3px; text-shadow: 0 1px 0 rgba(0,0,0,.35); cursor: pointer; }
.cf-add b { font-size: 20px; line-height: 1; }
.cf-add:active { transform: translateY(2px); box-shadow: inset 0 2px 0 rgba(255,255,255,.35), 0 1px 0 #1a5a10; }
.cf-seg { display: flex; gap: 4px; margin-top: 8px; padding: 4px; border-radius: 14px; background: rgba(10, 6, 40, .6); box-shadow: inset 0 2px 6px rgba(0,0,0,.35); }
.cf-seg button { flex: 1 1 auto; min-width: 0; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 10px; border: 0; border-radius: 10px; background: transparent; color: rgba(255,255,255,.78); font: 400 15px 'Lilita', system-ui, sans-serif; letter-spacing: .3px; white-space: nowrap; cursor: pointer; transition: background .15s, color .15s; }
.cf-seg button span { overflow: hidden; text-overflow: ellipsis; }
.cf-seg button.on { background: linear-gradient(180deg, #ffe08a, #e8a92e); color: #4a2400; box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 2px 0 #8a5300; }
.cf-seg em { font-style: normal; min-width: 20px; padding: 1px 6px; border-radius: 9px; background: rgba(255,255,255,.14); font: 800 12px system-ui, sans-serif; line-height: 16px; }
.cf-seg em:empty { display: none; }
.cf-seg button.on em { background: rgba(74, 36, 0, .16); }
.cf-seg em.hot { background: #ff4d5e; color: #fff; }
.cf-env { font-style: normal; font-size: 14px; }
.cf-dot { display: inline-block; flex: none; width: 9px; height: 9px; border-radius: 50%; background: #8a8aa0; }
.cf-last .cf-dot { margin-right: 6px; vertical-align: 1px; }
.cf-dot.on { background: #4fd86a; box-shadow: 0 0 0 2px rgba(79, 216, 106, .25); }
.cf-row .cf-last { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: rgba(255,255,255,.72); font-size: 14px; }
.cf-row .cf-last em { font-style: normal; color: #ffd866; }
.cf-row.unread .cf-last { color: #fff; font-weight: 700; }
.cf-row .grow { min-width: 0; }
.cf-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; margin-left: 8px; }
.cf-time { color: rgba(255,255,255,.55); font: 700 12px system-ui, sans-serif; }
.cf-time.new { color: #4fd86a; }
/* ---------- Home extras (2 Nov 2026) ---------- */
.home-events { position: absolute; left: 50%; top: 76px; transform: translateX(-50%); width: 620px; height: 58px; z-index: 3; }
.he-slide { position: absolute; inset: 0; display: flex; align-items: center; gap: 12px; padding: 6px 10px 6px 8px; border-radius: 18px; border: 2px solid rgba(255, 216, 102, .8); box-shadow: 0 6px 16px rgba(0, 0, 0, .35), inset 0 1px rgba(255, 255, 255, .25); color: #fff8dc; opacity: 0; transform: translateX(24px); transition: opacity .45s, transform .45s; pointer-events: none; }
.he-slide.on { opacity: 1; transform: none; pointer-events: auto; }
.he-slide.c-purple { background: linear-gradient(90deg, #4a1f8f, #2a0f5c); }
.he-slide.c-gold { background: linear-gradient(90deg, #a8680f, #6b3c05); }
.he-slide.c-green { background: linear-gradient(90deg, #1f7a3c, #0e4d24); }
.he-slide.c-blue { background: linear-gradient(90deg, #1d5fae, #0c3366); }
.he-slide.c-red { background: linear-gradient(90deg, #a3263b, #5e0f1f); }
.he-ico { font-size: 30px; width: 42px; text-align: center; flex: none; }
.he-txt { flex: 1; min-width: 0; line-height: 1.15; }
.he-txt b { display: block; font-family: 'Lilita', sans-serif; font-size: 20px; letter-spacing: .3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.he-txt small { display: block; font-size: 14px; opacity: .9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.he-go { flex: none; padding: 7px 14px; border-radius: 12px; background: linear-gradient(180deg, #ffe08a, #e8a92e); color: #4a2400; font-family: 'Lilita', sans-serif; font-size: 16px; box-shadow: 0 3px 0 #8a5300; }
.he-dots { position: absolute; right: 14px; bottom: -9px; display: flex; gap: 5px; }
.he-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, .45); }
.he-dots i.on { background: #ffd866; }
.home-next { position: absolute; left: 18px; top: 134px; max-width: 300px; padding: 5px 12px; border-radius: 14px; background: rgba(15, 40, 20, .78); border: 1px solid rgba(140, 230, 140, .6); color: #e6ffe0; font-size: 14px; line-height: 1.2; text-align: left; z-index: 3; }
.home-next b { color: #ffe9a0; }
@media (prefers-reduced-motion: reduce) { .he-slide { transition: none; } }
.results .res-voice { left: 24px; bottom: 20px; padding: 7px 16px 7px 9px; gap: 10px; z-index: 4; }
.results .res-voice .mic-btn { width: 56px; height: 56px; }
.results .res-voice .spk-btn { width: 44px; height: 44px; }
.results .res-voice .mic-btn em { display: none; }
.results .res-voice .lv-label { font-size: 16px; }
.results .res-voice .lv-label small { font-size: 13px; }
.results.series-mode .res-voice { bottom: 128px; } /* above "You finished as…", which sits bottom-left in a series */
@media (orientation: portrait) { .results.series-mode .res-voice { bottom: 20px; } } /* there the summary sits higher */
/* Profile: the Likes tile is the like button */
.likes-stat.like-btn { cursor: pointer; color: inherit; font: inherit; border: 0; transition: transform .15s ease, box-shadow .15s ease; }
.likes-stat.like-btn.can { background: linear-gradient(160deg, rgba(255,122,184,.35), rgba(90,30,120,.6)); box-shadow: inset 0 0 0 2px rgba(255,140,200,.7), 0 0 16px rgba(255,122,184,.35); }
.likes-stat.like-btn.can:hover { transform: translateY(-2px); }
.likes-stat.like-btn.done { box-shadow: inset 0 0 0 2px rgba(95,209,122,.55); }
.likes-stat.like-btn.done .like-label { color: #a8f0b8; }
.likes-stat.like-btn.busy { opacity: .6; }
.likes-stat.like-btn.locked { box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
.likes-stat.like-btn.locked .like-label { opacity: .75; }
.likes-stat.like-btn.pop b { animation: likePop .45s ease; }
@keyframes likePop { 40% { transform: scale(1.35); } }

/* Daily Quests: this week's earlier days can be opened (read-only) */
.daily-strip .day.pickable { cursor: pointer; font: inherit; color: inherit; border: 0; }
.daily-strip .day.pickable:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 2px rgba(255,216,102,.6); }
.daily-strip .day.viewing { box-shadow: inset 0 0 0 3px #ffd866, 0 0 14px rgba(255,216,102,.4); }
.quest-past-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.quest-past-head b { font-size: 18px; color: #ffe08a; }
.quest-past-head .pill-btn { margin-left: auto; }
.quest.past { opacity: .92; }
.quest.past.missed { opacity: .6; filter: saturate(.6); }
.quest .quest-state { min-width: 92px; text-align: center; padding: 6px 10px; border-radius: 10px; font: 800 12px system-ui, sans-serif; letter-spacing: .06em; background: rgba(255,255,255,.08); color: #d8cff5; }
.quest.past.claimed .quest-state { background: rgba(95,209,122,.25); color: #c9ffd5; }

/* The one profile setup */
.setup-once { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 14px; align-items: center; margin: 14px 0 0; padding: 12px 16px; border-radius: 18px; background: linear-gradient(120deg, rgba(40,150,80,.4), rgba(30,16,90,.7)); box-shadow: inset 0 0 0 2px rgba(130,240,160,.55); }
.setup-once .so-ico { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 14px; font-size: 28px; background: rgba(0,0,0,.25); }
.setup-once b { font-size: 18px; color: #d9ffe2; }
.setup-once p { margin: 2px 0 0; color: #e6defc; font: 14px/1.35 system-ui, sans-serif; }
.setup-note { margin: 0 0 10px; padding: 8px 12px; border-radius: 12px; background: rgba(255,216,102,.12); color: #fff3cf; font: 14px/1.4 system-ui, sans-serif; }
.ps-avatars { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 8px; max-height: 150px; overflow-y: auto; padding: 4px; }
.ps-av { aspect-ratio: 1; border-radius: 12px; background: #3a2390 center/cover no-repeat; box-shadow: 0 0 0 2px rgba(255,255,255,.25); }
.ps-av.on { box-shadow: 0 0 0 3px #ffd866, 0 0 12px rgba(255,216,102,.6); }
.form-grid.two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.form-grid > .field { min-width: 0; }
.form-grid > .field select, .form-grid > .field input { width: 100%; max-width: 100%; box-sizing: border-box; }

/* Settings → Delete account: the DELETE confirmation box inside the ask dialog */
.ask-card .del-confirm { display: block; width: 100%; margin-top: 10px; padding: 10px 12px; border-radius: 12px; border: 2px solid rgba(255,120,120,.6); background: rgba(0,0,0,.35); color: #fff; font: 800 18px system-ui, sans-serif; letter-spacing: 3px; text-align: center; text-transform: uppercase; }
.ask-card button:disabled { opacity: .45; cursor: not-allowed; }
.set-group.danger-zone { border-color: rgba(255,110,110,.35); }
.set-group.danger-zone h4 { color: #ff9b9b; }
/* Room lobby: Start waits for everyone; Settings → Room is read-only for guests */
#startBtn.waiting { background: linear-gradient(180deg, #8d8aa8, #5d5a7a); box-shadow: 0 5px 0 #3c3a55; }
.seg button:disabled, .toggle:disabled { opacity: .55; cursor: not-allowed; }
.rs-note { text-align: center; margin-top: 10px; }
/* The Royal Pass card art (Treasury → Items and Others) */
.bag-card .pic.pass { background-size: contain; background-repeat: no-repeat; background-position: center; }
.panel.pass-panel { position: relative; padding-left: 74px; min-height: 84px; }
.panel.pass-panel .pass-art { position: absolute; left: 12px; top: 10px; width: 50px; height: 72px; background: center/contain no-repeat; filter: drop-shadow(0 3px 6px rgba(0,0,0,.4)); }

/* Room lobby (17 Oct 2026): all players in one row; a compact room panel bottom left, the magic item in the middle
   and Start bottom right; room rules change only in Settings → Room. */
.lobby.room-mode .lobby-main { display: block; left: 88px; right: 20px; top: 84px; bottom: 12px; }
.lobby.room-mode .slots { position: absolute; left: -68px; right: 0; top: clamp(8px, calc((100% - 440px) / 2), 70px); display: flex; flex-wrap: nowrap; justify-content: center; gap: 16px; width: auto; }
.lobby.room-mode .slots > .slot, .lobby.room-mode .slots > .slot:nth-child(1), .lobby.room-mode .slots > .slot:nth-child(2) { grid-column: auto; width: 168px; height: 226px; }
.lobby.room-mode .series-box { position: absolute; left: calc(50% - 34px); top: clamp(248px, calc((100% - 440px) / 2 + 240px), 310px); transform: translateX(-50%); width: min(720px, 100%); max-height: 110px; }
.lobby.room-mode #roomPanel { position: absolute; left: 0; bottom: 0; width: 360px; gap: 6px; padding: 9px 12px; border-radius: 16px; }
.lobby.room-mode #roomPanel .rp-head b { font-size: 17px; }
.lobby.room-mode #roomPanel .rp-status { font-size: 11px; padding: 2px 8px; }
.lobby.room-mode #roomPanel .rp-chips { gap: 5px; }
.lobby.room-mode #roomPanel .rp-chips span { font-size: 11px; padding: 3px 7px; }
.rp-chips .rp-magic.on { background: rgba(95,209,122,.22); color: #c8f5d3; }
.rp-chips .rp-magic.off, .rp-chips .rp-magic.paused { background: rgba(255,255,255,.08); color: #cfc6ee; }
.lobby.room-mode .room-code { gap: 7px; padding: 7px 9px 7px 12px; white-space: nowrap; font-size: 16px; border: 1px solid rgba(255,216,102,.48); background: rgba(30,14,78,.9); }
.lobby.room-mode .room-code b { font-size: 22px; letter-spacing: .12em; }
.lobby.room-mode .room-code .pill-btn { padding: 6px 9px; font-size: 13px; white-space: nowrap; }
.lobby.room-mode .item-pick { position: absolute; left: 376px; right: 400px; bottom: 0; min-width: 0; }
.lobby.room-mode .lobby-bottom { right: 20px; bottom: 12px; width: 380px; }
/* Top right: Store and Settings buttons form an evenly spaced group. */
.lobby-top .lobby-icons { display: flex; align-items: center; gap: 12px; }
.lobby-top .lobby-icons .round-btn { width: 46px; height: 46px; flex: none; display: grid; place-items: center; }

/* Royal Spin (launch brief §5.2): the wheel on the left (~60%), the spin buttons stacked on the right, Watch Ad bottom right. */
.spin3 { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: center; gap: 18px; padding: 4px 6px 8px; }
.spin3 .spin-stage { width: min(330px, 100%); height: auto; aspect-ratio: 1; justify-self: center; }
.spin3 .spin-wheel { width: 100%; height: 100%; }
.spin3 .spin-side { display: flex; flex-direction: column; align-items: stretch; gap: 12px; min-height: 100%; }
.spin3 .spin-side .big-btn { width: 100%; font-size: 22px; }
.spin3 .spin-meta { margin: 0; text-align: center; font-size: 13px; line-height: 1.5; }
.spin3 .spin-ad-row { margin-top: auto; display: flex; justify-content: flex-end; }
.spin3 .spin-ad { position: static; }
.link-btn { background: none; border: 0; padding: 0; color: #ffd866; font: inherit; font-weight: 800; text-decoration: underline; cursor: pointer; }
/* Room entry without the Match format column (multi-game cards hidden): room type and Magic Cards fill the card. */
.room-gate.no-format .rg-create-grid { grid-template-columns: minmax(0, 1fr); }
.room-gate .rg-foot .rg-uses { font-weight: 800; }

/* Room Card Type (17 Oct 2026): the Room screen in two equal halves (join | create), one dropdown for the card. */
.room-gate.v3 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; height: 100%; min-height: 0; }
.room-gate.v3 h3 { margin: 0 0 8px; font-size: 18px; }
.room-gate.v3 .rg-create { min-height: 0; }
.rg-create-body { display: flex; flex-direction: column; gap: 8px; flex: 1; min-height: 0; overflow-y: auto; padding: 2px; }
.rc-pick { display: flex; align-items: center; gap: 8px; min-width: 0; }
.rc-select { flex: 1; min-width: 0; height: 42px; padding: 0 34px 0 12px; border-radius: 12px; border: 2px solid #ffd866; color: #fff; font: 700 15px system-ui, sans-serif; appearance: none; -webkit-appearance: none; cursor: pointer;
  background: #2a1670 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23ffd866' stroke-width='2.4' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center; }
.rc-select:disabled { opacity: .6; cursor: default; border-color: rgba(255,216,102,.4); }
.rc-select optgroup { color: #ffd866; background: #1c0f52; font-weight: 800; }
.rc-select option { color: #fff; background: #241466; font-weight: 600; }
.rc-select option:disabled { color: #8f84bd; }
.rc-pick .pill-btn { flex: none; white-space: nowrap; }
.rc-info { margin: 0; color: #e3dafc; font: 12.5px/1.35 system-ui, sans-serif; }
.room-gate.v3 .rg-foot { margin-top: auto; }
/* Store → Room Cards and Treasury → Items: the same Room Card Type dropdown, by type. */
.rc-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 6px; }
.rc-head .rc-label { color: #ffd866; font: 800 13px system-ui, sans-serif; letter-spacing: .06em; text-transform: uppercase; }
.rc-head .rc-select { flex: 0 1 280px; }
.rc-head .rc-own { color: #f3ecff; font: 13px system-ui, sans-serif; }
.rc-own-sec { margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(255,216,102,.22); }
.rc-tile .pic.stack em, .room-grid .pic.stack em { font-style: normal; }
/* Room Settings: the card dropdown sits on the right of its row. */
.set-row.rc-row { align-items: center; }
.set-row.rc-row .rc-pick { flex: 0 1 330px; }
.lobby.room-mode #roomPanel .rp-card { color: #ffe9a8; }
/* The lobby's Room Settings icon (a castle with a small gear), apart from the general Settings gear. */
.lobby-top .lobby-icons .room-set-btn { position: relative; }
.room-set-btn .rs-ico { font-size: 24px; line-height: 1; }
.room-set-btn .rs-gear { position: absolute; right: 3px; bottom: 3px; width: 17px !important; height: 17px !important; filter: drop-shadow(0 1px 1px rgba(0,0,0,.6)); }
/* Quick Play: the five seats and the magic item sit in the middle of the space under the title, on any screen. */
.lobby:not(.room-mode) .lobby-main .slots { margin-top: auto; flex-wrap: nowrap; }
.lobby:not(.room-mode) .lobby-main .item-pick { margin-bottom: auto; }
.lobby:not(.room-mode) .lobby-main:has(> .item-pick.feature-off) .slots { margin-bottom: auto; } /* no item row: still centred */

/* Quick Play keeps the arena backdrop and turns the waiting room into a clear
   matchmaking board: roster in the middle, loadout below it, and one obvious
   action at the bottom. Room layouts deliberately keep their own treatment. */
.lobby.quick-mode .lobby-main {
  gap: 14px;
}

.lobby.quick-mode .lobby-title {
  position: relative;
  top: auto;
  left: auto;
  right: auto;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 350px;
  min-height: 61px;
  padding: 0 28px;
  border: 1px solid rgba(255, 243, 184, .48);
  border-radius: 22px;
  background:
    radial-gradient(circle at 50% 0, rgba(164, 110, 255, .34), transparent 62%),
    linear-gradient(180deg, rgba(40, 20, 111, .88), rgba(14, 7, 53, .88));
  box-shadow: 0 0 0 2px rgba(232, 182, 74, .7), 0 12px 24px rgba(0, 0, 0, .34), inset 0 1px rgba(255, 255, 255, .15);
  color: #fff1b8;
  font-size: 33px;
  letter-spacing: .045em;
}

.lobby.quick-mode .lobby-title::after {
  content: 'ROYAL MATCHMAKING';
  position: absolute;
  left: 50%;
  bottom: -13px;
  transform: translateX(-50%);
  padding: 3px 11px;
  border: 1px solid rgba(255, 238, 163, .44);
  border-radius: 999px;
  background: #17093f;
  box-shadow: 0 4px 8px rgba(0, 0, 0, .32);
  color: #dcd1ff;
  font: 800 10px/1.15 system-ui, sans-serif;
  letter-spacing: .13em;
  white-space: nowrap;
}

.lobby.quick-mode .slots {
  gap: 12px;
  padding: 15px 16px;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 27px;
  background: linear-gradient(90deg, rgba(15, 6, 51, .46), rgba(49, 24, 119, .2), rgba(15, 6, 51, .46));
  box-shadow: inset 0 1px rgba(255, 255, 255, .1), 0 14px 28px rgba(5, 2, 27, .2);
}

.lobby.quick-mode .slot {
  overflow: visible;
  border: 1px solid rgba(210, 187, 255, .34);
  background:
    radial-gradient(circle at 50% 9%, rgba(172, 112, 255, .22), transparent 34%),
    linear-gradient(180deg, rgba(73, 41, 157, .82), rgba(20, 10, 70, .89));
  box-shadow: inset 0 1px rgba(255, 255, 255, .16), inset 0 0 0 2px rgba(15, 5, 49, .25), 0 10px 19px rgba(0, 0, 0, .32);
}

.lobby.quick-mode .slot::after {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 17px;
  pointer-events: none;
}

.lobby.quick-mode .slot.me {
  border-color: rgba(255, 241, 170, .9);
  background:
    radial-gradient(circle at 50% 8%, rgba(255, 227, 120, .38), transparent 36%),
    linear-gradient(180deg, rgba(135, 82, 20, .86), rgba(70, 32, 10, .92));
  box-shadow: 0 0 0 2px rgba(232, 182, 74, .78), 0 0 22px rgba(255, 206, 88, .26), 0 12px 22px rgba(0, 0, 0, .36), inset 0 1px rgba(255, 255, 255, .2);
}

.lobby.quick-mode .slot .avatar-box {
  box-shadow: 0 0 0 3px #fff7d7, 0 0 0 6px rgba(111, 66, 206, .76), 0 8px 14px rgba(0, 0, 0, .42);
}

.lobby.quick-mode .slot.me .avatar-box {
  box-shadow: 0 0 0 3px #fff9d6, 0 0 0 7px #bd7b14, 0 0 18px rgba(255, 218, 95, .46), 0 8px 14px rgba(0, 0, 0, .42);
}

.lobby.quick-mode .slot .sl-name { position: relative; z-index: 1; font-weight: 900; letter-spacing: .015em; }
.lobby.quick-mode .slot .sl-lv { position: relative; z-index: 1; color: #ded5ff; font: 700 12px/1.2 system-ui, sans-serif; }
.lobby.quick-mode .slot.wait { border-style: dashed; background: rgba(20, 10, 68, .7); box-shadow: inset 0 0 0 2px rgba(217, 196, 255, .06); }
.lobby.quick-mode .slot.wait .searching { position: relative; z-index: 1; border-color: rgba(235, 221, 255, .48); color: #d9cbff; }

.lobby.quick-mode .item-pick {
  display: grid;
  grid-template-columns: minmax(0, 150px) 76px minmax(0, 230px);
  align-items: center;
  justify-content: center;
  width: min(520px, 100%);
  min-width: 0;
  min-height: 76px;
  gap: 14px;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
}

.lobby.quick-mode .item-label { color: #ffd866; text-align: right; font: 900 18px/1.1 'Lilita', sans-serif; letter-spacing: .03em; text-shadow: 0 2px 5px rgba(0,0,0,.55); }
.lobby.quick-mode .item-slot { width: 76px; height: 76px; border-radius: 17px; background-color: rgba(22, 25, 67, .68); box-shadow: inset 0 0 0 3px #ffd866, 0 5px 12px rgba(0,0,0,.35); }
.lobby.quick-mode .item-slot .plus-big { font-size: 42px; color: #ffd866; }
.lobby.quick-mode .item-name { min-width: 0; width: auto; color: #fff; font: 700 16px/1.25 'Lilita', sans-serif; text-shadow: 0 2px 5px rgba(0,0,0,.65); }
.lobby.quick-mode.has-ready-item .item-slot { box-shadow: inset 0 0 0 3px #ffd866, 0 0 20px rgba(255,216,102,.45), 0 5px 12px rgba(0,0,0,.35); }

.lobby.quick-mode .lobby-fee {
  padding: 7px 13px;
  border: 1px solid rgba(255, 236, 157, .5);
  border-radius: 13px;
  background: rgba(20, 9, 61, .74);
  box-shadow: 0 5px 12px rgba(0, 0, 0, .3);
  color: #ffecac;
  font-size: 16px;
}

.lobby.quick-mode .lobby-bottom {
  left: 180px;
  right: 30px;
  width: auto;
  transform: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 64px;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
}

.lobby.quick-mode .lobby-status { min-width: 0; text-align: center; color: #ffd866; font: 900 18px/1.25 'Lilita', sans-serif; text-shadow: 0 2px 5px rgba(0, 0, 0, .65); }
.lobby.quick-mode #startBtn { min-width: 236px; min-height: 50px; border-radius: 15px; box-shadow: inset 0 3px rgba(255, 255, 255, .3), inset 0 -4px rgba(0, 0, 0, .2), 0 5px 0 rgba(15, 72, 28, .92), 0 0 16px rgba(92, 225, 96, .24); font-size: 21px; letter-spacing: .03em; }
.lobby.quick-mode.matching .lobby-title { border-color: rgba(105, 239, 255, .78); box-shadow: 0 0 0 2px rgba(105, 239, 255, .78), 0 0 29px rgba(105, 239, 255, .27), 0 12px 24px rgba(0, 0, 0, .34), inset 0 1px rgba(255, 255, 255, .15); animation: quickSearchGlow 1.35s ease-in-out infinite alternate; }
.lobby.quick-mode.matching .slot.wait { animation: quickSeatPulse 1.5s ease-in-out infinite alternate; }
.lobby.quick-mode.match-found .lobby-title { color: #fff4c5; border-color: #ffe18b; box-shadow: 0 0 0 3px #ffd866, 0 0 36px rgba(255, 216, 102, .48), 0 12px 24px rgba(0, 0, 0, .34), inset 0 1px rgba(255, 255, 255, .15); }
.lobby.quick-mode.match-found .lobby-status { color: #fff2b0; }

/* Royal Store surfaces for the room lobby and room creation, keeping their artwork visible. */
.lobby.room-mode .slot {
  border: 1px solid rgba(255, 218, 123, .52);
  background: linear-gradient(160deg, rgba(100, 55, 178, .91), rgba(28, 12, 76, .94));
  box-shadow: inset 0 1px rgba(255,255,255,.2), 0 0 0 2px rgba(91, 47, 144, .85), 0 9px 20px rgba(0,0,0,.36);
}
.lobby.room-mode .slot.me { border-color: #ffe298; box-shadow: 0 0 0 3px #d99c32, 0 0 20px rgba(255,209,92,.34), 0 9px 20px rgba(0,0,0,.35); }
.lobby.room-mode .slot.wait { border-style: dashed; background: rgba(32, 15, 82, .72); }
.lobby.room-mode .slot .avatar-box { box-shadow: 0 0 0 3px #c9a0ff, 0 5px 12px rgba(0,0,0,.35); }
.lobby.room-mode #roomPanel, .lobby.room-mode .item-pick {
  border: 1px solid rgba(255,216,102,.5);
  background: linear-gradient(135deg, rgba(73,38,139,.94), rgba(29,13,76,.94));
  box-shadow: inset 0 1px rgba(255,255,255,.15), 0 7px 16px rgba(0,0,0,.3);
}
.lobby.room-mode .item-label { color: #ffe18b; }
.lobby.room-mode .item-slot { box-shadow: 0 0 0 2px #8be9ff, inset 0 0 14px rgba(105,239,255,.25); }
.lobby.room-mode .lobby-status { color: #eee4ff; text-shadow: 0 2px 4px #160934; }
/* Shared royal details stay inside the existing controls and leave the backdrop visible. */
.lobby .lobby-top .round-btn {
  border: 1px solid rgba(255, 223, 133, .72);
  box-shadow: inset 0 2px rgba(255,255,255,.22), 0 0 0 2px rgba(86,43,132,.8), 0 5px 0 rgba(29,13,70,.85);
}
.lobby .lobby-top .back {
  border: 1px solid rgba(255,223,133,.68);
  box-shadow: inset 0 2px rgba(255,255,255,.2), 0 4px 0 #25104e;
}
.lobby .slot .sl-host {
  z-index: 3;
  border: 1px solid #fff0ae;
  background: linear-gradient(180deg, #ffe899, #d89124);
  box-shadow: 0 3px 8px rgba(0,0,0,.35);
  font-weight: 900;
}
.lobby.room-mode .slot::after {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(255,235,175,.16);
  border-radius: 17px;
  pointer-events: none;
}
.lobby.room-mode .rp-chips span {
  border: 1px solid rgba(255,216,102,.18);
  background: rgba(18,8,58,.54);
}
.lobby button:focus-visible { outline: 3px solid #a5f3ff; outline-offset: 3px; }
.room-gate.v3 .rg-card {
  border: 1px solid rgba(255,216,102,.48);
  background: linear-gradient(150deg, rgba(92,48,166,.92), rgba(30,14,78,.96));
  box-shadow: inset 0 1px rgba(255,255,255,.16), 0 7px 18px rgba(0,0,0,.28);
}
.room-gate.v3 h3 { color: #ffe39a; font-family: 'Cinzel', serif; font-weight: 900; }
.room-gate.v3 .rg-create { border-color: #e8b64a; }
.room-gate.v3 .rg-label { color: #ffe299; font: 900 12px/1.2 'Cinzel', serif; letter-spacing: .1em; }
.room-gate.v3 .rc-select {
  border-color: #e9bd58;
  color: #fff0bb;
  font-family: 'Cinzel', serif;
  font-weight: 900;
  letter-spacing: .025em;
  text-shadow: 0 2px 3px rgba(0,0,0,.65);
  box-shadow: inset 0 1px rgba(255,255,255,.18), 0 3px 0 #3a1a57, 0 5px 12px rgba(0,0,0,.25);
}
.room-gate.v3 .rc-select optgroup { color: #ffe299; font-family: 'Cinzel', serif; font-weight: 900; }
.room-gate.v3 .rc-select option { color: #fff5d7; font-family: 'Cinzel', serif; font-weight: 700; }
.room-gate.v3 .rc-select option:disabled { color: #a69ac4; }
.room-gate.v3 .rc-pick { align-items: flex-start; }
.rc-create-picker { flex: 1; min-width: 0; }
.rc-picker-trigger { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 52px; padding: 7px 12px; border: 1px solid rgba(255,224,145,.76); border-radius: 13px; color: #fff5d9; text-align: left; cursor: pointer; background: linear-gradient(145deg, rgba(72,41,132,.98), rgba(28,17,75,.98)); box-shadow: inset 0 1px rgba(255,255,255,.2), 0 3px 0 #32174e, 0 5px 12px rgba(0,0,0,.24); transition: border-color .16s ease, filter .16s ease, transform .16s ease; }
.rc-picker-trigger:hover:not(:disabled) { border-color: #fff0a9; filter: brightness(1.1); transform: translateY(-1px); }
.rc-picker-trigger:disabled { opacity: .62; cursor: default; }
.rc-picker-current { display: grid; gap: 2px; min-width: 0; }
.rc-picker-current small { color: #a9ebff; font: 900 9px/1.1 system-ui,sans-serif; letter-spacing: .16em; }
.rc-picker-current b { overflow: hidden; color: #fff0bb; font: 800 14px/1.25 'Cinzel', Georgia,serif; text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 2px 3px rgba(0,0,0,.5); }
.rc-picker-chevron { flex: none; color: #ffda72; font: 900 22px/1 system-ui,sans-serif; transition: transform .18s ease; }
.rc-picker-trigger[aria-expanded="true"] .rc-picker-chevron { transform: rotate(180deg); }
.rc-picker-menu { display: grid; gap: 6px; max-height: 192px; margin-top: 7px; padding: 8px; overflow-y: auto; overscroll-behavior: contain; border: 1px solid rgba(255,216,102,.58); border-radius: 13px; background: linear-gradient(155deg, rgba(23,12,63,.98), rgba(12,10,44,.99)); box-shadow: inset 0 1px rgba(255,255,255,.08), 0 5px 14px rgba(0,0,0,.3); scrollbar-color: #bd9c55 rgba(255,255,255,.08); }
.rc-picker-menu[hidden] { display: none; }
.rc-picker-group { display: grid; gap: 4px; }
.rc-picker-heading { display: flex; align-items: center; gap: 7px; padding: 3px 5px 2px; color: #ffe39a; font: 900 11px/1.2 'Cinzel', Georgia,serif; letter-spacing: .045em; }
.rc-picker-heading span { font-size: 15px; }
.rc-picker-option { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 43px; padding: 6px 9px; border: 1px solid rgba(191,166,255,.17); border-radius: 10px; color: #f7f0ff; text-align: left; cursor: pointer; background: linear-gradient(110deg, rgba(92,59,155,.38), rgba(34,29,99,.45)); transition: border-color .15s ease, background .15s ease, transform .15s ease; }
.rc-picker-option:hover:not(:disabled), .rc-picker-option:focus-visible { border-color: rgba(151,239,255,.78); background: linear-gradient(110deg, rgba(47,131,160,.52), rgba(69,54,147,.6)); }
.rc-picker-option.selected { border-color: #8deaff; background: linear-gradient(110deg, rgba(38,124,147,.54), rgba(77,52,146,.68)); box-shadow: inset 0 0 0 1px rgba(140,238,255,.13); }
.rc-picker-option:disabled { opacity: .48; cursor: not-allowed; }
.rc-picker-copy { display: grid; gap: 2px; min-width: 0; }
.rc-picker-copy b { overflow: hidden; color: #fff5dc; font: 750 12px/1.25 system-ui,sans-serif; text-overflow: ellipsis; white-space: nowrap; }
.rc-picker-copy small { color: #c7bce7; font: 600 10px/1.2 system-ui,sans-serif; }
.rc-picker-balance { flex: none; padding: 3px 6px; border: 1px solid rgba(255,216,102,.28); border-radius: 20px; color: #ffe18a; background: rgba(255,216,102,.09); font: 900 8px/1 system-ui,sans-serif; letter-spacing: .04em; white-space: nowrap; }
.room-gate.v3 .rg-opt { background: rgba(19,9,59,.5); }
.room-gate.v3 .rg-opt.private.on { background: linear-gradient(145deg, #8a56d7, #4e298e); }
.room-gate.v3 .rg-opt.public.on { background: linear-gradient(145deg, #268e9b, #174d79); }
.room-gate.v3 .rg-rule, .room-gate.v3 .rg-room { background: rgba(15,7,51,.48); }
.room-gate.v3 .rg-room { box-shadow: inset 0 0 0 1px rgba(255,216,102,.18); }
.room-gate.v3 .rg-foot { border-color: rgba(255,216,102,.45); }
.room-gate.v3 .room-input:focus-visible, .room-gate.v3 .rc-select:focus-visible, .room-gate.v3 button:focus-visible { outline: 3px solid #a5f3ff; outline-offset: 2px; }

@keyframes quickSearchGlow { to { filter: brightness(1.12); transform: translateY(-2px); } }
@keyframes quickSeatPulse { to { border-color: rgba(105, 239, 255, .8); box-shadow: inset 0 0 0 2px rgba(105, 239, 255, .1), 0 0 21px rgba(105, 239, 255, .2); } }
@media (prefers-reduced-motion: reduce) {
  .lobby.quick-mode.matching .lobby-title, .lobby.quick-mode.matching .slot.wait, .lobby .slot.wait .searching { animation: none; }
}

@media (max-width: 860px) {
  .lobby.quick-mode .lobby-title { min-width: 290px; min-height: 54px; font-size: 27px; }
  .lobby.quick-mode .slots { gap: 8px; padding: 11px; }
  .lobby.quick-mode .slot { width: 120px; height: 176px; }
  .lobby.quick-mode .slot .avatar-box, .lobby.quick-mode .slot .searching { width: 78px; height: 78px; }
  .lobby.quick-mode .item-pick { grid-template-columns: minmax(0, 130px) 60px minmax(0, 190px); min-height: 60px; gap: 10px; }
  .lobby.quick-mode .item-slot { width: 60px; height: 60px; }
  .lobby.quick-mode .lobby-bottom { min-height: 54px; }
  .lobby.quick-mode .lobby-status { font-size: 12px; }
  .lobby.quick-mode #startBtn { min-width: 182px; min-height: 42px; font-size: 17px; }
}
@media (max-height: 620px) {
  .room-gate.v3 h3 { font-size: 16px; margin-bottom: 6px; }
  .rc-select { height: 38px; font-size: 14px; }
}

/* Royal Spin (17 Oct 2026, the "Royal Spin Prize Wheel Interface" mock-up), the Store's Royal Spin tab: the wheel on
   the left, the rows on the right. */
.spin-store { display: grid; grid-template-columns: minmax(0, 43%) minmax(0, 1fr); gap: 18px; align-items: center; min-height: 100%; }
.spin-store .sp-left { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.spin-store .sp-wheel { position: relative; width: 100%; max-width: 410px; aspect-ratio: 1; filter: drop-shadow(0 12px 20px rgba(0, 0, 0, .5)); }
.sp-disc, .sp-frame { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; user-select: none; }
.sp-disc { will-change: transform; transform-origin: 50% 50%; }
.sp-segment-label { fill: #fff3ce; font: 28px "Lilita", sans-serif; letter-spacing: .5px; paint-order: stroke; stroke: rgba(49, 18, 31, .85); stroke-width: 3px; stroke-linejoin: round; }
.sp-win { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: 0; transition: opacity .25s; }
.sp-win path { fill: rgba(255, 240, 170, .07); stroke: #fff2a0; stroke-width: 10; stroke-linejoin: round; filter: drop-shadow(0 0 10px #ffd84a) drop-shadow(0 0 22px rgba(255, 200, 60, .8)); }
.sp-win.on { opacity: 1; animation: spWinPulse 1s ease-in-out infinite alternate; }
@keyframes spWinPulse { from { opacity: .75; } to { opacity: 1; } }
.sp-prize { position: absolute; left: 50%; bottom: -10px; transform: translateX(-50%); z-index: 3; display: flex; flex-direction: column; align-items: center; padding: 7px 18px 9px; border-radius: 16px; width: max-content; max-width: 100%; text-align: center;
  background: linear-gradient(180deg, #ffe88a, #f0a51c); color: #5a2a00; box-shadow: inset 0 2px 0 rgba(255, 255, 255, .6), 0 0 0 3px #8a4a06, 0 0 26px rgba(255, 210, 80, .75); }
.sp-prize b { font: 12px "Lilita", sans-serif; letter-spacing: .14em; color: #8a3d00; }
.sp-prize span { font: 22px "Lilita", sans-serif; }
.sp-prize.pop { animation: spPrizePop .55s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes spPrizePop { from { transform: translateX(-50%) scale(.3); opacity: 0; } to { transform: translateX(-50%) scale(1); opacity: 1; } }
.sp-card { position: relative; display: grid; align-items: center; column-gap: 10px; padding: 9px 12px; border-radius: 16px;
  background: linear-gradient(180deg, #26114f, #160939); box-shadow: inset 0 0 0 2px #c9923a, inset 0 0 0 4px rgba(0, 0, 0, .35); }
.sp-ico { width: 62px; height: auto; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .45)); }
.sp-title { color: #fff1c4; font: 19px/1.1 "Lilita", sans-serif; text-shadow: 0 2px 0 rgba(0, 0, 0, .45); }
.sp-count { color: #fff; font: 600 13px system-ui, sans-serif; white-space: nowrap; }
.sp-btn { font-family: "Lilita", sans-serif; color: #fff; border-radius: 14px; text-shadow: 0 2px 0 rgba(0, 0, 0, .35); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .35), inset 0 -4px 0 rgba(0, 0, 0, .2), 0 4px 0 rgba(0, 0, 0, .35); }
.sp-btn.green { background: linear-gradient(180deg, #6cec5c, #22a434); }
.sp-btn.blue { background: linear-gradient(180deg, #55b4ff, #1c62d8); }
.sp-btn.done { background: linear-gradient(180deg, #8a7bb0, #574a7a); }
.sp-btn.big { padding: 12px 22px; font-size: 24px; min-width: 170px; }
.sp-btn.mini { padding: 5px 0; width: 100%; font-size: 14px; border-radius: 10px; }
.sp-btn:disabled { filter: grayscale(.75) brightness(.8); cursor: default; }
.sp-pill { padding: 2px 10px; border-radius: 12px; color: #fff; font: 600 12.5px system-ui, sans-serif; background: rgba(40, 14, 90, .9); box-shadow: inset 0 0 0 2px #9a78ff; }
.sp-pill.used { box-shadow: inset 0 0 0 2px #7a6aa0; color: #cfc4ee; }
.sp-bonus { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 7px; padding: 5px 8px 5px 12px; border-radius: 12px; background: rgba(255, 216, 102, .12); box-shadow: inset 0 0 0 1px rgba(255, 216, 102, .5); color: #ffeab0; font: 600 13.5px system-ui, sans-serif; }
.sp-bonus .sp-btn.mini { width: 90px; }
.sp-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sp-ads .sp-ico { width: 56px; }
.sp-slots { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.sp-slot { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 5px 5px 4px; border-radius: 12px; background: rgba(12, 5, 36, .7); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2); }
.sp-slot small { color: #fff; font: 600 12px system-ui, sans-serif; }
.sp-slot img { width: 32px; height: auto; }
.sp-slot em { font: 700 12.5px system-ui, sans-serif; font-style: normal; color: #fff; }
.sp-slot.s1 { box-shadow: inset 0 0 0 2px #6cec5c, 0 0 12px rgba(108, 236, 92, .45); }
.sp-slot.s2 { box-shadow: inset 0 0 0 2px #e2b24a; }
.sp-slot.s2 em { color: #ffd866; }
.sp-note { grid-column: 1 / -1; margin: 2px 0 0; color: #d9cdf7; font: 12px system-ui, sans-serif; text-align: center; }

/* Royal Store (17 Oct 2026, the "Royal Store Gem Shop Interface" and "Gems to Gold" mock-ups): the ROYAL STORE banner
   over the top edge, picture tabs, a gold sidebar, gold-framed cards and the Watch Ad panels. Only the Store has
   .store-ui; other windows keep their look. */
.modal-box.store-ui { width: 1080px; height: 552px; top: calc(50% + 16px); border-radius: 30px;
  background: radial-gradient(ellipse 70% 60% at 60% 45%, rgba(110, 60, 230, .35), transparent 70%), linear-gradient(180deg, #2f1683, #1b0b52);
  box-shadow: 0 0 0 4px #f0c45a, 0 0 0 7px #7a4a0e, 0 0 0 9px #f0c45a, 0 24px 60px rgba(0, 0, 0, .7); }
.store-ui .modal-head { height: 46px; padding: 0; }
.store-ui .modal-head h3 { position: absolute; left: 50%; top: -38px; transform: translateX(-50%); width: 440px; line-height: 0; pointer-events: none; }
.store-banner { width: 100%; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .5)); }
.store-ui .modal-head .x-btn { top: 4px; right: 14px; z-index: 2; }
.store-ui .modal-tabs { gap: 12px; margin: 0 18px; padding: 2px 10px 10px; border-bottom: 2px solid rgba(240, 196, 90, .55); }
.store-ui .modal-tabs button { display: flex; align-items: center; gap: 8px; padding: 5px 18px 5px 10px; border-radius: 14px; color: #fff; font-size: 18px;
  background: linear-gradient(180deg, #2c1a7a, #1d1056); box-shadow: inset 0 0 0 2px #5e4bc4, 0 3px 0 rgba(0, 0, 0, .35); }
.store-ui .modal-tabs button img { width: 34px; height: 34px; object-fit: contain; }
.store-ui .modal-tabs .tab-cg { display: inline-flex; align-items: center; }
.store-ui .modal-tabs .tab-cg .ico { width: 26px; height: 26px; }
.store-ui .modal-tabs .tab-cg .ico + .ico { margin-left: -9px; }
.store-ui .modal-tabs button.on { color: #4a2400; background: linear-gradient(180deg, #ffe58a, #f0a92a); box-shadow: inset 0 0 0 2px #fff0b0, inset 0 -3px 0 rgba(150, 80, 0, .35), 0 0 16px rgba(255, 200, 80, .45); }
.store-ui .modal-body { padding: 10px 18px 16px; }

/* Profile and Treasury share the Royal Store's purple and gold finish. */
.modal-box.profile-ui {
  background: radial-gradient(ellipse at 55% 35%, rgba(110,60,230,.35), transparent 70%), linear-gradient(180deg, #2f1683, #1b0b52);
  box-shadow: 0 0 0 4px #f0c45a, 0 0 0 7px #7a4a0e, 0 0 0 9px #f0c45a, 0 24px 60px rgba(0,0,0,.7);
}
.profile-ui .modal-head h3 { color: #ffe69b; letter-spacing: .04em; text-shadow: 0 3px 0 #683600, 0 5px 12px rgba(0,0,0,.5); }
.profile-ui .modal-tabs { gap: 12px; margin: 0 18px 8px; border-bottom: 2px solid rgba(240,196,90,.45); }
.profile-ui .modal-tabs button { min-width: 150px; color: #f2eaff; background: linear-gradient(180deg, #38218f, #1d1056); box-shadow: inset 0 0 0 2px #6952c0, 0 3px 0 rgba(0,0,0,.3); }
.profile-ui .modal-tabs button.on { color: #4a2400; background: linear-gradient(180deg, #ffe58a, #f0a92a); box-shadow: inset 0 0 0 2px #fff0b0, inset 0 -3px 0 rgba(150,80,0,.35), 0 0 16px rgba(255,200,80,.35); }
.profile-ui .modal-body { padding: 8px 24px 22px; }
.profile-ui .profile-hero { gap: 20px; padding: 18px; border: 0; background: radial-gradient(ellipse at 20% 30%, rgba(143,102,255,.24), transparent 55%), linear-gradient(135deg, #332078, #170c48); box-shadow: inset 0 0 0 2px #e6b04a, inset 0 0 0 4px rgba(0,0,0,.3), 0 6px 14px rgba(0,0,0,.3); }
.profile-ui .profile-hero .big-av { box-shadow: 0 0 0 3px #ffe9a4, 0 0 0 6px #b77b25, 0 7px 16px rgba(0,0,0,.45); }
.profile-ui .profile-hero .pn { color: #fff0b6; text-shadow: 0 2px 3px rgba(0,0,0,.55); overflow-wrap: anywhere; }
.profile-ui .profile-hero .pid { color: #ffe08a; overflow-wrap: anywhere; }
.profile-ui .profile-stats { gap: 10px; }
.profile-ui .stat { border: 1px solid rgba(241,195,91,.48); background: linear-gradient(180deg, #35217b, #1b104f); box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 4px 9px rgba(0,0,0,.24); }
.profile-ui .stat b { color: #ffe18b; }
.profile-ui .stat span { color: #e0d6fa; }
.profile-ui .stat b .like-count { color: inherit; font-size: inherit; }
.profile-ui .treasury { gap: 16px; }
.profile-ui .tr-cats button { color: #f2eaff; background: linear-gradient(180deg, #38218f, #211258); box-shadow: inset 0 0 0 2px rgba(148,119,221,.5), 0 3px 7px rgba(0,0,0,.25); }
.profile-ui .tr-cats button.on { color: #4a2400; background: linear-gradient(180deg, #ffe58a, #e9a72f); box-shadow: inset 0 0 0 2px #fff0b0, 0 0 12px rgba(255,200,80,.3); }
.profile-ui .bag-card, .profile-ui .tr-title { border: 1px solid rgba(240,196,90,.65); background: radial-gradient(ellipse at 50% 20%, rgba(128,95,245,.28), transparent 70%), linear-gradient(180deg, #302071, #190e4b); box-shadow: inset 0 0 0 1px rgba(255,224,138,.2), 0 4px 10px rgba(0,0,0,.25); }
.profile-ui .bag-card.on, .profile-ui .tr-title.cur, .profile-ui .tr-title.current { box-shadow: inset 0 0 0 3px #ffe089, 0 0 14px rgba(255,200,80,.3); }
.profile-ui .bag-card small, .profile-ui .tr-title small { color: #e0d6fa; }
.profile-ui .tr-cardrow > b { color: #ffe08a; }
@media (max-width: 860px) {
  .profile-ui .profile-hero { gap: 14px; padding: 14px; }
  .profile-ui .profile-hero .big-av { width: 96px !important; height: 96px !important; }
  .profile-ui .treasury { grid-template-columns: 165px minmax(0, 1fr); }
  .profile-ui .tr-cats button { padding: 10px; font-size: 15px; }
}
.store-ui .wallet-head { margin-bottom: 10px; padding: 6px 14px; border-radius: 14px; font-size: 17px; background: rgba(10, 4, 40, .45); box-shadow: inset 0 0 0 1px rgba(240, 196, 90, .45); border: 0; }
.store-ui .pass-banner { margin-bottom: 8px; }
/* the sidebar */
.store-ui .store-split { grid-template-columns: 196px minmax(0, 1fr); gap: 16px; }
.store-ui .store-sub { gap: 10px; padding: 2px 14px 0 0; border-right: 2px solid rgba(240, 196, 90, .35); align-self: stretch; }
.store-ui .store-sub button { display: flex; align-items: center; gap: 10px; padding: 7px 12px 7px 8px; border-radius: 16px; color: #fff; font-size: 17px;
  background: linear-gradient(180deg, #2a1873, #1c0f52); box-shadow: inset 0 0 0 2px #5a48c0; }
.store-ui .store-sub button.on { color: #4a2400; background: linear-gradient(180deg, #ffe58a, #f0a92a); box-shadow: inset 0 0 0 2px #fff0b0, 0 0 14px rgba(255, 200, 80, .4); }
.store-ui .store-sub button.on::after { content: "›"; margin-left: auto; color: #fff; font-size: 28px; line-height: .8; text-shadow: 0 2px 0 rgba(120, 60, 0, .6); }
.sub-ico { width: 40px; height: 40px; flex: none; background: center/contain no-repeat; font-style: normal; border-radius: 8px; }
.sub-ico.emo { display: grid; place-items: center; font-size: 26px; }
/* every card, panel and price button in the Store */
.store-ui .shop-card, .store-ui .panel { border: 0; background: radial-gradient(ellipse at 22% 40%, rgba(120, 90, 255, .22), transparent 62%), linear-gradient(180deg, #24156a, #170c48);
  box-shadow: inset 0 0 0 2px #e6b04a, inset 0 0 0 4px rgba(0, 0, 0, .3), 0 6px 14px rgba(0, 0, 0, .3); }
.store-ui .shop-card.best { box-shadow: inset 0 0 0 3px #ffe58a, inset 0 0 0 5px rgba(0, 0, 0, .3), 0 0 18px rgba(255, 216, 102, .35); }
.store-ui .shop-card h4 { color: #fff0c0; }
.store-ui .price-btn { background: linear-gradient(180deg, #5fe453, #1f9f31); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .35), inset 0 0 0 2px #167a24, 0 3px 0 rgba(0, 0, 0, .35); color: #fff; }
.store-ui .price-btn:disabled { filter: grayscale(.6) brightness(.85); }
.store-ui .store-h, .store-ui .rc-head .rc-label { color: #ffe08a; }
/* Gold: Exchange Gems for Gold */
.st-head { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; }
.st-head .ico { width: 34px; height: 34px; }
.st-arrow { color: #9fd4ff; font-size: 20px; }
.st-head b { color: #ffe08a; font-size: 24px; white-space: nowrap; text-shadow: 0 2px 0 rgba(0, 0, 0, .4); }
.st-rule { flex: 1; height: 2px; margin-left: 8px; background: linear-gradient(90deg, rgba(240, 196, 90, .85), rgba(240, 196, 90, 0)); }
.st-grid { display: grid; gap: 12px; }
.st-grid.four, .st-grid.gems { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.st-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 10px 12px; border-radius: 16px; text-align: center;
  background: radial-gradient(ellipse at 50% 32%, rgba(120, 90, 255, .38), transparent 66%), linear-gradient(180deg, #24156a, #170c48);
  box-shadow: inset 0 0 0 2px #e6b04a, inset 0 0 0 4px rgba(0, 0, 0, .3), 0 6px 14px rgba(0, 0, 0, .35); }
.st-art { height: 92px; max-width: 100%; object-fit: contain; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .4)); }
.st-name { color: #fff3cc; font-size: 23px; text-shadow: 0 2px 0 rgba(0, 0, 0, .5); }
.st-card small { margin-bottom: 6px; color: #e6dcff; font: 16px "Lilita", sans-serif; }
.st-buy { display: flex; align-items: center; justify-content: center; gap: 6px; width: 88%; padding: 6px 0; border-radius: 12px; color: #fff; font: 20px "Lilita", sans-serif;
  background: linear-gradient(180deg, #5fe453, #1f9f31); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .35), inset 0 0 0 2px #167a24, 0 4px 0 rgba(0, 0, 0, .35); text-shadow: 0 2px 0 rgba(0, 0, 0, .35); }
.st-buy .ico { width: 24px; height: 24px; }
/* Gems: the packs, their ribbons and tags, and Open Soon */
.st-card.gem { padding-top: 30px; }
.st-ribbon { position: absolute; top: -3px; left: 50%; transform: translateX(-50%); padding: 3px 20px 4px; color: #fff3cc; font: 18px "Lilita", sans-serif; white-space: nowrap;
  background: linear-gradient(180deg, #e0428c, #8e1450); clip-path: polygon(0 0, 100% 0, 92% 50%, 100% 100%, 0 100%, 8% 50%); text-shadow: 0 2px 0 rgba(0, 0, 0, .45); }
.st-tag { position: absolute; left: -8px; top: 30px; z-index: 2; padding: 2px 10px; color: #fff; font: 12px "Lilita", sans-serif; font-style: normal; letter-spacing: .04em;
  background: linear-gradient(180deg, #ff5266, #c3122a); transform: rotate(-14deg); box-shadow: 0 2px 4px rgba(0, 0, 0, .4); }
.st-card.gem .st-art { height: 78px; }
.st-price { margin: -2px 0 6px; padding: 0 16px; border-radius: 12px; color: #fff; font: 22px "Lilita", sans-serif; background: rgba(10, 4, 40, .6); }
.st-soon { grid-column: 2 / span 3; display: flex; align-items: center; gap: 14px; padding: 10px 18px; border-radius: 16px;
  background: radial-gradient(ellipse at 22% 60%, rgba(120, 90, 255, .38), transparent 60%), linear-gradient(180deg, #23136a, #160b46); box-shadow: inset 0 0 0 2px rgba(230, 176, 74, .85); }
.st-soon img { width: 168px; flex: none; }
.st-soon b { color: #ffe08a; font-size: 23px; }
.st-soon p { margin: 6px 0 0; color: #e6dcff; font: 15px/1.35 "Lilita", sans-serif; }
/* Watch Ad: Gold (art on the right) and Gems (one row with gem pips) */
.st-ad { position: relative; display: flex; align-items: center; gap: 14px; margin-top: 12px; padding: 10px 16px; border-radius: 16px; overflow: hidden;
  background: linear-gradient(180deg, #23136a, #160b46); box-shadow: inset 0 0 0 2px rgba(230, 176, 74, .85); }
.st-ad-ico { width: 70px; flex: none; }
.st-ad-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.st-ad-txt b { color: #fff0c0; font-size: 24px; }
.st-ad-txt p { margin: 0; color: #d8ccff; font: 15px "Lilita", sans-serif; }
.st-ad.gold .st-ad-art { width: 220px; flex: none; margin: -14px -8px -14px 0; }
.st-pips { display: flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 14px; background: rgba(8, 3, 30, .6); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15); }
.st-pips.gold i { width: 34px; height: 12px; border-radius: 6px; background: rgba(255, 255, 255, .15); }
.st-pips.gold i.on { background: linear-gradient(180deg, #ffe680, #f2b230); box-shadow: 0 0 8px rgba(255, 214, 90, .6); }
.st-pips.gem { gap: 9px; padding-left: 16px; }
.st-pips.gem i { width: 14px; height: 14px; border-radius: 3px; transform: rotate(45deg); background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 2px rgba(150, 130, 255, .7); }
.st-pips.gem i.on { background: linear-gradient(135deg, #8ff3ff, #2b9cff); box-shadow: 0 0 8px rgba(80, 200, 255, .7); }
.st-pips span { margin-left: 6px; color: #ffd866; font: 15px "Lilita", sans-serif; white-space: nowrap; }
.store-ui .st-ad .ad-btn { padding: 9px 26px; border-radius: 14px; font-size: 19px; background: linear-gradient(180deg, #55b4ff, #1c62d8); }
.st-ad.gems .ad-btn { flex: none; }
@media (max-height: 620px) {
  .st-art { height: 80px; }
  .st-card.gem .st-art { height: 66px; }
}
/* Store: Magic Items and Room Cards use the same cards as Gold (picture on top), three to a row. */
.st-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.st-card.item .st-art { height: 74px; }
.st-desc { flex: 1; margin: 2px 0 8px; color: #ddd2ff; font: 13px/1.3 system-ui, sans-serif; }
.st-owned { position: absolute; top: 8px; right: 10px; padding: 1px 9px; border-radius: 10px; color: #ffe08a; font: 14px "Lilita", sans-serif; background: rgba(10, 4, 40, .65); }
.st-card.best { box-shadow: inset 0 0 0 3px #ffe58a, inset 0 0 0 5px rgba(0, 0, 0, .3), 0 0 18px rgba(255, 216, 102, .4); }
.st-pic { position: relative; width: 76px; height: 76px; background: center/contain no-repeat; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .4)); }
.st-pic em { position: absolute; right: -10px; bottom: -4px; padding: 1px 7px; border-radius: 10px; color: #fff; font: 14px "Lilita", sans-serif; font-style: normal; background: linear-gradient(180deg, #ff5a4a, #c2201a); box-shadow: 0 0 0 2px #fff; }
.st-card.room .st-name { font-size: 20px; }
.store-ui .text-shelf, .store-ui .skin-product, .store-ui .portrait-product, .store-ui .emoji-market, .store-ui .text-market { border-color: rgba(230, 176, 74, .7); }
.store-ui .text-shelf, .store-ui .skin-product { box-shadow: inset 0 0 0 2px rgba(230, 176, 74, .75); }
/* Store: the balances sit in the top-left corner (the mock-ups have no balance row), which frees room for the cards. */
.store-ui .wallet-head { position: absolute; left: 24px; top: 8px; z-index: 2; width: auto; margin: 0; padding: 4px 12px; font-size: 16px; }
.store-ui .wallet-head > .muted { display: none; }
.store-ui .wallet-head .ico { width: 22px; height: 22px; }

.spin-store .sp-panel { display: flex; flex-direction: column; gap: 10px; }
.sp-row { grid-template-columns: 62px minmax(0, 1fr) auto; }
.sp-row .sp-txt { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.sp-row .sp-pill { line-height: 1.4; }
.sp-row .sp-ico { width: 58px; }
.sp-btn.gold { color: #fff; background: linear-gradient(180deg, #ffd54f, #e8920f); text-shadow: 0 2px 0 rgba(120, 60, 0, .6); }
.sp-btn.big { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 18px; font-size: 21px; min-width: 186px; }
.sp-btn .ico { width: 24px; height: 24px; }
.sp-ads { grid-template-columns: 62px minmax(0, 1fr); row-gap: 6px; }
.store-ui .modal-body .spin-store { padding-top: 2px; }
/* The reward pop-up keeps a readable width when a prize line is long. */
.reward-pop .rp-box { max-width: 680px; }
.reward-pop .rp-items { line-height: 1.35; }

/* Home (the user's home screen picture, 19 Oct 2026). Left column: Chat, the Daily Quests scroll with today's
   progress, the glowing Mystery Box. Right column: Friends, Store, Guide, Invite and Music, standing free with their
   names under them. */
.chat-handle.on-home { left: 44px; top: 150px; width: 82px; height: 82px; padding: 0; justify-content: center; border-radius: 22px;
  box-shadow: 0 0 0 4px #fff, 0 7px 0 4px rgba(0, 0, 0, .28); }
.chat-handle.on-home .ico { width: 48px; height: 48px; }
.chat-handle.on-home > span:nth-of-type(2) { position: absolute; top: 88px; left: 50%; transform: translateX(-50%); color: #fff; font-size: 21px;
  text-shadow: 0 2px 0 #13235e, 0 0 3px #13235e, 0 4px 6px rgba(0, 0, 0, .45); }
.home-quests { position: absolute; left: 36px; top: 276px; width: 100px; display: flex; flex-direction: column; align-items: center; }
.hq-art { width: 86px; height: 78px; background: url(img/home/daily-quests.webp) center/contain no-repeat; filter: drop-shadow(0 5px 4px rgba(0, 0, 0, .4)); transition: transform .15s; }
.home-quests:active .hq-art { transform: scale(.94); }
.hq-progress { position: absolute; top: -10px; right: -26px; padding: 1px 11px 2px; border-radius: 16px; color: #fff; font-size: 19px;
  background: linear-gradient(180deg, #343c86, #171b4c); box-shadow: 0 0 0 3px #fff, 0 3px 6px rgba(0, 0, 0, .45); }
.hq-progress.done { background: linear-gradient(180deg, #6fdc4a, #23992f); }
.home-quests .badge { top: -10px; left: -8px; right: auto; }
.hq-label { margin-top: 2px; color: #fff; font-size: 22px; line-height: 1.02; text-align: center; text-shadow: 0 2px 0 #13235e, 0 0 3px #13235e, 0 4px 6px rgba(0, 0, 0, .45); }
.mystery-box-btn { left: 18px; bottom: 22px; width: 170px; min-height: 0; }
.mystery-box-btn::before { content: ""; position: absolute; left: 50%; top: 52px; width: 190px; height: 150px; transform: translate(-50%, -50%); border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 246, 160, .95), rgba(255, 222, 80, .7) 40%, rgba(255, 200, 60, .25) 70%, rgba(255, 200, 60, 0)); }
.mystery-box-btn.opened::before { opacity: .25; }
.mystery-box-btn.ready::before { animation: mystery-halo 1.25s ease-in-out infinite alternate; }
@keyframes mystery-halo { from { opacity: .7; } to { opacity: 1; transform: translate(-50%, -50%) scale(1.12); } }
.mystery-box-art, .mystery-box-title, .mystery-box-state { position: relative; z-index: 1; }
.mystery-box-art { width: 150px; height: 118px; margin-bottom: 0; border: 0; border-radius: 0; box-shadow: none; transform: none;
  background: url(img/home/mystery-box.webp) center/contain no-repeat;
  filter: drop-shadow(0 0 10px rgba(255, 226, 80, .9)) drop-shadow(0 0 22px rgba(255, 210, 60, .55)) drop-shadow(0 6px 5px rgba(0, 0, 0, .4)); }
.mystery-box-art::before, .mystery-box-art::after { content: none; }
.mystery-box-title { margin-top: -6px; font-size: 21px; color: #ffe64d; -webkit-text-stroke: 1px #5a2a06; text-shadow: 0 3px 0 #5a2a06, 0 5px 8px rgba(0, 0, 0, .5); }
.mystery-box-state { font-size: 10px; }
.mystery-box-btn.opened .mystery-box-art { filter: drop-shadow(0 6px 5px rgba(0, 0, 0, .4)) saturate(.6); }
@keyframes mystery-glow { from { transform: translateY(0) scale(1); } to { transform: translateY(-5px) scale(1.06); } }
.side-col { right: 30px; top: 106px; gap: 26px; padding: 0; border: 0; border-radius: 0; background: none; backdrop-filter: none; }
.side-btn, .music-btn { width: 70px; height: 70px; }
.side-btn .ico.big { width: 40px; height: 40px; }
.side-btn > span:not(.ico):not(.badge):not(.invite-glyph) { position: absolute; left: 50%; bottom: -18px; transform: translateX(-50%); color: #fff; font-size: 16px; white-space: nowrap;
  text-shadow: 0 2px 0 #13235e, 0 0 3px #13235e, 0 3px 5px rgba(0, 0, 0, .5); }
.side-btn.invite > span:not(.badge):not(.invite-glyph) { color: #fff; }
.invite-glyph { font-size: 32px; line-height: 36px; }
.music-btn .ico.big { width: 36px; height: 36px; }

/* Home (the user's second home screen picture, 19 Oct 2026). */
/* Top: a compact profile card; the three top-right buttons stand on their own (no dark panel). */
.home .profile-card { left: 16px; top: 14px; padding: 7px 18px 7px 7px; gap: 10px; border-radius: 20px; }
.home .pc-avatar { width: 84px; height: 84px; }
.home .pc-info { gap: 2px; }
.home .pc-info b { font-size: 22px; max-width: 190px; }
.home .pc-country { font-size: 15px; }
.home .top-right { right: 26px; top: 16px; gap: 14px; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
.home .top-right .round-btn { width: 60px; height: 60px; border-radius: 16px; }
.home .top-right .round-btn .ico { width: 34px; height: 34px; }
/* Left: Chat, Daily Quests and the Mystery Box, smaller as in the picture; the box's label sits on a dark band. */
.chat-handle.on-home { left: 36px; top: 158px; width: 72px; height: 72px; border-radius: 20px; }
.chat-handle.on-home .ico { width: 42px; height: 42px; }
.chat-handle.on-home > span:nth-of-type(2) { top: 76px; font-size: 19px; }
.home-quests { left: 30px; top: 276px; width: 86px; }
.hq-art { width: 72px; height: 64px; }
.hq-progress { top: 18px; right: -22px; font-size: 15px; padding: 0 8px 1px; box-shadow: 0 0 0 2px #fff, 0 2px 4px rgba(0, 0, 0, .45); }
.hq-label { font-size: 20px; }
.mystery-box-btn { left: 16px; bottom: auto; top: 400px; width: 140px; }
.mystery-box-art { width: 112px; height: 88px; }
.mystery-box-btn::before { top: 42px; width: 150px; height: 120px; }
.mystery-box-title { margin-top: 0; padding: 1px 10px 3px; border-radius: 10px; font-size: 18px; background: rgba(10, 6, 40, .55); -webkit-text-stroke: 0; text-shadow: 0 2px 0 #5a2a06; }
.mystery-box-state { display: none; }
.mystery-box-btn.ready .mystery-box-title { background: linear-gradient(180deg, #6fdc4a, #23992f); color: #fff; text-shadow: 0 2px 0 #12561a; }
/* Right: Friends, Store (the cart alone, no circle), Guide and Music. */
.side-col { right: 34px; top: 124px; gap: 30px; }
.side-btn, .music-btn { width: 72px; height: 72px; }
.side-btn.solo { background: none; box-shadow: none; }
.side-btn.solo .ico.big { width: 66px; height: 66px; filter: drop-shadow(0 4px 3px rgba(0, 0, 0, .4)); }
/* A button at the top left of a window (Friends → Invite; Invite → back to Friends). */
.modal-head .head-btn { position: absolute; right: 78px; top: 14px; z-index: 2; padding: 6px 16px; font-size: 18px; }
.modal-head .head-btn.gold { color: #5a2a00; background: linear-gradient(180deg, #ffe27a, #f0a92a); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .5), 0 3px 0 #8a4e06; }
/* A back button (e.g. Invite → ‹ Friends) sits small on the left of the title. */
.modal-head .head-btn.back { right: auto; left: 16px; top: 16px; padding: 4px 12px; font-size: 14px; }
.home-quests .badge { display: none !important; } /* only the 1/5 progress shows on the scroll */
/* Daily Quests (the user's picture): the scroll with a big navy 1/5 pill on its top-right corner, a navy-outlined label. */
.home-quests { left: 26px; top: 270px; width: 96px; }
.hq-art { width: 78px; height: 78px; }
.hq-progress { top: -6px; right: -30px; min-width: 56px; padding: 2px 10px 3px; border-radius: 18px; font-size: 19px; text-align: center; letter-spacing: .02em;
  background: linear-gradient(180deg, #2c3a96, #18206a); box-shadow: 0 0 0 3px #fff, 0 3px 6px rgba(0, 0, 0, .45); }
.hq-progress.done { background: linear-gradient(180deg, #6fdc4a, #23992f); }
.hq-label { margin-top: 0; font-size: 22px; line-height: 1; color: #fff; paint-order: stroke fill; -webkit-text-stroke: 5px #1c2466; text-shadow: 0 3px 4px rgba(0, 0, 0, .35); }
/* The 1/5 pill overlaps the scroll's top-right corner (no gap), and the label sits right under the scroll. */
.home-quests { width: 96px; }
.hq-art { width: 82px; height: 82px; margin-left: -14px; }
.hq-progress { top: 6px; right: -12px; }
.hq-label { margin-top: -6px; }
/* Daily Quests (the user's third picture, 19 Oct 2026): the royal scroll with its gold pill and crown is one picture;
   the day's count is written inside the pill's navy (at 78% / 26.5% of the picture); "Daily" gold, "Quests" cream. */
.home-quests { left: 14px; top: 262px; width: 124px; }
.hq-art { position: relative; display: block; width: 124px; height: 118px; margin-left: 0; background-image: url(img/home/daily-quests.webp); }
.hq-progress { position: absolute; left: 78.3%; top: 26.5%; right: auto; min-width: 0; transform: translate(-50%, -50%); padding: 0; border-radius: 0;
  background: none; box-shadow: none; color: #fff; font-size: 21px; line-height: 1; letter-spacing: .02em; text-shadow: 0 2px 0 #0c1a5a; }
.hq-progress.done { background: none; color: #b8ff8a; }
.hq-label { margin-top: -4px; font-size: 22px; line-height: .95; color: #fff3cf; paint-order: stroke fill; -webkit-text-stroke: 5px #6a2a08; text-shadow: 0 3px 3px rgba(0, 0, 0, .35); }
.hq-label b { color: #ffd23a; font-weight: inherit; }
.home-quests { left: 18px; top: 250px; width: 112px; }
.hq-art { width: 112px; height: 106px; }
.hq-progress { font-size: 19px; }
.hq-label { margin-top: -2px; font-size: 20px; -webkit-text-stroke: 6px #6a2a08; }
.mystery-box-btn { top: 420px; }

/* No zooming: no double-tap zoom anywhere (pinch zoom is off in index.html's viewport and the Android WebView). */
html, body { touch-action: manipulation; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

/* The policy viewer: ‹ Back on the left, the title in the middle, ✕ on the right. */
.doc-head { position: relative; justify-content: center; min-height: 56px; }
.doc-head .doc-back { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); padding: 5px 14px; font: 15px 'Lilita', sans-serif; letter-spacing: 0; }
.doc-head .x-btn { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; font-size: 18px; }
/* A player already bet on this round: greyed, with a tick. */
.bet-drawer #betTargets button.bet-done { opacity: .55; filter: grayscale(.4); cursor: default; }
#betTargets button small { display: block; font-size: 11px; color: #b8ff8a; }

/* A policy inside the Settings window: the page fills the window's body. */
.modal-body.doc-in-window { display: flex; padding: 4px 10px 12px; overflow: hidden; }
.doc-in-window .doc-frame { flex: 1; width: 100%; min-height: 0; border: 0; border-radius: 14px; background: #1a0f3a; }
.help-mail { color: #ffe08a; user-select: text; -webkit-user-select: text; }

/* The Mystery Box inside Daily Quests (19 Oct 2026; no longer on Home): the chest, its state and Open. */
.mb-panel { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; background: linear-gradient(135deg, rgba(150, 70, 230, .35), rgba(30, 14, 80, .6)); box-shadow: inset 0 0 0 2px rgba(255, 216, 102, .55); }
.mb-chest { width: 76px; height: 60px; flex: none; background: url(img/home/mystery-box.webp) center/contain no-repeat; filter: drop-shadow(0 4px 4px rgba(0, 0, 0, .4)); }
.mb-panel.ready .mb-chest { filter: drop-shadow(0 0 10px rgba(255, 226, 80, .95)) drop-shadow(0 4px 4px rgba(0, 0, 0, .4)); animation: mystery-glow 1.25s ease-in-out infinite alternate; }
.mb-panel.opened .mb-chest { filter: saturate(.55) drop-shadow(0 4px 4px rgba(0, 0, 0, .4)); }
.mb-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.mb-text b { color: #ffe08a; font-size: 20px; }
.mb-text .muted { font-size: 15px; }
/* Home left side: Chat at the top, Daily Quests lower down where the Mystery Box was, with a gap between. */
.home-quests { top: 380px; }
/* Home: the Chat button (72) a little lower, between the profile card and Daily Quests. */
.chat-handle.on-home { top: 196px; }
/* Home: the side buttons sit close to the screen edges. */
.home .profile-card { left: 10px; }
.chat-handle.on-home { left: 22px; }
.home-quests { left: 6px; }
.side-col { right: 16px; }

/* Guessing panel (30 Oct 2026, replaces betting): the fixed bonus line, the GUESS button's "?" and the locked state. */
.betting-btn .bb-q { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff2b0, #e8a52a); color: #4a1a8a; font: 900 28px 'Cinzel', serif; text-shadow: none; box-shadow: 0 2px 0 #7a4a08; }
.bet-drawer .bd-bonus { margin: 2px 0 12px; padding: 8px 10px; border-radius: 12px; background: rgba(0, 0, 0, .28); color: #ffe9a0; font-size: 16px; line-height: 1.35; }
.bet-drawer .bd-bonus b { color: #9dffb5; font-size: 19px; }
.bet-drawer .bd-bonus .ico { width: 18px; height: 18px; vertical-align: -3px; }
.seat .bet-tag { background: linear-gradient(180deg, #c9a7ff, #7a3ad0); color: #fff; }

/* How to Play (30 Oct 2026): the user's text in sections, with a small Story link. */
.guide .htp-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.guide .htp-title { margin: 0; font-family: 'Cinzel', serif; font-size: 26px; color: #ffd866; letter-spacing: .04em; }
.guide .htp-story-link { padding: 4px 10px; border-radius: 999px; background: rgba(255, 216, 102, .12); box-shadow: inset 0 0 0 1px rgba(255, 216, 102, .45); color: #ffe08a; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
.guide .htp-story { margin: 0 0 12px; padding: 10px 14px; border-left: 4px solid #ffd866; border-radius: 0 12px 12px 0; background: rgba(0, 0, 0, .25); font-style: italic; font-size: 18px; color: #fff2c8; }
.guide .htp-sec { margin: 0 0 12px; padding: 12px 16px; border-radius: 16px; background: linear-gradient(160deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .03)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.guide .htp-sec h4 { margin: 0 0 6px; font-family: 'Cinzel', serif; color: #ffd866; font-size: 19px; letter-spacing: .05em; }
.guide .htp-sec p { margin: 4px 0; line-height: 1.45; }
.guide .htp-trial { text-align: center; background: linear-gradient(160deg, rgba(255, 216, 102, .18), rgba(120, 60, 200, .18)); }
.guide .htp-motto { font-family: 'Cinzel', serif; font-size: 20px; color: #fff2c8; }
.guide .htp-rounds { margin: 4px 0 8px; --tone: #ffd866; }
.guide .htp-ok { color: #9dffb5; }
.guide .htp-no { color: #ffb0a0; }
.guide .htp-more { margin-top: 4px; }

/* Royal Spin (30 Oct 2026): ads only. Beside the wheel, top to bottom: the group bar (1 at the bottom, 10 at the top),
   the Spin button with today's ad count, and "Skip animation". */
.spin-store .sp-panel { flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
.sp-meter { display: flex; justify-content: center; }
.sp-bar { position: relative; width: 40px; height: 236px; border-radius: 20px; background: linear-gradient(90deg, rgba(20, 8, 46, .9), rgba(60, 26, 110, .9)); box-shadow: inset 0 0 0 3px #e3b85d, inset 0 4px 10px rgba(0, 0, 0, .55), 0 6px 14px rgba(0, 0, 0, .45); }
.sp-bar > i { position: absolute; left: 5px; right: 5px; bottom: 5px; max-height: calc(100% - 10px); border-radius: 15px; background: linear-gradient(0deg, #f0a21a, #ffe27a); box-shadow: 0 0 12px rgba(255, 216, 102, .8); transition: height .5s cubic-bezier(.2, 1.2, .4, 1); }
.sp-bar ol { position: absolute; inset: 5px 0; margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; }
.sp-bar li { flex: 1; position: relative; border-top: 1px solid rgba(255, 255, 255, .14); }
.sp-bar li:first-child { border-top: 0; }
.sp-bar li span { position: absolute; right: calc(100% + 8px); top: 50%; transform: translateY(-50%); min-width: 22px; text-align: right; font: 900 15px "Lilita", sans-serif; color: rgba(255, 240, 200, .6); }
.sp-bar li.on span { color: #ffe08a; }
.sp-bar li.now span { color: #fff; font-size: 19px; text-shadow: 0 0 8px rgba(255, 216, 102, .9); }
.sp-ctl { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.sp-btn.sp-go { flex-direction: column; gap: 0; min-width: 210px; padding: 10px 22px 8px; font-size: 28px; line-height: 1.05; }
.sp-btn.sp-go small { font: 600 13px system-ui, sans-serif; opacity: .9; text-shadow: none; margin-top: 2px; }
.sp-count { color: #ffe9a0; font-size: 16px; }
.sp-count b { color: #fff; font-size: 18px; }
.sp-skip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px; border-radius: 999px; background: rgba(0, 0, 0, .3); color: #f3eaff; font-size: 16px; cursor: pointer; }
.sp-skip input { width: 20px; height: 20px; accent-color: #ffcf4a; }
.spin-store .sp-note { margin: 0; text-align: center; font-size: 13px; opacity: .8; }
.store-main.gems-only { width: 100%; }

/* Clover Road readability (30 Oct 2026): bigger level cards and reward art, larger labels and descriptions on a solid
   backing, and locked levels stay readable (dimmed, not faded). */
.crn { width: 150px; gap: 5px; padding: 10px 8px 9px; border-radius: 18px; }
.crn-ico { width: 64px; height: 64px; font-size: 40px; border-radius: 16px; }
.crn-ico .ico { width: 50px; height: 50px; }
.crn-txt { min-height: 44px; padding: 3px 6px; border-radius: 10px; background: rgba(8, 4, 28, .45); color: #fff; font-size: 17px; line-height: 1.15; text-shadow: 0 1px 2px rgba(0, 0, 0, .8); text-align: center; }
.crn-txt b { font-size: 19px; color: #fff3c4; }
.crn-txt small { color: #f1e6ff; font-size: 14px; line-height: 1.2; margin-top: 1px; }
.crn-st { padding: 3px 12px; border-radius: 10px; font-size: 15px; font-weight: 800; }
.crn.locked { opacity: 1; filter: saturate(.7) brightness(.86); }
.crn.locked .crn-st { color: #fff; background: rgba(0, 0, 0, .45); }
.crn.tba .crn-ico { opacity: .85; }
.crn::before { font-size: 17px; }
.crm { transform: scale(1.12); }
.cr-lane { z-index: 3; }
/* Back on child screens (30 Oct 2026): easier to see and tap. */
.modal-head .head-btn.back { padding: 6px 16px; font-size: 17px; }
/* Royal Spin (31 Oct 2026): Watch Ad and Spin are separate buttons. */
.sp-btn.sp-ad { display: inline-flex; flex-direction: column; align-items: center; min-width: 210px; padding: 7px 18px 6px; font-size: 20px; line-height: 1.05; }
.sp-btn.sp-ad small { font: 600 12px system-ui, sans-serif; opacity: .9; text-shadow: none; margin-top: 2px; }
.spin-store .sp-bar { height: 200px; }
/* Royal Spin counts (31 Oct 2026): the bar beside the buttons with its own caption; "Ads watched today" with ten pips;
   "Spins ready" as a big number. */
.spin-store .sp-panel { flex-direction: row; align-items: center; justify-content: center; gap: 26px; }
.sp-meter { flex-direction: column; align-items: center; gap: 6px; }
.sp-meter .sp-bar { margin-left: 24px; height: 220px; }
.sp-cap { color: #ffe08a; font: 900 14px "Lilita", sans-serif; letter-spacing: .04em; text-align: center; padding-left: 24px; }
.sp-cap.big { font-size: 22px; color: #fff; }
small.sp-cap { color: #e6dcff; font-weight: 600; font-family: system-ui, sans-serif; font-size: 13px; }
.sp-ctl { gap: 8px; }
.sp-box { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 250px; padding: 8px 10px 10px; border-radius: 16px; background: rgba(0, 0, 0, .28); box-shadow: inset 0 0 0 2px rgba(110, 180, 255, .5); }
.sp-box.gold { box-shadow: inset 0 0 0 2px rgba(255, 216, 102, .6); }
.sp-box-head { display: flex; width: 100%; align-items: center; justify-content: space-between; color: #f3eaff; font-size: 16px; font-weight: 700; }
.sp-box-head b { color: #fff; font: 900 20px "Lilita", sans-serif; }
.sp-box-head .sp-ready { min-width: 40px; padding: 0 10px; border-radius: 999px; text-align: center; background: rgba(255, 255, 255, .12); }
.sp-box-head .sp-ready.on { color: #4a2400; background: linear-gradient(180deg, #ffe27a, #f0a21a); box-shadow: 0 0 10px rgba(255, 216, 102, .8); }
.sp-pips { display: flex; gap: 4px; }
.sp-pips i { width: 16px; height: 8px; border-radius: 4px; background: rgba(255, 255, 255, .18); }
.sp-pips i.on { background: linear-gradient(180deg, #8fd0ff, #2f86e8); box-shadow: 0 0 6px rgba(110, 180, 255, .8); }
.sp-box .sp-btn.sp-ad, .sp-box .sp-btn.sp-go { width: 100%; min-width: 0; }
.sp-box .sp-btn.sp-go { font-size: 26px; padding: 8px 12px 6px; }

/* Players online (1 Nov 2026): a green bubble under the Chat icon, and a small green count on the chat tabs. */
.chat-handle .online-bubble { position: absolute; left: -10px; top: -10px; display: inline-flex; align-items: center; gap: 4px; min-width: 34px; height: 22px; padding: 0 8px; border-radius: 11px; background: linear-gradient(180deg, #4fd86a, #1f9a3a); color: #fff; font: 800 13px system-ui, sans-serif; box-shadow: 0 0 0 2px #fff, 0 2px 4px rgba(0, 0, 0, .4); white-space: nowrap; pointer-events: none; }
.chat-handle .online-bubble::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #d8ffd9; box-shadow: 0 0 5px #fff; }
#chatTabs .tab-online { margin-left: 6px; font-style: normal; }
#chatTabs .tab-online:not(:empty) { display: inline-flex; align-items: center; gap: 3px; padding: 1px 7px; border-radius: 9px; background: linear-gradient(180deg, #4fd86a, #1f9a3a); color: #fff; font: 800 12px system-ui, sans-serif; vertical-align: 1px; }
#chatTabs .tab-online:not(:empty)::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #d8ffd9; }
.set-row .set-select { flex: 0 1 220px; }

/* Room Card Type in the Store and the Treasury (1 Nov 2026): inline buttons instead of a drop-down (no pop-up). */
.rc-head .rc-seg { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 8px; }
.rc-seg button { flex: 1 1 0; min-width: 0; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 6px 10px; border-radius: 12px; background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 2px rgba(255, 216, 102, .35); color: #f3ecff; font: 800 14px system-ui, sans-serif; line-height: 1.15; text-align: center; transition: background .15s, box-shadow .15s; }
.rc-seg button:hover { background: rgba(255, 255, 255, .14); }
.rc-seg button.on { background: linear-gradient(180deg, #ffe27a, #e8a52a); box-shadow: inset 0 0 0 2px #fff3c4, 0 3px 0 #8a4e06; color: #3a1d00; }
.rc-seg .rc-seg-ico { font-size: 18px; }
.rc-seg small { display: block; font-size: 11px; opacity: .8; }
@media (max-width: 700px) { .rc-seg button { font-size: 12px; padding: 6px 6px; } .rc-seg .rc-seg-ico { font-size: 15px; } }

/* Private chat header (4 Nov 2026): Clear chat on the right and the 30-day note under it. */
.dm-head { flex-wrap: wrap; row-gap: 2px; }
.dm-head .dm-clear { margin-left: auto; padding: 4px 10px; font-size: 14px; }
.dm-head .dm-keep { flex-basis: 100%; color: rgba(255,255,255,.55); font: 600 11px system-ui, sans-serif; }

/* Royal Mode (5 Nov 2026): characters instead of cards. A seat's card becomes a standing figure: the villager (back)
   turns into the character (face) with a flash of light, with no card flip. */
.mode-pick { display: flex; gap: 6px; justify-content: center; margin: -4px auto 8px; padding: 4px; border-radius: 999px; background: rgba(20, 10, 50, .55); width: max-content; box-shadow: inset 0 2px 6px rgba(0,0,0,.35); }
.mode-pick button { padding: 6px 16px; border-radius: 999px; border: 0; background: transparent; color: rgba(255,255,255,.8); font: 400 18px 'Lilita', system-ui, sans-serif; letter-spacing: .3px; cursor: pointer; }
.mode-pick button.on { background: linear-gradient(180deg, #ffe08a, #e8a92e); color: #4a2400; box-shadow: 0 2px 0 #8a5300; }
.mode-pick button:disabled { opacity: .45; cursor: default; }
.royal-mode .card { width: 96px; height: 144px; perspective: none; }
.royal-mode .card .inner { transform: none !important; transition: none; }
.royal-mode .card .face, .royal-mode .card .back { backface-visibility: visible; -webkit-backface-visibility: visible; transform: none; background-size: contain; background-position: center bottom; box-shadow: none; border-radius: 0; filter: drop-shadow(0 10px 10px rgba(0,0,0,.55)); transition: opacity .35s ease, transform .35s ease; }
.royal-mode .card .face { opacity: 0; transform: scale(.85); }
.royal-mode .card.up .face { opacity: 1; transform: none; }
.royal-mode .card.up .back { opacity: 0; transform: scale(1.1); }
.royal-mode .card .back { animation: royalIdle 3.2s ease-in-out infinite; }
.royal-mode .card.up .face { animation: royalIdle 3.6s ease-in-out infinite; }
.royal-mode .card .face .ttl { bottom: -12px; font-size: 12px; }
.royal-mode .card.transform::before { content: ''; position: absolute; inset: -30% -40%; z-index: 2; pointer-events: none; background: radial-gradient(circle, rgba(255,240,180,.95), rgba(255,200,80,.5) 35%, transparent 65%); animation: royalFlash .9s ease-out forwards; }
.royal-mode .card.pick .back { box-shadow: none; filter: drop-shadow(0 0 10px rgba(255,236,140,.95)) drop-shadow(0 10px 10px rgba(0,0,0,.5)); }
.royal-mode .card.chosen .back { box-shadow: none; filter: drop-shadow(0 0 12px rgba(80,220,255,.95)) drop-shadow(0 10px 10px rgba(0,0,0,.5)); }
.royal-mode .card.hunter-card .face { box-shadow: none; filter: drop-shadow(0 0 14px rgba(255,216,102,.95)) drop-shadow(0 10px 10px rgba(0,0,0,.5)); }
.royal-mode .card.locked::after { right: -4px; top: 6px; }
.fly-card.royal-figure { background-size: contain !important; background-position: center bottom !important; box-shadow: none !important; border-radius: 0 !important; filter: drop-shadow(0 0 16px rgba(255,216,102,.9)); }
.role-card.royal-figure { background-size: contain; background-position: center bottom; box-shadow: none; filter: drop-shadow(0 0 30px rgba(255,216,102,.8)); }
html body .royal-mode .card.mine-only .face::after { content: '👁 ONLY YOU'; position: absolute; left: 50%; top: -8px; transform: translateX(-50%); padding: 2px 8px; border-radius: 999px; background: rgba(20,10,50,.85); color: #ffd866; font: 800 10px system-ui, sans-serif; letter-spacing: .5px; white-space: nowrap; }
@keyframes royalIdle { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes royalFlash { 0% { opacity: 0; transform: scale(.4); } 30% { opacity: 1; } 100% { opacity: 0; transform: scale(1.4); } }
@media (prefers-reduced-motion: reduce) { .royal-mode .card .back, .royal-mode .card.up .face { animation: none; } }

/* Royal Mode: your look (5 Nov 2026) */
.look-pick { display: flex; gap: 6px; align-items: center; justify-content: center; margin: 0 auto 8px; padding: 4px 8px; border-radius: 14px; background: rgba(20, 10, 50, .55); width: max-content; max-width: 100%; }
.look-pick .lp-ttl { color: rgba(255,255,255,.85); font: 400 14px 'Lilita', system-ui, sans-serif; margin-right: 2px; }
.look-pick button { display: flex; align-items: center; gap: 2px; height: 46px; padding: 2px 4px; border-radius: 10px; border: 2px solid transparent; background: rgba(255,255,255,.08); color: #fff; font: 400 13px 'Lilita', system-ui, sans-serif; cursor: pointer; }
.look-pick button.on { border-color: #ffd866; background: rgba(255,216,102,.22); box-shadow: 0 0 10px rgba(255,216,102,.5); }
.look-pick .lp-img { width: 30px; height: 40px; background: center bottom / contain no-repeat; }
.field .look-pick { margin: 4px 0 0; width: auto; flex-wrap: wrap; justify-content: flex-start; background: rgba(20, 10, 50, .35); }

/* Install app (web, 7 Nov 2026) */
.install-app { position: fixed; z-index: 60; left: 50%; bottom: max(10px, env(safe-area-inset-bottom)); transform: translateX(-50%); padding: 8px 18px; border: 0; border-radius: 999px; background: linear-gradient(180deg, #ffe08a, #e8a92e); color: #4a2400; font: 400 17px 'Lilita', system-ui, sans-serif; box-shadow: 0 3px 0 #8a5300, 0 8px 20px rgba(0,0,0,.45); cursor: pointer; }
.install-app.hidden { display: none; }

/* Double your Gold on the results (8 Nov 2026) */
.res-double { animation: resDoublePulse 1.6s ease-in-out infinite; }
.res-double b { color: #fff6c2; margin-left: 4px; }
.res-double.hidden { display: none; }
@keyframes resDoublePulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@media (prefers-reduced-motion: reduce) { .res-double { animation: none; } }
.results .res-double { position: absolute; left: 30px; bottom: 24px; z-index: 4; min-height: 52px; padding: 12px 24px; font-size: 20px; }
.results.series-mode .res-double { bottom: 84px; }

/* Results layout (9 Nov 2026): the summary line wraps inside the screen instead of running off it; SHARE RESULT moves
   to the top right; the Gold ×1.5 ad sits at the bottom right, clear of the voice controls (bottom left); no Install
   app button over the results or the match. */
.results .res-mine { white-space: normal; max-width: min(1100px, calc(100% - 160px)); box-sizing: border-box; text-align: center; line-height: 1.3; font-size: 21px; padding: 8px 22px; overflow-wrap: anywhere; }
.results .res-share { top: 22px; bottom: auto; right: 26px; min-height: 46px; padding: 9px 18px; font-size: 17px; }
.results .res-double { left: auto; right: 26px; bottom: 22px; }
.results.series-mode .res-double { bottom: 22px; }
body[data-screen="results"] .install-app, body[data-screen="game"] .install-app { display: none; }
/* No mic / speaker buttons on the results (9 Nov 2026): voice keeps the player's settings (Settings → Sound), as before. */
.results .res-voice { display: none !important; }
/* Results (9 Nov 2026): only the player's own card is highlighted (the winner keeps its Winner badge); Royal Mode
   shows the characters. Each card shows that player's equipped skin and avatar. */
.res-card.winner:not(.me) { box-shadow: 0 0 0 1.5px rgba(255, 216, 102, .45), 0 14px 28px rgba(0, 0, 0, .54); }
.res-card.me { box-shadow: 0 0 0 4px #ffd866, 0 0 34px rgba(255, 216, 102, .65), 0 14px 28px rgba(0, 0, 0, .55) !important; transform: translateY(-6px); }
.res-card .rc-art.royal { background-size: contain; background-repeat: no-repeat; background-position: center bottom; background-color: transparent; }
/* Results summary (9 Nov 2026): one short line — role, rank, Gold, Clovers (the wallet sums are in its tooltip). */
.results .res-mine { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; white-space: nowrap; font-size: 22px; padding: 8px 24px; max-width: none; width: auto; }
.res-mine .rm-role { color: #ffd866; }
.res-mine .rm-place { padding: 2px 12px; border-radius: 999px; background: rgba(255, 216, 102, .16); color: #ffe08a; font-size: 18px; }
.res-mine .rm-chip { display: inline-flex; align-items: center; gap: 6px; }
.res-mine .rm-chip b.neg { color: #ff8a8a; }
.res-mine .rm-item { font-size: 16px; color: #d8ccff; }

/* Results, royal look (9 Nov 2026, after the user's picture): crown and laurels around the title with gold rules,
   royal banners at the sides, gold-framed cards, the player's own card glowing. */
.results .res-title { top: 26px; font-size: 44px; }
.res-crest { position: absolute; left: 50%; top: 0; width: 900px; height: 100px; transform: translateX(-50%); z-index: 3; pointer-events: none; }
.res-crest .rc-crown { position: absolute; left: 50%; top: -2px; width: 44px; height: 30px; transform: translateX(-50%); background: var(--lp-crown) center / contain no-repeat; filter: drop-shadow(0 3px 6px rgba(0,0,0,.5)); }
.res-crest .rc-line { position: absolute; top: 13px; width: 230px; height: 2px; background: linear-gradient(90deg, transparent, #f2c75a); }
.res-crest .rc-line.l { left: 180px; }
.res-crest .rc-line.r { right: 180px; transform: scaleX(-1); }
.res-crest .rc-line::after { content: ''; position: absolute; right: -4px; top: -4px; width: 10px; height: 10px; background: #f2c75a; transform: rotate(45deg); }
.res-crest .rc-laurel { position: absolute; top: 20px; width: 42px; height: 64px; background: url(img/letters/laurel-l.webp) center / contain no-repeat; filter: drop-shadow(0 3px 5px rgba(0,0,0,.45)); }
.res-crest .rc-laurel.l { left: 70px; }
.res-crest .rc-laurel.r { right: 70px; background-image: url(img/letters/laurel-r.webp); }
.res-banner { position: absolute; top: 150px; z-index: 1; width: 92px; height: 210px; pointer-events: none;
  background: var(--lp-crown) 50% 46px / 54px auto no-repeat, linear-gradient(180deg, #6a1f8a, #3c0d5a);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 84%, 0 100%); box-shadow: inset 0 0 0 4px #e2ad3c; filter: drop-shadow(0 8px 14px rgba(0,0,0,.5)); }
.res-banner::before { content: ''; position: absolute; left: -8px; right: -8px; top: 0; height: 10px; background: linear-gradient(180deg, #ffe7a0, #b07818); border-radius: 5px; }
.res-banner.l { left: 24px; }
.res-banner.r { right: 24px; }
.results.series-mode .res-banner, .results.series-mode .res-crest { display: none; }
.res-card { border: 0 !important; background: linear-gradient(180deg, #4a2aa8, #22105e) padding-box, linear-gradient(135deg, #fff1b8, #e2ad3c 30%, #8a5a12 55%, #f8dc84 75%, #b07818) border-box !important; border: 4px solid transparent !important; box-shadow: 0 14px 28px rgba(0,0,0,.55) !important; }
.res-card.me { box-shadow: 0 0 0 3px #ffe08a, 0 0 38px rgba(255, 216, 102, .75), 0 14px 28px rgba(0,0,0,.55) !important; }

/* =================================================================================================================
   Results on the user's template (9 Nov 2026): img/results-board.webp (1672 x 941) fitted inside the stage (--rbk
   scale, --rbx / --rby offset, set in layout()). Every real element sits in its painted slot, in the template's own
   pixels: card picture, avatar, name, Clovers and Gold on each card; YOUR REWARDS; the buttons over the painted ones.
   The painted ranks, roles and the winner glow match because the cards are always King to Thief. Not used beside a
   game card's standings (.series-mode).
   ================================================================================================================= */
.res-board, .res-rw, .res-gear { display: none; }
.results.templ::before { background: url("img/results-board.webp") center / cover no-repeat; opacity: .6; filter: blur(14px) brightness(.55); }
.results.templ .res-board { display: block; position: absolute; left: var(--rbx); top: var(--rby); width: calc(1672px * var(--rbr, 1)); height: 941px; transform-origin: 0 0; scale: var(--rbk); background: url("img/results-board.webp") 0 0 / 100% 100% no-repeat; }
.results.templ .res-title, .results.templ .res-crest, .results.templ .res-banner, .results.templ .res-mine { display: none; }
.results.templ .res-cards { display: block; left: var(--rbx); top: var(--rby); width: calc(1672px * var(--rbr, 1)); height: 941px; transform: none; transform-origin: 0 0; scale: var(--rbk); pointer-events: none; }
/* Real cards (9 Nov 2026): solid cards in the template's style, covering the painted ones; they animate. */
.results.templ .res-card { position: absolute; top: 183px; width: calc(258px * var(--rbr, 1)); height: 434px; padding: 0; box-sizing: border-box; border-radius: 26px; overflow: hidden; pointer-events: auto; transform: none;
  border: 5px solid transparent !important;
  background: radial-gradient(120% 60% at 50% 0%, #6a34b8 0%, transparent 60%) padding-box, linear-gradient(180deg, #4a238f 0%, #2c1062 55%, #1b0943 100%) padding-box,
    linear-gradient(160deg, #fff1b8 0%, #e2ad3c 22%, #8a5a12 45%, #f8dc84 62%, #b07818 82%, #ffe7a0 100%) border-box !important;
  box-shadow: 0 16px 30px rgba(0, 0, 0, .55), inset 0 2px 0 rgba(255, 255, 255, .12) !important;
  animation: rcIn .5s cubic-bezier(.2, 1.3, .4, 1) both; }
.results.templ .res-card:nth-child(1) { left: calc(171px * var(--rbr, 1)); } .results.templ .res-card:nth-child(2) { left: calc(454px * var(--rbr, 1)); } .results.templ .res-card:nth-child(3) { left: calc(722px * var(--rbr, 1)); }
.results.templ .res-card:nth-child(4) { left: calc(990px * var(--rbr, 1)); } .results.templ .res-card:nth-child(5) { left: calc(1260px * var(--rbr, 1)); }
.results.templ .res-card::before { display: block; inset: 0; z-index: 3; background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, .22) 50%, transparent 60%); transform: translateX(-120%); animation: rcShine 1.1s .9s ease-out both; }
.results.templ .res-card.me { overflow: visible; box-shadow: 0 0 0 4px #ffe08a, 0 0 34px 10px rgba(255, 216, 102, .8), 0 16px 30px rgba(0, 0, 0, .55) !important; animation: rcIn .5s cubic-bezier(.2, 1.3, .4, 1) both, rcGlow 2.2s 1s ease-in-out infinite; }
.results.templ .rc-place { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); display: block; margin: 0; padding: 4px 16px; border-radius: 999px; white-space: nowrap;
  font: 400 19px/1.2 Lilita, system-ui, sans-serif; letter-spacing: .04em; text-transform: uppercase; color: #fff; background: #1a1036; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }
.results.templ .rc-place.first { color: #3a1d00; background: linear-gradient(180deg, #ffe58a, #f0b52a); box-shadow: 0 0 0 2px #fff3c0, 0 2px 6px rgba(0, 0, 0, .35); }
.results.templ .rc-role { position: absolute; left: 0; right: 0; top: 46px; text-align: center; font: 900 31px/1 'Cinzel', serif; letter-spacing: .02em;
  background: linear-gradient(180deg, #fff6c8 0%, #ffd866 45%, #e0a020 75%, #ffe9a0 100%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 2px 0 #3a1500); }
.results.templ .rc-art { position: absolute; left: calc(50% - 80px); top: 92px; width: 160px; height: 176px; margin: 0; border-radius: 10px; box-sizing: border-box;
  border: 5px solid transparent; background-origin: border-box; background-color: #fbecc0;
  box-shadow: 0 0 0 2px #8a5a12, 0 0 0 5px #f2c75a, 0 6px 12px rgba(0, 0, 0, .45); background-size: 100% 100%; animation: rcFlip .6s cubic-bezier(.3, 1.3, .5, 1) both; }
.results.templ .rc-art.royal { background-color: #f6e1a6; background-size: contain; background-repeat: no-repeat; background-position: center bottom; }
.results.templ .rc-player { position: absolute; left: calc(50% - 107px); top: 288px; width: 214px; height: 60px; margin: 0; display: block; }
.results.templ .rc-player i { position: absolute; left: 0; top: 0; width: 56px; height: 56px; border-radius: 50%; background-size: cover; background-color: #2a1060; box-shadow: 0 0 0 3px #f2c75a, 0 0 0 5px #6b3d06, 0 4px 8px rgba(0, 0, 0, .45); animation: rcPop .4s cubic-bezier(.2, 1.6, .4, 1) both; }
.results.templ .rc-name { position: absolute; left: 68px; top: 12px; width: 144px; height: 34px; line-height: 34px; box-sizing: border-box; padding: 0 10px; border-radius: 999px; text-align: center;
  font: 400 19px/34px Lilita, system-ui, sans-serif; color: #fff; background: linear-gradient(180deg, #3d1a7a, #2a0f5c); box-shadow: inset 0 0 0 2px rgba(196, 150, 255, .35); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.results.templ .rc-row { position: absolute; left: 18px; right: 18px; top: 360px; height: 44px; display: flex; align-items: center; justify-content: center; gap: 18px; margin: 0; border-radius: 999px;
  background: linear-gradient(180deg, #1c0b40, #12062c); box-shadow: inset 0 0 0 2px #c9952e, 0 3px 6px rgba(0, 0, 0, .4); font: 400 23px/1 Lilita, system-ui, sans-serif; color: #fff3c8; }
.results.templ .rc-row > span { display: inline-flex; align-items: center; gap: 6px; }
.results.templ .rc-row > span:last-child { order: -1; }
.results.templ .rc-row .ico { width: 26px; height: 26px; display: inline-block !important; }
/* Likes (9 Nov 2026): a pill on the picture's lower corner; on your own card it shows your likes. */
.results.templ .rc-like { position: absolute; left: calc(50% + 34px); top: 238px; margin: 0; z-index: 4; padding: 4px 12px; font: 400 19px/1 Lilita, system-ui, sans-serif;
  background: linear-gradient(180deg, #3d1a7a, #22094f); box-shadow: 0 0 0 2px #f2c75a, 0 3px 8px rgba(0, 0, 0, .5); color: #fff; animation: rcPop .4s 1.1s cubic-bezier(.2, 1.6, .4, 1) both; }
.results.templ .rc-like.on { background: linear-gradient(180deg, #5fd17a, #23863f); box-shadow: 0 0 0 2px #f2c75a, 0 3px 8px rgba(0, 0, 0, .5); }
.results.templ .rc-like.mine { display: flex; align-items: center; gap: 5px; border-radius: 999px; cursor: default; }
@keyframes rcIn { 0% { opacity: 0; transform: translateY(40px) scale(.9); } 100% { opacity: 1; transform: none; } }
@keyframes rcFlip { 0% { transform: perspective(600px) rotateY(90deg); filter: brightness(1.6); } 100% { transform: none; filter: none; } }
@keyframes rcPop { 0% { transform: scale(0); } 100% { transform: scale(1); } }
@keyframes rcShine { to { transform: translateX(120%); } }
@keyframes rcGlow { 0%, 100% { box-shadow: 0 0 0 4px #ffe08a, 0 0 26px 6px rgba(255, 216, 102, .65), 0 16px 30px rgba(0, 0, 0, .55); } 50% { box-shadow: 0 0 0 4px #fff3c0, 0 0 44px 14px rgba(255, 216, 102, .95), 0 16px 30px rgba(0, 0, 0, .55); } }
.results.templ .res-card:nth-child(2) { animation-delay: .08s; } .results.templ .res-card:nth-child(3) { animation-delay: .16s; } .results.templ .res-card:nth-child(4) { animation-delay: .24s; } .results.templ .res-card:nth-child(5) { animation-delay: .32s; }
.results.templ .res-card:nth-child(1) .rc-art { animation-delay: .35s; } .results.templ .res-card:nth-child(2) .rc-art { animation-delay: .5s; } .results.templ .res-card:nth-child(3) .rc-art { animation-delay: .65s; } .results.templ .res-card:nth-child(4) .rc-art { animation-delay: .8s; } .results.templ .res-card:nth-child(5) .rc-art { animation-delay: .95s; }
/* YOUR REWARDS: a real panel over the painted one */
.results.templ .res-rw { display: block; position: absolute; left: calc(var(--rbx) + 128px * var(--rbr, 1) * var(--rbk)); top: calc(var(--rby) + 632px * var(--rbk)); width: calc(1414px * var(--rbr, 1)); height: 136px; transform-origin: 0 0; scale: var(--rbk); pointer-events: none; }
.res-rw .rw-panel { position: absolute; left: 0; right: 0; top: 24px; bottom: 0; border-radius: 22px; border: 4px solid transparent;
  background: linear-gradient(180deg, #3a1676, #200a4c) padding-box, linear-gradient(160deg, #fff1b8, #e2ad3c 25%, #8a5a12 50%, #f8dc84 70%, #b07818) border-box; box-shadow: 0 12px 24px rgba(0, 0, 0, .5); animation: rcIn .5s .4s both; }
.res-rw .rw-head { position: absolute; left: calc(50% - 241px); top: -2px; width: 476px; height: 58px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; padding: 0; border-radius: 12px; white-space: nowrap; font: 900 26px/1.1 'Cinzel', serif; color: #ffd866; text-shadow: 0 2px 0 #3a1500;
  background: linear-gradient(180deg, #2a0f5c, #160636) padding-box, linear-gradient(160deg, #fff1b8, #e2ad3c, #8a5a12, #f8dc84) border-box; border: 3px solid transparent; animation: rcPop .4s .5s both; }
.res-rw .rw-head::before, .res-rw .rw-head::after { content: '◆'; color: #f2c75a; font-size: 16px; margin: 0 12px; vertical-align: middle; }
.res-rw .rw-cells { position: absolute; left: 30px; right: 30px; top: 50px; height: 58px; display: flex; align-items: center; gap: 22px; }
.res-rw .rw-cell { flex: 1; display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 14px; border-radius: 999px; background: rgba(10, 4, 30, .55); box-shadow: inset 0 0 0 2px rgba(201, 149, 46, .7);
  font: 400 24px/1 Lilita, system-ui, sans-serif; color: #fff3c8; white-space: nowrap; animation: rcPop .4s both; }
.res-rw .rw-cell small { font: 700 15px system-ui, sans-serif; color: #cdbbf2; }
.res-rw .rw-cell .ico { width: 30px; height: 30px; flex: none; }
.res-rw .rw-total { flex: 1.5; background: linear-gradient(180deg, #2a0f5c, #12062c); box-shadow: inset 0 0 0 3px #f2c75a, 0 0 18px rgba(255, 216, 102, .45); color: #ffd866; font-size: 28px; }
.res-rw .rw-total small { color: #ffd866; font: 900 22px 'Cinzel', serif; margin-right: auto; }
.res-rw .rw-cell:nth-child(1) { animation-delay: .7s; } .res-rw .rw-cell:nth-child(2) { animation-delay: .8s; } .res-rw .rw-cell:nth-child(3) { animation-delay: .9s; } .res-rw .rw-cell:nth-child(4) { animation-delay: 1s; }
.res-rw .neg { color: #ff9a9a; }
@media (prefers-reduced-motion: reduce) { .results.templ .res-card, .results.templ .rc-art, .results.templ .res-card::before, .results.templ .rc-player i, .res-rw * { animation: none !important; } }
/* buttons over the painted ones */
.results.templ .res-actions { display: block; left: var(--rbx); top: var(--rby); bottom: auto; width: calc(1672px * var(--rbr, 1)); height: 941px; transform: none; transform-origin: 0 0; scale: var(--rbk); pointer-events: none; }
.results.templ .res-actions .big-btn, .results.templ .res-share, .results.templ .res-double, .results.templ .res-gear { position: absolute; padding: 0; border: 0; border-radius: 30px; background: none; box-shadow: none; color: transparent; text-shadow: none; min-height: 0; font-size: 0; pointer-events: auto; animation: none; }
.results.templ #resHome { left: calc(300px * var(--rbr, 1)); top: 798px; width: calc(336px * var(--rbr, 1)); height: 90px; }
.results.templ #resAgain { left: calc(658px * var(--rbr, 1)); top: 798px; width: calc(348px * var(--rbr, 1)); height: 90px; }
.results.templ .res-actions .big-btn:active, .results.templ .res-share:active, .results.templ .res-double:active, .results.templ .res-gear:active { background: rgba(255, 255, 255, .16); }
.results.templ .res-share, .results.templ .res-double, .results.templ .res-gear { transform-origin: 0 0; scale: var(--rbk); right: auto; bottom: auto; }
.results.templ .res-share { left: calc(var(--rbx) + 1255px * var(--rbr, 1) * var(--rbk)); top: calc(var(--rby) + 66px * var(--rbk)); width: calc(278px * var(--rbr, 1)); height: 68px; }
.results.templ .res-gear { display: block; left: calc(var(--rbx) + (1601px * var(--rbr, 1) - 39px) * var(--rbk)); top: calc(var(--rby) + 54px * var(--rbk)); width: 78px; height: 78px; border-radius: 50%; z-index: 4; }
.results.templ .res-double { display: block; left: calc(var(--rbx) + 1030px * var(--rbr, 1) * var(--rbk)); top: calc(var(--rby) + 797px * var(--rbk)); width: calc(400px * var(--rbr, 1)); height: 93px; border-radius: 34px; }
.results.templ .res-double.hidden { display: block !important; background: rgba(14, 6, 34, .66); pointer-events: none; } /* no ad to watch: the painted button is dimmed */

/* Guessing (9 Nov 2026): no tick badge on the picked card. */
.card.chosen::before { display: none !important; }

/* Store (9 Nov 2026): items /admin priced in Gems show a purple Gem button; both prices show side by side. */
.price-btn.gem { background: linear-gradient(180deg, #a772ff, #6233bd); box-shadow: 0 3px 0 #3a1a80; }
.price-btns { display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

/* Royal Spin (9 Nov 2026): two ways to spin side by side, an ad (+1 ready spin) or Gold (spins at once). */
.sp-two { display: flex; gap: 8px; }
.sp-two .sp-btn.sp-ad { flex: 1.3; }
.sp-btn.sp-gold { flex: 1; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; padding: 7px 10px 6px; font-size: 20px; line-height: 1.05; white-space: nowrap; }
.sp-btn.sp-gold .ico { width: 22px; height: 22px; display: inline-block; vertical-align: -4px; }
.sp-btn.sp-gold small { font: 600 12px system-ui, sans-serif; opacity: .9; text-shadow: none; margin-top: 2px; }

/* Royal Spin (9 Nov 2026, simplified): no "spins done" scale; two big ways to spin, Watch Ad or Gold. */
.spin-store .sp-panel .sp-meter { display: none; }
.sp-ctl.sp-simple { gap: 10px; }
.sp-simple .sp-btn.big { width: 270px; min-width: 0; display: flex; flex-direction: column; align-items: center; padding: 12px 16px 9px; font-size: 26px; line-height: 1.05; }
.sp-simple .sp-btn.big small { font: 600 13px system-ui, sans-serif; opacity: .92; text-shadow: none; margin-top: 3px; }
.sp-simple .sp-btn.sp-gold .ico { width: 26px; height: 26px; display: inline-block; vertical-align: -5px; }
.sp-simple .sp-or { display: flex; align-items: center; gap: 10px; width: 230px; color: #cdbbf2; font: 700 14px system-ui, sans-serif; }
.sp-simple .sp-or::before, .sp-simple .sp-or::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, #c9a45a, transparent); }
.sp-simple .sp-btn.sp-go { position: relative; }
.sp-simple .sp-btn.sp-go .ico { width: 26px; height: 26px; display: inline-block; vertical-align: -5px; }
.sp-simple .sp-count { position: absolute; top: -10px; right: -10px; min-width: 30px; height: 30px; padding: 0 8px; box-sizing: border-box; border-radius: 999px; display: grid; place-items: center;
  font: 400 18px/1 Lilita, sans-serif; color: #fff; background: linear-gradient(180deg, #ff6b6b, #c81e1e); box-shadow: 0 0 0 3px #fff3c0, 0 3px 6px rgba(0, 0, 0, .4); }
.sp-simple .sp-label { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }

/* live-update check marker (10 Nov 2026): a small change the DEV app should download without a new APK. */

/* Gold from guesses that expires (12 Nov 2026), under the wallet in the Store. */
.gold-exp { margin: -4px 0 8px; padding: 6px 12px; border-radius: 10px; background: rgba(255, 196, 80, .14); box-shadow: inset 0 0 0 1px rgba(255, 216, 102, .45); color: #ffe9b0; font: 600 14px/1.3 system-ui, sans-serif; }

/* Wallet history (12 Nov 2026): Home → tap Gold or Gems. */
.mh-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; padding: 10px 14px; border-radius: 14px; background: rgba(0, 0, 0, .25); }
.mh-head .ico { width: 30px; height: 30px; }
.mh-head b { font: 400 28px/1 Lilita, sans-serif; color: #ffe08a; }
.mh-head .pill-btn { margin-left: auto; }
.mh-row { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.mh-row .grow { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.mh-row b { color: #fff; font: 700 15px system-ui, sans-serif; }
.mh-ico { width: 30px; text-align: center; font-size: 22px; }
.mh-amt { font: 400 20px Lilita, sans-serif; min-width: 70px; text-align: right; }
.mh-amt.pos { color: #6ee07a; } .mh-amt.neg { color: #ff8a8a; }
.mh-bal { min-width: 84px; text-align: right; line-height: 1.15; }
.mh-bal i { display: block; font-style: normal; font-size: 11px; opacity: .75; }
.mh-empty { text-align: center; margin: 30px 10px; }
.gift-locked { margin: 6px 0 10px; padding: 8px 12px; border-radius: 10px; background: rgba(255, 196, 80, .14); box-shadow: inset 0 0 0 1px rgba(255, 216, 102, .45); color: #ffe9b0; font: 600 14px/1.35 system-ui, sans-serif; }
