/* David's phone page (2026-11-09). His taste: real filled buttons (rectangular, slightly rounded), cards that read as cards —
   light grey on white, never white-on-white with a thin border. The top bar is dark like the status bar above it. */
:root {
  color-scheme: light;
  --page: #FFFFFF;
  --card: #EBEBF0;
  --inner: #D8D8DC;
  --button: #D2D2D8;
  --button-press: #BDBDC4;
  --text: #0E2C36;
  --text-2: #3D6470;
  --bar: #141414;
  --bar-text: #FFFFFF;
  --bar-text-2: #B9BFC8;
  --public: #1D7A4F;
  --public-text: #FFFFFF;
  --private: #AE3020;
  --private-text: #FFFFFF;
  --commit: #38803A;
  --accent: #18859C;
  --caution: #8A5F00;
  --field: #FFFFFF;
  --field-edge: #8FA9B2;
  --radius: 8px;
  --radius-small: 6px;
  --gap: 12px;
  --side: max(16px, env(safe-area-inset-left), env(safe-area-inset-right));
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--text); font: 16px/1.4 var(--font); overflow-x: hidden; }
button { font: inherit; color: inherit; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

/* 2026-11-09, 22:10: a slim bar — Hop bigger on the left (his light is Studio's), RenderRoam and Studio's line on ONE line */
.top { background: var(--bar); color: var(--bar-text); padding: calc(env(safe-area-inset-top) + 2px) var(--side) 2px; position: sticky; top: 0; z-index: 5; }
.top-row { display: flex; align-items: center; gap: 10px; min-height: 44px; min-width: 0; }
.top-hop { width: 36px; height: 44px; flex: none; margin: -2px 0; }
.top-hop svg { width: 100%; height: 100%; display: block; }
.top h1 { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: 0.01em; flex: none; }
.top-studio { margin: 0; font-size: 13px; color: var(--bar-text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.top-studio.is-off { color: #FFD27A; }

main { padding: 12px var(--side) calc(env(safe-area-inset-bottom) + 32px); max-width: 1100px; margin: 0 auto; }
.tools { display: grid; gap: 10px; margin-bottom: 8px; }
.tools input { width: 100%; font: inherit; font-size: 16px; padding: 10px 12px; border-radius: var(--radius-small); border: 1px solid var(--field-edge); background: var(--field); color: var(--text); }
.tools-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; }
.seg { display: inline-flex; background: var(--card); border-radius: var(--radius); padding: 3px; gap: 2px; }
.seg button { padding: 7px 10px; border-radius: var(--radius-small); background: transparent; font-size: 14px; font-weight: 600; color: var(--text-2); min-height: 36px; }
.seg button[aria-pressed="true"] { background: var(--text); color: #FFFFFF; }

.group { margin-top: 14px; }
.group-head { display: flex; width: 100%; align-items: center; gap: 8px; padding: 10px 12px; background: var(--card); border-radius: var(--radius); font-weight: 700; font-size: 16px; text-align: left; min-height: 44px; }
.group-head .count { margin-left: auto; font-weight: 600; color: var(--text-2); font-size: 14px; }
.group-head .chev { width: 14px; display: inline-block; transition: transform 0.15s; }
.group-head[aria-expanded="false"] .chev { transform: rotate(-90deg); }
.group-body { margin-top: 10px; display: grid; gap: var(--gap); }
.group-body.is-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.group-body.is-list { gap: 8px; }
@media (min-width: 760px) {
  .group-body.is-big { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .group-body.is-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.tour { background: var(--card); border-radius: var(--radius); overflow: hidden; min-width: 0; display: flex; flex-direction: column; }
.tour .photo { aspect-ratio: 16 / 9; background: var(--inner); display: block; width: 100%; object-fit: cover; }
.tour.is-grid .photo { aspect-ratio: 1 / 1; }
.tour-body { padding: 10px 12px 12px; display: grid; gap: 8px; min-width: 0; }
.tour.is-grid .tour-body { padding: 8px 8px 10px; gap: 6px; }
.tour-name { margin: 0; font-size: 17px; font-weight: 700; overflow-wrap: anywhere; }
.tour.is-grid .tour-name { font-size: 15px; }
.tour-actions { display: flex; gap: 8px; align-items: center; }
.tour-actions .pill { flex: 1; }
.tour.is-big .tour-actions .pill { flex: 0 1 auto; }

.light { display: flex; align-items: center; gap: 6px; min-height: 30px; font-size: 14px; color: var(--text-2); min-width: 0; }
.light .hop { width: 22px; height: 28px; flex: none; }
.light .hop svg { width: 100%; height: 100%; display: block; }
.light span { overflow-wrap: anywhere; }
.light[data-light="needs"] span { color: var(--caution); font-weight: 600; }
.tour.is-grid .light { font-size: 13px; }

.pill { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: var(--radius-small); font-weight: 700; font-size: 15px; }
.pill svg { width: 18px; height: 18px; flex: none; }
.pill.is-public { background: var(--public); color: var(--public-text); }
.pill.is-private { background: var(--private); color: var(--private-text); }
.pill.is-pending { background: var(--button); color: var(--text-2); }
.pill:disabled { opacity: 0.55; }
.more { min-width: 48px; min-height: 40px; border-radius: var(--radius-small); background: var(--button); font-size: 20px; font-weight: 800; line-height: 1; letter-spacing: 1px; }
.more:active, .seg button:active, .sheet button:active { filter: brightness(0.92); }
.note { font-size: 13px; color: var(--text-2); margin: 0; }
.note.is-off { color: var(--caution); font-weight: 600; }

.tour.is-list { flex-direction: row; align-items: center; gap: 10px; padding: 8px; }
.tour.is-list .photo { width: 64px; height: 64px; aspect-ratio: auto; border-radius: var(--radius-small); flex: none; }
.tour.is-list .tour-body { padding: 0; gap: 2px; flex: 1; }
.tour.is-list .tour-name { font-size: 15px; }
.tour.is-list .views { font-size: 13px; color: var(--text-2); }
.tour.is-list .tour-actions { flex: none; flex-direction: column; gap: 6px; align-items: stretch; }
.tour.is-list .pill { min-height: 34px; padding: 0 10px; font-size: 14px; }
.tour.is-list .more { min-height: 34px; }
.tour.is-list .light { min-height: 22px; font-size: 13px; }
.tour.is-list .light .hop { width: 16px; height: 20px; }

.empty, .nokey { color: var(--text-2); text-align: center; margin: 32px 8px; }
.nokey h2 { color: var(--text); }

.sheet-back { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.45); z-index: 20; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 21; background: var(--page); border-radius: 14px 14px 0 0; padding: 16px var(--side) calc(env(safe-area-inset-bottom) + 16px); max-height: 85vh; overflow-y: auto; display: grid; gap: 10px; max-width: 560px; margin: 0 auto; }
.sheet h2 { margin: 0 0 2px; font-size: 18px; overflow-wrap: anywhere; }
.sheet p { margin: 0; color: var(--text-2); font-size: 15px; }
.sheet .act { width: 100%; min-height: 48px; border-radius: var(--radius-small); background: var(--button); font-weight: 700; font-size: 16px; text-align: left; padding: 0 14px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sheet .act small { font-weight: 600; color: var(--text-2); font-size: 14px; }
.sheet .act.is-commit { background: var(--commit); color: #FFFFFF; }
.sheet .act.is-commit small { color: #E3F2E3; }
.sheet .act.is-destroy { background: var(--private); color: #FFFFFF; }
.sheet .act.is-quiet { background: var(--card); justify-content: center; }
.sheet .row { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--card); border-radius: var(--radius-small); padding: 8px 8px 8px 14px; min-height: 52px; }
.sheet .row b { font-size: 16px; }
.sheet .row .seg { background: var(--inner); }
.sheet .views { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sheet .views div { background: var(--card); border-radius: var(--radius-small); padding: 10px 14px; }
.sheet .views b { display: block; font-size: 24px; }
.sheet .views span { font-size: 13px; color: var(--text-2); }
.sheet .qr { background: #FFFFFF; padding: 8px; border-radius: var(--radius-small); width: min(260px, 70vw); justify-self: center; display: block; }
.sheet .two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sheet .two .act { justify-content: center; text-align: center; }

.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(env(safe-area-inset-bottom) + 18px); z-index: 30; background: var(--bar); color: var(--bar-text); padding: 10px 16px; border-radius: var(--radius); font-size: 15px; max-width: calc(100vw - 32px); box-shadow: none; }
.sheet a.act { text-decoration: none; color: inherit; }

/* the ••• panel's Edit, the editing sheets and the report (2026-11-09, 22:10) */
.sheet .edit-head { margin: 6px 0 0; font-size: 14px; font-weight: 700; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.04em; }
.sheet .rooms { display: grid; gap: 6px; }
.sheet .room { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 6px; align-items: center; background: var(--card); border-radius: var(--radius-small); padding: 6px; }
.sheet .room input { font: inherit; font-size: 16px; min-width: 0; width: 100%; padding: 8px 10px; border: 1px solid var(--field-edge); border-radius: var(--radius-small); background: var(--field); color: var(--text); }
.sheet .room button { min-width: 44px; min-height: 44px; border-radius: var(--radius-small); background: var(--button); font-size: 18px; font-weight: 800; }
.sheet .room .code { grid-column: 1 / -1; font-size: 12px; color: var(--text-2); padding: 0 4px; }
.sheet .pick { width: 100%; min-height: 48px; border-radius: var(--radius-small); background: var(--card); text-align: left; padding: 0 14px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
.sheet .pick[aria-pressed="true"] { background: var(--text); color: #FFFFFF; }
.report-view { display: grid; gap: 12px; }
.report-view .bar-row { display: flex; gap: 8px; align-items: center; }
.report-view .bar-row h2 { margin: 0; font-size: 20px; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.report-view .back { min-height: 44px; padding: 0 14px; border-radius: var(--radius-small); background: var(--button); font-weight: 700; }
.report-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.report-actions button { min-height: 48px; border-radius: var(--radius-small); background: var(--button); font-weight: 700; font-size: 15px; padding: 0 6px; }
.report-actions button[data-report-act="share"] { background: var(--commit); color: #FFFFFF; }
.report { display: grid; gap: 10px; }
.report h3 { margin: 10px 0 0; font-size: 16px; }
.r-big { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.r-big div { background: var(--card); border-radius: var(--radius); padding: 12px; }
.r-big b { display: block; font-size: 32px; line-height: 1.1; }
.r-big span { font-size: 14px; color: var(--text-2); }
.r-note, .r-none { margin: 0; font-size: 13px; color: var(--text-2); }
.r-cols { display: flex; align-items: flex-end; gap: 2px; height: 120px; background: var(--card); border-radius: var(--radius); padding: 10px 10px 0; }
.r-cols i { flex: 1; height: var(--h); min-height: 2px; background: var(--accent); border-radius: 2px 2px 0 0; }
.r-axis { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-2); }
.r-bars { display: grid; gap: 6px; background: var(--card); border-radius: var(--radius); padding: 10px; }
.r-bar { display: grid; grid-template-columns: minmax(0, 9fr) minmax(0, 8fr) auto; gap: 8px; align-items: center; font-size: 14px; }
.r-bar span { overflow-wrap: anywhere; }
.r-bar i { display: block; height: 12px; width: var(--w); min-width: 2px; background: var(--accent); border-radius: 2px; }
.r-bar b { font-variant-numeric: tabular-nums; }
body.is-report-page main { padding-top: 16px; }
@media print {
  .top, .tools, #tours, .report-actions, .report-view .back, .toast, .sheet, .sheet-back { display: none !important; }
  .report-view { display: grid !important; }
  body { background: #FFFFFF; }
}
.sheet .views.is-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mark-own { margin: 24px 4px 0; font-size: 13px; color: var(--text-2); }
.mark-own a { color: var(--accent); font-weight: 600; }
