/* ATOM City 0.3.1 (18 Nov 2026): the room picker and play with friends (city/rooms.js). The city's flat look carried
   over from city.css (solid colours, square corners, hard offset shadows, its colour names). Three places: the room chip
   in the HUD, the room button and the picker in the title card (between the nickname and Start), and the picker in the
   game's panel. Nothing scrolls sideways at 360 px. */

/* ---------------------------------------------------------------- the room chip in the HUD: a door and the room's number,
   or a heart and the code in a friends' room (the code hides on narrow phones; the picker shows it) */
.chip-room { gap: 4px; padding: 0 8px; }
.chip-room b { font-variant-numeric: tabular-nums; }
.chip-room-ico { display: flex; }
.chip-room .ico-heart { display: none; }
.chip-room.friends .ico-door { display: none; }
.chip-room.friends .ico-heart { display: block; }
.chip-room.friends b { font-size: 12px; letter-spacing: .3px; }
/* phones up to 479 px wide (0.3.2 review: it was 379 px): the top row holds points, tasks, the room, sound and online.
   The room chip gets small (40 px at least, to tap), and the points and online chips show only their numbers (the LIVE
   line still says "samples" when there is no room). With the room chip added, the row could be wider than the screen
   from 380 to 439 px (iPhone 12 to 16 and many Androids), cutting the online chip off at the edge: with a bigger
   points total, in a friends' room, or while the "+n" of new points shows; up to 479 px in a friends' room with that
   "+n" (layout sums with the fonts' own widths, 18 Nov 2026; no browser). */
@media (max-width: 479px) {
  .chip-room { padding: 0 5px; gap: 3px; min-width: 40px; justify-content: center; }
  .chip-room .ico { width: 15px; height: 15px; }
  .chip-room.friends b { display: none; }
  .chip-online small { display: none; }
  .chip-points .chip-word { display: none; }
}

/* ---------------------------------------------------------------- the title */
.rooms-title { align-self: center; width: 100%; max-width: 420px; margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.rooms-pick {
  display: flex; align-items: center; gap: 8px; width: 100%; min-height: 46px; padding: 4px 12px; margin: 0;
  background: rgba(255, 255, 255, .1); color: var(--snow); border: 3px solid rgba(255, 255, 255, .55); border-radius: 0;
  font-family: var(--f-ui); text-align: left; cursor: pointer;
}
.rooms-pick[aria-expanded="true"] { background: var(--snow); color: var(--navy); border-color: var(--snow); }
.rooms-pick-k { flex: none; font-size: 12px; font-weight: 700; line-height: 1.7; opacity: .8; }
.rooms-pick-v { flex: 1; min-width: 0; font-size: 15px; font-weight: 800; line-height: 1.6; }
.rooms-pick-go { flex: none; font-size: 13px; font-weight: 800; line-height: 1.7; color: var(--lime); white-space: nowrap; }
.rooms-pick[aria-expanded="true"] .rooms-pick-go { color: var(--royal); }
.rooms-invited { margin: 0; padding: 4px 10px; background: var(--lime); color: var(--navy); font-size: 13px; font-weight: 700; line-height: 1.75; }
.rooms-inline { padding: 8px 10px 10px; background: var(--snow); color: var(--navy); border: 3px solid var(--navy); box-shadow: 4px 4px 0 var(--lime);
  scroll-margin-bottom: calc(80px + var(--safe-b, 0px)); } /* 0.3.3: rooms.js reveal() keeps the opened box above the sticky Start button (54 px, 10 px up) */

/* ---------------------------------------------------------------- the picker (the title's box and the game's panel) */
/* 0.3.6 brand (the review: "Use only these colour codes", Brand Book PDF 33): the note box Breeze Blue (the book's
   colour for info boxes), a full room's edge Bright Slate (its own colour: flat, as it cannot be chosen), the empty rooms'
   edges Social Blue (the book's colour for borders), the link's box white with a Bright Slate edge, the code box's hint
   Dark Blue (the second lines' colour) */
.rooms-box { display: flex; flex-direction: column; gap: 8px; text-align: center; }
.panel-body .rooms-text, .panel-body .rooms-now { margin-top: 4px; }
.rooms-text { margin: 0; font-size: 14px; font-weight: 600; line-height: 1.8; }
.rooms-now { margin: 0; font-size: 14px; font-weight: 800; line-height: 1.8; color: var(--royal); }
.rooms-head { margin: 4px 0 0; font-size: 13px; font-weight: 800; line-height: 1.7; }
.rooms-note { margin: 0; padding: 6px 8px; background: var(--ice); color: var(--dark); font-size: 12.5px; font-weight: 700; line-height: 1.75; }
.rooms-btn { width: 100%; flex-direction: column; gap: 0; min-height: 52px; padding: 4px 12px; background: #fff; }
.rooms-btn small { display: block; font-size: 11.5px; font-weight: 600; color: var(--dark); line-height: 1.5; }
.rooms-btn.on { background: var(--lime); }
.rooms-friends { background: var(--peach); }
.rooms-make, .rooms-share { background: var(--peach); }
/* 0.3.6 colours: words on peach are Deep Blue, the second line too (on Tasty Peach Dark Blue would be 3.80:1) */
.rooms-friends small, .rooms-make small, .rooms-share small { color: var(--navy); }
.rooms-back { background: var(--snow); }
/* 0.3.6 colours: pressed (city.css turns a pressed .btn Casual Green): a white choice goes Breeze Blue, peach keeps its
   colour (the book has no deeper peach; the press shows it), lime Casual Green */
.rooms-btn:active:not(:disabled) { background: var(--ice); }
.rooms-friends:active:not(:disabled), .rooms-make:active:not(:disabled), .rooms-share:active:not(:disabled) { background: var(--peach); }
.rooms-btn.on:active:not(:disabled), .rooms-join .rooms-btn:active:not(:disabled) { background: var(--lime-deep); }
/* the open rooms: a grid of numbers, as many columns as fit (4 on a 360 px phone, in the panel and on the title) */
.rooms-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 6px; }
.rooms-tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 0; min-height: 54px; padding: 3px 2px; margin: 0;
  background: #fff; color: var(--navy); border: 2px solid var(--navy); border-radius: 0; box-shadow: 2px 2px 0 var(--ink); cursor: pointer;
}
.rooms-tile b { font-family: var(--f-num); font-size: 19px; font-weight: 900; line-height: 1.15; }
.rooms-tile small { font-family: var(--f-ui); font-size: 11px; font-weight: 700; line-height: 1.6; color: var(--dark); white-space: nowrap; font-variant-numeric: tabular-nums; }
.rooms-tile:disabled { cursor: default; }
.rooms-tile.on, .rooms-tile.here { background: var(--lime); }
.rooms-tile.here small { color: var(--navy); }
.rooms-tile.full { background: var(--off); color: var(--off-text); border-color: var(--off); box-shadow: none; }
/* (0.3.3) the public rooms nobody is in yet (1 to 100 less the ones with players): small tiles with only their number,
   as many columns as fit (7 on a 360 px phone), so all of them take few rows; a tap opens the room */
