:root{
    --bg:#1a100b;
    --bg2:#24160f;
    --panel:#2b1b13;
    --panel2:#342219;
    --panel3:#20140f;
    --line:#5a3d2d;
    --line2:#74533a;
    --text:#f0e5d7;
    --muted:#baa997;
    --accent:#d8aa63;
    --accent2:#f0c982;
    --danger:#783d35;
    --green:#7f9b70;
}
*{box-sizing:border-box}
body{
    margin:0;
    min-height:100vh;
    color:var(--text);
    font:16px/1.45 system-ui,-apple-system,Segoe UI,Roboto,sans-serif;
    background:
      radial-gradient(circle at 55% -10%,#5b3822 0,transparent 35%),
      linear-gradient(180deg,var(--bg2),var(--bg));
}
button,input{font:inherit}
button{cursor:pointer}
.topbar{
    min-height:76px;padding:12px 22px;border-bottom:1px solid var(--line);
    display:flex;align-items:center;justify-content:space-between;
    background:#1c110bea;position:sticky;top:0;z-index:3;
    box-shadow:0 10px 30px #0006
}
.topbar h1{margin:0;font-size:24px;letter-spacing:.08em}
.subtitle,.kicker,.muted,.tiny{color:var(--muted)}
.top-status{display:flex;gap:16px;align-items:center}
#clock{font-variant-numeric:tabular-nums;color:var(--accent2);font-weight:700}
.game-shell{display:grid;grid-template-columns:260px minmax(500px,1fr) 310px;gap:14px;padding:14px;max-width:1700px;margin:auto}
.panel{
    background:linear-gradient(180deg,#302016,#24170f);
    border:1px solid var(--line);
    border-radius:14px;
    box-shadow:0 18px 50px #0005,inset 0 1px #ffffff08
}
.sidebar,.rightbar{padding:14px;align-self:start;position:sticky;top:90px}
.sidebar h2,.sidebar h3,.rightbar h2,.rightbar h3{margin:6px 0 10px}
.player-card{
    padding:12px;background:var(--panel3);border:1px solid var(--line);
    border-radius:10px;display:flex;flex-direction:column;margin-bottom:12px
}
.name-form label{font-size:12px;color:var(--muted)}
.inline{display:flex;gap:6px}
input{
    width:100%;background:#160e0a;border:1px solid var(--line);border-radius:8px;
    color:var(--text);padding:9px 10px
}
button{
    background:#3a281d;color:var(--text);border:1px solid var(--line2);
    border-radius:8px;padding:8px 11px
}
button:hover{filter:brightness(1.15)}
.location-list{display:grid;gap:7px}
.location-btn{text-align:left;width:100%}
.location-btn.active{border-color:var(--accent);color:#ffe1aa;background:#4a3120}
.center-column{display:grid;gap:14px}
.scene-card{border-radius:14px;overflow:hidden;border:1px solid var(--line);box-shadow:0 18px 50px #0005}
.scene{min-height:390px;display:flex;align-items:end;background-size:cover;background-position:center;position:relative}
.scene::before{content:"";position:absolute;inset:0;opacity:.9}
.scene-kneipe::before{
    background:
    radial-gradient(circle at 72% 30%,#b86d2d66,transparent 20%),
    radial-gradient(circle at 35% 45%,#8c4d2550,transparent 30%),
    linear-gradient(135deg,#5c3924,#29170f 62%,#130c09)
}
.scene-bahnhof::before{
    background:
    linear-gradient(0deg,#17100be8,transparent 50%),
    repeating-linear-gradient(90deg,#34261e 0 70px,#4c3829 70px 74px),
    linear-gradient(135deg,#594331,#231811)
}
.scene-park::before{
    background:
    radial-gradient(circle at 50% 28%,#4b5a33 0 13%,transparent 32%),
    radial-gradient(circle at 50% 52%,#2b3d24 0 12%,transparent 32%),
    linear-gradient(135deg,#41321f,#17140d)
}
.scene-overlay{width:100%;padding:28px;background:linear-gradient(0deg,#120b07ef,transparent);position:relative;z-index:1}
.scene-overlay h2{font-size:34px;margin:4px 0 8px}
.action-panel,.conversation-panel{padding:14px}
.panel-head{display:flex;align-items:center;justify-content:space-between;gap:10px}
.panel-head h2{margin:0}
.actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.action-btn{background:#422d20}
.conversation-panel{min-height:310px}
.tabs{display:flex;gap:6px}
.tab.active{border-color:var(--accent);color:#ffe1a7;background:#49321f}
.conversation-log,.chat-log{
    min-height:220px;max-height:360px;overflow:auto;padding:12px;margin-top:12px;
    background:#160e0a;border:1px solid var(--line);border-radius:10px
}
.chat-line{margin:0 0 7px}
.chat-line time{color:var(--muted);font-size:12px;margin-right:8px}
.chat-form{display:flex;gap:8px;margin-top:8px}
.hidden{display:none!important}
.npc-list,.clue-list{display:grid;gap:8px}
.npc-card,.clue-card,.history-card,.facts{
    padding:10px;border-radius:10px;background:#1d120d;border:1px solid var(--line)
}
.npc-card button{width:100%;text-align:left;margin-top:7px}
.facts{white-space:pre-line}
.danger-btn{width:100%;margin-top:14px;background:#4a2420;border-color:#8a4b41}
.tiny{font-size:12px}
.topic-row{display:flex;flex-wrap:wrap;gap:7px;margin-top:12px}
.topic-btn{background:#39251a;color:#f1d8b0}
.doc-card{margin-top:12px;border:1px solid var(--line2);background:#e7d7ba;color:#2c2118;border-radius:8px;padding:12px;box-shadow:inset 0 0 30px #8f714035}
.doc-card h3{margin:0 0 8px}
.doc-card table{width:100%;border-collapse:collapse;font-size:14px}
.doc-card th,.doc-card td{border-bottom:1px solid #9d8869;padding:6px;text-align:left}
.doc-note{margin:9px 0 0;font-style:italic}
.mini-wrap{margin-top:10px;padding:12px;border:1px solid var(--line);border-radius:10px;background:#120b08}
.scoreline{display:flex;justify-content:space-between;gap:12px;margin-bottom:9px}
.darts-track{height:48px;border:1px solid var(--line2);border-radius:8px;position:relative;overflow:hidden;background:linear-gradient(90deg,#51281d,#7e4e25,#bc8a43,#e8c67f,#bc8a43,#7e4e25,#51281d)}
.darts-marker{position:absolute;top:0;width:8px;height:100%;background:#fff6d2;box-shadow:0 0 12px #fff}
.big-action{width:100%;margin-top:10px;background:#604226;border-color:#d0a05d;font-weight:700}
canvas.flipper{width:100%;max-width:720px;height:300px;background:#120b08;border:1px solid var(--line2);border-radius:10px;display:block}
.flipper-controls{display:flex;gap:8px;margin-top:8px}
.flipper-controls button{flex:1}
.stone-layout{height:160px;position:relative;margin:12px 0;border:1px dashed var(--line2);border-radius:10px;background:#17100b}
.stone{position:absolute;width:34px;height:24px;background:#897966;border-radius:45%;border:1px solid #b8aa96;box-shadow:0 4px 8px #0008}
.history-shift{border-left:3px solid var(--accent);padding-left:10px}
@media(max-width:1100px){
    .game-shell{grid-template-columns:210px 1fr}
    .rightbar{grid-column:1/-1;position:static;display:grid;grid-template-columns:1fr 1fr;gap:12px}
}
@media(max-width:760px){
    .game-shell{display:block;padding:8px}
    .sidebar,.rightbar{position:static;margin-bottom:10px}
    .center-column{display:block}
    .scene-card,.action-panel,.conversation-panel{margin-bottom:10px}
    .scene{min-height:300px}
    .topbar{position:static}
}


/* =========================================================
   Echte Szenenbilder – Demo v0.3
   ========================================================= */

.scene-kneipe {
    background-image: url("images/kneipe.webp");
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
}

.scene-bahnhof {
    background-image: url("images/bahnhof.webp");
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
}

.scene-park {
    background-image: url("images/stadtpark.webp");
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
}

/* Nur noch eine leichte Abdunklung über dem echten Bild */
.scene-kneipe::before,
.scene-bahnhof::before,
.scene-park::before {
    background: linear-gradient(
        0deg,
        rgba(22, 12, 7, 0.72) 0%,
        rgba(22, 12, 7, 0.18) 55%,
        rgba(22, 12, 7, 0.08) 100%
    );
    opacity: 1;
    pointer-events: none;
}


/* =========================================================
   Klickbare Stadtkarte – Demo v0.4
   ========================================================= */
.mini-map-card{
    margin-bottom:14px;
}
.mini-map-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    margin-bottom:8px;
}
.mini-map-head h2{margin:0}
.map-open-btn{
    padding:5px 9px;
    font-size:13px;
}
.mini-map,
.large-map{
    position:relative;
    overflow:hidden;
    border:1px solid var(--line2);
    border-radius:10px;
    background:
      radial-gradient(circle at 76% 20%,#516039 0 13%,transparent 14%),
      radial-gradient(circle at 18% 78%,#3a4b2d 0 17%,transparent 18%),
      linear-gradient(135deg,#65513a 0 24%,#4c3a2b 24% 46%,#5b4734 46% 100%);
    box-shadow:inset 0 0 32px #0008;
}
.mini-map{
    height:210px;
    cursor:zoom-in;
}
.large-map{
    height:min(70vh,720px);
    min-height:460px;
}
.map-road{
    position:absolute;
    background:#b9a37f;
    border:1px solid #d8c49f;
    opacity:.72;
    box-shadow:0 0 0 1px #4d3c2d55;
}
.road-a{
    width:125%;
    height:14px;
    left:-12%;
    top:48%;
    transform:rotate(-12deg);
}
.road-b{
    width:14px;
    height:120%;
    left:47%;
    top:-10%;
    transform:rotate(13deg);
}
.road-c{
    width:90%;
    height:11px;
    left:5%;
    top:73%;
    transform:rotate(7deg);
}
.map-water{
    position:absolute;
    width:38%;
    height:24%;
    left:-8%;
    top:8%;
    border-radius:45%;
    background:#314d56;
    opacity:.8;
    transform:rotate(-12deg);
    box-shadow:inset 0 0 18px #10242b;
}
.map-park-area{
    position:absolute;
    width:26%;
    height:28%;
    right:9%;
    bottom:8%;
    border-radius:46% 54% 38% 62%;
    background:#435533;
    opacity:.8;
}
.map-markers{
    position:absolute;
    inset:0;
}
.map-marker{
    position:absolute;
    transform:translate(-50%,-50%);
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:3px;
    border:0;
    background:transparent;
    padding:0;
    color:var(--text);
    z-index:3;
}
.map-marker-pin{
    width:28px;
    height:28px;
    border-radius:50% 50% 50% 0;
    transform:rotate(-45deg);
    background:#d6a354;
    border:2px solid #f4d49b;
    box-shadow:0 4px 10px #0009;
    position:relative;
}
.map-marker-pin::after{
    content:"";
    position:absolute;
    width:8px;
    height:8px;
    border-radius:50%;
    background:#2a1a11;
    left:8px;
    top:8px;
}
.map-marker-label{
    max-width:112px;
    padding:3px 6px;
    border-radius:6px;
    background:#1b110bd9;
    border:1px solid #6a4a33;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
    font-size:11px;
    box-shadow:0 3px 8px #0008;
}
.map-marker:hover .map-marker-label{
    background:#3d291b;
    color:#ffe0a7;
}
.map-marker.current .map-marker-pin{
    background:#d66c42;
    border-color:#ffd0ae;
    animation:mapPulse 1.5s infinite;
}
.map-marker.current .map-marker-label{
    border-color:#d99a67;
    color:#ffe0c5;
}
@keyframes mapPulse{
    0%,100%{box-shadow:0 4px 10px #0009,0 0 0 0 #d66c4266}
    50%{box-shadow:0 4px 10px #0009,0 0 0 9px #d66c4200}
}
.map-modal{
    position:fixed;
    inset:0;
    z-index:50;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:28px;
    background:#0d0805dd;
    backdrop-filter:blur(4px);
}
.map-modal-panel{
    width:min(1120px,96vw);
    max-height:94vh;
    overflow:auto;
    padding:18px;
    border:1px solid var(--line2);
    border-radius:16px;
    background:linear-gradient(180deg,#302016,#1d120c);
    box-shadow:0 28px 90px #000c;
}
.map-modal-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    margin-bottom:12px;
}
.map-modal-head h2{margin:0}
.map-help{margin-bottom:0}
@media(max-width:760px){
    .mini-map{height:180px}
    .large-map{min-height:400px;height:65vh}
    .map-modal{padding:8px}
    .map-marker-label{display:none}
}


/* =========================================================
   Schwarzes Brett – Demo v0.5
   ========================================================= */
.board-shortcut{
    margin:14px 0 18px;
    padding:12px;
    border:1px solid var(--line);
    border-radius:12px;
    background:
      linear-gradient(180deg,#2e1d13,#1d120c);
}
.board-shortcut-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
}
.board-shortcut-head h2{margin:0}
.board-count{
    min-width:30px;
    height:30px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border-radius:999px;
    background:#6a482d;
    border:1px solid #a9794c;
    color:#ffe1ad;
    font-weight:700;
}
.board-modal{
    position:fixed;
    inset:0;
    z-index:60;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:22px;
    background:#0d0805e8;
    backdrop-filter:blur(4px);
}
.board-modal-panel{
    width:min(1320px,97vw);
    max-height:94vh;
    overflow:auto;
    padding:18px;
    border:1px solid var(--line2);
    border-radius:16px;
    background:linear-gradient(180deg,#332117,#1d120c);
    box-shadow:0 28px 90px #000d;
}
.board-modal-head,
.board-feed-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
}
.board-modal-head{margin-bottom:14px}
.board-modal-head h2,
.board-feed-head h3{margin:0}
.board-layout{
    display:grid;
    grid-template-columns:minmax(280px,360px) 1fr;
    gap:16px;
}
.board-compose,
.board-feed{
    border:1px solid var(--line);
    border-radius:12px;
    background:#1a100b;
    padding:14px;
}
.board-compose h3{margin-top:0}
.board-compose label{
    display:block;
    margin:11px 0 5px;
    color:#d9c7b3;
    font-size:13px;
}
.board-compose select,
.board-compose textarea,
.board-filter-row select,
.board-reply-form textarea{
    width:100%;
    background:#110a07;
    color:var(--text);
    border:1px solid var(--line);
    border-radius:8px;
    padding:9px 10px;
    font:inherit;
}
.board-compose textarea,
.board-reply-form textarea{
    resize:vertical;
    min-height:100px;
}
.board-check{
    display:flex!important;
    align-items:center;
    gap:8px;
}
.board-check input{
    width:auto;
}
.board-filter-row{
    display:flex;
    gap:8px;
    align-items:center;
}
.board-filter-row select{width:auto}
.board-feed-list{
    display:grid;
    gap:10px;
    margin-top:12px;
}
.board-post{
    padding:13px;
    border-radius:10px;
    border:1px solid var(--line);
    background:#24170f;
    border-left-width:4px;
}
.board-type-frage{border-left-color:#c69d62}
.board-type-entdeckung{border-left-color:#789a6e}
.board-type-theorie{border-left-color:#8b78a6}
.board-type-hilfe{border-left-color:#a96b57}
.board-post-top,
.board-post-bottom{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
}
.board-post h4,
.board-post h3{
    margin:8px 0 2px;
}
.board-badge{
    display:inline-flex;
    align-items:center;
    border:1px solid #74533a;
    border-radius:999px;
    padding:3px 8px;
    background:#382419;
    color:#f2d7aa;
    font-size:12px;
    font-weight:700;
}
.board-date,
.board-author,
.board-meta{
    color:var(--muted);
    font-size:12px;
}
.board-post p{
    white-space:pre-wrap;
}
.board-meta{
    padding:7px 9px;
    border:1px dashed #70523b;
    border-radius:7px;
    background:#1a100b;
    margin:8px 0;
}
.board-post-bottom{
    margin-top:9px;
    padding-top:8px;
    border-top:1px solid #513825;
}
.board-open-post{
    padding:6px 10px;
}
.board-post-detail{
    margin-bottom:12px;
}
.board-post-detail #boardBack{
    margin-bottom:10px;
}
.board-replies{
    display:grid;
    gap:9px;
}
.board-replies h4{margin-bottom:0}
.board-reply{
    border:1px solid var(--line);
    border-radius:9px;
    background:#20140e;
    padding:10px;
}
.board-reply p{
    margin-bottom:0;
    white-space:pre-wrap;
}
.board-reply-form{
    margin-top:14px;
    padding-top:12px;
    border-top:1px solid var(--line);
}
.board-empty{
    text-align:center;
    padding:40px 20px;
    border:1px dashed var(--line);
    border-radius:10px;
    color:var(--muted);
}
.board-error{color:#e69a8d}
@media(max-width:900px){
    .board-layout{grid-template-columns:1fr}
}
@media(max-width:760px){
    .board-modal{padding:6px}
    .board-filter-row{align-items:stretch;flex-direction:column}
    .board-filter-row select{width:100%}
}


/* Schwarzes Brett – Reparatur v0.5.1 */
.board-form-status{
    display:block;
    min-height:24px;
    margin:10px 0 0;
    padding:7px 9px;
    border-radius:7px;
    font-size:13px;
    color:var(--muted);
}
.board-form-status.working{
    background:#342719;
    border:1px solid #755a36;
    color:#f0cf91;
}
.board-form-status.success{
    background:#26331f;
    border:1px solid #5f8053;
    color:#cbe7bd;
}
.board-form-status.error{
    background:#44201d;
    border:1px solid #8d4d45;
    color:#ffc2b9;
}
#boardSubmit:disabled{
    opacity:.55;
    cursor:wait;
}


/* Schwarzes Brett Verwaltung – v0.6 */
.board-badges{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.board-status{
    display:inline-flex;align-items:center;border-radius:999px;padding:3px 8px;
    font-size:11px;font-weight:700;border:1px solid var(--line2)
}
.board-status.resolved{background:#24311f;color:#cbe6bd;border-color:#547046}
.board-status.archived{background:#292421;color:#bbb0a6;border-color:#5c5148}
.board-status.own{background:#43311d;color:#f1cf91;border-color:#86643e}
.board-owner-controls{display:flex;flex-wrap:wrap;gap:7px;margin-top:12px;padding-top:10px;border-top:1px solid var(--line)}
.danger-small{background:#552824!important;border-color:#98564c!important}
.board-edit-box{margin-top:12px;padding:12px;border:1px solid var(--line2);border-radius:9px;background:#170e09}
.board-edit-box label{display:block;margin:8px 0 4px;color:#d9c7b3;font-size:13px}
.board-edit-box select,.board-edit-box textarea,.board-edit-box input{
    width:100%;background:#100906;color:var(--text);border:1px solid var(--line);
    border-radius:8px;padding:9px;font:inherit
}


/* =========================================================
   Layout + Notizbuch + Inventar – v0.7
   ========================================================= */

/* Wichtig: Die mittlere Grid-Spalte wird nicht mehr auf die Höhe
   der längeren Seitenleisten auseinandergezogen. */
.center-column{
    align-content:start;
    grid-auto-rows:max-content;
}
.scene-card,
.action-panel,
.conversation-panel{
    align-self:start;
}
.action-panel{
    min-height:0;
}
.actions{
    margin-bottom:0;
}
.scene-card{
    min-height:0;
}

/* Kompakte Seitenwerkzeuge */
.side-tools{
    display:grid;
    gap:9px;
    margin-top:14px;
}
.side-book{
    width:100%;
    min-height:68px;
    padding:10px 11px;
    display:grid;
    grid-template-columns:42px 1fr 18px;
    gap:9px;
    align-items:center;
    text-align:left;
    border:1px solid var(--line2);
    background:linear-gradient(135deg,#3b271a,#21140d);
    box-shadow:inset 0 1px #ffffff0a,0 5px 16px #0003;
}
.side-book:hover{
    background:linear-gradient(135deg,#49311f,#28180f);
    border-color:var(--accent);
}
.side-book-icon{
    width:42px;
    height:42px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:8px;
    background:#160d08;
    border:1px solid #65462f;
    font-size:24px;
}
.side-book-copy{
    min-width:0;
    display:flex;
    flex-direction:column;
}
.side-book-copy strong{
    color:#f2e5d5;
}
.side-book-copy small{
    color:var(--muted);
    margin-top:2px;
}
.side-book-arrow{
    font-size:28px;
    color:var(--accent);
}
.side-book-notebook{
    border-left:4px solid #a17a49;
}
.side-book-inventory{
    border-left:4px solid #786342;
}

/* Gemeinsame große Buch-/Inventarfenster */
.book-modal{
    position:fixed;
    inset:0;
    z-index:65;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:22px;
    background:#0d0805e8;
    backdrop-filter:blur(5px);
}
.book-modal-panel{
    width:min(1180px,96vw);
    max-height:92vh;
    overflow:auto;
    padding:20px;
    border:1px solid var(--line2);
    border-radius:16px;
    box-shadow:0 30px 100px #000d;
}
.book-modal-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    padding-bottom:12px;
    margin-bottom:14px;
    border-bottom:1px solid #70513a;
}
.book-modal-head h2{
    margin:0;
}
.book-tabs,
.inventory-tabs{
    display:flex;
    flex-wrap:wrap;
    gap:7px;
    margin-bottom:14px;
}
.book-tab.active,
.inventory-tab.active{
    border-color:var(--accent);
    background:#573a23;
    color:#ffe0aa;
}

/* Notizbuch */
.notebook-paper{
    position:relative;
    color:#352719;
    background:
      repeating-linear-gradient(
        0deg,
        rgba(105,80,45,.08) 0,
        rgba(105,80,45,.08) 1px,
        transparent 1px,
        transparent 31px
      ),
      linear-gradient(90deg,#e0c9a2 0,#f0dfbd 4%,#ead5ae 50%,#f0dfbd 96%,#d7bd94 100%);
}
.notebook-paper::before{
    content:"";
    position:absolute;
    top:0;bottom:0;left:50%;
    width:2px;
    background:#8b704d33;
    box-shadow:0 0 14px #6b4a2b33;
}
.notebook-paper .kicker{
    color:#776145;
}
.notebook-paper .book-modal-head{
    border-color:#a68b65;
}
.notebook-paper button{
    background:#735435;
    color:#f8eacc;
    border-color:#9c7a50;
}
.notebook-entries{
    position:relative;
    z-index:1;
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:14px 32px;
    padding:8px 18px 20px;
}
.notebook-entry{
    display:grid;
    grid-template-columns:44px 1fr;
    gap:10px;
    padding:12px 8px;
    border-bottom:1px solid #9f866055;
}
.notebook-entry-number{
    width:38px;height:38px;
    display:flex;align-items:center;justify-content:center;
    border-radius:50%;
    border:1px solid #8e724e;
    font-family:Georgia,serif;
    color:#6c5436;
}
.notebook-entry h3{
    margin:0 0 5px;
    font-family:Georgia,serif;
    color:#392919;
}
.notebook-entry p{
    margin:0;
}
.notebook-entry-meta{
    margin-top:7px;
    color:#7b684d;
    font-size:12px;
}
.notebook-empty{
    grid-column:1/-1;
    padding:50px 20px;
    text-align:center;
}

/* Inventar */
.inventory-panel{
    background:linear-gradient(180deg,#302016,#1b110b);
}
.inventory-layout{
    display:grid;
    grid-template-columns:minmax(420px,1.3fr) minmax(260px,.7fr);
    gap:14px;
}
.inventory-grid{
    min-height:360px;
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(145px,1fr));
    align-content:start;
    gap:10px;
    padding:12px;
    border:1px solid var(--line);
    border-radius:12px;
    background:#140c08;
}
.inventory-item-card{
    min-height:138px;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:7px;
    text-align:center;
    background:linear-gradient(180deg,#38251a,#24170f);
    border:1px solid #67472f;
}
.inventory-item-card.active{
    border-color:var(--accent);
    box-shadow:0 0 0 2px #d8aa6333;
}
.inventory-item-icon{
    width:58px;height:58px;
    display:flex;align-items:center;justify-content:center;
    border-radius:50%;
    border:1px solid #89613d;
    background:#190f0a;
    color:#d7a85e;
    font-size:30px;
}
.inventory-item-name{
    font-weight:700;
}
.inventory-item-card small{
    color:var(--muted);
}
.inventory-detail{
    min-height:360px;
    padding:18px;
    border:1px solid var(--line);
    border-radius:12px;
    background:#20140e;
}
.inventory-detail-icon{
    width:78px;height:78px;
    display:flex;align-items:center;justify-content:center;
    border-radius:50%;
    border:1px solid #89613d;
    background:#130b07;
    color:#d7a85e;
    font-size:42px;
    margin-bottom:12px;
}
.inventory-detail h3{
    margin:4px 0 10px;
    font-size:24px;
}
.inventory-facts{
    display:grid;
    grid-template-columns:90px 1fr;
    gap:6px 10px;
    margin:18px 0;
    padding-top:12px;
    border-top:1px solid var(--line);
}
.inventory-facts dt{
    color:var(--muted);
}
.inventory-facts dd{
    margin:0;
}
.inventory-actions{
    display:flex;
    flex-wrap:wrap;
    gap:7px;
}
.inventory-actions button:disabled{
    opacity:.45;
    cursor:not-allowed;
}
.inventory-empty{
    grid-column:1/-1;
    padding:70px 20px;
    text-align:center;
    color:var(--muted);
}
.inventory-empty-detail{
    padding:70px 10px;
    text-align:center;
    color:var(--muted);
}

@media(max-width:900px){
    .notebook-entries{
        grid-template-columns:1fr;
    }
    .notebook-paper::before{
        display:none;
    }
    .inventory-layout{
        grid-template-columns:1fr;
    }
}
@media(max-width:760px){
    .book-modal{padding:6px}
    .book-modal-panel{padding:12px}
    .inventory-grid{grid-template-columns:repeat(2,1fr);min-height:260px}
}


/* =========================================================
   Direkte Bildinteraktion – v0.8
   ========================================================= */

.scene-hotspots{
    position:absolute;
    inset:0;
    z-index:2;
    pointer-events:none;
}

/* Der Textblock bleibt darüber gut lesbar, ohne die Hotspots zu verdecken. */
.scene-overlay{
    z-index:3;
    pointer-events:none;
}
.scene-overlay > *{
    pointer-events:auto;
}

.scene-hotspot{
    position:absolute;
    transform:translate(-50%,-50%);
    display:flex;
    align-items:center;
    gap:7px;
    padding:0;
    border:0;
    background:transparent;
    pointer-events:auto;
    color:var(--text);
    z-index:4;
    filter:none;
}
.scene-hotspot:hover{
    filter:none;
}
.scene-hotspot-dot{
    width:36px;
    height:36px;
    flex:0 0 36px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:50%;
    background:rgba(29,17,11,.88);
    border:2px solid rgba(225,178,103,.9);
    color:#f4d6a0;
    font-size:17px;
    font-weight:700;
    box-shadow:
      0 4px 12px rgba(0,0,0,.65),
      0 0 0 5px rgba(216,170,99,.10);
    transition:transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.scene-hotspot-label{
    max-width:0;
    opacity:0;
    overflow:hidden;
    white-space:nowrap;
    padding:0;
    border-radius:7px;
    background:rgba(24,14,9,.94);
    border:0 solid rgba(132,91,55,.9);
    color:#f3e4d2;
    font-size:13px;
    box-shadow:0 5px 16px rgba(0,0,0,.55);
    transition:max-width .20s ease,opacity .15s ease,padding .20s ease,border-width .20s ease;
}
.scene-hotspot:hover .scene-hotspot-dot,
.scene-hotspot:focus-visible .scene-hotspot-dot{
    transform:scale(1.12);
    background:#5c3c24;
    box-shadow:
      0 5px 16px rgba(0,0,0,.75),
      0 0 0 8px rgba(216,170,99,.16);
}
.scene-hotspot:hover .scene-hotspot-label,
.scene-hotspot:focus-visible .scene-hotspot-label{
    max-width:230px;
    opacity:1;
    padding:5px 8px;
    border-width:1px;
}
.scene-hotspot:focus-visible{
    outline:none;
}
.hotspot-npc .scene-hotspot-dot{
    border-color:#d7a85e;
}
.hotspot-inspect .scene-hotspot-dot{
    border-color:#9fb591;
}
.hotspot-action .scene-hotspot-dot{
    border-color:#bf8f66;
}

/* Dezentes Pulsieren nur solange der Mauszeiger nicht über der Szene ist.
   Das macht anklickbare Dinge auffindbar, ohne ständig zu blinken. */
.scene:not(:hover) .scene-hotspot-dot{
    animation:hotspotBreathe 2.8s ease-in-out infinite;
}
.scene:not(:hover) .scene-hotspot:nth-child(2) .scene-hotspot-dot{animation-delay:.35s}
.scene:not(:hover) .scene-hotspot:nth-child(3) .scene-hotspot-dot{animation-delay:.7s}
.scene:not(:hover) .scene-hotspot:nth-child(4) .scene-hotspot-dot{animation-delay:1.05s}

@keyframes hotspotBreathe{
    0%,100%{box-shadow:0 4px 12px rgba(0,0,0,.65),0 0 0 4px rgba(216,170,99,.08)}
    50%{box-shadow:0 4px 12px rgba(0,0,0,.65),0 0 0 9px rgba(216,170,99,.16)}
}

@media(max-width:760px){
    .scene-hotspot-dot{
        width:32px;height:32px;flex-basis:32px;font-size:15px;
    }
    .scene-hotspot-label{
        display:none;
    }
}


/* =========================================================
   Fälle / erster echter Fall – v0.9
   ========================================================= */
.side-book-cases{border-left:4px solid #8b5d42}
.cases-panel{
    background:
      radial-gradient(circle at 85% 12%,rgba(126,87,50,.18),transparent 25%),
      linear-gradient(180deg,#302016,#1a100b)
}
.cases-content{display:grid;gap:14px}
.cases-empty{
    padding:60px 20px;text-align:center;border:1px dashed var(--line2);
    border-radius:12px;color:var(--muted)
}
.case-card{
    padding:18px;border:1px solid var(--line);border-radius:13px;background:#1d120c
}
.case-card.case-active{border-left:4px solid var(--accent)}
.case-card.case-resolved{border-left:4px solid #708b63}
.case-card-head{
    display:flex;justify-content:space-between;align-items:flex-start;gap:12px
}
.case-card-head h3{margin:3px 0 0;font-size:25px}
.case-status{
    border-radius:999px;padding:4px 10px;background:#362318;border:1px solid #715039;
    color:#e7c693;font-size:12px;font-weight:700
}
.case-resolved .case-status{
    background:#27331f;border-color:#5b744f;color:#cbe4bd
}
.case-summary{color:#d7c5b1;max-width:850px}
.case-timeline{display:grid;gap:9px;margin-top:16px}
.case-step{
    display:grid;grid-template-columns:42px 1fr;gap:11px;padding:11px;
    border:1px solid #4c3424;border-radius:10px;background:#170e09;opacity:.58
}
.case-step.done{opacity:.8}
.case-step.current{
    opacity:1;border-color:#a77b48;background:#2c1c12;box-shadow:inset 4px 0 #d1a05e
}
.case-step-marker{
    width:34px;height:34px;display:flex;align-items:center;justify-content:center;
    border-radius:50%;border:1px solid #745239;background:#21140e;color:#e5c691;font-weight:700
}
.case-step.done .case-step-marker{
    background:#2d3a26;border-color:#607b54;color:#c9e3bb
}
.case-step strong{display:block;margin-bottom:3px}
.case-step p{margin:0 0 4px}
.case-step small{color:var(--muted)}
.case-outcome{
    margin-top:16px;padding:13px;border:1px solid #59734f;border-radius:10px;
    background:#23301e;color:#d5e7cd
}
.case-outcome p{margin-bottom:0}
.case-toast{
    position:fixed;left:50%;top:86px;z-index:100;transform:translate(-50%,-18px);
    opacity:0;min-width:min(480px,90vw);padding:12px 16px;text-align:center;
    border-radius:10px;border:1px solid #b5854f;background:#2b1a10f2;color:#ffe1ab;
    box-shadow:0 16px 50px #000a;transition:opacity .2s ease,transform .2s ease
}
.case-toast.show{opacity:1;transform:translate(-50%,0)}
.case-toast-resolved{border-color:#658258;background:#22301ef2;color:#d6ebcb}


/* v1.0 – mehrere Fälle */
.case-card + .case-card{margin-top:2px}
.side-book-cases .side-book-copy small{line-height:1.25}


/* v1.1 – Zeitspur */
.history-shift{
    padding:12px 14px;
    border-left:4px solid #b17b45;
    background:#28180f;
    border-radius:6px;
}
.case-card[data-case="siebensteine"]{border-color:#8f6746}


/* =========================================================
   Ermittlungen ohne Lösungsweg – v1.2
   ========================================================= */
.case-known,
.case-question,
.case-help-area{
    margin-top:16px;
}
.case-known h4{
    margin:0 0 9px;
}
.case-findings{
    display:grid;
    gap:8px;
}
.case-finding{
    display:grid;
    grid-template-columns:34px 1fr;
    gap:10px;
    padding:10px 11px;
    border:1px solid #4d3525;
    border-radius:9px;
    background:#170e09;
}
.case-finding-mark{
    width:28px;height:28px;
    display:flex;align-items:center;justify-content:center;
    border-radius:50%;
    background:#2b3925;
    border:1px solid #5e7952;
    color:#c9e3bb;
    font-weight:700;
}
.case-finding strong{
    display:block;
    margin-bottom:3px;
}
.case-finding p{
    margin:0;
    color:#d0beaa;
}
.case-question{
    padding:14px;
    border-radius:10px;
    border:1px solid #936b42;
    background:linear-gradient(135deg,#312014,#21140d);
    box-shadow:inset 4px 0 #c69455;
}
.case-question p{
    margin:5px 0 0;
    font-size:18px;
    color:#f0dcc0;
}
.case-help-area{
    padding:13px;
    border:1px dashed #66503c;
    border-radius:10px;
    background:#17100b;
}
.case-help-head{
    display:flex;
    justify-content:space-between;
    gap:12px;
    align-items:flex-start;
    margin-bottom:9px;
}
.case-help-head div{
    display:flex;
    flex-direction:column;
}
.case-help-head small{
    color:var(--muted);
}
.case-help-head > span{
    min-width:42px;
    text-align:center;
    padding:3px 8px;
    border-radius:999px;
    background:#302014;
    border:1px solid #67472f;
    color:#e6c48c;
    font-size:12px;
}
.case-hint{
    margin-top:8px;
    padding:10px;
    border-radius:8px;
    border-left:3px solid #9c7449;
    background:#25180f;
}
.case-hint strong{
    color:#e2bd82;
}
.case-hint p{
    margin:3px 0 0;
}
.case-help-actions{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    margin-top:11px;
}
.case-help-btn{
    background:#5a3c24;
    border-color:#9c7248;
}
.case-ask-btn{
    background:#28341f;
    border-color:#5d7950;
    color:#d6e8cc;
}
.case-help-btn:disabled{
    opacity:.55;
    cursor:not-allowed;
}


/* =========================================================
   Stadtausbau + Bildsystem + historisches Foto – v1.3
   ========================================================= */

/* Bei vielen Orten bleibt die linke Navigation handlich. */
#locationList{
    max-height:410px;
    overflow:auto;
    padding-right:3px;
}

/* Neue Orte haben bereits einen echten Bildplatz. Bis ein eigenes WebP
   vorhanden ist, wird kein falsches Foto vorgetäuscht. */
.scene-no-photo{
    background:
      radial-gradient(circle at 70% 28%,rgba(184,128,72,.18),transparent 22%),
      linear-gradient(135deg,#3a281c,#1b110b 65%,#100906);
}
.scene-no-photo::after{
    content:attr(data-location-name) " · Bild folgt";
    position:absolute;
    right:18px;
    top:16px;
    z-index:1;
    padding:6px 9px;
    border-radius:7px;
    border:1px solid #78563c;
    background:#160d08cc;
    color:#bca894;
    font-size:12px;
    letter-spacing:.02em;
}

/* Mit vielen Kartenpunkten zeigt die Minikarte nur kompakte Pins.
   Namen erscheinen auf der großen Karte bzw. beim aktuellen Ort. */
.map-marker.mini-marker .map-marker-label{
    display:none;
}
.map-marker.mini-marker.current .map-marker-label{
    display:block;
    max-width:95px;
    font-size:10px;
}

/* NPC-Bildplätze */
.npc-card-with-photo{
    display:grid;
    grid-template-columns:48px 1fr;
    gap:9px;
    align-items:center;
}
.npc-card-with-photo > button{
    grid-column:1/-1;
}
.npc-photo{
    width:48px;
    height:56px;
    object-fit:cover;
    border-radius:7px;
    border:1px solid #65462f;
    background:#130b07;
}
.npc-photo-placeholder{
    display:flex;
    align-items:center;
    justify-content:center;
    color:#d9b77f;
    font-weight:700;
    font-size:15px;
    background:linear-gradient(145deg,#362317,#180f0a);
}
.npc-copy{
    min-width:0;
}

/* Inventar-Bildplätze */
.inventory-item-photo{
    width:64px;
    height:64px;
    object-fit:cover;
    border-radius:9px;
    border:1px solid #89613d;
    background:#130b07;
}
.inventory-detail-photo{
    width:100%;
    max-width:260px;
    max-height:220px;
    object-fit:contain;
    border-radius:10px;
    border:1px solid #89613d;
    background:#130b07;
    margin-bottom:12px;
}

/* Das alte Foto ist nun wirklich sichtbar im Spiel.
   Das vorhandene Parkmotiv dient nur als Bildbasis; die sieben Steine
   werden passend zur aktuellen Geschichtsvariante darüber dargestellt. */
.old-photo-card{
    width:min(520px,100%);
    margin:14px auto;
    padding:10px 10px 8px;
    transform:rotate(-1deg);
    border:1px solid #8f775c;
    border-radius:3px;
    background:#d7c29e;
    box-shadow:0 10px 30px #0007;
    color:#3d3023;
}
.old-photo-image{
    position:relative;
    height:250px;
    overflow:hidden;
    border:7px solid #ead9b8;
    background-size:cover;
    background-position:center 65%;
    filter:sepia(.92) grayscale(.35) contrast(.88) brightness(.86);
}
.old-photo-age{
    position:absolute;
    inset:0;
    background:
      radial-gradient(circle at 16% 22%,rgba(76,42,18,.22) 0 2%,transparent 3%),
      radial-gradient(circle at 83% 71%,rgba(78,44,19,.18) 0 3%,transparent 4%),
      linear-gradient(115deg,rgba(255,241,202,.12),rgba(61,35,18,.12));
    mix-blend-mode:multiply;
    pointer-events:none;
}
.old-photo-stones{
    position:absolute;
    inset:0;
}
.old-photo-stone{
    position:absolute;
    width:10%;
    height:9%;
    min-width:28px;
    min-height:17px;
    transform:translate(-50%,-50%);
    border-radius:48% 42% 37% 44%;
    background:#50483b;
    border:1px solid #2b261e;
    box-shadow:0 5px 7px #2a211777;
}
.old-photo-card figcaption{
    display:flex;
    flex-direction:column;
    gap:2px;
    padding:8px 4px 1px;
    font-family:Georgia,serif;
}
.old-photo-card figcaption span{
    font-size:13px;
    color:#665541;
}

@media(max-width:760px){
    #locationList{max-height:300px}
    .old-photo-image{height:190px}
}


/* =========================================================
   Detailkarte + Medien-Autoload – v1.4
   ========================================================= */
.map-detailed{
    background:
      radial-gradient(circle at 78% 18%,rgba(77,95,56,.92) 0 11%,transparent 12%),
      radial-gradient(circle at 18% 80%,rgba(54,76,45,.95) 0 16%,transparent 17%),
      linear-gradient(135deg,#6b5a43 0 22%,#51412f 22% 47%,#65513b 47% 100%);
}

.map-terrain{
    position:absolute;
    border:1px solid rgba(196,175,132,.18);
    opacity:.55;
    pointer-events:none;
}
.terrain-west{
    left:1%;bottom:3%;width:31%;height:28%;
    border-radius:14px;
    background:
      repeating-linear-gradient(8deg,rgba(123,132,70,.25) 0 8px,rgba(86,102,57,.18) 8px 15px);
}
.terrain-east{
    right:2%;top:4%;width:28%;height:24%;
    border-radius:40% 45% 35% 50%;
    background:
      repeating-radial-gradient(circle at 30% 40%,rgba(57,84,48,.34) 0 7px,rgba(83,108,63,.17) 8px 17px);
}

.map-river{
    position:absolute;
    height:18px;
    border-radius:50%;
    background:#355a63;
    border-top:2px solid #658792;
    border-bottom:2px solid #1e3940;
    opacity:.9;
    box-shadow:0 0 12px #132a2f88;
}
.river-a{
    width:43%;left:-7%;top:19%;transform:rotate(-9deg);
}
.river-b{
    width:26%;left:19%;top:18%;transform:rotate(13deg);
}
.map-water{
    width:24%;
    height:15%;
    left:-4%;
    top:10%;
    opacity:.72;
}

/* Eisenbahn */
.map-rail{
    position:absolute;
    height:7px;
    background:
      repeating-linear-gradient(90deg,#2c2923 0 10px,#b49a6d 10px 13px,#2c2923 13px 24px);
    border-top:2px solid #27231d;
    border-bottom:2px solid #27231d;
    box-shadow:0 0 0 1px #b7a17655;
    opacity:.9;
    z-index:1;
}
.rail-a{
    width:42%;
    left:-4%;
    top:26%;
    transform:rotate(4deg);
}
.map-rail-stop{
    position:absolute;
    width:10px;height:10px;
    border:2px solid #d7c396;
    border-radius:50%;
    background:#282018;
    z-index:2;
}
.rail-stop-zeche{left:8%;top:22%}
.rail-stop-bahnhof{left:18%;top:28%}

/* zusätzliche Straßen */
.road-d{
    width:58%;height:9px;left:36%;top:34%;transform:rotate(3deg);opacity:.55
}
.road-e{
    width:48%;height:8px;left:45%;top:59%;transform:rotate(-18deg);opacity:.48
}
.road-f{
    width:35%;height:7px;left:58%;top:25%;transform:rotate(44deg);opacity:.42
}

/* Häuserblöcke: keine einzelnen Gebäude, aber erkennbarer Stadtkern */
.map-town-block{
    position:absolute;
    z-index:1;
    opacity:.48;
    border:1px solid #2a201877;
    background:
      repeating-linear-gradient(90deg,#967657 0 8px,#594432 8px 11px,#8e6f52 11px 21px,#54402f 21px 24px);
    box-shadow:inset 0 0 7px #2c1e1466;
}
.block-a{left:42%;top:34%;width:16%;height:7%;transform:rotate(-3deg)}
.block-b{left:48%;top:44%;width:18%;height:7%;transform:rotate(5deg)}
.block-c{left:58%;top:31%;width:13%;height:6%;transform:rotate(7deg)}
.block-d{left:35%;top:50%;width:13%;height:6%;transform:rotate(-8deg)}
.block-e{left:64%;top:45%;width:11%;height:6%;transform:rotate(-5deg)}
.block-f{left:52%;top:56%;width:12%;height:6%;transform:rotate(4deg)}
.block-g{left:69%;top:37%;width:10%;height:5%;transform:rotate(8deg)}
.block-h{left:28%;top:58%;width:10%;height:5%;transform:rotate(-6deg)}

/* Kartenbeschriftungen */
.map-area-label,
.map-name-label{
    position:absolute;
    z-index:2;
    pointer-events:none;
    user-select:none;
    text-shadow:0 1px 2px #24170f;
}
.map-area-label{
    color:#d4c09d88;
    font-size:12px;
    font-weight:800;
    letter-spacing:.16em;
}
.area-altstadt{left:48%;top:27%}
.area-bahnhof{left:7%;top:35%}
.area-park{right:5%;bottom:7%}
.area-kirche{right:8%;top:8%}
.area-rand{left:2%;bottom:6%}

.map-name-label{
    color:#d3c6a8aa;
    font-size:10px;
    font-style:italic;
}
.label-hauptstrasse{left:52%;top:49%;transform:rotate(-12deg)}
.label-bahnhofstrasse{left:20%;top:45%;transform:rotate(-12deg)}
.label-parkstrasse{left:66%;top:67%;transform:rotate(7deg)}
.label-muehlenweg{left:27%;top:12%;transform:rotate(8deg)}
.label-bahn{left:4%;top:20%;transform:rotate(4deg)}
.label-bach{left:8%;top:10%;transform:rotate(-8deg);color:#9fc5ccaa}

/* Großkarte: Labels erst bei Hover/Fokus. Dadurch ist die Karte trotz vieler Orte lesbar. */
#largeMapMarkers .map-marker-label{
    opacity:0;
    transform:translateY(-2px);
    transition:opacity .12s ease,transform .12s ease;
    pointer-events:none;
}
#largeMapMarkers .map-marker:hover .map-marker-label,
#largeMapMarkers .map-marker:focus-visible .map-marker-label,
#largeMapMarkers .map-marker.current .map-marker-label{
    opacity:1;
    transform:translateY(0);
}
#largeMapMarkers .map-marker{
    z-index:5;
}
#largeMapMarkers .map-marker:hover,
#largeMapMarkers .map-marker:focus-visible,
#largeMapMarkers .map-marker.current{
    z-index:20;
}

/* Markerfarben nach Art */
.map-marker.type-geschaeft .map-marker-pin,
.map-marker.type-handwerk .map-marker-pin,
.map-marker.type-werkstatt .map-marker-pin{
    background:#b98b4d;
}
.map-marker.type-historisch .map-marker-pin,
.map-marker.type-kirche .map-marker-pin,
.map-marker.type-friedhof .map-marker-pin{
    background:#7b6a92;
}
.map-marker.type-verwaltung .map-marker-pin,
.map-marker.type-schule .map-marker-pin,
.map-marker.type-post .map-marker-pin{
    background:#6d8c91;
}
.map-marker.type-freizeit .map-marker-pin,
.map-marker.type-park .map-marker-pin,
.map-marker.type-verein .map-marker-pin,
.map-marker.type-garten .map-marker-pin{
    background:#728e58;
}
.map-marker.map-hidden{
    display:none;
}

/* Minikarte: sehr kleine Pins statt eines Nadelwaldes */
.mini-map .map-marker-pin{
    width:15px;height:15px;border-width:1px;
}
.mini-map .map-marker-pin::after{
    width:4px;height:4px;left:4px;top:4px;
}
.mini-map .map-marker.current .map-marker-pin{
    width:21px;height:21px;
}
.mini-map .map-marker.current .map-marker-pin::after{
    width:6px;height:6px;left:6px;top:6px;
}

/* Suche / Filter */
.map-toolbar{
    display:flex;
    gap:10px;
    align-items:center;
    justify-content:space-between;
    flex-wrap:wrap;
    margin-bottom:10px;
}
#mapSearch{
    min-width:220px;
    flex:1 1 260px;
    background:#140c08;
    color:var(--text);
    border:1px solid var(--line);
    border-radius:8px;
    padding:8px 10px;
    font:inherit;
}
.map-filter-row{
    display:flex;
    gap:6px;
    flex-wrap:wrap;
}
.map-filter{
    padding:6px 9px;
    font-size:12px;
}
.map-filter.active{
    background:#5b3d25;
    border-color:#b07f4c;
    color:#ffe0a8;
}
.map-legend{
    display:flex;
    gap:14px;
    flex-wrap:wrap;
    margin-top:10px;
    color:var(--muted);
    font-size:12px;
}
.map-legend span{
    display:flex;
    align-items:center;
    gap:5px;
}
.legend-dot{
    width:11px;height:11px;border-radius:50%;
    display:inline-block;border:1px solid #d8c7a7;
    background:#d6a354;
}
.legend-dot.current{background:#d66c42}
.legend-dot.shop{background:#b98b4d}
.legend-dot.history{background:#7b6a92}
.legend-dot.public{background:#6d8c91}

/* Bildplätze tragen künftig echte Dateien automatisch, sobald ein Update
   assets/images/locations/<slug>.webp,
   assets/images/people/<code>.webp oder
   assets/images/items/<code>.webp mitbringt. */
.scene-no-photo::after{
    content:attr(data-location-name) " · Ortsfoto noch nicht hinterlegt";
}

@media(max-width:760px){
    .map-toolbar{align-items:stretch}
    #mapSearch{width:100%}
    .map-filter-row{overflow:auto;flex-wrap:nowrap;padding-bottom:3px}
    .map-area-label{font-size:9px}
    .map-name-label{display:none}
}


/* =========================================================
   Medienpaket 1 – v1.6
   ========================================================= */

/* Echter detaillierter Kartenhintergrund aus dem Medienpaket. */
.map-detailed{
    background-image:
      linear-gradient(rgba(28,18,11,.22),rgba(28,18,11,.22)),
      url("images/map/lindenbruch.webp");
    background-size:cover;
    background-position:center;
    background-repeat:no-repeat;
}

/* Die CSS-Landschaftselemente bleiben als dezente Zusatzebene,
   aber deutlich schwächer, damit die neue Karte sichtbar bleibt. */
.map-detailed .map-terrain,
.map-detailed .map-town-block,
.map-detailed .map-water,
.map-detailed .map-river,
.map-detailed .map-road,
.map-detailed .map-rail{
    opacity:.26;
}

/* Ortsbilder etwas stärker als Landschaft, damit sie spielerisch wirken. */
.scene:not(.scene-no-photo){
    background-size:cover;
    background-position:center;
}


/* =========================================================
   Ortsauswahl ohne Scrollkasten – v1.6.1
   ========================================================= */

/* Die frühere lange Liste links wird bewusst nicht mehr verwendet. */
.location-list{
    display:none !important;
}

.location-compact{
    display:grid;
    gap:7px;
    margin-bottom:12px;
}
.location-current{
    padding:10px 11px;
    border:1px solid var(--line);
    border-radius:9px;
    background:#21150f;
}
.location-current-label{
    display:block;
    margin-bottom:2px;
    color:var(--muted);
    font-size:11px;
    text-transform:uppercase;
    letter-spacing:.06em;
}
.location-current strong{
    display:block;
    color:#f0d6ae;
    line-height:1.25;
}
.location-open-btn{
    width:100%;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    background:#3a281d;
}
.location-open-btn span:last-child{
    font-size:22px;
    line-height:1;
    color:#d9ad68;
}

/* Großes Ortsfenster statt Mini-Scrollbox */
.locations-panel{
    background:#2a190f;
}
.locations-toolbar{
    display:flex;
    gap:10px;
    align-items:center;
    flex-wrap:wrap;
    margin-bottom:14px;
}
#locationSearch{
    flex:1 1 280px;
    min-width:220px;
}
.location-filter-row{
    display:flex;
    flex-wrap:wrap;
    gap:6px;
}
.location-filter{
    padding:7px 10px;
    font-size:12px;
}
.location-filter.active{
    background:#5a3b23;
    border-color:#b7834b;
    color:#ffe0aa;
}
.locations-grid{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(230px,1fr));
    gap:10px;
}
.location-card{
    position:relative;
    display:grid;
    grid-template-columns:72px 1fr;
    gap:10px;
    align-items:center;
    width:100%;
    min-height:78px;
    padding:8px;
    text-align:left;
    overflow:hidden;
    background:#1b100a;
    border:1px solid #513723;
}
.location-card:hover{
    border-color:#9e7145;
    background:#28180f;
}
.location-card.current{
    border-color:#c58d4d;
    background:#352116;
    box-shadow:inset 4px 0 #d19b59;
}
.location-card-visual{
    width:72px;
    height:58px;
    overflow:hidden;
    border-radius:7px;
    border:1px solid #5e422d;
    background:#100906;
}
.location-card-visual img,
.location-card-placeholder{
    display:block;
    width:100%;
    height:100%;
    object-fit:cover;
}
.location-card-placeholder{
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:26px;
    font-weight:700;
    color:#b8905e;
    background:linear-gradient(145deg,#3a281c,#160d08);
}
.location-card-copy{
    min-width:0;
    display:flex;
    flex-direction:column;
    gap:3px;
}
.location-card-copy strong{
    color:#edd7b7;
    line-height:1.2;
}
.location-card-copy small{
    color:var(--muted);
}
.location-here{
    position:absolute;
    right:7px;
    top:6px;
    padding:2px 6px;
    border-radius:999px;
    background:#664325;
    color:#f4d6a5;
    font-size:10px;
}
.locations-empty{
    grid-column:1/-1;
    padding:30px;
    text-align:center;
    color:var(--muted);
    border:1px dashed #5a412e;
    border-radius:10px;
}
.locations-footer{
    display:flex;
    justify-content:flex-end;
    padding-top:14px;
    margin-top:14px;
    border-top:1px solid #5f432e;
}

@media(max-width:720px){
    .locations-grid{
        grid-template-columns:1fr;
    }
    .locations-toolbar{
        align-items:stretch;
    }
    #locationSearch{
        width:100%;
    }
    .location-filter-row{
        overflow-x:auto;
        flex-wrap:nowrap;
        padding-bottom:3px;
    }
}


/* =========================================================
   NPC-Erinnerungssystem – v2.0
   ========================================================= */
.memory-shift-notice{
    display:flex;
    flex-direction:column;
    gap:3px;
    margin:0 0 12px;
    padding:10px 12px;
    border:1px solid #a57743;
    border-left:4px solid #d39a52;
    border-radius:8px;
    background:
      linear-gradient(90deg,rgba(121,77,37,.34),rgba(46,28,17,.82));
    box-shadow:0 0 18px rgba(184,120,58,.08);
}
.memory-shift-notice strong{
    color:#f0c783;
    letter-spacing:.03em;
}
.memory-shift-notice span{
    color:#d0bda5;
    font-size:13px;
}


/* =========================================================
   Gelöste Fälle kompakt – v2.0.1
   ========================================================= */
.case-card.case-resolved.case-collapsed{
    padding:0;
    border-color:#4d392a;
    background:#1b110c;
}
.resolved-case-toggle{
    width:100%;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    padding:12px 14px;
    text-align:left;
    border:0;
    border-radius:10px;
    background:transparent;
    color:var(--text);
    cursor:pointer;
}
.resolved-case-toggle:hover{
    background:#26170f;
}
.resolved-case-main,
.resolved-case-right{
    display:flex;
    align-items:center;
    gap:10px;
}
.resolved-case-main{
    min-width:0;
}
.case-solved-check{
    width:28px;
    height:28px;
    flex:0 0 28px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:50%;
    background:#2b3925;
    border:1px solid #5e7952;
    color:#c9e3bb;
    font-weight:700;
}
.resolved-case-title{
    display:block;
    margin-top:1px;
    font-size:17px;
    line-height:1.2;
    color:#f0e0c9;
}
.resolved-case-arrow{
    color:#d4ad75;
    font-size:20px;
    line-height:1;
    transition:transform .15s ease;
}
.resolved-case-toggle[aria-expanded="true"] .resolved-case-arrow{
    transform:rotate(180deg);
}
.resolved-case-details{
    padding:0 14px 14px;
    border-top:1px solid #4b3323;
}
.case-card.case-resolved.case-expanded{
    padding:0;
}
.case-card.case-resolved.case-expanded .resolved-case-toggle{
    border-radius:10px 10px 0 0;
    background:#21140d;
}
.case-card.case-resolved .case-status{
    white-space:nowrap;
}
@media(max-width:620px){
    .resolved-case-right .case-status{
        display:none;
    }
    .resolved-case-toggle{
        padding:11px 10px;
    }
}


/* =========================================================
   Dauerhafter Spielstand – v2.2
   ========================================================= */
/* Lebendige Stadt – v2.6 */
.unlock-notice{
    display:flex;flex-direction:column;gap:3px;
    margin:12px 0;padding:10px 12px;
    border:1px solid #8d6d3e;border-left:4px solid #d1a14f;
    border-radius:8px;background:#322315;
}
.unlock-notice strong{color:#f0cb84}
.unlock-notice span{color:#dcc9ad;font-size:13px}


/* =========================================================
   Kneipenrunde & Running Gag – v2.7
   ========================================================= */

.dart-board{
    position:relative;
    width:min(300px,78vw);
    aspect-ratio:1;
    margin:16px auto 10px;
    border-radius:50%;
    cursor:crosshair;
    border:12px solid #302319;
    box-shadow:
      0 0 0 3px #a98558,
      0 12px 28px #0008,
      inset 0 0 22px #000b;
    background:
      radial-gradient(circle,
        #b58b53 0 4.8%,
        #4f7750 5% 10.5%,
        #d6c6a4 10.8% 45%,
        transparent 45.5% 47.5%,
        #8a3e31 48% 57%,
        transparent 57.5% 80.5%,
        #54734c 81% 92.5%,
        #191713 93% 100%),
      repeating-conic-gradient(
        from -9deg,
        #d8c9aa 0deg 18deg,
        #2e2922 18deg 36deg
      );
    overflow:visible;
}
.dart-board::before{
    content:"";
    position:absolute;
    inset:11%;
    border:2px solid #272018;
    border-radius:50%;
    box-shadow:
      0 0 0 1px #baa47b,
      inset 0 0 0 1px #baa47b;
    pointer-events:none;
}
.dart-board.dart-finished{cursor:default;opacity:.92}
.dart-board-number{
    position:absolute;
    z-index:3;
    color:#f1e6cf;
    font-weight:800;
    font-size:16px;
    text-shadow:0 2px 3px #000;
    pointer-events:none;
}
.dart-board-number.n20{left:50%;top:-31px;transform:translateX(-50%)}
.dart-board-number.n6{right:-23px;top:50%;transform:translateY(-50%)}
.dart-board-number.n3{left:50%;bottom:-31px;transform:translateX(-50%)}
.dart-board-number.n11{left:-28px;top:50%;transform:translateY(-50%)}
.dart-hit{
    position:absolute;
    z-index:4;
    width:13px;height:13px;
    margin:-6px 0 0 -6px;
    border-radius:50%;
    background:#f4e4bd;
    border:2px solid #6a2b20;
    box-shadow:0 0 0 3px #0007,0 0 10px #fff7;
    pointer-events:none;
}
.dart-result{
    margin:10px 0 0;
    text-align:center;
    color:#dbc8ae;
}

.dice-table{
    display:grid;
    grid-template-columns:1fr auto 1fr;
    align-items:center;
    gap:16px;
    margin:18px 0;
}
.dice-side{
    padding:12px;
    text-align:center;
    border:1px solid var(--line);
    border-radius:10px;
    background:#21140d;
}
.dice-versus{
    color:var(--muted);
    font-style:italic;
}
.dice-row{
    display:flex;
    justify-content:center;
    gap:8px;
    margin:10px 0 5px;
}
.dice-row>span,.die{
    display:flex;
    align-items:center;
    justify-content:center;
    width:58px;height:58px;
    border-radius:10px;
    background:#ead9b9;
    border:2px solid #9f7b4d;
    color:#2b1b11;
    font-size:44px;
    line-height:1;
    box-shadow:0 5px 12px #0006;
}

.gag-find{
    margin-top:18px;
    padding-top:14px;
    border-top:1px dashed #765739;
}
.gag-paper{
    position:relative;
    max-width:420px;
    min-height:130px;
    margin:18px auto 8px;
    padding:30px 24px;
    display:flex;
    align-items:center;
    justify-content:center;
    text-align:center;
    transform:rotate(-1.8deg);
    background:
      linear-gradient(100deg,#d9c89d,#efe1b6 48%,#d6c394);
    color:#34261b;
    border:1px solid #a99263;
    box-shadow:0 9px 20px #0008,inset 0 0 30px #8c734035;
}
.gag-paper::before,
.gag-paper::after{
    content:"";
    position:absolute;
    width:35px;height:15px;
    background:#bca97f88;
}
.gag-paper::before{left:18px;top:-7px;transform:rotate(-7deg)}
.gag-paper::after{right:18px;bottom:-7px;transform:rotate(8deg)}
.gag-paper span{
    font-family:"Comic Sans MS","Bradley Hand","Segoe Print",cursive;
    font-size:30px;
    font-weight:700;
    letter-spacing:.5px;
    transform:rotate(1deg);
}

@media(max-width:620px){
    .dice-table{grid-template-columns:1fr}
    .dice-versus{display:none}
    .dice-row>span,.die{width:50px;height:50px;font-size:38px}
}


/* =========================================================
   Lebendige Gespräche – v2.8
   ========================================================= */
.conversation-depth{
    display:inline-block;
    margin:2px 0 10px;
    padding:4px 8px;
    border-radius:999px;
    border:1px solid #59412c;
    background:#20140d;
    color:#a9957b;
    font-size:11px;
}


/* =========================================================
   Wetter/Licht & Spieler je Ort – v2.8.3
   ========================================================= */
#worldHint{
    display:inline-flex;
    align-items:center;
    min-height:26px;
    padding:3px 8px;
    border-radius:999px;
    border:1px solid #493522;
    background:#24160e;
    color:#d9c4a5;
    white-space:nowrap;
}
.location-player-count{
    display:inline-flex;
    align-items:center;
    width:max-content;
    max-width:100%;
    margin-top:3px;
    padding:2px 6px;
    border-radius:999px;
    border:1px solid #4c663e;
    background:#21301d;
    color:#b9d7a9;
    font-size:10px;
    line-height:1.3;
}
.location-player-count.chatting{
    border-color:#79603a;
    background:#332416;
    color:#ebca8d;
}
@media(max-width:760px){
    .top-status{gap:7px;flex-wrap:wrap;justify-content:flex-end}
    #worldHint{font-size:12px}
}


/* Admin-Nachrichten – v2.9 */
.admin-message-toast{
    position:fixed;
    z-index:9999;
    left:50%;
    top:78px;
    transform:translate(-50%,-14px);
    width:min(560px,calc(100vw - 28px));
    padding:14px 16px;
    border:1px solid #b18448;
    border-left:5px solid #e0b464;
    border-radius:10px;
    background:#2b1a10f5;
    color:#efe2d0;
    box-shadow:0 16px 45px #000a;
    opacity:0;
    transition:.2s ease;
}
.admin-message-toast.show{opacity:1;transform:translate(-50%,0)}
.admin-message-toast strong,.admin-message-toast span,.admin-message-toast small{display:block}
.admin-message-toast strong{color:#f0c982;margin-bottom:4px}
.admin-message-toast small{margin-top:6px;color:#ad9a84}


/* =========================================================
   Dauerhaftes Nachrichtenfach – v2.9.1
   ========================================================= */
.side-book-messages{
    position:relative;
    border-left:4px solid #b18448;
}
.message-badge{
    flex:0 0 auto;
    min-width:24px;
    height:24px;
    padding:0 6px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border-radius:999px;
    background:#a53e34;
    color:#fff3e7;
    border:1px solid #d77a6d;
    font-size:12px;
    font-weight:800;
    box-shadow:0 3px 10px #0005;
}
.messages-panel{
    max-width:850px;
}
.messages-content{
    display:flex;
    flex-direction:column;
    gap:10px;
    margin-top:12px;
}
.player-message{
    padding:14px;
    border:1px solid #5b3e29;
    border-radius:10px;
    background:#1a100a;
}
.player-message.unread{
    border-left:4px solid #d3a158;
    background:#24170e;
}
.player-message-head{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:12px;
}
.player-message-head strong,
.player-message-head small{
    display:block;
}
.player-message-head strong{
    color:#efcb92;
}
.player-message-head small{
    margin-top:3px;
    color:#9f8e7b;
}
.player-message p{
    margin:12px 0 0;
    white-space:pre-wrap;
    color:#e5d7c6;
}
.message-delete-btn{
    flex:0 0 auto;
    background:#4a211c;
    border-color:#7e3d34;
}
.messages-empty{
    padding:28px 18px;
    text-align:center;
    border:1px dashed #62462f;
    border-radius:10px;
}
.messages-empty p{
    color:#a99782;
}
.admin-message-toast{
    padding-bottom:12px;
}
.admin-message-toast .admin-message-open{
    display:inline-block;
    margin-top:10px;
    padding:6px 10px;
    background:#644222;
    border:1px solid #a47843;
    color:#f4dfc0;
}


/* Karte & Orte synchron – v2.9.2 */
#largeMapMarkers .map-marker{
    min-width:36px;
    min-height:40px;
    padding:4px;
    cursor:pointer;
}
#largeMapMarkers .map-marker::before{
    content:"";
    position:absolute;
    inset:-7px;
    border-radius:50%;
}
#largeMapMarkers .map-marker:focus-visible{
    outline:2px solid #f0c982;
    outline-offset:4px;
}


/* =========================================================
   Neuer Anfang – v2.9.4
   ========================================================= */
.player-reset-open{
    width:100%;
    margin:10px 0 2px;
    padding:7px 9px;
    border:1px solid #64402d;
    border-radius:7px;
    background:#25160f;
    color:#bda995;
    font-size:12px;
    text-align:left;
}
.player-reset-open:hover{
    border-color:#9d5547;
    background:#351b16;
    color:#e2b8ae;
}

.reset-player-panel{
    max-width:720px;
}
.reset-warning{
    margin-top:12px;
    padding:14px 16px;
    border:1px solid #8a443b;
    border-left:5px solid #bf5548;
    border-radius:9px;
    background:#351815;
}
.reset-warning>strong{
    color:#f0b2a8;
    font-size:18px;
}
.reset-warning ul{
    margin:12px 0;
    padding-left:22px;
}
.reset-warning li{
    margin:5px 0;
}
.reset-ack{
    display:flex;
    align-items:flex-start;
    gap:10px;
    margin:16px 0;
    padding:12px;
    border:1px solid #62442f;
    border-radius:8px;
    background:#1b100a;
    cursor:pointer;
}
.reset-ack input{
    flex:0 0 auto;
    width:19px;
    height:19px;
    margin-top:2px;
}
.reset-actions{
    display:flex;
    justify-content:flex-end;
    gap:10px;
}
.danger-reset{
    background:#7d2924;
    border-color:#b44a40;
    color:#fff0ec;
}
.danger-reset:hover{
    background:#95352e;
}
.danger-reset:disabled{
    opacity:.42;
    cursor:not-allowed;
}

.new-player-page{
    min-height:100vh;
    display:grid;
    place-items:center;
    padding:20px;
    background:
      radial-gradient(circle at 50% 20%,#382216 0,#1a100a 48%,#0d0705 100%);
}
.new-player-shell{
    width:min(560px,100%);
}
.new-player-card{
    padding:28px;
    border:1px solid #6a472e;
    border-radius:15px;
    background:linear-gradient(180deg,#2a190f,#1a100a);
    box-shadow:0 30px 90px #0009;
}
.new-player-card h1{
    margin:4px 0 10px;
    font-size:32px;
}
.new-player-card>p{
    color:#cbb9a3;
}
.new-player-form{
    display:grid;
    gap:8px;
    margin-top:20px;
}
.new-player-form label{
    color:#ddc9b1;
}
.new-player-form input{
    width:100%;
    padding:12px 13px;
    border:1px solid #765133;
    border-radius:8px;
    background:#100906;
    color:#f0e2d0;
    font-size:18px;
}
.new-player-form button{
    margin-top:6px;
    padding:11px 13px;
}
.cookie-confirm{display:grid!important;grid-template-columns:22px 1fr;gap:10px;align-items:start;margin:8px 0 2px;padding:12px;border:1px solid #5d402a;border-radius:9px;background:#1a100a;color:#cdbba5!important;font-size:13px;line-height:1.45}
.cookie-confirm input[type=checkbox]{width:18px!important;height:18px!important;margin:2px 0 0;padding:0;accent-color:#b7854e}
.cookie-confirm strong{color:#f0cf9a}
.join-error{margin:2px 0 4px;padding:9px 11px;border-left:3px solid #b95d4e;background:#2c1712;color:#f2c0b7;border-radius:0 7px 7px 0;font-size:13px}
.new-player-note{
    margin:18px 0 0;
    font-size:12px;
    color:#958472 !important;
}


/* =========================================================
   Willkommen in Lindenbruch – v2.9.5
   ========================================================= */
.onboarding-shell{
    width:min(820px,100%);
}
.onboarding-card{
    min-height:470px;
    overflow:hidden;
}
.onboarding-progress{
    display:flex;
    justify-content:center;
    gap:9px;
    margin:0 0 22px;
}
.onboarding-progress span{
    width:11px;
    height:11px;
    border-radius:50%;
    border:1px solid #765133;
    background:#1a100a;
    transition:.18s ease;
}
.onboarding-progress span.active{
    width:28px;
    border-radius:999px;
    background:#d2a15c;
    border-color:#e4bf7d;
}
.onboarding-progress span.done{
    background:#6d8e58;
    border-color:#91b475;
}
.onboarding-step{
    display:none;
    animation:onboardingIn .2s ease;
}
.onboarding-step.active{
    display:block;
}
@keyframes onboardingIn{
    from{opacity:0;transform:translateX(10px)}
    to{opacity:1;transform:translateX(0)}
}
.onboarding-step h1,
.onboarding-step h2{
    margin:4px 0 12px;
}
.onboarding-step h2{
    font-size:28px;
}
.onboarding-lead{
    font-size:19px;
    line-height:1.5;
    color:#ead8c1 !important;
}
.onboarding-feature-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px;
    margin:18px 0;
}
.onboarding-feature-grid>div{
    padding:12px 13px;
    border:1px solid #5d402a;
    border-radius:9px;
    background:#1a100a;
}
.onboarding-feature-grid strong,
.onboarding-feature-grid span{
    display:block;
}
.onboarding-feature-grid strong{
    margin-bottom:4px;
    color:#efc982;
}
.onboarding-feature-grid span{
    color:#baa791;
    font-size:13px;
}
.onboarding-rules{
    display:grid;
    gap:9px;
    margin:16px 0;
}
.onboarding-rules p{
    margin:0;
    padding:11px 13px;
    border-left:3px solid #8a643b;
    border-radius:0 7px 7px 0;
    background:#1a100a;
    color:#cdbba5;
}
.onboarding-rules strong{
    color:#edd2a5;
}
.onboarding-actions{
    display:flex;
    justify-content:space-between;
    gap:10px;
    margin-top:22px;
}
.onboarding-actions button{
    min-width:130px;
}
.onboarding-actions .onboarding-next,
.onboarding-actions .onboarding-enter{
    margin-left:auto;
    background:#6f4d2a;
    border-color:#aa7741;
}
.onboarding-enter{
    font-weight:700;
}
.onboarding-back{
    background:#24160f;
    color:#c7b39d;
}
.onboarding-actions-name{
    justify-content:flex-start;
    margin-top:14px;
}
.onboarding-actions-name .onboarding-back{
    min-width:0;
    font-size:12px;
}
.onboarding-step .new-player-form{
    max-width:520px;
}

@media(max-width:650px){
    .onboarding-card{
        min-height:0;
        padding:21px 17px;
    }
    .onboarding-feature-grid{
        grid-template-columns:1fr;
    }
    .onboarding-lead{
        font-size:17px;
    }
    .onboarding-actions{
        flex-wrap:wrap;
    }
    .onboarding-actions button{
        flex:1 1 140px;
    }
}


/* =========================================================
   Gesichter & seltene Besucher – v2.10
   ========================================================= */
.player-card-avatar{
    display:grid;
    grid-template-columns:58px minmax(0,1fr);
    gap:10px;
    align-items:start;
}
.player-avatar-frame{
    width:58px;height:58px;overflow:hidden;border-radius:50%;
    border:2px solid #7d5838;background:#1a100a;
}
.player-avatar-image,.player-avatar-fallback{width:100%;height:100%;border-radius:50%}
.player-avatar-image{display:block;object-fit:cover}
.player-avatar-fallback{
    display:grid;place-items:center;background:linear-gradient(145deg,#6a472d,#2b1a11);
    color:#f1d5aa;font-size:22px;font-weight:800;
}
.player-card-copy{min-width:0;position:relative}
.player-card-head{display:flex;align-items:center;justify-content:space-between;gap:8px}
.player-card-head>strong{display:block;overflow:hidden;text-overflow:ellipsis}
.avatar-menu-toggle{
    flex:0 0 auto;min-width:32px;height:32px;padding:0 10px;border-radius:10px;
    border:1px solid #7e5f42;background:#24150c;color:#e9cb9c;
    font-size:22px;line-height:1;cursor:pointer;
}
.avatar-menu-toggle:hover,.avatar-menu-toggle:focus-visible{
    background:#352013;color:#fff2d3;outline:none;
}
.avatar-menu{
    margin-top:8px;padding:8px;border:1px solid #6c5038;border-radius:12px;
    background:rgba(18,10,6,.98);display:flex;flex-direction:column;gap:6px;
    box-shadow:0 10px 26px rgba(0,0,0,.35);
}
.avatar-menu-button{
    width:100%;justify-content:flex-start;text-align:left;
}
.avatar-menu-remove{
    color:#f0c3bc;border-color:#7b534c;background:#2f1714;
}
.avatar-menu-remove:hover,.avatar-menu-remove:focus-visible{
    background:#4a2420;
}

.chat-player-avatar,.board-player-avatar{
    flex:0 0 auto;object-fit:cover;overflow:hidden;border-radius:50%;
    border:1px solid #79573a;background:#332116;color:#ead3b1;
}
.chat-player-avatar{
    width:32px;height:32px;display:grid;place-items:center;font-size:10px;font-weight:800;
}
.chat-line-avatar{display:flex;align-items:flex-start;gap:8px}
.chat-line-copy{min-width:0;flex:1}
.board-player-avatar{
    width:28px;height:28px;display:grid;place-items:center;font-size:9px;font-weight:800;
}
.board-author-avatar{display:flex;align-items:center;gap:7px}
.board-reply-avatar{display:flex;align-items:flex-start;gap:8px}
.board-reply-copy{flex:1;min-width:0}
.avatar-placeholder{text-align:center}

.rare-visitor-badge{
    display:inline-block;width:max-content;max-width:100%;margin-top:4px;padding:2px 6px;
    border:1px solid #88703e;border-radius:999px;background:#302817;
    color:#e5c779;font-size:10px;
}


/* =========================================================
   Sonntags-Trödelmarkt – v2.11
   ========================================================= */
.flea-market-head{
    display:flex;
    justify-content:space-between;
    gap:12px;
    align-items:baseline;
    padding-bottom:9px;
    border-bottom:1px solid #5b4029;
}
.flea-market-head strong{font-size:19px;color:#efc982}
.flea-market-head span{font-size:12px;color:#ad9981}
.flea-market-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px;
    margin-top:14px;
}
.flea-item{
    display:grid;
    grid-template-columns:64px minmax(0,1fr);
    gap:10px;
    padding:10px;
    border:1px solid #5b3e29;
    border-radius:9px;
    background:#1a100a;
}
.flea-item img,.flea-item-icon{
    width:64px;height:64px;border-radius:7px;border:1px solid #6b4a30;
    object-fit:cover;background:#291a11;
}
.flea-item-icon{
    display:grid;place-items:center;color:#ddb976;font-size:28px;font-weight:700;
}
.flea-item-copy{min-width:0}
.flea-item-copy strong,.flea-item-copy span,.flea-item-copy small{display:block}
.flea-item-copy strong{color:#ecd1a3}
.flea-item-copy span{margin-top:3px;color:#b9a48d;font-size:12px}
.flea-item-copy small{margin-top:5px;color:#d7b06f}
.flea-item button,.flea-owned{grid-column:1/-1}
.flea-owned{
    padding:5px 8px;border-radius:6px;background:#26341f;color:#9dcc88;font-size:12px;
}
@media(max-width:680px){
    .flea-market-grid{grid-template-columns:1fr}
    .flea-market-head{flex-direction:column;align-items:flex-start}
}


/* =========================================================
   Minispiele ohne inneren Scrollbalken – v2.11.2
   ========================================================= */
.conversation-log.conversation-log-minigame{
    max-height:none;
    overflow:visible;
    min-height:0;
}
.conversation-log.conversation-log-minigame .mini-wrap{
    overflow:visible;
}
.conversation-log.conversation-log-minigame .darts-game,
.conversation-log.conversation-log-minigame .dice-game{
    width:100%;
}


/* =========================================================
   Suchbild-System – v2.12
   ========================================================= */
.search-scene{display:grid;gap:12px}
.search-scene>p{margin:0}
.search-scene-picture{
    position:relative;width:100%;overflow:hidden;border:1px solid #6d4a2f;
    border-radius:12px;background:#100906;box-shadow:inset 0 0 0 1px #24150d
}
.search-scene-picture>img{display:block;width:100%;height:auto;user-select:none;-webkit-user-drag:none}
.search-hotspot{
    position:absolute;padding:0;margin:0;border:0;border-radius:10px;background:transparent;
    cursor:pointer;outline:none;-webkit-tap-highlight-color:transparent;
    touch-action:manipulation
}
.search-hotspot:hover,.search-hotspot:focus-visible,.search-hotspot.armed{
    background:rgba(239,196,116,.10);
    box-shadow:inset 0 0 0 2px rgba(239,196,116,.46),0 0 16px rgba(239,196,116,.18)
}
.search-hotspot:disabled{pointer-events:none}
.search-scene-hint{
    min-height:44px;padding:9px 11px;border-left:3px solid #86643f;border-radius:0 8px 8px 0;
    background:#1b100a;color:#bba78e;font-size:13px
}
.search-scene-help{justify-self:start;font-size:12px;background:#25170f}
.search-scene-done{
    padding:10px 12px;border:1px solid #49633e;border-radius:8px;background:#1c2818;color:#a9ca92
}
.search-found-card{display:grid;grid-template-columns:120px minmax(0,1fr);gap:14px;align-items:start}
.search-found-card img{width:120px;height:120px;object-fit:cover;border-radius:10px;border:1px solid #735035}
.search-found-card h3{margin-top:0;color:#efd0a0}
@media(max-width:600px){
    .search-found-card{grid-template-columns:82px minmax(0,1fr)}
    .search-found-card img{width:82px;height:82px}
    .search-hotspot{min-width:44px;min-height:44px}
}


/* Suchbild-Erweiterung – v2.13 */
.search-case-event{
    margin:10px 0 0;
    padding:8px 10px;
    border:1px solid #836238;
    border-radius:8px;
    background:#2b1c10;
    color:#f0c987;
    font-weight:700;
}

/* =========================================================
   v2.71.15 – maximal fünf offene Fälle
   ========================================================= */
.case-capacity-note{
    margin:0 0 12px;padding:10px 12px;border:1px solid #5f452f;border-radius:9px;
    background:#24160f;color:#d9c6b1;line-height:1.45
}
.case-capacity-note strong{color:#f0d09a}
.case-capacity-note.full{border-color:#80613e;background:#2b1b10}

/* =========================================================
   v2.55 – Fallakten als Aktenreiter
   ========================================================= */
.case-file-tabs{
    display:flex;gap:6px;align-items:flex-end;overflow-x:auto;overflow-y:hidden;
    padding:2px 4px 0;margin:0 0 -1px;scrollbar-width:thin
}
.case-file-tab{
    flex:0 0 auto;max-width:230px;min-width:135px;padding:10px 13px 9px;
    border:1px solid #6b4a33;border-bottom-color:#8f6849;border-radius:10px 10px 0 0;
    background:linear-gradient(180deg,#4a3020,#2c1c13);color:#ead8c2;
    text-align:left;cursor:pointer;box-shadow:0 -3px 10px rgba(0,0,0,.15)
}
.case-file-tab span{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:800}
.case-file-tab small{display:block;margin-top:3px;color:#bfa78f;font-size:11px;text-transform:uppercase;letter-spacing:.05em}
.case-file-tab.resolved{background:linear-gradient(180deg,#35442c,#26341f);border-color:#617856}
.case-file-tab.active{
    position:relative;z-index:2;background:#1d120c;border-color:#a77b48;border-bottom-color:#1d120c;color:#f3d39f
}
.case-file-body{
    position:relative;z-index:1;padding:16px;border:1px solid #a77b48;border-radius:0 12px 12px 12px;
    background:linear-gradient(180deg,#21150f,#160d09)
}
.case-file-body>.case-card{margin:0}
.case-file-body>.available-cases{margin:0}
@media(max-width:700px){
    .case-file-tabs{gap:4px}
    .case-file-tab{min-width:118px;max-width:180px;padding:9px 10px 8px}
    .case-file-body{padding:10px;border-radius:0 9px 9px 9px}
}


/* =========================================================
   v2.71.7 – Touch / PWA Kompatibilität
   ========================================================= */
button,
.header-nav-btn,
.location-card,
.scene-hotspot,
.search-hotspot,
.puzzle-choice,
.photo-piece,
.dart-board{
    touch-action:manipulation;
}

@media (pointer:coarse), (hover:none){
    .search-hotspot{
        min-width:48px;
        min-height:48px;
    }

    .scene-hotspot{
        min-width:48px;
        min-height:48px;
        justify-content:center;
    }
    .scene-hotspot-dot{
        width:38px;
        height:38px;
        flex-basis:38px;
    }

    #largeMapMarkers .map-marker{
        min-width:48px;
        min-height:48px;
    }
    .puzzle-choice,
    .search-scene-help{
        min-height:44px;
    }
    .photo-piece{
        min-height:64px;
    }

    .search-hotspot:focus,
    .search-hotspot:active{
        background:rgba(239,196,116,.10);
        box-shadow:inset 0 0 0 2px rgba(239,196,116,.46),0 0 16px rgba(239,196,116,.18);
    }
}


/* =========================================================
   v2.71.8 – Touch-Suchbilder: komplettes Bild = Fund
   ========================================================= */
.search-touch-cover{
    position:absolute;
    inset:0;
    z-index:30;
    width:100%;
    height:100%;
    min-width:100%;
    min-height:100%;
    margin:0;
    padding:0;
    border:0;
    border-radius:0;
    background:transparent;
    cursor:pointer;
    touch-action:manipulation;
    -webkit-tap-highlight-color:rgba(239,196,116,.12);
}

.search-touch-cover span{
    position:absolute;
    left:50%;
    bottom:12px;
    transform:translateX(-50%);
    max-width:calc(100% - 24px);
    padding:7px 11px;
    border:1px solid rgba(210,166,105,.55);
    border-radius:999px;
    background:rgba(24,15,10,.86);
    color:#f2dfc5;
    font-size:12px;
    font-weight:700;
    white-space:nowrap;
    pointer-events:none;
    box-shadow:0 4px 14px rgba(0,0,0,.35);
}

.search-scene-touch .search-scene-picture{
    cursor:pointer;
}

.search-scene-touch .search-scene-picture:active{
    box-shadow:0 0 0 2px rgba(239,196,116,.45);
}

@media(max-width:520px){
    .search-touch-cover span{
        bottom:8px;
        font-size:11px;
        white-space:normal;
        text-align:center;
    }
}


/* =========================================================
   v2.71.9 – Schummler
   ========================================================= */
.case-cheat-btn{
    background:#4a2831;
    border-color:#9b5969;
    color:#f1d7dd;
}
.case-cheat-btn:hover:not(:disabled){
    background:#603340;
    border-color:#bf7184;
}
.case-cheat-btn:disabled{
    opacity:.58;
    cursor:not-allowed;
}
.case-cheat-note{
    margin-top:10px;
    padding:9px 11px;
    border:1px solid #69404a;
    border-radius:8px;
    background:#211216;
    color:#ceb9bd;
    font-size:12px;
    line-height:1.45;
}
.case-cheat-note strong{color:#efc2cc}
.case-cheat-note span{color:#bfa5aa}
@media (pointer:coarse), (hover:none){
    .case-cheat-btn{min-height:44px}
}


/* v2.71.11 – neu abgerufenen Fallhinweis kurz hervorheben */
.case-hint-new{
    outline:2px solid currentColor;
    outline-offset:2px;
}

/* =========================================================
   Spielstand sichern / wiederherstellen – v2.71.13
   ========================================================= */
.player-save-tools{
    display:grid;
    gap:7px;
    margin:10px 0 2px;
}
.player-save-tools .player-reset-open{
    margin:0;
}
.player-save-form{
    margin:0;
    padding:0;
}
.player-save-form .player-save-download{
    display:block;
}
.player-save-download{
    width:100%;
    margin:0;
    padding:8px 9px;
    border:1px solid #6d5437;
    border-radius:7px;
    background:#302315;
    color:#ead4ae;
    font-size:12px;
    text-align:left;
}
.player-save-download:hover{
    border-color:#a77a45;
    background:#3a2a19;
}
.player-save-download:disabled{
    opacity:.6;
    cursor:wait;
}
.savegame-restore-box{
    margin-top:22px;
    padding:15px;
    border:1px solid #6d5437;
    border-radius:11px;
    background:#1a110b;
}
.savegame-restore-box>strong{
    display:block;
    color:#efd5aa;
    margin-bottom:6px;
}
.savegame-restore-box>p,
.savegame-restore-box>small{
    color:#bca990;
    line-height:1.5;
}
.savegame-restore-form{
    display:grid;
    gap:8px;
    margin:12px 0 10px;
}
.savegame-restore-form label{
    color:#ddc9b1;
}
.savegame-restore-form input[type=file]{
    width:100%;
    padding:10px;
    border:1px solid #765133;
    border-radius:8px;
    background:#100906;
    color:#f0e2d0;
}
.savegame-restore-form button{
    padding:10px 12px;
}
