
:root{--green:#0f924f;--dark:#10392a;--line:#e3eee7;--bg:#f7faf8;--text:#20342b;--muted:#718478}*{box-sizing:border-box}body{margin:0;background:var(--bg);font:15px/1.5 'DM Sans',system-ui,sans-serif;color:var(--text)}a{color:inherit;text-decoration:none}.header{height:88px;padding:16px max(28px,calc((100vw - 1180px)/2));background:#fff;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--line);gap:18px}.brand img{display:block;width:min(270px,50vw);height:54px;object-fit:contain;object-position:left center}.header nav{display:flex;gap:25px;align-items:center;font-size:13px;font-weight:700}.header nav a:hover{color:var(--green)}.account{background:#ecf8ef;padding:7px 12px;border-radius:100px;color:var(--green)}.container{max-width:1180px;margin:auto;padding:36px 24px 90px;min-height:calc(100vh - 155px)}footer{text-align:center;padding:25px;color:#7b8d80;font-size:12px;border-top:1px solid var(--line);background:#fff}.hero{border-radius:24px;background:linear-gradient(115deg,#0d8045,#20af67);color:white;display:flex;align-items:center;justify-content:space-between;padding:54px 58px;min-height:292px;overflow:hidden;position:relative;box-shadow:0 20px 45px #0b78351a}.hero h1{font-size:clamp(30px,4vw,48px);letter-spacing:-1.7px;line-height:1.17;margin:12px 0}.hero h1 span{color:#d5ffe3}.hero p{opacity:.9;margin-bottom:29px}.hero-mark{font-size:90px;font-weight:800;width:260px;height:170px;border:15px solid #ffffff46;border-radius:80px;display:flex;align-items:center;justify-content:space-around;transform:rotate(-12deg);flex-shrink:0;color:white}.hero-mark span,.control span{font-size:28px;line-height:1.2}.eyebrow{font-size:11px;font-weight:800;letter-spacing:2px;color:var(--green)}.hero .eyebrow{color:#d3ffe6}.button,button{background:var(--green);border:0;border-radius:11px;padding:12px 19px;color:white;display:inline-flex;gap:10px;align-items:center;justify-content:center;font-weight:800;cursor:pointer;font:inherit}.button:hover,button:hover{filter:brightness(.94)}.button.light{background:white;color:var(--green)}.section-head{display:flex;align-items:end;justify-content:space-between;margin:42px 0 19px}.section-head h2,.section-head h1{margin:3px 0;font-size:30px;letter-spacing:-.8px}.count{color:var(--muted)}.filters{display:flex;flex-wrap:wrap;gap:9px;margin-bottom:24px}.chip{padding:8px 15px;background:#fff;border:1px solid var(--line);border-radius:20px;font-size:12px;font-weight:700;color:#476253}.chip:hover,.chip.selected{color:#fff;background:var(--green);border-color:var(--green)}.cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px}.game-card,.card{background:white;border:1px solid var(--line);border-radius:18px;overflow:hidden;box-shadow:0 6px 30px #173b2310}.cover{height:190px;background:linear-gradient(145deg,#185a3d,#0c261e);color:white;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:20px;position:relative;text-align:center}.cover::after{content:'▪ ▪ ▪';position:absolute;right:18px;top:10px;color:#7cdd9b;font-size:21px}.cover img{width:100%;height:100%;object-fit:cover;position:absolute;inset:0}.cover-symbol{font-size:64px}.cover-title{font-size:22px;font-weight:800}.game-info{padding:22px}.system-tag{display:inline-block;padding:5px 10px;background:#edf8f0;color:#168749;font-size:11px;border-radius:8px;font-weight:800}.game-info h3{font-size:22px;margin:12px 0 5px}.game-info p{color:var(--muted);font-size:13px;min-height:55px}.muted{font-size:12px;color:#8c9b90}.login-shell{display:grid;grid-template-columns:1fr 1fr;min-height:550px;gap:0;border-radius:23px;overflow:hidden;box-shadow:0 16px 44px #163a2314;max-width:1000px;margin:30px auto}.login{padding:64px 55px;border:0;border-radius:0}.login h1{font-size:36px;letter-spacing:-1px;margin:10px 0}.login p{color:var(--muted);margin:0 0 35px}.login small{display:block;margin-top:25px;color:#8e9d92}.login-art{background:linear-gradient(140deg,#0b7940,#29bb72);padding:60px 45px;display:flex;align-items:center;flex-direction:column;justify-content:center;color:#fff;text-align:center}.login-art .pixel{font-size:50px;align-self:flex-end;opacity:.4}.control{border:15px solid #ffffffa1;border-radius:90px;width:275px;height:178px;display:flex;justify-content:space-around;align-items:center;font-size:75px;transform:rotate(-10deg);margin-bottom:30px}.login-art h2{font-size:40px;line-height:1.05;letter-spacing:2px}.login-art p{font-size:11px;letter-spacing:3px}.stack{display:grid;gap:15px}.stack label{display:grid;gap:7px;font-size:13px;font-weight:700}input,textarea,select{width:100%;padding:12px 13px;border:1px solid #d7e6dc;border-radius:9px;background:white;color:var(--text);font:inherit}input:focus,select:focus,textarea:focus{outline:2px solid #8fe2ad;border-color:#0e9550}.stack button{margin-top:8px;justify-content:space-between}.notice{padding:14px 18px;background:#e6f8e9;color:#0d7740;border:1px solid #aeebbd;border-radius:11px;margin-bottom:25px}.error{background:#fff0ee;color:#922}.install{max-width:540px;margin:60px auto;padding:35px}.install-logo{width:330px;max-width:100%}.admin-grid{display:grid;grid-template-columns:1fr 1fr;gap:22px}.panel{padding:26px}.panel h2{margin:0 0 5px}.panel p{color:var(--muted);font-size:13px}.mini-list{margin-top:23px;border-top:1px solid var(--line)}.mini-list>div{padding:11px 0;border-bottom:1px solid var(--line)}small{color:var(--muted)}.mini-list small,.admin-game small{display:block}.wide{margin-top:22px}.admin-game{display:flex;align-items:center;gap:12px;border-top:1px solid var(--line);padding:17px 0;flex-wrap:wrap}.admin-game-name{min-width:180px;flex:1}.upload-inline{display:flex;align-items:center;gap:10px;flex:3;flex-wrap:wrap}.upload-inline select{width:150px}.upload-inline input{width:210px;max-width:100%;font-size:12px}.small{padding:9px 12px;font-size:12px}.danger{background:#bf4553}.play-header{display:flex;align-items:end;justify-content:space-between;margin:10px 0 20px}.play-header h1{font-size:32px;margin:12px 0 0}.play-header p{margin:5px 0 0;color:var(--muted)}.back{font-size:13px;color:var(--green);font-weight:700}.game-frame{background:#08130f;border-radius:18px;overflow:hidden;aspect-ratio:16/10;box-shadow:0 12px 30px #103b2f26}.game-frame iframe{height:100%;width:100%;border:0}.helper{font-size:13px;color:var(--muted)}.empty{padding:50px;text-align:center;background:#fff;border-radius:12px}
@media(max-width:850px){.cards{grid-template-columns:repeat(2,minmax(0,1fr))}.admin-grid{grid-template-columns:1fr}.login-shell{grid-template-columns:1fr}.login-art{display:none}.hero-mark{display:none}.header{height:auto;flex-wrap:wrap}.header nav{gap:12px;flex-wrap:wrap}.hero{padding:36px}.container{padding:24px 15px 60px}}@media(max-width:520px){.cards{grid-template-columns:1fr}.login{padding:35px 25px}.game-frame{aspect-ratio:4/5}.hero h1{font-size:34px}.header nav{font-size:11px}}

/* Spielekonsole 1.4 – side navigation, wide gaming area, private PDFs */
:root{--green:#168a51;--green-dark:#0d633c;--green-soft:#e7f7ec;--nav-width:268px;--shadow:0 8px 30px rgba(19,63,38,.07)}
body{font-family:system-ui,-apple-system,'Segoe UI',Arial,sans-serif;background:#f5f9f6}
.app-shell{display:flex;align-items:stretch;min-height:100vh;background:#f5f9f6}
.sidebar{width:var(--nav-width);flex:0 0 var(--nav-width);position:sticky;top:0;height:100vh;display:flex;flex-direction:column;background:#fff;border-right:1px solid #dcece1;z-index:8;box-shadow:3px 0 22px rgba(20,68,40,.035)}
.sidebar-brand{height:106px;display:flex;align-items:center;padding:20px 17px;border-bottom:1px solid #e7f0e9}
.sidebar-brand img{width:100%;max-height:73px;object-fit:contain;object-position:center}
.sidebar-scroll{min-height:0;flex:1;overflow-y:auto;padding:24px 13px 18px}
.nav-heading{color:#8c9f94;font-size:10px;letter-spacing:1.9px;font-weight:800;margin:4px 14px 12px}
.nav-heading-admin{margin-top:30px}
.sidebar-nav{display:flex;flex-direction:column;gap:5px}
.nav-link{width:100%;min-width:0;display:flex;align-items:center;gap:11px;border-radius:12px;border:1px solid transparent;color:#365247;text-align:left;background:transparent;padding:11px 14px;font-size:14px;font-weight:650;cursor:pointer;line-height:1.35}
.sidebar-nav .nav-link span:first-child,.doc-link span:first-child{width:17px;display:inline-flex;justify-content:center;color:#5caa78;font-size:17px;flex-shrink:0}
.nav-link:hover{background:#f0f8f2;color:var(--green-dark)}
.nav-link.active{background:#e6f6eb;color:#126a3f;border-color:#c9ead3}
.nav-link small{font-size:11px;display:inline-flex;align-items:center;justify-content:center;background:#eef4f0;color:#648372;border-radius:30px;min-width:25px;height:23px;margin-left:auto;font-weight:750}
.sidebar-section{margin:29px 0 0;padding:22px 0 0;border-top:1px solid #e7efe9}
.selected-game{margin:0 6px 20px;padding:14px;border-radius:14px;border:1px solid #cce8d6;background:#f1faf4;display:flex;flex-direction:column;gap:9px}
.selected-game strong{font-size:14px;line-height:1.3;overflow-wrap:anywhere;color:#234733}
.selected-game a{font-size:12px;color:#127642;font-weight:800}
.nav-heading-docs{margin-top:12px}
.doc-link{font:inherit;font-size:12.5px;line-height:1.35;padding:11px 10px;gap:9px;border:1px solid #e1efe5;margin:5px 0;background:#fff;border-radius:11px;color:#234c37}
.doc-link .doc-label{min-width:0;flex:1;overflow-wrap:anywhere}
.doc-link>span:last-child{color:#7ba58a;font-size:16px}
.sidebar-hint{font-size:12px;line-height:1.5;color:#81958a;padding:0 14px}
.sidebar-account{display:flex;align-items:center;gap:9px;padding:16px;border-top:1px solid #e3efe7;background:#f9fcfa}
.avatar-circle{width:39px;height:39px;display:flex;align-items:center;justify-content:center;border-radius:11px;background:var(--green);color:#fff;font-weight:800;font-size:17px}
.account-details{flex:1;min-width:0;display:flex;flex-direction:column;line-height:1.4}
.account-details strong{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.account-details small{font-size:11px}
.logout-link{font-weight:900;color:#59876e;font-size:18px;padding:8px}
.mobile-sidebar-toggle{display:none}
.app-shell>.container{flex:1;width:auto;min-width:0;max-width:none;margin:0;padding:26px clamp(18px,2.7vw,44px) 25px;min-height:100vh;display:flex;flex-direction:column}
.app-shell .page-footer{margin-top:auto;border-top:0;background:transparent;padding:32px 0 0;color:#89978d;text-align:center;font-size:11px}
.app-shell .section-head{margin-top:26px}
.app-shell .hero{padding:38px 45px;min-height:225px;border-radius:20px}
.app-shell .hero h1{font-size:clamp(27px,3.5vw,42px)}
.app-shell .game-card{box-shadow:var(--shadow)}
.app-shell .cards{grid-template-columns:repeat(auto-fill,minmax(260px,1fr))}
.game-docs-link{margin-top:14px;display:block;font-size:12px;color:#138a51;font-weight:750}
/* More canvas room: no fixed max-width or 16:10 constraint */
.app-shell>.play-container{padding:16px clamp(12px,1.5vw,26px) 12px}
.play-container .play-header{margin:0 0 12px;align-items:center;gap:12px}
.play-container .play-header h1{font-size:clamp(22px,2.3vw,31px);margin:6px 0 0}
.play-container .play-header p{font-size:12px}
.play-container .game-frame{flex:1;width:100%;height:calc(100dvh - 185px);min-height:520px;aspect-ratio:auto;border-radius:13px;background:#07150f;overflow:hidden;box-shadow:0 7px 22px rgba(9,53,28,.18)}
.play-container .game-frame iframe{display:block;width:100%;height:100%;border:0}
.play-container .helper{font-size:12px;max-width:940px;margin:12px 0 0;color:#6e8275}
.play-container .page-footer{display:none}
/* Fullscreen keeps the sidebar and its PDF resources available */
.app-shell:fullscreen{height:100dvh;overflow:auto;background:#f5f9f6}
.app-shell:fullscreen>.play-container .game-frame{height:calc(100dvh - 160px);min-height:0}
/* PDF preview dialog; game iframe remains mounted and running behind it */
.document-modal{border:1px solid #d7e8dd;border-radius:17px;padding:0;width:min(1180px,94vw);height:min(860px,90dvh);max-width:94vw;max-height:90dvh;overflow:hidden;box-shadow:0 35px 110px rgba(4,34,18,.33);background:white;color:#234633}
.document-modal::backdrop{background:rgba(8,32,18,.62)}
.document-modal[open]{display:flex;flex-direction:column}
.document-modal-head{flex:0 0 auto;padding:13px 18px;background:#fff;border-bottom:1px solid #dcece3;display:flex;align-items:center;justify-content:space-between;gap:12px}
.document-modal-head>div:first-child{min-width:0;display:flex;flex-direction:column;gap:2px}
.document-modal-head strong{font-size:15px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.document-eyebrow{font-size:10px;letter-spacing:1.5px;font-weight:800;color:var(--green)}
.document-actions{display:flex;align-items:center;gap:11px}
.document-actions a{font-size:12px;font-weight:750;color:#11733f}
.document-actions button{font-size:12px;padding:9px 13px}
#documentViewer{border:0;width:100%;flex:1;min-height:0;background:#f5f6f7}
.pdf-admin-game{margin-top:18px;padding:19px 0 0;border-top:1px solid #e5eee8}
.pdf-admin-title{display:flex;align-items:center;gap:12px;justify-content:space-between;margin-bottom:12px}
.pdf-admin-title strong{font-size:15px}
.pdf-admin-title small{font-size:12px}
.pdf-upload-form{display:flex;gap:11px;align-items:center;flex-wrap:wrap}
.pdf-upload-form input[type=text]{flex:1 1 230px;min-width:150px}
.pdf-upload-form input[type=file]{flex:1 1 250px;min-width:190px}
.pdf-upload-form button{flex-shrink:0}
.pdf-admin-list{display:grid;gap:8px;margin-top:13px}
.pdf-admin-item{display:flex;align-items:center;gap:12px;padding:9px 12px;background:#f5faf6;border-radius:11px;font-size:13px;flex-wrap:wrap}
.pdf-admin-item>span{flex:1;min-width:160px;overflow-wrap:anywhere}
.pdf-admin-item>a{font-weight:700;color:var(--green)}
.pdf-admin-item .danger{padding:7px 11px}
.public-container{margin:0 auto;min-height:100vh}
.public-brand{display:block;margin:20px auto 0;max-width:1000px;padding:0 10px}
.public-brand img{width:220px;height:auto;object-fit:contain}
@media(max-width:950px){:root{--nav-width:218px}.sidebar-brand{padding:13px 10px}.sidebar-scroll{padding:20px 8px}.app-shell>.container{padding-left:20px;padding-right:20px}.app-shell .cards{grid-template-columns:repeat(auto-fill,minmax(225px,1fr))}}
@media(max-width:720px){
  .mobile-sidebar-toggle{display:inline-flex;position:fixed;top:12px;left:12px;z-index:12;padding:10px 13px;font-size:12px;box-shadow:0 3px 16px #082b1c35}
  .sidebar{position:fixed;top:0;bottom:0;left:0;width:min(280px,88vw);height:100dvh;transform:translateX(-102%);transition:transform .2s ease;box-shadow:8px 0 40px #092a1940}
  .sidebar.is-open{transform:translateX(0)}
  .sidebar.is-open~.container{filter:none}
  .app-shell>.container{padding-top:65px;padding-left:14px;padding-right:14px;width:100%}
  .app-shell>.play-container{padding-top:65px}
  .play-container .game-frame{height:calc(100dvh - 212px);min-height:380px}
  .play-header{flex-wrap:wrap}
  .app-shell .hero{padding:28px 20px;min-height:180px}
  .app-shell .hero h1{font-size:29px}
  .document-modal{width:98vw;max-width:98vw;height:92dvh;max-height:92dvh}
  .document-modal-head{padding:9px;flex-wrap:wrap}
  .document-actions a{font-size:11px}
  .pdf-upload-form>*{width:100%}
}
