/* ================= geoblair rice ================= */

/* ---------- themes ---------- */
/* default: geoblair, built from the original site's blues */
body[data-theme="geoblair"] { --bg:#05080d; --base:#0a1320; --surface:#10233a; --border:#2f6fa3; --text:#dcecff; --sub:#7192aa; --hl:#58bfff; --c2:#7fe0c2; --c3:#ff7a90; --c4:#8fd3ff; --c5:#ffd47f; --c6:#b9a4ff; }
body[data-theme="mocha"]    { --bg:#11111b; --base:#1e1e2e; --surface:#313244; --border:#45475a; --text:#cdd6f4; --sub:#7f849c; --hl:#cba6f7; --c2:#a6e3a1; --c3:#f38ba8; --c4:#89b4fa; --c5:#f9e2af; --c6:#94e2d5; }
body[data-theme="gruvbox"]  { --bg:#1d2021; --base:#282828; --surface:#3c3836; --border:#504945; --text:#ebdbb2; --sub:#928374; --hl:#fe8019; --c2:#b8bb26; --c3:#fb4934; --c4:#83a598; --c5:#fabd2f; --c6:#8ec07c; }
body[data-theme="tokyo"]    { --bg:#16161e; --base:#1a1b26; --surface:#292e42; --border:#3b4261; --text:#c0caf5; --sub:#737aa2; --hl:#bb9af7; --c2:#9ece6a; --c3:#f7768e; --c4:#7aa2f7; --c5:#e0af68; --c6:#7dcfff; }
body[data-theme="nord"]     { --bg:#242933; --base:#2e3440; --surface:#3b4252; --border:#4c566a; --text:#eceff4; --sub:#8d97aa; --hl:#88c0d0; --c2:#a3be8c; --c3:#bf616a; --c4:#81a1c1; --c5:#ebcb8b; --c6:#b48ead; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font: 14px/1.7 "JetBrains Mono", "Courier New", ui-monospace, monospace;
  color: var(--text);
  background-color: var(--bg);
  /* wallpaper: contour-ish glow + survey grid */
  background-image:
    radial-gradient(ellipse at 10% 0%, color-mix(in srgb, var(--hl) 20%, transparent), transparent 50%),
    radial-gradient(ellipse at 100% 100%, color-mix(in srgb, var(--c6) 14%, transparent), transparent 50%),
    linear-gradient(color-mix(in srgb, var(--border) 18%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--border) 18%, transparent) 1px, transparent 1px);
  background-size: auto, auto, 40px 40px, 40px 40px;
  background-attachment: fixed;
  transition: background-color .4s, color .4s;
}
.hl{color:var(--hl)} .c2{color:var(--c2)} .c3{color:var(--c3)} .c4{color:var(--c4)} .c5{color:var(--c5)} .c6{color:var(--c6)}
::selection { background: var(--hl); color: var(--bg); }
a { color: var(--c4); }

/* subtle CRT scanlines */
.crt { position: fixed; inset: 0; pointer-events: none; z-index: 99;
  background: repeating-linear-gradient(transparent 0 2px, rgba(0,0,0,.10) 2px 3px); }

/* ---------- bar ---------- */
.bar {
  position: sticky; top: 8px; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  margin: 8px 12px 0; padding: 5px 6px;
  background: color-mix(in srgb, var(--base) 82%, transparent);
  backdrop-filter: blur(10px);
  border: 2px solid var(--border); border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
}
.workspaces { display: flex; gap: 3px; flex-wrap: wrap; }
.ws {
  color: var(--sub); text-decoration: none; font-weight: 700;
  padding: 2px 10px; border-radius: 8px; transition: background .2s, color .2s;
}
.ws .n { color: var(--c5); margin-right: 2px; }
.ws:hover { background: var(--surface); color: var(--text); }
.ws.active { background: var(--hl); color: var(--bg); }
.ws.active .n { color: var(--bg); }
.bar-right { display: flex; gap: 5px; flex-wrap: wrap; }
.mod { background: var(--surface); padding: 2px 10px; border-radius: 8px; white-space: nowrap; }
.wx { color: var(--c2); }
.theme-btn { font: inherit; border: 0; cursor: pointer; color: var(--c3); transition: .2s; }
.theme-btn:hover { background: var(--c3); color: var(--bg); }
.clock { color: var(--c4); }
.clock b { color: var(--text); }

/* ---------- ticker ---------- */
.ticker {
  margin: 10px 12px 0; overflow: hidden; white-space: nowrap;
  border: 1px dashed var(--border); border-radius: 8px;
  color: var(--hl); font-size: 12px; letter-spacing: .08em;
  background: color-mix(in srgb, var(--base) 70%, transparent);
}
.ticker-track { display: inline-flex; padding: 4px 0; animation: tick 40s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes tick { to { transform: translateX(-50%); } }

/* ---------- tiling layout ---------- */
.tiles {
  max-width: 1280px; margin: 0 auto; padding: 12px;
  display: grid; gap: 12px;
  grid-template-columns: repeat(12, 1fr);
  grid-template-areas:
    "fetch fetch fetch fetch fetch fetch fetch readme readme readme readme readme"
    "fetch fetch fetch fetch fetch fetch fetch map    map    map    map    map"
    "archive archive archive archive archive archive archive archive archive archive archive archive"
    "quote quote quote quote quote term term term term term term term"
    "note  note  note  note  note  term term term term term term term";
}
.fetch{grid-area:fetch} .readme{grid-area:readme} .map{grid-area:map} .archive{grid-area:archive}
.quote-win{grid-area:quote} .term{grid-area:term} .fieldnote{grid-area:note}

.win {
  display: flex; flex-direction: column; min-width: 0;
  background: color-mix(in srgb, var(--base) 90%, transparent);
  border: 2px solid var(--border); border-radius: 12px; overflow: hidden;
  box-shadow: 0 12px 32px rgba(0,0,0,.45);
  transition: border-color .25s, box-shadow .25s, transform .25s;
  animation: pop .55s cubic-bezier(.2,.8,.2,1) backwards;
}
.win:nth-child(2){animation-delay:.06s} .win:nth-child(3){animation-delay:.12s} .win:nth-child(4){animation-delay:.18s}
.win:nth-child(5){animation-delay:.24s} .win:nth-child(6){animation-delay:.30s} .win:nth-child(7){animation-delay:.36s}
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.97); } }
.win:hover, .win:focus-within {
  border-color: var(--hl);
  box-shadow: 0 12px 32px rgba(0,0,0,.45), 0 0 0 1px var(--hl), 0 0 24px color-mix(in srgb, var(--hl) 30%, transparent);
}
.titlebar {
  display: flex; align-items: center; gap: 10px;
  padding: 3px 12px; font-size: 12px; color: var(--sub);
  background: var(--surface); border-bottom: 1px solid var(--border);
}
.tb-right { margin-left: auto; color: var(--c4); }
.dots { display: flex; gap: 6px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--c3); }
.dots i:nth-child(2){background:var(--c5)} .dots i:nth-child(3){background:var(--c2)}
.body { padding: 16px 18px; flex: 1; }
p { margin: 0 0 .9em; }

