/* Nattskog-oppdrag: the Norges Furry Forbund theme (generated by gen_nff.py) */
:root {
  --night: #0b1026;
  --moon: #fdf6d8;
  --glow: #c084fc;
  --teal: #2dd4bf;
  --fly: #fde68a;
}
html { background: var(--night); }
body.nattskog { background: transparent; color: #e2e8f0; }
.font-display { font-family: 'Fredoka', ui-rounded, 'Segoe UI', system-ui, sans-serif; }
.glow-text { text-shadow: 0 0 32px rgba(192, 132, 252, 0.45); }

/* ---- the night forest behind every page ---- */
.scene { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background: linear-gradient(180deg, #060a1c 0%, #0b1026 40%, #11203d 72%, #0c2a22 100%); }
.stars { position: absolute; inset: 0 0 35% 0; opacity: 0.85;
  background-image:
    radial-gradient(1.6px 1.6px at 8% 18%, #fff 60%, transparent),
    radial-gradient(1.2px 1.2px at 22% 42%, #e0e7ff 60%, transparent),
    radial-gradient(1.8px 1.8px at 35% 12%, #fff 60%, transparent),
    radial-gradient(1px 1px at 47% 30%, #fff 60%, transparent),
    radial-gradient(1.4px 1.4px at 58% 8%, #f5d0fe 60%, transparent),
    radial-gradient(1.1px 1.1px at 66% 36%, #fff 60%, transparent),
    radial-gradient(1.6px 1.6px at 79% 22%, #e0e7ff 60%, transparent),
    radial-gradient(1px 1px at 91% 44%, #fff 60%, transparent),
    radial-gradient(1.3px 1.3px at 14% 62%, #fff 60%, transparent),
    radial-gradient(1px 1px at 52% 58%, #ccfbf1 60%, transparent),
    radial-gradient(1.2px 1.2px at 86% 64%, #fff 60%, transparent);
  background-size: 520px 360px; }
.moon { position: absolute; top: 11%; right: 9%; width: clamp(64px, 10vw, 140px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 36% 34%, #fffdf0 0%, var(--moon) 45%, #efe0a4 100%);
  box-shadow: 0 0 40px 10px rgba(253, 246, 216, 0.22), 0 0 140px 50px rgba(192, 132, 252, 0.14); }
.moon::before, .moon::after { content: ""; position: absolute; border-radius: 50%; background: rgba(120, 100, 40, 0.12); }
.moon::before { width: 22%; height: 22%; top: 28%; left: 52%; }
.moon::after { width: 14%; height: 14%; top: 60%; left: 30%; }
.trees { position: absolute; left: -2%; right: -2%; bottom: 0; background-repeat: repeat-x; background-position: left bottom;
  background-size: auto 100%; transform: translate3d(0, calc(var(--sy, 0) * var(--k) * 1px), 0); }
.trees-far { height: 42vh; --k: 0.05; opacity: 0.7; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='900' height='300' viewBox='0 0 900 300'%3E%3Cpath fill='%2316294a' d='M0 300 L0 294 L900 294 L900 300 Z M-40.8 180.8 L25.9 65.7 L92.6 180.8 Z M-27.5 245.3 L25.9 130.2 L79.3 245.3 Z M-14.1 296.0 L25.9 190.1 L65.9 296.0 Z M23.9 296.0 L23.9 300 L27.9 300 L27.9 296.0 Z M65.0 176.0 L128.7 55.9 L192.4 176.0 Z M77.7 243.2 L128.7 123.1 L179.6 243.2 Z M90.5 296.0 L128.7 185.6 L166.9 296.0 Z M126.7 296.0 L126.7 300 L130.7 300 L130.7 296.0 Z M102.1 163.3 L176.7 30.5 L251.2 163.3 Z M117.0 237.6 L176.7 104.8 L236.3 237.6 Z M131.9 296.0 L176.7 173.9 L221.4 296.0 Z M174.7 296.0 L174.7 300 L178.7 300 L178.7 296.0 Z M186.5 153.8 L271.1 11.5 L355.8 153.8 Z M203.4 233.4 L271.1 91.2 L338.9 233.4 Z M220.3 296.0 L271.1 165.1 L321.9 296.0 Z M269.1 296.0 L269.1 300 L273.1 300 L273.1 296.0 Z M318.3 184.9 L387.5 73.8 L456.6 184.9 Z M332.2 247.1 L387.5 136.0 L442.7 247.1 Z M346.0 296.0 L387.5 193.8 L428.9 296.0 Z M385.5 296.0 L385.5 300 L389.5 300 L389.5 296.0 Z M350.5 175.4 L430.0 54.8 L509.4 175.4 Z M366.4 242.9 L430.0 122.3 L493.6 242.9 Z M382.3 296.0 L430.0 185.1 L477.7 296.0 Z M428.0 296.0 L428.0 300 L432.0 300 L432.0 296.0 Z M453.5 169.0 L533.1 42.0 L612.8 169.0 Z M469.4 240.1 L533.1 113.2 L596.9 240.1 Z M485.3 296.0 L533.1 179.2 L580.9 296.0 Z M531.1 296.0 L531.1 300 L535.1 300 L535.1 296.0 Z M510.0 168.0 L588.7 40.0 L667.3 168.0 Z M525.7 239.7 L588.7 111.7 L651.6 239.7 Z M541.5 296.0 L588.7 178.2 L635.9 296.0 Z M586.7 296.0 L586.7 300 L590.7 300 L590.7 296.0 Z M628.5 211.6 L684.1 127.3 L739.6 211.6 Z M639.6 258.9 L684.1 174.5 L728.5 258.9 Z M650.7 296.0 L684.1 218.4 L717.4 296.0 Z M682.1 296.0 L682.1 300 L686.1 300 L686.1 296.0 Z M692.7 170.4 L775.7 44.7 L858.7 170.4 Z M709.3 240.7 L775.7 115.1 L842.1 240.7 Z M725.9 296.0 L775.7 180.4 L825.5 296.0 Z M773.7 296.0 L773.7 300 L777.7 300 L777.7 296.0 Z M791.0 158.2 L871.4 20.5 L951.7 158.2 Z M807.1 235.4 L871.4 97.6 L935.6 235.4 Z M823.1 296.0 L871.4 169.3 L919.6 296.0 Z M869.4 296.0 L869.4 300 L873.4 300 L873.4 296.0 Z'/%3E%3C/svg%3E"); }
.trees-mid { height: 32vh; --k: 0.1; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='760' height='260' viewBox='0 0 760 260'%3E%3Cpath fill='%230f2133' d='M0 260 L0 254 L760 254 L760 260 Z M-14.3 182.2 L31.8 108.4 L77.9 182.2 Z M-5.1 223.5 L31.8 149.7 L68.7 223.5 Z M4.2 256.0 L31.8 188.1 L59.5 256.0 Z M29.8 256.0 L29.8 260 L33.8 260 L33.8 256.0 Z M45.7 159.7 L101.4 63.3 L157.1 159.7 Z M56.8 213.6 L101.4 117.3 L146.0 213.6 Z M67.9 256.0 L101.4 167.4 L134.8 256.0 Z M99.4 256.0 L99.4 260 L103.4 260 L103.4 256.0 Z M135.2 161.3 L185.0 66.6 L234.8 161.3 Z M145.1 214.3 L185.0 119.7 L224.8 214.3 Z M155.1 256.0 L185.0 168.9 L214.9 256.0 Z M183.0 256.0 L183.0 260 L187.0 260 L187.0 256.0 Z M254.7 186.9 L291.6 117.8 L328.6 186.9 Z M262.1 225.6 L291.6 156.5 L321.2 225.6 Z M269.5 256.0 L291.6 192.4 L313.8 256.0 Z M289.6 256.0 L289.6 260 L293.6 260 L293.6 256.0 Z M314.3 142.6 L375.5 29.3 L436.7 142.6 Z M326.6 206.1 L375.5 92.7 L424.5 206.1 Z M338.8 256.0 L375.5 151.7 L412.3 256.0 Z M373.5 256.0 L373.5 260 L377.5 260 L377.5 256.0 Z M379.8 154.3 L448.1 52.6 L516.4 154.3 Z M393.4 211.2 L448.1 109.5 L502.7 211.2 Z M407.1 256.0 L448.1 162.4 L489.1 256.0 Z M446.1 256.0 L446.1 260 L450.1 260 L450.1 256.0 Z M493.8 167.8 L553.4 79.6 L613.1 167.8 Z M505.7 217.2 L553.4 129.0 L601.2 217.2 Z M517.7 256.0 L553.4 174.9 L589.2 256.0 Z M551.4 256.0 L551.4 260 L555.4 260 L555.4 256.0 Z M541.3 140.8 L606.5 25.6 L671.8 140.8 Z M554.3 205.3 L606.5 90.1 L658.7 205.3 Z M567.4 256.0 L606.5 150.0 L645.7 256.0 Z M604.5 256.0 L604.5 260 L608.5 260 L608.5 256.0 Z M655.8 184.1 L696.7 112.2 L737.7 184.1 Z M664.0 224.4 L696.7 152.5 L729.5 224.4 Z M672.2 256.0 L696.7 189.9 L721.3 256.0 Z M694.7 256.0 L694.7 260 L698.7 260 L698.7 256.0 Z'/%3E%3C/svg%3E"); }
.trees-near { height: 21vh; --k: 0.16; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='640' height='200' viewBox='0 0 640 200'%3E%3Cpath fill='%2307120f' d='M0 200 L0 194 L640 194 L640 200 Z M-12.4 113.6 L42.7 31.2 L97.7 113.6 Z M-1.4 159.7 L42.7 77.4 L86.7 159.7 Z M9.7 196.0 L42.7 120.2 L75.7 196.0 Z M40.7 196.0 L40.7 200 L44.7 200 L44.7 196.0 Z M85.6 115.7 L134.9 35.4 L184.3 115.7 Z M95.5 160.7 L134.9 80.3 L174.4 160.7 Z M105.4 196.0 L134.9 122.1 L164.5 196.0 Z M132.9 196.0 L132.9 200 L136.9 200 L136.9 196.0 Z M158.4 115.5 L208.4 35.0 L258.3 115.5 Z M168.4 160.6 L208.4 80.1 L248.4 160.6 Z M178.4 196.0 L208.4 122.0 L238.4 196.0 Z M206.4 196.0 L206.4 200 L210.4 200 L210.4 196.0 Z M302.5 132.2 L338.8 68.5 L375.0 132.2 Z M309.7 167.9 L338.8 104.2 L367.8 167.9 Z M317.0 196.0 L338.8 137.3 L360.5 196.0 Z M336.8 196.0 L336.8 200 L340.8 200 L340.8 196.0 Z M326.9 103.6 L385.2 11.2 L443.5 103.6 Z M338.6 155.4 L385.2 63.0 L431.9 155.4 Z M350.3 196.0 L385.2 111.0 L420.2 196.0 Z M383.2 196.0 L383.2 200 L387.2 200 L387.2 196.0 Z M406.6 96.7 L473.5 -2.6 L540.5 96.7 Z M420.0 152.3 L473.5 53.0 L527.1 152.3 Z M433.4 196.0 L473.5 104.7 L513.7 196.0 Z M471.5 196.0 L471.5 200 L475.5 200 L475.5 196.0 Z M558.0 111.4 L604.1 26.8 L650.3 111.4 Z M567.2 158.8 L604.1 74.1 L641.0 158.8 Z M576.5 196.0 L604.1 118.1 L631.8 196.0 Z M602.1 196.0 L602.1 200 L606.1 200 L606.1 196.0 Z'/%3E%3C/svg%3E"); }
.fly { position: absolute; border-radius: 50%; background: var(--fly); opacity: 0.55;
  box-shadow: 0 0 10px 3px rgba(253, 230, 138, 0.65); }
@media (prefers-reduced-motion: no-preference) {
  .fly { animation: fly-drift var(--t) ease-in-out var(--d) infinite alternate, fly-blink calc(var(--t) / 3) ease-in-out var(--d) infinite alternate; }
}
@keyframes fly-drift { to { transform: translate(var(--dx), var(--dy)); } }
@keyframes fly-blink { 0%, 100% { opacity: 0.12; } 50% { opacity: 1; } }

/* ---- surfaces ---- */
.panel { background: rgba(11, 16, 38, 0.74); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid transparent; border-radius: 28px; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08); }
.panel-glow { background: linear-gradient(135deg, rgba(124, 58, 237, 0.28), rgba(17, 26, 58, 0.8) 55%, rgba(13, 148, 136, 0.2));
  box-shadow: 0 0 0 1px rgba(192, 132, 252, 0.35), 0 20px 60px -20px rgba(168, 85, 247, 0.5); }
.panel-teal { background: rgba(13, 148, 136, 0.14); box-shadow: 0 0 0 1px rgba(45, 212, 191, 0.4); }
.quest-tag { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.35rem 0.85rem; border-radius: 999px;
  font: 600 0.8rem/1.2 ui-monospace, SFMono-Regular, monospace; letter-spacing: 0.06em; text-transform: uppercase;
  color: #f5d0fe; background: rgba(192, 132, 252, 0.14); box-shadow: 0 0 0 1px rgba(192, 132, 252, 0.35); }
.photo { outline: 1px solid rgba(255, 255, 255, 0.1); outline-offset: -1px; }

/* ---- quest cards ---- */
.quest { position: relative; display: flex; flex-direction: column; padding: 1.25rem; border-radius: 28px; color: inherit;
  background: rgba(17, 26, 58, 0.8); border: 1px solid transparent; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
  transition: transform 150ms ease-out, box-shadow 150ms ease-out, background-color 150ms ease-out; }
.quest:hover { box-shadow: 0 0 0 1px rgba(192, 132, 252, 0.55), 0 14px 40px -14px rgba(192, 132, 252, 0.55); }
.quest-icon { width: 3.5rem; height: 3.5rem; border-radius: 50%; display: grid; place-items: center; font-size: 1.75rem;
  background: radial-gradient(circle, rgba(192, 132, 252, 0.35), rgba(192, 132, 252, 0.04) 70%); }
.quest-num { font: 600 0.75rem/1 ui-monospace, SFMono-Regular, monospace; letter-spacing: 0.08em; text-transform: uppercase; color: #cbd5e1; }
.quest .chip { margin-top: auto; align-self: flex-start; display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.3rem 0.7rem;
  border-radius: 999px; font-size: 0.8rem; font-weight: 600; color: #cbd5e1; background: rgba(255, 255, 255, 0.06); }
.quest .chip-done { display: none; }
.quest[data-done] { background: rgba(13, 42, 48, 0.82); }
.quest[data-done] .quest-icon { background: radial-gradient(circle, rgba(45, 212, 191, 0.45), rgba(45, 212, 191, 0.04) 70%); }
.quest[data-done] .chip { color: #99f6e4; background: rgba(45, 212, 191, 0.14); }
.quest[data-done] .chip-todo { display: none; }
.quest[data-done] .chip-done { display: inline; }
@media (prefers-reduced-motion: no-preference) and (hover: hover) {
  .quest:hover { transform: translateY(-3px); }
}
@media (prefers-reduced-motion: no-preference) {
  .quest:active { transform: scale(0.96); }
}
.progress { height: 0.75rem; border-radius: 999px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.progress > span { display: block; height: 100%; width: var(--p, 0%); border-radius: inherit;
  background: linear-gradient(90deg, #a855f7, #2dd4bf); transition: width 600ms cubic-bezier(0.2, 0, 0, 1); }

/* ---- buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.8rem 1.4rem; border-radius: 999px;
  font-weight: 700; border: 1px solid transparent; transition: transform 150ms ease-out, background-color 150ms ease-out; }
.btn-glow { background: #7c3aed; color: #fff; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14), 0 10px 30px -8px rgba(168, 85, 247, 0.8); }
.btn-glow:hover { background: #6d28d9; }
.btn-ghost { background: rgba(255, 255, 255, 0.08); color: #fff; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.14); }
@media (prefers-reduced-motion: no-preference) { .btn:active { transform: scale(0.96); } }

/* ---- reading ---- */
.prose-nff p, .prose-nff ul { max-width: 65ch; }
.prose-nff p { margin-top: 0.85rem; line-height: 1.75; color: #cbd5e1; }
.prose-nff h2 { margin-top: 2.25rem; font-family: 'Fredoka', ui-rounded, system-ui, sans-serif; font-weight: 600;
  font-size: 1.75rem; line-height: 1.2; color: #fff; text-wrap: balance; }
.prose-nff h2:first-child { margin-top: 0; }
.prose-nff ul { margin-top: 0.85rem; padding-left: 1.25rem; list-style: none; color: #cbd5e1; line-height: 1.75; }
.prose-nff li { position: relative; margin-top: 0.4rem; }
.prose-nff li::before { content: "🐾"; position: absolute; left: -1.5rem; font-size: 0.8em; top: 0.15em; }
.prose-nff a { color: #5eead4; text-decoration: underline; text-underline-offset: 3px; }
.prose-nff strong { color: #fff; }

/* ---- myth or fact ---- */
.myth { border-radius: 22px; background: rgba(17, 26, 58, 0.8); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08); }
.myth summary { list-style: none; cursor: pointer; display: flex; gap: 0.75rem; align-items: center; padding: 1rem 1.25rem; font-weight: 600; color: #fff; }
.myth summary::-webkit-details-marker { display: none; }
.myth .flip { margin-left: auto; font-size: 0.75rem; font-family: ui-monospace, monospace; color: #f5d0fe; white-space: nowrap; }
.myth[open] .flip-closed, .myth:not([open]) .flip-open { display: none; }
.myth[open] { box-shadow: 0 0 0 1px rgba(45, 212, 191, 0.45); }

/* ---- the toast when a badge unlocks ---- */
.quest-toast { position: fixed; left: 50%; bottom: 1.25rem; z-index: 60; translate: -50% 0; max-width: calc(100vw - 2rem);
  display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1.1rem 0.75rem 0.75rem; border-radius: 999px;
  background: rgba(17, 26, 58, 0.95); color: #fff; box-shadow: 0 0 0 1px rgba(45, 212, 191, 0.5), 0 18px 50px -12px rgba(0, 0, 0, 0.8);
  opacity: 0; pointer-events: none; }
.quest-toast .t-icon { width: 2.5rem; height: 2.5rem; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; font-size: 1.3rem;
  background: radial-gradient(circle, rgba(45, 212, 191, 0.5), rgba(45, 212, 191, 0.05) 70%); }
.quest-toast.show { opacity: 1; pointer-events: auto; }
@media (prefers-reduced-motion: no-preference) {
  .quest-toast { translate: -50% 12px; filter: blur(4px); transition: opacity 150ms ease-out, translate 150ms ease-out, filter 150ms ease-out; }
  .quest-toast.show { translate: -50% 0; filter: none; transition-duration: 300ms; }
}
@media (prefers-reduced-motion: reduce) {
  .quest-toast { transition: opacity 200ms ease-out; }
}
