/* Layout: one column, sticky tab bar, tables in their own scroll boxes, a form card for adding dragons */
:root {
  --bg: #f3f5f2; --surface: #ffffff; --sunk: #e9eee9; --fg: #1d2622; --muted: #5c6b64; --line: #d8dfda;
  --accent: #2f6b55; --on-accent: #ffffff;
  --fish: #2b6c9e; --wood: #8a5a2b; --iron: #5d6670; --wish: #8b3a8f; --wish-bg: #f3e4f4;
  --warn: #8b3a3a; --warn-bg: #f5e2e2; --cut: #c9a227;
  --r-common: rgb(125, 87, 10); --r-uncommon: rgb(214, 140, 0); --r-rare: rgb(24, 144, 255); --r-elusive: rgb(41, 98, 13); --r-unique: rgb(57, 16, 133); --r-premium: rgb(176, 166, 0); --r-epic: rgb(89, 89, 89); --r-legend: rgb(128, 39, 40);
  --art: #a24a7c;
  --t-a: #c0392b; --t-h: #2f8a3b; --t-s: #b08900;
  --medieval: "Uncial Antiqua", "MedievalSharp", Georgia, serif;
  --scribe: "MedievalSharp", Georgia, serif;
  --initial: "UnifrakturMaguntia", "Uncial Antiqua", Georgia, serif;
  --display: "Alegreya Sans SC", "Trebuchet MS", sans-serif;
  --body: "Alegreya Sans", "Segoe UI", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #141a17; --surface: #1c2420; --sunk: #232d28; --fg: #e4ebe6; --muted: #98a8a0; --line: #2e3a34;
  --accent: #7cc4a5; --on-accent: #10201a; --fish: #8cc3ee; --wood: #e0b07a; --iron: #b5bec8; --wish: #e2a6e6; --wish-bg: #3a2540;
  --warn: #eba3a3; --warn-bg: #402424; --cut: #d9b64a; --r-common: rgb(200, 150, 70); --r-uncommon: rgb(250, 173, 20); --r-rare: rgb(90, 175, 255); --r-elusive: rgb(110, 190, 70); --r-unique: rgb(165, 130, 240); --r-premium: rgb(229, 217, 1); --r-epic: rgb(175, 175, 175); --r-legend: rgb(225, 110, 110); --art: #e8a3c8; --t-a: #f08070; --t-h: #6fd17d; --t-s: #e8c95a; color-scheme: dark } }
:root[data-theme="dark"] {
  --bg: #141a17; --surface: #1c2420; --sunk: #232d28; --fg: #e4ebe6; --muted: #98a8a0; --line: #2e3a34;
  --accent: #7cc4a5; --on-accent: #10201a; --fish: #8cc3ee; --wood: #e0b07a; --iron: #b5bec8; --wish: #e2a6e6; --wish-bg: #3a2540;
  --warn: #eba3a3; --warn-bg: #402424; --cut: #d9b64a; --r-common: rgb(200, 150, 70); --r-uncommon: rgb(250, 173, 20); --r-rare: rgb(90, 175, 255); --r-elusive: rgb(110, 190, 70); --r-unique: rgb(165, 130, 240); --r-premium: rgb(229, 217, 1); --r-epic: rgb(175, 175, 175); --r-legend: rgb(225, 110, 110); --art: #e8a3c8; --t-a: #f08070; --t-h: #6fd17d; --t-s: #e8c95a; color-scheme: dark }

body { background: var(--bg); color: var(--fg); font-family: var(--scribe); font-size: 16px; line-height: 1.45; }
.wrap { max-width: 1320px; margin: 0 auto; padding-inline: 16px; padding-block: 24px 56px; }
.hero { display: flex; align-items: center; gap: 18px; padding: 16px 18px; border-radius: 14px; border: 1px solid var(--line);
  background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--accent) 16%, var(--surface)) 0%, var(--surface) 60%); }
.hero-img { width: 228px; height: 100px; flex: 0 0 228px; object-fit: contain; filter: drop-shadow(0 6px 10px rgb(0 0 0 / .25)); }
.hero-text { min-width: 0; flex: 1 1 auto; display: flex; flex-direction: column; gap: 6px; align-items: center; text-align: center; }
h1 { display: flex; align-items: center; justify-content: center; gap: .4em; text-align: center; font-family: var(--medieval); font-weight: 400; font-size: clamp(1.8rem, 4.5vw, 2.6rem); line-height: 1.05; margin: 0; color: var(--accent); letter-spacing: .01em; text-wrap: balance; }
h1::before, h1::after { content: "❦"; font-family: Georgia, "Segoe UI Symbol", serif; font-size: .55em; color: color-mix(in srgb, var(--accent) 55%, transparent); }
h1::after { transform: scaleX(-1); }
nav::before, nav::after { content: "❧ ✠ ☙"; flex: 1 1 0; text-align: center; letter-spacing: .5em; font-family: Georgia, "Segoe UI Symbol", serif; font-size: 1.3rem; color: color-mix(in srgb, var(--accent) 45%, transparent); white-space: nowrap; overflow: hidden; }
@media (max-width: 1100px) { nav::before, nav::after { display: none; } }
a.dropcap { text-decoration: none; transition: color .2s, text-shadow .2s; }
a.dropcap:hover, a.dropcap:focus-visible { color: var(--r-premium); text-shadow: 0 0 10px color-mix(in srgb, var(--r-premium) 60%, transparent); }
@media (prefers-reduced-motion: reduce) { a.dropcap { transition: none; } }
.dropcap { float: left; font-family: var(--initial); font-size: 3.6em; line-height: .78; margin: .06em .12em 0 0; color: var(--accent); }
@media (max-width: 520px) { .hero { flex-direction: column; align-items: flex-start; } .hero-img { width: 84px; height: 84px; flex-basis: 84px; } }
.sub { margin: 0 auto; text-align: justify; text-align-last: justify; hyphens: auto; color: var(--muted); max-width: 70ch; font-family: var(--scribe); font-size: 1.02rem; line-height: 1.5; }
.status { margin: 0; clear: both; text-align: center; font-size: .9rem; color: var(--muted); font-family: var(--scribe); }
.status.warn { color: var(--warn); }

