/* Canvas version: glass panels, neumorphic light driven by the cursor (--lx/--ly/--mx/--my), green and red festive theme. */
:root {
  --bg: #0f2a1f;
  --bg2: #07160f;
  --gr: #2e9d62;
  --rd: #d6453d;
  --tx: #f1f6f2;
  --mu: #aac2b3;
  --glass: rgba(255, 255, 255, .09);
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; overflow: hidden; }
body {
  background: radial-gradient(circle at 30% 20%, var(--bg), var(--bg2));
  color: var(--tx);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
}
a { color: inherit; }
.skip { position: fixed; left: 8px; top: -60px; z-index: 30; background: var(--rd); padding: 8px 12px; border-radius: 8px; }
.skip:focus { top: 8px; }

/* neumorphic light: highlight on the side facing the cursor, shadow on the opposite side */
.lit {
  --lx: -.4; --ly: -.6; --mx: 30%; --my: 20%;
  box-shadow:
    calc(var(--lx) * -16px) calc(var(--ly) * -16px) 30px rgba(0, 0, 0, .5),
    calc(var(--lx) * 8px) calc(var(--ly) * 8px) 18px rgba(255, 255, 255, .06),
    inset calc(var(--lx) * 5px) calc(var(--ly) * 5px) 10px rgba(255, 255, 255, .14);
  background:
    radial-gradient(circle at var(--mx) var(--my), rgba(255, 255, 255, .16), transparent 55%),
    var(--glass);
}

#hdr {
  position: fixed; z-index: 20; top: 12px; left: 50%; transform: translateX(-50%);
  width: min(1100px, calc(100% - 24px)); border-radius: 22px; padding: 8px 14px;
  background-color: rgba(15, 42, 31, .75);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  #hdr { background-color: #0f2a1f; }
}
#hdr nav { display: flex; align-items: center; gap: 12px; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.logo i { font-style: normal; background: var(--rd); border-radius: 10px; padding: 2px 8px; }
.menu { display: flex; gap: 6px; list-style: none; margin: 0 auto; padding: 0; overflow-x: auto; }
.menu a, .classic, #fork button {
  display: block; padding: 6px 14px; border-radius: 14px; text-decoration: none; color: var(--tx);
  border: 0; font: inherit; cursor: pointer; white-space: nowrap;
}
.menu a.on { background-color: var(--gr); }
.classic { color: var(--mu); font-size: 14px; }
a:focus-visible, button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

#vp { position: fixed; inset: 0; overflow: hidden; touch-action: none; cursor: grab; outline: 0; }
#vp.drag { cursor: grabbing; }
#world { position: absolute; left: 0; top: 0; width: 0; height: 0; transform-origin: 0 0; --lod: 0; }
#paths { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
#paths path { fill: none; stroke: var(--gr); stroke-width: 6; stroke-dasharray: 2 16; stroke-linecap: round; opacity: .8; }
#paths path.loop { stroke: var(--rd); }
.deco { position: absolute; pointer-events: none; }
.flame { transform-origin: 30px 38px; animation: flicker 1.4s ease-in-out infinite alternate; }
@keyframes flicker { from { transform: scale(1, .92) rotate(-3deg); } to { transform: scale(.92, 1.06) rotate(3deg); } }

/* semantic zoom: the coarse layer fades out and the detail layer fades in with --lod */
.card {
  position: absolute; width: 420px; height: 270px; transform: translate(-50%, -50%);
  border-radius: 28px; padding: 26px; user-select: none; cursor: pointer;
}
.card.on {
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  outline: 2px solid rgba(214, 69, 61, .55);
}
.coarse, .detail { position: absolute; inset: 0; padding: inherit; transition: opacity .25s; }
.coarse { opacity: calc(1 - var(--lod) * 1.4); }
.detail { opacity: var(--lod); pointer-events: none; overflow: hidden; font-size: 14px; }
.deep .detail { pointer-events: auto; }
.deep .coarse { pointer-events: none; }
.card h1, .card h2, .card h3 { margin: 0 0 6px; line-height: 1.15; }
.card h1 { font-size: 44px; }
.card h2 { font-size: 34px; }
.card h3 { font-size: 20px; color: #ffd7d3; }
.card p { margin: 0 0 8px; color: var(--mu); }
.hint { font-size: 13px; }
.detail img { float: right; border-radius: 50%; margin: 0 0 6px 10px; object-fit: cover; }
.detail ul { margin: 0; padding: 0; list-style: none; }
.detail li { margin-bottom: 8px; }
.detail small { display: block; color: var(--mu); }
.links a, .more { display: block; padding: 4px 10px; margin-bottom: 4px; border-radius: 10px; text-decoration: none; }
.more { display: inline-block; margin-top: 4px; background-color: var(--rd); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags span { background: rgba(255, 255, 255, .1); border-radius: 12px; padding: 3px 10px; }

#fork {
  position: fixed; z-index: 20; left: 50%; bottom: 24px; transform: translateX(-50%);
  display: flex; gap: 10px; padding: 10px; border-radius: 22px;
}
#fork[hidden] { display: none; }
.legal { position: fixed; z-index: 20; right: 12px; bottom: 12px; }
.legal a { display: block; padding: 6px 14px; border-radius: 14px; text-decoration: none; color: var(--mu); font-size: 14px; }
#fork button.sel { background-color: var(--rd); }

#snow {
  position: fixed; inset: 0; pointer-events: none; z-index: 5; opacity: .5;
  background-image: radial-gradient(2px 2px at 20px 30px, #fff, transparent), radial-gradient(2px 2px at 90px 120px, #fff, transparent), radial-gradient(3px 3px at 160px 60px, #fff, transparent);
  background-size: 200px 200px;
  animation: snow 12s linear infinite;
}
@keyframes snow { to { background-position: 40px 200px; } }

#glow { display: none; }
.ns { position: fixed; z-index: 40; top: 80px; left: 20px; }

/* cursor glow only for mouse-like devices; touch devices get none */
@media (hover: hover) and (pointer: fine) {
  #glow {
    display: block; position: fixed; z-index: 25; left: -90px; top: -90px; width: 180px; height: 180px; border-radius: 50%;
    pointer-events: none; opacity: 0; transition: opacity .3s; mix-blend-mode: screen;
    background: radial-gradient(circle, rgba(255, 244, 214, .22), rgba(255, 244, 214, 0) 65%);
  }
  #glow.on { opacity: 1; }
}

@media (max-width: 720px) {
  .logo { display: none; }
  .card { width: 320px; height: 250px; padding: 18px; }
  .card h1 { font-size: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
