/* ---------- Lexikon im Java-Look (wird nach den Seiten-CSS geladen) ----------
   Gleiche Sprache wie Startbildschirm/Spielmenü (menu.css): Pixelschrift, Steinknöpfe,
   schwarze Textfelder, dunkle Erde als Hintergrund, eckige Rahmen, harte Schatten. */
@font-face { font-family: 'BlockWelt Pixel'; src: url(/fonts/blockwelt.woff2) format('woff2'); font-display: block; }
:root, :root:not([data-x]) {
  color-scheme: dark; --k: 1;
  --px: 'BlockWelt Pixel', 'Courier New', monospace;
  --font: var(--px); --mono: var(--px);
  --bg: #1a130d; --surface: rgba(0,0,0,.55); --surface2: rgba(255,255,255,.07); --text: #fff; --muted: #a0a0a0; --line: #000;
  --accent: #55ff55; --accent-ink: #000; --mon: #ff55ff; --mon-bg: #3a2140; --pred: #ffaa00; --pred-bg: #43301a; --bug-bg: #263a1e; --animal-bg: #1f3247;
  --t-aggr: #4d1d1a; --t-pass: #4a3f16; --t-fried: #20401c;
  --d0: #5555ff; --d1: #55aa55; --d2: #aa8a20; --d3: #aa2a2a;
  --radius: 0; --shadow: none;
  --r2-bg: #1c2a48; --r2: #7fa8ff; --r3-bg: #3d2f10; --r3: #ffcc55; --r1-bg: rgba(255,255,255,.07);
  --sh: 2px 2px 0 #3f3f3f; --shd: 2px 2px 0 #282828;
  --panel-in: inset 2px 2px 0 rgba(255,255,255,.12), inset -2px -2px 0 rgba(0,0,0,.5);
  --btn-in: inset 2px 2px 0 rgba(255,255,255,.28), inset -2px -4px 0 rgba(0,0,0,.32);
}
html { background: #0e0a07; }
body {
  font: calc(16px * var(--k))/calc(20px * var(--k)) var(--px); color: #fff; font-synthesis: none; -webkit-font-smoothing: none;
  background: #1a130d var(--dirt, none); background-size: 64px 64px; background-attachment: fixed; image-rendering: pixelated;
}
body img, body canvas { image-rendering: pixelated; }
.card img, #view { image-rendering: auto; }
button, input, select { font: calc(16px * var(--k))/calc(18px * var(--k)) var(--px); }
b, strong, h1, h2, h3, h4, th, dt { font-weight: normal; }
h1, h2, h3, h4, .n, .brand, .gh { text-shadow: var(--sh); }
kbd, code { font: calc(16px * var(--k))/calc(18px * var(--k)) var(--px); background: #000; color: #ffff55; border: 2px solid #555; border-radius: 0; padding: 0 4px; }
a { color: #55ffff; }
::selection { background: #5555ff; color: #fff; }
* { scrollbar-width: thin; scrollbar-color: #808080 #000; }
::-webkit-scrollbar { width: 12px; height: 12px; background: #000; }
::-webkit-scrollbar-thumb { background: #808080; border-right: 2px solid #c0c0c0; border-bottom: 2px solid #c0c0c0; }

/* ---------- Kopf ---------- */
.top { background: rgba(0,0,0,.6); backdrop-filter: none; -webkit-backdrop-filter: none; border-bottom: 2px solid #000; box-shadow: 0 2px 0 rgba(255,255,255,.18); }
.bar { height: 52px; }
.brand { font: calc(16px * var(--k))/calc(18px * var(--k)) var(--px); color: #fff; }
.brand span { color: #ffff55; text-shadow: 2px 2px 0 #3f3f15; }
.nav { gap: 6px; min-width: 0; overflow-x: auto; scrollbar-width: none; } /* viele Lexikon-Seiten: auf dem Handy wischbar */
.nav::-webkit-scrollbar { display: none; }
.nav a { flex: none; }
.nav a, .nav a:not(.play), .play {
  display: inline-flex; align-items: center; height: 36px; padding: 0 10px 2px; border-radius: 0;
  font: calc(16px * var(--k))/calc(18px * var(--k)) var(--px); color: #fff; text-decoration: none; text-shadow: var(--sh); white-space: nowrap;
  background: #6f6f6f var(--btex, none); background-size: 64px 64px; border: 2px solid #000; box-shadow: var(--btn-in);
}
.nav a:hover, .nav a:focus-visible { border-color: #fff; outline: none; }
.play { color: #55ff55; text-shadow: 2px 2px 0 #153f15; }

/* Steinknöpfe: Reiter, Schwierigkeit, Ansicht */
.seg { background: none; border: 0; padding: 0; gap: 4px; border-radius: 0; }
.seg button, .seg button.on {
  height: 40px; padding: 0 8px 2px; border-radius: 0; font: calc(16px * var(--k))/calc(18px * var(--k)) var(--px); color: #fff; text-shadow: var(--sh);
  background: #6f6f6f var(--btex, none); background-size: 64px 64px; border: 2px solid #000; box-shadow: var(--btn-in);
}
.seg button:hover, .seg button:focus-visible { border-color: #fff; outline: none; }
.seg button.on { color: #ffff55; text-shadow: 2px 2px 0 #3f3f15; border-color: #fff; background-color: #8a8a8a; background-blend-mode: multiply; box-shadow: inset 2px 2px 0 rgba(0,0,0,.35), inset -2px -2px 0 rgba(255,255,255,.2); }
.seg button b { font-weight: normal; opacity: 1; color: #a0a0a0; text-shadow: var(--shd); }
.seg button.on b { color: #e0e0a0; }
#tabs button[data-tab="monsters"].on, #tabs button[data-tab="animals"].on { color: #ffff55; }
.seg.diff button.on[data-d="0"], .seg.diff button.on[data-d="1"], .seg.diff button.on[data-d="2"], .seg.diff button.on[data-d="3"] { color: #fff; text-shadow: var(--sh); background-blend-mode: multiply; }
.seg.diff button.on[data-d="0"] { background-color: #6a8aff; } .seg.diff button.on[data-d="1"] { background-color: #6fd86f; }
.seg.diff button.on[data-d="2"] { background-color: #f0c040; } .seg.diff button.on[data-d="3"] { background-color: #ff6a5a; }
.seg.view button { font-size: calc(16px * var(--k)); padding: 0 12px 2px; }

/* Textfelder & Auswahllisten wie .mct */
#q, #biome, #sort, .tools select, .row select {
  height: 40px; padding: 0 8px; border-radius: 0; font: calc(16px * var(--k))/calc(18px * var(--k)) var(--px); color: #e0e0e0;
  background: #000; border: 2px solid #a0a0a0; outline: none; box-shadow: none; -webkit-appearance: none; appearance: none;
}
#biome, #sort, .tools select, .row select {
  padding-right: 26px; cursor: pointer;
  background: #000 url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' shape-rendering='crispEdges'><path d='M0 0h10v2H8v2H6v2H4V4H2V2H0z' fill='%23a0a0a0'/></svg>") no-repeat right 8px center;
}
#q:focus, #biome:focus, #sort:focus, .tools select:focus { border-color: #fff; color: #fff; }
#q::placeholder { color: #707070; }
#q::-webkit-search-cancel-button { filter: grayscale(1) brightness(1.5); }
select option { background: #000; color: #e0e0e0; }
.sortrow { font-size: calc(16px * var(--k)); color: #a0a0a0; text-shadow: var(--shd); }

/* Chips: kleine Steinknöpfe */
.chips { gap: 4px; padding-bottom: 2px; }
.chips button, .chips button.on, .lvsel button {
  height: 32px; padding: 0 8px 2px; border-radius: 0; font: calc(16px * var(--k))/calc(18px * var(--k)) var(--px); font-weight: normal; color: #e0e0e0; text-shadow: var(--sh);
  background: #6f6f6f var(--btex, none); background-size: 64px 64px; border: 2px solid #000; box-shadow: var(--btn-in);
}
.chips button:hover, .lvsel button:hover { border-color: #fff; }
.chips button.on, .lvsel button.on { color: #ffff55; border-color: #fff; background-color: #8a8a8a; background-blend-mode: multiply; text-shadow: 2px 2px 0 #3f3f15; }
.chips button b { font-weight: normal; color: #a0a0a0; opacity: 1; }

/* ---------- Inhalt: Felder wie dunkle Java-Fenster ---------- */
.gh { font: calc(16px * var(--k))/calc(18px * var(--k)) var(--px); text-transform: none; letter-spacing: 0; color: #ffff55; text-shadow: 2px 2px 0 #3f3f15; }
.card, .bio, .it, .box, .tbl, .facts, .quick div, .spawnbox, .sum, details.lt, .cell {
  border-radius: 0; background-color: rgba(0,0,0,.58); border: 2px solid #000; box-shadow: var(--panel-in);
}
.card { transition: none; }
.card:hover, .card:focus-visible { border-color: #fff; transform: none; outline: none; }
.card:active { transform: none; }
.card .pic { box-shadow: inset 2px 2px 0 rgba(0,0,0,.45), inset -2px -2px 0 rgba(255,255,255,.12); }
.card .i { border-radius: 0; background: #000; border: 2px solid #555; font: calc(16px * var(--k))/calc(16px * var(--k)) var(--px); color: #55ffff; width: 22px; height: 22px; }
.card .rank { border-radius: 0; background: #000; color: #ffff55; font: calc(16px * var(--k))/calc(18px * var(--k)) var(--px); height: 22px; border: 2px solid #555; line-height: calc(18px * var(--k)); }
.card .n { font-size: calc(16px * var(--k)); line-height: calc(18px * var(--k)); }
.card .body { gap: 4px; }
.stats { font-size: calc(16px * var(--k)); line-height: calc(18px * var(--k)); gap: 2px 10px; color: #a0a0a0; }
.stats .hi { color: #ffff55; }
.stars { font-size: calc(14px * var(--k)); letter-spacing: 1px; }

.badge, .badge.rar, .lvtag {
  border-radius: 0; font: calc(16px * var(--k))/calc(18px * var(--k)) var(--px); font-weight: normal; padding: 0 5px; text-shadow: var(--shd);
  background: #000; border: 2px solid #3a3a3a; color: #a0a0a0;
}
.badge.k-hostile { background: #2a0f2e; border-color: #aa00aa; color: #ff55ff; }
.badge.k-predator, .badge.k-territorial { background: #2e2008; border-color: #aa6a00; color: #ffaa00; }
.badge.k-passive { background: #0f2a0f; border-color: #00aa00; color: #55ff55; }
.badge.calm { background: #0f1e2e; border-color: #0055aa; color: #55ffff; }
.badge.boss { background: #2a0f2e; border-color: #aa00aa; color: #ff55ff; }
.badge.rar { background: #000; border-color: currentColor; }
.badge.rar.r5 { color: #aaaaaa; } .badge.rar.r4 { color: #55ff55; } .badge.rar.r3 { color: #55ffff; } .badge.rar.r2 { color: #ff55ff; } .badge.rar.r1 { color: #ffaa00; } .badge.rar.r0 { color: #777; }

.empty, .none, .note, .foot, .rules, .lootcard .uses, .bio .sub, .stype, .scomp, .spawnbox .small { color: #a0a0a0; text-shadow: var(--shd); font-size: calc(16px * var(--k)); line-height: calc(20px * var(--k)); }
.foot { font-size: calc(16px * var(--k)); }

/* Biome & Bauwerke */
.bio { border-left: 6px solid var(--lv); padding: 10px 12px; }
.bio h2 { font: calc(16px * var(--k))/calc(18px * var(--k)) var(--px); }
.lvl .pips i { border-radius: 0; width: 12px; height: 12px; background: #000; border: 2px solid #3a3a3a; }
.lvl .pips i.on { background: var(--lv); border-color: #000; box-shadow: inset 2px 2px 0 rgba(255,255,255,.3); }
.lvl small { font-size: calc(16px * var(--k)); line-height: calc(18px * var(--k)); color: #a0a0a0; }
.grp > span, .spawnbox h4, .facts dt, table.loot th { font: calc(16px * var(--k))/calc(18px * var(--k)) var(--px); text-transform: none; letter-spacing: 0; color: #a0a0a0; text-shadow: var(--shd); }
.cl a, .cl span.it, .cl span.tag, .cl .bt { border-radius: 0; font-size: calc(16px * var(--k)); line-height: calc(18px * var(--k)); padding: 1px 6px 3px; border: 2px solid rgba(0,0,0,.6); color: #fff; text-shadow: var(--shd); }
.cl a { background: var(--animal-bg); }
.cl a.k-predator, .cl a.k-territorial { background: var(--pred-bg); }
.cl a.k-bug { background: var(--bug-bg); }
.cl a.mon { background: var(--mon-bg); }
.cl a.hit, .bio.flash { border-color: #ffff55; outline: none; }
.cl .bt small { font-size: calc(16px * var(--k)); color: #a0a0a0; }
@media (hover: hover) { .cl a:hover { border-color: #fff; filter: none; } }
.cl span.it.r2 { color: #7fa8ff; } .cl span.it.r3 { color: #ffcc55; }
details.lt { background-color: rgba(0,0,0,.4); }
details.lt summary { font-size: calc(16px * var(--k)); line-height: calc(18px * var(--k)); font-weight: normal; padding: 6px 8px; }
details.lt summary small { font-weight: normal; color: #a0a0a0; }
details.lt summary::before { content: '▶'; color: #a0a0a0; font-size: calc(12px * var(--k)); margin-right: 6px; }
details.lt[open] summary::before { content: '▼'; }
details.story p { font-size: calc(16px * var(--k)); line-height: calc(22px * var(--k)); background: rgba(0,0,0,.35); border-radius: 0; color: #e0e0e0; }
table.loot { font-size: calc(16px * var(--k)); background: rgba(0,0,0,.35); border-radius: 0; }
table.loot th, table.loot td { border-top: 2px solid rgba(255,255,255,.08); }
.bar-p i, .sbar { border-radius: 0; height: 8px; background: #000; border: 0; }
.bar-p i::after { border-radius: 0; background: #55ff55; }
.sbar i { background: #55ff55; }
.bar-p b { font-weight: normal; min-width: 44px; }
.lvsel { font-size: calc(16px * var(--k)); color: #a0a0a0; }

/* Kreaturen-Detail: Fenster mit Erd-Hintergrund */
#detail { background: rgba(0,0,0,.6); }
.sheet { background: #1a130d var(--dirt, none); background-size: 64px 64px; border: 2px solid #000; outline: 2px solid #a0a0a0; }
@media (min-width: 800px) { .sheet { border-radius: 0; } }
.dhead { background: rgba(0,0,0,.75); border-bottom: 2px solid #000; box-shadow: 0 2px 0 rgba(255,255,255,.18); margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
.dhead h1 { font: calc(16px * var(--k))/calc(18px * var(--k)) var(--px); font-size: calc(24px * var(--k)); line-height: calc(26px * var(--k)); }
.back, .share { border-radius: 0; font-size: calc(16px * var(--k)); color: #fff; background: #6f6f6f var(--btex, none); background-size: 64px 64px; border: 2px solid #000; box-shadow: var(--btn-in); text-shadow: var(--sh); }
.back:hover, .share:hover { border-color: #fff; }
.stage { border-radius: 0; border: 2px solid #000; box-shadow: inset 2px 2px 0 rgba(0,0,0,.4); }
.stage .hint, .scap { font-size: calc(16px * var(--k)); text-shadow: var(--shd); }
.stevebtn, .simbtn, .simagain {
  border-radius: 0; font: calc(16px * var(--k))/calc(18px * var(--k)) var(--px); color: #fff; text-shadow: var(--sh); border: 2px solid #000; box-shadow: var(--btn-in);
  background: #6f6f6f var(--btex, none); background-size: 64px 64px; backdrop-filter: none; padding: 6px 10px 8px;
}
.stevebtn:hover, .simbtn:hover, .simagain:hover { border-color: #fff; }
.stevebtn.on { color: #55ffff; background-color: #6f6f6f; }
.stevebtn:not(.on) { color: #a0a0a0; }
.simbtn { color: #ff5555; text-shadow: 2px 2px 0 #3f1515; }
.simbtn.on { color: #fff; }
.simbtn:disabled { color: #a0a0a0; background: #2c2c2c; box-shadow: none; cursor: default; border-color: #000; }
.simlbl { font-family: var(--px); font-weight: normal; text-shadow: 2px 2px 0 #000; }
.simlbl.mode { border-radius: 0; background: rgba(0,0,0,.6); font-size: calc(16px * var(--k)); }
.sum { border-left: 6px solid var(--d2); font-weight: normal; padding: 10px 12px; }
.quick b { font-size: calc(16px * var(--k)); line-height: calc(20px * var(--k)); font-weight: normal; color: #ffff55; text-shadow: 2px 2px 0 #3f3f15; }
.quick span { font-size: calc(16px * var(--k)); color: #a0a0a0; }
.quick .dz b.stars { font-size: calc(14px * var(--k)); }
.facts div { border-bottom: 2px solid rgba(255,255,255,.08); }
.facts dd { color: #e0e0e0; }
.spawnbox h3 { font: calc(16px * var(--k))/calc(18px * var(--k)) var(--px); font-size: calc(16px * var(--k)); color: #ffff55; text-shadow: 2px 2px 0 #3f3f15; }
.spawnbox h3 small, .spawnbox h4 small { font-weight: normal; color: #a0a0a0; }
.scond li::marker { color: #55ff55; }
.snote { font-weight: normal; color: #ff5555; }
.splace { border-top: 2px solid rgba(255,255,255,.08); }
.splace p { font-size: calc(16px * var(--k)); }
.toast { border-radius: 0; font: calc(16px * var(--k))/calc(18px * var(--k)) var(--px); background: rgba(16,0,16,.94); color: #fff; border: 2px solid #5000aa; outline: 2px solid #100010; text-shadow: var(--sh); }

/* Items & Apokalypse */
.intro h1 { font: calc(16px * var(--k))/calc(18px * var(--k)) var(--px); font-size: calc(24px * var(--k)); line-height: calc(28px * var(--k)); }
.intro p { color: #e0e0e0; text-shadow: var(--shd); line-height: calc(22px * var(--k)); }
.intro p b { color: #ffff55; }
#dist { border-radius: 0; height: 12px; border: 2px solid #000; }
.tier h2 { font: calc(16px * var(--k))/calc(18px * var(--k)) var(--px); font-size: calc(16px * var(--k)); border-left-width: 6px; text-shadow: var(--sh); }
.tier h2 small { font-size: calc(16px * var(--k)); color: #a0a0a0; font-weight: normal; }
.it { border-left-width: 6px; border-left-style: solid; }
.it img, .cell { background: #8b8b8b; border-radius: 0; box-shadow: inset 2px 2px 0 #373737, inset -2px -2px 0 #fff; }
.it img { padding: 2px; }
.cell { border: 0; border-bottom: 4px solid; width: 52px; height: 52px; }
.cell:hover { background: #c5c5c5; }
.it .n, .it .p { font-weight: normal; }
.it .n i, .it .n small { font-weight: normal; font-size: calc(16px * var(--k)); font-style: normal; }
.it .d { font-size: calc(16px * var(--k)); line-height: calc(20px * var(--k)); color: #a0a0a0; }
.it .s span { border-radius: 0; font-size: calc(16px * var(--k)); line-height: calc(18px * var(--k)); background: #000; border: 2px solid #3a3a3a; color: #e0e0e0; }
.tbl table { font-size: calc(16px * var(--k)); }
.tbl th, .tbl td { border-bottom: 2px solid rgba(255,255,255,.08); }
.tbl caption { font-weight: normal; color: #ffff55; text-shadow: 2px 2px 0 #3f3f15; }
.box h3 { font: calc(16px * var(--k))/calc(18px * var(--k)) var(--px); color: #ffff55; text-shadow: 2px 2px 0 #3f3f15; }
.box ul { color: #c0c0c0; }
/* Tooltip wie im Inventar */
#tip { border-radius: 0; font: calc(16px * var(--k))/calc(18px * var(--k)) var(--px); background: rgba(16,0,16,.94); border: 2px solid #25015b; outline: 2px solid #100010; box-shadow: none; padding: 6px 8px; text-shadow: var(--sh); }
#tip small { font-size: calc(16px * var(--k)); }

@media (max-width: 520px) {
  .nav a, .nav a:not(.play), .play { padding: 0 6px 2px; height: 32px; }
  .seg button, .seg button.on { padding: 0 4px 2px; }
  .stats, .badge, .badge.rar { font-size: calc(16px * var(--k)); }
}

/* Pixelschrift ist breiter: Spalten dürfen nicht über die Karte hinauswachsen */
.bio { grid-template-columns: minmax(0, 1fr); overflow: hidden; }
.bhead > :first-child { min-width: 0; }
.lvl { max-width: 55%; }
.lvl small { white-space: normal; }
details.lt summary { flex-wrap: wrap; }
details.lt summary small { white-space: normal; }
@media (min-width: 760px) { .blist { grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); } }
@media (min-width: 1100px) { .blist { grid-template-columns: repeat(auto-fill, minmax(440px, 1fr)); } }
.wrap .grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.it > * { min-width: 0; }
.it .n { overflow-wrap: anywhere; }
.stage .hint { left: 10px; right: auto; }
/* Stufen-Chips mit eigener Farbe (inline gesetzt): Farbe über die Steintextur legen */
.chips button.on[style] { color: #fff !important; text-shadow: 2px 2px 0 rgba(0,0,0,.65); background-image: var(--btex) !important; background-size: 64px 64px !important; background-blend-mode: multiply; }
/* Reiterleisten schmal: waagerecht wischen statt quetschen */
.seg { overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { flex: 1 0 auto; }
.bar { gap: 10px; }
.nav { min-width: 0; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.brand { white-space: nowrap; flex: none; }
@media (max-width: 520px) {
  .brand { font-size: 0; }
  .brand span { display: inline !important; font-size: calc(16px * var(--k)); }
  .row { flex-wrap: wrap; }
  .row #q { flex: 1 0 100%; }
  .row #biome, .row #sort { width: auto; max-width: none; flex: 1; }
}
.atkinfo, .simhud .fx, .simhud .mhp { font-size: calc(16px * var(--k)); line-height: calc(20px * var(--k)); }
.simhud .fx, .simhud .mhp { text-shadow: 2px 2px 0 #000; }
.armor { border-radius: 0; border: 2px solid #000; background: rgba(0,0,0,.45); }
.armor summary { font-weight: normal; color: #ffff55; text-shadow: 2px 2px 0 #3f3f15; }
.armslots label, .armsets .none, .simhud .arm { font-size: calc(16px * var(--k)); line-height: calc(20px * var(--k)); }
.armslots select, .armsave input { background: #000; color: #fff; border: 2px solid #a0a0a0; border-radius: 0; height: 34px; padding: 0 6px; }
.armsave button { border-radius: 0; color: #fff; text-shadow: var(--sh); border: 2px solid #000; box-shadow: var(--btn-in); background: #6f6f6f var(--btex, none); background-size: 64px 64px; padding: 0 10px 2px; cursor: pointer; }
.armsave button:hover { border-color: #fff; }
.warm { font-size: calc(16px * var(--k)); line-height: calc(18px * var(--k)); color: #c0c0c0; text-shadow: 2px 2px 0 #000; }
.warm img { width: 18px; height: 18px; }
.card .warm img { width: 18px; height: 18px; image-rendering: pixelated; }

/* ---------- Handy (2026-10-13): kein Seitwärts-Überlauf, kompakter Kopf, ☰-Menü ---------- */
.controls { grid-template-columns: minmax(0, 1fr); }
.controls > *, .row > *, .tools > * { min-width: 0; }
button, a, summary, select, input { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.top { transition: transform .2s ease; }
.top.tuck { transform: translateY(-100%); }
.bar { position: relative; }
.menubtn {
  display: none; flex: none; width: 40px; height: 36px; padding: 0 0 2px; cursor: pointer; color: #fff; text-shadow: var(--sh); font: calc(20px * var(--k))/calc(20px * var(--k)) var(--px);
  background: #6f6f6f var(--btex, none); background-size: 64px 64px; border: 2px solid #000; box-shadow: var(--btn-in); border-radius: 0;
}
.menubtn.on { color: #ffff55; border-color: #fff; }
.navmenu { display: grid; gap: 4px; padding: 6px 0 10px; max-width: 1200px; margin: 0 auto; }
.navmenu[hidden] { display: none; }
.navmenu a {
  display: flex; align-items: center; justify-content: center; height: 44px; color: #fff; text-decoration: none; text-shadow: var(--sh); font: calc(16px * var(--k))/calc(18px * var(--k)) var(--px);
  background: #6f6f6f var(--btex, none); background-size: 64px 64px; border: 2px solid #000; box-shadow: var(--btn-in);
}
.navmenu a.on { color: #ffff55; border-color: #fff; text-shadow: 2px 2px 0 #3f3f15; }
.navmenu a.play { color: #55ff55; text-shadow: 2px 2px 0 #153f15; }
.totop {
  position: fixed; right: calc(14px + env(safe-area-inset-right)); bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 6; width: 48px; height: 48px; padding: 0 0 2px;
  color: #fff; text-shadow: var(--sh); font: calc(18px * var(--k))/calc(18px * var(--k)) var(--px); cursor: pointer; border-radius: 0;
  background: #6f6f6f var(--btex, none); background-size: 64px 64px; border: 2px solid #000; box-shadow: var(--btn-in), 0 2px 8px rgba(0,0,0,.6);
}
.totop[hidden] { display: none; }
.dhead { background: #0d0906; }
.dtitle #dkind { display: flex; flex-wrap: wrap; gap: 2px 4px; }
@media (max-width: 700px) {
  .top { padding-left: 12px; padding-right: 12px; padding-bottom: 6px; }
  .bar { height: 46px; justify-content: flex-start; }
  .brand { margin-right: auto; }
  .nav a:not(.play) { display: none; }
  .nav { overflow: visible; }
  .menubtn { display: block; }
  .navmenu { grid-template-columns: 1fr 1fr; }
  .navmenu a.play { grid-column: 1 / -1; }
  .controls { gap: 6px; }
  .seg button, .seg button.on { height: 36px; }
  .chips { margin: 0 -12px; padding: 0 12px 2px; }
  /* Suche und Sortierung nebeneinander statt untereinander */
  .row { flex-wrap: nowrap; }
  .row #q { flex: 1 1 0; }
  .row #biome, .row #sort { flex: 0 1 42%; width: auto; max-width: none; }
  main, .wrap { padding-left: 12px; padding-right: 12px; }
  .bio { padding: 10px; }
  /* Beutetabellen: Balken weglassen, Namen umbrechen */
  table.loot th, table.loot td { padding: 4px 5px; }
  table.loot td:first-child { overflow-wrap: anywhere; }
  table.loot td.p { width: auto; }
  .bar-p i { display: none; }
  .bar-p b { min-width: 0; }
  /* Kreatur-Detail */
  .sheet { padding-left: 12px; padding-right: 12px; }
  .dhead { margin: 0 -12px; padding-left: 12px; padding-right: 12px; gap: 8px; }
  .dhead h1 { font-size: calc(20px * var(--k)); line-height: calc(22px * var(--k)); overflow-wrap: anywhere; }
  .stage { margin: 10px 0; aspect-ratio: 4 / 3; }
  .scap { max-width: calc(100% - 120px); }
  .quick { gap: 6px; }
  .facts div { padding: 8px 10px; }
  .lb { padding: 8px; }
  .lbn { top: auto !important; bottom: 16px; transform: none !important; }
}
@media (pointer: coarse) {
  .cl a, .cl span.tag { padding: 4px 8px 6px; }
  details.lt summary, details.armor summary { min-height: 40px; align-items: center; }
  .seg button, .chips button, .lvsel button { min-width: 40px; }
}
.sortrow > *, select { min-width: 0; }
.sortrow #sort { width: 0; }
.card, .card .body, .card .body > * { min-width: 0; }
.card .n { overflow-wrap: anywhere; }
.top { background: rgba(10,7,5,.94); }
.card .warm, .it .n { overflow-wrap: break-word; hyphens: auto; -webkit-hyphens: auto; }
@media (max-width: 700px) {
  .row.tools { flex-wrap: wrap; }
  .row.tools #q { flex: 1 0 100%; }
  .row.tools select { flex: 1 1 0; }
  .stage .hint { display: none; }
}
.smode button.on[data-s="fight"] { color: #ff7070; }
.smode button.on[data-s="flee"] { color: #55ffff; }
.simhud .run { font-size: calc(16px * var(--k)); line-height: calc(20px * var(--k)); text-shadow: 2px 2px 0 #000; }
.simlbl.hitm, .simlbl.crit { font-family: var(--px); text-shadow: 2px 2px 0 #000; }

/* ---------- Handy kompakt (2026-10-13): kleinere Schrift (Pixelschrift ×0,75), niedrigere Knöpfe, engere Abstände ---------- */
@media (max-width: 700px) {
  :root, :root:not([data-x]) { --k: .75; }
  .bar { height: 40px; gap: 6px; }
  .nav a, .nav a:not(.play), .play, .menubtn { height: 30px; padding: 0 8px 2px; }
  .menubtn { width: 34px; padding: 0 0 2px; }
  .navmenu a { height: 36px; }
  .controls { gap: 5px; }
  .seg { gap: 3px; }
  .seg button, .seg button.on { height: 30px; padding: 0 6px 2px; }
  #q, #biome, #sort, .tools select, .row select { height: 32px; padding: 0 6px; }
  #biome, #sort, .tools select, .row select { padding-right: 22px; background-position: right 6px center; }
  .chips button, .chips button.on, .lvsel button { height: 26px; padding: 0 6px 2px; }
  .seg button, .chips button, .lvsel button { min-width: 0; }
  .top { padding-bottom: 5px; }
  main, .wrap { padding-top: 8px; }
  .gh { margin: 12px 2px 6px; }
  .grid { gap: 6px; }
  .card .body { padding: 6px 7px 7px; gap: 2px; }
  .card .i, .card .rank { transform: scale(.8); transform-origin: top right; }
  .card .rank { transform-origin: top left; }
  .bio, .it, .box { padding: 7px 8px; }
  .blist, .alist { gap: 6px; }
  .grp { gap: 3px; }
  .cl { gap: 3px; }
  .cl a, .cl span.it, .cl span.tag, .cl .bt { padding: 1px 5px 2px; border-width: 1px; }
  .badge, .badge.rar, .lvtag { padding: 0 3px; border-width: 1px; }
  .it img { width: 32px; height: 32px; }
  .it { grid-template-columns: 34px 1fr auto; gap: 2px 8px; }
  .cell { width: 40px; height: 40px; }
  .cell img { width: 30px; height: 30px; }
  details.lt summary { padding: 4px 6px; }
  .ab { padding: 8px 10px 10px; gap: 6px; }
  .f { padding: 1px 5px; }
  /* Kreatur-Detail */
  .dhead { padding-top: calc(6px + env(safe-area-inset-top)); padding-bottom: 6px; }
  .back, .share { width: 32px; height: 32px; }
  .dhead h1 { font-size: 16px; line-height: 18px; }
  .stage { margin: 8px 0; }
  .stevebtn, .simbtn, .simagain { padding: 3px 7px 5px; }
  .simhud .h { width: 8px; height: 8px; }
  .simhud .hearts { max-width: 92px; gap: 1px; }
  .simhud { max-width: calc(100% - 110px); left: 6px; bottom: 6px; }
  .quick { gap: 5px; margin: 8px 0; }
  .quick div { padding: 5px 7px; }
  .facts div { padding: 6px 8px; }
  .spawnbox { padding: 8px 10px; }
  .sum { padding: 7px 9px; margin: 8px 0; }
  .armor { padding: 4px 8px; }
  .atks { margin: -2px 0 8px; }
  .totop { width: 40px; height: 40px; }
}
@media (min-width: 360px) and (max-width: 700px) {
  main#list > .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .card .stats { gap: 0 6px; }
  .card .warm img { width: 12px; height: 12px; }
}
/* Monster-Unter-Reiter (Kampf / Flucht / Weltbosse): etwas flacher als die Hauptreiter, passt aufs Handy */
#mkinds button, #mkinds button.on { height: 32px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: calc(13px * var(--k)); }
@media (max-width: 520px) { #mkinds button, #mkinds button.on { font-size: calc(11px * var(--k)); padding: 0 2px 2px; } #mkinds button b { display: none; } }
