/* SHARED page style (stats) of 久远澪.com and hisame.live - was inline in /var/www/9on0/stats/index.html until
   2026-11-13. --s1/--s2 = chart series colours (久远澪's here; hisame.live: theme.css). Edit here, then
   /opt/site-style/bump-style.sh. */
  /* Room stats page (built 2026-11-10, public 2026-11-11).
     Data: data.json (/opt/room-stats/build.py, totals only). Script: app.js */
  :root {
    /* New site style (2026-11-11): shared colours, fonts, corners in /style.css; chart colours here */
    --grid: var(--line-soft);
    --s1: #4d7a26;   /* series: green (validated with --s2 on #fbfdf7) */
    --s2: #c9a227;   /* series: gold (deeper step of the set's #ffeba4) */
  }
  .wrap { max-width: 960px; margin: 0 auto; padding: 36px 16px 60px; }
  h1 { font-family: var(--serif); font-weight: 600;
       margin: 0; font-size: 34px; line-height: 1.25; letter-spacing: 1px; }
  header p { margin: 8px 0 0; color: var(--faint); font: 12.5px/1.5 var(--mono); }

  /* current numbers: one slim strip */
  .strip { display: flex; background: var(--card); border-radius: var(--r); box-shadow: 0 1px 2px rgb(var(--shadow-rgb) / .06); margin: 18px 0 6px; }
  .tile { flex: 1; padding: 10px 16px; min-width: 0; }
  .tile + .tile { border-left: 1px solid var(--grid); }
  .tile .k { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
  .tile .v { font: 500 20px/1.35 var(--mono); white-space: nowrap; }
  .tile .v small { font: 12px var(--sans); color: var(--muted); margin-left: 6px; }
  .tile .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; background: var(--faint); }
  .tile.live .dot { background: var(--accent); }   /* same as the home page live row (no red/pink) */

  h2 { font-family: var(--serif); font-weight: 600; font-size: 23px;
       margin: 34px 0 4px; letter-spacing: .5px; }
  h2 + .note { margin: 0 0 10px; color: var(--muted); font-size: 13px; }

  .controls { position: sticky; top: 0; z-index: 5; background: var(--bg); margin-top: 8px !important;
    padding: 10px 0; margin: 4px 0 4px;   /* no backdrop blur: costly to repaint on iPhones (11-12 lag) */
    border-bottom: 1px solid var(--line); display: flex; gap: 6px; }
  .controls button { font: inherit; font-size: 14px; color: var(--text); cursor: pointer;
    border: 1px solid var(--line); background: var(--card-solid); border-radius: var(--r); padding: 4px 12px;
    box-shadow: 0 1px 2px rgb(var(--shadow-rgb) / .06); }
  .controls button:hover { background: var(--accent-soft); }
  .controls button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--surface); }

  .card { background: var(--card); border-radius: var(--r); padding: 10px 14px 4px; margin: 10px 0;
          box-shadow: 0 1px 2px rgb(var(--shadow-rgb) / .06); }
  .chart { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
  /* 房间观众: picture of the recording at the hovered moment (laptops; app.js thumbHover, 2026-11-19) */
  .vthumb { position: absolute; pointer-events: none; border-radius: 6px; background-repeat: no-repeat;
            background-color: var(--card-solid); box-shadow: 0 2px 8px rgb(var(--shadow-rgb) / .25); }
  .chart .head { display: flex; justify-content: space-between; align-items: center; column-gap: 10px; flex-wrap: wrap; }
  .chart .title { font-weight: 600; font-size: 15px; line-height: 24px; }
  .chart .read { font: 12.5px/24px var(--mono); min-height: 24px; color: var(--muted); text-align: right; }
  .chart .read b { line-height: 1; }
  .chart .read b.slot { display: inline-block; min-width: 3ch; text-align: right; }
  .chart .read b.slot.none { text-align: center; color: var(--muted); }
  .chart .read b { color: var(--text); font-size: 14px; font-weight: 500; }
  .legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin: 2px 0 0; }
  .legend i { display: inline-block; width: 16px; height: 0; border-top: 2px solid var(--s1); vertical-align: 4px; margin-right: 5px; }
  .legend i.dash { border-top-style: dashed; opacity: .7; }
  .legend i.box { width: 10px; height: 10px; border: 0; border-radius: 2px; vertical-align: -1px; }
  .legend i.faint { opacity: .45; }
  .legend i.band { width: 14px; height: 9px; border: 0; border-radius: 2px; background: var(--s1); opacity: .2; vertical-align: -1px; }
  .legend i.thin { border-top-width: 1px; opacity: .55; }
  .chart .read .rng { color: var(--muted); font-variant-numeric: tabular-nums; display: inline-block; text-align: left; white-space: pre; }
  .legend i.dotk { width: 8px; height: 8px; border: 0; border-radius: 50%; background: var(--s1); vertical-align: 0; }
  .subnote { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
  .hleft { display: flex; align-items: center; flex-wrap: wrap; }
  .vctl { display: inline-flex; align-items: center; gap: 12px; margin-left: 12px; vertical-align: middle; }
  .vctl select { font: inherit; font-size: 13px; color: var(--text); border: 1px solid var(--line); background-color: var(--card-solid);
                 border-radius: var(--r); padding: 4px 30px 4px 8px; background-position: right 10px center; box-shadow: 0 1px 2px rgb(var(--shadow-rgb) / .06); }
  .switch { font-size: 13px; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; white-space: nowrap; }
  .switch input { accent-color: var(--accent); width: 16px; height: 16px; margin: 0; }
  .controls .switch.fc { margin-left: auto; }   /* 预测 switch (11-14): right end of the range bar */
  svg { display: block; width: 100%; overflow: visible; touch-action: pan-y; }
  button, select, label.switch { touch-action: manipulation; }   /* no double-tap-zoom wait */
  svg text { font: 10.5px var(--mono); fill: var(--muted); }
  svg .grid { stroke: var(--grid); stroke-width: 1; }
  svg .future { fill: var(--accent-soft); opacity: .35; }
  svg .today { stroke: var(--line); stroke-width: 1; }
  svg text.flabel { font-size: 10.5px; fill: var(--muted); opacity: .8; }
  svg .cross { stroke: var(--muted); stroke-width: 1; opacity: .5; }
  .empty { font-size: 13px; color: var(--muted); display: flex; align-items: center; }
  details { margin: 4px 0 2px; font-size: 13px; color: var(--muted); }
  details summary { cursor: pointer; padding: 4px 0; }
  table { border-collapse: collapse; width: 100%; font: 12.5px var(--mono); margin: 4px 0 8px; color: var(--text); }
  th, td { text-align: right; padding: 3px 6px; border-bottom: 1px solid var(--grid); font-weight: normal; }
  th { color: var(--muted); }
  th:first-child, td:first-child { text-align: left; }

  footer { margin-top: 44px; }
  button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

  @media (max-width: 640px) {
    .wrap { padding: 22px 12px 50px; }
    h1 { font-size: 27px; }
    .strip { flex-wrap: wrap; }
    .tile { flex: 1 1 33%; padding: 8px 12px; }
    .tile:nth-child(4) { border-left: 0; }
    .tile:nth-child(n+4) { border-top: 1px solid var(--grid); }
    .tile .v { font-size: 19px; }
    .card { padding: 10px 10px 4px; }
    .chart.multi .head { display: block; }
    .chart.multi .read { text-align: left; min-height: 48px; }
    .vctl { margin: 4px 0 2px; display: flex; flex-basis: 100%; flex-wrap: wrap; row-gap: 6px; }
    #p-viewers .chart.multi .read { min-height: 24px; }
  }