nav { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 3; background: var(--bg); display: flex; justify-content: center; align-items: center; gap: 6px; flex-wrap: wrap; padding-block: 12px; border-bottom: 1px solid var(--line); margin-top: 14px; }
.tabico { width: 22px; height: 22px; object-fit: contain; vertical-align: -5px; margin-right: 6px; }
.tabico + .tabico { margin-left: -4px; }
.tico { width: 20px; height: 20px; object-fit: contain; vertical-align: -5px; margin-right: 5px; }
nav button { font: inherit; font-family: var(--medieval); font-weight: 400; font-size: 1.02rem; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); cursor: pointer; }
nav button[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

section { margin-top: 20px; display: flex; flex-direction: column; gap: 16px; }
h2 { font-family: var(--medieval); font-weight: 400; font-size: 1.35rem; letter-spacing: .01em; margin: 0; color: var(--accent); }
h3 { font-family: var(--medieval); font-weight: 400; font-size: 1.15rem; margin: 0; }
/* Überschriften als Holzschilder wie im Spiel: erste Überschrift eines Kastens als Leiste über die volle Breite,
   weitere Überschriften und Tabellen-Überschriften als kleine Schilder */
:root { --plank-hi: #b07a43; --plank-lo: #7a4a20; --plank-edge: #5a3514; --plank-text: #ffdf7e; }
.card > h2:first-child, .card > form > h2:first-child, .card > details.bannerfold > summary > h2, .card > h2.plank, h2.subplank, .card > h2 ~ h2, .card > form > h2 ~ h2, h2.inline,
#wishTables h3, .teamhead h3, .stack > div > h3.plank {
  color: var(--plank-text); text-shadow: 0 1px 0 #3d220a, 0 0 8px rgb(0 0 0 / .25);
  background: repeating-linear-gradient(90deg, rgb(255 255 255 / .05) 0 2px, transparent 2px 11px),
              linear-gradient(180deg, var(--plank-hi), var(--plank-lo));
  border: 1px solid var(--plank-edge);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .28), inset 0 -2px 0 rgb(0 0 0 / .22), 0 2px 4px rgb(0 0 0 / .12);
}
.card > details.bannerfold > summary { display: block; }
.card > details.bannerfold > summary > h2 { display: flex; align-items: center; }
.card > h2:first-child, .card > form > h2:first-child, .card > details.bannerfold > summary > h2 {
  margin: -14px -14px 2px; padding: 9px 16px 8px; border-width: 0 0 1px; border-radius: 9px 9px 0 0; font-size: 1.4rem;
}
.card > h2 ~ h2, .card > form > h2 ~ h2, h2.inline, #wishTables h3, .teamhead h3, .stack > div > h3.plank {
  align-self: flex-start; display: inline-block; padding: 4px 14px 3px; border-radius: 7px; font-size: 1.08rem; margin-top: 4px;
}
/* Fisch, Holz, Eisen: kleine Schilder in der Farbe des Rohstoffs */
.stack > div > h3.fish, .stack > div > h3.wood, .stack > div > h3.iron {
  align-self: flex-start; padding: 4px 14px 3px; border-radius: 7px; font-size: 1.08rem;
  background: var(--tag); color: var(--surface); text-shadow: none;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .25), inset 0 -2px 0 rgb(0 0 0 / .18);
}
h3.fish { --tag: var(--fish); } h3.wood { --tag: var(--wood); } h3.iron { --tag: var(--iron); }
.hint { color: var(--muted); font-size: .92rem; margin: 0; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.formgrid { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 10px; align-items: end; }
.formgrid > * { min-width: 0; }
label { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; color: var(--muted); }
input, select { font: inherit; color: var(--fg); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; min-width: 0; width: 100%; box-sizing: border-box; }
.btn { font: inherit; font-weight: 700; padding: 9px 16px; border-radius: 8px; border: 1px solid var(--accent); background: var(--accent); color: var(--on-accent); cursor: pointer; white-space: nowrap; }
.btn.ghost { background: transparent; color: var(--accent); }
.btn.small { padding: 4px 10px; font-weight: 500; font-size: .85rem; }
.btn.danger { border-color: var(--warn); color: var(--warn); background: transparent; }
.resolve { font-size: .9rem; color: var(--muted); }
.resolve.bad { color: var(--warn); }
details summary { cursor: pointer; color: var(--accent); font-size: .92rem; }
.customgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 10px; }

.toolbar { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: end; }
.toolbar label { flex: 0 1 150px; }
.check { flex-direction: row; align-items: center; gap: 8px; font-size: .95rem; color: var(--fg); }
.check input { width: auto; }

