/* dorfzentrum.css – der Dorfplatz in 3D (Hauptplatz) */
body.cd3 { overflow: hidden; height: 100vh; height: 100dvh; display: flex; flex-direction: column; background: #10172e; }
body.cd3 .topbar { flex: none; }
.world [hidden] { display: none !important; }
.world { position: relative; flex: 1; min-height: 0; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
.world #cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; outline: none; cursor: grab; }
.world #cv.dragging { cursor: grabbing; }
.world #cv.placing { cursor: crosshair; }
.world #cv.pointing { cursor: pointer; }

/* Namensschilder über Häusern, Figuren und Projekten */
.labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.lbl { position: absolute; left: 0; top: 0; transform: translate(-50%, -100%); white-space: nowrap; pointer-events: none;
  background: var(--paper); color: var(--text); box-shadow: var(--frame-thin); padding: 1px 8px; font-size: 14px; font-weight: 700; line-height: 1.35; }
.lbl .tag { margin-left: 5px; vertical-align: 1px; }
.lbl.me { background: var(--gold); }
.lbl.free { background: #eaffe8; }
.lbl.proj { background: #f4ecff; }
.lbl.lm { background: var(--sky-2); }
.lbl .pbar { display: block; height: 5px; margin: 2px 0 2px; background: #d9d2c4; }
.lbl .pbar i { display: block; height: 100%; width: calc(var(--p) * 1%); background: var(--green); }
.lbl small { font-weight: 400; color: var(--ink-soft); }

/* Werkzeugleiste links */
.w-left { position: absolute; left: max(12px, env(safe-area-inset-left)); top: 18px; z-index: 5; display: flex; flex-direction: column; gap: 10px; max-width: 250px; max-height: calc(100% - 120px); overflow: auto; scrollbar-width: none; transition: opacity .2s; }
.w-left.dim .w-tools { opacity: .35; pointer-events: none; }
.w-tools { display: flex; flex-direction: column; gap: 6px; }
.w-tool { appearance: none; border: 0; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 7px 12px 7px 9px; margin: 4px;
  font: inherit; font-weight: 700; color: var(--text); background: var(--paper); box-shadow: var(--frame), var(--drop); position: relative; text-align: left; }
.w-tool span { font-size: 22px; line-height: 1; width: 26px; text-align: center; }
.w-tool:hover { transform: translateY(-2px); background: var(--paper-2); }
.w-tool[aria-pressed="true"] { background: var(--gold); }
.w-tool.pulse { animation: wPulse 1.2s steps(6) infinite; }
@keyframes wPulse { 50% { background: var(--gold); transform: translateY(-3px); } }
.w-count { position: absolute; right: -8px; top: -8px; min-width: 22px; height: 22px; padding: 0 5px; font-style: normal; font-size: 13px; line-height: 22px; text-align: center; background: var(--red); color: #fff; box-shadow: var(--frame-thin); }
.w-find { display: flex; gap: 6px; align-items: center; margin: 4px; background: var(--paper); box-shadow: var(--frame), var(--drop); padding: 6px; }
.w-find input { width: 130px; min-width: 0; flex: 1; font: inherit; font-size: 15px; border: 0; padding: 5px 8px; background: var(--snow); box-shadow: var(--frame-thin); margin: 3px; color: var(--text); }

/* Minikarte */
.w-map { position: absolute; right: max(12px, env(safe-area-inset-right)); top: 22px; z-index: 5; background: var(--paper); box-shadow: var(--frame), var(--drop); padding: 6px; margin: 4px; }
.w-map canvas { display: block; width: 200px; height: 200px; image-rendering: pixelated; cursor: pointer; }
.w-zone { display: block; text-align: center; font-size: 13px; font-weight: 700; padding-top: 4px; color: var(--ink-soft); max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Interaktions-Hinweis */
.w-prompt { position: absolute; left: 50%; bottom: 86px; transform: translateX(-50%); z-index: 6; appearance: none; border: 0; cursor: pointer;
  font: inherit; font-size: 18px; font-weight: 700; color: var(--text); background: var(--paper); box-shadow: var(--frame), var(--drop); padding: 9px 18px; margin: 4px; animation: tipIn .15s steps(2); max-width: calc(100% - 40px); }
.w-prompt kbd { margin-right: 6px; }
.w-prompt:hover { background: var(--gold); }

/* Bauleiste */
.w-buildbar { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 7; display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: var(--paper); box-shadow: var(--frame), var(--drop); padding: 10px 14px; margin: 4px; max-width: calc(100% - 32px); }
.w-bstatus { font-weight: 700; text-align: center; }
.w-bstatus.ok { color: var(--green-d); } .w-bstatus.bad { color: var(--red-d); }
.w-bbtns { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }

/* Hilfe */
.w-help { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); z-index: 4; margin: 0; font-size: 13px; color: #fff; text-shadow: 0 1px 0 #000, 0 0 6px rgba(0,0,0,.6); white-space: nowrap; pointer-events: none; }
.w-help kbd { font-size: 12px; }

/* Touch-Steuerung */
.w-joy { position: absolute; left: 22px; bottom: 26px; width: 120px; height: 120px; border-radius: 50%; background: rgba(255, 250, 240, .25); box-shadow: inset 0 0 0 3px rgba(255,255,255,.7); z-index: 6; touch-action: none; }
.w-joy i { position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%; background: var(--paper); box-shadow: 0 0 0 3px var(--ink); transform: translate(var(--jx, 0px), var(--jy, 0px)); }
.w-jump { position: absolute; right: 26px; bottom: 40px; width: 64px; height: 64px; border: 0; z-index: 6; font-size: 28px; background: var(--paper); box-shadow: var(--frame), var(--drop); }

/* Seitenleiste */
.w-drawer { position: absolute; top: 12px; bottom: 12px; right: max(12px, env(safe-area-inset-right)); width: min(420px, calc(100% - 24px)); z-index: 8; display: flex; flex-direction: column;
  background: var(--paper); box-shadow: var(--frame), var(--drop); margin: 4px; animation: drawerIn .18s steps(3); }
@keyframes drawerIn { from { transform: translateX(30px); opacity: 0; } }
.w-drawer header { display: flex; align-items: center; gap: 10px; padding: 12px 14px 10px 16px; border-bottom: 3px solid var(--ink); }
.w-drawer h2 { margin: 0; flex: 1; font-size: 22px; }
.w-x { appearance: none; border: 0; background: var(--snow); box-shadow: var(--frame-thin); width: 34px; height: 34px; font-size: 22px; line-height: 1; cursor: pointer; margin: 3px; color: var(--text); }
.w-drawer-body { overflow-y: auto; padding: 12px 14px 18px 16px; flex: 1; overscroll-behavior: contain; }
.w-drawer .tabs { margin-bottom: 10px; }
.w-drawer .tabs button { font-size: 15px; padding: 4px 10px; }
.w-sec { margin: 6px 0 16px; }
.w-sec > h3 { margin: 0 0 4px; font-size: 18px; display: flex; align-items: center; gap: 8px; }
.w-sec > p { margin: 0 0 8px; font-size: 15px; color: var(--ink-soft); }
.w-dot { width: 14px; height: 14px; display: inline-block; box-shadow: 0 0 0 2px var(--ink); flex: none; }
.w-card { display: grid; grid-template-columns: 44px 1fr auto; gap: 4px 10px; align-items: center; background: var(--snow); box-shadow: var(--frame-thin); padding: 8px 10px; margin: 8px 3px; }
.w-card .ic { font-size: 30px; line-height: 1; text-align: center; grid-row: span 2; }
.w-card .ic img.spr { width: 40px; height: 40px; }
.w-card b { font-size: 16px; }
.w-card .meta { font-size: 13px; color: var(--ink-soft); grid-column: 2; }
.w-card .acts { grid-row: span 2; display: flex; flex-direction: column; gap: 4px; align-items: stretch; }
.w-card .acts .btn { margin: 2px; white-space: nowrap; }
.w-card .cost { grid-column: 2 / 4; display: flex; flex-wrap: wrap; gap: 2px; }
.w-card .cost .chip { font-size: 13px; padding: 1px 6px; margin: 2px; }
.w-card .cost .chip img.spr { width: 16px; height: 16px; }
.w-card .cost .chip.miss { color: var(--red-d); }
.w-card .bar { grid-column: 2 / 4; height: 12px; }
.w-card.mine { background: #fff6dc; }
.w-empty { color: var(--ink-soft); font-size: 15px; padding: 6px 2px; }
.w-myplot { background: var(--paper-2); box-shadow: var(--frame-thin); padding: 10px 12px; margin: 4px 3px 14px; }
.w-myplot b { font-size: 17px; }

/* Modals */
.w-plotinfo { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 6px 0 12px; }
.w-plotinfo dt { color: var(--ink-soft); }
.w-plotinfo dd { margin: 0; font-weight: 700; }
.w-tierband { display: flex; align-items: center; gap: 10px; padding: 8px 12px; margin: 3px 3px 12px; box-shadow: var(--frame-thin); font-weight: 700; color: #2b2d42; }
.w-tierband span { font-size: 26px; }
.w-donate .bar { height: 22px; }
.w-donate .need { display: flex; flex-wrap: wrap; gap: 2px; margin: 6px 0 12px; }
.w-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.w-row label { min-width: 110px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.w-row input[type=number] { width: 90px; font: inherit; border: 0; padding: 4px 8px; background: var(--snow); box-shadow: var(--frame-thin); margin: 3px; color: var(--text); }
.w-row .small { color: var(--ink-soft); }
.w-helpers { font-size: 14px; color: var(--ink-soft); margin: 8px 0 0; }
.w-welcome-tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin: 10px 0 6px; }
.w-welcome-tiers div { background: var(--snow); box-shadow: var(--frame-thin); padding: 8px 10px; margin: 3px; font-size: 14px; }
.w-welcome-tiers b { display: block; font-size: 16px; }

/* Besuch (wie bisher) */
.visit { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.v-portrait svg { display: block; box-shadow: 0 0 0 4px var(--ink), 0 0 0 8px #8a5a32, 0 0 0 11px var(--ink); margin: 11px; }
.v-info { flex: 1; min-width: 180px; }
.v-name { font-size: 20px; }
.v-stats { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 10px 0; }
.v-stats dt { color: var(--ink-soft); }
.v-stats dd { margin: 0; font-weight: 700; }
.v-show { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.v-show img.spr { width: 40px; height: 40px; }
.v-bubble { position: relative; background: var(--snow); box-shadow: var(--frame-thin); margin: 18px 3px 10px; padding: 10px 14px; font-weight: 700; font-size: 17px; }
.v-bubble::before { content: ""; position: absolute; left: 60px; top: -11px; width: 14px; height: 8px; background: var(--ink); clip-path: polygon(0 100%, 100% 100%, 0 0); }
.v-knock { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 10px 0 4px; }
.knock-btn { appearance: none; border: 0; font-size: 22px; line-height: 1; width: 44px; height: 44px; background: var(--snow); box-shadow: var(--frame-thin); margin: 3px; cursor: pointer; }
.knock-btn:hover:not([disabled]) { background: var(--gold); transform: translateY(-3px) rotate(-6deg); }
.knock-btn[disabled] { opacity: .5; cursor: not-allowed; }

/* Überblendung (Schlittentaxi) und Laden */
.w-fade { position: absolute; inset: 0; background: #fffaf0; opacity: 0; pointer-events: none; z-index: 9; transition: opacity .3s steps(4); }
.w-fade.on { opacity: 1; }
.w-loading { position: absolute; inset: 0; display: grid; place-items: center; background: #1a2340; color: #fff; z-index: 10; font-family: var(--f-pixel); font-size: 24px; transition: opacity .4s; }
.w-loading.done { opacity: 0; pointer-events: none; }
.w-fail { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); max-width: 460px; }

/* Chat-Knopf nicht über den Joystick legen */
@media (pointer: coarse) { body.cd3 .chat-fab { bottom: 170px; } body.cd3 .chat-pop { bottom: 250px; } }

@media (max-width: 760px) {
  .w-left { top: 10px; max-width: 64px; }
  .w-tools { gap: 4px; }
  .w-tool { padding: 6px; }
  .w-tool b { display: none; }
  .w-find { display: none; }
  .w-map canvas { width: 116px; height: 116px; }
  .w-zone { max-width: 116px; font-size: 11px; }
  .w-help { display: none; }
  .w-prompt { bottom: 160px; font-size: 16px; }
  .w-drawer { top: 6px; bottom: 6px; }
}
@media (hover: none) { .w-help { display: none; } }
@media (prefers-reduced-motion: reduce) { .w-tool.pulse, .w-drawer, .w-prompt { animation: none; } }

/* ---------- Tagestafel links ---------- */
.w-day { background: var(--paper); box-shadow: var(--frame), var(--drop); margin: 4px; padding: 0; }
.w-day-head { all: unset; cursor: pointer; display: grid; grid-template-columns: 1fr auto; padding: 8px 12px 6px; width: calc(100% - 24px); }
.w-day-head .eyebrow { grid-column: 1; }
.w-day-head b { font-family: var(--f-pixel); font-size: 20px; grid-column: 1; }
.w-day-head i { grid-row: 1 / 3; grid-column: 2; align-self: center; font-style: normal; }
.w-day-body { padding: 0 12px 10px; }
.w-day.collapsed .w-day-body { display: none; }
.w-lvl { display: grid; grid-template-columns: 62px 1fr; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; }
.w-lvl .bar { height: 10px; }
.w-q { list-style: none; margin: 6px 0; padding: 0; font-size: 13.5px; }
.w-q li { display: flex; gap: 6px; align-items: baseline; padding: 2px 0; }
.w-q li small { margin-left: auto; color: var(--ink-soft); }
.w-q li.done { color: var(--green-d); text-decoration: line-through; }
.w-day-btns { display: flex; flex-wrap: wrap; gap: 2px; }
.w-day-btns .btn { font-size: 13px; padding: 3px 8px; }

/* ---------- Aktionen unten rechts ---------- */
.w-actions { position: absolute; right: max(12px, env(safe-area-inset-right)); bottom: 20px; z-index: 6; display: flex; gap: 6px; }
.w-act { appearance: none; border: 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 0; padding: 6px 10px 5px; margin: 4px; font: inherit; font-size: 12px; font-weight: 700; color: var(--text); background: var(--paper); box-shadow: var(--frame), var(--drop); min-width: 64px; }
.w-act span { font-size: 24px; line-height: 1.1; }
.w-act:hover, .w-act[aria-expanded="true"] { background: var(--gold); transform: translateY(-2px); }
.w-emotes { position: absolute; right: max(12px, env(safe-area-inset-right)); bottom: 96px; z-index: 7; display: grid; grid-template-columns: repeat(4, 54px); gap: 6px; background: var(--paper); box-shadow: var(--frame), var(--drop); padding: 10px; margin: 4px; animation: popIn .2s steps(3); }
.w-emotes button { appearance: none; border: 0; cursor: pointer; font-size: 26px; line-height: 1; height: 54px; background: var(--snow); box-shadow: var(--frame-thin); margin: 3px; position: relative; }
.w-emotes button:hover { background: var(--gold); transform: translateY(-3px) rotate(-5deg); }
.w-emotes kbd { position: absolute; right: 2px; bottom: 2px; font-size: 10px; padding: 0 3px; }
.w-say { position: absolute; left: 50%; bottom: 140px; transform: translateX(-50%); z-index: 8; display: flex; gap: 6px; align-items: center; background: var(--paper); box-shadow: var(--frame), var(--drop); padding: 8px; margin: 4px; width: min(520px, calc(100% - 40px)); }
.w-say input { flex: 1; min-width: 0; font: inherit; border: 0; padding: 7px 10px; background: var(--snow); box-shadow: var(--frame-thin); margin: 3px; color: var(--text); }

/* ---------- Wetter ---------- */
.w-weather { display: flex; align-items: center; gap: 6px; width: 100%; justify-content: center; appearance: none; border: 0; cursor: pointer; font: inherit; font-size: 13px; font-weight: 700; color: var(--text); background: var(--sky-2); box-shadow: var(--frame-thin); margin: 8px 0 2px; padding: 3px 6px; max-width: 200px; }
.w-weather span { font-size: 17px; }

/* ---------- Sprechblasen ---------- */
.bubbles { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 3; }
.bub { position: absolute; left: 0; top: 0; max-width: 240px; background: var(--snow); color: var(--text); box-shadow: var(--frame-thin), 0 4px 0 rgba(43,45,66,.18); padding: 5px 10px; font-size: 14px; line-height: 1.3; animation: bubIn .25s steps(3); }
.bub::after { content: ""; position: absolute; left: 50%; bottom: -10px; width: 12px; height: 8px; margin-left: -6px; background: var(--ink); clip-path: polygon(0 0, 100% 0, 50% 100%); }
.bub b { display: block; font-size: 11px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .04em; }
.bub.me { background: #fff6dc; }
.bub.emo { font-size: 30px; padding: 2px 8px; background: var(--paper); }
@keyframes bubIn { from { transform-origin: bottom; opacity: 0; margin-top: 8px; } }

/* Namensschilder: neue Typen */
.lbl.game { background: #ffe9a8; }
.lbl.fun { background: #ffe1d6; }
.lbl.price { background: #fffaf0; font-size: 13px; }
.lbl.price small { font-weight: 700; color: #a86a00 !important; }

/* ---------- Innenraum ---------- */
.w-roombar { position: absolute; left: 50%; top: 16px; transform: translateX(-50%); z-index: 6; display: flex; align-items: center; gap: 8px; background: var(--paper); box-shadow: var(--frame), var(--drop); padding: 8px 12px; margin: 4px; max-width: calc(100% - 40px); }
.w-roomname { font-family: var(--f-pixel); font-weight: 700; font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-roombar .btn.on { background: var(--green); color: var(--on-ink); }
.swatch { display: inline-block; width: 34px; height: 34px; box-shadow: var(--frame-thin); background-image: repeating-linear-gradient(90deg, transparent 0 8px, var(--ac) 8px 12px); }
.cat summary { cursor: pointer; font-weight: 700; margin: 10px 0 4px; }
.cat-list { max-height: 300px; overflow: auto; }

/* ---------- Haus-Stufen, Schild-Editor ---------- */
.w-steps { display: flex; gap: 3px; margin: 8px 0; flex-wrap: wrap; }
.w-steps span { width: 26px; height: 26px; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--snow); box-shadow: var(--frame-thin); margin: 3px; }
.w-steps span.on { background: var(--gold); }
.need { display: flex; flex-wrap: wrap; gap: 2px; margin: 4px 0 8px; }
.need .chip.miss { color: var(--red-d); }
.sign-prev { position: relative; display: flex; align-items: center; gap: 16px; padding: 18px 22px; margin: 10px auto 16px; max-width: 380px; background: var(--bg); color: var(--fg); box-shadow: 0 0 0 8px var(--fr), 0 0 0 11px var(--ink), 0 0 26px 8px rgba(255, 210, 120, .55); }
.sign-prev .si { font-size: 44px; line-height: 1; }
.sign-prev b { display: block; font-family: var(--f-pixel); font-size: 28px; line-height: 1.1; word-break: break-word; }
.sign-prev small { display: block; font-size: 17px; font-weight: 700; opacity: .85; }
.sign-prev .lights { position: absolute; inset: -14px; pointer-events: none; background-image: radial-gradient(circle, var(--l1, #ffd27a) 3px, transparent 4px); background-size: 22px 22px; -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; padding: 6px; animation: twinkle 1s steps(2) infinite; }
.sign-prev .lights.bunt { --l1: #ff5d8f; background-image: radial-gradient(circle, #ff5d5d 3px, transparent 4px), radial-gradient(circle, #5fd4ff 3px, transparent 4px); background-size: 22px 22px; background-position: 0 0, 11px 11px; }
.sign-prev .lights.eis { --l1: #bfeeff; }
.sign-prev .lights.keine { display: none; }
@keyframes twinkle { 50% { opacity: .6; } }
.sign-form { display: grid; grid-template-columns: 100px 1fr; gap: 8px 12px; align-items: center; }
.sign-form input { font: inherit; border: 0; padding: 6px 10px; background: var(--snow); box-shadow: var(--frame-thin); margin: 3px; color: var(--text); }
.sign-form .lbl { font-weight: 700; position: static; transform: none; background: none; box-shadow: none; padding: 0; }
.sw { display: flex; flex-wrap: wrap; gap: 2px; }
.sw button { appearance: none; border: 0; cursor: pointer; min-width: 36px; height: 36px; font: inherit; font-size: 18px; background: var(--snow); box-shadow: var(--frame-thin); margin: 3px; padding: 0 6px; }
.sw button.col { width: 32px; min-width: 32px; height: 32px; }
.sw button[aria-pressed="true"] { outline: 4px solid var(--gold); outline-offset: 2px; }
.sw.sm-styles button { font-size: 14px; }

/* ---------- Werkstätten: Tages-Bestenliste ---------- */
.game-row { grid-template-columns: 44px 1fr auto; }
.best { grid-column: 1 / 4; margin: 6px 0 0; padding: 0 0 0 22px; font-size: 13.5px; columns: 2; column-gap: 18px; }
.best li { display: flex; justify-content: space-between; gap: 8px; break-inside: avoid; }
.best li.me { color: var(--red-d); font-weight: 700; }
.best.big { columns: 1; font-size: 15px; }

/* ---------- Mini-Timing (Grill, Lagerfeuer) ---------- */
.tg { position: relative; height: 36px; margin: 16px 6px 8px; background: linear-gradient(90deg, #f6efe2, #f2d29a 45%, #d7863a 70%, #6b3a1e); box-shadow: var(--frame-thin); }
.tg-zone { position: absolute; left: 60%; width: 24%; top: -6px; bottom: -6px; box-shadow: 0 0 0 3px var(--gold); }
.tg-mark { position: absolute; top: -10px; bottom: -10px; width: 12px; background: var(--ink); }
.sm-build { display: flex; justify-content: center; align-items: flex-end; gap: 4px; height: 90px; margin: 12px 0; }
.sm-ball { width: 40px; height: 40px; border-radius: 50%; background: var(--snow); box-shadow: 0 0 0 3px var(--ink); opacity: .2; transform: scale(.6); transition: transform .25s steps(3), opacity .25s; }
.sm-ball.b1 { width: 56px; height: 56px; } .sm-ball.b3 { width: 32px; height: 32px; }
.sm-ball.on { opacity: 1; transform: none; }

/* ---------- Fenster über dem Spiel ---------- */
.w-pop { position: absolute; inset: 0; z-index: 20; background: rgba(20, 26, 46, .55); display: grid; place-items: center; padding: 14px; animation: fadeIn .2s steps(3); }
.w-pop-box { width: min(1180px, 100%); height: min(860px, 100%); display: flex; flex-direction: column; background: var(--paper); box-shadow: var(--frame), 0 14px 0 rgba(43, 45, 66, .3); animation: popIn .28s steps(4); }
.w-pop-box header { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 16px; border-bottom: 4px solid var(--ink); }
.w-pop-box header b { flex: 1; font-family: var(--f-pixel); font-size: 22px; }
.w-pop-box iframe { flex: 1; width: 100%; border: 0; background: var(--sky); }

/* ---------- Dorf-Meilenstein ---------- */
.w-mile { position: absolute; inset: 0; z-index: 25; display: grid; place-items: center; background: radial-gradient(circle, rgba(255, 216, 74, .25), rgba(20, 26, 46, .6)); animation: fadeIn .3s steps(3); }
.mile-box { position: relative; width: min(460px, calc(100% - 40px)); text-align: center; background: var(--paper); box-shadow: var(--frame), 0 16px 0 rgba(43, 45, 66, .3); padding: 28px 22px 22px; animation: mileIn .7s cubic-bezier(.2, 1.6, .4, 1); overflow: visible; }
.mile-box h2 { font-size: 26px; margin: 6px 0; }
.mile-icon { font-size: 76px; line-height: 1; margin-top: -70px; filter: drop-shadow(0 4px 0 rgba(43,45,66,.25)); animation: mileHop 1.2s ease-in-out infinite; }
.mile-rays { position: absolute; left: 50%; top: -10px; width: 420px; height: 420px; margin-left: -210px; margin-top: -170px; z-index: -1; background: repeating-conic-gradient(rgba(255, 216, 74, .55) 0 10deg, transparent 10deg 20deg); border-radius: 50%; -webkit-mask: radial-gradient(circle, #000 20%, transparent 70%); mask: radial-gradient(circle, #000 20%, transparent 70%); animation: spin 9s linear infinite; }
.mile-conf { position: absolute; inset: -40px 0 auto; height: 0; pointer-events: none; }
.mile-conf i { position: absolute; left: var(--x); top: 0; width: 8px; height: 12px; background: var(--c); animation: conf 2.2s var(--d) ease-in infinite; }
@keyframes mileIn { from { transform: scale(.2) rotate(-8deg); opacity: 0; } }
@keyframes mileHop { 50% { transform: translateY(-10px) rotate(4deg); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes conf { 0% { transform: translateY(0) rotate(0); opacity: 1; } 100% { transform: translateY(520px) rotate(540deg); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .mile-rays, .mile-icon, .mile-conf i, .bub { animation: none; } }

@media (max-width: 760px) {
  .w-day { display: none; }
  .w-actions { bottom: 170px; right: 8px; flex-direction: column; }
  .w-act b { display: none; }
  .w-act { min-width: 0; padding: 6px; }
  .w-emotes { bottom: 170px; right: 80px; grid-template-columns: repeat(4, 46px); }
  .w-roombar { top: 8px; flex-wrap: wrap; justify-content: center; }
  .w-say { bottom: 220px; }
  .w-pop { padding: 0; }
  .w-pop-box { height: 100%; }
}
.w-pop-box { position: relative; }
.w-pop.loading .w-pop-box::after { content: "Lädt …"; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-family: var(--f-pixel); font-size: 22px; color: var(--ink-soft); }
.w-pop.loading iframe { opacity: 0; }
body.pop-open .chat-fab, body.pop-open .chat-pop { display: none !important; }

/* Live-Dorf */
.lbl.live { background: #fffaf0; border-color: var(--ink, #2b2d42); font-weight: 700; }
.w-online { position: fixed; z-index: 30; bottom: 34px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 7px;
  padding: 5px 12px; border: 2px solid #2b2d42; border-radius: 999px; background: rgba(255, 250, 240, .92); color: #2b2d42; font: 700 13px/1.2 'Atkinson Hyperlegible', system-ui, sans-serif; box-shadow: 0 2px 0 #2b2d42; }
.w-online i { width: 9px; height: 9px; border-radius: 50%; background: #34c46a; box-shadow: 0 0 0 2px rgba(52, 196, 106, .3); }
.w-online.off i { background: #e0453a; box-shadow: 0 0 0 2px rgba(224, 69, 58, .3); animation: wd-blink 1s steps(2) infinite; }
@keyframes wd-blink { 50% { opacity: .3; } }

/* Schnellreise unter der Karte */
.w-travel { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; margin-top: 6px; }
.w-travel button { appearance: none; border: 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 4px 2px; background: var(--snow); color: var(--text); box-shadow: 0 0 0 2px var(--ink); margin: 2px; font: 700 11px/1.1 'Atkinson Hyperlegible', system-ui, sans-serif; }
.w-travel button span { font-size: 18px; line-height: 1; }
.w-travel button:hover { background: var(--gold); transform: translateY(-1px); }
.w-tool[hidden] { display: none !important; }

/* Bauschild: Ressourcen gespendet/benötigt */
.lbl .rsign { display: flex; flex-wrap: wrap; gap: 2px 6px; justify-content: center; margin-top: 3px; max-width: 220px; white-space: normal; }
.lbl .rs { display: inline-flex; align-items: center; gap: 2px; font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.lbl .rs img, .lbl .rs svg { width: 14px; height: 14px; }
.lbl .rs.ok { color: #1f8a4c; }
/* helle Schilder bleiben auch nachts lesbar */
/* Labels mit fest hellem Grund: Schrift immer dunkel – auch im Darkmode lesbar */
.lbl:is(.free, .proj, .me, .live, .price, .game, .fun) { color: #2b2d42; }
.lbl:is(.free, .proj, .me, .live, .price, .game, .fun) small { color: #4a5070; }

/* Icon-Knöpfe ohne Text (neue Pixel-Icons) */
.ico-img { display: block; image-rendering: pixelated; pointer-events: none; }
.w-tools { flex-direction: row; flex-wrap: wrap; gap: 4px; }
.w-tools .w-find { flex-basis: 100%; }
.w-tool { width: 52px; height: 52px; padding: 0; justify-content: center; }
.w-tool .ico-img { width: 38px; height: 38px; }
.w-tool span { font-size: 26px; width: auto; }
.w-act { min-width: 0; width: 58px; height: 58px; padding: 0; justify-content: center; }
.w-act .ico-img { width: 42px; height: 42px; }
.w-travel button { padding: 3px 2px; justify-content: center; min-height: 36px; }
.w-travel button .ico-img { width: 28px; height: 28px; }
.w-travel button span { font-size: 22px; }
@media (max-width: 760px) {
  .w-tools { flex-direction: column; }
  .w-tool { width: 46px; height: 46px; }
  .w-tool .ico-img { width: 32px; height: 32px; }
  .w-act { width: 50px; height: 50px; }
  .w-act .ico-img { width: 36px; height: 36px; }
}

/* ---------- Aufgeräumtes Dorf-HUD ---------- */
/* Werkzeuge links: am Rand, untereinander */
.w-left { left: max(6px, env(safe-area-inset-left)); }
.w-tools { flex-direction: column; flex-wrap: nowrap; align-items: flex-start; gap: 2px; }
.w-tool { margin: 3px 4px; }
/* Wetter nur noch Anzeige */
.w-weather { cursor: default; }
/* Schnellreise: 4 Ziele in einer Reihe, darunter „Wen besuchen?“ */
.w-travel { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.w-map .w-find { display: flex; margin: 8px 2px 2px; padding: 0; background: none; box-shadow: none; gap: 4px; max-width: 220px; }
.w-find select { flex: 1; min-width: 0; font: inherit; font-size: 14px; font-weight: 700; padding: 5px 6px; color: var(--text); background: var(--snow); border: 0; box-shadow: 0 0 0 2px var(--ink); margin: 2px; cursor: pointer; }
.w-find select:disabled { opacity: .6; cursor: default; }
/* Zuhause: Knöpfe und Innenraum-Leiste unten in der Mitte */
.w-homebar { position: absolute; left: 50%; bottom: 74px; transform: translateX(-50%); z-index: 6; display: flex; gap: 6px; }
.w-homebar[hidden] { display: none; }
.w-roombar { top: auto; bottom: 74px; }
/* Level- und Dorf-Fortschritt ganz unten, je 5 px */
.w-xp { position: absolute; left: 0; right: 0; bottom: 0; z-index: 7; display: flex; flex-direction: column; }
.w-xp-bar { height: 5px; background: rgba(43, 45, 66, .55); position: relative; }
.w-xp-bar i { position: absolute; inset: 0 auto 0 0; width: calc(var(--p, 0) * 1%); background: var(--gold); transition: width .6s steps(12); }
.w-xp-bar.dorf i { background: var(--green); }
.w-xp-bar:hover { filter: brightness(1.2); }
.w-help { bottom: 16px; }
@media (max-width: 760px) {
  .w-map .w-find { max-width: 116px; }
  .w-find select { font-size: 12px; }
}
.w-travel button.pulse { animation: wPulse 1.2s steps(6) infinite; }
.w-up { position: absolute; right: -6px; top: -8px; font-style: normal; font-size: 13px; font-weight: 800; line-height: 20px; width: 22px; height: 22px; text-align: center; background: var(--green); color: #fff; box-shadow: var(--frame-thin); }
/* Darkmode: weitere Elemente mit festem hellen Grund */
html[data-theme="dark"] :is(.w-card.mine, .bub.me) { color: #2b2d42; }
html[data-theme="dark"] :is(.w-card.mine, .bub.me) :is(small, .meta, .muted) { color: #4a5070; }

/* ---------- Laden: Waren-Vorschau (drehbares 3D-Modell) ---------- */
.shop-pv-back { z-index: 70; }
.modal.shop-pv { width: min(860px, calc(100% - 8px)); padding: 18px 18px 12px; position: relative; display: flex; flex-direction: column; gap: 12px; }
.shop-pv .pv-x { position: absolute; top: 8px; right: 10px; border: 0; background: none; font: inherit; font-size: 20px; font-weight: 700; color: var(--text); cursor: pointer; z-index: 2; padding: 4px 8px; }
.shop-pv .pv-main { display: grid; grid-template-columns: 1.25fr 1fr; gap: 18px; align-items: stretch; }
.shop-pv .pv-stage { position: relative; min-height: 320px; aspect-ratio: 1 / 0.9; background: radial-gradient(circle at 50% 42%, #fff6dc 0, #f2e2c4 45%, #d9c3a0 100%); box-shadow: var(--frame-thin); overflow: hidden; }
.shop-pv .pv-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; touch-action: none; }
.shop-pv .pv-stage canvas:active { cursor: grabbing; }
.shop-pv .pv-hint { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); font-size: 12px; font-weight: 700; color: #5b4a30; background: rgba(255, 250, 240, .85); padding: 2px 8px; pointer-events: none; z-index: 1; }
.shop-pv .pv-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 1; width: 36px; height: 48px; border: 0; font: inherit; font-size: 28px; font-weight: 700; line-height: 1; color: #2b2d42; background: rgba(255, 250, 240, .9); box-shadow: var(--frame-thin); cursor: pointer; }
.shop-pv .pv-nav.prev { left: 8px; } .shop-pv .pv-nav.next { right: 8px; }
.shop-pv .pv-nav:hover { background: #ffd84a; }
.shop-pv .pv-info { display: flex; flex-direction: column; gap: 8px; padding-right: 22px; }
.shop-pv .pv-name { margin: 0; font-size: 24px; line-height: 1.15; }
.shop-pv .pv-tags { display: flex; flex-wrap: wrap; gap: 4px; min-height: 4px; }
.shop-pv .pv-desc { margin: 0; color: var(--ink-soft); }
.shop-pv .pv-price { font-size: 22px; display: flex; align-items: center; gap: 6px; margin-top: auto; }
.shop-pv .pv-price s { font-size: 15px; }
.shop-pv .pv-buy { font-size: 18px; padding: 10px 14px; }
.shop-pv .pv-buy.pop { animation: popIn .32s steps(4); }
.shop-pv .pv-note { margin: 0; min-height: 1.2em; }
.shop-pv .pv-strip { display: flex; gap: 6px; overflow-x: auto; padding: 6px 4px 8px; scroll-snap-type: x proximity; }
.shop-pv .pv-th { flex: 0 0 auto; width: 74px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 2px 3px; border: 0; font: inherit; background: var(--snow, #fffaf0); color: var(--text); box-shadow: var(--frame-thin); cursor: pointer; scroll-snap-align: center; }
.shop-pv .pv-th img { width: 56px; height: 56px; object-fit: contain; image-rendering: pixelated; }
.shop-pv .pv-th span { font-size: 11.5px; font-weight: 700; }
.shop-pv .pv-th.offer { background: #fff3c4; color: #2b2d42; }
.shop-pv .pv-th:hover { transform: translateY(-2px); }
.shop-pv .pv-th.on { background: #ffd84a; color: #2b2d42; box-shadow: 0 -3px 0 0 #2b2d42, 0 3px 0 0 #2b2d42, -3px 0 0 0 #2b2d42, 3px 0 0 0 #2b2d42, 0 6px 0 0 rgba(43, 45, 66, .25); }
.shop-pv .pv-foot { margin: 0; text-align: center; }
@media (max-width: 640px) {
  .shop-pv .pv-main { grid-template-columns: 1fr; }
  .shop-pv .pv-stage { min-height: 240px; aspect-ratio: 1 / 0.8; }
  .shop-pv .pv-info { padding-right: 0; }
}

/* Content-Museum: Tafel „Heute“, Bau-Modal, Kuratorin */
.w-mu { display: flex; gap: 10px; align-items: flex-start; width: 100%; text-align: left; border: 0; background: #f4ecff; color: var(--text); box-shadow: var(--frame-thin); margin: 3px 3px 10px; padding: 8px 10px; font: inherit; cursor: pointer; }
.w-mu:hover { background: #ebdeff; }
.w-mu .ic { font-size: 24px; line-height: 1; }
.w-mu .tx { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.w-mu b { font-size: 14px; }
.w-mu small { font-size: 12.5px; color: var(--ink-soft); line-height: 1.3; }
.w-mu .bar { display: block; height: 7px; background: #d9d2c4; margin: 3px 0 1px; }
.w-mu .bar i { display: block; height: 100%; width: calc(var(--p) * 1%); background: var(--fill, var(--green)); }
html[data-theme="dark"] .w-mu { background: #3a3157; color: #fff; }
.mu-steps { display: grid; grid-template-columns: repeat(17, 1fr); gap: 3px; margin: 10px 0 6px; }
.mu-steps i { height: 12px; background: #e3dccd; box-shadow: 0 0 0 1px rgba(43,45,66,.25) inset; }
.mu-steps i.ok { background: #6d4c8a; }
.mu-steps i.now { background: var(--gold); animation: muNow 1s steps(2) infinite; }
@keyframes muNow { 50% { opacity: .45; } }
.mu-h { font-size: 18px; margin: 12px 0 6px; }
.mu-note { background: var(--paper-2); box-shadow: var(--frame-thin); padding: 8px 10px; margin: 10px 3px; font-weight: 700; }
.mu-list { list-style: none; padding: 0; margin: 10px 0; display: flex; flex-direction: column; gap: 6px; }
.mu-list li { display: grid; grid-template-columns: 32px 1fr auto; grid-template-rows: auto auto; column-gap: 8px; align-items: center; background: var(--snow); box-shadow: var(--frame-thin); padding: 6px 10px; margin: 3px; }
.mu-list .ic { grid-row: 1 / 3; font-size: 24px; text-align: center; }
.mu-list small { grid-column: 2; color: var(--ink-soft); font-size: 12.5px; }
.mu-list em, .mu-list button { grid-column: 3; grid-row: 1 / 3; font-style: normal; font-size: 13px; color: var(--ink-soft); }
.mu-rooms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 12px 0 6px; }
.mu-rooms div { display: flex; flex-direction: column; align-items: center; background: var(--sky-2); box-shadow: var(--frame-thin); margin: 3px; padding: 6px 4px; text-align: center; }
.mu-rooms div.full { background: #e1f4e4; }
.mu-rooms div.off { opacity: .5; }
.mu-rooms span { font-size: 22px; line-height: 1.1; }
.mu-rooms b { font-size: 12.5px; }
.mu-rooms small { font-size: 12px; color: var(--ink-soft); }
@media (prefers-reduced-motion: reduce) { .mu-steps i.now { animation: none; } }
