/* ============================================================
   IILM Room Finder — contemporary, confident, no chrome-soup
   ============================================================ */

:root{
  --ink: #0b0c10;
  --ink-soft: #0b0c10;
  --ink-faint: #0b0c10;

  --paper: #ffffff;
  --paper-raised: #ffffff;
  --panel: #f5f5f7;
  --panel-deep: #ebebef;
  --line: #e3e3e8;
  --line-soft: #edEDf1;

  --accent: #9a4f74;
  --accent-ink: #ffffff;
  --accent-soft: #f6e9f0;
  --accent-tint: #faf1f6;
  --accent-tint-line: #ecd6e3;

  --deep: #33203c;
  --deep-wash: linear-gradient(142deg, #221a3c 0%, #3a1f3e 52%, #4d2438 100%);
  --deep-alt: #1b3348;
  --deep-alt-wash: linear-gradient(142deg, #10333f 0%, #1a3352 52%, #2c2f5e 100%);
  --tint-alt: #e9f3f1;
  --tint-alt-line: #c9e0db;
  --deep-line: rgba(255,255,255,0.17);
  --deep-soft: rgba(255,255,255,0.10);
  --deep-ink: #ffffff;

  --free: #0a7d54;
  --free-tint: #e8f4ec;
  --free-line: #c4e0ce;

  /* The block that reads your own schedule sits in warm ochre, so it is not
     mistaken for one more free room in the green grid below it. */
  --pick: #8a6512;
  --pick-tint: #f9f1de;
  --pick-line: #e6d3a4;

  /* Confessions get their own colour too — periwinkle, so the box you type
     into does not read as one more inactive field. */
  --say: #4a3fa0;
  --say-tint: #eeecfa;
  --say-line: #d3cdf0;
  --occupied-bg: #14151c;
  --occupied: #ffffff;
  --occupied-dot: #e14a3a;

  --radius-sm: 5px;
  --radius: 5px;
  --radius-lg: 5px;

  --shadow-sm: 0 1px 2px rgba(11,12,16,0.06);
  --shadow-md: 0 8px 24px -8px rgba(11,12,16,0.18);

  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Newsreader", Georgia, "Times New Roman", serif;
  --font-mono: var(--font-body);
  /* Poppins is here for one thing: the Garba night feature, which wanted a
     rounder, warmer letter than the rest of the app is set in. */
  --font-poppins: "Poppins", var(--font-body);
}

/* Always light — no system dark-mode auto-switch. */

*, *::before, *::after{ box-sizing: border-box; }
html{
  -webkit-text-size-adjust: 100%;
  /* No pull-to-refresh. The spinner at the top of a drag is the browser
     announcing itself, which is exactly what an app should not do — and the
     data reloads on its own anyway. */
  overscroll-behavior-y: contain;
}
body{
  margin: 0;
  overscroll-behavior-y: contain;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  min-height: 100vh;
}
svg{ display: block; }
[hidden]{ display: none !important; }

/* ---------- app shell ---------- */
.app{
  max-width: 860px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  /* Measured from the bar itself at runtime, so nothing can end up underneath
     it when the bar's height changes. The fallback covers the first paint. */
  padding-bottom: calc(var(--tabbar-space, 78px) + 14px);
}

.topbar{
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px 10px;
}
.brand-logo{ height: 40px; width: auto; display: block; flex-shrink: 0; }
/* Both header buttons sit together in the right corner, so whichever of them
   is showing, the pair stays put rather than one drifting into the middle. */
.topbar-actions{ display:flex; align-items:center; gap: 2px; margin-left: auto; }
.profile-btn{
  flex-shrink: 0;
  width: 40px; height: 40px; display:grid; place-items:center;
  border: none; background: none; color: var(--ink); cursor: pointer; padding: 0;
}
.profile-btn svg{ width: 31px; height: 31px; }
.profile-btn:active{ opacity: .6; }
.greeting{
  margin: 0;
  /* Set to the crest's height so the two read as one mark, in Inter's display
     cut. The weight already closes the counters, so the tracking stays open
     rather than negative — tight tracking on heavy type just fills the gaps. */
  font-family: var(--font-body); font-size: 29px; line-height: 40px; font-weight: 800;
  font-variation-settings: "opsz" 32;
  letter-spacing: 0.005em; color: var(--ink);
}
.greeting span{
  display: inline-block; margin-left: 4px;
  font-size: 24px; vertical-align: 2px;
}
.now-line{
  display:flex; flex-direction: column; gap: 5px;
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  color: var(--ink);
  margin: 16px 0 4px;
}
.now-date{ font-weight: 500; }
.now-time{ font-family: var(--font-display); font-size: 19px; }

main{ flex: 1; padding: 14px 10px; display: flex; flex-direction: column; }

.view{ display: none; }
.view.active{ display: block; }

/* ---------- section heading ---------- */
.page-title{
  font-family: var(--font-display);
  font-size: 21px; font-weight: 500; letter-spacing: -0.01em;
  margin: 2px 0 12px; color: var(--ink);
}
.eyebrow{
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.01em;
  color: var(--accent);
  font-weight: 500;
}
.section-head h2{
  font-family: var(--font-display);
  font-size: 25px;
  margin: 3px 0 0;
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* ---------- My Batch tab ---------- */

/* the profile card: title, current batch, live status, batch picker */
.profile-card{
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; margin-bottom: 12px;
  background: var(--paper);
}
.profile-inner{
  border: 1px solid var(--deep); border-radius: var(--radius);
  background: var(--deep-wash);
  color: var(--deep-ink);
  padding: 16px 14px;
}
.profile-inner .profile-card-name,
.profile-inner .now-line{ color: var(--deep-ink); }
.profile-inner .picker-trigger{
  background: var(--deep-soft); border-color: var(--deep-line); color: var(--deep-ink);
}
.profile-inner .picker-trigger:hover{ background: rgba(255,255,255,0.17); }
/* The three shortcuts stay white on the coloured panel, black type and icons. */
.profile-inner .quick-actions button{
  background: var(--paper); border-color: var(--paper); color: var(--ink);
}
.profile-inner .quick-actions button:hover{ background: var(--panel); }

/* The Timetable tab is a lookup, not an identity — no panel, no clock. The
   type switch sits on the page itself and the name reads as a heading. */
.type-switch{ display:flex; gap: 4px; margin-bottom: 14px; }
.type-switch button{
  flex: 1; min-width: 0;
  display:flex; flex-direction: column; align-items:center; gap: 8px;
  font-family: var(--font-body); font-size: 12px; font-weight: 500;
  padding: 11px 6px; border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--paper); color: var(--ink); cursor: pointer;
}
.type-switch button svg{ width: 18px; height: 18px; flex-shrink: 0; }
.type-switch button span{ overflow:hidden; text-overflow: ellipsis; white-space: nowrap; }
.type-switch button:hover{ background: var(--panel); }
.type-switch button.on{ background: var(--deep-alt); border-color: var(--deep-alt); color: var(--deep-ink); }

.lookup-head{
  display:flex; align-items:center; justify-content: space-between; gap: 10px;
  padding: 14px; margin-bottom: 12px;
  border: 1px solid var(--tint-alt-line); border-radius: var(--radius);
  background: var(--tint-alt);
}
.lookup-head h2{
  font-family: var(--font-display); font-size: 25px; font-weight: 500;
  letter-spacing: -0.02em; color: var(--ink); margin: 0;
  overflow:hidden; text-overflow: ellipsis;
}
.lookup-head .icon-btn-swap{ color: var(--deep-alt); }
.batch-head{ display:flex; align-items:center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.batch-head .profile-card-title{ margin-bottom: 0; }
.batch-actions{ display:flex; align-items:center; gap: 8px; }
.icon-btn{
  width: 36px; height: 36px; flex-shrink: 0;
  display:grid; place-items:center;
  border-radius: 50%; border: none; cursor: pointer;
}
.icon-btn svg{ width: 18px; height: 18px; }
.icon-btn-remove{ background: none; color: #d92d20; }
.icon-btn-remove svg{ width: 21px; height: 21px; }
.icon-btn-swap{ background: none; color: var(--accent); }
.icon-btn-swap svg{ width: 22px; height: 22px; }
.icon-btn-add{ background: #1d4ed8; color: #fff; }
.profile-card-title{
  font-family: var(--font-display); font-size: 24px; letter-spacing: -0.01em;
  color: var(--ink); font-weight: 500; margin-bottom: 10px;
}
.profile-card-name{ font-family: var(--font-display); font-size: 25px; font-weight: 500; color: var(--ink); letter-spacing: -0.02em; }
.batch-name-row{ display:flex; align-items:center; justify-content: space-between; gap: 10px; }
.notify-btn{
  flex-shrink: 0;
  font-family: var(--font-body); font-size: 12px; font-weight: 500;
  padding: 8px 12px; border-radius: var(--radius);
  border: 1px solid var(--deep-line); background: var(--deep-soft); color: var(--deep-ink); cursor: pointer;
}
.notify-btn.on{
  width: 38px; height: 38px; padding: 0;
  display:grid; place-items:center; border-radius: 50%;
  background: var(--deep-ink); border-color: var(--deep-ink); color: var(--deep);
}
.notify-btn.on svg{
  width: 21px; height: 21px;
  transform-origin: 50% 16%;
  animation: bell-ring 4.5s ease-in-out infinite;
}
@keyframes bell-ring{
  0%, 86%, 100%{ transform: rotate(0deg); }
  89%{ transform: rotate(12deg); }
  92%{ transform: rotate(-10deg); }
  95%{ transform: rotate(6deg); }
  98%{ transform: rotate(-3deg); }
}
@media (prefers-reduced-motion: reduce){ .notify-btn.on svg{ animation: none; } }

.picker-row{ display:flex; gap: 8px; }
.picker-trigger{
  width: 100%;
  display:flex; align-items:center; justify-content: space-between; gap: 8px;
  font-family: var(--font-body); font-size: 13.5px; font-weight: 500; text-align: left;
  padding: 11px 12px; border-radius: var(--radius); border: 1px solid var(--accent-tint-line);
  background: var(--paper); color: var(--ink); cursor: pointer;
}
.picker-trigger span{ overflow:hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker-caret{ width: 12px; height: 12px; flex-shrink: 0; transition: transform .18s ease; }
.picker-trigger[aria-expanded="true"] .picker-caret{ transform: rotate(180deg); }
.btn-subscribe{
  flex-shrink: 0; font-family: var(--font-body); font-size: 13px; font-weight: 600;
  padding: 10px 18px; border-radius: var(--radius); border: none;
  background: var(--ink); color: var(--paper); cursor: pointer;
}
.btn-subscribe:disabled{ opacity: .35; cursor: default; }
.picker-footer{ padding: 10px 12px; border-top: 1px solid var(--line); }
.picker-footer .btn-subscribe{ width: 100%; }

.quick-actions{ display:grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 16px; }
.quick-actions button{
  display:flex; flex-direction: column; align-items: center; gap: 7px;
  font-family: var(--font-body); font-size: 11.5px; font-weight: 500; line-height: 1.25; text-align: center;
  padding: 12px 6px; border-radius: var(--radius); border: 1px solid var(--accent-tint-line);
  background: var(--paper); color: var(--ink); cursor: pointer;
}
.quick-actions button svg{ width: 20px; height: 20px; }
.quick-actions button:hover{ background: var(--panel); }
.profile-inner .quick-actions button.on{
  background: var(--deep-ink); border-color: var(--deep-ink); color: var(--ink);
}

/* the bar that comes down with the batches listed */
.picker-panel{
  margin-top: 8px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--paper); overflow: hidden;
  animation: slidedown .18s ease both;
}
@keyframes slidedown{ from{ opacity: 0; transform: translateY(-6px); } to{ opacity:1; transform:none; } }
.picker-search{
  width: 100%; font-family: var(--font-body); font-size: 13.5px;
  padding: 10px 12px; border: none; border-bottom: 1px solid var(--line);
  background: var(--paper); color: var(--ink);
}
.picker-search:focus{ outline: none; background: var(--panel); }
.picker-list{ max-height: 240px; overflow-y: auto; }
.picker-list button{
  display:flex; align-items:center; justify-content: space-between; gap: 10px;
  width: 100%; text-align:left; padding: 11px 12px;
  border: none; border-bottom: 1px solid var(--line-soft);
  background: none; font-family: var(--font-body); font-size: 13.5px; color: var(--ink); cursor: pointer;
}
.picker-list button:last-child{ border-bottom: none; }
.picker-list button:hover:not([disabled]){ background: var(--panel); }
.picker-list button.selected{ background: var(--ink); color: var(--paper); }
.picker-list button[disabled]{ cursor: default; }

.sheet-search{
  border: 1px solid var(--line) !important; border-radius: var(--radius); margin-bottom: 8px;
}
.sheet-list{
  max-height: 46vh; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden auto;
}
.picker-list .empty{ padding: 12px; font-size: 12.5px; color: var(--ink-faint); }


.batch-dots{ display:flex; justify-content:center; gap: 5px; margin-top: 10px; }
.batch-dots span{
  width: 6px; height: 6px; border-radius: 999px; background: var(--accent-tint-line);
  cursor: pointer; transition: width .2s ease, background .2s ease;
}
.batch-dots span.on{ width: 18px; background: var(--accent); }


.day-select-row{ display:flex; align-items:center; gap: 4px; margin-bottom: 12px; }
.pair-row{ display:flex; gap: 6px; margin-bottom: 14px; }
.pair-row .day-trigger{ flex: 1; min-width: 0; }
.day-trigger{
  flex: 1; min-width: 0;
  display:flex; align-items:center; justify-content: space-between; gap: 8px;
  font-family: var(--font-body); font-size: 13.5px; font-weight: 500; text-align: left;
  padding: 11px 14px; border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--paper-raised); color: var(--ink); cursor: pointer;
}
.day-trigger span{ overflow:hidden; text-overflow: ellipsis; white-space: nowrap; }
.filter-btn{
  flex-shrink: 0; width: 40px; height: 40px;
  display:grid; place-items:center;
  border: none; background: none; color: var(--ink); cursor: pointer;
}
.filter-btn svg{ width: 22px; height: 22px; }

.week-nav{
  display:flex; align-items:center; justify-content: space-between; gap: 8px;
  margin-bottom: 12px; font-size: 13.5px; font-weight: 500; color: var(--ink);
}
.week-step{
  width: 34px; height: 34px; flex-shrink: 0;
  display:grid; place-items:center;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--paper); color: var(--ink); cursor: pointer;
}
.week-step svg{ width: 17px; height: 17px; }
.week-step[disabled]{ opacity: .25; cursor: default; }

.cal-grid{ display:grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-head{ margin-bottom: 6px; }
.cal-head span{ text-align:center; font-size: 11px; font-weight: 500; color: var(--ink); padding: 4px 0; }
.cal-cell{
  aspect-ratio: 1; display:grid; place-items:center;
  font-family: var(--font-body); font-size: 13.5px; font-weight: 500;
  font-variant-numeric: tabular-nums;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--paper); color: var(--ink); cursor: pointer; padding: 0;
}
.cal-cell.cal-blank{ border: none; background: none; }
.cal-cell.cal-off{ border-color: transparent; background: none; opacity: .3; cursor: default; }
.cal-cell.cal-today{ border-color: var(--accent); }
.cal-cell.on{ background: var(--deep); border-color: var(--deep); color: var(--deep-ink); }

.tt-slot.is-now{ border-color: var(--ink); border-width: 1.5px; }
/* The hour you are actually in, said plainly. The dot breathes so it reads as
   happening now rather than as one more label. */
.live-now{
  display:inline-flex; align-items:center; gap: 6px;
  font-family: var(--font-body); font-size: 12px; font-weight: 600;
  color: var(--free); margin-bottom: 7px;
}
.live-now i{
  width: 7px; height: 7px; border-radius: 50%; background: var(--free);
  animation: live-pulse 1.8s ease-in-out infinite;
}
@keyframes live-pulse{ 0%, 100%{ opacity: 1; } 50%{ opacity: .3; } }
@media (prefers-reduced-motion: reduce){ .live-now i{ animation: none; } }

/* ---------- status pill (room detail sheet) ---------- */
.status-pill{
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink-soft);
}

/* ---------- room chips / grids ---------- */
.block-group{ margin-bottom: 18px; }
.block-title{
  display:flex; align-items:baseline; gap: 8px; margin-bottom: 8px;
}
.block-title h3{
  font-family: var(--font-display); font-size: 18px; font-weight: 500; letter-spacing: -0.01em; margin: 0;
}

/* Only free rooms are listed, so every chip means the same thing — no dots, no
   wall of black boxes, and the tab's own green carries the meaning. */
.room-grid{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 6px;
}
.room-chip{
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  text-align: left;
  /* Most of these are a number. The science labs are a whole name, and it has
     to wrap inside the chip rather than run out the side of it. */
  line-height: 1.25;
  overflow-wrap: anywhere;
  padding: 12px 11px;
  border-radius: var(--radius);
  border: 1px solid var(--free-line);
  background: var(--free-tint);
  color: var(--ink);
  cursor: pointer;
}
.room-chip:hover{ border-color: var(--free); }
.room-chip:active{ opacity: .7; }

.vacant-none{ font-size: 13.5px; color: var(--ink); margin: 2px 0; }

/* The one room to walk to, before the full list of everything free. */
.vacant-prompt{
  padding: 14px; margin-bottom: 16px;
  border: 1px solid var(--pick-line); border-radius: var(--radius);
  background: var(--pick-tint);
}
.vacant-prompt p{ font-size: 13.5px; line-height: 1.45; color: var(--ink); margin: 0 0 12px; }
.vacant-prompt button{
  display: block; width: 100%;
  font-family: var(--font-body); font-size: 13px; font-weight: 600;
  padding: 12px 14px; border-radius: var(--radius);
  border: none; background: var(--ink); color: var(--paper); cursor: pointer;
}

/* Light, so it sits with the pale chips underneath instead of competing with
   the dark panels the other tabs use. */
.vacant-pick{
  padding: 14px; margin-bottom: 16px;
  border: 1px solid var(--pick-line); border-radius: var(--radius);
  background: var(--pick-tint);
  color: var(--ink);
}
.vacant-pick-top{ display:flex; align-items:center; justify-content: flex-end; margin-bottom: 10px; }
.vacant-pick-batch{
  flex-shrink: 0;
  display:flex; align-items:center; gap: 6px;
  font-family: var(--font-body); font-size: 12px; font-weight: 500;
  padding: 5px 9px 5px 10px; border-radius: var(--radius);
  border: 1px solid var(--pick-line); background: var(--paper);
  color: var(--ink); cursor: pointer;
}
.vacant-pick-batch svg{ width: 13px; height: 13px; color: var(--pick); }
.vacant-pick-rows:not(:empty){ margin-bottom: 10px; }
.vacant-pick-row{ font-size: 13.5px; line-height: 1.45; color: var(--ink); margin: 0 0 4px; }
.vacant-pick-row span{ font-weight: 600; margin-right: 6px; }
.vacant-pick-row span::after{ content: ":"; }
.vacant-pick-label{
  display: block;
  font-size: 13.5px; font-weight: 600; color: var(--ink);
}
.vacant-pick-label::after{ content: ":"; }
.vacant-pick-room{
  display:block; width: 100%; text-align: left; margin-top: 2px; padding: 0;
  border: none; background: none; color: var(--ink); cursor: pointer;
  font-family: var(--font-display); font-size: 26px; font-weight: 500;
  letter-spacing: -0.02em; line-height: 1.2;
}
.vacant-pick-room:active{ opacity: .7; }
.vacant-pick-timebar{
  display:flex; justify-content: space-between; align-items:center;
  margin-top: 14px; padding: 11px 13px; border-radius: var(--radius);
  font-variant-numeric: tabular-nums; font-size: 12.5px; font-weight: 600; color: var(--ink);
  background: var(--pick-line);
}

/* ---------- weekly timetable ---------- */
.tt-agenda{ display:flex; flex-direction: column; gap: 8px; }
.tt-slot{
  --subject-colour: #dcdce4;
  padding: 16px; border: 1px solid color-mix(in srgb, var(--subject-colour) 45%, white);
  border-radius: var(--radius); overflow: hidden;
  background: color-mix(in srgb, var(--subject-colour) 14%, white);
}
.tt-row{ font-size: 13.5px; line-height: 1.45; color: var(--ink); margin: 9px 0 0; }
.tt-label{ font-weight: 600; }
.tt-timebar{
  display:flex; justify-content: space-between; align-items:center;
  margin-top: 16px; padding: 11px 13px; border-radius: var(--radius);
  font-variant-numeric: tabular-nums; font-size: 12.5px; font-weight: 600; color: var(--ink);
  background: color-mix(in srgb, var(--subject-colour) 45%, white);
}
.tt-slot.is-empty{ --subject-colour: #dcdce4; }
.tt-time{ font-variant-numeric: tabular-nums; font-size: 10.5px; color: var(--ink-faint); line-height: 1.4; }
.tt-time b{ display:block; font-size: 14px; color: var(--ink); font-weight: 500; }
.tt-slot .subject{ font-family: var(--font-display); font-weight: 500; font-size: 20px; margin: 0; line-height: 1.25; }
.tt-main .meta{ font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-soft); }
.free-note{ font-size: 13.5px; line-height: 1.45; color: var(--ink); margin: 9px 0 13px; }
.find-room-btn{
  display: block; width: 100%;
  font-family: var(--font-body); font-size: 13px; font-weight: 600;
  padding: 12px 14px; border-radius: var(--radius);
  border: none; background: var(--deep); color: var(--deep-ink); cursor: pointer;
}
.tt-main .meta span{ display:inline-block; margin-right: 10px; }

/* desktop grid table */
.tt-table-wrap{ display:none; overflow-x:auto; border:1px solid var(--line); border-radius: var(--radius); }
table.tt-table{ border-collapse: collapse; width: 100%; min-width: 720px; }
table.tt-table th, table.tt-table td{
  border: 1px solid var(--line-soft); padding: 8px; vertical-align: top; font-size: 12px;
}
table.tt-table thead th{
  background: var(--panel); font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.01em; font-weight: 500;
  position: sticky; top:0;
}
table.tt-table tbody th{ font-family: var(--font-mono); background: var(--panel); white-space: nowrap; font-weight: 500; }
table.tt-table td .subject{ font-weight: 500; display:block; margin-bottom: 2px; }
table.tt-table td .meta{ font-family: var(--font-mono); color: var(--ink-faint); font-size: 10px; }

/* ---------- confessions ---------- */
/* The one place people write something of their own, so it is given the
   weight of a sheet of paper rather than a form field: a serif hand, a ruled
   top edge in the tab's colour, and the counter only speaking up near the end. */
.compose{
  position: relative; overflow: hidden;
  border: 1px solid var(--say-line); border-radius: var(--radius);
  background: var(--paper); padding: 16px 14px 12px; margin-bottom: 16px;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.compose::before{
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, var(--say) 0%, #7b5ea7 55%, var(--pick) 100%);
}
.compose:focus-within{
  border-color: var(--say);
  box-shadow: 0 0 0 3px var(--say-tint);
}
.compose textarea::placeholder{
  font-family: var(--font-body); font-style: normal; font-weight: 400;
  color: var(--say); opacity: .55;
}
/* The same face, size and rhythm the post will be set in, so what is typed
   looks like what appears. */
.compose textarea{
  width: 100%; resize: vertical; min-height: 76px;
  font-family: var(--font-body); font-size: 15.5px; line-height: 1.55;
  font-weight: 450; letter-spacing: -0.005em; color: var(--ink);
  border: none; background: none; padding: 0;
}
.compose textarea:focus{ outline: none; }
.compose-foot{ display:flex; align-items:center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.compose-foot span{
  font-size: 12.5px; font-weight: 500; font-variant-numeric: tabular-nums;
  color: var(--ink); opacity: .45; transition: opacity .18s ease, color .18s ease;
}
.compose:focus-within .compose-foot span{ opacity: 1; }
.compose-foot span.low{ color: #a4160c; opacity: 1; font-weight: 600; }
/* Named rather than "every button in here": the camera beside it is a button
   too, and was being served the Post button's purple as a solid block. */
.compose-foot #confess-post, .compose-foot #talk-post{
  font-family: var(--font-body); font-size: 13px; font-weight: 600;
  padding: 10px 20px; border-radius: var(--radius);
  border: none; background: var(--say); color: var(--paper); cursor: pointer;
}
.compose-foot #confess-post:disabled, .compose-foot #talk-post:disabled{ opacity: .4; cursor: default; }
/* The tools sit together on the left of the row, Post alone on the right. */
/* The camera holds the left. Poll and link sit against Post, because those two
   change what you are posting rather than what is attached to it. */
#talk-compose .compose-foot{ gap: 4px; }
#talk-compose #talk-poll-btn{ margin-left: auto; }
#talk-compose #talk-post{ margin-left: 6px; }

.react-row{ display:flex; gap: 6px; margin-top: 14px; flex-wrap: wrap; }
.react{
  display:flex; align-items:center; gap: 5px;
  font-family: var(--font-body); font-size: 14px; line-height: 1;
  padding: 8px 11px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--paper); color: var(--ink); cursor: pointer;
}
.react b{ font-weight: 600; font-size: 12px; font-variant-numeric: tabular-nums; }
.react.mine{ border-color: var(--say); background: var(--say-tint); }
/* Reactions on a reply are the same set, drawn smaller so a thread still reads
   as a thread rather than five more buttons a line. */
.react-row.small{ gap: 4px; margin-top: 7px; }
.react-row.small .react{ font-size: 12px; padding: 5px 8px; gap: 4px; }
.react-row.small .react b{ font-size: 11px; }

.reply-toggle{
  padding: 0;
  display:flex; align-items:center; gap: 5px;
  font-family: var(--font-body); font-size: 12.5px; font-weight: 600;
  font-variant-numeric: tabular-nums;
  border: none; background: none; color: var(--say); cursor: pointer;
}
.reply-toggle svg{ width: 16px; height: 16px; }
.reply-thread{ margin-top: 10px; border-top: 1px solid var(--line); padding-top: 10px; }
.reply{ margin-bottom: 10px; }
.reply-body{
  font-family: var(--font-body); font-size: 14px; line-height: 1.5; color: var(--ink);
  margin: 0; overflow-wrap: anywhere; white-space: pre-wrap;
}
.reply-meta{
  display:flex; align-items:center; gap: 10px;
  font-size: 11.5px; font-weight: 500; color: var(--say); margin: 3px 0 0;
}
/* Everyone on the board is Anonymous, so the word is set quietly — it is a
   placeholder for a name, not a name. Admin is the one thing worth reading. */
.reply-who{ font-weight: 500; }
.reply-admin{ font-weight: 700; color: #a4160c; }
/* Only you ever see this, on your own replies. */
.reply-mine{ font-weight: 700; color: var(--say); }
/* And only an administrator ever sees a real name, here or on a confession. */
.reply-named{ font-weight: 700; color: var(--ink); }
.confess-author{ font-weight: 700; color: var(--ink); }
.reply-to{
  margin-left: auto; padding: 0;
  font-family: var(--font-body); font-size: 11.5px; font-weight: 600;
  border: none; background: none; color: var(--say); cursor: pointer;
}
/* A thread steps right exactly once, whatever it hangs off. */
.reply-kids{ margin: 0 0 10px 6px; padding-left: 12px; border-left: 2px solid var(--say-line); }
.reply-kids .reply:last-child{ margin-bottom: 0; }

.reply-compose{ display:block; }
.reply-compose-row{ display:flex; gap: 6px; }
.reply-target{
  display:flex; align-items:center; gap: 6px; margin: 0 0 6px;
  font-size: 11.5px; font-weight: 600; color: var(--say);
}
.reply-target-clear{
  font-family: var(--font-body); font-size: 15px; line-height: 1;
  padding: 0 2px; border: none; background: none; color: var(--say); cursor: pointer;
}
.reply-compose input{
  flex: 1; min-width: 0;
  font-family: var(--font-body); font-size: 13.5px; color: var(--ink);
  padding: 10px 11px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--paper);
}
.reply-compose input:focus{ outline: none; border-color: var(--say); }
.reply-send, .talk-send{
  flex-shrink: 0;
  font-family: var(--font-body); font-size: 12.5px; font-weight: 600;
  padding: 10px 14px; border-radius: var(--radius);
  border: none; background: var(--say); color: var(--paper); cursor: pointer;
}
.profile-btn.signed-in{ color: var(--say); }

/* The way in for a browser that will not open Google's dialog. Small print
   under the button, because it is the second answer and not the first. */
.signin-plain{
  display: block; margin: 10px auto 0; padding: 4px;
  font-family: var(--font-body); font-size: 12px; font-weight: 500;
  border: none; background: none; color: var(--ink); opacity: .55;
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.signin-plain:hover{ opacity: 1; color: var(--say); }
.signin-plain:disabled{ opacity: .35; cursor: default; }

/* Said before the rooms, not after: it changes how the list underneath should
   be read. Quiet, because it is a caveat and not an alarm. */
.vacant-caveat{
  margin: 0 0 14px; padding: 2px 0 2px 11px;
  font-size: 12.5px; line-height: 1.5; font-weight: 500;
  color: var(--ink); opacity: .75;
  border-left: 2px solid var(--occupied-dot);
}

.signin-bar{
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  display:flex; align-items:center; gap: 10px;
  padding: 14px 14px calc(14px + env(safe-area-inset-top));
  background: var(--say); color: #fff;
  animation: bar-down .22s ease both;
}
@keyframes bar-down{ from{ transform: translateY(-100%); } to{ transform: none; } }
.signin-bar p{ margin: 0; flex: 1; min-width: 0; font-size: 13.5px; font-weight: 500; }
.signin-bar #signin-btn{
  flex-shrink: 0;
  font-family: var(--font-body); font-size: 12.5px; font-weight: 600;
  padding: 9px 13px; border-radius: var(--radius);
  border: none; background: #fff; color: var(--say); cursor: pointer;
}
.signin-close{
  flex-shrink: 0; width: 26px; height: 26px; display:grid; place-items:center;
  border: none; background: none; color: #fff; cursor: pointer; padding: 0;
}
.signin-close svg{ width: 14px; height: 14px; }

.confess{
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--paper); padding: 16px; margin-bottom: 8px;
}
/* Inter, not the serif. These are messages people type, not headings, and the
   serif made every one of them read as a pronouncement. Set a little smaller
   and a little looser, because a sans face at 19px on a phone is a wall. */
.confess-body{
  font-family: var(--font-body); font-size: 15.5px; line-height: 1.55;
  font-weight: 450; letter-spacing: -0.005em; color: var(--ink);
  margin: 0; overflow-wrap: anywhere; white-space: pre-wrap;
}
/* Time and Report sit together on the left, Reply holds the right corner. */
/* Two lines, not one crowded row: when it was said, and then what can be done
   about it. Four things competing for one line left nothing room to be read. */
.confess-foot{ margin-top: 13px; }
.confess-when{
  margin: 0; font-size: 12px; font-weight: 500; color: var(--ink); opacity: .55;
  font-variant-numeric: tabular-nums;
}
.confess-acts{
  display:flex; align-items:center; justify-content: space-between; gap: 14px;
  margin-top: 9px; padding-top: 10px; border-top: 1px solid var(--line-soft);
}
.confess-report{
  margin-left: auto;
  font-family: var(--font-body); font-size: 12px; font-weight: 500;
  border: none; background: none; color: #a4160c; cursor: pointer; padding: 0;
  opacity: .8;
}
.confess-report:disabled{ color: var(--ink); cursor: default; }
/* One filled line under the box, answering the question somebody has while
   deciding whether to type at all. It claims only what is true: no name is
   attached to a post or a reply. */
.compose-promise{
  margin: 8px 0 16px; padding: 7px 12px;
  border-radius: 8px; background: var(--say-tint); color: var(--say);
  font-size: 11.5px; font-weight: 600; letter-spacing: .01em; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* The cup sits behind, softened, with the heart lifted off it by a gap in the
   block's own colour rather than a second fill. */
.icon-tea{ overflow: visible; }

/* Inter, like everything else people write and read here. */
.confess-empty{
  font-family: var(--font-body); font-size: 15px; font-weight: 500;
  color: var(--ink); opacity: .6; text-align: center; margin: 14px 0 0;
}
.confess-empty-art{ display:block; margin: 28px auto 0; height: 170px; width: auto; }
.confess-more{
  display:block; width: 100%; margin-top: 8px;
  font-family: var(--font-body); font-size: 13px; font-weight: 500;
  padding: 12px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--paper); color: var(--ink); cursor: pointer;
}

/* ---------- tab bar (mobile) ---------- */
/* Five of them now, so each gets a little less room on a phone. */
@media (max-width: 719px){
  .tab-btn{ font-size: 10px; padding-left: 2px; padding-right: 2px; }
  .tab-btn svg{ width: 19px; height: 19px; }
}
.tabbar{
  position: fixed; bottom: 0; left: 0; right: 0;
  display:flex; justify-content:center;
  background: var(--paper);
  border-top: 1px solid var(--line);
  padding: 12px max(6px, env(safe-area-inset-bottom)) calc(14px + env(safe-area-inset-bottom));
  z-index: 30;
}
.tabbar-inner{ display:flex; gap: 2px; width:100%; max-width: 420px; }
.tab-btn{
  flex:1; display:flex; flex-direction:column; align-items:center; gap: 7px;
  background:none; border:none; padding: 4px; border-radius: var(--radius-sm); cursor:pointer;
  color: var(--ink-faint); font-size: 11px; font-weight: 500;
}
.tab-btn svg{ width: 23px; height: 23px; }
/* The Garba tab wears the artwork rather than a line drawing, so it reads as
   the one thing in the bar that is not part of the timetable. A picture cannot
   take the active colour the way an icon does, so it takes a ring instead. */
.tab-orb{ position: relative; display: inline-flex; line-height: 0; }
.tab-art{ width: 23px; height: 23px; border-radius: 50%; object-fit: cover; }
.tab-btn.active .tab-art{ box-shadow: 0 0 0 1.5px var(--accent); }
/* Mirror-work on the tab as well, open or not: it is the one tab advertising
   something that has not arrived, and a still icon in a row of still icons is
   not going to say so. */
/* Five of them around a twenty-three pixel circle, each catching the light at
   a different moment, so the tab is never quite still and never all at once. */
.tab-orb .garba-spark{ width: 5px; height: 5px; }
.tab-orb .garba-spark.s1{ top: -3px;   right: -2px;  animation-delay: 0s; }
.tab-orb .garba-spark.s2{ bottom: -2px; left: -3px;  animation-delay: .55s; }
.tab-orb .garba-spark.s3{ top: 42%;    right: -5px;  width: 4px; height: 4px; animation-delay: 1.1s; }
.tab-orb .garba-spark.s4{ top: -4px;    left: 3px;   width: 4px; height: 4px; animation-delay: 1.65s; }
.tab-orb .garba-spark.s5{ bottom: -3px; right: 4px;  animation-delay: 2.2s; }
.tab-btn.active{ color: var(--ink); }
.tab-btn.active svg{ color: var(--accent); }

.skeleton{
  height: 12px; border-radius: var(--radius-sm); background: var(--panel-deep);
}

.toast{
  position: fixed; left:50%; bottom: calc(var(--tabbar-space, 78px) + 14px); transform: translateX(-50%);
  background: var(--ink); color: var(--paper); font-size: 12px; font-weight: 500;
  padding: 9px 16px; border-radius: var(--radius); opacity:0; pointer-events:none; transition: opacity .2s ease;
  z-index: 50; max-width: 88%; text-align:center; box-shadow: var(--shadow-md);
}
.toast.show{ opacity: 1; }

/* ---------- room detail sheet ---------- */
.sheet-backdrop{
  position: fixed; inset: 0; background: rgba(11,12,16,.5); z-index: 40;
  display:none; align-items:flex-end; justify-content:center;
}
.sheet-backdrop.open{ display:flex; }
.sheet{
  background: var(--paper); width: 100%; max-width: 520px; border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 18px 18px calc(18px + env(safe-area-inset-bottom));
  max-height: 78vh; overflow-y: auto;
  box-shadow: 0 -12px 32px -12px rgba(11,12,16,.25);
  animation: slideup .22s ease both;
}
@keyframes slideup{ from{ transform: translateY(20px); opacity: 0; } to{ transform:none; opacity: 1; } }
.sheet-option{
  display:flex; align-items:center; justify-content: space-between; gap: 10px;
  width: 100%; text-align:left;
  font-family: var(--font-body); font-size: 14px; font-weight: 500;
  padding: 13px 14px; margin-bottom: 8px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--paper); color: var(--ink); cursor: pointer;
}
.sheet-option.on{ background: var(--ink); color: var(--paper); border-color: var(--ink); }
.sheet-option-danger{ color: #d92d20; border-color: #f2cdc9; }
.sheet-foot{ font-size: 13px; color: var(--ink); margin: 12px 0 0; }
/* Google draws its own button; these only give it somewhere to sit. */
.sheet-gsi{ display:flex; justify-content:center; margin-top: 14px; min-height: 44px; }
#signin-gsi{ flex-shrink: 0; display:flex; align-items:center; }
#sheet-moderate{ margin-top: 16px; }
#sheet-signout{ margin-top: 16px; }
.opt-tag{ flex-shrink: 0; font-size: 14px; font-weight: 500; color: var(--accent); }
.sheet-option.on .opt-tag{ color: var(--accent-soft); }
@media (min-width: 640px){
  .sheet-backdrop{ align-items:center; }
  .sheet{ border-radius: var(--radius-lg); max-height: 80vh; box-shadow: var(--shadow-md); }
}
.sheet-head{ margin-bottom: 14px; }
.sheet-head h3{ font-family: var(--font-display); font-size: 20px; margin:0; font-weight: 500; }

/* ---------- responsive ---------- */
/* The word beside an icon: only where a sidebar has room for it. */
.wide-label{ display: none; }

/* Six tabs across a phone leave about seventy pixels each, which will not hold
   "Find a Dandiya Partner". The bar says the short name; from a tablet up,
   where the tabs become chips with room to spare, it says the whole thing. */
.tab-long{ display: none; }

/* A tablet: the bar comes off the bottom of the screen and becomes a row of
   chips under the name, but the page is still one column. */
@media (min-width: 720px){
  .app{ padding-bottom: 24px; }
  .topbar{ order: 0; }
  .tabbar{ order: 1; position: static; border-top:none; background:none; padding: 0; margin: 14px 18px 0; }
  main{ order: 2; padding: 20px 18px; }
  .tabbar-inner{ max-width: none; justify-content: flex-start; gap: 6px; }
  .tab-btn{ flex-direction: row; flex: 0 0 auto; padding: 9px 16px; border: 1px solid var(--line); border-radius: var(--radius); }
  .tab-btn.active{ background: var(--ink); border-color: var(--ink); color: var(--paper); }
  .tab-btn.active svg{ color: var(--paper); }
  .tab-short{ display: none; }
  .tab-long{ display: inline; }
  .room-grid{ grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }
  #tt-agenda{ display:none; }
  .tt-table-wrap{ display:block; }
}

/* A desktop: the chips become a sidebar, and the page stops being a phone
   stranded in the middle of a monitor. Everything that was hidden behind an
   icon in the corner -- signing in, installing -- is written out down the side
   where it can be found. */
@media (min-width: 1000px){
  .app{
    max-width: 1280px;
    display: grid;
    grid-template-columns: 236px minmax(0, 1fr);
    grid-template-areas: "brand main" "nav main";
    grid-template-rows: auto 1fr;
    column-gap: 26px;
    align-items: start;
    padding: 0 24px 32px;
  }
  .topbar{ grid-area: brand; flex-wrap: wrap; padding: 22px 0 12px; }
  .topbar-actions{ width: 100%; margin: 10px 0 0; flex-direction: column; gap: 4px; }
  main{ grid-area: main; padding: 22px 0; min-width: 0; }

  .tabbar{
    grid-area: nav; position: sticky; top: 20px;
    border-top: none; background: none; padding: 0; margin: 0;
  }
  .tabbar-inner{ flex-direction: column; align-items: stretch; gap: 3px; max-width: none; }
  .tab-btn{
    justify-content: flex-start; gap: 11px;
    padding: 11px 13px; border: none; border-radius: 10px;
    font-size: 14px;
  }
  .tab-btn:hover{ background: var(--panel); }

  /* Signing in and installing read as what they are, not as two small glyphs.
     The icon button is a fixed 40px square everywhere else, which is why both
     have to be undone here rather than only widened. */
  .topbar-actions .profile-btn{
    width: 100%; height: auto;
    display: flex; align-items: center; justify-content: flex-start; gap: 11px;
    padding: 9px 13px; border-radius: 10px;
    font-family: var(--font-body); font-size: 13.5px; font-weight: 500;
    color: var(--ink);
  }
  .topbar-actions .profile-btn svg{ width: 21px; height: 21px; flex-shrink: 0; }
  .topbar-actions .profile-btn .profile-face{ width: 22px; height: 22px; }
  .topbar-actions .profile-btn:hover{ background: var(--panel); }
  .wide-label{ display: inline; }

  /* The reading column stays a reading column; the room grid takes the rest. */
  .confess, .compose, #confess-list, .gate-card{ max-width: 720px; }
  .room-grid{ grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
}

/* ---------- the signed-in account ---------- */
.profile-face{ width: 31px; height: 31px; border-radius: 50%; object-fit: cover; }
/* The account sits apart from the batches above it, and the admin tools sit
   apart from the account — three separate things, not one run-on list. */
.sheet-account{
  display:flex; align-items:center; gap: 11px;
  margin-top: 18px; padding-top: 16px;
  border-top: 1px solid var(--line);
}
.sheet-account img{ width: 38px; height: 38px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.sheet-account-name{ margin: 0; font-size: 14.5px; font-weight: 600; color: var(--ink); }
.sheet-account-mail{ margin: 1px 0 0; font-size: 12.5px; color: var(--ink); }

.steps{ margin: 10px 0 0; padding-left: 20px; }
.steps li{ font-size: 13.5px; line-height: 1.5; color: var(--ink); margin-bottom: 6px; }

/* ---------- install strip ---------- */
/* Deliberately slim: it sits between things people came for, so it reads as a
   line of promotion rather than a block competing with them. */
.install-strip{
  display:flex; align-items:center; justify-content: space-between; gap: 12px;
  padding: 11px 12px; margin-bottom: 12px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel);
}
.install-strip p{ margin: 0; font-size: 13px; font-weight: 600; color: var(--ink); }
.install-strip span{ display:block; margin-top: 1px; font-size: 11.5px; color: var(--ink); }
.install-strip-btn{
  flex-shrink: 0;
  font-family: var(--font-body); font-size: 12.5px; font-weight: 600;
  padding: 9px 16px; border-radius: var(--radius);
  border: none; background: var(--ink); color: var(--paper); cursor: pointer;
}

/* The same strip, offering the other thing worth having — set apart by colour
   so the two never read as one repeated advertisement. */
.notify-strip{ border-color: var(--say-line); background: var(--say-tint); }
.notify-strip p{ color: var(--say); }
.notify-strip-btn{
  flex-shrink: 0;
  font-family: var(--font-body); font-size: 12.5px; font-weight: 600;
  padding: 9px 16px; border-radius: var(--radius);
  border: none; background: var(--say); color: var(--paper); cursor: pointer;
}
.notify-strip-btn:active{ opacity: .85; }

/* ---------- moderation ---------- */
.mod-row{ border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; margin-bottom: 8px; }
.mod-body{ font-family: var(--font-body); font-size: 14.5px; line-height: 1.5; margin: 0; overflow-wrap: anywhere; }
.mod-meta{ font-size: 12px; color: var(--ink); margin: 6px 0 0; }
/* Who objected. Only an administrator ever sees this, and only here. */
.mod-reporters{ font-size: 11.5px; line-height: 1.5; color: var(--ink); margin: 5px 0 0; }
.mod-reporters b{ font-weight: 600; }
.mod-reporters span{ opacity: .6; }
.mod-actions{ display:flex; gap: 6px; margin-top: 10px; }
.mod-actions button{
  flex: 1; font-family: var(--font-body); font-size: 12.5px; font-weight: 600;
  padding: 9px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--paper); color: var(--ink); cursor: pointer;
}
.mod-actions .mod-delete{ color: #a4160c; border-color: #f2cdc9; }

/* ---------- a full page, for lists too long to sit in a sheet ---------- */
.page{
  position: fixed; inset: 0; z-index: 50;
  background: var(--paper); display: flex; flex-direction: column;
  animation: page-in .2s ease both;
}
@keyframes page-in{ from{ transform: translateX(16px); opacity: 0; } to{ transform: none; opacity: 1; } }
.page-head{
  display:flex; align-items:center; gap: 6px;
  padding: calc(14px + env(safe-area-inset-top)) 14px 14px;
  border-bottom: 1px solid var(--line);
}
.page-head h2{
  font-family: var(--font-display); font-size: 21px; font-weight: 500;
  letter-spacing: -0.01em; margin: 0; color: var(--ink);
}
.page-back{
  width: 34px; height: 34px; flex-shrink: 0; display:grid; place-items:center;
  border: none; background: none; color: var(--ink); cursor: pointer; padding: 0;
}
.page-back svg{ width: 20px; height: 20px; }
.page-body{
  flex: 1; overflow-y: auto;
  padding: 14px 14px calc(24px + env(safe-area-inset-bottom));
}

/* One person per row, with room for a long address rather than on top of it. */
.person{ border: 1px solid var(--line); border-radius: var(--radius); padding: 13px; margin-bottom: 8px; }
.person-name{ font-size: 14.5px; font-weight: 600; color: var(--ink); margin: 0; overflow-wrap: anywhere; }
.person-admin{
  margin-left: 7px; padding: 2px 6px; border-radius: 5px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .02em;
  background: var(--say-tint); color: var(--say); vertical-align: 1px;
}
.person-mail{ font-size: 12.5px; color: var(--ink); margin: 3px 0 0; overflow-wrap: anywhere; }
.person-batches{ font-size: 12.5px; color: var(--say); font-weight: 500; margin: 7px 0 0; }
.person-since{ font-size: 12px; color: var(--ink); opacity: .6; margin: 3px 0 0; }
.person-time{
  margin: 6px 0 0; font-size: 12.5px; font-weight: 600;
  color: var(--say); font-variant-numeric: tabular-nums;
}
.person-time span{ font-weight: 500; color: var(--ink); opacity: .55; }

/* One account: the face, then who it is. The id is set small and monospaced --
   it is there to be copied into a query, not read. */
.person-row{ display:flex; gap: 12px; align-items: flex-start; }
.person-of{ min-width: 0; flex: 1; }
.person-face{ width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.person-face-blank{
  display:flex; align-items:center; justify-content:center;
  font-family: var(--font-display); font-size: 17px;
  background: var(--say-tint); color: var(--say);
}
.person-id{
  margin: 5px 0 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10.5px; color: var(--ink); opacity: .5; overflow-wrap: anywhere;
}

/* A line of text on the way down — the gesture kept, the browser's spinner not. */
.pull-hint{
  position: fixed; top: 0; left: 0; right: 0; z-index: 45;
  margin: 0; padding: 10px 0 8px;
  text-align: center; font-size: 12.5px; font-weight: 600; color: var(--say);
  background: var(--paper);
  transition: transform .12s ease;
}
.person-orphan{ background: var(--panel); }
.person-orphan .person-mail{ color: #a4160c; }


/* ---------- reading a little, then signing in ---------- */
/* What is past the wall keeps its shape and goes soft. It is not hidden: the
   point is to show there is more of the same underneath, not to end the page. */
.gate-soft{
  filter: blur(4px);
  opacity: .5;
  pointer-events: none;
  user-select: none;
}
.gate-card{
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  margin: 4px 0 14px; padding: 18px 16px;
  border: 1px solid var(--say-line); border-radius: var(--radius);
  background: var(--say-tint);
}
.gate-line{
  margin: 0; max-width: 30ch; text-align: center;
  font-size: 13.5px; line-height: 1.45; font-weight: 500; color: var(--ink);
}
.gate-gsi{ min-height: 40px; display: flex; justify-content: center; }


/* ---------- pictures ---------- */
/* One fills the width; two sit side by side; three or four make a square
   block. Every cell is square so a row cannot go ragged whatever was taken. */
.shots{ display: grid; gap: 3px; margin: 10px 0 0; border-radius: 12px; overflow: hidden; }
.shots-1{ grid-template-columns: 1fr; }
.shots-2, .shots-4{ grid-template-columns: 1fr 1fr; }
.shots-3{ grid-template-columns: repeat(3, 1fr); }
.shot{
  padding: 0; border: none; background: var(--panel); cursor: zoom-in;
  aspect-ratio: 1; overflow: hidden;
}
.shots-1 .shot{ aspect-ratio: 4 / 3; }
.shot img{ width: 100%; height: 100%; object-fit: cover; display: block; }
.shots-reply{ margin-top: 7px; max-width: 220px; border-radius: 9px; }

.shot-veil{
  position: fixed; inset: 0; z-index: 120;
  display: flex; align-items: center; justify-content: center;
  padding: 20px; background: rgba(10, 9, 16, .92); cursor: zoom-out;
  animation: shot-in .16s ease both;
}
@keyframes shot-in{ from{ opacity: 0; } }
.shot-veil img{ max-width: 100%; max-height: 100%; border-radius: 10px; }

/* What has been picked but not sent yet. */
.shot-strip{ display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.shot-pick{ position: relative; width: 58px; height: 58px; }
.shot-pick img{ width: 100%; height: 100%; object-fit: cover; border-radius: 8px; display: block; }
.shot-pick button{
  position: absolute; top: -6px; right: -6px;
  width: 20px; height: 20px; border-radius: 50%; line-height: 1;
  border: none; background: var(--ink); color: var(--paper);
  font-size: 13px; cursor: pointer;
}
.shot-add, .compose-foot .shot-add, .reply-compose-row .shot-add{
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; padding: 0; border-radius: 9px;
  border: 1px solid var(--line); background: var(--paper); color: var(--ink);
  cursor: pointer;
}
.shot-add:active{ background: var(--panel); }
.shot-add svg{ width: 18px; height: 18px; }
.compose-foot .shot-add{ margin-right: auto; }
.compose-foot{ gap: 8px; }
.reply-compose-row .shot-add{ width: 32px; height: 32px; }


/* With no limit, a long confession is folded to about a screenful until it is
   asked for, so one person's essay cannot bury the board. */
.confess-long{
  display: -webkit-box; -webkit-line-clamp: 9; -webkit-box-orient: vertical;
  overflow: hidden;
}
.confess-more-btn{
  margin-top: 6px; padding: 0;
  font-family: var(--font-body); font-size: 12.5px; font-weight: 600;
  border: none; background: none; color: var(--say); cursor: pointer;
}
#confess-text{ resize: none; overflow-y: auto; }


/* Held for a moment when arriving from a notification, so it is obvious which
   one of them was meant. */
.confess-landed{ animation: landed 2.2s ease both; }
@keyframes landed{
  0%, 60%{ box-shadow: 0 0 0 2px var(--say); }
  100%{ box-shadow: 0 0 0 2px transparent; }
}


/* ---------- the one thing asked for after signing in ---------- */
/* The page behind is blurred rather than merely darkened: this is a question,
   and the answer should be the only thing in focus. */
.ask{
  position: fixed; inset: 0; z-index: 130;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  background: rgba(12, 10, 20, .34);
  backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px);
  opacity: 0; transition: opacity .18s ease;
}
.ask.open{ opacity: 1; }
.ask-card{
  width: min(340px, 100%);
  background: var(--paper); border-radius: 20px; padding: 24px 22px 18px;
  box-shadow: 0 24px 60px rgba(12,10,20,.3);
  text-align: center;
  transform: scale(.96); transition: transform .2s cubic-bezier(.32,.72,0,1);
}
.ask.open .ask-card{ transform: none; }
.ask-title{
  margin: 0 0 8px; font-family: var(--font-body); font-size: 18px;
  font-weight: 700; letter-spacing: -0.01em; color: var(--ink);
}
.ask-line{
  margin: 0 0 20px; font-size: 13.5px; line-height: 1.5;
  color: var(--ink); opacity: .7;
}
.ask-yes{
  display: block; width: 100%;
  font-family: var(--font-body); font-size: 14.5px; font-weight: 600;
  padding: 13px; border-radius: 12px;
  border: none; background: #d0332a; color: #fff; cursor: pointer;
}
.ask-yes:active{ background: #b62b23; }
/* Not a button: the way out should be quieter than the way on. */
.ask-no{
  display: block; width: 100%; margin-top: 4px;
  font-family: var(--font-body); font-size: 13.5px; font-weight: 500;
  padding: 12px; border: none; background: none; color: var(--ink); cursor: pointer;
}


/* ---------- the discussion board ---------- */
/* A discussion is signed, so the name leads and the time follows it. */
.talk-head{
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  margin: 0 0 7px; font-size: 12.5px;
}
.talk-who{ font-size: 13.5px; font-weight: 650; color: var(--ink); }
.talk-admin{ color: #a4160c; }
.talk-you{
  font-size: 10.5px; font-weight: 600; padding: 1px 6px; border-radius: 5px;
  background: var(--say-tint); color: var(--say);
}
.talk-when{ color: var(--ink); opacity: .5; font-variant-numeric: tabular-nums; }
/* Who it really was, beside the word Anonymous. Only an administrator is ever
   sent this, and it is set quietly so the post still reads as anonymous. */
.talk-really{
  font-size: 11.5px; font-weight: 600; font-style: italic;
  padding: 1px 6px; border-radius: 5px;
  background: rgba(164, 22, 12, .08); color: #a4160c;
}

/* The tick that takes the name off one post. A line of small print under the
   box, not a control with a border: it is an exception to the board, and it
   should read like one. */
.anon-tick{
  display: flex; align-items: center; gap: 7px;
  margin-top: 10px; font-size: 12px; font-weight: 500;
  color: var(--ink); opacity: .55; cursor: pointer;
}
.anon-tick:has(input:checked){ opacity: 1; color: var(--say); font-weight: 600; }
.anon-tick input{ accent-color: var(--say); margin: 0; }
.reply-compose .anon-tick{ margin: 8px 0 0 40px; font-size: 11.5px; }

/* Plain icons, not three boxed buttons in a row: the boxes read as a block of
   controls sitting under the box you are typing in, which is more furniture
   than three optional extras deserve. */
.talk-tool{
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; padding: 0; border-radius: 8px;
  border: none; background: none; color: var(--ink); opacity: .55; cursor: pointer;
}
.talk-tool svg{ width: 19px; height: 19px; }
.talk-tool:hover{ opacity: 1; }
.talk-tool.on{ background: none; color: var(--say); opacity: 1; }

/* The camera beside them loses its box for the same reason. */
#talk-compose .shot-add{
  width: 32px; height: 32px; border: none; background: none; opacity: .55;
}
#talk-compose .shot-add:hover{ opacity: 1; }
#talk-compose .shot-add svg{ width: 19px; height: 19px; }

.talk-poll{ display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.talk-poll input, #talk-video{
  width: 100%; font-family: var(--font-body); font-size: 13.5px; color: var(--ink);
  padding: 10px 11px; border-radius: 10px; border: 1px solid var(--line); background: var(--paper);
}
#talk-video{ margin-top: 10px; }
.talk-poll input:focus, #talk-video:focus{ outline: none; border-color: var(--say); }

/* A result read as type, not as a chart. Each answer is a line with its share
   at the end and a hairline underneath carrying the proportion -- the app draws
   time and days the same way, and a stack of filled slabs belongs to a
   dashboard rather than to a page somebody is reading. */
.poll{ margin: 12px 0 6px; }
.poll-q{ margin: 0 0 12px; font-size: 15px; font-weight: 600; color: var(--ink); }

/* Before anybody has voted, the answers are a list to choose from rather than a
   stack of boxes. Ruled apart like the result they turn into, with a mark to
   press rather than a rectangle -- the shape of the thing does not change when
   the vote is cast, only what it says. */
.poll-pick{
  display: flex; align-items: center; gap: 11px;
  width: 100%; text-align: left; padding: 12px 2px;
  font-family: var(--font-body); font-size: 14px; font-weight: 450;
  border: none; border-bottom: 1px solid var(--line-soft);
  background: none; color: var(--ink); cursor: pointer;
}
.poll-pick:last-of-type{ border-bottom: none; }
.poll-mark{
  flex-shrink: 0; width: 15px; height: 15px; border-radius: 50%;
  border: 1.5px solid var(--line); background: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.poll-pick:hover .poll-mark,
.poll-pick:active .poll-mark{
  border-color: var(--say); box-shadow: inset 0 0 0 3.5px var(--say);
}
.poll-pick:hover{ color: var(--say); }

.poll-row{ margin-bottom: 13px; cursor: pointer; }
.poll-line{ display: flex; align-items: baseline; gap: 10px; }
.poll-label{
  font-size: 14px; font-weight: 450; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.poll-count{
  margin-left: auto; font-size: 13px; font-weight: 600; color: var(--ink);
  opacity: .45; font-variant-numeric: tabular-nums;
}
.poll-track{
  position: relative; height: 2px; margin-top: 6px; border-radius: 2px;
  background: var(--line);
}
.poll-track i{
  position: absolute; inset: 0 auto 0 0; display: block;
  border-radius: 2px; background: var(--ink); opacity: .22;
  transition: width .4s cubic-bezier(.32,.72,0,1);
}
/* Yours is the one in colour and in weight. Nothing else needs to shout. */
.poll-row.chosen .poll-label{ font-weight: 650; color: var(--say); }
.poll-row.chosen .poll-count{ color: var(--say); opacity: 1; }
.poll-row.chosen .poll-track i{ background: var(--say); opacity: 1; }

.poll-voters{ margin: 5px 0 0; font-size: 11px; line-height: 1.45; color: var(--ink); opacity: .5; }
.poll-voters i{ font-style: normal; opacity: .8; }

.poll-foot{
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-top: 12px; font-size: 11.5px; color: var(--ink); opacity: .65;
}
.poll-hide{ display: flex; align-items: center; gap: 6px; cursor: pointer; }
.poll-hide input{ accent-color: var(--say); }
.poll-change{
  margin-left: auto; font-family: var(--font-body); font-size: 11.5px; font-weight: 600;
  border: none; background: none; color: var(--say); cursor: pointer; padding: 0;
}

.talk-video{
  margin-top: 10px; border-radius: 12px; overflow: hidden;
  aspect-ratio: 16 / 9; background: var(--panel);
}
.talk-video iframe{ width: 100%; height: 100%; border: 0; display: block; }

.talk-share{
  display: flex; align-items: center; gap: 6px;
  font-family: var(--font-body); font-size: 12.5px; font-weight: 600;
  border: none; background: none; color: var(--say); cursor: pointer; padding: 0;
}
.talk-share svg{ width: 15px; height: 15px; }
.talk .confess-acts{ gap: 16px; }


/* ---------- an hour the batch splits across ---------- */
/* Two labs at once, different subjects, different buildings. Each half gets its
   own block inside the one hour, ruled apart, so nobody reads the first room
   and stops. */
.tt-split{
  margin: 0 0 10px; font-size: 11px; font-weight: 600; letter-spacing: .02em;
  text-transform: uppercase; color: var(--say); opacity: .8;
}
.tt-part + .tt-part{
  margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-soft);
}
.cell-divide{
  display: block; height: 1px; margin: 7px 0; background: var(--line);
}


/* ---------- Garba night ---------- */
/* Dark, like the batch card under it, because a pale strip at the top of a
   white page reads as a notice to be dismissed and this is meant to be the
   first thing seen. Night colours -- the plum and maroon of a garba ground
   after dark -- with the one warm circle on it. No border: the colour already
   separates it from the page, and a line around it only boxes it in. Nothing
   is cropped either; the artwork is a circle and sits whole inside the card. */
.garba-banner{
  display: flex; align-items: center; gap: 13px;
  width: 100%; margin: 0 0 14px; padding: 13px 14px;
  text-align: left; cursor: pointer;
  border: none; border-radius: 14px;
  background:
    radial-gradient(70% 150% at 16% 50%, rgba(255, 199, 74, .20), transparent 62%),
    linear-gradient(104deg, #2b1030 0%, #5b1730 54%, #7d2a1c 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 222, 160, .22),
    0 3px 14px rgba(43, 16, 48, .26);
  position: relative; overflow: hidden;
}
/* A light passing over the card, the way it passes over the mirrors on a
   chaniya choli. Slow and low-contrast: it should be noticed on the second
   look, not the first. */
.garba-banner::after{
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 34%, rgba(255, 214, 140, .20) 47%, transparent 60%);
  transform: translateX(-130%);
  animation: garba-sheen 5.2s cubic-bezier(.4,0,.5,1) infinite;
}
@keyframes garba-sheen{
  0%, 62% { transform: translateX(-130%); }
  100%    { transform: translateX(130%); }
}

.garba-orb{ position: relative; flex: 0 0 auto; display: block; }
.garba-art{
  display: block; width: 74px; height: 74px; border-radius: 50%;
  /* No ring: the artwork already ends in a circle of its own, and a second one
     drawn around it reads as a frame somebody put there. Just the shadow, so
     it still sits above the card rather than printed on it. */
  box-shadow: 0 4px 14px rgba(20, 6, 24, .4);
  animation: garba-dance 2.6s ease-in-out infinite;
}
/* Two beats to the bar, a lean each way -- the step the dancers are drawn
   mid-way through. */
@keyframes garba-dance{
  0%, 100% { transform: rotate(-3.5deg) translateY(0); }
  50%      { transform: rotate(3.5deg) translateY(-3px); }
}

/* Mirror-work, catching the light one after another. */
.garba-spark{
  position: absolute; width: 7px; height: 7px; pointer-events: none;
  background: #ffc74a; border-radius: 1px;
  clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
  opacity: 0; transform: scale(.4);
  animation: garba-twinkle 2.8s ease-in-out infinite;
}
.garba-spark.s1{ top: -3px;   right: 1px;   animation-delay: 0s; }
.garba-spark.s2{ bottom: 2px; left: -5px;   width: 5px; height: 5px; animation-delay: .7s; }
.garba-spark.s3{ top: 38%;    right: -6px;  animation-delay: 1.4s; }
.garba-spark.s4{ top: 6px;    left: -7px;   width: 4px; height: 4px; animation-delay: 2.1s; }
.garba-spark.s5{ bottom: -3px; right: 14px; width: 5px; height: 5px; animation-delay: 2.5s; }
@keyframes garba-twinkle{
  0%, 70%, 100% { opacity: 0; transform: scale(.4) rotate(0deg); }
  82%           { opacity: 1; transform: scale(1) rotate(45deg); }
}
.garba-words{ flex: 1; min-width: 0; }
.garba-eyebrow{
  display: block;
  font-family: var(--font-body);
  font-size: 10px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: #ffce74; opacity: .85;
}
.garba-title{
  display: block; margin-top: 6px;
  font-family: var(--font-poppins); font-size: 16.5px; line-height: 1.26; font-weight: 600;
  color: #fff;
}
.garba-go{
  flex: 0 0 auto; width: 18px; height: 18px; color: #ffce74; opacity: .65;
  animation: garba-nudge 2.6s ease-in-out infinite;
}
@keyframes garba-nudge{
  0%, 72%, 100% { transform: translateX(0); }
  84%           { transform: translateX(3px); }
}

/* The page behind the tab, until there is something to put there. Held in the
   middle of whatever room is left rather than pinned to the top, because a
   page with one picture on it and a screenful of white underneath reads as
   unfinished. main is a flex item with its height already resolved, so the
   hundred per cent has something to be a hundred per cent of. */
#view-dandiya.active{
  display: flex; align-items: center; justify-content: center;
  flex: 1; position: relative;
}
/* Out of the way in the corner, because most people will let it play -- but
   there for the one in the library who will not. */
.soon-mute{
  position: absolute; top: 0; left: 0; z-index: 2;
  display: grid; place-items: center;
  width: 38px; height: 38px; padding: 0; cursor: pointer;
  border: none; border-radius: 50%;
  background: var(--panel); color: var(--ink);
  opacity: .55; transition: opacity .18s ease;
}
.soon-mute:hover{ opacity: 1; }
.soon-mute.off{ opacity: 1; color: #a4160c; background: rgba(164, 22, 12, .09); }
.soon-mute svg{ width: 19px; height: 19px; }
.soon{ width: 100%; text-align: center; padding: 0; }
/* Plain text, the way it would be written in a sentence: what the page is for,
   said once under the headline. */
.soon-what{
  margin: 7px 0 0; font-family: var(--font-body);
  font-size: 14.5px; font-weight: 400; color: var(--ink);
}
/* Square, because everything else on this page is round -- the circle of the
   artwork, the speaker, the dot of a mirror -- and the one thing to press
   should not be mistaken for another piece of the picture. */
.soon-notify{
  display: inline-block; margin: 16px auto 0; padding: 12px 26px;
  font-family: var(--font-body); font-size: 13.5px; font-weight: 600;
  letter-spacing: .01em; cursor: pointer;
  border: none; border-radius: 0;
  background: linear-gradient(104deg, #2b1030 0%, #5b1730 54%, #7d2a1c 100%);
  color: #fff;
  box-shadow: 0 3px 12px rgba(43, 16, 48, .24);
}
.soon-line{
  margin: 2px 0 0;
  font-family: var(--font-poppins); font-size: 30px; font-weight: 600; letter-spacing: -.01em;
  color: var(--ink);
}
.soon-art{
  display: block; width: min(100%, 420px); height: auto; margin: 0 auto;
  position: relative; z-index: 1;
}
.soon{ position: relative; }
.soon::before{
  content: ""; position: absolute; z-index: 0; pointer-events: none;
  left: 50%; top: 4px; transform: translateX(-50%);
  width: min(94%, 420px); aspect-ratio: 1;
  background: radial-gradient(circle at 50% 45%, rgba(255, 199, 74, .22), rgba(255, 199, 74, .07) 45%, transparent 68%);
}

/* Somebody who has asked their phone to stop moving things gets a still card. */
@media (prefers-reduced-motion: reduce){
  .garba-banner::after, .garba-art, .garba-go, .garba-spark{ animation: none; }
  .garba-spark{ opacity: .85; transform: scale(1) rotate(45deg); }
}
@media (min-width: 720px){
  .garba-title{ font-size: 19px; }
  .garba-art{ width: 92px; height: 92px; }
  .soon-line{ font-size: 36px; }
  .soon-art{ width: min(100%, 520px); }
}



/* ---------- video on the board ---------- */
/* A clip sits the way a picture does -- inside the post, edge to edge, its own
   height. preload is off, so a thread full of them costs one poster frame each
   until somebody actually presses play. */
.clip{
  margin-top: 10px; border-radius: var(--radius); overflow: hidden;
  background: #14060f; line-height: 0;
}
.clip video{ width: 100%; max-height: 60vh; display: block; }

/* What is about to be sent: the name and the weight of it, because a video is
   the one thing here big enough that the size is worth knowing before it goes. */
.clip-strip{ display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.clip-pick{
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 9px; border-radius: var(--radius);
  background: var(--panel); font-size: 12px; color: var(--ink);
}
.clip-pick svg{ width: 15px; height: 15px; opacity: .6; flex-shrink: 0; }
.clip-pick b{ font-weight: 600; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clip-pick i{ font-style: normal; opacity: .55; font-variant-numeric: tabular-nums; }
.clip-pick button{
  border: none; background: none; cursor: pointer; padding: 0 2px;
  font-size: 15px; line-height: 1; color: var(--ink); opacity: .5;
}

/* Taking something down is not the same kind of act as replying to it, so it
   does not get the same colour. */
.talk-delete, .reply-drop{
  font-family: var(--font-body); font-size: 12.5px; font-weight: 600;
  border: none; background: none; color: #a4160c; cursor: pointer; padding: 0;
}
.reply-acts{ display: inline-flex; align-items: center; gap: 12px; }
.reply-flag, .reply-drop{ font-size: 11.5px; }
.reply-flag{
  font-family: var(--font-body); font-weight: 600;
  border: none; background: none; color: var(--ink); opacity: .45; cursor: pointer; padding: 0;
}
.reply-flag:disabled, .reply-drop:disabled{ opacity: .4; cursor: default; }