/* ---------- fetch ---------- */
.fetch-body { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.ascii {
  margin: 0; font-size: 10px; line-height: 1.12;
  background: linear-gradient(180deg, var(--hl), var(--c6));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 8px color-mix(in srgb, var(--hl) 50%, transparent));
}
.info { list-style: none; margin: 0; padding: 0; }
.info b { color: var(--hl); }
.info .rule { color: var(--border); }
.swatches { display: flex; gap: 4px; margin-top: 8px; }
.swatches i { width: 20px; height: 12px; border-radius: 3px; }
.swatches i:nth-child(1){background:var(--c3)} .swatches i:nth-child(2){background:var(--c2)}
.swatches i:nth-child(3){background:var(--c5)} .swatches i:nth-child(4){background:var(--c4)}
.swatches i:nth-child(5){background:var(--hl)} .swatches i:nth-child(6){background:var(--c6)}
.swatches i:nth-child(7){background:var(--text)} .swatches i:nth-child(8){background:var(--border)}

/* ---------- readme ---------- */
.logo {
  margin: 0; font-size: clamp(40px, 6vw, 64px); font-weight: 800; letter-spacing: -3px; line-height: 1.05;
  color: var(--text); text-shadow: 0 0 22px color-mix(in srgb, var(--hl) 45%, transparent);
}
.cursor { color: var(--hl); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.subtitle { color: var(--c4); font-size: 12px; margin: 6px 0 14px; }

/* ---------- map ---------- */
.map-body { padding: 0; position: relative; min-height: 220px; }
.map iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
  filter: invert(.92) hue-rotate(180deg) saturate(.7) contrast(.95);
}
.map .scanline {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(transparent 0, color-mix(in srgb, var(--hl) 25%, transparent) 50%, transparent 52%);
  background-size: 100% 300%; animation: sweep 6s linear infinite;
  mix-blend-mode: screen;
}
@keyframes sweep { from { background-position: 0 100%; } to { background-position: 0 -200%; } }