.rooms-sub { margin: 2px 0 0; font-size: 12px; font-weight: 700; line-height: 1.7; color: var(--dark); }
.rooms-grid.rooms-empty { grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 4px; }
.rooms-empty .rooms-tile { min-height: 36px; padding: 2px 0; border-color: var(--social); box-shadow: none; }
.rooms-empty .rooms-tile b { font-size: 15px; }
.rooms-empty .rooms-tile.on { background: var(--lime); border-color: var(--navy); }
.rooms-make.wait { opacity: .75; cursor: progress; }
/* the friends' room: the code, the button that sends it, the link (always shown, to copy by hand) */
.rooms-code { display: flex; flex-direction: column; align-items: stretch; gap: 6px; padding: 8px; background: #fff; border: 2px solid var(--navy); }
.rooms-code-k { font-size: 12px; font-weight: 700; line-height: 1.6; color: var(--dark); }
.rooms-code-v {
  display: flex; justify-content: center; gap: 12px; font-family: var(--f-num); font-size: 34px; font-weight: 900; line-height: 1.1;
  letter-spacing: 3px; color: var(--royal); font-variant-numeric: tabular-nums; user-select: text; -webkit-user-select: text;
}
.rooms-code-note { margin: 0; font-size: 12px; font-weight: 600; line-height: 1.7; color: var(--dark); }
.rooms-said { margin: 0; padding: 3px 8px; background: var(--peach); color: var(--navy); font-size: 12.5px; font-weight: 700; line-height: 1.75; }
/* 16 px: a smaller box makes iPhones zoom in when it is tapped */
.rooms-link {
  width: 100%; height: 40px; padding: 0 8px; margin: 0; background: #fff; color: var(--navy); border: 2px solid var(--off); border-radius: 0;
  font-family: var(--f-num); font-size: 16px; font-weight: 600; outline: none;
  user-select: text; -webkit-user-select: text; -webkit-touch-callout: default;
}
.rooms-join { display: flex; gap: 6px; }
.rooms-code-in {
  flex: 1; min-width: 0; height: 48px; padding: 0 10px; margin: 0; background: #fff; color: var(--navy); border: 3px solid var(--navy); border-radius: 0;
  font-family: var(--f-num); font-size: 20px; font-weight: 800; letter-spacing: 2px; text-align: center; outline: none;
  user-select: text; -webkit-user-select: text; -webkit-touch-callout: default;
}
.rooms-code-in::placeholder { font-family: var(--f-ui); font-size: 14px; font-weight: 600; letter-spacing: 0; color: var(--dark); }
.rooms-code-in:focus { border-color: var(--royal); }
.rooms-join .rooms-btn { flex: none; width: auto; min-width: 84px; min-height: 48px; background: var(--lime); }
.rooms-err { margin: 0; padding: 2px 8px; background: var(--sweet); color: var(--navy); font-size: 12.5px; font-weight: 700; line-height: 1.75; }
