html,body{
 margin:0;
 height:100%;
 overflow:hidden;
 font-family:Verdana,sans-serif;
}

body{
 background:#111;
}

:root{
 --room-width:1536px;
 --room-height:1024px;
 --room-scale:1;
 --paper:#fff4da;
 --ink:#20160c;
 --line:#8e6b3a;
 --green:#263d29;
 --gold:#d7a93e;
 --touch:48px;
 --pausenhof-bg:url('Kameraden/pausenhof.webp');
}

button{
 font:inherit;
 min-height:var(--touch);
 border:0;
 border-radius:8px;
 padding:10px 14px;
 background:var(--green);
 color:white;
 cursor:pointer;
 box-shadow:0 2px 0 rgba(0,0,0,.35);
}

button:disabled{
 cursor:not-allowed;
 opacity:.62;
 filter:saturate(.65);
}

button:active:not(:disabled):not(.slot){
 transform:translateY(1px);
}

#scene{
 position:fixed;
 left:50%;
 top:50%;
 width:var(--room-width);
 height:var(--room-height);
 transform:translate(-50%,-50%) scale(var(--room-scale));
 transform-origin:center;
 background:var(--pausenhof-bg) center center / 100% 100% no-repeat;
 image-rendering:pixelated;
}

#ui{
 position:fixed;
 left:50%;
 top:50%;
 width:var(--room-width);
 height:var(--room-height);
 transform:translate(-50%,-50%) scale(var(--room-scale));
 transform-origin:center;
}

#backBtn{
 position:absolute;
 left:2%;
 top:2%;
 min-width:136px;
 z-index:100;
}

#languageBtn{
 position:absolute;
 right:2%;
 top:2%;
 min-width:96px;
 padding:8px 10px;
 z-index:160;
 background:rgba(255,248,232,.94);
 color:#151515;
 border:1px solid rgba(142,107,58,.7);
 font-weight:bold;
 box-shadow:2px 2px 8px rgba(0,0,0,.35);
}

#goldPill{
 position:absolute;
 right:2%;
 top:9%;
 min-width:110px;
 padding:9px 12px;
 border-radius:8px;
 background:rgba(255,248,232,.94);
 color:#17110a;
 font-weight:bold;
 border:1px solid rgba(142,107,58,.7);
 box-shadow:2px 2px 8px rgba(0,0,0,.35);
 z-index:140;
}

#prestigePill{
 position:absolute;
 right:2%;
 top:15%;
 min-width:110px;
 padding:9px 12px;
 border-radius:8px;
 background:rgba(255,248,232,.94);
 color:#17110a;
 font-weight:bold;
 border:1px solid rgba(142,107,58,.7);
 box-shadow:2px 2px 8px rgba(0,0,0,.35);
 z-index:140;
}

#sobSyncMount{
 position:absolute;
 right:2%;
 bottom:18%;
 width:270px;
 z-index:120;
}

#studyGroupPanel{
 position:absolute;
 right:2%;
 top:42.5%;
 width:300px;
 padding:10px;
 box-sizing:border-box;
 background:rgba(255,248,232,.94);
 color:#17110a;
 border:2px solid rgba(142,107,58,.75);
 border-radius:8px;
 box-shadow:0 8px 22px rgba(0,0,0,.35);
 z-index:145;
}

#studyGroupPanel b{
 display:block;
 margin-bottom:4px;
}

#studyGroupPanel p{
 margin:0 0 8px;
 color:#665238;
 font-size:13px;
 line-height:1.25;
}

.studySlots{
 display:grid;
 grid-template-columns:repeat(3,1fr);
 gap:7px;
}

.studySlot{
 min-height:92px;
 padding:6px;
 display:grid;
 align-content:start;
 justify-items:center;
 gap:3px;
 background:rgba(38,61,41,.94);
 color:#fff8e8;
 border:1px solid rgba(142,107,58,.85);
 border-radius:8px;
 box-shadow:0 3px 8px rgba(0,0,0,.28);
}

.studySlot img{
 width:46px;
 height:46px;
 object-fit:contain;
 filter:drop-shadow(0 3px 3px rgba(0,0,0,.35));
}