/* ---------- archive cards ---------- */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.card {
  display: block; text-decoration: none; color: var(--text);
  border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px;
  background: color-mix(in srgb, var(--surface) 40%, transparent);
  transition: border-color .2s, transform .2s, background .2s;
}
a.card:hover { border-color: var(--hl); transform: translateY(-3px); background: var(--surface); }
a.card h2::after { content: " →"; color: var(--hl); opacity: 0; transition: opacity .2s; }
a.card:hover h2::after { opacity: 1; }
.perm { font-size: 11px; color: var(--c2); }
.card h2 { margin: 2px 0 6px; font-size: 16px; color: var(--c4); }
.card p { margin: 0; color: var(--sub); font-size: 13px; line-height: 1.55; }
body[data-theme] .card p { color: color-mix(in srgb, var(--text) 70%, var(--sub)); }

/* ---------- quote ---------- */
.quote {
  display: flex; align-items: center;
  font-size: clamp(22px, 2.6vw, 32px); font-weight: 800; line-height: 1.25; letter-spacing: -1px;
  border-left: 6px solid var(--hl);
  background: linear-gradient(90deg, color-mix(in srgb, var(--hl) 12%, transparent), transparent);
}

/* ---------- terminal ---------- */
.term-body { min-height: 300px; max-height: 460px; overflow-y: auto; cursor: text; font-size: 13px; }
#termOut div { white-space: pre-wrap; word-break: break-word; }
.prompt-line { display: flex; gap: 8px; }
#termIn { flex: 1; min-width: 0; font: inherit; color: var(--text); background: none; border: 0; outline: 0; caret-color: var(--hl); }

/* ---------- field note ---------- */
.fn-head { color: var(--c5); font-size: 12px; margin-bottom: 12px; letter-spacing: .05em; }
.fieldnote p { color: var(--c4); }

/* ---------- vim statusline footer ---------- */
.statusline {
  max-width: 1256px; margin: 0 auto 16px; display: flex; flex-wrap: wrap;
  font-size: 12px; border-radius: 10px; overflow: hidden;
  background: var(--surface); color: var(--sub);
  border: 2px solid var(--border);
}
.statusline > span { padding: 3px 12px; }
.mode { background: var(--hl); color: var(--bg); font-weight: 800; }
.sl-file { background: color-mix(in srgb, var(--hl) 25%, var(--surface)); color: var(--text); }
.sl-mid { flex: 1; }
.sl-pos { background: var(--c4); color: var(--bg); font-weight: 700; }

