/* Sill — what the room asks her: the lock, and the naming input.
 *
 * Split from surfaces.css when that file passed the linter's ~300 lines (`ENG-3.1`),
 * and along the seam that was already there (`ENG-3.2`): these two are the room
 * putting a question to her, while the book and the jars are the things she reads.
 *
 * Both are a single line with nothing around it, and neither explains itself — §7
 * for the naming, §19.5 for the lock. Tokens live in sill.css. */

[hidden] { display: none !important; }

/* --- the lock (§19.5) -----------------------------------------------------
 *
 * One input in the middle of a dark room, saying nothing. It is the naming input's
 * twin on purpose: the same single line, the same silence, the same refusal to
 * explain itself — the first thing she meets on a new phone should feel like part of
 * the room rather than a door the room has grown. */

.lock {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(70vw, 260px);
}

.lock-input {
  width: 100%;
  padding: 6px 2px;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--tarnish);
  border-radius: 0;                     /* iOS rounds text inputs by default */
  color: var(--vellum);
  font: inherit;
  font-size: 1.05rem;
  text-align: center;
  letter-spacing: 0.3em;
  caret-color: var(--tarnish);
  appearance: none;
  outline: none;
}

/* --- the naming (§7) ------------------------------------------------------ */

.naming {
  position: absolute;
  left: 50%;
  bottom: 26%;
  transform: translateX(-50%);
  width: min(70vw, 260px);
  opacity: 0;
  transition: opacity 1400ms ease-in;   /* it arrives; it does not interrupt */
}

.naming.is-offered { opacity: 1; }

.naming-input {
  width: 100%;
  padding: 6px 2px;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--tarnish);
  border-radius: 0;                     /* iOS rounds text inputs by default */
  color: var(--vellum);
  font: inherit;
  font-size: 1.05rem;
  text-align: center;
  caret-color: var(--tarnish);
  appearance: none;
  outline: none;
}

/* --- the jars (story 9.1.6) -----------------------------------------------
 *
 * Everything the cat has ever brought her, a shelf at a time. The shelf grid and the
 * reader panel that used to hold these are gone: his letters are pages in the book,
 * and what the cat brought is in the jars.
 *
 * A row is the thing's own silhouette, his word for it, and the day it arrived — and
 * nothing anywhere says which tier it came from (§6). */

.gifts {
  position: absolute;
  inset: 0;
  background: var(--night);
  overflow-y: auto;                 /* the jars scroll; the room never does */
  -webkit-overflow-scrolling: touch;
  padding: max(28px, env(safe-area-inset-top)) 18px max(24px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 16px;
}

.gift-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}

.gift {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 12px;
  align-items: center;
  min-height: 44px;                 /* §9: nothing smaller than a thumb */
  padding: 4px 2px;
}

.gift-shape { width: 26px; height: 26px; display: block; }
.gift-shape .object { fill: var(--tarnish); }

.gift-name {
  color: var(--vellum);
  font-size: .98rem;
  line-height: 1.35;
}

.gift-day {
  color: var(--tarnish);
  font-size: .82rem;
  font-variant-numeric: tabular-nums;
}

.shelves {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.shelf-number {
  appearance: none;
  background: none;
  border: 1px solid var(--tarnish);
  border-radius: 999px;
  min-width: 48px;
  min-height: 44px;
  color: var(--tarnish);
  font: inherit;
  font-variant-numeric: tabular-nums;
  -webkit-tap-highlight-color: transparent;
}

.shelf-number[aria-current="true"] { color: var(--vellum); border-color: var(--vellum); }

.gifts-empty { min-height: 60vh; }
