/* Little World: cut paper under a small sun. Day is the sunlit side, night is the far side with its lamps on. */
:root {
  color-scheme: light;
  --paper: #fbf5e8;
  --paper-2: #f3e9d4;
  --paper-3: #e7d8bb;
  --ink: #1c2033;
  --ink-2: #4b5166;
  --ink-3: #6f7488;
  --line: rgba(28, 32, 51, 0.13);
  --line-2: rgba(28, 32, 51, 0.26);
  --sea: #1e6aa6;
  --sea-2: #9fd9cf;
  --pin: #d6442a;
  --pin-ink: #fffaf0;
  --lamp: #e8a33c;
  --isle: #94c56e;
  --cast: 28, 32, 51;
  --sky-0: #fdf1dc;
  --sky-1: #f8ecd6;
  --sky-2: #eae9da;
  --sky-3: #dbe6e2;
  --sky-4: #c9e0ea;
  --sky-5: #b5d6ec;
  --sky-6: #a1cbea;
  --globe: #2a74b1;
  --f-text: "Alegreya", "Iowan Old Style", Georgia, serif;
  --f-sc: "Alegreya SC", "Alegreya", Georgia, serif;
  --r: 18px;
  --gutter: clamp(16px, 4.6vw, 40px);
  --measure: 40rem;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --head: 60px;

  /* What the shared components read. */
  --d-bg: var(--paper);
  --d-bg-2: var(--paper-2);
  --d-surface: var(--paper-2);
  --d-ink: var(--ink);
  --d-muted: var(--ink-2);
  --d-line-strong: var(--line-2);
  --d-accent: var(--pin);
  --d-font-text: var(--f-text);
  --d-font-display: var(--f-text);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #12173a;
  --paper-2: #1a2149;
  --paper-3: #252e5c;
  --ink: #f5edda;
  --ink-2: #c3c6d9;
  --ink-3: #9599b4;
  --line: rgba(245, 237, 218, 0.14);
  --line-2: rgba(245, 237, 218, 0.28);
  --sea: #7cc0f0;
  --pin: #ffb54d;
  --pin-ink: #1d1404;
  --cast: 0, 0, 8;
  --sky-0: #222c5c;
  --sky-1: #1d2652;
  --sky-2: #182047;
  --sky-3: #131a3c;
  --sky-4: #0f1532;
  --sky-5: #0b1028;
  --sky-6: #080c20;
  --globe: #1b2c5c;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #12173a;
    --paper-2: #1a2149;
    --paper-3: #252e5c;
    --ink: #f5edda;
    --ink-2: #c3c6d9;
    --ink-3: #9599b4;
    --line: rgba(245, 237, 218, 0.14);
    --line-2: rgba(245, 237, 218, 0.28);
    --sea: #7cc0f0;
    --pin: #ffb54d;
    --pin-ink: #1d1404;
    --cast: 0, 0, 8;
    --sky-0: #222c5c;
    --sky-1: #1d2652;
    --sky-2: #182047;
    --sky-3: #131a3c;
    --sky-4: #0f1532;
    --sky-5: #0b1028;
    --sky-6: #080c20;
    --globe: #1b2c5c;
  }
}


/* Alegreya, by Juan Pablo del Peral (Huerta Tipográfica), SIL Open Font License 1.1. A calligraphic book face:
   it reads at seventeen pixels on a phone, and its small caps are how a globe letters its names. */