/* ---------- responsive ---------- */
@media (max-width: 950px) {
  .tiles {
    grid-template-columns: 1fr;
    grid-template-areas: "readme" "fetch" "map" "archive" "quote" "note" "term";
  }
  .grid { grid-template-columns: 1fr 1fr; }
  .bar { position: static; justify-content: center; }
  .statusline { margin: 0 12px 16px; }
  .sl-mid, .sl-pos { display: none; }
}
@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; }
  .ascii { font-size: 7px; }
  .ws { padding: 2px 6px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ================= inner pages ================= */
.page { max-width: 1000px; margin: 0 auto; padding: 12px; display: grid; gap: 12px; }
.page .win { animation-delay: 0s; }
.page-head .body { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.live-box {
  border: 1px solid var(--border); border-radius: 8px; padding: 6px 12px;
  font-size: 12px; text-align: right; color: var(--c4); line-height: 1.6;
  background: color-mix(in srgb, var(--bg) 60%, transparent);
}
.live-box .lbl { color: var(--c2); font-weight: 700; }
.live-box .lbl::before { content: "● "; color: var(--c3); animation: blink 1.4s steps(1) infinite; }

/* one field note / entry */
.entry .body { line-height: 1.85; }
.entry p { color: color-mix(in srgb, var(--text) 85%, var(--c4)); }
.entry .time { display: inline-block; color: var(--bg); background: var(--c5); font-weight: 700;
  font-size: 12px; padding: 0 8px; border-radius: 6px; margin-bottom: 12px; }
.entry h2, .entry h3 { color: var(--hl); font-size: 15px; margin: 1.4em 0 .5em; }
.entry h2::before, .entry h3::before { content: "## "; color: var(--sub); }
.entry blockquote { margin: 1em 0; padding: 4px 16px; border-left: 4px solid var(--hl);
  color: var(--text); font-style: italic; background: color-mix(in srgb, var(--hl) 8%, transparent); }
.entry ul { padding-left: 1.2em; } .entry li::marker { content: "→ "; color: var(--hl); }

/* images + photo grid */
.win img { max-width: 100%; height: auto; display: block; border-radius: 8px; border: 1px solid var(--border); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.gallery figure { margin: 0; }
.gallery img { aspect-ratio: 4/3; object-fit: cover; width: 100%; transition: transform .25s, border-color .25s; }
.gallery img:hover { transform: scale(1.02); border-color: var(--hl); }
.gallery figcaption { font-size: 11px; color: var(--sub); margin-top: 4px; }

/* table of contents */
.toc { list-style: none; padding: 0; margin: 0; columns: 2; }
.toc a { color: var(--c4); text-decoration: none; }
.toc a:hover { color: var(--hl); }
.toc .d { color: var(--c5); margin-right: 8px; }
@media (max-width: 700px) { .toc { columns: 1; } }

.page + .statusline { max-width: 976px; }

/* field-note photos */
.field-photo { margin: 1.2em 0; }
.field-photo a { display: block; position: relative; max-width: 560px; }
.field-photo img { width: 100%; transition: border-color .2s, box-shadow .2s; }
.field-photo a:hover img { border-color: var(--hl); box-shadow: 0 0 24px color-mix(in srgb, var(--hl) 35%, transparent); }
.field-photo a::after { content: "⤢ open"; position: absolute; right: 8px; bottom: 8px; font-size: 11px;
  padding: 1px 8px; border-radius: 6px; background: var(--bg); color: var(--hl); opacity: 0; transition: opacity .2s; }
.field-photo a:hover::after { opacity: 1; }
.field-photo figcaption { font-size: 11px; color: var(--sub); margin-top: 4px; }
.entry { scroll-margin-top: 70px; }
.toc-count { color: var(--sub); font-size: 12px; margin-bottom: 8px; }

/* ================= photo archive ================= */
.photo-entry .body { display: grid; grid-template-columns: 1.5fr 1fr; gap: 20px; align-items: start; }
.photo-entry .field-photo { margin: 0; }
.photo-entry .field-photo a { max-width: none; }
.exif { list-style: none; margin: 0 0 14px; padding: 10px 12px; font-size: 12px;
  border: 1px dashed var(--border); border-radius: 8px; background: color-mix(in srgb, var(--bg) 50%, transparent); }
.exif li { display: flex; gap: 8px; }
.exif b { color: var(--hl); min-width: 72px; font-weight: 700; }
.photo-entry p { color: color-mix(in srgb, var(--text) 85%, var(--c4)); }
.img-id { color: var(--bg); background: var(--hl); font-weight: 800; padding: 0 6px; border-radius: 4px; margin-right: 6px; }
@media (max-width: 800px) { .photo-entry .body { grid-template-columns: 1fr; } }

/* lightbox viewer */
.lightbox { position: fixed; inset: 0; z-index: 200; display: none; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px; padding: 50px 16px 16px;
  background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(6px); }
.lightbox.open { display: flex; animation: pop .25s ease-out; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 140px); object-fit: contain;
  border: 2px solid var(--hl); border-radius: 10px; box-shadow: 0 0 40px color-mix(in srgb, var(--hl) 30%, transparent); }
.lb-bar { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; justify-content: space-between;
  align-items: center; gap: 10px; font-size: 12px; color: var(--sub); }
.lb-bar b { color: var(--hl); }
.lb-btn { font: inherit; cursor: pointer; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 8px; padding: 2px 10px; }
.lb-btn:hover { border-color: var(--hl); color: var(--hl); }
.lb-cap { font-size: 12px; color: var(--c5); text-align: center; }
.lb-nav { display: flex; gap: 8px; }

/* ================= movement ================= */
.route-body { padding: 0; display: grid; grid-template-columns: 1fr 230px; }
.route-map { height: 360px; background: var(--bg); }
.route-map .leaflet-tile-pane { filter: invert(.92) hue-rotate(180deg) saturate(.6) contrast(.95); }
.route-map .leaflet-control-attribution { background: color-mix(in srgb, var(--base) 85%, transparent); color: var(--sub); font: 10px "JetBrains Mono", monospace; }
.route-map .leaflet-control-attribution a { color: var(--c4); }
.route-map .leaflet-bar a { background: var(--surface); color: var(--text); border-color: var(--border); }
.route-stats { list-style: none; margin: 0; padding: 14px 16px; border-left: 1px solid var(--border); font-size: 12px; }
.route-stats li { margin-bottom: 10px; }
.route-stats b { display: block; color: var(--sub); font-weight: 400; }
.route-stats span { color: var(--text); font-size: 16px; font-weight: 700; }
.route-stats .note { color: var(--sub); font-size: 11px; }
.rider { width: 14px; height: 14px; border-radius: 50%; background: var(--c5); border: 2px solid var(--bg);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--c5) 35%, transparent), 0 0 16px var(--c5); }
.pin { font: 700 11px "JetBrains Mono", monospace; color: var(--bg); background: var(--hl);
  padding: 1px 6px; border-radius: 5px; white-space: nowrap; transform: translate(-50%, -130%); display: inline-block; }
