/* OPERATION NAPKIN: SECOND COAT - SNACK ATTACK styles (play/css/mode-rush-01.css). Owner: RUSHHOUR (release K "OPEN KITCHEN",
   2026-10-26; K-INTERFACES 7.7: every class starts with mode-rh-). The HUD lives in core's .mtn-arena (its font-size scales with the
   arena, like COMBAT's HUD); the BUILD / SEND pickers and the results are core .mtn-screen overlays (arrow keys, gamepad, Escape).
   Big, few, obvious buttons (>= 44 px), phones from 360 px, mouse + keyboard + gamepad + touch. */

/* == the HUD == */
.mode-rh-hud {
  position: absolute; inset: 0; pointer-events: none;   /* no z-index: core's screens (pickers, pause, results) must cover it */
  font-size: clamp(9px, calc(16px * var(--as)), 16px); line-height: 1.1;
  color: var(--cream); font-family: var(--f-display); letter-spacing: 0.03em;
}
.mode-rh-hud button { pointer-events: auto; }
.mode-rh-top {
  position: absolute; left: 50%; top: 1.2%; transform: translateX(-50%); width: 40%;
  display: flex; flex-direction: column; align-items: center; gap: 0.25em;
}
.mode-rh-wave {
  font-size: 1.55em; color: var(--grease); white-space: nowrap;
  -webkit-text-stroke: 0.06em var(--ink); paint-order: stroke fill; text-shadow: 0 0.1em 0 var(--ink), 0 0 0.4em var(--ink);
}
.mode-rh-sub { font-size: 0.95em; color: var(--cream); white-space: nowrap; text-shadow: 0 0.1em 0 var(--ink), 0 0 0.35em var(--ink); }
.mode-rh-boss { width: 100%; }   /* shown / hidden by the HUD code (inline display) */
.mode-rh-boss-name { text-align: center; font-size: 0.82em; color: #FFB3A8; text-shadow: 0 0.1em 0 var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mode-rh-boss-bar { position: relative; height: 0.62em; margin-top: 0.12em; border-radius: 0.3em; background: rgba(11, 9, 7, 0.75); border: 0.09em solid var(--ink); overflow: hidden; }
.mode-rh-boss-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 100%; background: linear-gradient(180deg, #FF5A4E, #B5221B); transition: width 0.12s; }
.mode-rh-hud .mtn-btn { min-height: 44px; font-size: max(15px, 1.05em); padding: 0.35em 1.1em; }
.mode-rh-ready.on { background: var(--teal); box-shadow: 0 3px 0 #3F6D67; }
.mode-rh-clock { background: var(--panel-2); color: var(--grease); border-color: var(--batter); }

/* top right: the minimap, ORDERS and the crumb bank */
.mode-rh-tr { position: absolute; right: 1.2%; top: 1.2%; display: flex; flex-direction: column; align-items: flex-end; gap: 0.3em; }
.mode-rh-mini {
  width: 11.25em; height: auto; aspect-ratio: 45 / 27; display: block;
  border: 0.12em solid var(--ink); border-radius: 0.35em; box-shadow: 0 0 0 0.08em rgba(242, 178, 51, 0.35); opacity: 0.94;
}
.mode-rh-res { display: flex; flex-direction: column; align-items: flex-end; gap: 0.15em; }
.mode-rh-orders, .mode-rh-bank, .mode-rh-them {
  padding: 0.15em 0.55em; border-radius: 0.45em; background: rgba(11, 9, 7, 0.72); border: 0.08em solid rgba(247, 236, 216, 0.18);
  white-space: nowrap; text-shadow: 0 0.08em 0 var(--ink);
}
.mode-rh-orders { font-size: 1.15em; color: #FFE7A3; }
.mode-rh-orders::before { content: ""; display: inline-block; width: 0.62em; height: 0.82em; margin-right: 0.35em; vertical-align: -0.08em; background: #FFF7E8; border-top: 0.16em solid var(--ketchup); border-radius: 0.06em; }
.mode-rh-orders.low { color: #FF6A5E; border-color: rgba(226, 51, 43, 0.7); animation: mode-rh-pulse 0.9s ease-in-out infinite; }
.mode-rh-bank { font-size: 1.05em; color: var(--batter); }
.mode-rh-bank::before { content: ""; display: inline-block; width: 0.62em; height: 0.62em; margin-right: 0.35em; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #FFE7A3, #C8964B 70%); border: 0.07em solid var(--ink); vertical-align: -0.04em; }
.mode-rh-them { display: none; font-size: 0.8em; color: var(--muted); }
.mode-rh-vs .mode-rh-them { display: block; }
@keyframes mode-rh-pulse { 50% { transform: scale(1.06); } }

/* knocked out */
.mode-rh-ko { position: absolute; left: 50%; top: 38%; transform: translate(-50%, -50%); text-align: center; pointer-events: none; }
.mode-rh-ko-t { font-size: 2.6em; color: var(--grease); -webkit-text-stroke: 0.06em var(--ink); paint-order: stroke fill; text-shadow: 0 0.08em 0 var(--ink); }
.mode-rh-ko-s { font: 1.1em/1.3 var(--f-type); color: var(--cream); text-shadow: 0 0.1em 0 var(--ink), 0 0 0.4em var(--ink); }

/* SEND ORDERS (versus) and the touch BUILD button (phones; the special button says BUILD too) */
.mode-rh-sendbtn { position: absolute; left: 50%; bottom: 13%; transform: translateX(-50%); background: var(--ketchup); color: var(--cream); box-shadow: 0 3px 0 #7A1712; }
.mode-rh-sendbtn.cd { filter: grayscale(0.6) brightness(0.8); }
.mode-rh-buildbtn { position: absolute; left: 50%; bottom: 24%; transform: translateX(-50%); min-width: 7em; font-size: max(17px, 1.2em) !important; }
/* core's .mtn-btn:active sets transform: translateY(2px) - that would throw a centred button half its width away under the finger
   (the click then lands behind it): keep the centring in the pressed state */
.mode-rh-sendbtn:active, .mode-rh-buildbtn:active { transform: translateX(-50%) translateY(2px); }

/* == the radial pickers (core .mtn-screen: keys, gamepad and Escape navigate) == */
.mtn-screen.mode-rh-picker { background: rgba(11, 9, 7, 0.42); }
.mode-rh-ring { position: relative; width: min(92vw, 88vh, 640px); aspect-ratio: 1 / 1; flex: none; }
.mode-rh-opt {
  position: absolute; transform: translate(-50%, -50%); width: 22%; min-width: 92px; aspect-ratio: 1 / 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 4px;
  border-radius: 50%; border: 3px solid var(--ink); background: var(--panel-2); color: var(--cream); cursor: pointer;
  font: 400 clamp(10px, 1.9vmin, 14px)/1.05 var(--f-display); letter-spacing: 0.03em; text-align: center;
  box-shadow: 0 4px 0 #000, 0 0 0 2px rgba(242, 178, 51, 0.35);
}
.mode-rh-opt canvas { width: 46% !important; height: auto !important; aspect-ratio: 1 / 1; pointer-events: none; }
.mode-rh-opt-n { max-width: 92%; }
.mode-rh-opt-p { color: var(--batter); font-size: 1.15em; }
.mode-rh-opt-p::after { content: " C"; font-size: 0.75em; color: var(--muted); }
.mode-rh-opt-k, .mode-rh-hud kbd {
  position: absolute; top: 6%; right: 12%; min-width: 1.5em; padding: 0 0.3em; border-radius: 0.35em;
  background: var(--batter); color: var(--ink); font: 400 0.95em/1.4 var(--f-display); text-align: center;
}
html[data-input="touch"] .mode-rh-opt-k, html[data-input="pad"] .mode-rh-opt-k { display: none; }
.mode-rh-opt:active { transform: translate(-50%, -50%) translateY(2px); }   /* see .mode-rh-buildbtn:active */
.mode-rh-opt:hover, .mode-rh-opt:focus-visible { background: #3A2C22; box-shadow: 0 4px 0 #000, 0 0 0 4px var(--batter); outline: none; }
.mode-rh-opt.poor, .mode-rh-sendopt.poor, .mode-rh-up.poor { filter: grayscale(0.75) brightness(0.72); }
.mode-rh-opt.poor .mode-rh-opt-p { color: #FF6A5E; }
.mode-rh-center {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 46%;
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
  padding: 12px 10px; border-radius: 16px; background: rgba(22, 17, 13, 0.94); border: 2px solid rgba(242, 178, 51, 0.45);
}
.mode-rh-cname { font: 400 clamp(16px, 2.8vmin, 22px)/1.05 var(--f-display); color: var(--grease); letter-spacing: 0.03em; }
.mode-rh-cdesc { font: clamp(12px, 1.9vmin, 14px)/1.3 var(--f-type); color: var(--cream); }
.mode-rh-cstat { font: 400 clamp(11px, 1.7vmin, 13px)/1.25 var(--f-display); color: var(--teal); letter-spacing: 0.03em; }
.mode-rh-cbank { font: 400 clamp(12px, 1.8vmin, 14px)/1.2 var(--f-display); color: var(--batter); }
.mode-rh-acts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.mode-rh-acts .mtn-btn { min-width: 8.5em; }
.mode-rh-sell { background: var(--panel-2); color: var(--grease); border-color: var(--batter); }
.mode-rh-close { background: var(--panel-2); color: var(--cream); border-color: rgba(247, 236, 216, 0.3); box-shadow: none; font-size: 15px; }

/* SEND ORDERS picker */
.mode-rh-sendbox {
  width: min(92vw, 432px); display: flex; flex-direction: column; align-items: stretch; gap: 10px; text-align: center;
  padding: 16px; border-radius: 16px; background: rgba(22, 17, 13, 0.95); border: 2px solid rgba(226, 51, 43, 0.6);
}
.mode-rh-sendopt { position: relative; background: var(--ketchup); color: var(--cream); box-shadow: 0 3px 0 #7A1712; font-size: 19px; }
.mode-rh-sendopt small { display: block; font: 13px/1.2 var(--f-type); text-transform: none; color: #FFE7D6; }

/* == results == */
.mtn-screen.mode-rh-results { background: rgba(11, 9, 7, 0.78); }
.mode-rh-resbox {
  width: min(94vw, 560px); display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
  padding: 18px 16px; border-radius: 18px; background: rgba(22, 17, 13, 0.96); border: 2px solid rgba(242, 178, 51, 0.45);
}
.mode-rh-results.win .mode-rh-resbox { border-color: var(--batter); box-shadow: 0 0 40px rgba(242, 178, 51, 0.25); }
.mode-rh-res-mode { font: 400 14px/1.2 var(--f-display); color: var(--muted); letter-spacing: 0.06em; }
.mode-rh-res-title {
  margin: 0; font: 400 clamp(34px, 8vw, 56px)/1 var(--f-display); color: var(--grease); letter-spacing: 0.03em;
  -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; text-shadow: 0 3px 0 var(--ink);
}
.mode-rh-results.win .mode-rh-res-title { color: var(--batter); }
.mode-rh-res-sub { font: 15px/1.35 var(--f-type); color: var(--cream); }
.mode-rh-res-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 6px; width: 100%; }
.mode-rh-res-row { display: flex; flex-direction: column; gap: 2px; padding: 6px 8px; border-radius: 10px; background: rgba(247, 236, 216, 0.06); }
.mode-rh-res-l { font: 400 12px/1.2 var(--f-display); color: var(--muted); letter-spacing: 0.05em; }
.mode-rh-res-v { font: 400 24px/1.1 var(--f-display); color: var(--cream); }
.mode-rh-res-seats { display: flex; flex-direction: column; gap: 4px; width: 100%; }
.mode-rh-res-seat { display: flex; align-items: center; gap: 8px; padding: 4px 8px; border-radius: 8px; background: rgba(247, 236, 216, 0.05); text-align: left; }
.mode-rh-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; border: 2px solid var(--ink); }
.mode-rh-res-sn { font: 400 15px/1.2 var(--f-display); color: var(--cream); flex: none; }
.mode-rh-res-sv { font: 13px/1.2 var(--f-type); color: var(--muted); }
.mode-rh-res-ach { font: 400 15px/1.3 var(--f-display); color: var(--batter); letter-spacing: 0.04em; }
.mode-rh-res-btns { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 4px; }
.mode-rh-res-btns .mtn-btn { min-width: 11em; font-size: 20px; }
.mode-rh-res-btns .mtn-btn[data-back] { background: var(--panel-2); color: var(--cream); border-color: rgba(247, 236, 216, 0.3); box-shadow: none; }

/* == phones == */
/* portrait: the arena is a strip at the top; the HUD shrinks with it, the minimap gets smaller and the top band narrower */
html.mtn-portrait .mode-rh-top { width: 52%; }
html.mtn-portrait .mode-rh-mini { width: 8.5em; }
html.mtn-touch .mode-rh-hud .mtn-btn { font-size: 15px; padding: 6px 14px; }
html.mtn-touch.mtn-portrait .mode-rh-buildbtn { bottom: 6%; }
html.mtn-touch.mtn-portrait .mode-rh-sendbtn { bottom: 4%; }
/* a narrow portrait screen: the ring becomes a grid of big buttons (two columns), the info box on top */
@media (max-width: 560px) and (orientation: portrait) {
  .mode-rh-ring { width: min(94vw, 440px); aspect-ratio: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .mode-rh-center { position: static; transform: none; width: auto; grid-column: 1 / -1; order: -1; padding: 10px 8px; }
  .mode-rh-opt {
    position: relative; transform: none; left: auto !important; top: auto !important; width: auto; min-width: 0; aspect-ratio: auto;
    min-height: 64px; flex-direction: row; justify-content: flex-start; gap: 8px; padding: 6px 10px; border-radius: 14px; text-align: left;
  }
  .mode-rh-opt:active { transform: translateY(2px); }
  .mode-rh-opt canvas { width: 40px !important; flex: none; }
  .mode-rh-opt-n { flex: 1 1 auto; }
  .mode-rh-acts .mtn-btn { min-width: 7em; padding: 6px 10px; }
}
/* a short landscape screen (phones): the ring is small, so the box keeps the name, the numbers and the buttons */
@media (max-height: 520px) and (orientation: landscape) {
  .mtn-screen.mode-rh-picker { padding-top: 6px; padding-bottom: 6px; }
  .mode-rh-ring { width: min(92vw, calc(100vh - 16px), 640px); }
  .mode-rh-opt { min-width: 0; width: 23.5%; font-size: clamp(9px, 2.6vh, 13px); gap: 0; }   /* every button inside the screen (>= 70 px at 375) */
  .mode-rh-opt canvas { width: 40% !important; }
  .mode-rh-cdesc { display: none; }
  .mode-rh-center { width: 50%; padding: 8px 6px; gap: 4px; }
  .mode-rh-cname { font-size: 15px; }
  .mode-rh-cstat, .mode-rh-cbank { font-size: 11px; }
  .mode-rh-close { min-height: 40px; padding: 4px 12px; }
  .mode-rh-acts .mtn-btn { min-width: 6.5em; padding: 6px 8px; font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) { .mode-rh-orders.low { animation: none; } }
