/* Locker doors: tall metal cards with three vent lines and a little name plate, each in the person's face colour.
   Calm, no medals, no numbers. (docs/LOCKER-ROOM.md.) The door opens a few degrees on hover, never under reduced
   motion. The grid fills the width with 180px doors, two across at 560px; the edit page's preview stacks under the
   form under 720px. 16px gutters, no sideways scroll. Locky Design System tokens only. */
:root { --lk-metal: rgba(5, 8, 60, .10); --lk-vent: rgba(5, 8, 60, .22); --lk-plate: var(--surface); --lk-edge: var(--keyline); }
:root[data-theme="dark"] { --lk-metal: rgba(0, 0, 0, .22); --lk-vent: rgba(0, 0, 0, .38); --lk-plate: var(--raised); --lk-edge: #000000; }

.view[data-page="locker"] { --locky: url(/img/locky-friends.png); --locky-shows: block; }

/* Each door's colour. */
.lk-face-blue { --lk-face: var(--face-blue); }
.lk-face-sky { --lk-face: var(--face-sky); }
.lk-face-green { --lk-face: var(--face-green); }
.lk-face-coral { --lk-face: var(--face-coral); }
.lk-face-gold { --lk-face: var(--face-gold); }
.lk-face-sand { --lk-face: var(--face-sand); }
.lk-face-lav { --lk-face: var(--face-lav); }
.lk-face-grey { --lk-face: var(--face-grey); }

/* The room */
.lk-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 16px; min-width: 0; }
.lk-filters input[type="search"] { flex: 1 1 220px; min-width: 0; max-width: 360px; }
.lk-chips { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.lk-chip { border: 0; cursor: pointer; font: inherit; }
.lk-chip-on { --chip-face: var(--face-blue); box-shadow: 0 0 0 2px var(--keyline); }
.lk-daytime { margin: 0; }
.lk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; min-width: 0; }
.lk-grid > .empty { grid-column: 1 / -1; }

/* A door */
.lk-door {
  position: relative; display: grid; align-content: start; justify-items: center; gap: 8px; min-width: 0; min-height: 260px;
  padding: 34px 12px 14px; border-radius: var(--radius); color: var(--face-ink); text-decoration: none; text-align: center;
  background: linear-gradient(180deg, var(--lk-metal), rgba(0, 0, 0, 0) 40%), var(--lk-face, var(--face-sky));
  box-shadow: 0 0 0 2px var(--lk-edge), inset 0 -4px 0 rgba(5, 8, 60, .16), 0 3px 0 var(--lk-edge);
  transform-origin: left center; transition: transform .2s ease;
}
a.lk-door:hover, a.lk-door:focus-visible { transform: perspective(700px) rotateY(-6deg); color: var(--face-ink); }
a.lk-door:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.lk-vents {
  position: absolute; top: 12px; left: 50%; width: 46px; height: 14px; transform: translateX(-50%);
  background: repeating-linear-gradient(180deg, var(--lk-vent) 0 2px, transparent 2px 6px);
  border-radius: 2px;
}
.lk-porthole {
  display: grid; place-items: center; width: 84px; height: 84px; border-radius: 999px; overflow: hidden;
  background: var(--lk-plate); box-shadow: 0 0 0 2px var(--lk-edge), inset 0 3px 0 var(--lk-metal);
}
.lk-locky { display: block; width: 72%; height: auto; }
.lk-plate {
  display: grid; gap: 2px; max-width: 100%; padding: 4px 12px; border-radius: var(--radius-s);
  background: var(--lk-plate); color: var(--ink); box-shadow: 0 0 0 2px var(--lk-edge);
}
.lk-name { margin: 0; font-size: 15px; font-weight: 800; overflow-wrap: anywhere; }
.lk-org { font-size: 12px; color: var(--muted); }
.lk-line { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
.lk-line-empty { font-style: italic; opacity: .8; }
.lk-updated { margin: 0; font-size: 12px; opacity: .8; }
.lk-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin: 0; }
.lk-tag { --chip-face: var(--lk-plate); color: var(--ink); }
.lk-more { font-size: 12px; align-self: center; }
.lk-facts { margin: 0; font-size: 12.5px; font-weight: 600; }