@font-face { font-family: "Alegreya"; src: url("/fonts/alegreya.woff2") format("woff2"); font-weight: 400 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Alegreya"; src: url("/fonts/alegreya-italic.woff2") format("woff2"); font-weight: 400 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Alegreya SC"; src: url("/fonts/alegreya-sc-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Alegreya SC"; src: url("/fonts/alegreya-sc-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

/* The frame: the sky behind everything, the header that floats in it, the find sheet, and the footer at the core. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--sky-6); }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  color: var(--ink);
  font: 400 1.0625rem/1.5 var(--f-text);
  font-feature-settings: "kern", "liga", "onum";
  background: transparent;
  overflow-x: clip;
}
img, svg, video, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--pin); outline-offset: 3px; border-radius: 4px; }
button { font: inherit; color: inherit; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; padding: 8px 14px; background: var(--paper); border-radius: 999px; }
.skip:focus { top: 10px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* The sky: drawn by the world when it can be, and cut from the same paper rings in CSS before then. */
.sky { position: fixed; inset: 0; z-index: 0; pointer-events: none; background: radial-gradient(circle at 50% var(--sky-y, 48%), var(--sky-0) 0 23vmax, var(--sky-1) 23vmax 30vmax, var(--sky-2) 30vmax 38vmax, var(--sky-3) 38vmax 47vmax, var(--sky-4) 47vmax 58vmax, var(--sky-5) 58vmax 71vmax, var(--sky-6) 71vmax); }
.sky canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 0.6s var(--ease); }
.sky.is-live canvas { opacity: 1; }
#page { position: relative; z-index: 1; overflow-x: clip; }

/* Header: four things, floating in the sky. */
.site-head { position: fixed; z-index: 20; top: 0; left: 0; right: 0; height: var(--head); display: flex; align-items: center; gap: 8px; padding: env(safe-area-inset-top) max(var(--gutter), env(safe-area-inset-right)) 0 max(var(--gutter), env(safe-area-inset-left)); transition: background-color 0.3s var(--ease), box-shadow 0.3s var(--ease); }
.site-head.is-solid { background: color-mix(in srgb, var(--paper) 92%, transparent); -webkit-backdrop-filter: blur(10px) saturate(1.2); backdrop-filter: blur(10px) saturate(1.2); box-shadow: 0 1px 0 var(--line); }
.brand { display: inline-flex; align-items: center; gap: 9px; margin-right: auto; font-weight: 800; font-size: 1.32rem; letter-spacing: -0.01em; text-decoration: none; min-height: 44px; }
.brand svg { width: 26px; height: 26px; }
.site-nav { display: none; gap: 2px; margin-right: 6px; }
.site-nav a { padding: 8px 10px; border-radius: 999px; text-decoration: none; font-family: var(--f-sc); font-weight: 700; font-size: 0.95rem; letter-spacing: 0.04em; }
.site-nav a:hover, .site-nav a[aria-current="page"] { background: color-mix(in srgb, var(--ink) 8%, transparent); }
@media (min-width: 900px) { .site-nav { display: flex; } }
.round { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: color-mix(in srgb, var(--paper) 78%, transparent); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.35) inset, 0 6px 16px -10px rgba(var(--cast), 0.6); cursor: pointer; text-decoration: none; }
.round svg { width: 21px; height: 21px; }
.round:hover { background: var(--paper); }
.go { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 16px 0 13px; border-radius: 999px; background: var(--ink); color: var(--paper); text-decoration: none; font-family: var(--f-sc); font-weight: 700; font-size: 1rem; letter-spacing: 0.04em; box-shadow: 0 8px 18px -10px rgba(var(--cast), 0.75); }
.go svg { width: 18px; height: 18px; }
.go:hover { background: var(--pin); color: var(--pin-ink); }
@media (max-width: 430px) {
  .site-head { gap: 6px; }
  .brand { font-size: 1.2rem; gap: 7px; }
  .brand svg { width: 24px; height: 24px; }
  .round { width: 42px; height: 42px; }
  .go { padding: 0 13px; font-size: 0.95rem; letter-spacing: 0.02em; }
  .go svg { display: none; }
}
@media (max-width: 350px) { .brand { font-size: 0; gap: 0; } }
h1[tabindex="-1"]:focus { outline: none; }
.theme { position: relative; }
.theme-name { position: absolute; top: calc(100% + 4px); left: 50%; translate: -50% 0; font-family: var(--f-sc); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; white-space: nowrap; color: var(--ink-2); opacity: 0; transition: opacity 0.25s; pointer-events: none; }
.theme.is-telling .theme-name { opacity: 1; }
.theme .t-sun, .theme .t-moon, .theme .t-auto { display: none; }
:root[data-theme="light"] .theme .t-sun, :root[data-theme="dark"] .theme .t-moon, :root:not([data-theme]) .theme .t-auto { display: block; }

/* Find: one sheet with the search, the 29 islands, and every page. */
.find { position: fixed; inset: 0; z-index: 40; display: grid; grid-template-rows: auto 1fr; background: color-mix(in srgb, var(--paper) 94%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); opacity: 0; visibility: hidden; transition: opacity 0.28s var(--ease), visibility 0s 0.28s; }
.find.is-open { opacity: 1; visibility: visible; transition: opacity 0.28s var(--ease); }
.find-top { display: flex; gap: 10px; align-items: center; padding: calc(10px + env(safe-area-inset-top)) var(--gutter) 10px; border-bottom: 1px solid var(--line); }
.find-top label { flex: 1; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 16px; border-radius: 999px; background: var(--paper-2); box-shadow: inset 0 1px 3px rgba(var(--cast), 0.18); }
.find-top input { flex: 1; min-width: 0; border: 0; background: none; font: 500 1.15rem var(--f-text); color: var(--ink); outline: none; }
.find-top input::placeholder { color: var(--ink-3); font-style: italic; }
.find-body { overflow-y: auto; overscroll-behavior: contain; padding: 14px var(--gutter) calc(30px + env(safe-area-inset-bottom)); }
.find-say { margin: 2px 0 12px; color: var(--ink-2); font-size: 0.95rem; }
.find-hits { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 4px; }
.find-hits a { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center; padding: 6px 8px; border-radius: 14px; text-decoration: none; }
.find-hits a:hover, .find-hits a:focus-visible { background: var(--paper-2); }
.find-hits img { width: 52px; height: 52px; object-fit: contain; }
.find-hits b { display: block; font-weight: 700; font-size: 1.06rem; line-height: 1.2; }
.find-hits small { color: var(--ink-3); font-family: var(--f-sc); font-weight: 500; letter-spacing: 0.04em; font-size: 0.82rem; }
.find h2 { margin: 18px 0 10px; font: 700 0.86rem var(--f-sc); letter-spacing: 0.1em; color: var(--ink-3); }
.isles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.isles a { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 6px 10px; border-radius: 12px; text-decoration: none; font-weight: 600; line-height: 1.15; }
.isles a:hover { background: var(--paper-2); }
.isles i { flex: none; width: 18px; height: 18px; border-radius: 6px; background: var(--c); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.12), 0 0 0 3px color-mix(in srgb, var(--c) 30%, transparent); }
.isles span { font-family: var(--f-sc); font-weight: 500; color: var(--ink-3); font-size: 0.85rem; margin-left: auto; }
.find-links { display: flex; flex-wrap: wrap; gap: 6px 4px; margin: 0; padding: 0; list-style: none; }
.find-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 999px; background: var(--paper-2); text-decoration: none; font-weight: 600; }

