/* Jayraid – the launcher colours (Look.cs): diving suit, panels, orange. */
:root {
  --suit: #111112;
  --side: #161618;
  --panel: #1c1c1e;
  --panel-light: #262629;
  --line: #2f2f33;
  --edge: #46464a;
  --button: #2c2c30;
  --button-hover: #3e3e42;
  --orange: #f08c1e;
  --orange-hover: #ffa840;
  --orange-ink: #180e06;
  --ink: #edf4e8;
  --text: #d9e0d5;
  --dim: #aab0aa;
  --good: #78c86e;
  --side-width: 240px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--suit);
  color: var(--ink);
  font: 16px/1.6 "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}
a { color: var(--orange); text-decoration: none; }
a:hover { color: var(--orange-hover); text-decoration: underline; }
img { max-width: 100%; display: block; }
kbd {
  display: inline-block; min-width: 1.7em; padding: 0 .4em; margin: 0 .1em;
  border: 1px solid var(--edge); border-bottom-width: 2px; border-radius: 3px;
  background: var(--button); color: var(--ink); font: 600 .8em/1.6 "Segoe UI", system-ui, sans-serif; text-align: center;
}
code { background: var(--panel-light); border: 1px solid var(--edge); border-radius: 3px; padding: 0 .35em; font-size: .9em; }
.orange { color: var(--orange); }
.small { font-size: .88rem; color: var(--dim); }
[hidden] { display: none !important; }

/* Hexagon font (site.js turns data-hex into an SVG) */
[data-hex] { display: inline-block; line-height: 0; vertical-align: middle; }
[data-hex] svg { display: block; overflow: visible; }