.tbl { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
th, td { padding: 8px 10px; text-align: left; border-top: 1px solid var(--line); white-space: nowrap; }
thead th { border-top: 0; font-family: var(--scribe); font-size: .95rem; letter-spacing: 0; color: var(--muted); font-weight: 400; background: var(--sunk); }
td.num, th.num { text-align: right; }
.sortbtn { font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.sortbtn::after { content: "↕"; opacity: .35; font-size: .9em; }
th[aria-sort="ascending"] .sortbtn, th[aria-sort="descending"] .sortbtn { color: var(--accent); font-weight: 700; }
th[aria-sort="ascending"] .sortbtn::after { content: "▲"; opacity: 1; }
th[aria-sort="descending"] .sortbtn::after { content: "▼"; opacity: 1; }
td.name { white-space: normal; min-width: 180px; }
.rar { font-weight: 700; }
.rar-common { color: var(--r-common); } .rar-uncommon { color: var(--r-uncommon); } .rar-rare { color: var(--r-rare); }
.rar-elusive { color: var(--r-elusive); } .rar-unique { color: var(--r-unique); } .rar-premium { color: var(--r-premium); }
.rar-epic { color: var(--r-epic); } .rar-legendary { color: var(--r-legend); }
.legend { display: flex; flex-wrap: wrap; gap: 8px; font-size: .95rem; }
.legend button.rar { font: inherit; font-weight: 700; cursor: pointer; }
.legend button.rar:hover, .legend button.rar[aria-pressed="true"] { background: color-mix(in srgb, currentColor 26%, transparent); }
.legend .rar { padding: 3px 12px; border-radius: 999px; border: 1.5px solid currentColor; background: color-mix(in srgb, currentColor 12%, transparent); }
.tdot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }
.tdot.A { background: var(--t-a); } .tdot.H { background: var(--t-h); } .tdot.S { background: var(--t-s); }
.slotgrid { display: flex; flex-wrap: wrap; gap: 10px; }
.slotgrid label { flex: 0 1 170px; }
tr.inteam td { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.chg.lvl { background: var(--cut); color: #1d2622; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.teamcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.tcard { background: var(--sunk); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tslot { font-size: .8rem; color: var(--muted); display: flex; align-items: center; gap: 2px; }
.tcard .tval { font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.tcard .tval small { font-size: .8rem; color: var(--muted); font-weight: 400; }
.tcard.empty { justify-content: center; color: var(--warn); }
.typestrip { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; padding: 8px 12px; border: 1px dashed var(--line); border-radius: 10px; font-size: .92rem; color: var(--muted); }
.typestrip b { color: var(--fg); }
.typestrip .ts-label { font-family: var(--scribe); color: var(--fg); }
.teamhead { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-top: 6px; }
.teamhead span { color: var(--muted); font-size: .92rem; }
.teamline { margin: 0; white-space: nowrap; overflow-x: auto; color: var(--muted); font-size: .92rem; }
.teamline b { color: var(--fg); }
.status select { font: inherit; font-family: var(--scribe); color: var(--accent); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; width: auto; }
.status q { font-style: italic; color: var(--fg); quotes: "„" "“"; cursor: help; border-bottom: 1px dotted var(--muted); }
.construction { position: relative; min-height: 320px; }
.construction-content { filter: blur(2px) grayscale(.6); opacity: .35; pointer-events: none; user-select: none; }
.construction-sign { position: absolute; top: 40px; left: 0; right: 0; margin: 0 auto; width: min(440px, 92%); box-sizing: border-box; text-align: center;
  background: #f4c20d; color: #1a1a1a; padding: 18px 22px; transform: rotate(-2deg); box-shadow: 0 10px 24px rgb(0 0 0 / .3);
  border: 12px solid transparent; border-image: repeating-linear-gradient(45deg, #1a1a1a 0 14px, #f4c20d 14px 28px) 12; }
.construction-sign .cs-title { font-family: var(--medieval); font-size: 2rem; letter-spacing: .04em; }
.construction-sign p { margin: 6px 0 0; font-weight: 700; }
.construction-sign .cs-small { font-weight: 400; font-size: .92rem; }
.costgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.flowgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.costbox, .flowbox { background: var(--sunk); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cb-label { font-family: var(--scribe); font-size: .95rem; color: var(--muted); display: flex; align-items: center; }
.costbox b { font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.flow { display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch; gap: 8px; }
.flow-cell { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; display: flex; flex-direction: column; min-width: 0; }
.flow-cell span { font-family: var(--scribe); font-size: .85rem; color: var(--muted); }
.flow-cell b { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.flow-cell.goal { border-color: var(--accent); }
.flow-cell.goal b { color: var(--accent); }
.flow-arrow { align-self: center; width: 0; height: 0; border-top: 12px solid transparent; border-bottom: 12px solid transparent; border-left: 16px solid var(--accent); }
@media (max-width: 640px) { .costgrid { grid-template-columns: 1fr 1fr; } .flowgrid { grid-template-columns: 1fr; } }
td.dual { line-height: 1.25; }
td.dual span { display: block; }
td.dual .dl-max { font-size: .8rem; color: var(--muted); font-weight: 400; }
.sortwhich { font-family: var(--body); font-size: .7rem; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--on-accent); }
.source { margin: 4px 0 0; font-size: .82rem; color: var(--muted); font-family: var(--scribe); }
.source a { color: inherit; }
.csvbar { margin-left: auto; display: flex; flex-wrap: nowrap; gap: 8px; align-self: end; }
.csvbar .pillbtn { flex: 0 0 auto; flex-direction: row; color: var(--fg); font-size: 1.02rem; }
@media (max-width: 520px) { .csvbar { flex-wrap: wrap; margin-left: 0; max-width: 100%; } .csvbar .pillbtn { flex: 1 1 auto; min-width: 0; white-space: normal; } }
.pillbtn { font: inherit; font-family: var(--medieval); font-weight: 400; font-size: 1.02rem; display: inline-flex; align-items: center; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); cursor: pointer; white-space: nowrap; }
.pillbtn { gap: 8px; padding: 5px 16px 5px 8px; text-align: left; }
.pillbtn .tabico { width: 32px; height: 32px; margin: 0; vertical-align: middle; }
.pb-text { line-height: 1.15; }
.pillbtn:hover { border-color: var(--accent); color: var(--accent); }
.pillbtn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.csvmsg { background: var(--sunk); border-radius: 10px; padding: 10px 12px; display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.csvmsg.bad { background: var(--warn-bg); color: var(--warn); }
.csvmsg textarea { width: 100%; min-height: 120px; font: .85rem/1.4 ui-monospace, Consolas, monospace; background: var(--surface); color: var(--fg); border: 1px solid var(--line); border-radius: 8px; padding: 8px; }
.lockbox { margin-top: 14px; max-width: 760px; }
.lockbox .row { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.lockbox .row label { flex: 1 1 200px; }
.lockbox .err { color: var(--warn); margin: 0; }
.lockbox .okmsg { color: var(--accent); margin: 0; }
.lockbox fieldset { border: 1px solid var(--line); border-radius: 10px; margin: 12px 0 0; padding: 8px 12px 12px; }
.lockbox legend { font-family: var(--display); padding: 0 6px; }
.lockbox .danger { border-color: var(--warn); }
.lockbox.wide { max-width: none; }
.adm-sum { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 6px 0 10px; }
.adm-sum b { font-family: var(--display); font-size: 1.25rem; color: var(--accent); margin-right: 4px; }
.adm-wrap { overflow-x: auto; margin-top: 10px; border: 1px solid var(--line); border-radius: 10px; }
.adm-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.adm-table th, .adm-table td { padding: 7px 10px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.adm-table th { font-family: var(--display); font-weight: normal; background: var(--sunk); cursor: pointer; user-select: none; }
.adm-table td.num, .adm-table th.num { text-align: right; }
.adm-table tr:last-child td { border-bottom: 0; }
.adm-table .btn.small { margin-left: 4px; }
.adm-table .mail { color: var(--muted); }
.adm-detail td { background: var(--sunk); white-space: normal; }
.adm-dragons { columns: 3 220px; margin: 0; padding: 0 0 0 18px; }
.adm-pw { font-family: "Courier Prime", monospace; font-size: 1.1rem; background: var(--surface); border: 1px dashed var(--accent); border-radius: 6px; padding: 2px 8px; user-select: all; }
.lockbox fieldset .hint + .row { margin-top: 10px; }
#acc #ac-msg:not(:empty) { margin-top: 12px; }
#acc > .row:last-child, #adm > .row:last-child { margin-top: 16px; }
.lockbox .btn.warnbtn { background: var(--warn); color: var(--surface); border-color: var(--warn); }
.lockbox .construction-sign { position: static; transform: rotate(-1.5deg); margin: 6px auto 4px; }
.status .guestnote { display: block; color: var(--warn); white-space: nowrap; font-size: .92em; margin-top: 2px; }
@media (max-width: 760px) { .status .guestnote { white-space: normal; } }
@media (max-width: 720px) { .csvbar { margin-left: 0; } }
td.tips { white-space: nowrap; }
.tipico { width: 22px; height: 22px; object-fit: contain; margin-right: 2px; vertical-align: middle; cursor: help; }
.hico { width: 18px; height: 18px; object-fit: contain; vertical-align: -4px; margin-right: 4px; }
thead th[title] { cursor: help; }
.legal-links a { font-weight: 700; }
.legal { border-top: 1px dashed var(--line); padding-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.legal h3 { font-family: var(--body); font-weight: 700; font-size: 1rem; color: var(--fg); }
.hero { position: relative; }
.cookienote { position: static; max-width: 230px; display: flex; gap: 10px; align-items: center;
  font-family: var(--body); font-size: .8rem; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; box-shadow: 0 4px 14px rgb(0 0 0 / .12); }
.cookienote a { color: inherit; }
.cookienote { background: color-mix(in srgb, var(--surface) 85%, transparent); box-shadow: none; }
.hero-right { margin-left: auto; align-self: stretch; display: flex; flex-direction: column; align-items: flex-end; justify-content: center; gap: 8px; flex: 0 0 auto; }
.hero-img2 { width: 121px; height: 100px; object-fit: contain; filter: drop-shadow(0 6px 10px rgb(0 0 0 / .25)); }
@media (max-width: 900px) { .hero { flex-wrap: wrap; } .hero-img2 { display: none; } .hero-right { width: 100%; align-items: stretch; } .cookienote { max-width: none; } }
.cookienote button { font: inherit; font-weight: 700; color: var(--accent); background: none; border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; cursor: pointer; }
.wishgrid { display: grid; grid-template-columns: 2fr 1fr 1.2fr 1.4fr 1fr 2fr auto; gap: 10px; align-items: end; }
.wishgrid > * { min-width: 0; }
.wishgrid .w-name { position: relative; }
.wishcats { align-items: center; }
.wishcats .wc-label { font-family: var(--medieval); color: var(--accent); }
.wishcats label.check { flex: 0 0 auto; }
@media (max-width: 980px) { .wishgrid { grid-template-columns: 1fr 1fr; } .wishgrid .w-name, .wishgrid .w-note { grid-column: 1 / -1; } }
td.wishmeta { white-space: normal; min-width: 120px; font-size: .9rem; }
/* Aufklappbare Bereiche: das Holzschild ist der Schalter, der goldene Pfeil dreht sich beim Öffnen */
.fold > summary { list-style: none; cursor: pointer; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary h2 { display: inline-flex; align-items: center; margin-top: 0; }
.fold .chev { display: inline-block; margin-left: 10px; font-size: .8em; transition: transform .2s; }
.fold[open] .chev { transform: rotate(90deg); }
.fold > summary:hover h2, .fold > summary:focus-visible h2 { filter: brightness(1.08); }
.fold > summary:focus-visible { outline: none; }
.fold > summary:focus-visible h2 { outline: 2px solid var(--cut); outline-offset: 2px; }
.fold > * + * { margin-top: 12px; }
/* Team-Tabelle mit Gruppen */
tr.grp td { background: var(--sunk); padding-top: 9px; padding-bottom: 7px; }
.grptag { display: inline-block; padding: 2px 12px 1px; border-radius: 6px; font-family: var(--medieval); color: var(--surface); background: var(--tag, var(--muted));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .25), inset 0 -2px 0 rgb(0 0 0 / .18); }
.grptag.grptag { color: var(--surface); }
.card > details.bannerfold:not([open]) > summary > h2 { margin-bottom: -14px; border-radius: 9px; border-width: 0; }
.grptag.fish { --tag: var(--fish); } .grptag.wood { --tag: var(--wood); } .grptag.iron { --tag: var(--iron); } .grptag.out { --tag: var(--warn); } .grptag.res { --tag: var(--muted); }
tr.leaving td, tr.reserve td { opacity: .8; }
/* „Jetzt tun“ */
.nowgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.nowbox { background: var(--sunk); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.nowbox > h3.grptag { align-self: flex-start; font-size: 1.02rem; }
.grptag.acad { --tag: var(--accent); } .grptag.feed { --tag: var(--t-h); } .grptag.wave { --tag: #5f7d95; }
.nowlist { margin: 0; padding: 0 0 0 4px; list-style: none; display: flex; flex-direction: column; gap: 6px; counter-reset: n; }
ol.nowlist > li { counter-increment: n; }
ol.nowlist > li::before { content: counter(n) "."; min-width: 1.4em; color: var(--muted); font-size: .9rem; line-height: 1.45; padding-top: 4px; }
.nowlist > li { display: flex; align-items: flex-start; gap: 8px; }
.nowlist .ico { width: 28px; height: 28px; flex: 0 0 28px; margin-top: 2px; }
.nowlist .en { display: block; color: var(--muted); font-size: .88rem; }
/* festes Zeilenmuster: jede Zeile eine eigene, nicht umbrechende Zeile; zu Langes wird mit … gekürzt */
.nltext { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.nl { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nl + .nl { color: var(--muted); font-size: .88rem; }
.nl.nlrow { display: flex; align-items: center; gap: 8px; }
.nl.nlrow .amt { flex: 0 0 auto; }
.lvlstep { color: var(--muted); font-size: .88rem; white-space: nowrap; }
.nowtag { display: inline-block; padding: 0 8px; border-radius: 999px; font-size: .8rem; font-weight: 700; border: 1.5px solid currentColor; margin-left: 4px; }
.nl.nlrow .nowtag { margin-left: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nowtag.sub { color: var(--cut); } .nowtag.tmp { color: var(--muted); }
.nowslider { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; background: var(--sunk); border-radius: 10px; padding: 8px 12px; }
.nowslider input[type=range] { flex: 1 1 220px; max-width: 420px; accent-color: var(--accent); }
.nowslider b { min-width: 15em; white-space: nowrap; }   /* feste Breite: Regler zuckt nicht, wenn der Text länger wird */
.nowslider input[type=range] { flex: 0 1 380px; }
.nowslider .stepbtn { min-width: 34px; padding-inline: 8px; font-size: 1.1rem; line-height: 1; }
.pickup { margin: 0 0 4px; }
.stab { display: inline-block; flex: 0 0 auto; padding: 0 7px; border-radius: 999px; font-size: .78rem; font-weight: 700; border: 1.5px solid currentColor; }
.stab.s-hi { color: var(--t-h); }
td.num .stab { white-space: nowrap; } .stab.s-mid { color: var(--cut); } .stab.s-lo { color: var(--muted); }
.nowopts { flex: 1 1 100%; }
.nowopts > summary { cursor: pointer; color: var(--accent); font-size: .92rem; }
.nowopts[open] { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; }
.nowopts[open] > summary { flex: 1 1 100%; }
.nowopts label { display: inline-flex; flex-direction: row; align-items: center; gap: 4px; white-space: nowrap; }
.nowopts input[type=number] { width: 4.5em; margin: 0 4px; padding: 4px 6px; }
.nowopts .hint { flex: 1 1 100%; }
/* Leveln: Sicherheit, Ersatz, Trainingsplan */
.safe { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: .85rem; font-weight: 700; border: 1.5px solid currentColor; }
.safe-sicher { color: var(--t-h); } .safe-Mitte { color: var(--cut); } .safe-knapp { color: var(--warn); }
td.replcell .en { display: block; }
table.plantbl td { white-space: normal; vertical-align: top; }
table.plantbl td:first-child, table.plantbl td.num { white-space: nowrap; }
tr.planend td { background: color-mix(in srgb, var(--accent) 10%, transparent); font-weight: 700; }
/* Karte „Wer sammelt was“ */
.chartwrap { overflow-x: auto; }
.gchart { width: 100%; min-width: 640px; height: auto; display: block; font-family: var(--body); }
.gchart .z-fish { fill: color-mix(in srgb, var(--fish) 9%, transparent); }
.gchart .z-wood { fill: color-mix(in srgb, var(--wood) 9%, transparent); }
.gchart .grid { stroke: var(--line); stroke-width: 1; }
.gchart .ctx { fill: color-mix(in srgb, var(--muted) 10%, transparent); }
.gchart .ctxlab { font-style: italic; }
.gchart .axis { stroke: var(--muted); stroke-width: 1.2; }
.gchart .tick { fill: var(--muted); font-size: 12px; }
.gchart .alabel { font-size: 14px; font-weight: 700; }
.gchart .alabel.fish { fill: var(--fish); } .gchart .alabel.wood { fill: var(--wood); }
.gchart .lim-fish { stroke: var(--fish); stroke-width: 2; } .gchart .lim-wood { stroke: var(--wood); stroke-width: 2; }
.gchart .now { stroke-dasharray: 6 5; stroke-width: 1.5; opacity: .8; }
.gchart text.lim { stroke: none; font-size: 12px; font-weight: 700; }
.gchart text.lim-fish { fill: var(--fish); } .gchart text.lim-wood { fill: var(--wood); }
.gchart .move { stroke: var(--muted); stroke-width: 1.3; opacity: .55; }
.gchart .path { fill: none; stroke-linejoin: round; stroke-linecap: round; }
.gchart .path.past { stroke: var(--muted); stroke-width: 1.2; opacity: .45; }
.gchart .path.future { stroke: var(--muted); stroke-width: 1.8; opacity: .7; }
.gchart .path.future.s-new { stroke: var(--t-h); } .gchart .path.future.s-stay { stroke: var(--accent); }
.gchart .startdot { fill: var(--surface); stroke: var(--muted); stroke-width: 1.2; }
.gchart .leader { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 2 2; opacity: .8; }
.gchart .truedot { fill: var(--muted); } .gchart .truedot.r-F { fill: var(--fish); } .gchart .truedot.r-W { fill: var(--wood); }
.gchart .badge.b-new { fill: var(--t-h); } .gchart .badge.b-out { fill: var(--warn); } .gchart .badge.b-res { fill: #5f7d95; }
.chartlegend .path.past { stroke: var(--muted); stroke-width: 1.5; } .chartlegend .path.future { stroke: var(--t-h); stroke-width: 2; }
.chartlegend .startdot { fill: var(--surface); stroke: var(--muted); } .chartlegend .nowdot { fill: var(--muted); }
.gchart .move.s-new { stroke: var(--t-h); opacity: .8; }
.gchart .arrowhead { fill: var(--muted); }
.gchart .nowdot { fill: var(--muted); }
.gchart .nowdot.s-new { fill: var(--t-h); }
.gchart .ph { fill: var(--sunk); stroke: var(--muted); }
.gchart .dname.rar { fill: currentColor; font-weight: 700; }
.gchart .dname { fill: var(--fg); font-size: 11px; paint-order: stroke; stroke: var(--surface); stroke-width: 3px; }
.pt .ring { fill: var(--surface); stroke: var(--muted); stroke-width: 2.5; }
.pt.r-F .ring { stroke: var(--fish); } .pt.r-W .ring { stroke: var(--wood); } .pt.r-I .ring { stroke: var(--iron); }
.pt.s-stay .ring { stroke-width: 3.5; }
.pt.s-new .ring { stroke-width: 3.5; filter: drop-shadow(0 0 3px var(--t-h)); }
.pt.s-out { opacity: .6; } .pt.s-out .ring { stroke: var(--warn); stroke-dasharray: 4 3; }
.pt.s-res .ring { stroke: #5f7d95; stroke-dasharray: 1.5 3; stroke-width: 2.5; stroke-linecap: round; }
.pt.s-res { opacity: .8; }
.pt.s-none .ring { stroke: var(--muted); stroke-dasharray: 3 3; stroke-width: 1.5; }
.pt.s-none { opacity: .45; }
.gchart .badge, .chartlegend .badge { fill: var(--t-h); } .gchart .badgetxt, .chartlegend .badgetxt { fill: #fff; font-size: 11px; font-weight: 800; }
.chartlegend .badge.b-out { fill: var(--warn); } .chartlegend .badge.b-res { fill: #5f7d95; }
.charttools { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.charttools .btn.small { min-width: 34px; font-size: 1rem; }
.gchart { touch-action: none; cursor: grab; } .gchart.dragging { cursor: grabbing; }
.gchart .mask { fill: var(--surface); }
.gchart.hovering .pt, .gchart.hovering .move, .gchart.hovering .nowdot, .gchart.hovering .path, .gchart.hovering .startdot,
.gchart.hovering .leader, .gchart.hovering .truedot { opacity: .15; transition: opacity .12s; }
.gchart.hovering .path.hl { opacity: 1; stroke: var(--cut); stroke-width: 3; }
.gchart.hovering .startdot.hl, .gchart.hovering .truedot.hl { opacity: 1; fill: var(--cut); r: 5; }
.gchart.hovering .leader.hl { opacity: 1; stroke: var(--cut); stroke-width: 1.5; }
.gchart.hovering .pt.hl { opacity: 1; }
.gchart.hovering .pt.hl .ring { stroke-width: 4.5; filter: drop-shadow(0 0 4px var(--cut)); }
.gchart.hovering .move.hl { opacity: 1; stroke: var(--cut); stroke-width: 3; }
.gchart.hovering .nowdot.hl { opacity: 1; fill: var(--cut); r: 6; }
.chartlegend { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; font-size: .92rem; }
.chartlegend .lg { display: inline-flex; align-items: center; gap: 6px; }
/* Wunschliste: Bearbeiten-Knopf und aufgeklappte Bearbeitungszeile */
td.rowbtns { white-space: nowrap; }
td.rowbtns .editbtn { margin-left: 6px; padding-inline: 10px; font-size: 1rem; line-height: 1; }
td.rowbtns .editbtn[aria-expanded="true"] { background: color-mix(in srgb, var(--accent) 14%, transparent); }
tr.wishedit > td { background: var(--sunk); padding: 10px 12px 12px; }
.wisheditgrid { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.wisheditgrid label { flex: 1 1 130px; }
.wisheditgrid label.w-note { flex: 2 1 220px; }
.wisheditgrid .pristine { color: var(--muted); }
/* Vorübergehend gebunden */
.busytag { display: block; margin-top: 3px; font-size: .78rem; font-weight: 700; color: var(--cut); white-space: nowrap; }
td.rowbtns .editbtn.on { background: color-mix(in srgb, var(--cut) 22%, transparent); border-color: var(--cut); }
.boundline { margin: 0 0 4px; padding: 6px 10px; border-radius: 8px; background: color-mix(in srgb, var(--cut) 12%, transparent); }
.boundline .btn.small { margin-left: 4px; }
@media (prefers-reduced-motion: reduce) { .fold .chev { transition: none; } }
h2.inline { display: inline; }
.statuegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; margin-top: 10px; }
.statuegrid label { flex-direction: row; align-items: center; justify-content: space-between; gap: 8px; background: var(--sunk); border-radius: 8px; padding: 6px 10px; color: var(--fg); font-size: .92rem; }
.statuegrid select { width: auto; padding: 3px 6px; }
.statuegrid small { color: var(--muted); display: block; }
.en .art { color: inherit; font-style: normal; }
.en .enname { font-style: italic; }
.en .sep { margin: 0 .45em; color: inherit; opacity: .7; font-family: Georgia, "Segoe UI Symbol", serif; }
.namewrap { display: flex; align-items: center; gap: 8px; }
.namewrap > span:last-child { min-width: 0; }
.ico { width: 32px; height: 32px; flex: 0 0 32px; border-radius: 6px; object-fit: contain; background: var(--sunk); }
.ico.ph { display: inline-block; }
.namefield { position: relative; }
.suggest[data-rar] { }
.suggest { position: absolute; z-index: 5; left: 0; right: 0; top: 100%; margin-top: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgb(0 0 0 / .18); max-height: 360px; overflow-y: auto; padding: 4px; }
.suggest button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; font: inherit; color: var(--fg); background: none; border: 0; border-radius: 8px; padding: 6px 8px; cursor: pointer; }
.suggest button:hover, .suggest button[aria-selected="true"] { background: var(--sunk); }
.suggest .sg-name { display: flex; flex-direction: column; min-width: 0; }
.suggest .sg-name small { color: var(--muted); }
.en { display: block; font-size: .82rem; color: var(--muted); }
.rank { font-weight: 700; color: var(--accent); }
tr.cutline td, tr.top5 td { border-top: 2px dashed var(--cut); }
tr.reserve td { color: var(--muted); }
tr.wishrow td.name::after { content: "Wunsch"; margin-left: 8px; font-size: .72rem; padding: 1px 7px; border-radius: 999px; background: var(--wish-bg); color: var(--wish); font-weight: 500; }
.fish { color: var(--fish); font-weight: 700; }
.wood { color: var(--wood); font-weight: 700; }
.iron { color: var(--iron); font-weight: 700; }
.lvl { width: 72px; padding: 4px 6px; }
.pill { font-size: .75rem; padding: 1px 8px; border-radius: 999px; background: var(--sunk); color: var(--muted); }
.pill.miss { background: var(--warn-bg); color: var(--warn); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack > div { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.modeline { margin: 0; font-weight: 700; }
#modeBtns .btn[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--cut); }
.sumgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.sumgrid div { background: var(--sunk); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sumgrid span { font-size: .8rem; color: var(--muted); }
.sumgrid b { font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.chg { font-size: .78rem; padding: 1px 8px; border-radius: 999px; background: var(--sunk); color: var(--muted); white-space: nowrap; }
.chg.new { background: var(--accent); color: var(--on-accent); }
.chg.out { background: var(--warn-bg); color: var(--warn); }
.chg.move { background: var(--wish-bg); color: var(--wish); }
.costcell { white-space: normal; min-width: 180px; font-size: .88rem; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cols > div { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.empty { padding: 18px; color: var(--muted); }
.verdict { display: flex; flex-wrap: wrap; gap: 6px; }
td.teamcell { white-space: nowrap; }
td.teamcell .verdict { flex-direction: column; align-items: flex-start; gap: 4px; }
td.teamcell .chg { white-space: nowrap; line-height: 1.35; padding: 2px 9px; }
td.teamcell .chg { width: max-content; max-width: none; box-sizing: content-box; }
td.teamcell .chg.lvl { display: flex; flex-direction: column; border-radius: 10px; padding: 4px 10px; }
td.teamcell .verdict { align-items: stretch; width: max-content; }
.verdict .chg.lvl > span { background: none; padding: 0; border-radius: 0; font-size: inherit; }
.verdict span { font-size: .82rem; padding: 2px 9px; border-radius: 999px; background: var(--sunk); }
.verdict span.good { background: var(--accent); color: var(--on-accent); }
footer { font-family: var(--body); margin-top: 36px; font-size: .85rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 14px; display: flex; flex-direction: column; gap: 6px; }
footer p { margin: 0; }
footer a { color: inherit; }

@media (max-width: 720px) {
  .formgrid { grid-template-columns: 1fr 1fr; }
  .formgrid .namefield { grid-column: 1 / -1; }
  .customgrid { grid-template-columns: 1fr 1fr; }
  .cols { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* aufklappbare Bereiche im Kosten-Kasten */
#planSummary > details.fold > summary { margin-top: 4px; }

/* Spielstand: Zahl + Haken in einer Zeile; Ansichts-Knöpfe über den Ergebnissen; „Auswerten“ unter „Eintragen“ */
.inl { display: flex; align-items: center; gap: 8px; }
.inl input[type=number] { flex: 1 1 auto; min-width: 0; }
.inl input[type=checkbox] { width: 18px; height: 18px; flex: 0 0 auto; accent-color: var(--accent); }
.modebar { margin-top: 4px; align-items: center; }
.modebar label.check { margin-left: auto; }
#goPlan { grid-column: -2 / -1; }
/* Binden direkt in „Jetzt tun“ */
.nowlist > li { position: relative; }
.bindbtn { margin-left: auto; flex: 0 0 auto; align-self: center; border: 1px solid var(--line); background: var(--surface); border-radius: 7px; padding: 2px 4px; cursor: pointer; opacity: .55; line-height: 0; }
.bindbtn:hover, .bindbtn:focus-visible { opacity: 1; border-color: var(--cut); }
.boundline .tico { vertical-align: -3px; margin-right: 3px; }
.busytag .tico { vertical-align: -3px; margin-right: 3px; }
.nowwish { margin-left: auto; }

.modebar label.check { white-space: nowrap; }
td.rowbtns .editbtn { padding-inline: 5px; margin-left: 4px; }

/* Einheitliche Knöpfe: alle rund wie Menü und Drachendaten-Knöpfe */
.btn { border-radius: 999px; padding: 8px 18px; }
.btn.small { padding: 4px 12px; }
.bindbtn { border-radius: 999px; padding: 3px 7px; }
.nowslider .stepbtn { min-width: 34px; padding: 4px 0; }
td.rowbtns .editbtn { padding: 4px 9px; }
.gatherrow { display: inline-flex; align-items: center; gap: 8px; }
.gathercell .editbtn { margin-left: 0; padding: 3px 8px; line-height: 0; }
.gathercell .editbtn img, .bindbtn img { width: 20px; height: 20px; }

/* Hauptmenü größer, damit es sich klar von den Kasten-Überschriften abhebt */
nav button { font-size: 1.22rem; padding: 9px 22px; }
nav button .tabico { width: 28px; height: 28px; vertical-align: -7px; }
/* Eintragen mit Truhe, Auswerten mit den drei Sammel-Symbolen im Dreieck */
.btn.iconbtn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btnico { width: 26px; height: 26px; margin: -4px 0; }
.planbtn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 58px; border-radius: 22px; font-size: 1.05rem; }
.planbtn .tri { display: grid; grid-template-columns: 20px 20px; grid-template-rows: 20px 20px; column-gap: 2px; }
.planbtn .tri img { width: 20px; height: 20px; }
.planbtn .tri img:nth-child(3) { grid-column: 1 / 3; justify-self: center; margin-top: -3px; }
.planbtn .arr { font-size: 1.2rem; }
.namefield { position: relative; }
.namefield .resolve { position: absolute; left: 0; right: 0; top: calc(100% + 6px); }   /* Tipp unter dem Feld, ohne die Zeile höher zu machen */
/* Als Nächstes blass in der Akademie-Spalte */
.nowlist .nextsep { color: var(--muted); font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; border-top: 1px dashed var(--line); padding-top: 6px; margin-top: 2px; }
.nowlist .nextup { opacity: .55; }
.nowlist .nextup:hover { opacity: .9; }

/* ---------- Steckbrief: klickbare Namen, kleines Fenster, große Ansicht ---------- */
.dlink { cursor: pointer; }
.dlink:hover, .dlink:focus-visible { text-decoration: underline dotted; text-underline-offset: 3px; }
.dpop { position: absolute; z-index: 40; width: min(360px, calc(100vw - 32px)); box-sizing: border-box; background: var(--surface); color: var(--fg);
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, .22); display: flex; flex-direction: column; gap: 10px; }
.dpop[hidden], .dsheet[hidden] { display: none; }
.dpop .dx, .dsheet .dx { position: absolute; top: 8px; right: 10px; border: 0; background: none; color: var(--muted); font-size: 1rem; cursor: pointer; padding: 4px; }
.dpop-head { display: flex; align-items: center; gap: 10px; padding-right: 24px; }
.dpop-head b { display: block; font-size: 1.05rem; }
.dpop-head small { color: var(--muted); font-size: .82rem; }
.dpop-acts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.dpop-acts .dmore { margin-left: auto; }
.copylist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.copylist li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--sunk); }
.copylist .cl-lvl { flex-direction: row; align-items: center; gap: 4px; font-size: .85rem; }
.copylist .cl-lvl input { width: 4.2em; padding: 3px 6px; }
.copylist .cl-chk { flex-direction: row; align-items: center; gap: 4px; font-size: .85rem; color: var(--fg); cursor: pointer; }
.copylist .cl-chk input { width: auto; }
.copylist .cl-st { font-size: .78rem; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.copylist .cl-st.wish { border-color: var(--accent); color: var(--accent); }
.copylist .cl-busy { display: inline-flex; align-items: center; gap: 4px; }
.copylist .cl-busy.on { background: color-mix(in srgb, var(--cut) 22%, transparent); border-color: var(--cut); color: var(--fg); }
.copylist .cl-del { margin-left: auto; padding-inline: 9px; }
.dsheet { position: fixed; inset: 0; z-index: 50; background: rgba(10, 16, 13, .55); overflow-y: auto; padding: 24px 16px; box-sizing: border-box; }
.dsheet-card { position: relative; max-width: 820px; margin: 0 auto; background: var(--surface); color: var(--fg); border: 1px solid var(--line); border-radius: 14px;
  padding: 20px 22px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 16px 40px rgba(0, 0, 0, .3); }
.dsheet-card h3 { margin: 6px 0 0; font-family: var(--display); font-weight: 400; font-size: 1.15rem; }
.ds-head { display: flex; align-items: center; gap: 16px; padding-right: 30px; }
.ds-head h2 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 1.7rem; background: none; padding: 0; }
.ds-en { margin: 2px 0 0; color: var(--muted); font-style: italic; }
.ds-ico { width: 128px; height: 128px; flex: none; border-radius: 14px; background: var(--sunk); }
.ds-facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 0; font-size: .95rem; }
.ds-facts dt { color: var(--muted); font-family: var(--scribe); }
.ds-facts dd { margin: 0; }
.ktable thead th { background: var(--sunk); }
.ktable tbody th { font-family: var(--scribe); color: var(--muted); font-weight: 400; background: none; }
.ds-levels .tbl { max-height: 420px; overflow: auto; margin-top: 8px; }
.ds-levels tr.me td { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.ds-levels tr.goal td { background: color-mix(in srgb, var(--cut) 18%, transparent); }
body.noscroll { overflow: hidden; }
@media (max-width: 560px) { .dsheet { padding: 0; } .dsheet-card { border-radius: 0; min-height: 100%; padding: 16px; } .ds-ico { width: 64px; height: 64px; } }

/* „Dein Berk & Rhythmus“: drei Felder mit farbigem Schild (wie in „Jetzt tun“) */
.setgrid { display: grid; grid-template-columns: 1.6fr 1fr 1.4fr; gap: 14px; align-items: stretch; }
.setbox { margin: 0; min-width: 0; border: 1px solid color-mix(in srgb, var(--tag) 35%, var(--line)); border-radius: 10px;
  background: color-mix(in srgb, var(--tag) 5%, var(--sunk)); padding: 16px 12px 12px; display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 10px 12px; align-content: start; }
.setbox legend.grptag { padding: 2px 12px 1px; margin-left: -2px; font-size: 1rem; }
.setbox label { min-width: 0; }
.setbox .lab { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.setbox .lico { width: 18px; height: 18px; flex: none; }
.setbox input[type=number] { background: var(--surface); }
.setbox label.check { grid-column: 1 / -1; align-self: center; white-space: nowrap; }
.setbox .inl input[type=number] { width: 100%; }
@media (max-width: 900px) { .setgrid { grid-template-columns: 1fr 1fr; } .setgrid .setbox:first-child { grid-column: 1 / -1; } }
@media (max-width: 560px) { .setgrid { grid-template-columns: 1fr; } }

/* Bereiche mit Schild auf der Kante (wie „Plätze auf Berk“): Sammler-Plan-Spalten, Ertrag, Kosten */
.lbox { position: relative; border: 1px solid color-mix(in srgb, var(--tag) 35%, var(--line)); border-radius: 10px;
  background: color-mix(in srgb, var(--tag) 5%, var(--sunk)); padding: 22px 12px 12px; margin-top: 14px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.lbox > h3.grptag { position: absolute; top: 0; left: 10px; transform: translateY(-50%); margin: 0; font-size: 1.02rem; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.lbox > h3.grptag .tico { width: 20px; height: 20px; }
.nowgrid { row-gap: 18px; }
.flowgrid { margin-top: 4px; }
.lbox .costbox { background: var(--surface); border: 1px solid var(--line); }
.lbox > .hint { margin: 0; }
#nowNotes > .lbox:last-of-type { margin-bottom: 10px; }
#nowNotes > .lbox + .lbox, .rhythmbox { margin-top: 26px; }
.lbox .lbox { margin-top: 16px; }
.lbox .flowgrid { margin-top: 0; }
.rhythmbox .nowslider { background: none; padding: 0; }
@media (max-width: 700px) { .lbox .costgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .flowgrid { grid-template-columns: 1fr; } }

/* Sammler-Plan kompakter: Akademie etwas breiter, Sammler-Spalten schmaler (Platz für eine spätere Eisen-Spalte) */
.nowgrid { grid-template-columns: minmax(0, 1.25fr) repeat(2, minmax(0, 1fr)); }
.nowgrid:has(> .nowbox:nth-child(4)) { grid-template-columns: minmax(0, 1.2fr) repeat(3, minmax(0, 1fr)); }
@media (max-width: 1000px) { .nowgrid, .nowgrid:has(> .nowbox:nth-child(4)) { grid-template-columns: repeat(2, minmax(0, 1fr)); } .nowgrid > .nowbox[data-box=a] { grid-column: 1 / -1; } }
@media (max-width: 620px) { .nowgrid, .nowgrid:has(> .nowbox:nth-child(4)) { grid-template-columns: 1fr; } }
.nowlist > li { gap: 7px; }
.nowlist .nl.nlrow { gap: 6px; }
.nowtag.stay { color: var(--accent); }
.stab.util .tico { width: 12px; height: 12px; vertical-align: -1px; margin-right: 3px; }
/* Bindeknopf: quadratisch, über die drei Zeilen mittig */
.nowlist .bindbtn { width: 34px; height: 34px; padding: 0; border-radius: 9px; display: grid; place-items: center; align-self: center; }
.nowlist .bindbtn img { width: 22px; height: 22px; }
/* Symbole an Feldern (Plätze auf Berk, Event-Bonus) */
.lab { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.lico { width: 18px; height: 18px; flex: none; }
/* Statuen mit Bild */
.statuegrid { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.statuegrid label { display: grid; grid-template-columns: 52px minmax(0, 1fr); grid-template-rows: auto auto; align-items: center; gap: 4px 10px; }
.statuegrid label .stimg { grid-row: 1 / 3; width: 52px; height: 52px; }
.statuegrid label select { grid-column: 2; width: 100%; min-width: 0; }
.statuegrid small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.statuegrid .stname { flex: 1 1 auto; min-width: 0; }
.statuegrid .stimg { width: 44px; height: 44px; flex: none; object-fit: contain; }
.statuegrid .stimg.off { opacity: .35; filter: grayscale(1); }
.statuegrid .stimg.ph { display: inline-block; border-radius: 8px; background: var(--line); }

/* Eisen-Spalte: als Vorschau blass (zählt noch nicht in die Rechnung) */
.nowbox.preview > .hint { font-size: .8rem; line-height: 1.3; opacity: .8; }
.nowbox.preview .nowlist { opacity: .55; }
.nowbox.preview .nowlist:hover { opacity: .9; }
.nowbox.preview { border-style: dashed; }
.flowgrid:has(> :nth-child(3)) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 700px) { .flowgrid:has(> :nth-child(3)) { grid-template-columns: 1fr; } }

/* vier Spalten: Vorschau-Eisen schmaler, aktive Eisen-Spalte gleich breit; alles etwas dichter */
.nowgrid:has(> .nowbox:nth-child(4)) { grid-template-columns: minmax(0, 1.15fr) repeat(3, minmax(0, 1fr)); column-gap: 10px; }
.nowgrid:has(> .nowbox.preview:nth-child(4)) { grid-template-columns: minmax(0, 1.2fr) repeat(2, minmax(0, 1.05fr)) minmax(0, .8fr); }
.nowgrid:has(> .nowbox:nth-child(4)) > .lbox { padding-inline: 9px; }
.nowgrid:has(> .nowbox:nth-child(4)) ol.nowlist > li::before { min-width: 1.1em; }
.nowgrid:has(> .nowbox:nth-child(4)) .nowlist > li { gap: 5px; }
.nowgrid:has(> .nowbox:nth-child(4)) .nowlist .bindbtn { width: 30px; height: 30px; }
.nowgrid:has(> .nowbox:nth-child(4)) .nowlist .bindbtn img { width: 20px; height: 20px; }
.nowtag { font-size: .72rem; padding: 0 6px; }
.nl.nlrow .nowtag { flex: 0 1 auto; }

/* Sammler-Plan: jede Spalte ein gemeinsames Raster (Nummer | Bild | Text | Knopf | Rest),
   damit die Sperr-Knöpfe untereinander stehen, direkt hinter dem längsten Eintrag */
ol.nowlist { display: grid; grid-template-columns: auto auto minmax(0, max-content) auto 1fr; row-gap: 8px; }
ul.nowlist { display: grid; grid-template-columns: auto minmax(0, max-content) auto 1fr; row-gap: 8px; }
.nowlist > li { display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; align-items: center; column-gap: 8px; }
.nowlist > li.nextsep, .nowlist > li.hint { display: block; }
ol.nowlist > li::before { align-self: start; padding-top: 2px; }
.nowlist .ico { align-self: start; margin-top: 3px; }
.nowlist .nltext { min-width: 0; }
.nowlist .bindbtn, .nowgrid:has(> .nowbox:nth-child(4)) .nowlist .bindbtn { margin-left: 4px; align-self: center; width: 32px; height: 32px; }
.nowlist .nl + .nl { font-size: .86rem; }
/* Breiten: Akademie hat jetzt vier kurze Zeilen und braucht weniger, Fisch/Holz bekommen mehr */
.nowgrid { grid-template-columns: minmax(0, .95fr) repeat(2, minmax(0, 1.1fr)); }
.nowgrid:has(> .nowbox:nth-child(4)) { grid-template-columns: minmax(0, .9fr) repeat(3, minmax(0, 1.05fr)); }
.nowgrid:has(> .nowbox.preview:nth-child(4)) { grid-template-columns: minmax(0, .9fr) repeat(2, minmax(0, 1.15fr)) minmax(0, .72fr); }
.nowlist .ico { width: 26px; height: 26px; flex-basis: 26px; }
.nl.nlrow .nowtag { flex: 0 0 auto; }
.nl.nlrow .amt { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
/* vier volle Spalten (Eisen zählt mit): gleichmäßiger und ohne „/Tag“ */
.nowgrid:has(> .nowbox:not(.preview):nth-child(4)) { grid-template-columns: minmax(0, 1fr) repeat(2, minmax(0, 1.05fr)) minmax(0, .9fr); }
.nowgrid:has(> .nowbox:not(.preview):nth-child(4)) .nowtag { padding: 0 5px; }

/* Spaltenbreiten nach Inhalt: jede Spalte bekommt erst, was ihr Inhalt braucht; übriger Platz wird gleich verteilt,
   bei Enge schrumpfen zuerst die breitesten (ersetzt die festen Anteile von oben) */
.nowgrid { grid-template-columns: repeat(3, minmax(0, auto)); }
.nowgrid:has(> .nowbox:nth-child(4)), .nowgrid:has(> .nowbox.preview:nth-child(4)), .nowgrid:has(> .nowbox:not(.preview):nth-child(4)) { grid-template-columns: repeat(4, minmax(0, auto)); }
.nowbox.preview > .hint { max-width: 24ch; }
.nowlist .stab .tico { width: 12px; height: 12px; vertical-align: -2px; margin: 0 1px; }
@media (max-width: 1000px) {
  .nowgrid, .nowgrid:has(> .nowbox:nth-child(4)), .nowgrid:has(> .nowbox.preview:nth-child(4)), .nowgrid:has(> .nowbox:not(.preview):nth-child(4)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .nowgrid, .nowgrid:has(> .nowbox:nth-child(4)), .nowgrid:has(> .nowbox.preview:nth-child(4)), .nowgrid:has(> .nowbox:not(.preview):nth-child(4)) { grid-template-columns: 1fr; }
}

/* etwas engere Innenabstände im Sammler-Plan, damit vier Spalten bei ~1280 px ohne Kürzen passen */
.nowgrid { column-gap: 8px; }
.nowgrid > .lbox { padding-inline: 8px; }
.nowlist > li { column-gap: 6px; }
.nowlist .bindbtn, .nowgrid:has(> .nowbox:nth-child(4)) .nowlist .bindbtn { margin-left: 2px; }
.nowlist .nl.nlrow { gap: 5px; }
/* Schmuckzeichen links und rechts vom Menü: so hoch wie die Menü-Knöpfe */
nav::before, nav::after { font-size: 2.1rem; line-height: 1; letter-spacing: .4em; }

/* Ausrichtung: kein Leerraum hinter dem Sperr-Knopf (Textspalte füllt), feste Plätze für Rolle und Prozent-Schilder */
ol.nowlist { grid-template-columns: auto auto minmax(0, 1fr) auto; }
ul.nowlist { grid-template-columns: auto minmax(0, 1fr) auto; }
.nowlist .nl.nlrow .nowtag, .nowgrid:has(> .nowbox:nth-child(4)) .nowlist .nl.nlrow .nowtag { margin-left: auto; width: 6.4em; padding: 0 3px; box-sizing: border-box; text-align: center; flex: 0 0 auto; overflow: visible; }
.nowbox.preview .nowlist .nl.nlrow .nowtag, .nowgrid:has(> .nowbox:nth-child(4)) .nowbox.preview .nowlist .nl.nlrow .nowtag { width: 9em; }
.nowlist .stab { min-width: 4.6em; box-sizing: border-box; text-align: center; }
.nowbox.preview .nowlist .stab { min-width: 8.2em; }
.nowbox[data-box=a] .nl.nlrow .stab { margin-left: auto; }

/* Sperr-Knopf oben rechts neben Zeile 1–2; Zeile 3 (Prozente + Rolle) läuft unter ihm bis zum Rand */
ol.nowlist { grid-template-columns: auto auto minmax(0, 1fr); }
ul.nowlist { grid-template-columns: auto minmax(0, 1fr); }
.nowlist > li { position: relative; }
.nowlist > li > .bindbtn, .nowgrid:has(> .nowbox:nth-child(4)) .nowlist > li > .bindbtn { position: absolute; top: 2px; right: 0; margin: 0; width: 34px; height: 34px; }
.nowlist > li:has(> .bindbtn) .nltext > .nl:nth-child(-n+2) { padding-right: 40px; }

/* Sammler-Eintrag als Mini-Raster: [⚓][⏳][Rolle][Rest]; Name über alles, Sperr-Knopf genau über der Rolle */
.nowlist .nltext.g3 { display: grid; grid-template-columns: 4.4rem 4.1rem 4.7rem minmax(0, 1fr); column-gap: 5px; row-gap: 2px; align-items: center; }
.nltext.g3 > .nl:first-child { grid-column: 1 / -1; }
.nltext.g3 > .nl:nth-child(2) { grid-column: 1 / 3; padding-right: 0 !important; }
.nltext.g3 > .nl.r3 { display: contents; }
.nltext.g3 > .nl.r3 > * { grid-row: 3; margin: 0 !important; width: 100% !important; min-width: 0 !important; box-sizing: border-box; }
.nltext.g3 > .nl.r3 > .stab:not(.util) { grid-column: 1; }
.nltext.g3 > .nl.r3 > .stab.util { grid-column: 2; }
.nltext.g3 > .nl.r3 > .nowtag { grid-column: 3; }
.nltext.g3 > .nl.r3 > .rnd { grid-column: 1 / 3; font-size: .86rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nltext.g3 > .stab.ph, .nltext.g3 .stab.ph { visibility: hidden; }
.nowlist .nltext.g3 > .bindbtn, .nowgrid:has(> .nowbox:nth-child(4)) .nowlist .nltext.g3 > .bindbtn {
  position: static; grid-column: 3; grid-row: 2; width: 100%; height: 22px; margin: 0; padding: 0; border-radius: 999px; display: grid; place-items: center; align-self: center; }
.nowlist .nltext.g3 > .bindbtn img { width: 18px; height: 18px; }

/* Akademie im selben Mini-Raster: Dauer an der Stelle der Auslastung, „später Holz/Fisch“ an der Stelle der Rolle */
.nltext.g3 > .nl.r3 > .stab.dur { grid-column: 2; color: var(--fg); }
.nltext.g3 > .nl.r4 { grid-column: 1 / -1; grid-row: 4; font-size: .86rem; color: var(--muted); }
.nowtag.res-fish { color: var(--fish); } .nowtag.res-wood { color: var(--wood); } .nowtag.res-iron { color: var(--iron); }
.nowbox[data-box=a] .nl.nlrow .stab { margin-left: 0; }

/* Eisen im selben Raster: Platzhalter-Schilder („–“) an den Stellen, die es für Eisen (noch) nicht gibt */
.stab.ph2 { color: var(--muted); border-style: dashed; opacity: .8; }
.nltext.g3 > .nl.r3 > .stab.ph2:first-child { grid-column: 1; }
.nltext.g3 > .nl.r3 > .stab.ph2 + .stab.ph2, .nltext.g3 > .nl.r3 > .stab.ph2 + .stab.dur { grid-column: 2; }
.nowbox.preview .nowlist .stab, .nowbox.preview .nowlist .nl.nlrow .nowtag, .nowgrid:has(> .nowbox:nth-child(4)) .nowbox.preview .nowlist .nl.nlrow .nowtag { min-width: 0; width: 100%; }

/* Level-Rechner im Steckbrief */
.lvcalc { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 10px; background: var(--sunk); }
.lvc-row { display: grid; grid-template-columns: 4.5em minmax(0, 1fr) 2.5em; align-items: center; gap: 10px; }
.lvc-lab { font-family: var(--scribe); color: var(--muted); }
.lvc-row input[type=range] { width: 100%; accent-color: var(--accent); padding: 0; border: 0; background: none; }
.lvc-row b { text-align: right; font-variant-numeric: tabular-nums; font-size: 1.1rem; }
.lvcalc .costgrid { margin-top: 4px; }
.lvcalc .costbox { background: var(--surface); border: 1px solid var(--line); }
@media (max-width: 560px) { .lvcalc .costgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Gebundene Drachen: Tabelle Symbol | Name | wofür, bis wann | Ersatz | Knöpfe */
.boundbox { margin: 4px 0 22px; }
.boundgrid { display: grid; grid-template-columns: auto auto auto minmax(0, 1fr) auto; align-items: center; gap: 6px 14px; }
.boundgrid > span { min-width: 0; }
.boundgrid .bg-ico .tico { display: block; margin: 0; }
.boundgrid .bg-name { font-weight: 700; white-space: nowrap; }
.boundgrid .bg-why { white-space: nowrap; color: var(--muted); }
.boundgrid .bg-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.boundgrid .bg-acts { display: flex; gap: 6px; justify-content: flex-end; }
@media (max-width: 760px) {
  .boundgrid { grid-template-columns: auto minmax(0, 1fr); row-gap: 2px; }
  .boundgrid .bg-why, .boundgrid .bg-sub, .boundgrid .bg-acts { grid-column: 2; white-space: normal; }
  .boundgrid .bg-acts { justify-content: flex-start; margin-bottom: 8px; }
}
/* Bindung im Infofenster */
.copylist .cl-binfo, .copylist .cl-bedit { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding-top: 6px; border-top: 1px dashed var(--line); font-size: .88rem; }
.copylist .cl-binfo .tico { margin: 0; }
.copylist .cl-binfo > span { flex: 1 1 12em; }
.copylist .cl-bedit label { display: flex; flex-direction: column; gap: 2px; font-size: .85rem; }
.copylist .cl-bedit select, .copylist .cl-bedit input { padding: 3px 6px; }
.copylist .cl-bacts { display: flex; gap: 6px; flex-basis: 100%; }

/* Spaltenkopf Seltenheit/Spezies: kleiner Auswahlpfeil neben der Sortier-Beschriftung */
.colhead { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
.colpick { appearance: none; -webkit-appearance: none; width: 1.5em; height: 1.5em; padding: 0; margin: 0; border: 1px solid var(--line); border-radius: 6px; cursor: pointer;
  color: transparent; font-size: .9rem; background: var(--surface) no-repeat center / 10px 10px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M1 3l4 4 4-4' fill='none' stroke='%23888' stroke-width='1.6'/%3E%3C/svg%3E"); }
.colpick:hover, .colpick:focus-visible { border-color: var(--accent); }
.colpick option { color: var(--fg); background: var(--surface); }
.artcell { white-space: nowrap; }
.flowrows { display: flex; flex-direction: column; gap: 8px; }
/* Änderung wartet noch auf die Neuberechnung (2 s Ruhe) */
#nowCard, #cmpCard, #chartCard { transition: opacity .25s; }
.calc-wait #nowCard, .calc-wait #cmpCard, .calc-wait #chartCard { opacity: .55; }