.map-fallback { padding: 16px 18px; color: var(--sub); }
@media (max-width: 800px) {
  .route-body { grid-template-columns: 1fr; }
  .route-stats { border-left: 0; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 6px 22px; }
  .route-map { height: 280px; }
}

/* ================= digital blair ================= */
.feed { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.feed .wide { grid-column: 1 / -1; }
.feed .win.hidden { display: none; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font: inherit; font-size: 12px; cursor: pointer; color: var(--c4); background: var(--surface);
  border: 1px solid var(--border); border-radius: 999px; padding: 1px 12px; transition: .2s; }
.tag:hover { border-color: var(--hl); color: var(--hl); }
.tag.on { background: var(--hl); border-color: var(--hl); color: var(--bg); font-weight: 700; }
.post-meta { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; color: var(--sub); margin-bottom: 10px; }
.post-meta .ch { color: var(--c6); }
.qs { list-style: none; padding: 0; margin: 0 0 1em; }
.qs li { font-size: 18px; font-weight: 700; color: var(--text); }
.qs li::before { content: "? "; color: var(--c3); }
.entry .qs li::marker { content: ""; }
.filter-status { font-size: 12px; color: var(--sub); margin-top: 8px; }
@media (max-width: 800px) { .feed { grid-template-columns: 1fr; } }

/* ================= about ================= */
.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 12px; align-items: start; }
.about-grid .span { grid-column: 1 / -1; }
.whoami .info li { margin-bottom: 2px; }
.whoami .big { font-size: 22px; font-weight: 800; color: var(--text); letter-spacing: -1px; }
.gitlog { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.gitlog li { display: grid; grid-template-columns: 70px 92px 1fr; gap: 10px; padding: 3px 0; }
.gitlog .hash { color: var(--c5); }
.gitlog .d { color: var(--sub); }
.gitlog .head { color: var(--c2); font-weight: 700; }
.gitlog a { color: var(--text); text-decoration: none; }
.gitlog a:hover { color: var(--hl); }
.stack { display: flex; flex-wrap: wrap; gap: 6px; }
.stack span { font-size: 12px; padding: 1px 10px; border-radius: 6px; border: 1px solid var(--border); color: var(--c4); background: var(--surface); }
@media (max-width: 800px) {
  .about-grid { grid-template-columns: 1fr; }
  .gitlog li { grid-template-columns: 62px 1fr; }
  .gitlog .d { grid-column: 2; grid-row: 1; }
  .gitlog li > :last-child { grid-column: 1 / -1; }
}

/* ================= guestbook + counter ================= */
.hits { color: var(--c6); }
.gb-form { display: grid; gap: 10px; }
.gb-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gb-form label { display: grid; gap: 3px; font-size: 12px; color: var(--sub); }
.gb-form input, .gb-form textarea {
  font: inherit; font-size: 13px; color: var(--text); background: color-mix(in srgb, var(--bg) 60%, transparent);
  border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; outline: 0; caret-color: var(--hl); }
.gb-form textarea { min-height: 110px; resize: vertical; }
.gb-form input:focus, .gb-form textarea:focus { border-color: var(--hl); box-shadow: 0 0 0 2px color-mix(in srgb, var(--hl) 30%, transparent); }
.gb-form button { justify-self: start; font: inherit; font-weight: 700; cursor: pointer; color: var(--bg);
  background: var(--hl); border: 0; border-radius: 8px; padding: 4px 16px; }
.gb-form button:hover { filter: brightness(1.15); }
.gb-form button:disabled { opacity: .5; cursor: wait; }
.gb-status { font-size: 12px; min-height: 1.5em; }
.gb-entry .msg { white-space: pre-wrap; word-break: break-word; margin: 0; }
.gb-entry .post-meta a { color: var(--c6); }
.gb-empty { color: var(--sub); }
@media (max-width: 700px) { .gb-form .row { grid-template-columns: 1fr; } }
/* meadow guestbook embed */
.guestbooks___input-container { display: grid; gap: 3px; }
.gb-form label { font-size: 12px; color: var(--sub); }
#guestbooks___pow-status, #guestbooks___challenge-answer-container { font-size: 12px; color: var(--sub); }
#guestbooks___challenge-answer-container:empty, #guestbooks___pow-status:empty, #guestbooks___error-message:empty { display: none; }
#guestbooks___error-message { font-size: 12px; color: var(--c3); }
#guestbooks___guestbook-made-with { text-align: right; margin-top: 10px; font-size: 11px; color: var(--sub); }
#guestbooks___guestbook-made-with a { color: var(--c4); }
#guestbooks___guestbook-messages-header { margin: 0 0 12px; font-size: 12px; font-weight: 400; }
#guestbooks___guestbook-messages-container { display: grid; gap: 10px; }
#guestbooks___guestbook-messages-container > * {
  border: 1px solid var(--border); border-left: 3px solid var(--hl); border-radius: 8px;
  padding: 10px 14px; background: color-mix(in srgb, var(--surface) 40%, transparent);
  white-space: normal; word-break: break-word; }
