/* noscope.gg — v3.
 *
 * Everything above the "responsive" rule is the design export's own stylesheet,
 * unchanged. The export ships fixed desktop widths and no media queries, so the
 * mobile rules below are additive and live behind max-width guards: desktop
 * rendering is byte-identical to the reference.
 *
 * Generated hover classes are appended by scripts/build_web.py. Do not edit
 * web/v3.css — edit this file.
 */

html, body { margin: 0; padding: 0; background: #0b0c12; }
body { font-family: 'Chakra Petch', sans-serif; color: #f2f4fa; }
a { color: #ff4306; text-decoration: none; }
a:hover { color: #ff6a35; }
::selection { background: #ff4306; color: #0b0c12; }
@keyframes blink { 0%, 100% { opacity: 1 } 50% { opacity: .25 } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px) } to { opacity: 1; transform: none } }
@keyframes growX { from { transform: scaleX(0) } }
@keyframes growY { from { transform: scaleY(0) } }
input { outline: none; }

/* ---------------------------------------------------------------- shell */

.shell { min-height: 100vh; background: #0b0c12; display: flex; flex-direction: column; align-items: center; }
.page { width: 100%; max-width: 1440px; padding: 0 48px; box-sizing: border-box; }

.nav { display: flex; align-items: center; gap: 32px; height: 72px; border-bottom: 1px solid #262a34; }
.brand { display: flex; align-items: center; }
.tabs { display: flex; gap: 4px; flex: 1; }
.tab:hover, .hv-tab:hover { color: #f2f4fa; }
.hv-ulash:hover { background: #1f242e; color: #ff4306; }
.me { display: flex; align-items: center; gap: 14px; }
.avatar { width: 36px; height: 36px; background: #1f242e; border: 1px solid #333947; display: flex;
          align-items: center; justify-content: center; font-weight: 700; font-size: 14px; color: #ff4306; }

/* Links promoted from <div> must not inherit the anchor colour. */
a[style] { color: inherit; }
a[style]:hover { color: inherit; }

/* The rating chart's median/average labels are pinned to the right edge, where
 * the last bar also sits. The bars animate via transform, which gives them a
 * stacking context and paints them over the labels at every width — so the
 * labels need an explicit z-index and something to sit on. */
[style*="position:absolute;right:0;bottom:151px"],
[style*="position:absolute;right:0;bottom:129px"] {
  background: #0b0c12; padding: 1px 4px; z-index: 2;
}

/* The radar is a square 1024x1024 texture and the drawn map occupies a
 * different sub-rectangle of it on every map — Nuke is a 1.91:1 strip using
 * less than half the height, Ancient is 0.87:1. Dots are placed as a percentage
 * of the image's own square coordinate space, so this box stays square and the
 * template supplies the width/left/top that frame the right region. Those come
 * from render.radar_crop(), which measures each PNG's alpha bounds.
 */
.radarbox { position: absolute; aspect-ratio: 1; }

/* Rows and cards carry an inline `display:grid`/`display:flex`, and the
 * responsive block below re-declares display with !important on the same
 * one-attribute specificity. `[hidden]:not(:root)` raises this to two, so it
 * wins wherever it sits in the file — without it the clips filter sets the
 * attribute and nothing moves. */
[hidden]:not(:root) { display: none !important; }

[data-act] { cursor: pointer; }
[data-act]:focus-visible, a:focus-visible { outline: 2px solid #ff4306; outline-offset: 2px; }

#toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); background: #13151d;
         border: 1px solid #ff4306; color: #f2f4fa; font-family: 'JetBrains Mono', monospace;
         font-size: 12px; padding: 12px 20px; z-index: 99; }
#toast[hidden] { display: none; }

/* ------------------------------------------------------------ responsive */

/* The reference is drawn at exactly 1440. Below that — but before the sidebar
 * collapses — the seven-column match table sets the left column's min-content
 * width and shoves the 380px sidebar past the viewport edge. Tighten its
 * columns rather than let the page scroll sideways on a laptop. */
@media (max-width: 1400px) {
  [style*="grid-template-columns:110px 130px 100px 90px 130px 70px 1fr"] {
    grid-template-columns: 92px 108px 92px 66px 106px 56px 1fr !important;
    gap: 0 10px !important;
  }
}

@media (max-width: 1100px) {
  .page { padding: 0 24px; }

  /* Four nav groups stop fitting well before the layout does. */
  .nav { height: auto; flex-wrap: wrap; gap: 12px 16px; padding: 14px 0; }
  .tabs { order: 3; flex-basis: 100%; overflow-x: auto; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { white-space: nowrap; }
  .me { margin-left: auto; }

  /* Flex and grid children default to min-width:auto, which makes a child wide
   * enough to overflow its parent instead of scrolling inside it. Every
   * horizontal-scroll rule below depends on this. */
  [style*="display:flex"] > *, [style*="display:grid"] > * { min-width: 0; }

  /* Except a child that has declared it will not wrap. Shrinking one of those
   * below its own text paints it across whatever sits beside it, which is the
   * overflow the rule above exists to prevent. */
  [style*="display:flex"] > [style*="white-space:nowrap"],
  [style*="display:grid"] > [style*="white-space:nowrap"] { min-width: max-content; }

  /* Sidebar layouts stack; the sidebar is supporting detail everywhere it appears. */
  [style*="grid-template-columns:1fr 380px"],
  [style*="grid-template-columns:1fr 340px"],
  [style*="grid-template-columns:2fr 1fr"] { grid-template-columns: 1fr !important; }
  [style*="grid-template-columns:repeat(5,1fr)"] { grid-template-columns: repeat(2, 1fr) !important; }

  /* Dense tables keep their columns and scroll sideways — collapsing them
   * would break the row-to-row comparison they exist for. */
  [style*="grid-template-columns:110px 130px"] { min-width: 620px; }
  [style*="grid-template-columns:1fr 80px 80px 90px 90px"] { min-width: 520px; }
  /* The tariff table is emitted with one column per tier, so its track list is
   * `1.4fr repeat(N,1fr)` — matching on the prefix keeps this rule correct if a
   * fourth tier ever appears. */
  [style*="grid-template-columns:1.4fr 1fr 1fr 1fr"],
  [style*="grid-template-columns:1.4fr repeat("] { min-width: 480px; }
  [style*="grid-template-columns:96px 110px 1fr 60px"] { min-width: 440px; }
  div:has(> [style*="grid-template-columns:110px 130px"]),
  div:has(> [style*="grid-template-columns:1fr 80px 80px 90px 90px"]),
  div:has(> [style*="grid-template-columns:1.4fr 1fr 1fr 1fr"]),
  div:has(> [style*="grid-template-columns:1.4fr repeat("]),
  div:has(> [style*="grid-template-columns:96px 110px 1fr 60px"]) { overflow-x: auto; }

  /* Round strip: 16 tiles never fit a narrow column. */
  [style*="display:flex;gap:6px;margin-top:20px"] { overflow-x: auto; padding-bottom: 6px; }
  [style*="display:flex;gap:6px;margin-top:20px"] > * { flex: 0 0 auto; }
}

@media (max-width: 860px) {
  [style*="grid-template-columns:repeat(3,1fr)"],
  [style*="grid-template-columns:repeat(4,1fr)"] { grid-template-columns: repeat(2, 1fr) !important; }
  [style*="grid-template-columns:1fr 1fr"] { grid-template-columns: 1fr !important; }
}

@media (max-width: 760px) {
  .page { padding: 0 16px; }
  .me > div:last-child { display: none; }

  /* Column counts that only read at desktop width. */
  [style*="grid-template-columns:repeat(3,1fr)"],
  [style*="grid-template-columns:repeat(4,1fr)"],
  [style*="grid-template-columns:repeat(5,1fr)"] { grid-template-columns: 1fr !important; }

  /* Rating chart: seven bars at gap:24px overflow; tighten instead of scrolling
   * so the median and average guide lines stay comparable across all seven. */
  [style*="align-items:flex-end;gap:24px;height:200px"] { gap: 6px !important; padding: 0 !important; }

  h1 { font-size: 26px !important; }
  [style*="font-size:72px"] { font-size: 52px !important; }
  [style*="font-size:44px"] { font-size: 34px !important; }
  [style*="font-size:36px"] { font-size: 30px !important; }
  [style*="padding:36px 40px"] { padding: 24px 20px !important; }
  [style*="padding:28px"] { padding: 20px !important; }

  /* Clip rows restack instead of scrolling: the meta line is the row's point,
   * and side-scrolling truncates it mid-word. Thumb + type + duration share the
   * first line; the description takes the full width below. */
  [style*="grid-template-columns:96px 110px 1fr 60px"] {
    display: flex !important; flex-wrap: wrap; align-items: center;
    min-width: 0 !important; gap: 12px !important;
  }
  [style*="grid-template-columns:96px 110px 1fr 60px"] > :nth-child(1) { flex: 0 0 96px; }
  [style*="grid-template-columns:96px 110px 1fr 60px"] > :nth-child(3) { flex: 1 1 100%; order: 4; }
  [style*="grid-template-columns:96px 110px 1fr 60px"] > :nth-child(4) { margin-left: auto; }

  /* Icon-then-text rows: once the text wraps to several lines, align-items:center
   * floats the map icon down beside the middle line. Pin it to the first line. */
  [style*="display:flex;align-items:center;gap:8px"] { align-items: flex-start !important; }
  [style*="display:flex;align-items:center;gap:8px"] > img { margin-top: 1px; flex: 0 0 auto; }

  /* Header rows that put a title beside a status chip. */
  [style*="justify-content:space-between;align-items:flex-end"] { flex-wrap: wrap; gap: 12px; }
  [style*="display:flex;gap:12px"] { flex-wrap: wrap; }

  /* The three ulash steps carry an inline flex:1, i.e. flex-basis:0, so they
   * divide 328px into three ~99px boxes and each clips its own label. A basis
   * wide enough for the label puts two on a row and the third below. */
  [style*="padding:14px 16px;display:flex;align-items:center;gap:12px"] {
    flex-basis: 150px !important;
  }

  /* Auth-code field beside its "open Steam" button: the field is flex:1, so
   * wrapping alone leaves it squeezed next to the button. Give it a full row
   * and drop the button's alignment offset. */
  [style*="display:flex;gap:16px;margin-top:18px"] { flex-wrap: wrap; }
  /* The field carries an inline `flex:1`, i.e. flex-basis:0 — it beats a plain
   * flex-basis here, so this declaration has to be important to force the wrap. */
  [style*="display:flex;gap:16px;margin-top:18px"] > :first-child { flex: 1 1 100% !important; }
  [style*="display:flex;gap:16px;margin-top:18px"] > :last-child { margin-top: 0 !important; }
}

/* ------------------------------------------------------ replay on a phone */

@media (max-width: 1100px) {
  .replay-grid { grid-template-columns: 1fr !important; }
}

@media (max-width: 760px) {
  /* Play, scrubber and clock stay on one row — the scrubber is the control you
   * actually drag, so it keeps the width. Speed drops underneath. */
  .replay-controls { flex-wrap: wrap; gap: 10px 12px !important; padding: 14px 16px !important; }
  .replay-controls [data-play]  { order: 1; }
  .replay-controls [data-scrub] { order: 2; flex: 1 1 auto !important; min-width: 120px; }
  .replay-controls [data-clock] { order: 3; min-width: 0 !important; }
  .replay-controls [data-speed] { order: 4; align-self: flex-start; }
  /* Without this the wrapped speed group stretches to the row's full height. */
  .replay-controls [data-speed] > span { min-height: 34px; padding: 6px 14px !important; }

  /* Round buttons are a tap target, not a label. */
  [data-round] > span { width: 38px !important; height: 38px !important; }
}

/* Small controls need a fingertip-sized hit area. Apple's floor is 44px. This
 * only touches the genuinely small ones — padding the nav or a full-width
 * button instead stretches the design out of shape, which an earlier, broader
 * version of this rule did. */
@media (hover: none) and (pointer: coarse) {
  [data-rate] { min-width: 44px; min-height: 40px; }
  [data-chip] { min-height: 40px; display: inline-flex; align-items: center; }
  [data-scrub] { height: 32px; }
  /* A range thumb is a few pixels wide by default. */
  [data-scrub]::-webkit-slider-thumb { width: 22px; height: 22px; }
  [data-scrub]::-moz-range-thumb { width: 22px; height: 22px; }
}

/* generated from style-hover attributes */
.hv1:hover{background:#ff6a35;}
.hv2:hover{border:1px solid #444c5e;}
.hv3:hover{background:#191d27;}
.hv4:hover{background:#2c2016;}
.hv5:hover{background:#1f242e;}
.hv6:hover{color:#f2f4fa;}
.hv7:hover{filter:brightness(1.45);}