.studySlot span{
 max-width:100%;
 font-size:12px;
 font-weight:bold;
 white-space:nowrap;
 overflow:hidden;
 text-overflow:ellipsis;
}

.studySlot small{
 max-width:100%;
 color:#f0d8a6;
 font-size:10px;
 line-height:1.15;
 display:-webkit-box;
 -webkit-line-clamp:2;
 -webkit-box-orient:vertical;
 overflow:hidden;
}

.studyEmptyMark{
 width:46px;
 height:46px;
 display:grid;
 place-items:center;
 border:1px dashed rgba(255,248,232,.72);
 border-radius:50%;
 font-size:24px;
}

.studyGroupMenu{
 position:absolute;
 right:0;
 top:calc(100% + 6px);
 width:300px;
 max-height:340px;
 overflow-y:auto;
 overscroll-behavior:contain;
 padding:10px;
 box-sizing:border-box;
 background:rgba(255,248,232,.98);
 border:2px solid rgba(142,107,58,.85);
 border-radius:8px;
 box-shadow:0 10px 26px rgba(0,0,0,.42);
}

.studyGroupMenu strong{
 display:block;
 margin-bottom:8px;
}

.studyGroupMenu button{
 width:100%;
 margin:5px 0;
 display:grid;
 grid-template-columns:42px 1fr;
 gap:8px;
 align-items:center;
 text-align:left;
 background:#263d29;
}

.studyGroupMenu button[data-study-clear]{
 display:block;
 text-align:center;
 background:#8e6b3a;
}

.studyGroupMenu img{
 width:38px;
 height:38px;
 object-fit:contain;
}

.studyGroupMenu small{
 display:block;
 color:#f0d8a6;
 font-size:11px;
 line-height:1.2;
}

#yardTitle{
 position:absolute;
 left:50%;
 top:3%;
 transform:translateX(-50%);
 min-width:420px;
 padding:12px 24px;
 background:rgba(24,35,25,.92);
 color:#fff8e8;
 border:3px solid #8e6b3a;
 border-radius:8px;
 box-shadow:0 8px 22px rgba(0,0,0,.45);
 text-align:center;
 text-shadow:2px 2px 3px #000;
 z-index:70;
}

#yardTitle h1{
 margin:0;
 font-size:32px;
 line-height:1.1;
}

#yardTitle p{
 margin:6px 0 0;
 font-size:15px;
 color:#f0d8a6;
}

#legend{
 position:absolute;
 left:2%;
 top:14%;
 width:280px;
 padding:14px;
 background:rgba(255,248,232,.92);
 color:#17110a;
 border:2px solid rgba(142,107,58,.75);
 border-radius:8px;
 box-shadow:0 8px 22px rgba(0,0,0,.35);
 z-index:90;
}

#legend b{
 display:block;
 margin-bottom:8px;
}

.legendRow{
 display:grid;
 grid-template-columns:30px 1fr;
 gap:8px;
 align-items:center;
 margin:7px 0;
 font-size:14px;
}

#detailPanel{
 position:absolute;
 left:50%;
 bottom:5.5%;
 transform:translateX(-50%);
 width:760px;
 min-height:0;
 max-height:210px;
 padding:14px;
 box-sizing:border-box;
 background:rgba(255,248,232,.95);
 color:#17110a;
 border:3px solid #8e6b3a;
 border-radius:8px;
 box-shadow:0 10px 26px rgba(0,0,0,.45);
 z-index:120;
 pointer-events:none;
 display:grid;
 grid-template-columns:1.05fr 1fr 190px;
 gap:14px;
 align-items:start;
}

#detailPanel.isFocused{
 box-shadow:0 16px 34px rgba(0,0,0,.38),0 0 0 5px rgba(215,169,62,.55);
}

#detailPanel h2{
 margin:0 0 6px;
 font-size:22px;
 line-height:1.1;
}

#detailPanel p{
 margin:5px 0;
 line-height:1.28;
}

#detailPanel .muted{
 color:#665238;
 font-size:14px;
}

#detailPanel .detailMain,
#detailPanel .detailTasks,
#detailPanel .detailAction{
 min-width:0;
}

#detailPanel .detailMain p{
 font-size:15px;
}

#detailPanel .detailTasks p{
 font-size:14px;
}