/* ── Sidebar like the launcher ─────────────────────────────────────── */
.side {
  position: fixed; inset: 0 auto 0 0; width: var(--side-width); z-index: 10;
  display: flex; flex-direction: column;
  background: var(--side); border-right: 1px solid #232326;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 26px 24px 30px; color: var(--ink); }
.brand:hover { color: var(--ink); text-decoration: none; }
.mark { width: 44px; height: 44px; flex: none; }
.mark .m1 { fill: #111112; } .mark .m2 { fill: #784416; } .mark .m3 { fill: var(--orange); }
.mark .m4 { fill: #ffb04a; } .mark .m5 { fill: #e88016; }
.word { display: grid; grid-template-columns: auto auto; row-gap: 6px; align-items: end; }
.word .sub { grid-column: 1 / 3; opacity: .9; }
nav { display: flex; flex-direction: column; }
nav a {
  display: flex; align-items: center; gap: 14px; padding: 18px 24px;
  color: var(--dim); border-left: 4px solid transparent;
}
nav a i {
  width: 16px; height: 18px; background: #4a4a4e; flex: none;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
nav a:hover { background: var(--panel); color: var(--ink); text-decoration: none; }
nav a.on { background: var(--panel-light); color: var(--ink); border-left-color: var(--orange); }
nav a.on i, nav a:hover i { background: var(--orange); }
.side-foot { margin-top: auto; padding: 20px 24px 24px; color: var(--dim); font-size: .82rem; line-height: 1.5; }
.side-foot p { margin: 0; }
.discord {
  display: block; margin-bottom: 16px; padding: 10px 12px; text-align: center;
  background: var(--button); border: 1px solid var(--edge); color: var(--ink);
}
.discord:hover { background: var(--button-hover); color: var(--ink); text-decoration: none; }

.content { margin-left: var(--side-width); }

/* ── PLAY: hero image with the play bar at the bottom ─────────────── */
.play { position: relative; padding: 0; max-width: none; }
.play-image {
  position: absolute; inset: 0 0 auto 0; height: 620px;
  background-size: cover; background-position: center 45%;
}
.play-image::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(17,17,18,.88) 0%, rgba(17,17,18,.45) 45%, rgba(17,17,18,0) 75%),
              linear-gradient(0deg, var(--suit) 0%, rgba(17,17,18,0) 35%);
}
.play-text { position: relative; height: 520px; display: flex; flex-direction: column; justify-content: center; padding: 0 56px; }
.play-text h1 { margin: 0 0 22px; display: flex; flex-wrap: wrap; }
.lead { max-width: 520px; font-size: 1.15rem; color: var(--text); margin: 0; text-shadow: 0 1px 8px rgba(0,0,0,.6); }

.playbar {
  position: relative; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px;
  margin: 0 32px; padding: 18px 24px;
  background: rgba(22,22,24,.96); border: 1px solid var(--line); border-top: 2px solid var(--orange);
}
.playbar .label { color: var(--dim); display: block; margin-bottom: 8px; }
.playbar-right { text-align: right; display: flex; flex-direction: column; align-items: flex-end; }
.playbar-version { font-weight: 600; color: var(--ink); }
.cells { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; max-width: 300px; }
.cells i {
  width: 12px; height: 14px; background: var(--orange);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
.cells i.taken { background: #3a3a3e; }
.tester-count { font-size: .9rem; color: var(--ink); }

.play-info { padding: 18px 56px 0; max-width: 820px; }
.tester-text { color: var(--text); margin: 0 0 4px; }
.tester-os { color: var(--dim); font-size: .92rem; margin: 0 0 4px; }
.tester-os.warn { color: var(--orange); }
.tester-done { margin-top: 14px; padding: 16px 18px; border-left: 4px solid var(--orange); }
.tester-done .code { font: 600 1.5rem/1.3 Consolas, "Courier New", monospace; color: var(--ink); letter-spacing: .04em; margin: 4px 0 12px; user-select: all; }
.tester-buttons { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.button {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 26px; background: var(--button); color: var(--ink); font: inherit;
  border: 1px solid var(--edge); border-radius: 2px; cursor: pointer; transition: background .12s;
}
.button:hover { background: var(--button-hover); color: var(--ink); text-decoration: none; }
.button.big, .orange-button { background: var(--orange); color: var(--orange-ink); border-color: var(--orange-hover); }
.button.big { min-width: 340px; padding: 24px 40px; }
.button.big:hover, .orange-button:hover { background: var(--orange-hover); color: var(--orange-ink); }
.button.off, .button:disabled { background: var(--button); color: var(--dim); border-color: var(--edge); cursor: default; }

/* ── Sections ───────────────────────────────────────────────────────── */
section { padding: 64px 56px 0; scroll-margin-top: 0; max-width: 1240px; }
h2 { margin: 0 0 22px; }
h3 { margin: 0 0 6px; font-size: 1.08rem; }
p { margin: 0 0 8px; }
.panel { background: var(--panel); border: 1px solid var(--line); }
.tag { color: var(--orange); }
.intro { max-width: 760px; color: var(--text); font-size: 1.05rem; margin: -4px 0 24px; }
.more { margin-top: 12px; }

/* News: the newest version big, the ones before as launcher rows */
.news-top { display: grid; grid-template-columns: 340px 1fr; border-left: 4px solid var(--orange); }
.news-top-image { background-size: cover; background-position: center; min-height: 190px; }
.news-top-text { padding: 22px 26px; }
.news-head { display: flex; align-items: center; gap: 14px; margin: 0 0 2px; }
.news-name { font-size: 1.5rem; font-weight: 600; color: var(--orange); }
.news-date { color: var(--dim); font-size: .9rem; margin-bottom: 10px; }
#news-text { color: var(--text); }
.versions { margin-top: 10px; }
.versions:empty { display: none; }
.version { display: grid; grid-template-columns: 150px 110px 1fr; gap: 18px; padding: 14px 22px; border-top: 1px solid #2a2a2d; align-items: baseline; }
.version:first-child { border-top: 0; }
.version b { color: var(--ink); }
.version .date { color: var(--dim); font-size: .9rem; }
.version p { margin: 0; color: var(--dim); font-size: .95rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Red night over a screenshot until there is a real blood moon shot */
.bloodmoon { position: relative; }
.bloodmoon::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 78% 20%, rgba(255,70,50,.9) 0, rgba(190,24,24,.6) 22%, rgba(40,4,8,.85) 65%);
  mix-blend-mode: multiply;
}

/* The game */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.feature { background: var(--panel); border: 1px solid var(--line); display: flex; flex-direction: column; }
.feature:hover { border-color: var(--edge); }
.feature-image { aspect-ratio: 16 / 9; background-size: cover; background-position: center; position: relative; }
.feature-text { padding: 16px 18px 18px; }
.feature-text p { color: var(--dim); font-size: .95rem; }
.feature.wide { grid-column: 1 / -1; flex-direction: row; }
.feature.wide.flip { flex-direction: row-reverse; }
.feature.wide .feature-image { flex: 1.4; aspect-ratio: auto; min-height: 300px; }
.feature.wide .feature-text { flex: 1; padding: 30px 32px; display: flex; flex-direction: column; justify-content: center; }
.feature.wide h3 { font-size: 1.5rem; }
.feature.wide p { font-size: 1.02rem; color: var(--text); }
.tag.new { position: absolute; z-index: 1; left: 16px; top: 16px; padding: 8px 10px; background: var(--orange); color: var(--orange-ink); }

/* Install */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.steps li { padding: 20px; }
.steps .nr { color: var(--orange); margin-bottom: 14px; }
.steps p { color: var(--dim); font-size: .93rem; }
.note { margin-top: 14px; max-width: 760px; }

/* Controls */
.table div { display: grid; grid-template-columns: minmax(170px, 280px) 1fr; gap: 16px; padding: 11px 22px; border-top: 1px solid #2a2a2d; }
.table div:first-child { border-top: 0; }
.table span:last-child { color: var(--dim); }

footer { margin-top: 72px; border-top: 1px solid #2a2a2d; padding: 34px 56px 46px; color: var(--dim); }
footer p { margin: 4px 0; }
.footer-mark {
  display: inline-block; width: 18px; height: 21px; background: var(--orange); margin-bottom: 10px;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}

@media (max-width: 1180px) {
  .features { grid-template-columns: repeat(2, 1fr); }
  .feature.wide.flip { flex-direction: column; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .playbar { grid-template-columns: 1fr 1fr; }
  .playbar-mid { grid-column: 1 / -1; order: -1; }
  .button.big { width: 100%; }
}

/* Small screens: the sidebar turns into a bar at the top */
@media (max-width: 860px) {
  .side { position: sticky; inset: auto; top: 0; width: auto; flex-direction: row; align-items: center; border: 0; border-bottom: 1px solid #232326; }
  .brand { padding: 10px 16px; }
  .mark { width: 34px; height: 34px; }
  nav { flex-direction: row; overflow-x: auto; }
  nav a { padding: 10px 12px; border-left: 0; border-bottom: 3px solid transparent; }
  nav a.on { border-bottom-color: var(--orange); }
  nav a i, .side-foot, .word .sub { display: none; }
  .content { margin-left: 0; }
  .play-image { height: 460px; }
  .play-text { height: 380px; padding: 0 16px; justify-content: flex-end; padding-bottom: 28px; }
  .play-image::after { background: linear-gradient(0deg, var(--suit) 0%, rgba(17,17,18,.55) 50%, rgba(17,17,18,.2) 100%); }
  .playbar { margin: 0 16px; padding: 16px; gap: 16px; }
  .button.big { min-width: 0; padding: 20px 16px; }
  .play-info { padding: 16px 16px 0; }
  section { padding: 48px 16px 0; }
  .news-top { grid-template-columns: 1fr; }
  .news-top-image { min-height: 160px; }
  .version { grid-template-columns: 1fr auto; gap: 2px 12px; padding: 12px 16px; }
  .version p { grid-column: 1 / -1; }
  .features, .steps { grid-template-columns: 1fr; }
  .feature.wide, .feature.wide.flip { flex-direction: column; }
  .feature.wide .feature-image { min-height: 200px; }
  .feature.wide .feature-text { padding: 18px; }
  .table div { grid-template-columns: 1fr; gap: 2px; padding: 11px 16px; }
  footer { padding: 30px 16px 40px; }
}
@media (max-width: 520px) {
  .side { flex-direction: column; align-items: stretch; }
  .brand { padding-bottom: 0; }
}

/* ── The little diver helper (helper.js) ──────────────────────────── */
.helper { position: fixed; right: 20px; bottom: 16px; z-index: 30; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.helper-bot { position: relative; width: 92px; height: 115px; padding: 0; border: 0; background: none; cursor: pointer; }
.helper-bot svg { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 8px 14px rgba(0,0,0,.5)); }
.helper-bot:focus-visible { outline: 2px solid var(--orange); outline-offset: 4px; }
.diver { animation: float 3.2s ease-in-out infinite; transform-origin: 60px 80px; }
.helper-bot:hover .diver { animation-duration: 1.6s; }
.helper-bot.nod .diver { animation: nod .5s ease-in-out, float 3.2s ease-in-out .5s infinite; }
.eye { animation: blink 4.6s infinite; transform-box: fill-box; transform-origin: center; }
.lamp { animation: lamp 2s ease-in-out infinite; }
.arm { transform-box: fill-box; transform-origin: 50% 10%; }
.arm-l { animation: paddle 1.6s ease-in-out infinite; }
.arm-r { animation: paddle 1.6s ease-in-out .8s infinite; }
.helper-bot:hover .arm-r, .helper.open .arm-r { animation: wave .5s ease-in-out infinite alternate; }
.leg { transform-box: fill-box; transform-origin: 50% 0; }
.leg-l { animation: kick 1.2s ease-in-out infinite; }
.leg-r { animation: kick 1.2s ease-in-out .6s infinite; }
.bubbles i {
  position: absolute; left: 50%; bottom: 92%; width: 8px; height: 8px; border-radius: 50%;
  border: 1.5px solid rgba(237,244,232,.55); opacity: 0; animation: bubble 3.6s ease-in infinite;
}
.bubbles i:nth-child(2) { width: 6px; height: 6px; margin-left: 6px; animation-delay: 1.2s; }
.bubbles i:nth-child(3) { width: 10px; height: 10px; margin-left: -8px; animation-delay: 2.4s; }

@keyframes float { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-7px) rotate(2deg); } }
@keyframes nod { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-8deg) translateY(2px); } 65% { transform: rotate(6deg); } }
@keyframes blink { 0%, 93%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.1); } }
@keyframes lamp { 0%, 100% { fill: #f08c1e; } 50% { fill: #ffd28a; } }
@keyframes paddle { 0%, 100% { transform: rotate(8deg); } 50% { transform: rotate(-14deg); } }
@keyframes wave { from { transform: rotate(-150deg); } to { transform: rotate(-110deg); } }
@keyframes kick { 0%, 100% { transform: rotate(10deg); } 50% { transform: rotate(-10deg); } }
@keyframes bubble { 0% { opacity: 0; transform: translate(0, 0) scale(.6); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(6px, -70px) scale(1.1); } }

.helper-box {
  position: relative; width: 300px; padding: 16px 18px 12px; border-top: 2px solid var(--orange);
  box-shadow: 0 14px 40px rgba(0,0,0,.55); animation: pop .18s ease-out;
}
.helper-box::after {
  content: ""; position: absolute; right: 38px; bottom: -9px; width: 16px; height: 16px;
  background: var(--panel); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); transform: rotate(45deg);
}
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: none; } }
.helper-say { margin: 0 18px 10px 0; color: var(--text); font-size: .95rem; }
.helper-asks { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.helper-asks button {
  font: inherit; font-size: .85rem; padding: 6px 10px; cursor: pointer;
  background: var(--button); color: var(--ink); border: 1px solid var(--edge); border-radius: 2px;
}
.helper-asks button:hover { background: var(--button-hover); border-color: var(--orange); }
.helper-close { position: absolute; right: 8px; top: 6px; border: 0; background: none; color: var(--dim); font-size: 1.3rem; cursor: pointer; line-height: 1; }
.helper-close:hover { color: var(--ink); }
.helper-hide { border: 0; background: none; padding: 0; color: var(--dim); font: inherit; font-size: .78rem; cursor: pointer; }
.helper-hide:hover { color: var(--orange); }

/* Hidden: only the helmet peeks in from the edge */
.helper.hidden .helper-bot { width: 56px; height: 70px; transform: translate(24px, 30px) rotate(-18deg); opacity: .8; }
.helper.hidden .helper-bot:hover { opacity: 1; transform: translate(16px, 22px) rotate(-12deg); }
.helper-bot { transition: transform .3s, width .3s, height .3s, opacity .3s; }

@media (max-width: 860px) {
  .helper { right: 10px; bottom: 10px; }
  .helper-bot { width: 70px; height: 88px; }
  .helper-box { width: min(300px, calc(100vw - 20px)); }
}
@media (prefers-reduced-motion: reduce) {
  .diver, .eye, .lamp, .arm, .leg, .bubbles i, .helper-box { animation: none !important; }
}
.helper.open .bubbles { display: none; }

/* ── Animations (site.js sets .anim, never with reduced motion) ──── */
/* Start: the picture drifts slowly, title, text and bar come in one after another */
.anim .play-image { animation: drift 28s ease-in-out infinite alternate; }
@keyframes drift { from { transform: scale(1.02) translate(0, 0); } to { transform: scale(1.09) translate(-1.5%, -1%); } }
.play { overflow: hidden; }
.anim .play-text h1 > span { animation: rise .8s cubic-bezier(.2,.8,.2,1) both; }
.anim .play-text h1 > span:nth-child(2) { animation-delay: .12s; }
.anim .lead { animation: rise .8s .3s cubic-bezier(.2,.8,.2,1) both; }
.anim .playbar { animation: rise .8s .45s cubic-bezier(.2,.8,.2,1) both; }
.anim .play-info { animation: fade .8s .7s both; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* Glowing hexagons rising through the start picture, like sparks over the sea */
.hexes { position: absolute; inset: 0 0 auto 0; height: 560px; overflow: hidden; pointer-events: none; display: none; }
.anim .hexes { display: block; }
.hexes i {
  position: absolute; bottom: -20px; width: var(--size, 10px); height: calc(var(--size, 10px) * 1.15);
  background: var(--orange); opacity: 0;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  filter: drop-shadow(0 0 6px rgba(240,140,30,.9));
  animation: spark 12s linear infinite;
}
@keyframes spark {
  0% { opacity: 0; transform: translate(0, 0) rotate(0); }
  10% { opacity: .7; }
  70% { opacity: .35; }
  100% { opacity: 0; transform: translate(40px, -560px) rotate(240deg); }
}

/* The claim button: a light sweeps across now and then */
.button.big { position: relative; overflow: hidden; }
.anim .button.big:not(:disabled)::after {
  content: ""; position: absolute; inset: 0; width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.45), transparent);
  transform: translateX(-160%) skewX(-20deg); animation: sweep 4.5s 1.4s ease-in-out infinite;
}
@keyframes sweep { 0% { transform: translateX(-160%) skewX(-20deg); } 35%, 100% { transform: translateX(360%) skewX(-20deg); } }
.button.big:not(:disabled):hover { box-shadow: 0 0 0 4px rgba(240,140,30,.18), 0 10px 34px rgba(240,140,30,.35); }
.button.big:not(:disabled):active { transform: translateY(1px) scale(.99); }

/* Tester places pop in one by one */
.anim .cells i { animation: pop-cell .35s cubic-bezier(.3,1.6,.5,1) both; }
@keyframes pop-cell { from { transform: scale(0); } to { transform: scale(1); } }

/* Sidebar: the orange bar slides in, the hexagon turns */
nav a { transition: background .2s, color .2s, border-color .2s; }
nav a i { transition: background .2s, transform .35s; }
nav a:hover i, nav a.on i { transform: rotate(60deg); }

/* Sections slide in while scrolling */
.anim .reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.8,.2,1); }
.anim .reveal.in { opacity: 1; transform: none; }

