/* Reliquary Rush v1.0.1 — vault surface and one-viewport landscape mode. */
.rr-shell { max-width: 1240px; }
.rr-interface { color: #d7f9f8; }
.rr-toolbar { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin: 0 0 10px; }
.rr-name { display: flex; align-items: center; gap: 7px; color: #9ccacc; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; }
.rr-name input { width: 175px; min-height: 38px; box-sizing: border-box; padding: 7px 10px; border: 1px solid #16858d; border-radius: 3px; color: #eaffff; background: #071318; }
.rr-button { min-height: 38px; border: 1px solid #138a92; border-radius: 3px; padding: 7px 12px; color: #cfffff; background: #10262c; font: inherit; font-size: .78rem; cursor: url('/images/cursors/hover.cur') 11 0, url('/images/cursors/hover.png') 11 0, pointer; }
.rr-button:hover, .rr-button:focus-visible { border-color: #6bffff; box-shadow: 0 0 12px rgba(0, 238, 255, .25); }
.rr-button--primary { color: #031114; background: #55ffff; border-color: #b8ffff; font-weight: 700; }
.rr-button[disabled] { opacity: .45; cursor: not-allowed; }
.rr-layout { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 10px; align-items: stretch; }
.rr-stage-wrap { min-width: 0; }
.rr-stage { position: relative; overflow: hidden; min-height: 510px; height: clamp(440px, 62vh, 610px); border: 1px solid #17636a; border-radius: 6px; background: #040b12; box-shadow: inset 0 0 42px rgba(0, 217, 230, .1), 0 13px 30px rgba(0, 0, 0, .38); }
#gameCanvas { display: block; width: 100%; height: 100%; touch-action: none; }
.rr-hint { position: absolute; z-index: 2; left: 10px; right: 10px; bottom: 8px; margin: 0; color: #c4e5e6; font-size: .75rem; text-shadow: 0 1px 3px #000; pointer-events: none; }
.rr-hud { display: flex; flex-direction: column; gap: 7px; min-width: 0; padding: 12px 10px; border: 1px solid #17636a; border-radius: 5px; background: #071318; }
.rr-stat { display: flex; justify-content: space-between; gap: 5px; padding: 6px 5px; border-bottom: 1px solid rgba(65, 193, 198, .22); }
.rr-stat span { color: #83abad; font-size: .66rem; text-transform: uppercase; letter-spacing: .05em; }
.rr-stat strong { color: #e1ffff; font-size: .9rem; }
.rr-status { min-height: 70px; margin: auto 1px 0; color: #9cbabc; font-size: .76rem; line-height: 1.45; }
.rr-status[data-tone="good"] { color: #7dffb7; }
.rr-status[data-tone="warn"] { color: #ffd37e; }
.rr-status[data-tone="bad"] { color: #ff929b; }
.rr-touch { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; max-width: 360px; margin: 8px auto 0; }
.rr-touch button { min-height: 35px; border: 1px solid #176b72; border-radius: 4px; color: #cfffff; background: #0d2027; font: inherit; font-size: .72rem; touch-action: manipulation; cursor: url('/images/cursors/hover.cur') 11 0, url('/images/cursors/hover.png') 11 0, pointer; }
.rr-touch button:hover, .rr-touch button:active, .rr-touch button:focus-visible { background: #16434b; border-color: #77ffff; }
.rr-touch button:nth-child(1) { grid-column: 2; }
.rr-touch button:nth-child(2) { grid-column: 1; grid-row: 2; }
.rr-touch button:nth-child(3) { grid-column: 2; grid-row: 2; }
.rr-touch button:nth-child(4) { grid-column: 3; grid-row: 2; }
.rr-touch button:nth-child(5) { grid-column: 4; grid-row: 1 / span 2; }
.rr-touch button:nth-child(6) { grid-column: 4; grid-row: 3; }
.rr-round-overlay { position: absolute; z-index: 5; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(2, 8, 12, .78); text-align: center; }
.rr-round-overlay > div { max-width: 360px; padding: 22px; border: 1px solid #1a9298; border-radius: 5px; background: #07171b; box-shadow: 0 0 28px rgba(0, 237, 255, .16); }
.rr-round-overlay h2 { margin: 0 0 8px; color: #d8ffff; font-size: 1.25rem; }
.rr-round-overlay p { color: #a5c5c5; font-size: .82rem; line-height: 1.5; }
.rr-divider { margin: 22px 0 16px; border: 0; border-top: 1px solid rgba(0, 204, 204, .34); }
#lbTable { width: 100%; border: 1px solid #008b8b; border-collapse: collapse; background: rgba(3, 15, 18, .84); }
#lbTable th, #lbTable td { padding: 8px 9px; border: 1px solid rgba(0, 139, 139, .55); text-align: left; }
#lbTable th { color: #aefefe; background: rgba(0, 204, 204, .14); font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; }
#lbTable td { color: #c8e5e8; }
#lbTable .empty-cell { color: #8ba9ae; font-style: italic; text-align: center; }
[hidden] { display: none !important; }

@media (max-width: 900px) {
  .rr-layout { grid-template-columns: minmax(0, 1fr) 154px; }
  .rr-stage { min-height: 430px; height: clamp(400px, 58vh, 540px); }
  .rr-name input { width: 145px; }
}

/* Shared gate admits this tested compact landscape mode from 568px. The
 * entire game surface becomes one viewport: page chrome and the below-game
 * ledger wait until the player leaves this compact breakpoint. */
@media (orientation: landscape) and (min-width: 568px) and (max-width: 859px) {
  html, body { overflow: hidden; }
  .wrapper { width: 100%; height: 100svh; min-height: 0; }
  .wrapper > header, .wrapper > footer, .back-link, .game-info, .cc-htp-bar, .cc-ach-bar, .cc-bug-bar, .cc-krix-cameo, .rr-divider, .leaderboard { display: none !important; }
  main { display: flex; flex: 1 1 auto; min-height: 0; }
  .container.rr-shell { box-sizing: border-box; display: flex; flex: 1 1 auto; flex-direction: column; width: 100%; height: 100svh; min-height: 0; max-width: none; margin: 0; padding: max(4px, env(safe-area-inset-top, 0px)) max(6px, env(safe-area-inset-right, 0px)) max(4px, env(safe-area-inset-bottom, 0px)) max(6px, env(safe-area-inset-left, 0px)); border: 0; border-radius: 0; box-shadow: none; }
  .rr-toolbar { flex: 0 0 auto; flex-wrap: nowrap; gap: 5px; margin: 0 0 4px; }
  .rr-name { gap: 3px; font-size: .58rem; white-space: nowrap; }
  .rr-name input { width: clamp(102px, 23vw, 156px); min-height: 32px; padding: 4px 6px; font-size: .7rem; }
  .rr-button { min-height: 32px; padding: 4px 7px; font-size: .62rem; white-space: nowrap; }
  .rr-layout { display: block; flex: 1 1 auto; min-height: 0; }
  .rr-stage-wrap { height: 100%; min-height: 0; }
  .rr-stage { height: 100%; min-height: 0; border-radius: 5px; }
  .rr-hud { position: absolute; z-index: 4; top: 5px; left: 5px; right: 5px; display: flex; flex-direction: row; align-items: center; gap: 3px; padding: 0; border: 0; background: transparent; pointer-events: none; }
  .rr-stat { flex: 0 1 auto; min-width: 0; padding: 3px 5px; border: 1px solid rgba(31, 120, 127, .72); border-radius: 3px; background: rgba(3, 13, 17, .74); }
  .rr-stat span { font-size: clamp(.43rem, 1.3vw, .57rem); }
  .rr-stat strong { font-size: clamp(.57rem, 1.6vw, .76rem); }
  .rr-status { display: none; }
  .rr-touch { position: absolute; z-index: 5; left: 5px; bottom: 5px; width: min(245px, 45%); margin: 0; gap: 3px; opacity: .92; }
  .rr-touch button { min-height: clamp(25px, 8vh, 34px); font-size: clamp(.52rem, 1.7vw, .68rem); }
  .rr-hint { right: 8px; bottom: 6px; left: 255px; overflow: hidden; font-size: clamp(.53rem, 1.5vw, .67rem); text-overflow: ellipsis; white-space: nowrap; }
}

@media (prefers-reduced-motion: reduce) {
  .rr-stage { box-shadow: inset 0 0 24px rgba(0, 217, 230, .08); }
}