.lk-door-big { min-height: 0; padding: 40px 16px 18px; }
.lk-door-big .lk-porthole { width: 120px; height: 120px; }
.lk-door-big .lk-name { font-size: 22px; }
.lk-door-big .lk-line { font-size: 16px; }

/* One locker */
.lk-page { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); align-items: start; }
.lk-page-door { display: grid; gap: 12px; min-width: 0; }
.lk-actions { display: grid; gap: 10px; justify-items: start; min-width: 0; }
.lk-about p, .lk-goal p { margin: 0 0 6px; overflow-wrap: anywhere; }
.lk-goal-text { font-weight: 700; }
.lk-picked li, .lk-waves li { overflow-wrap: anywhere; }
.lk-wave-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.lk-wave { position: relative; }
.lk-wave > summary { list-style: none; cursor: pointer; }
.lk-wave > summary::-webkit-details-marker { display: none; }
.lk-wave-menu { display: grid; gap: 6px; margin-top: 8px; padding: 8px; border-radius: var(--radius-s); background: var(--surface); box-shadow: 0 0 0 2px var(--line-strong); }
.lk-wave-line { justify-content: flex-start; text-align: left; }
.lk-thanks { display: grid; gap: 8px; min-width: 0; width: 100%; }
.lk-for-field { margin: 0; }

/* Your locker */
.lk-edit { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); align-items: start; }
.lk-edit-side { display: grid; gap: 6px; min-width: 0; }
.lk-sub { margin: 6px 0 8px; font-size: 14px; }
.lk-poses { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; margin-bottom: 12px; }
.lk-pose { position: relative; display: grid; place-items: center; padding: 4px; border-radius: var(--radius-s); background: var(--sunk); cursor: pointer; }
.lk-pose .lk-locky { width: 56px; height: 56px; }
.lk-swatches { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.lk-swatch { position: relative; display: block; width: 32px; height: 32px; border-radius: 999px; background: var(--lk-face); box-shadow: 0 0 0 2px var(--lk-edge); cursor: pointer; }
.lk-radio { position: absolute; opacity: 0; width: 1px; height: 1px; }
.lk-pose:has(.lk-radio:checked) { box-shadow: 0 0 0 3px var(--accent); }
.lk-swatch:has(.lk-radio:checked) { box-shadow: 0 0 0 2px var(--lk-edge), 0 0 0 5px var(--accent); }
.lk-pose:has(.lk-radio:focus-visible), .lk-swatch:has(.lk-radio:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
/* A task row with its Show/Shown toggle at the right, like other row actions; .plain-list li is a grid, so say flex. */
.plain-list li.lk-choice { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; overflow-wrap: anywhere; }
.lk-choice-text { flex: 1 1 200px; min-width: 0; }
.btn.lk-toggle { flex: 0 0 auto; width: auto; }
.btn.lk-shown { background: var(--face-green); color: var(--face-ink); }
/* A task link and its "· Done 9 Nov" on one line. */
.plain-list li.lk-taskrow { display: block; }

.lk-door[hidden], .lk-grid[hidden], .lk-filters[hidden], .lk-chips[hidden], .lk-page[hidden], .lk-edit[hidden], .lk-wave-row[hidden],
.lk-choice[hidden], .lk-swatch[hidden], .lk-pose[hidden], .lk-poses[hidden], .lk-swatches[hidden], .lk-actions[hidden], .lk-thanks[hidden] { display: none; }

@media (min-width: 720px) {
  .lk-page { grid-template-columns: minmax(240px, 300px) minmax(0, 1fr); }
  .lk-edit { grid-template-columns: minmax(0, 1fr) minmax(200px, 240px); }
  .lk-edit-side { position: sticky; top: 16px; }
}
@media (max-width: 560px) {
  .lk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .lk-door { min-height: 220px; padding: 30px 8px 12px; }
  .lk-porthole { width: 64px; height: 64px; }
}
@media (prefers-reduced-motion: reduce) {
  .lk-door { transition: none; }
  a.lk-door:hover, a.lk-door:focus-visible { transform: none; }
}
