/* The seasonal altar (/altar). Two parts, set apart: the word board, where you
   make a blessing and its card, and the altar, where blessings are laid round
   Susan's candle. The board is day and the altar is night. `.al-night` is the
   night scope (the Luminaries' colours, without turning the whole page dark);
   the board's own photo panel is night too, so its tiles read the same on any
   ground. Built from the prototype in design-canvas/word-board/. */
.altar {
  --tile: #fffdf7;
  --tile-ink: var(--ink);
  --gold-soft: var(--cream);
  --strip: rgba(243, 227, 189, .16);
  --al-line: rgba(233, 225, 204, .22);
  --slip: var(--paper-alt);
  --slip-soft: #5b564a;
  --slip-line: var(--rule);
  background: var(--paper); color: var(--ink);
}
.altar [hidden] { display: none !important; }
.altar .lede { max-width: 62ch; color: var(--ink-soft); margin: 10px 0 0; }
.altar .lede b { color: var(--ink); font-weight: 600; }
.altar h2 { text-align: left; }

.al-night { color: var(--moon); }
.al-night h1, .al-night h2, .al-night h3 { color: var(--cream); }
.al-night .eyebrow { color: var(--gold); }
.al-night .muted, .al-night .lede { color: var(--moon-soft); }
.al-night .lede b { color: var(--gold-soft); font-weight: 500; }
.al-night a:not(.btn) { color: var(--gold); }
.al-night .card { background: var(--night-card); border-color: var(--night-line); }
.altar .btn.quiet { background: transparent; color: var(--ink); border-color: var(--rule); }
.altar .btn.quiet:hover { border-color: var(--ink); }
.al-night .btn { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.al-night .btn:hover { background: #d9ab1f; border-color: #d9ab1f; color: var(--ink); }
.altar .al-night .btn.quiet { background: transparent; color: var(--gold-soft); border-color: var(--al-line); }
.altar .al-night .btn.quiet:hover { border-color: var(--gold); color: var(--cream); }

.al-open { padding: 36px 0 56px; }
/* The page's copy sits on the site's cards. */
.al-head { display: grid; gap: 6px; margin-bottom: 22px; padding: 26px 30px 28px; }
.al-head h1 { font-size: clamp(2.4rem, 5.4vw, 3.8rem); margin: 0; }
.al-head .lede { margin: 8px 0 0; }

/* The board: Things and Doings above the strip, Describing and Connecting
   below it, over the season's photograph. */
.board {
  position: relative; border-radius: 20px; overflow: clip; padding: 0;   /* clip, not hidden: hidden would trap the sticky strip */
  background: var(--night) center / cover no-repeat;   /* the season's photo, set by altar.js */
}
.board::before { content: ""; position: absolute; inset: 0; background: rgba(17, 24, 20, .62); }
/* Things and Doings above the strip, Describing and Connecting below it, with
   tiles small enough that the whole board fits on a laptop screen (Cassidy,
   2026-11-15: scrolling between corners made the words hard to see; she kept
   this arrangement over the four corners in a row). */
.board-inner {
  position: relative; display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas: "nouns verbs" "strip strip" "desc conn";
  gap: 16px 28px; padding: 20px 22px 22px;
}
.board .tile { font-size: .88rem; padding: 7px 9px 6px; }
.board .tiles { gap: 6px; }
.corner { display: grid; gap: 8px; align-content: start; min-width: 0; }
.board .corner h3 {
  margin: 0; font-family: var(--font-head); font-style: italic; font-weight: 400;
  font-size: 1.1rem; color: var(--gold-soft); text-align: left;
}
.corner-note { font-style: normal; font-family: var(--font-body); font-size: .8rem; color: var(--moon-soft); }
.tiles { display: flex; flex-wrap: wrap; gap: 7px; }
#c-nouns { grid-area: nouns; } #c-verbs { grid-area: verbs; }
#c-desc { grid-area: desc; } #c-conn { grid-area: conn; }

.tile {
  font: 500 1rem/1 var(--font-body); color: var(--tile-ink); background: var(--tile);
  border: 0; padding: 9px 12px 8px; border-radius: 2px;
  box-shadow: 0 2px 0 rgba(0,0,0,.28); cursor: grab;
  user-select: none; -webkit-user-select: none; touch-action: manipulation;
}
.tile.gold { background: var(--gold-soft); box-shadow: inset 0 -3px 0 var(--gold), 0 2px 0 rgba(0,0,0,.28); }
.tile.used { visibility: hidden; }
.tile:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.tile.ghost {
  position: fixed; z-index: 80; pointer-events: none; margin: 0;
  transform: rotate(-3deg); box-shadow: 0 10px 22px rgba(0,0,0,.45);
}

.strip-row { grid-area: strip; display: grid; gap: 10px; }
.strip {
  min-height: 56px; display: flex; flex-wrap: wrap; gap: 7px; align-items: center;
  padding: 12px; background: var(--strip);
  border: 1px dashed rgba(243, 227, 189, .5); border-radius: 4px;
}
.strip .tile { touch-action: none; }
.strip.over { border-style: solid; border-color: var(--gold); }
.strip-empty { color: var(--moon-soft); font-style: italic; font-family: var(--font-head); font-size: 1.1rem; padding-left: 4px;
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.strip-empty .tile.eg { opacity: .4; font-style: normal; pointer-events: none; cursor: default; }
/* A drawn blessing: its tiles turn up one by one, like cards laid down. */
.strip.drawn .tile { animation: al-deal .45s ease-out both; }
.strip.drawn .tile:nth-child(2) { animation-delay: .06s; } .strip.drawn .tile:nth-child(3) { animation-delay: .12s; }
.strip.drawn .tile:nth-child(4) { animation-delay: .18s; } .strip.drawn .tile:nth-child(5) { animation-delay: .24s; }
.strip.drawn .tile:nth-child(6) { animation-delay: .3s; }  .strip.drawn .tile:nth-child(n+7) { animation-delay: .36s; }
@keyframes al-deal { from { opacity: 0; transform: translateY(-8px) rotate(-4deg); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .strip.drawn .tile { animation: none; } }
.caret { width: 3px; align-self: stretch; background: var(--gold); border-radius: 2px; }
.reads {
  margin: 0; min-height: 1.3em; font-family: var(--font-head);
  font-size: clamp(1.35rem, 2.6vw, 1.75rem); line-height: 1.2; color: var(--moon);
  text-shadow: 0 1px 12px rgba(0,0,0,.6); text-wrap: balance;
}
.reads:empty::before { content: "Your blessing will read here"; font-style: italic; color: var(--moon-soft); }

.altar .controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.altar .btn:disabled { opacity: .45; cursor: default; }
.altar .status { color: var(--ink-soft); font-size: .9rem; min-height: 1.4em; }
.al-night .status { color: var(--moon-soft); }
.key { display: flex; flex-wrap: wrap; gap: 14px; font-size: .85rem; color: var(--ink-soft); padding-top: 12px; }
.key i { display: inline-block; width: 18px; height: 12px; vertical-align: -1px; margin-right: 6px; border-radius: 2px; }
.key .k-gold { background: var(--gold-soft); box-shadow: inset 0 -3px 0 var(--gold); }
.key .k-white { background: var(--tile); box-shadow: inset 0 0 0 1px var(--rule); }

/* Done: the card */
.done {
  display: grid; grid-template-columns: minmax(240px, 340px) minmax(0, 1fr);
  gap: 40px; align-items: center; padding: 8px 0 0;
}
.card-frame canvas { display: block; width: 100%; height: auto; border-radius: 6px; box-shadow: 0 18px 40px rgba(31, 43, 36, .35); }
.done-text { display: grid; gap: 12px; min-width: 0; padding: 28px 30px; }
.done-text h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); }
.done-text p { margin: 0; color: var(--ink-soft); max-width: 56ch; }
.sign { font-size: .9rem; color: var(--ink); font-weight: 500; margin-top: 4px; }
.sign span { color: var(--ink-soft); font-weight: 400; }
.name {
  font: 400 .95rem ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  background: var(--field); color: var(--ink);
  border: 1px solid var(--rule); border-radius: 6px; padding: 10px 14px; width: 16rem; max-width: 100%;
}
.handle-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.art-pick { border: 0; padding: 0; margin: 4px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.art-pick legend { font-size: .9rem; color: var(--ink); font-weight: 500; padding: 0; margin-bottom: 8px; }
.art-pick label {
  position: relative; display: flex; align-items: center; gap: 10px; cursor: pointer;
  padding: 7px 14px 7px 7px; border: 1px solid var(--rule); border-radius: 8px; font-size: .9rem; background: var(--paper);
}
.art-pick img, .art-pick .grid-thumb { width: 44px; height: 44px; object-fit: cover; margin: 0; max-width: none; aspect-ratio: 1; border-radius: 22px 22px 3px 3px; }
/* The card is the site's .card, whose own rule bleeds an <img> to its edges. */
.art-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.art-pick label:has(input:checked) { border-color: var(--gold); background: rgba(199, 152, 6, .12); color: var(--ink); }
.art-pick label:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 2px; }

/* Two ways to keep a copy: the printed card and the phone wallpaper */
.keeps { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 8px; }
.keep { display: grid; gap: 8px; align-content: start; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.keep h3 { margin: 0; font-size: 1.2rem; }
.keep p { font-size: .88rem; }
.keep .btn { justify-self: start; margin-top: 4px; }
.keep-wall { display: flex; gap: 14px; align-items: flex-start; }
.keep-wall > div { display: grid; gap: 8px; }
.wall-thumb { width: 64px; height: auto; flex: none; border-radius: 9px; border: 2px solid #2a2a2a; box-shadow: 0 6px 14px rgba(0,0,0,.4); }
.sky-pick { border: 0; padding: 0; margin: 0; display: flex; gap: 8px; }
.sky-pick label { position: relative; cursor: pointer; padding: 5px 12px; border: 1px solid var(--rule); border-radius: 999px; font-size: .85rem; }
.sky-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sky-pick label:has(input:checked) { border-color: var(--gold); background: rgba(199, 152, 6, .12); color: var(--ink); }
.sky-pick label:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 2px; }
@media (max-width: 900px) { .keeps { grid-template-columns: 1fr; } }

/* The altar: Susan's candle at the centre, blessings laid round it as slips */
.al-altar { position: relative; padding: 64px 0 80px; background: var(--night); }
.al-altar > .container { position: relative; }
.altar-grid { display: grid; grid-template-columns: minmax(200px, 300px) minmax(0, 1fr); gap: 40px; align-items: center; }
.altar-head { display: grid; gap: 10px; padding: 28px 30px; }
.altar-head p { margin: 0; color: var(--moon-soft); max-width: 62ch; }
.candle-fig { position: relative; margin: 0; border-radius: 6px; overflow: hidden; box-shadow: 0 18px 40px rgba(0,0,0,.5); }
.candle-fig img { display: block; width: 100%; height: auto; }
.candle-fig figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 22px 12px 10px;
  font-family: var(--font-head); font-style: italic; font-size: .95rem; color: var(--moon); text-align: center;
  background: linear-gradient(to top, rgba(17, 24, 20, .85), rgba(17, 24, 20, 0));
}
/* The flame is drawn until there is a photograph of the candle lit. Its place
   on the wick is per candle (`flame` in SEASONS), set as --fx / --fy. */
.candle-fig::after {
  content: ""; position: absolute; left: var(--fx, 50%); top: calc(var(--fy, 25%) - 5%);
  width: 120%; aspect-ratio: 1; transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 196, 110, .42) 0%, rgba(255, 170, 80, .16) 22%, rgba(255, 160, 60, 0) 50%);
  mix-blend-mode: screen; pointer-events: none; animation: al-glow 3.2s ease-in-out infinite;
}
.flame-drawn {
  position: absolute; left: var(--fx, 50%); top: var(--fy, 25%); width: 6%; height: 12%;
  transform: translate(-50%, -100%); transform-origin: 50% 100%;
  border-radius: 50% 50% 46% 46% / 64% 64% 36% 36%;
  background: radial-gradient(ellipse at 50% 78%, #fffbe8 0%, #ffe39a 28%, #ffb347 55%, rgba(255, 120, 30, 0) 80%);
  filter: blur(.4px); z-index: 1; animation: al-flicker 2.6s ease-in-out infinite;
}
.flame-drawn::before {
  content: ""; position: absolute; left: 50%; bottom: 6%; width: 34%; height: 30%; transform: translateX(-50%);
  border-radius: 50%; background: radial-gradient(ellipse, rgba(90, 120, 255, .55), rgba(90, 120, 255, 0) 70%);
}
@keyframes al-flicker {
  0%, 100% { transform: translate(-50%, -100%) scale(1, 1) rotate(0deg); }
  20% { transform: translate(-50%, -100%) scale(.96, 1.06) rotate(-1.5deg); }
  45% { transform: translate(-50%, -100%) scale(1.03, .95) rotate(1deg); }
  70% { transform: translate(-50%, -100%) scale(.98, 1.04) rotate(-.6deg); }
}
@keyframes al-glow { 0%, 100% { opacity: .9; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .flame-drawn, .candle-fig::after { animation: none; }
  .tile.ghost { transform: none; }
}

.wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; margin-top: 44px; }
.line-card {
  display: grid; gap: 12px; align-content: space-between;
  padding: 20px 18px 14px; color: var(--tile-ink);
  background: var(--slip); box-shadow: 0 6px 16px rgba(0,0,0,.35);
  border-radius: 2px; transform: rotate(-.5deg);
}
.line-card:nth-child(3n+2) { transform: rotate(.6deg); }
.line-card:nth-child(3n) { transform: rotate(-.2deg); }
.line-card q { font-family: var(--font-head); font-size: 1.35rem; line-height: 1.25; quotes: none; }
.line-card .meta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 10px; color: var(--slip-soft); font-size: .85rem; }
.candle {
  display: inline-flex; align-items: center; gap: 6px;
  font: 500 .85rem var(--font-body); color: var(--slip-soft);
  background: transparent; border: 1px solid var(--slip-line); border-radius: 999px; padding: 6px 11px; cursor: pointer;
}
.candle svg, .held svg { width: 12px; height: 16px; flex: none; }
.candle .flame, .held .flame { fill: none; }
.candle[aria-pressed="true"] { color: var(--tile-ink); border-color: var(--gold); background: rgba(199, 152, 6, .12); }
.candle[aria-pressed="true"] .flame, .held.lit .flame { fill: var(--gold); }
.candle:focus-visible, .remove:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.remove { font: 500 .8rem var(--font-body); color: var(--slip-soft); background: none; border: 0; padding: 4px 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.held { display: flex; align-items: center; gap: 7px; font-size: .85rem; color: var(--slip-soft); font-style: italic; }
.held.lit { color: var(--tile-ink); font-style: normal; }
.wall-empty { grid-column: 1 / -1; margin: 0; color: var(--moon-soft); font-style: italic; font-family: var(--font-head); font-size: 1.15rem; }

/* Between seasons: the opening date over last season's found poem */
.al-soon { position: relative; padding: 64px 0 80px; text-align: center; background: var(--night); }
.al-soon > .container { position: relative; }
.soon-card { padding: 30px 30px 32px; }
.al-soon h1 { font-size: clamp(2.4rem, 5.4vw, 3.8rem); margin: 6px 0 0; }
.al-soon .lede { margin: 14px auto 0; }
.al-last { margin-top: 64px; text-align: center; }
.al-last .found-poem { margin-top: 14px; }
.found-poem { margin: 48px auto 0; padding: 36px 28px 28px; max-width: 560px; background: var(--slip); color: var(--tile-ink); border-radius: 2px; box-shadow: 0 10px 30px rgba(0,0,0,.4); transform: rotate(-.4deg); }
.altar .found-poem h2 { color: var(--ink); text-align: center; font-size: clamp(1.6rem, 3.6vw, 2.2rem); }
.poem { margin: 18px 0 14px; font-family: var(--font-head); font-size: 1.3rem; line-height: 1.5; }
.poem p { margin: 0; }
.altar .found-poem .muted { color: var(--slip-soft); font-size: .85rem; margin: 0; }

@media (max-width: 720px) {
  .al-open { padding-top: 20px; }
  .al-head, .done-text, .altar-head, .soon-card { padding: 22px 20px; }
  .board-inner {
    grid-template-columns: 1fr;
    grid-template-areas: "strip" "conn" "desc" "nouns" "verbs";  /* sentence order: May the golden hearth glow */
    padding: 18px 14px;
  }
  /* The strip stays in reach under the sticky header while you scroll the corners. */
  /* Solid, with a shadow, so the tiles scrolling under it never show through. */
  .strip-row {
    position: sticky; top: 77px; z-index: 5; margin: -18px -14px 0; padding: 14px;
    background: var(--night); border-bottom: 1px solid var(--al-line);
    box-shadow: 0 10px 18px -8px rgba(0,0,0,.7);
  }
  .strip-row .btn { padding: 11px 20px; font-size: .9rem; }
  .strip-row .status:empty { display: none; }
  .board .tile { font-size: .95rem; padding: 9px 10px 8px; }
  .done { grid-template-columns: 1fr; justify-items: center; gap: 28px; }
  .card-frame { width: min(300px, 100%); }
  /* The candle centres; the words stay left-aligned. */
  .altar-grid { grid-template-columns: 1fr; gap: 28px; }
  .candle-fig { width: min(260px, 100%); justify-self: center; }
  .found-poem { padding: 28px 18px 22px; }
  .poem { font-size: 1.12rem; }
}

/* Short screens (a square phone, a phone held sideways): the pinned strip and
   the site's pinned header would fill the screen, so here the header scrolls
   away, the strip pins to the very top, and it shrinks to the words and two
   small buttons. The line that reads the blessing out hides until there is one. */
@media (max-width: 720px) and (max-height: 640px) {
  /* relative, not static: the phone menu hangs from the header (top: 100%). */
  body.altar-page .site-header { position: relative; }
  .strip-row { top: 0; gap: 6px; padding: 8px 14px; }
  .reads { font-size: 1.15rem; }
  .reads:empty { display: none; }
  .strip { min-height: 44px; padding: 6px; gap: 5px; }
  .strip-empty { font-size: .95rem; }
  .strip .tile { padding: 7px 9px 6px; font-size: .9rem; }
  .strip-row .controls { gap: 8px; }
  .strip-row .btn { padding: 7px 14px; font-size: .82rem; }
}


/* No empty line held open under the buttons; a message takes its own room. */
.strip-row .status:empty { display: none; }


/* ---- Day and night (Cassidy's pick "A", 2026-11-15, over the site's own
   light and dark sections with paper cards throughout): the board under a morning sky, the altar after sunset.
   The sky turns to dusk and then to night at the top of the altar, so going
   down the page is going into evening, with stars and the candle's warmth. */
.altar .al-open {
  background:
    radial-gradient(circle at 84% -6%, rgba(255, 221, 140, .7), rgba(255, 221, 140, 0) 30%),
    linear-gradient(#efe3c3 0, #f7f0de 260px, var(--paper) 620px);
}
.altar .al-altar { padding-top: 220px; background:
    linear-gradient(var(--paper) 0, #f1d9ab 50px, #d39a63 105px, #7a4a3c 150px, #2b2522 195px, var(--night) 240px); }
.altar .al-altar::before, .altar .al-soon::before {
  content: ""; position: absolute; inset: 180px 0 0; pointer-events: none;
  background-image:
    radial-gradient(circle at 18% 30%, rgba(255, 250, 230, .85) 0 1px, transparent 1.6px),
    radial-gradient(circle at 62% 12%, rgba(255, 250, 230, .6) 0 .8px, transparent 1.4px),
    radial-gradient(circle at 84% 64%, rgba(255, 250, 230, .75) 0 1px, transparent 1.6px),
    radial-gradient(circle at 40% 82%, rgba(255, 250, 230, .5) 0 .8px, transparent 1.4px),
    radial-gradient(circle at 8% 74%, rgba(255, 250, 230, .55) 0 .7px, transparent 1.3px);
  background-size: 230px 190px, 170px 230px, 260px 210px, 150px 170px, 210px 260px;
  -webkit-mask-image: linear-gradient(transparent, #000 160px, #000 60%, transparent);
          mask-image: linear-gradient(transparent, #000 160px, #000 60%, transparent);
  opacity: .8;
}
.altar .al-soon::before { inset: 0; }
.altar .altar-grid { position: relative; }
.altar .altar-grid::before {          /* the candle's warmth on the night around it */
  content: ""; position: absolute; left: -10%; top: -30%; width: 70%; aspect-ratio: 1; pointer-events: none;
  background: radial-gradient(circle, rgba(255, 170, 80, .16), rgba(255, 170, 80, 0) 62%);
}
.altar .altar-grid > * { position: relative; }

@media (max-width: 720px) {
  .altar .al-altar { padding-top: 170px; background:
    linear-gradient(var(--paper) 0, #f1d9ab 36px, #d39a63 76px, #7a4a3c 112px, #2b2522 145px, var(--night) 180px); }
  .altar .al-altar::before { top: 140px; }
}

/* Admin mode (Cassidy): a note above the wall and a Remove on every blessing. */
.admin-bar { margin: 36px 0 0; padding: 10px 14px; border: 1px dashed var(--rust); border-radius: 4px; color: #e3a487; font-size: .88rem; }
.admin-bar .remove { color: var(--cream); margin-left: 6px; }
.line-card .admin-remove { color: var(--rust); }

/* Editing your own blessing: a note above the strip, with a way out. */
.edit-note { margin: 0; font-size: .92rem; color: var(--gold-soft); }
.edit-note .remove { margin-left: 6px; }