/* The footer: the bottom of the page is the middle of the world. */
.site-foot { position: relative; margin-top: 0; padding: 46px var(--gutter) calc(26px + env(safe-area-inset-bottom)); background: radial-gradient(120% 90% at 50% 120%, #ffcf6e 0 10%, #f08a3b 22%, #a8402c 38%, #4a2230 58%, #1f1a2c 78%); color: #fdf3df; }
.site-foot::before { content: ""; position: absolute; left: 0; right: 0; top: -22px; height: 24px; background: inherit; border-radius: 50% 50% 0 0 / 100% 100% 0 0; }
.foot-inner { position: relative; max-width: 72rem; margin: 0 auto; display: grid; gap: 22px; }
.foot-core { margin: 0; font-family: var(--f-sc); font-weight: 700; letter-spacing: 0.1em; font-size: 0.8rem; color: #ffd9a0; }
.foot-brand { margin: 0; font-weight: 800; font-size: 1.7rem; letter-spacing: -0.01em; }
.foot-nav { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 2px 14px; }
.foot-nav a { display: flex; align-items: center; min-height: 40px; text-decoration: none; color: #fbe6c4; }
.foot-nav a:hover { color: #fff; text-decoration: underline; }
.fine { margin: 0; color: #e6c9a6; font-size: 0.88rem; max-width: 46rem; }
.site-credit { --credit-ink: #fff6e6; --credit-muted: #f1c99a; --credit-line: rgba(255, 230, 190, 0.38); --credit-accent: #ffb54d; --credit-heart: #ff9a8a; --credit-hover: rgba(255, 255, 255, 0.08); display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding-top: 18px; border-top: 1px solid rgba(255, 230, 190, 0.22); }
.site-credit-made { margin: 0; color: var(--credit-ink); font-weight: 700; }
.site-credit-made a { color: inherit; text-decoration: underline; text-decoration-color: var(--credit-accent); text-decoration-thickness: 2px; text-underline-offset: 0.25em; }
.site-credit-social { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; list-style: none; }
.site-credit-social a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; color: var(--credit-muted); transition: color 0.15s ease, background-color 0.15s ease; }
.site-credit-social a:hover { color: var(--credit-ink); background: var(--credit-hover); }
.site-credit-social svg { width: 19px; height: 19px; }
.site-credit-sponsor { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; min-height: 40px; padding: 0 14px; border: 1px solid var(--credit-line); border-radius: 999px; color: var(--credit-ink); font-weight: 700; font-size: 0.95rem; text-decoration: none; transition: border-color 0.15s ease, background-color 0.15s ease; }
.site-credit-sponsor svg { width: 17px; height: 17px; color: var(--credit-heart); }
.site-credit-sponsor:hover { border-color: var(--credit-muted); background: var(--credit-hover); }
.site-credit a:focus-visible { outline: 2px solid var(--credit-accent); outline-offset: 2px; }
@media (max-width: 720px) { .site-credit-sponsor { margin-left: 0; } }
@media (prefers-reduced-motion: reduce) { .site-credit a { transition: none; } }
