:root {
  --paper: #F4F1E8; --card: #FFFDF7; --ink: #1F2A22; --muted: #66705F; --rule: #DDD8C8;
  --moss: #2F5D45; --moss-ink: #FFFFFF; --leaf: #5E9C5B; --wash: #E6EEDD;
  --ok: #2F7A4B; --ok-bg: #E1F0E2; --bad: #B5452F; --bad-bg: #F8E4DE; --sun: #E0A526; --sun-bg: #FBF0D2;
  --new: #2B5F8A; --new-bg: #DCE9F3; --day-all: #BCD6B4; --day-ok: #2F5D45;
  --soil: #8A6A48; --soil2: #A07E58; --trunk: #7A5A3C; --shadow: rgba(60, 70, 40, .16);
  --sky: linear-gradient(#EAF1E2, #F4F1E8 70%);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r: 16px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #141A16; --card: #1C241E; --ink: #E9EDE3; --muted: #9AA596; --rule: #2E3A31;
    --moss: #7DBB6C; --moss-ink: #10160F; --leaf: #7DBB6C; --wash: #22301F;
    --ok: #8ED29A; --ok-bg: #1D3324; --bad: #F0957F; --bad-bg: #3A211B; --sun: #F0C255; --sun-bg: #3A3117;
    --new: #8FC1E8; --new-bg: #1B2E3D; --day-all: #3A5540; --day-ok: #8CCB7A;
    --soil: #6B5237; --soil2: #7E6344; --trunk: #8A6A48; --shadow: rgba(0, 0, 0, .35);
    --sky: linear-gradient(#18221B, #141A16 70%);
  }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.5 var(--sans);
  min-height: 100dvh; overscroll-behavior-y: none;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0; text-wrap: balance; }
h1 { font-size: 1.9rem; letter-spacing: -.01em; }
h2 { font-size: 1.35rem; }
p { margin: 0; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }

.boot { display: grid; place-items: center; min-height: 100dvh; font: 4rem var(--serif); color: var(--leaf); }
.page {
  max-width: 560px; margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 18px) 16px calc(env(safe-area-inset-bottom) + 96px);
}
.page.sky { background: var(--sky); min-height: 100dvh; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.row { display: flex; align-items: center; gap: 10px; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stack > * + * { margin-top: 14px; }

.brand { display: flex; align-items: baseline; gap: 10px; }
.brand .kanji { font: 1.5rem var(--serif); color: var(--leaf); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 20px;
  border-radius: 14px; border: 1.5px solid var(--rule); background: var(--card); font-weight: 600; width: 100%;
}
.btn.primary { background: var(--moss); border-color: var(--moss); color: var(--moss-ink); }
.btn.danger { color: var(--bad); border-color: var(--bad); background: transparent; }
.btn.ghost { background: transparent; }
.btn.slim { min-height: 40px; padding: 0 14px; width: auto; font-size: .9rem; border-radius: 12px; }
.btn:disabled { opacity: .55; }
.link { background: none; border: 0; padding: 8px 0; color: var(--moss); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.back { background: none; border: 0; padding: 10px 10px 10px 0; color: var(--muted); font-weight: 600; }

/* Anmeldung */
.auth { min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; }
.auth .hero { text-align: center; margin-bottom: 22px; }
.auth .hero svg { width: 150px; }
.auth .hero h1 { font-size: 2.6rem; }
.field label { display: block; font-size: .86rem; font-weight: 600; margin-bottom: 6px; }
.field input {
  width: 100%; min-height: 50px; padding: 0 14px; border-radius: 14px; border: 1.5px solid var(--rule);
  background: var(--card); font-size: 16px;
}
.error { background: var(--bad-bg); color: var(--bad); padding: 10px 14px; border-radius: 12px; font-size: .92rem; }

/* Wald */
.forest { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.plot {
  position: relative; display: block; text-align: left; padding: 8px 12px 12px; border-radius: var(--r);
  border: 1.5px solid var(--rule); background: var(--card); width: 100%;
}
.plot .tree { display: block; width: 64%; margin: 0 auto; }
.plot h3 { font-size: 1.02rem; margin-top: 2px; }
.plot .meta { font-size: .8rem; color: var(--muted); margin-top: 3px; min-height: 2.4em; }
.plot .pill { position: absolute; top: 10px; right: 10px; }
.pill { display: inline-block; padding: 3px 9px; border-radius: 999px; background: var(--sun-bg); color: var(--ink); font-size: .74rem; font-weight: 700; }
.tree { aspect-ratio: 120 / 134; overflow: visible; }
.summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.summary div { background: var(--card); border: 1.5px solid var(--rule); border-radius: 14px; padding: 10px 6px; text-align: center; }
.summary b { display: block; font: 600 1.4rem var(--serif); }
.summary span { font-size: .76rem; color: var(--muted); }

/* Thema */
.bigtree { background: var(--wash); border-radius: var(--r); padding: 10px; }
.bigtree .tree { width: min(78%, 300px); display: block; margin: 0 auto; }
.bigtree.hang .tree { cursor: crosshair; }
.bar { height: 10px; border-radius: 999px; background: var(--rule); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--leaf); border-radius: 999px; }
.notice { background: var(--sun-bg); border-radius: 14px; padding: 12px 14px; font-weight: 600; }

/* Quiz */
.qhead { position: sticky; top: 0; z-index: 2; background: var(--paper); padding: calc(env(safe-area-inset-top) + 8px) 0 10px; margin-top: calc(-1 * env(safe-area-inset-top) - 18px); }
.chip { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--wash); font-size: .78rem; font-weight: 700; }
.question { font-size: 1.12rem; line-height: 1.45; font-weight: 500; text-wrap: pretty; }
.fig { background: var(--card); border: 1.5px solid var(--rule); border-radius: 14px; padding: 8px; color: var(--ink); }
.fig svg { display: block; width: 100%; height: auto; }
.opts { display: grid; gap: 10px; }
.opt {
  display: flex; gap: 12px; align-items: flex-start; text-align: left; width: 100%; padding: 13px 14px; min-height: 52px;
  border-radius: 14px; border: 1.5px solid var(--rule); background: var(--card); line-height: 1.4;
}
.opt .k { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--wash); font-weight: 700; font-size: .82rem; }
.opt.right { border-color: var(--ok); background: var(--ok-bg); }
.opt.right .k { background: var(--ok); color: var(--card); }
.opt.wrong { border-color: var(--bad); background: var(--bad-bg); }
.opt.wrong .k { background: var(--bad); color: var(--card); }
.opt.dim { opacity: .6; }
.feedback { border-radius: var(--r); padding: 14px; background: var(--card); border: 1.5px solid var(--rule); }
.feedback h3 { font-size: 1.15rem; }
.feedback.ok h3 { color: var(--ok); }
.feedback.no h3 { color: var(--bad); }
details.steps { border-top: 1.5px solid var(--rule); padding-top: 10px; }
details.steps summary { font-weight: 700; color: var(--moss); padding: 6px 0; cursor: pointer; }
details.steps ol { margin: 6px 0 0; padding-left: 22px; }
details.steps li + li { margin-top: 6px; }
.source { font-size: .78rem; color: var(--muted); }
.badge { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: .72rem; font-weight: 700; background: var(--wash); color: var(--ink); margin-right: 6px; }
.badge.ergaenzt { background: var(--sun-bg); }
.badge.neu { background: var(--rule); }
.reward { display: flex; gap: 12px; align-items: center; background: var(--sun-bg); border-radius: var(--r); padding: 10px 14px; font-weight: 600; animation: pop .45s cubic-bezier(.2, 1.4, .4, 1); }
.reward .tree { width: 64px; flex: none; }
@keyframes pop { from { transform: scale(.85); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .reward { animation: none; } }
.dock { position: fixed; left: 0; right: 0; bottom: 0; padding: 10px 16px calc(env(safe-area-inset-bottom) + 12px); background: linear-gradient(transparent, var(--paper) 30%); }
.dock .btn { max-width: 528px; margin: 0 auto; display: flex; }
.score { font: 600 3.2rem/1 var(--serif); }

/* Leute */
.people { display: grid; gap: 10px; }
.person { width: 100%; text-align: left; padding: 12px 14px; border-radius: var(--r); border: 1.5px solid var(--rule); background: var(--card); }
.person .name { font-weight: 700; overflow-wrap: anywhere; }
.mini { display: flex; gap: 2px; margin-top: 6px; }
.mini .tree { width: calc((100% - 18px) / 10); max-width: 30px; }
.adminrow { display: flex; gap: 8px; margin-top: 10px; }
.card { padding: 14px; border-radius: var(--r); border: 1.5px solid var(--rule); background: var(--card); }

/* Tabs */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(var(--n, 3), 1fr);
  background: var(--card); border-top: 1.5px solid var(--rule); padding-bottom: env(safe-area-inset-bottom); z-index: 5;
}
.tabs button { background: none; border: 0; padding: 9px 0 8px; font-size: .74rem; font-weight: 700; color: var(--muted); display: grid; justify-items: center; gap: 2px; }
.tabs button svg { width: 24px; height: 24px; }
.tabs button[aria-current="page"] { color: var(--moss); }

/* Dialog & Toast */
.overlay { position: fixed; inset: 0; background: rgba(15, 20, 15, .5); display: grid; place-items: end center; z-index: 20; padding: 16px; padding-bottom: calc(env(safe-area-inset-bottom) + 16px); }
.dialog { width: 100%; max-width: 480px; background: var(--card); border-radius: 20px; padding: 18px; }
#toast { position: fixed; left: 50%; top: calc(env(safe-area-inset-top) + 12px); transform: translate(-50%, -160%); background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 999px; font-size: .9rem; font-weight: 600; transition: transform .25s; z-index: 30; max-width: 90vw; text-align: center; }
#toast.show { transform: translate(-50%, 0); }
@media (min-width: 620px) { .forest { grid-template-columns: repeat(3, 1fr); } }

/* Tablet und größer: Seitenleiste statt Fußleiste, mehr Spalten, größere Schrift */
@media (min-width: 768px) {
  body { font-size: 17.5px; }
  h1 { font-size: 2.3rem; }
  .page { max-width: 980px; padding: calc(env(safe-area-inset-top) + 32px) 32px calc(env(safe-area-inset-bottom) + 48px); }
  .page.narrow { max-width: 720px; }
  .tabs {
    top: 0; right: auto; bottom: 0; width: 92px; grid-template-columns: 1fr; grid-auto-rows: min-content; align-content: center; gap: 10px;
    border-top: 0; border-right: 1.5px solid var(--rule); padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom) env(safe-area-inset-left);
  }
  .tabs button { padding: 14px 0; font-size: .8rem; }
  .tabs button svg { width: 28px; height: 28px; }
  #app:has(.tabs) .page { margin-left: max(92px, calc((100vw - 980px) / 2)); margin-right: auto; }
  #app:has(.tabs) .page.narrow { margin-left: max(92px, calc((100vw - 720px) / 2)); }
  .forest { grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .summary { max-width: 560px; }
  .page > .btn { max-width: 420px; }
  .page.narrow > .btn, .auth .btn { max-width: none; }
  .people { grid-template-columns: 1fr 1fr; gap: 14px; }
  .question { font-size: 1.3rem; }
  .opt { padding: 16px 18px; min-height: 60px; font-size: 1.05rem; }
  .opt .k { width: 30px; height: 30px; }
  .fig { max-width: 560px; }
  .bigtree .tree { width: min(60%, 340px); }
  .qhead { margin-top: calc(-1 * env(safe-area-inset-top) - 32px); padding-top: calc(env(safe-area-inset-top) + 16px); }
  .dock { position: static; padding: 8px 0 0; background: none; }
  .dock .btn { max-width: none; }
  .overlay { place-items: center; }
  .auth .hero svg { width: 190px; }
}
@media (min-width: 1100px) { .forest { grid-template-columns: repeat(5, 1fr); } }
@media (min-width: 768px) and (orientation: landscape) {
  .page.quiz:has(.fig) { max-width: 1040px; }
}

/* Skript-Zusammenfassung */
details.sec { border: 1.5px solid var(--rule); border-radius: var(--r); background: var(--card); }
details.sec > summary { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 14px; cursor: pointer; font: 600 1.08rem var(--serif); list-style: none; }
details.sec > summary::-webkit-details-marker { display: none; }
details.sec > summary::before { content: "+"; flex: none; width: 1em; color: var(--moss); font-family: var(--sans); }
details.sec[open] > summary::before { content: "–"; }
details.sec > summary > span:first-of-type { flex: 1; }
details.sec > summary .small { font-family: var(--sans); font-weight: 400; white-space: nowrap; }
.secbody { padding: 0 14px 16px; border-top: 1.5px solid var(--rule); padding-top: 14px; }
.secbody ul, .secbody ol { margin: 0; padding-left: 22px; }
.secbody li + li { margin-top: 4px; }
.formel { background: var(--wash); border-radius: 12px; padding: 10px 14px; }
.formel b { display: block; font: 600 1.12rem var(--serif); overflow-wrap: anywhere; }
.formel > span { display: block; font-size: .84rem; color: var(--muted); margin-top: 4px; }
.note { border-left: 4px solid var(--leaf); padding: 2px 0 2px 12px; }
.note .tag { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.note > * + * { margin-top: 6px; }
.note.beispiel { border-color: var(--rule); }
.note.skizze { border-color: var(--rule); border-left-style: dashed; }
.note.extra { border-color: var(--sun); }
.tablewrap { overflow-x: auto; }
.tablewrap table { border-collapse: collapse; width: 100%; font-size: .92rem; }
.tablewrap th, .tablewrap td { text-align: left; padding: 6px 10px 6px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
@media (min-width: 768px) { .tabs { grid-template-columns: 1fr; } }
.counts { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; font-size: .92rem; }
.counts b { font: 600 1.15rem var(--serif); }
.vec { position: relative; display: inline-block; }
.vec::after { content: "\2192"; position: absolute; left: 0; right: 0; top: -.58em; font-size: .62em; line-height: 1; text-align: center; font-weight: 400; }

/* Wischkarte (links = nicht relevant, rechts = Favorit) */
body { overflow-x: hidden; }
.swipe { position: relative; background: var(--card); border: 1.5px solid var(--rule); border-radius: 22px; padding: 16px; box-shadow: 0 6px 22px var(--shadow); touch-action: pan-y; transition: transform .28s cubic-bezier(.2, .9, .3, 1.2); will-change: transform; --no: 0; --yes: 0; }
.swipe.dragging { transition: none; cursor: grabbing; user-select: none; -webkit-user-select: none; }
.swipe.fly-left { transform: translateX(-130vw) rotate(-24deg) !important; transition: transform .26s ease-in; --no: 1; }
.swipe.fly-right { transform: translateX(130vw) rotate(24deg) !important; transition: transform .26s ease-in; --yes: 1; }
.swipe .opt { background: var(--paper); }
.swipe .opt.right { background: var(--ok-bg); }
.swipe .opt.wrong { background: var(--bad-bg); }
.stamp { position: absolute; top: 18px; z-index: 3; padding: 4px 12px; border: 3px solid; border-radius: 10px; font-weight: 800; font-size: 1.15rem; letter-spacing: .06em; text-transform: uppercase; pointer-events: none; background: var(--card); margin: 0 !important; }
.stamp.no { right: 16px; color: var(--bad); transform: rotate(12deg); opacity: var(--no); }
.stamp.yes { left: 16px; color: var(--ok); transform: rotate(-12deg); opacity: var(--yes); }
.swipebar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 12px; }
.round { width: 56px; height: 56px; border-radius: 50%; border: 2px solid; background: var(--card); font-size: 1.4rem; line-height: 1; display: grid; place-items: center; box-shadow: 0 3px 10px var(--shadow); }
.round.no { color: var(--bad); border-color: var(--bad); }
.round.yes { color: var(--sun); border-color: var(--sun); }
.round.yes.on { background: var(--sun); color: var(--card); }
@media (prefers-reduced-motion: reduce) { .swipe, .swipe.fly-left, .swipe.fly-right { transition: none; } }
/* Verlauf */
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.fchip { border: 1.5px solid var(--rule); background: var(--card); border-radius: 999px; padding: 8px 14px; font-size: .9rem; font-weight: 600; min-height: 40px; }
.fchip[aria-pressed="true"] { background: var(--moss); border-color: var(--moss); color: var(--moss-ink); }
.fchip b { font-weight: 700; opacity: .75; margin-left: 2px; }
.hrow { display: flex; gap: 12px; align-items: flex-start; }
.dot { flex: none; width: 12px; height: 12px; border-radius: 50%; margin-top: 6px; background: var(--rule); }
.dot.ok { background: var(--ok); }
.dot.no { background: var(--bad); }
.htext { display: grid; gap: 2px; min-width: 0; }
.hq { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tabs button { font-size: .7rem; }
.hintbtn { align-self: flex-start; padding: 4px 0; min-height: 40px; }
.hint { background: var(--sun-bg); border-radius: 12px; padding: 10px 14px; }
.hint .tag { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }

/* Kopfzeile */
.page { --px: 16px; --pt: 18px; }
@media (min-width: 768px) { .page { --px: 32px; --pt: 32px; } }
.top {
  position: sticky; top: 0; z-index: 4; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: calc(-1 * (env(safe-area-inset-top) + var(--pt))) calc(-1 * var(--px)) 0;
  padding: calc(env(safe-area-inset-top) + 8px) var(--px) 8px; background: var(--card); border-bottom: 1.5px solid var(--rule);
}
.top .brand { background: none; border: 0; padding: 4px 0; display: flex; align-items: baseline; gap: 8px; min-height: 40px; }
.top .brand .kanji { font: 1.5rem var(--serif); color: var(--leaf); }
.top .wordmark { font: 600 1.35rem var(--serif); letter-spacing: -.01em; }
.top .who { background: var(--wash); border: 0; border-radius: 999px; padding: 6px 12px; font-size: .82rem; font-weight: 700; max-width: 50%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Dashboard im Wald */
.solved { display: grid; gap: 8px; }
.solved .num { font: 600 1.7rem var(--serif); }
.dash { display: grid; gap: 12px; }
@media (min-width: 620px) { .dash { grid-template-columns: 1fr 1fr; } }
.dash .card > * + * { margin-top: 10px; }
.card .tag { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.quick { display: flex; flex-wrap: wrap; gap: 8px; }
.switch { flex: none; width: 52px; height: 32px; border-radius: 999px; border: 0; background: var(--rule); padding: 3px; display: flex; transition: background .15s; }
.switch i { display: block; width: 26px; height: 26px; border-radius: 50%; background: var(--card); box-shadow: 0 1px 3px var(--shadow); transition: transform .15s; }
.switch[aria-checked="true"] { background: var(--moss); }
.switch[aria-checked="true"] i { transform: translateX(20px); }
@media (prefers-reduced-motion: reduce) { .switch, .switch i { transition: none; } }
.plot .solvedline { font-size: .8rem; margin-top: 4px; }
.bar.thin { height: 6px; margin-top: 5px; }
.plot .meta { min-height: 0; }

/* Neue Zahlen */
.labels { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.badge.zahlen { background: var(--new-bg); color: var(--new); }
.labels .badge { margin-right: 0; }
.btn.zahlen { background: var(--new-bg); border-color: var(--new); color: var(--new); }
.seg { display: grid; grid-template-columns: 1fr 1fr; border: 1.5px solid var(--rule); border-radius: 12px; overflow: hidden; }
.seg button { border: 0; background: var(--card); min-height: 40px; font-size: .86rem; font-weight: 700; }
.seg button[aria-pressed="true"] { background: var(--moss); color: var(--moss-ink); }

/* Runde zusammenstellen */
.sheet { max-height: calc(100dvh - 32px); overflow-y: auto; }
.sheet .tag { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.sheet .filters { margin-top: 8px; }
.sheet .link { padding: 4px 0; font-size: .86rem; }
.sheet .back { padding: 6px 0 6px 12px; font-size: 1.1rem; }
.choice { display: grid; gap: 8px; margin-top: 8px; }
.choice button { display: flex; align-items: center; gap: 10px; text-align: left; min-height: 46px; padding: 0 14px; border-radius: 12px; border: 1.5px solid var(--rule); background: var(--card); font-weight: 600; }
.choice button span { flex: 1; }
.choice button b { color: var(--muted); font-weight: 700; }
.choice button i { flex: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--muted); }
.choice button[aria-checked="true"] { border-color: var(--moss); background: var(--wash); }
.choice button[aria-checked="true"] i { border-color: var(--moss); background: radial-gradient(var(--moss) 0 45%, transparent 50%); }

/* Antworten je Tag */
.daychart { display: grid; grid-template-columns: repeat(14, 1fr); gap: 2px; align-items: end; }
.dcol { background: none; border: 0; padding: 4px 0 2px; display: grid; justify-items: center; gap: 2px; border-radius: 8px; min-width: 0; }
.dcol[aria-pressed="true"] { background: var(--wash); }
.dpct { font-size: .62rem; font-weight: 700; min-height: 1.2em; font-variant-numeric: tabular-nums; }
.dtrack { height: 110px; width: 100%; display: flex; align-items: flex-end; justify-content: center; border-bottom: 1.5px solid var(--rule); }
.dall { width: min(70%, 22px); min-height: 0; background: var(--day-all); border-radius: 4px 4px 0 0; display: flex; align-items: flex-end; }
.dok { width: 100%; background: var(--day-ok); border-radius: 4px 4px 0 0; }
.dlab { font-size: .68rem; font-variant-numeric: tabular-nums; }
.dwd { font-size: .6rem; color: var(--muted); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.legend .k { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; }
.legend .k.all { background: var(--day-all); }
.legend .k.ok { background: var(--day-ok); }

/* ---------- Morilingo ---------- */
.fdot { display: inline-block; width: .78em; height: .78em; border-radius: 50%; margin-right: 6px; vertical-align: -1px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .18); }
.summary span .fdot { margin: 0 2px 0 6px; }
.summary span .fdot:first-child { margin-left: 0; }
.fslot { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px dashed var(--c); margin-top: 4px; }
.fslot.have { background: var(--c); border-style: solid; }
.lrow { display: flex; gap: 12px; align-items: flex-start; }
.plot > .small { display: block; margin-top: 2px; }
.voclist { display: grid; gap: 6px; }
.voc { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: baseline; padding: 9px 12px; border-radius: 12px; background: var(--card); border: 1.5px solid var(--rule); }
.voc > span:first-child { font-weight: 600; overflow-wrap: anywhere; }
.voc > span { min-width: 0; overflow-wrap: anywhere; }
.stage { font-size: .7rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--rule); white-space: nowrap; }
.stage.s3, .stage.s4 { background: var(--sun-bg); }
.stage.s5 { background: var(--ok-bg); color: var(--ok); }
.gap { display: inline-block; width: 3.2em; border-bottom: 2.5px solid var(--moss); margin: 0 2px; vertical-align: -2px; }
.gapok { color: var(--ok); }
.gapno { color: var(--bad); }
.typed { border-radius: 14px; padding: 12px 14px; border: 1.5px solid var(--rule); display: grid; gap: 2px; }
.typed.right { border-color: var(--ok); background: var(--ok-bg); }
.typed.wrong { border-color: var(--bad); background: var(--bad-bg); }
.accents { display: flex; gap: 8px; flex-wrap: wrap; }
.accents button { min-width: 44px; min-height: 44px; border-radius: 12px; border: 1.5px solid var(--rule); background: var(--card); font-size: 1.1rem; font-weight: 600; }
.rulebtn { display: grid; gap: 2px; text-align: left; width: 100%; padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--rule); background: var(--paper); font-weight: 600; }
.cgrid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; }
.cday { aspect-ratio: 1; display: grid; place-items: center; border-radius: 10px; font-size: .74rem; font-weight: 700; border: 1.5px solid var(--rule); color: var(--muted); }
.cday.on { background: var(--moss); border-color: var(--moss); color: var(--moss-ink); }
.cday.gap { border-style: dashed; opacity: .7; }
.cday.now { border-color: var(--sun); color: var(--ink); }
.roundline { margin-top: 6px; }
.reward .fdot { width: 26px; height: 26px; flex: none; margin: 0; }
details.hist > summary { list-style: none; cursor: pointer; }
details.hist > summary::-webkit-details-marker { display: none; }
form.row { align-items: flex-end; }
.notice .fdot { vertical-align: -1px; }
[lang="it"] { font-variant-ligatures: none; }
