* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #9ecdf5; color: #f3f1ea;
  font: 14px/1.45 ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
[hidden] { display: none !important; }

#c { position: fixed; inset: 0; width: 100%; height: 100%; display: block; outline: none; cursor: crosshair; }

#cross { position: fixed; left: 50%; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; pointer-events: none;
  background:
    linear-gradient(#fff, #fff) center / 2px 100% no-repeat,
    linear-gradient(#fff, #fff) center / 100% 2px no-repeat;
  mix-blend-mode: difference; }

#c.look { cursor: grabbing; }
#status { position: fixed; left: 10px; top: 10px; max-width: calc(100% - 20px); display: flex; flex-direction: column; align-items: flex-start; gap: 6px; pointer-events: none; }
#quest { position: fixed; right: 10px; top: 10px; width: min(300px, calc(100% - 20px)); display: flex; flex-direction: column; gap: 3px; padding: 8px 10px;
  background: rgba(20, 22, 26, .72); border-left: 3px solid #ffd34d; border-radius: 3px; font-size: 12px; line-height: 1.45; z-index: 5; }
@media (max-width: 600px) { #quest { top: 215px; left: 10px; right: auto; width: min(260px, calc(100vw - 20px)); } } /* auf dem Telefon unter der Statusanzeige */
#quest small { color: #ffd34d; }
.deal.task { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: left; border-left: 3px solid #ffd34d; }
#quest b { font-size: 14px; }
#quest .qbtns { display: flex; gap: 6px; margin-top: 4px; }
#quest button { padding: 2px 8px; border: 1px solid #3a424c; border-radius: 3px; background: #2a3138; color: #f3f1ea; font: inherit; cursor: pointer; }
#info { padding: 4px 8px; background: rgba(20, 22, 26, .55); border-radius: 3px; font-size: 12px; line-height: 1.5; white-space: pre-wrap; }

#rain { position: fixed; inset: 0; pointer-events: none; opacity: .5; animation: rain 3.6s linear infinite;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='173' height='173'%3E%3Cpath stroke='%23c4d4e8' stroke-opacity='0.55' stroke-width='1' stroke-linecap='round' d='M114 48l-2.5 15M170 107l-2.5 15M34 139l-2.7 16M143 116l-2.2 13M137 30l-2.5 15M45 33l-2.7 16M150 133l-1.8 11M84 115l-2.2 13M52 58l-3.0 18'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='251' height='251'%3E%3Cpath stroke='%23c4d4e8' stroke-opacity='0.8' stroke-width='1.2' stroke-linecap='round' d='M218 96l-3.2 19M205 40l-2.7 16M83 86l-3.3 20M242 107l-3.8 23M61 100l-4.0 24M205 71l-3.3 20M212 160l-2.5 15M149 21l-3.7 22M103 160l-2.8 17M99 92l-3.2 19M235 99l-2.3 14M67 30l-3.7 22'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='337' height='337'%3E%3Cpath stroke='%23c4d4e8' stroke-opacity='1' stroke-width='1.6' stroke-linecap='round' d='M8 88l-4.0 24M143 67l-5.5 33M164 165l-5.7 34M208 215l-3.3 20M188 138l-4.7 28M224 90l-4.7 28M320 62l-4.7 28M304 187l-3.3 20M217 199l-4.3 26M271 210l-4.0 24M267 306l-4.7 28M69 175l-5.2 31M290 176l-5.2 31'/%3E%3C/svg%3E");
  background-size: 173px 173px, 251px 251px, 337px 337px; }
#rain.snow { opacity: .85; animation: snow 16s linear infinite;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='173' height='173'%3E%3Cg fill='%23f4f7fb' fill-opacity='0.6'%3E%3Ccircle cx='17' cy='159' r='0.7'/%3E%3Ccircle cx='44' cy='79' r='1.4'/%3E%3Ccircle cx='55' cy='147' r='0.9'/%3E%3Ccircle cx='137' cy='71' r='1.0'/%3E%3Ccircle cx='4' cy='57' r='1.3'/%3E%3Ccircle cx='141' cy='136' r='1.5'/%3E%3Ccircle cx='102' cy='147' r='0.9'/%3E%3Ccircle cx='4' cy='45' r='1.1'/%3E%3Ccircle cx='111' cy='118' r='1.3'/%3E%3Ccircle cx='85' cy='113' r='1.5'/%3E%3C/g%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='251' height='251'%3E%3Cg fill='%23f4f7fb' fill-opacity='0.85'%3E%3Ccircle cx='170' cy='35' r='1.7'/%3E%3Ccircle cx='55' cy='169' r='1.5'/%3E%3Ccircle cx='82' cy='171' r='1.4'/%3E%3Ccircle cx='95' cy='63' r='1.4'/%3E%3Ccircle cx='32' cy='136' r='2.2'/%3E%3Ccircle cx='175' cy='130' r='2.0'/%3E%3Ccircle cx='199' cy='81' r='1.6'/%3E%3Ccircle cx='120' cy='36' r='2.1'/%3E%3Ccircle cx='87' cy='5' r='1.7'/%3E%3Ccircle cx='99' cy='27' r='1.1'/%3E%3Ccircle cx='33' cy='33' r='1.9'/%3E%3Ccircle cx='177' cy='175' r='1.4'/%3E%3C/g%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='337' height='337'%3E%3Cg fill='%23f4f7fb' fill-opacity='1'%3E%3Ccircle cx='75' cy='159' r='3.1'/%3E%3Ccircle cx='107' cy='35' r='3.0'/%3E%3Ccircle cx='121' cy='329' r='1.8'/%3E%3Ccircle cx='86' cy='196' r='3.2'/%3E%3Ccircle cx='87' cy='245' r='1.9'/%3E%3Ccircle cx='274' cy='98' r='2.3'/%3E%3Ccircle cx='244' cy='177' r='2.7'/%3E%3Ccircle cx='229' cy='93' r='1.6'/%3E%3Ccircle cx='258' cy='13' r='1.6'/%3E%3Ccircle cx='166' cy='156' r='2.1'/%3E%3Ccircle cx='234' cy='211' r='2.4'/%3E%3C/g%3E%3C/svg%3E"); }
/* Jede Ebene wandert um ganze Kacheln (nahtlos) – die großen, nahen schneller als die kleinen, fernen */
@keyframes rain { to { background-position: -173px 1038px, -251px 1506px, -337px 2022px; } }
@keyframes snow { to { background-position: 173px 346px, -251px 502px, 337px 1011px; } }
@media (prefers-reduced-motion: reduce) { #rain, #rain.snow { animation: none; } }
#chat, #chat-in { position: fixed; left: 10px; width: min(420px, calc(100% - 20px)); border-radius: 3px; font-size: 12px; }
#chat { bottom: 64px; padding: 4px 8px; background: rgba(20, 22, 26, .55); white-space: pre-wrap; overflow-wrap: anywhere; pointer-events: none; }
#chat-in { bottom: 12px; padding: 8px 10px; border: 2px solid #3a424c; background: #14181d; color: #f3f1ea; font: inherit; font-size: 12px; }
#chat-in:focus-visible { outline: 2px solid #ffd34d; outline-offset: 1px; }
@media (max-width: 940px) { #chat { bottom: 184px; } #chat-in { bottom: 140px; } } /* schmal: über der Bauleiste */

#tags { position: fixed; inset: 0; overflow: hidden; pointer-events: none; }
.tag { position: absolute; transform: translate(-50%, -100%); padding: 1px 8px; background: rgba(20, 22, 26, .55); border-radius: 3px;
  font-size: 12px; white-space: nowrap; }

#hud { position: fixed; right: 12px; bottom: 12px; max-width: calc(100% - 24px); display: flex; flex-direction: column; align-items: flex-end; gap: 6px; pointer-events: none; }
#cat { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 2px; padding: 3px; background: rgba(20, 22, 26, .6); border-radius: 4px; pointer-events: auto; align-self: flex-end; width: max-content; max-width: calc(100vw - 32px); } /* Reiter der Baugruppen: eine Zeile, breiter als die Leiste darunter; erst am Fensterrand wird umbrochen */
#cat .gtab { padding: 2px 5px; border: 1px solid transparent; border-radius: 3px; background: none; color: #b9c0c8; font: inherit; font-size: 11px; letter-spacing: .01em; cursor: pointer; }
#cat .gtab:hover { color: #fff; border-color: #4b545e; }
#cat .gtab.on { color: #14181d; background: #ffd34d; }
#sel { padding: 2px 10px; background: rgba(20, 22, 26, .55); border-radius: 3px; font-size: 12px; letter-spacing: .04em; }
.bar { display: flex; gap: 4px; padding: 4px; background: rgba(20, 22, 26, .6); border-radius: 4px; pointer-events: auto; max-width: calc(100% - 16px); }
.slot { position: relative; width: 44px; height: 44px; padding: 0; border: 2px solid rgba(255, 255, 255, .18); border-radius: 3px;
  background: rgba(255, 255, 255, .06); color: #d9d6cc; cursor: pointer; font: inherit; }
.slot.shape { width: 36px; height: 36px; }
#shapes { flex-wrap: wrap; justify-content: flex-end; max-width: min(492px, calc(100% - 16px)); } /* viele Formen: zwei Zeilen */
.slot.shape svg { width: 24px; height: 24px; display: block; margin: 4px auto 0; }
.slot .sw { position: absolute; inset: 6px; border-radius: 2px; box-shadow: inset -4px -4px 0 rgba(0, 0, 0, .18), inset 3px 3px 0 rgba(255, 255, 255, .16); }
.slot .k { position: absolute; left: 3px; top: 0; font-size: 10px; color: #fff; text-shadow: 0 1px 2px #000; }
.slot.lock { opacity: .3; } /* Mission: Dieses Bauteil gibt es erst in einem späteren Zeitalter */
.slot.no { border-style: dashed; } /* im Überlebensmodus: dafür reicht der Vorrat nicht */
.slot.no .sw { opacity: .28; filter: grayscale(1); }
.slot canvas.sw { inset: 2px; width: calc(100% - 4px); height: calc(100% - 4px); box-shadow: none; border-radius: 0; }
.slot.no .k { color: #9aa3ad; }
#sel.no { color: #f0a35e; }
.slot.on { border-color: #ffd34d; background: rgba(255, 211, 77, .16); color: #ffd34d; }
.slot:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }

#vitals { display: flex; flex-direction: column; gap: 4px; }
.vital { position: relative; width: 84px; height: 16px; overflow: hidden; background: rgba(20, 22, 26, .6); border-radius: 3px;
  font-size: 10px; line-height: 16px; text-align: center; }
.vital i { position: absolute; left: 0; top: 0; bottom: 0; width: 100%; }
.vital b { position: relative; font-weight: 400; text-shadow: 0 1px 2px #000; }
.vital.low { box-shadow: 0 0 0 2px #ff6b5e; }
#v-health { background: #b8443c; } #v-hunger { background: #b0742a; } #v-thirst { background: #2f73b5; } #v-warmth { background: #a8922c; }
/* Schlafen: Das Bild wird kurz ganz schwarz, in der Mitte steht der Traum */
#dark { white-space: pre-line; text-align: center; position: fixed; inset: 0; z-index: 5; display: flex; align-items: center; justify-content: center; padding: 24px; background: #000; color: #d9d6cc;
  font-size: 15px; line-height: 1.5; text-align: center; opacity: 0; transition: opacity .6s ease; pointer-events: none; }
#dark.on { opacity: 1; }
#dark.wake { transition-duration: .8s; }
@media (prefers-reduced-motion: reduce) { #dark { transition: none; } }
#toast { position: fixed; left: 50%; top: 16%; transform: translateX(-50%); max-width: calc(100% - 20px); padding: 6px 12px;
  background: rgba(20, 22, 26, .7); border-radius: 3px; font-size: 13px; text-align: center; pointer-events: none; }

#inv, #menu, #board-win, #map-win, #bp-win, #konto-win, #post-win { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgba(14, 22, 30, .62); overflow: auto; }
.panel { width: min(460px, 100%); padding: 26px 28px 20px; background: #1d2228; border: 2px solid #3a424c; border-radius: 4px;
  box-shadow: 8px 8px 0 rgba(0, 0, 0, .35); }
/* Hauptmenü: deckt alles ab, solange keine Welt geladen ist */
#home, #menu.bare { background: #12161b; background-image: linear-gradient(rgba(255, 255, 255, .028) 2px, transparent 2px), linear-gradient(90deg, rgba(255, 255, 255, .028) 2px, transparent 2px); background-size: 32px 32px; }
#home { position: fixed; inset: 0; display: flex; padding: 16px; overflow: auto; }
#home .panel { width: min(880px, 100%); margin: auto; padding-top: 18px; }
#home .lead { margin-bottom: 10px; }
#home .hbox .row input:not([type=checkbox]) { width: 7.5em; }
#home .help { margin: 6px 0 10px; }
#home h2 { margin-top: 12px; }
#home .row { margin-bottom: 10px; }
#h-note { min-height: 1.4em; margin: 0 0 4px; color: #ffd34d; }
.hgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 6px; }
.hbox { min-width: 0; margin-bottom: 14px; padding: 2px 16px 6px; border: 2px solid #3a424c; border-radius: 3px; background: #232a31; }
.hgrid .hbox { margin-bottom: 0; } .hgrid { margin-bottom: 14px; }
.seg { display: inline-flex; flex-wrap: wrap; border: 2px solid #3a424c; border-radius: 3px; overflow: hidden; }
.seg button { padding: 10px 18px; border: 0; border-right: 2px solid #3a424c; background: #2a3138; color: #f3f1ea; font: inherit; cursor: pointer; }
.seg button:last-child { border-right: 0; }
.seg button.on { background: #ffd34d; color: #1d2228; font-weight: 700; }
.seg button:disabled { color: #8a929b; cursor: default; }
.seg button:focus-visible, .chips button:focus-visible, .row button:focus-visible { outline: 2px solid #ffd34d; outline-offset: -4px; }
.seg button.on:focus-visible { outline-color: #1d2228; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.chips button { padding: 7px 11px; border: 2px solid #3a424c; border-radius: 3px; background: #2a3138; color: #f3f1ea; font: inherit; font-size: 12px; cursor: pointer; }
.chips button:hover { border-color: #6b7682; }
.hfoot { margin-top: 2px; }
#menu.bare #tab-play, #menu.bare #tab-world, #menu.bare #play { display: none; }
@media (max-width: 720px) { .hgrid { grid-template-columns: 1fr; } #home { padding: 10px 8px; } #home .panel { padding: 18px 14px 12px; } .seg { display: flex; } .seg button { flex: 1 1 auto; } }
/* Erzählfenster der Missionen: unten in der Mitte, das Spiel ruht dahinter */
#story { position: fixed; inset: 0; display: flex; align-items: flex-end; justify-content: center; padding: 16px 16px 7vh; background: rgba(8, 11, 15, .5); overflow: auto; }
#story .panel { width: min(700px, 100%); padding: 16px 22px 14px; }
#story-kap { color: #8a929b; font-size: 12px; }
#story-who { margin: 4px 0 6px; font-size: 15px; }
#story-text { margin: 4px 0 14px; font-size: 15px; line-height: 1.65; white-space: pre-line; }
#story-log { max-height: 56vh; overflow: auto; margin: 8px 0 14px; padding-right: 8px; }
#story-log h3 { margin: 14px 0 4px; font-size: 13px; color: #8a929b; font-weight: normal; }
#story-log p { margin: 0 0 8px; line-height: 1.6; }
#story-log b { color: #ffd34d; font-weight: normal; }
#story-log:focus-visible { outline: 2px solid #ffd34d; outline-offset: 2px; }
#story-n { margin: 0; }
.mcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; margin: 0 0 12px; }
.mcards button { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border: 2px solid #3a424c; border-radius: 3px; background: #2a3138; color: #f3f1ea; font: inherit; text-align: left; cursor: pointer; }
.mcards button:hover { border-color: #6b7682; }
.mcards button:disabled { opacity: .55; cursor: default; }
.mcards button.on { border-color: #ffd34d; background: #333a2c; }
.mcards button:focus-visible { outline: 2px solid #ffd34d; outline-offset: 1px; }
.mcards small { color: #b9c0c8; font-size: 12px; }
.mcards .st { color: #ffd34d; font-size: 12px; }
#konto-win { background: rgba(8, 11, 15, .8); }
#post-win { background: rgba(8, 11, 15, .8); z-index: 60; }
#post-win .panel { width: min(560px, 100%); max-height: 86vh; overflow: auto; padding: 18px 22px; }
#post-list article { margin: 12px 0 16px; }
#post-list small { display: block; color: #8a929b; font-size: 12px; margin-bottom: 4px; }
#post-list blockquote { margin: 0 0 8px; padding-left: 10px; border-left: 2px solid #3a444f; color: #8a929b; font-size: 13px; }
#post-list p { margin: 0; line-height: 1.6; white-space: pre-line; }
.beta { align-self: flex-start; margin-left: .45em; padding: .22em .5em; border-radius: 4px; background: #ff8a4c; color: #17202e; font-size: 12px; font-weight: 800; letter-spacing: .08em; line-height: 1; }
#konto-win .row { margin-bottom: 10px; }
#konto-win .row label { width: 5.5em; }
#konto-win .row input { width: min(17em, 100%); flex: 1 1 12em; }
#konto-note { min-height: 1.4em; color: #ffd34d; }
#menu .panel { width: min(580px, 100%); } /* breit genug, dass die Reiter in eine Zeile passen */
#inv { align-items: flex-start; }
#inv .panel { width: min(640px, 100%); }
#inv h2 small { color: #8a929b; font-weight: 400; }
/* Kacheln im Rucksack: ein Gegenstand je Kachel, zum Ziehen und Ablegen */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 5px; margin-bottom: 6px; }
.it { position: relative; min-height: 50px; padding: 4px 5px 14px; border: 2px solid #3a424c; border-radius: 3px; background: #14181d; color: #f3f1ea;
  font: inherit; font-size: 11px; line-height: 1.2; text-align: left; overflow-wrap: anywhere; cursor: grab; }
.it:hover { border-color: #6b7682; }
.it.empty { border-style: dashed; color: #6f7883; cursor: default; }
.it.sel { border-color: #ffd34d; background: rgba(255, 211, 77, .14); }
.it.over { border-color: #fff; }
.it.worn::after { content: ''; position: absolute; right: 5px; top: 5px; width: 7px; height: 7px; border-radius: 50%; background: #7ed06f; } /* angelegt */
.it img.pic { display: block; width: 30px; height: 30px; margin: 0 auto 1px; image-rendering: auto; }
/* Anziehpuppe im Rucksack: Plätze auf der Figur */
.grid.doll { grid-template-columns: repeat(3, minmax(64px, 92px)); grid-template-areas: ". kopf schmuck" "hand oben neben" ". hose ." ". fuss ."; justify-content: center; position: relative; }
.grid.doll .doll-fig { grid-area: 1 / 2 / 5 / 3; width: 100%; height: 100%; object-fit: contain; opacity: .9; pointer-events: none; align-self: center; }
.grid.doll .it { background: rgba(20, 24, 29, .78); z-index: 1; }
.grid.doll .it[style*="kopf"], .grid.doll .it[style*="oben"], .grid.doll .it[style*="hose"], .grid.doll .it[style*="fuss"] { background: rgba(20, 24, 29, .22); border-color: rgba(107, 118, 130, .55); } /* auf der Figur: durchscheinend */
.it .n { position: absolute; right: 5px; bottom: 2px; color: #ffd34d; font-size: 11px; }
.it .lab { position: absolute; left: 5px; bottom: 2px; color: #8a929b; font-size: 10px; }
.it .ic { display: block; font-size: 20px; line-height: 1.15; }
.it:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
#quickbar { position: fixed; left: 12px; bottom: 12px; } /* Schnellleiste links unten, die Bauleiste steht rechts */
#quickbar .slot canvas.sw { margin: 0; left: 12px; top: 3px; width: calc(100% - 15px); height: calc(100% - 6px); object-fit: contain; }
#quickbar .slot .ic { display: block; margin-left: 12px; font-size: 18px; line-height: 1.1; }
/* Händler: je Tausch eine Karte – was man gibt, was man bekommt */
.tabs.sub { margin-bottom: 10px; }
.deals { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; }
.deal { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 6px; padding: 8px; border: 2px solid #3a424c; border-radius: 3px; background: #14181d;
  color: #f3f1ea; font: inherit; font-size: 11px; text-align: center; cursor: pointer; }
.deal:hover:not(:disabled) { border-color: #ffd34d; }
.deal:disabled { opacity: .45; cursor: default; }
.deal .ic { display: block; font-size: 22px; }
.deal .arrow { color: #ffd34d; font-size: 16px; }
.deal small { display: block; grid-column: 1 / -1; color: #8a929b; }
.deal:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
#inv-detail { min-height: 34px; margin-top: 4px; }
/* Schnellleiste im Spiel: statt der Bauleiste, wenn der Baumodus aus ist */
#quickbar .slot { width: 62px; height: 44px; padding: 2px 3px; font-size: 10px; line-height: 1.15; text-align: left; overflow: hidden; }
#quickbar .slot b { display: block; margin-left: 10px; font-weight: 400; overflow-wrap: anywhere; }
#quickbar .slot .n { position: absolute; right: 3px; bottom: 1px; color: #ffd34d; }
@media (max-width: 560px) { #quickbar .slot { width: 40px; height: 40px; font-size: 8px; } .grid { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); } }
/* schmal oder Berührung: Schnellleiste senkrecht am linken Rand (unten ist die Bauleiste bzw. das Steuerkreuz); niedrig: zwei Spalten rechts neben dem Kreuz */
@media (max-width: 1100px), (pointer: coarse) {
  #quickbar { flex-direction: column; left: calc(10px + env(safe-area-inset-left, 0px)); bottom: auto; top: 50%; transform: translateY(-50%); }
  #quickbar .slot { width: 38px; height: 38px; font-size: 8px; }
}
@media (max-height: 520px) and (max-width: 1100px), (max-height: 520px) and (pointer: coarse) {
  #quickbar { display: grid; grid-template-columns: repeat(2, 38px); top: auto; transform: none; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
  body.touch #quickbar { left: calc(168px + env(safe-area-inset-left, 0px)); } /* neben dem Steuerkreuz */
}
#inv .panel { width: min(560px, 100%); }
h2 { margin: 14px 0 8px; font-size: 14px; color: #ffd34d; }
h2:first-child { margin-top: 0; }
.list { display: grid; grid-template-columns: 1fr auto; gap: 5px 12px; align-items: center; }
.list small { color: #b9c0c8; }
.keys { max-width: 34em; margin: 8px 0; }
.keys button { min-width: 9em; }
.keys button.wait { border-color: #ffd34d; color: #ffd34d; background: rgba(255, 211, 77, .14); }
.list .btns { display: flex; gap: 6px; justify-content: flex-end; }
.list .dim { color: #8a929b; }
.list button { padding: 4px 10px; border: 2px solid #3a424c; border-radius: 3px; background: #2a3138; color: #f3f1ea; font: inherit; cursor: pointer; }
.list button:hover { border-color: #6b7682; }
.list button:disabled { opacity: .45; cursor: default; }
h1 { margin: 0; font-size: 32px; letter-spacing: .02em; color: #ffd34d; }
/* Logo: Bildmarke (Würfel, dessen Eckblock gerade gesetzt wird) vor dem Schriftzug */
.logo { display: flex; align-items: center; gap: .3em; font-weight: 900; letter-spacing: -.02em; line-height: 1; }
.logo .mark { height: 1.3em; width: auto; flex: none; }
.lead { margin: 4px 0 14px; color: #b9c0c8; }
/* Reiter im Menü */
.tabs { display: flex; flex-wrap: wrap; gap: 2px; margin: 0 0 16px; border-bottom: 2px solid #3a424c; }
.tab { margin-bottom: -2px; padding: 8px 11px; border: 2px solid transparent; border-bottom: none; border-radius: 3px 3px 0 0; background: none; color: #b9c0c8; font: inherit; cursor: pointer; }
.tab:hover { color: #f3f1ea; }
.tab.on { border-color: #3a424c; background: #1d2228; color: #ffd34d; }
.tab:focus-visible, .pane:focus-visible { outline: 2px solid #ffd34d; outline-offset: 1px; }
.pane { min-height: 232px; margin-bottom: 14px; }
.pane.scroll { max-height: min(54vh, 460px); overflow-y: auto; padding-right: 8px; scrollbar-width: thin; scrollbar-color: #3a424c #1d2228; }
.pane ul.help { padding-left: 18px; }
.look { display: flex; gap: 20px; flex-wrap: wrap; align-items: flex-start; margin-bottom: 12px; }
#look-view { flex: none; border: 2px solid #3a424c; border-radius: 3px; background: #2b3540; image-rendering: pixelated; }
.look-opts { flex: 1 1 200px; display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; align-items: center; }
.look-opts label { color: #ffd34d; }
/* Laden für Zusatzinhalte (Reiter „Figur“) */
.shop-item { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; padding: 10px 12px; margin-bottom: 8px; border: 2px solid #3a424c; border-radius: 3px; background: #232a31; }
.shop-item > div { flex: 1 1 220px; min-width: 0; }
.shop-item b { display: block; color: #ffd34d; }
.shop-item span { color: #b9c0c8; font-size: 12px; }
.shop-item em { font-style: normal; color: #7ed06f; font-size: 12px; }
.shop-item button { padding: 9px 16px; border: 2px solid #ffd34d; border-radius: 3px; background: #ffd34d; color: #1d2228; font: inherit; font-weight: 700; cursor: pointer; }
.shop-item button:hover { background: #ffe07d; }
.shop-item button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.look-opts select { min-width: 0; padding: 8px 10px; border: 2px solid #3a424c; border-radius: 3px; background: #14181d; color: #f3f1ea; font: inherit; }
.look-opts select:focus-visible { outline: 2px solid #ffd34d; outline-offset: 1px; }
#pane-fb .lbl { display: block; margin: 12px 0 6px; color: #ffd34d; }
#fb-text { display: block; width: 100%; box-sizing: border-box; margin-bottom: 10px; padding: 10px 12px; border: 2px solid #3a424c; border-radius: 3px; background: #14181d; color: #f3f1ea; font: inherit; resize: vertical; }
#fb-text:focus-visible { outline: 2px solid #ffd34d; outline-offset: 1px; }
#fb-note { min-height: 1.4em; margin-bottom: 0; }
#fb-note.ok { color: #7ed06f; } #fb-note.bad { color: #f0a35e; }
.pane ul.help li { margin-bottom: 4px; }
dl { display: grid; grid-template-columns: auto 1fr; gap: 5px 16px; margin: 0 0 20px; }
dt { color: #ffd34d; white-space: nowrap; }
dd { margin: 0; color: #e4e1d8; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row button { padding: 10px 16px; border: 2px solid #3a424c; border-radius: 3px; background: #2a3138; color: #f3f1ea; font: inherit; cursor: pointer; }
.row button:hover { border-color: #6b7682; }
.row button.primary { background: #ffd34d; border-color: #ffd34d; color: #1d2228; font-weight: 700; padding-inline: 28px; }
.row button.primary:hover { background: #ffe07d; }
.row button:disabled { opacity: .5; cursor: default; }
.row { align-items: center; }
.row label { color: #ffd34d; }
.pair { display: flex; align-items: center; gap: 10px; }
.row input { width: 9.5em; padding: 10px 12px; border: 2px solid #3a424c; border-radius: 3px; background: #14181d; color: #f3f1ea; font: inherit; }
#hotbar.off, #shapes.off { opacity: .35; }
.row select { padding: 10px 12px; border: 2px solid #3a424c; border-radius: 3px; background: #14181d; color: #f3f1ea; font: inherit; }
#board-text { width: 100%; box-sizing: border-box; margin: 0 0 12px; padding: 10px 12px; border: 2px solid #3a424c; border-radius: 3px; background: #14181d; color: #f3f1ea; font: inherit; line-height: 1.5; resize: vertical; }
#board-text:read-only { color: #b9c0c8; }
#board-text:focus-visible, .row select:focus-visible { outline: 2px solid #ffd34d; outline-offset: 1px; }
#board-add { flex: 1; width: auto; min-width: 8em; }
#board-win .row, #bp-win .row { margin-bottom: 12px; }
#bp-code { width: 100%; box-sizing: border-box; margin: 0 0 12px; padding: 8px 10px; border: 2px solid #3a424c; border-radius: 3px; background: #14181d; color: #f3f1ea; font: 11px/1.4 ui-monospace, Consolas, monospace; resize: vertical; word-break: break-all; }
#bp-code:focus-visible { outline: 2px solid #ffd34d; outline-offset: 1px; }
#bp-name { flex: 1; width: auto; min-width: 8em; }
#bp-list { margin-bottom: 14px; max-height: 40vh; overflow: auto; }
#map-win .panel { width: min(600px, 100%); }
#map-canvas { display: block; width: 100%; max-width: min(100%, 68vh); margin: 0 auto; aspect-ratio: 1; border: 2px solid #3a424c; image-rendering: pixelated; }
#peers { margin: 12px 0; font-size: 12px; }
#peers h3 { margin: 0 0 6px; font-size: 12px; font-weight: normal; color: #ffd34d; }
.prow { display: flex; align-items: center; gap: 10px; padding: 4px 10px; border: 2px solid #3a424c; border-radius: 3px; background: #2a3138; margin-bottom: 4px; }
.prow span { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.prow button { padding: 4px 10px; border: 2px solid #3a424c; border-radius: 3px; background: #1d2228; color: #f3f1ea; font: inherit; font-size: 12px; cursor: pointer; }
.prow button:hover { border-color: #6b7682; }
.prow button:disabled { opacity: .5; cursor: default; }
.prow button.sure { border-color: #e0604a; color: #ffb4a6; }
#peers label.pair { display: flex; margin-top: 6px; }
.wlist { display: flex; flex-direction: column; gap: 4px; max-height: 34vh; overflow: auto; margin: 0 0 12px; font-size: 12px; }
.wrow { display: grid; grid-template-columns: 8.5em 1fr auto; gap: 4px 10px; align-items: center; padding: 6px 10px; border: 2px solid #3a424c; border-radius: 3px; background: #2a3138; color: #f3f1ea; font: inherit; text-align: left; cursor: pointer; }
.wrow:hover { border-color: #6b7682; }
.wrow.live { border-left-color: #ffd34d; }
.wrow .pl { color: #b9c0c8; }
.wrow.live .pl { color: #ffd34d; }
.wrow .sys { display: flex; flex-wrap: wrap; gap: 5px; justify-content: flex-end; }
.sy.off { opacity: .25; filter: grayscale(1); }
@media (max-width: 560px) { .wrow { grid-template-columns: 1fr auto; } .wrow .sys { grid-column: 1 / -1; justify-content: flex-start; } }
.row input:disabled { opacity: .5; }
.row label.pair:has(input:disabled) { opacity: .5; cursor: default; } /* gesperrt (online) */
.row input[type=checkbox] { width: 18px; height: 18px; padding: 0; accent-color: #ffd34d; }
.row input:focus-visible { outline: 2px solid #ffd34d; outline-offset: 1px; }
.help { margin: 8px 0 16px; color: #b9c0c8; font-size: 12px; }
.help a { color: #ffd34d; }
.help a:focus-visible { outline: 2px solid #ffd34d; outline-offset: 2px; }
#version { margin: 10px 0 0; color: #7f8893; font-size: 11px; text-align: right; }
#note { min-height: 1.4em; margin: 12px 0 0; color: #f0a35e; font-size: 12px; }

/* Berührung: Steuerung über dem Bild (nur mit body.touch, nur im Spiel) */
body.touch #c { touch-action: none; }
body.touch .bar, body.touch #cat { touch-action: manipulation; }
#touch { position: fixed; inset: 0; pointer-events: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
#touch button { pointer-events: auto; touch-action: none; padding: 7px 10px; border: 2px solid rgba(255, 255, 255, .22); border-radius: 4px;
  background: rgba(20, 22, 26, .62); color: #f3f1ea; font: inherit; font-size: 12px; }
#touch button.on, #touch button:active { border-color: #ffd34d; color: #ffd34d; }
#touch:not(.surv) .t-surv, #touch:not(.free) .t-free, #touch:not(.online) .t-online { display: none; }
#pad { position: absolute; left: calc(20px + env(safe-area-inset-left, 0px)); bottom: calc(20px + env(safe-area-inset-bottom, 0px)); width: 136px; height: 136px;
  border: 2px solid rgba(255, 255, 255, .25); border-radius: 50%; background: rgba(20, 22, 26, .35); pointer-events: auto; touch-action: none; }
#pad-knob { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%; background: rgba(243, 241, 234, .55); }
#tbar { position: absolute; right: calc(10px + env(safe-area-inset-right, 0px)); top: calc(10px + env(safe-area-inset-top, 0px)); max-width: 62%;
  display: flex; flex-direction: row-reverse; flex-wrap: wrap; gap: 4px; } /* rückwärts: „Mehr/Weniger“ steht immer ganz rechts oben */
#t-more { color: #ffd34d; }
/* schlank: nur Steuerkreuz, Springen und „Mehr“ (die Lebenswerte im Überlebensmodus bleiben) */
body.touch.slim #tbar > button:not(#t-more), body.touch.slim #tact button:not(.big):not(.keep), body.touch.slim #hud, body.touch.slim #quickbar, body.touch.slim #info, body.touch.slim #cross { display: none; }
#tact { position: absolute; right: calc(12px + env(safe-area-inset-right, 0px)); bottom: 200px; display: flex; align-items: flex-end; gap: 8px; }
#tact button { min-width: 64px; min-height: 48px; }
#tact button.big { min-width: 76px; min-height: 64px; border-radius: 50%; }
#t-mode { color: #f0a35e; }
#t-mode.place { color: #7ed06f; }
body.touch #chat { bottom: 170px; }
@media (max-width: 560px) { .slot { width: 30px; height: 30px; } .slot .sw { inset: 4px; } .slot.shape { width: 30px; height: 30px; } .slot.shape svg { width: 20px; height: 20px; margin-top: 3px; } }