#guestbooks___guestbook-messages-container h1, #guestbooks___guestbook-messages-container h2,
#guestbooks___guestbook-messages-container h3, #guestbooks___guestbook-messages-container h4,
#guestbooks___guestbook-messages-container strong, #guestbooks___guestbook-messages-container b {
  margin: 0 0 4px; font-size: 14px; color: var(--hl); }
#guestbooks___guestbook-messages-container small, #guestbooks___guestbook-messages-container time { color: var(--c5); font-size: 11px; }
#guestbooks___guestbook-messages-container p { margin: 4px 0 0; }
#guestbooks___guestbook-messages-container a { color: var(--c6); }
#guestbooks___guestbook-messages-container button { font: inherit; font-size: 12px; cursor: pointer; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 1px 10px; }

/* ================= secret: alehouse theme (konami code) ================= */
body[data-theme="alehouse"] { --bg:#120c08; --base:#1c140e; --surface:#2b1f16; --border:#5a3d24; --text:#f3e3cc; --sub:#a68b6d; --hl:#ffb347; --c2:#c8d96f; --c3:#ff6b5b; --c4:#f6c87a; --c5:#ffd27f; --c6:#e89f71; }
body[data-theme="alehouse"] .bar::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: -7px; height: 8px; pointer-events: none;
  background: radial-gradient(circle, #ffd27f 0 2.5px, transparent 3.5px) 0 0 / 26px 8px repeat-x;
  filter: drop-shadow(0 0 4px #ffb347); animation: twinkle 2.4s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: .45; } to { opacity: 1; } }

/* ================= secret: orkney theme (unlocked by finishing .archive) ================= */
body[data-theme="orkney"] { --bg:#0b1114; --base:#111a1e; --surface:#1b282e; --border:#35505a; --text:#dfe8ea; --sub:#84989e; --hl:#7fd1c7; --c2:#a7c98a; --c3:#e3826f; --c4:#9cc3e0; --c5:#e9d38c; --c6:#b6a6d9; }
body[data-theme="orkney"] { background-image:
    radial-gradient(ellipse at 50% 120%, color-mix(in srgb, var(--hl) 18%, transparent), transparent 60%),
    repeating-linear-gradient(180deg, transparent 0 46px, color-mix(in srgb, var(--hl) 6%, transparent) 46px 48px); }

/* ================= secrets: toast, late-night mode ================= */
.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 300;
  max-width: min(560px, calc(100vw - 32px)); padding: 8px 16px; border-radius: 10px;
  font-size: 13px; color: var(--text); background: var(--surface); border: 1px solid var(--hl);
  box-shadow: 0 10px 30px rgba(0,0,0,.5), 0 0 18px color-mix(in srgb, var(--hl) 30%, transparent);
  animation: toastIn .3s ease-out; transition: opacity .5s, transform .5s; }
.toast.out { opacity: 0; transform: translate(-50%, 10px); }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 12px); } }
body.night main, body.night .bar, body.night .ticker, body.night .statusline { filter: brightness(.86) saturate(.85); }
body.night .crt { background: repeating-linear-gradient(transparent 0 2px, rgba(0,0,0,.16) 2px 3px); }

/* ================= secrets round 3 ================= */
/* photos: fog in the viewer (press f) */
.lightbox::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 1.5s;
  background:
    radial-gradient(ellipse 60% 30% at 20% 70%, rgba(220,230,240,.35), transparent 70%),
    radial-gradient(ellipse 50% 25% at 80% 60%, rgba(220,230,240,.3), transparent 70%),
    radial-gradient(ellipse 70% 35% at 50% 85%, rgba(220,230,240,.4), transparent 70%);
  background-size: 200% 100%; animation: drift 18s linear infinite alternate; }
.lightbox.fog::after { opacity: 1; }
@keyframes drift { from { background-position: 0 0; } to { background-position: 100% 0; } }
/* movement: clickable cyclist */
.route-map .rider { cursor: pointer; }
/* about: hidden commit */
#headTag { cursor: default; }
/* guestbook: archivist badge */
.gb-badge { display: inline-block; float: right; font-size: 11px; font-weight: 700; padding: 0 8px; border-radius: 6px;
  color: var(--bg); background: var(--c5); box-shadow: 0 0 12px color-mix(in srgb, var(--c5) 50%, transparent); }