#detailPanel .cost{
 display:block;
 margin:0 0 10px;
 padding:6px 9px;
 border-radius:7px;
 background:#f1d18a;
 font-weight:bold;
 text-align:center;
}

#inviteBtn{
 width:100%;
 margin-top:0;
 pointer-events:auto;
}

.slot{
 position:absolute;
 width:132px;
 height:132px;
 transform:translate(-50%,-50%);
 background:transparent;
 border:0;
 padding:0;
 min-height:132px;
 border-radius:50%;
 box-shadow:none;
 display:grid;
 place-items:center;
 z-index:60;
 touch-action:manipulation;
}

.companion-ersti-eule{left:30%;top:36%}
.companion-wuerfelkind-fuchs{left:17%;top:59%}
.companion-archivgeist-axolotl{left:43%;top:36%}
.companion-pausenkumpel-tanuki{left:10%;top:46%}
.companion-goldstreber-maus{left:76%;top:44%}
.companion-streber-molch{left:52%;top:46%}
.companion-stundenlaeufer-hase{left:60%;top:44%}
.companion-sammlerin-eichhorn{left:70%;top:68%}
.companion-trophaeenstreber-schildkroete{left:90%;top:54%}
.companion-bakl-lotse{left:33%;top:68%}
.companion-klassenbuch-kauz{left:50%;top:72%}
.companion-radar-motte{left:84%;top:72%}

.slot:active{
 transform:translate(-50%,-50%);
}

.slot > *{
 pointer-events:none;
}

.slot:focus-visible{
 outline:4px solid rgba(255,248,232,.95);
 outline-offset:6px;
}

.slot:hover .sprite{
 filter:drop-shadow(0 8px 7px rgba(0,0,0,.45)) drop-shadow(0 0 8px rgba(255,248,232,.55));
}

.slot:hover .silhouette{
 filter:brightness(0) drop-shadow(0 7px 6px rgba(0,0,0,.55)) drop-shadow(0 0 8px rgba(255,248,232,.45));
}

.slot:hover .clue{
 box-shadow:0 6px 16px rgba(0,0,0,.32),0 0 0 3px rgba(255,248,232,.45);
}

.sprite{
 width:128px;
 height:128px;
 object-fit:contain;
 transition:filter .16s ease;
 filter:drop-shadow(0 8px 7px rgba(0,0,0,.45));
}

.silhouette{
 width:118px;
 height:118px;
 object-fit:contain;
 transition:filter .16s ease;
 filter:brightness(0) drop-shadow(0 7px 6px rgba(0,0,0,.55));
 opacity:.72;
}

.clue{
 width:72px;
 height:72px;
 display:grid;
 place-items:center;
 border-radius:50%;
 background:rgba(255,248,232,.78);
 border:2px dashed rgba(74,52,26,.65);
 color:#2b2115;
 font-size:32px;
 transition:box-shadow .16s ease;
 box-shadow:0 6px 16px rgba(0,0,0,.32);
}

.stateTag{
 position:absolute;
 left:50%;
 bottom:-12px;
 transform:translateX(-50%);
 min-width:88px;
 padding:4px 7px;
 border-radius:999px;
 background:rgba(24,35,25,.9);
 color:white;
 font-size:12px;
 font-weight:bold;
 text-align:center;
 text-shadow:none;
}

.slot.hidden .stateTag{
 background:rgba(255,248,232,.9);
 color:#17110a;
}

.slot.ready .stateTag{
 background:rgba(215,169,62,.95);
 color:#17110a;
}

.slot.invited .stateTag{
 background:rgba(38,61,41,.96);
}

.privacyLink{
 position:absolute;
 left:50%;
 bottom:2%;
 transform:translateX(-50%);
 color:white;
 font-size:14px;
 text-shadow:1px 1px 3px black;
 z-index:120;
}

#studyInvitationNotice:not([hidden]){position:fixed;z-index:500;bottom:24px;left:50%;transform:translateX(-50%);box-sizing:border-box;width:max-content;max-width:calc(100vw - 32px);padding:14px 20px;border:1px solid #f8dfa5;border-radius:13px;background:#e6cd90;color:#18241b;font-size:13px;line-height:1.5;text-align:center;box-shadow:0 12px 40px #0006;}
