/* Choosing a room (Plan 26, from the Plan 23 lab's pick.css): at a writer's first visit, and again from the You
 * menu. It wears the website's own Boreal Ink ground rather than any one room, and lets the four small pictures
 * carry all the colour. The tested tokens are the page's own: paper-coloured type on the ink ground. */
.pick {
  --ground: #081d21;
  --panel: #123438;
  --text: #ede8db;
  --text-soft: #b5c9c6;
  --text-faint: #8aa6a2;
  --sea: #a7dbce;
  --lilac: #c1ace8;
  background: radial-gradient(70vw 50vh at 50% -10%, rgba(167, 219, 206, .08), transparent 70%) no-repeat, var(--ground);
  color: var(--text);
  min-height: 100vh; min-height: 100dvh;
}
html:has(body.pick) { background: #081d21; }
.pick ::selection { background: var(--sea); color: var(--ground); }

.p-top { display: flex; align-items: center; padding: 1.4rem clamp(1rem, 4vw, 3rem) 0; }
.p-brand { display: inline-flex; align-items: center; gap: .6rem; min-height: 44px; color: var(--text); text-decoration: none; font-size: 1.35rem; }
.p-brand img { width: 28px; height: 28px; }

.p-main { width: min(100% - 2rem, 70rem); margin: 0 auto; padding: clamp(2rem, 6vh, 4rem) 0 4rem; }
.p-head { max-width: 40rem; margin-bottom: 2.2rem; }
.p-sent { display: inline-flex; align-items: center; gap: .5rem; margin: 0 0 1rem; font: 500 .9rem/1.3 var(--font-body); color: var(--sea); }
.p-sent svg { width: 18px; height: 18px; }
.p-sent a { display: inline-flex; align-items: center; min-height: 44px; margin: -.8rem 0; color: var(--text-soft); }
.p-head h1 { font: 300 clamp(2.2rem, 4.4vw, 3.4rem)/1.05 var(--font-head); letter-spacing: -.02em; text-wrap: balance; }
.p-lede { margin: 1rem 0 0; color: var(--text-soft); font-size: 1.05rem; line-height: 1.6; max-width: 36rem; }

fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.p-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.2rem 1.8rem; max-width: 60rem; }

/* a room: its picture, then its name and one line */
.p-tile { position: relative; display: grid; gap: .35rem; align-content: start; cursor: pointer; border-radius: 14px; -webkit-tap-highlight-color: transparent; }
.p-pic { position: relative; display: block; overflow: hidden; border-radius: 12px; aspect-ratio: 16 / 10; background: var(--panel);
  box-shadow: 0 0 0 1px rgba(167, 219, 206, .14), 0 18px 34px -22px rgba(0, 0, 0, .9);
  transition: box-shadow .2s ease, transform .25s cubic-bezier(.2, .7, .3, 1); }
.p-pic img { display: block; width: 100%; height: 100%; object-fit: cover; transition: filter .2s ease; filter: saturate(.9) brightness(.92); }
.p-tile:hover .p-pic { transform: translateY(-3px); }
.p-tile:hover .p-pic img, .p-tile:has(input:checked) .p-pic img { filter: none; }
.p-tile:has(input:checked) .p-pic { box-shadow: 0 0 0 2px var(--sea), 0 0 0 6px rgba(167, 219, 206, .16), 0 22px 40px -22px rgba(0, 0, 0, .95); }
.p-tile:has(input:focus-visible) .p-pic { outline: 2px solid var(--lilac); outline-offset: 6px; }
.p-tick { position: absolute; top: .6rem; right: .6rem; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--sea); color: var(--ground); transform: scale(0); transition: transform .3s cubic-bezier(.3, 1.6, .5, 1); }
.p-tick svg { width: 18px; height: 18px; }
.p-tile:has(input:checked) .p-tick { transform: scale(1); }
.p-name { margin-top: .55rem; font: 400 1.3rem/1.2 var(--font-head); letter-spacing: -.01em; }
.p-tag { display: inline-block; margin-left: .3rem; padding: .15rem .5rem; border-radius: 99px; vertical-align: .2em;
  font: 500 .72rem/1.3 var(--font-body); color: var(--sea); box-shadow: inset 0 0 0 1px rgba(167, 219, 206, .45); }
.p-line { color: var(--text-soft); font-size: .95rem; line-height: 1.5; }

/* Morning Pages: the picture is its desk from morning to night, so name the hours along its foot (the words keep
 * the morning's wide share; see build-pick.py) */
.p-hours { position: absolute; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: 46fr 18fr 18fr 18fr; padding: 1.4rem 0 .45rem;
  background: linear-gradient(transparent, rgba(8, 29, 33, .78)); }
.p-hours i { font: 500 .7rem/1 var(--font-body); font-style: normal; text-align: center; color: #f3efe6; letter-spacing: .01em; }

/* the choice; on phones the button rides along the bottom of the screen while the rooms scroll under it */
.p-act { display: inline-block; vertical-align: middle; margin: 2.4rem 1.6rem 0 0; }
.p-sent a:focus-visible, .p-brand:focus-visible { outline: 2px solid var(--lilac); outline-offset: 3px; border-radius: 4px; }

@media (max-width: 640px) {
  .p-top { padding-top: 1rem; }
  .p-head { margin-bottom: 1.6rem; }
  .p-lede { font-size: 1rem; }
  .p-grid { gap: 1.4rem .9rem; }
  .p-name { font-size: 1.08rem; margin-top: .4rem; }
  .p-tag { margin: .25rem 0 0; display: table; }
  .p-line { font-size: .84rem; line-height: 1.45; }
  .p-hours { padding-top: 1rem; }
  .p-hours i::first-letter { font-size: .72rem; }
  .p-tick { width: 24px; height: 24px; top: .4rem; right: .4rem; }
  .p-act { position: sticky; bottom: 0; z-index: 2; display: block; margin: 1.2rem -1rem 0; padding: 1.4rem 1rem calc(.9rem + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(rgba(8, 29, 33, 0), var(--ground) 38%); }
  .p-act .cta { width: 100%; }
  .p-hours i { font-size: 0; }
}