/* Cards: the picture zooms a little, the edge lights up orange */
.feature { overflow: hidden; transition: border-color .25s, box-shadow .25s, transform .25s; }
.feature-image { transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.feature:hover { border-color: var(--orange); box-shadow: 0 12px 32px rgba(0,0,0,.45); }
.feature:hover .feature-image { transform: scale(1.05); }
.feature-text { position: relative; z-index: 1; background: var(--panel); }
.news-top { overflow: hidden; }
.news-top-image { transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.news-top:hover .news-top-image { transform: scale(1.05); }

/* Blood moon: the red night breathes */
.anim .bloodmoon::after { animation: moon 5s ease-in-out infinite alternate; }
@keyframes moon { from { opacity: .82; } to { opacity: 1; } }
.anim .tag.new { animation: tag 2.4s ease-in-out infinite; }
@keyframes tag { 0%, 100% { box-shadow: 0 0 0 0 rgba(240,140,30,.6); } 50% { box-shadow: 0 0 0 8px rgba(240,140,30,0); } }

/* Version rows like launcher entries */
.version { border-left: 3px solid transparent; transition: background .2s, border-color .2s; }
.version:hover { background: var(--panel-light); border-left-color: var(--orange); }

/* Install steps and controls */
.steps li { transition: border-color .25s, transform .25s; }
.steps li:hover { border-color: var(--edge); transform: translateY(-3px); }
.steps li:hover .nr { color: var(--orange-hover); }
.table div { transition: background .15s; }
.table div:hover { background: var(--panel-light); }
kbd { transition: transform .1s, border-bottom-width .1s; }
.table div:hover kbd { transform: translateY(1px); border-bottom-width: 1px; }

/* The footer hexagon turns slowly */
.anim .footer-mark { animation: turn 12s linear infinite; }
@keyframes turn { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
/* A hint while scrolling is only a small speech bubble */
.helper.hint .helper-box { width: auto; max-width: 260px; padding: 10px 30px 10px 14px; }
.helper.hint .helper-hide { display: none; }
.helper.hint .helper-say { margin: 0; font-size: .9rem; }

/* ── Changelog page (changelog.js) ─────────────────────────────────── */
.log-head { padding-top: 56px; }
.log-head h1 { margin: 0 0 18px; }
.log-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 26px; }
.log-stat { background: var(--panel); border: 1px solid var(--line); padding: 12px 18px; min-width: 130px; }
.log-stat b { display: block; font-size: 1.35rem; color: var(--orange); line-height: 1.3; }
.log-stat span { color: var(--dim); font-size: .85rem; }
.log-tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.log-filter { display: flex; border: 1px solid var(--edge); }
.log-filter button {
  font: inherit; font-size: .9rem; padding: 9px 16px; cursor: pointer;
  background: var(--panel); color: var(--dim); border: 0; border-left: 1px solid var(--edge);
  transition: background .15s, color .15s;
}
.log-filter button:first-child { border-left: 0; }
.log-filter button:hover { color: var(--ink); background: var(--panel-light); }
.log-filter button.on { background: var(--orange); color: var(--orange-ink); }
#log-search {
  font: inherit; font-size: .95rem; padding: 9px 14px; width: min(320px, 100%);
  background: var(--panel); color: var(--ink); border: 1px solid var(--edge); border-radius: 0;
}
#log-search:focus { outline: none; border-color: var(--orange); }

.log { padding-top: 34px; }
.log-month { margin-bottom: 18px; }
.log-month-name {
  position: sticky; top: 0; z-index: 2; margin: 0; padding: 12px 0 10px;
  font-size: .85rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--dim);
  background: linear-gradient(var(--suit) 80%, rgba(17,17,18,0));
}
/* The timeline: a thin line with a hexagon at every version */
.log-entries { position: relative; padding-left: 34px; }
.log-entries::before { content: ""; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 2px; background: #2a2a2d; }
.log-entry {
  position: relative; margin-bottom: 12px; padding: 16px 20px 14px;
  background: var(--panel); border: 1px solid var(--line);
  transition: border-color .2s, background .2s;
}
.log-entry:hover { border-color: var(--edge); }
.log-entry::before {
  content: ""; position: absolute; left: -33px; top: 20px; width: 16px; height: 18px; background: #4a4a4e;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); transition: background .2s, transform .3s;
}
.log-entry:hover::before { background: var(--orange); transform: rotate(60deg); }
.log-entry.latest { border-left: 3px solid var(--orange); }
.log-entry.latest::before { background: var(--orange); box-shadow: 0 0 12px var(--orange); }
.log-entry.fix { padding: 12px 20px 10px; background: transparent; }
.log-entry.fix::before { width: 10px; height: 12px; left: -30px; top: 17px; }
.log-entry-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 2px; }
.log-name { font-weight: 600; color: var(--ink); }
.log-entry.latest .log-name { color: var(--orange); }
.log-date { color: var(--dim); font-size: .88rem; margin-left: auto; }
.log-tag { font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; padding: 1px 7px; background: var(--orange); color: var(--orange-ink); }
.log-tag.dim { background: var(--button); color: var(--dim); }
.log-title { margin: 0 0 8px; font-size: 1.12rem; font-weight: 600; color: var(--text); }
.log-entry.fix .log-title { font-size: 1rem; margin-bottom: 4px; }
.log-line { color: var(--dim); font-size: .95rem; margin: 0 0 6px; max-width: 900px; }
.log-label {
  display: inline-block; min-width: 68px; margin-right: 10px; padding: 0 7px; text-align: center;
  font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; line-height: 1.7;
  border: 1px solid var(--edge); color: var(--ink); vertical-align: 1px;
}
.log-label.new { border-color: rgba(240,140,30,.6); color: var(--orange); }
.log-label.fixed { border-color: rgba(120,200,110,.5); color: var(--good); }
.log-label.changed { border-color: #5a5a60; color: #c9cfc6; }
.anim .log-entry { animation: rise .6s cubic-bezier(.2,.8,.2,1) both; }

@media (max-width: 860px) {
  .log-head { padding-top: 36px; }
  .log-tools { flex-direction: column; align-items: stretch; }
  .log-filter button { flex: 1; padding: 9px 8px; }
  #log-search { width: 100%; }
  .log-entries { padding-left: 24px; }
  .log-entries::before { left: 4px; }
  .log-entry::before { left: -26px; }
  .log-entry.fix::before { left: -23px; }
  .log-entry { padding: 14px 14px 10px; }
  .log-label { min-width: 0; }
}

/* ── Edit mode (editor.js, open the page with ?edit) ──────────────── */
.edit-mode body { padding-top: 46px; }
.edit-mode .side { top: 46px; }
.edit-mode .helper { display: none; }
.ed-bar {
  position: fixed; inset: 0 0 auto 0; z-index: 100; height: 46px;
  display: flex; align-items: center; gap: 14px; padding: 0 14px;
  background: #0b0b0c; border-bottom: 2px solid var(--orange); font-size: .85rem; color: var(--dim);
}
.ed-bar b { color: var(--orange); letter-spacing: .08em; }
.ed-file { color: var(--ink); }
.ed-bar.dirty .ed-count { color: var(--orange); }
.ed-help { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ed-space { flex: 1; }
.ed-bar button, .ed-tools button {
  font: inherit; cursor: pointer; background: var(--button); color: var(--ink); border: 1px solid var(--edge); padding: 6px 12px;
}
.ed-bar button:hover, .ed-tools button:hover { background: var(--button-hover); }
.ed-bar .ed-main { background: var(--orange); color: var(--orange-ink); border-color: var(--orange-hover); font-weight: 600; }
.ed-tools { position: absolute; z-index: 99; display: none; gap: 2px; padding: 3px; background: #0b0b0c; border: 1px solid var(--orange); }
.ed-tools button { padding: 3px 9px; font-size: .9rem; }
.edit-mode [contenteditable] { outline: 1px dashed transparent; outline-offset: 3px; cursor: text; }
.edit-mode [contenteditable]:hover { outline-color: rgba(240,140,30,.6); }
.edit-mode [contenteditable]:focus { outline: 2px solid var(--orange); background: rgba(240,140,30,.06); }
.edit-mode [data-hex], .edit-mode [style*="background-image"] { cursor: pointer; }
.edit-mode .ed-current { outline: 1px solid rgba(240,140,30,.45); outline-offset: 2px; }
@media (max-width: 860px) {
  .ed-help { display: none; }
  .ed-bar { gap: 8px; padding: 0 8px; font-size: .78rem; }
  .ed-bar button { padding: 5px 8px; }
  .edit-mode .side { top: 46px; }
}

/* Mouse buttons drawn like keys: a little mouse, the pressed part in orange */
kbd.mouse {
  width: 2.1em; min-width: 0; height: 2.1em; padding: 0; vertical-align: middle;
  background-repeat: no-repeat; background-position: center; background-size: 66% 80%;
}
kbd.mouse.l { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 20'%3E%3Crect x='1' y='1' width='12' height='18' rx='6' fill='none' stroke='%23edf4e8' stroke-width='1.4'/%3E%3Cpath d='M7 1.7A5.3 5.3 0 0 0 1.7 7V8.6H7Z' fill='%23f08c1e'/%3E%3Cpath d='M1.7 8.6H12.3M7 1.7V8.6' stroke='%23edf4e8' stroke-width='1.2'/%3E%3C/svg%3E"); }
kbd.mouse.r { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 20'%3E%3Crect x='1' y='1' width='12' height='18' rx='6' fill='none' stroke='%23edf4e8' stroke-width='1.4'/%3E%3Cpath d='M7 1.7A5.3 5.3 0 0 1 12.3 7V8.6H7Z' fill='%23f08c1e'/%3E%3Cpath d='M1.7 8.6H12.3M7 1.7V8.6' stroke='%23edf4e8' stroke-width='1.2'/%3E%3C/svg%3E"); }
kbd.mouse.w { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 20'%3E%3Crect x='1' y='1' width='12' height='18' rx='6' fill='none' stroke='%23edf4e8' stroke-width='1.4'/%3E%3Cpath d='M1.7 8.6H12.3M7 1.7V3M7 7.4V8.6' stroke='%23edf4e8' stroke-width='1.2'/%3E%3Crect x='5.6' y='3' width='2.8' height='4.4' rx='1.4' fill='%23f08c1e'/%3E%3C/svg%3E"); }
.table .plus { font-style: normal; color: var(--dim); margin: 0 .3em; }

/* Bubbles as a chat (helper.js) */
.helper-box { width: 340px; padding: 0; display: flex; flex-direction: column; }
.helper-head { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.helper-head b { color: var(--ink); }
.helper-mode:not(:empty) { font-size: .68rem; font-weight: 600; letter-spacing: .08em; padding: 0 6px; background: var(--orange); color: var(--orange-ink); }
.helper-head .helper-close { position: static; margin-left: auto; }
.helper-log { max-height: min(320px, 45vh); overflow-y: auto; padding: 12px 14px 4px; display: flex; flex-direction: column; gap: 8px; }
.helper-msg { margin: 0; padding: 8px 11px; max-width: 88%; font-size: .92rem; line-height: 1.45; animation: pop .18s ease-out; }
.helper-msg.bot { align-self: flex-start; background: var(--panel-light); color: var(--text); border-left: 2px solid var(--orange); }
.helper-msg.me { align-self: flex-end; background: var(--orange); color: var(--orange-ink); }
.helper-msg.typing { display: flex; gap: 4px; padding: 11px 12px; }
.helper-msg.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--dim); animation: dots 1s infinite; }
.helper-msg.typing i:nth-child(2) { animation-delay: .15s; }
.helper-msg.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dots { 0%, 60%, 100% { opacity: .3; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }
.helper-box .helper-asks { padding: 6px 14px 0; margin: 0; }
.helper-form { display: flex; gap: 6px; padding: 10px 14px 6px; }
.helper-form input {
  flex: 1; min-width: 0; font: inherit; font-size: .92rem; padding: 8px 10px;
  background: var(--suit); color: var(--ink); border: 1px solid var(--edge);
}
.helper-form input:focus { outline: none; border-color: var(--orange); }
.helper-form button { border: 0; padding: 0 12px; background: var(--orange); color: var(--orange-ink); cursor: pointer; font-size: 1rem; }
.helper-form button:hover { background: var(--orange-hover); }
.helper-box .helper-hide { align-self: flex-start; margin: 0 14px 10px; }
.helper-tip {
  position: relative; max-width: 270px; padding: 10px 14px; font-size: .9rem; color: var(--text); cursor: pointer;
  border-top: 2px solid var(--orange); box-shadow: 0 10px 30px rgba(0,0,0,.5); animation: pop .2s ease-out;
}
.helper-tip::after {
  content: ""; position: absolute; right: 38px; bottom: -8px; width: 14px; height: 14px;
  background: var(--panel); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); transform: rotate(45deg);
}
@media (max-width: 860px) { .helper-box { width: min(340px, calc(100vw - 20px)); } }

/* Bubbles: language switch and the spotlight on the page */
.helper-lang { display: flex; margin-left: auto; border: 1px solid var(--edge); }
.helper-lang button { font: inherit; font-size: .72rem; font-weight: 600; letter-spacing: .06em; padding: 2px 8px; border: 0; background: none; color: var(--dim); cursor: pointer; }
.helper-lang button.on { background: var(--orange); color: var(--orange-ink); }
.helper-lang button:not(.on):hover { color: var(--ink); }
.helper-lang + .helper-close { margin-left: 4px; }
mark.bubbles-mark {
  background: rgba(240,140,30,.28); color: var(--ink); padding: 0 .15em; border-radius: 2px;
  box-shadow: inset 0 -2px 0 var(--orange); animation: mark-in .5s ease-out;
}
@keyframes mark-in { from { background: rgba(240,140,30,.75); } }
.bubbles-focus { outline: 2px solid var(--orange) !important; outline-offset: 4px; animation: focus-pulse 1.4s ease-out 2; }
@keyframes focus-pulse { 0% { box-shadow: 0 0 0 0 rgba(240,140,30,.55); } 100% { box-shadow: 0 0 0 14px rgba(240,140,30,0); } }
.helper-note { margin: 0 14px 4px; font-size: .72rem; color: var(--dim); line-height: 1.4; }

/* Liste der unbeantworteten Fragen (tools/bubbles-worker/fragen.html) */
.admin-main { max-width: 900px; margin: 0 auto; padding: 48px 16px; }
.admin-main h1 { margin: 0 0 8px; }
.admin-login { display: flex; gap: 8px; margin: 18px 0 8px; }
.admin-login input { flex: 1; font: inherit; padding: 10px 12px; background: var(--panel); color: var(--ink); border: 1px solid var(--edge); }
.admin-row { display: grid; grid-template-columns: 50px 1fr auto auto; gap: 14px; align-items: center; padding: 10px 16px; border-top: 1px solid #2a2a2d; }
.admin-row:first-child { border-top: 0; }
.admin-row b { color: var(--orange); }
.admin-row .button { padding: 6px 12px; font-size: .85rem; }
@media (max-width: 640px) { .admin-row { grid-template-columns: 40px 1fr; } }
