/* room.css: every subpage is a sheet of paper pinned to the wall of the room.
   The wall is painted by the hour (room.js); the sheet stays paper so reading never changes.
   Loaded after each page's own <style>, so it wins at equal specificity. */

html, body { background: var(--r-wall, #d8cdb8) !important; }
body {
  display: flow-root; min-height: 100svh;
  background-image:
    radial-gradient(60vmax 50vmax at 92% 8%, color-mix(in srgb, #FFD68A calc(var(--r-lamp, .12) * 34%), transparent), transparent 70%),
    radial-gradient(70vmax 60vmax at 12% 0%, color-mix(in srgb, var(--r-wallhi, #e6dfd0) 55%, transparent), transparent 70%) !important;
  background-attachment: fixed !important;
}
/* skirting board and floor, fixed behind the sheet */
body::before {
  content: ""; position: fixed; left: 0; right: 0; bottom: 0; height: 12svh; z-index: -1; pointer-events: none;
  background:
    linear-gradient(var(--r-wallshade, #9d9da0) 0 10px, transparent 10px),
    repeating-linear-gradient(90deg, transparent 0 180px, rgba(40,24,12,.10) 180px 182px),
    var(--r-floor, #a88e78);
}

/* the sheet */
.page {
  --bg: #F3ECDC; --fg: #22304F; --dim: #5C574E; --line: #CDBF9F;
  --ground: #F3ECDC; --ink: #22304F; --muted: #5C574E; --accent: #9E3B2E; --accent2: #9E3B2E;
  --lavender: #6A74A3; --rule: #D6C9AD; --caption: #5C574E; --frame: rgba(70, 45, 20, .14);
  --row-hover: rgba(158, 59, 46, .06);
  --map-water: #CDD3E0; --map-land: #F8F1E0; --map-park: #BFC9A8;
  color-scheme: light;
  position: relative;
  color: var(--ink);
  background-color: #F3ECDC;
  background-image:
    radial-gradient(120% 60% at 50% 0%, rgba(255,255,255,.35), transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .25 0 0 0 0 .12 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  margin: clamp(2.2rem, 6vh, 4.5rem) auto 16svh !important;
  padding-top: clamp(2.6rem, 6vw, 4rem) !important;
  padding-left: clamp(1.25rem, 5vw, 3.4rem) !important;
  padding-right: clamp(1.25rem, 5vw, 3.4rem) !important;
  box-shadow: 0 1px 0 rgba(255,255,255,.4) inset, 0 2px 3px rgba(30,20,10,.18), 0 22px 50px -10px rgba(25,18,10,.42);
  font-family: "Newsreader", Charter, Georgia, serif;
}
.page:not(:has(.col)) { max-width: 700px !important; font-size: 1.12rem; }
/* the pushpin */
.page::before {
  content: ""; position: absolute; top: 14px; left: 50%; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%;
  background: radial-gradient(circle at 35% 32%, #F4C9B8 0 2px, #B8352B 3px 100%);
  box-shadow: 2px 4px 3px rgba(30,15,10,.35);
}

/* the masthead: the name painted like it is over the window, and a way back into the room */
.page > header:first-child, .page > header.chrome { align-items: center; margin-bottom: 3rem; }
.name, .cname {
  font-family: "Fraunces", Georgia, serif !important; font-weight: 600 !important;
  letter-spacing: .12em; text-transform: uppercase; font-size: .98rem !important; color: var(--ink) !important;
  text-decoration: none;
}
.name::after, .cname::after {
  content: "back to the room"; display: block; margin-top: .1rem;
  font-family: "Nothing You Could Do", cursive; font-weight: 400; letter-spacing: 0; text-transform: none;
  font-size: .92rem; color: var(--accent); transform: rotate(-2deg); transform-origin: left;
}
.name:hover::after, .cname:hover::after { text-decoration: underline; text-underline-offset: 3px; }
.hnav, .cnav, .hnav a, .cnav a { font-family: "Newsreader", Georgia, serif !important; font-size: 1rem !important; color: var(--dim) !important; }
.hnav a:hover, .cnav a:hover { color: var(--ink) !important; }
.theme-btn { display: none !important; }

/* type */
.page h1 { font-family: "Fraunces", Georgia, serif !important; font-weight: 600; letter-spacing: -.005em; color: var(--ink); }
.page:not(:has(.col)) h1 { font-size: 2rem; line-height: 1.15; margin-bottom: .5rem; }
.page h2 { font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 1.12rem; letter-spacing: .01em; color: var(--ink); }
.page .sub { font-style: italic; color: var(--dim); }
.page .eyebrow {
  font-family: "Nothing You Could Do", cursive !important; text-transform: none !important; letter-spacing: 0 !important;
  font-size: 1.05rem !important; color: var(--accent) !important;
}
.page .d { font-family: "Nothing You Could Do", cursive; font-size: .92rem; color: var(--dim); letter-spacing: 0; }
.page .content a, .page li u, .page .col a { text-decoration-color: var(--line); }
.page ::selection { background: #E9D3A6; }

/* footer: paper tags */
.cfrule { background: var(--rule, var(--line)) !important; }
.cfmap { font-size: 0 !important; display: flex; flex-wrap: wrap; justify-content: center; gap: .55rem .5rem; }
.cfmap a {
  display: inline-block; padding: .18rem .6rem; background: #EADFC6; color: var(--ink) !important;
  font-family: "Nothing You Could Do", cursive; font-size: .95rem !important; box-shadow: 0 1px 2px rgba(40,25,10,.22);
}
.cfmap a:nth-child(odd) { transform: rotate(-1.6deg); } .cfmap a:nth-child(even) { transform: rotate(1.2deg); }
.cfmap a:hover { background: #F7EFDC; }
.cfname { color: var(--dim) !important; }

@media (max-width: 640px) {
  .page { margin-left: .6rem !important; margin-right: .6rem !important; }
}
@media print {
  html, body { background: #fff !important; } body::before, .page::before { display: none; }
  .page { box-shadow: none; background: #fff; margin: 0 auto !important; }
}
.page p a:not([class]) { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.page p a:not([class]):hover { text-decoration-color: var(--accent); }
