:root{--ink:#f7fbff;--muted:#a8bad0;--cyan:#22d3ee;--blue:#2563eb;--pink:#f472b6;--green:#34d399;--red:#fb7185;--line:rgba(255,255,255,.16)}
*{box-sizing:border-box}html{background:#070713}body{margin:0;min-height:100vh;font-family:Inter,system-ui,sans-serif;color:var(--ink);display:grid;place-items:center;padding:18px;background:radial-gradient(circle at 20% 10%,rgba(34,211,238,.28),transparent 30%),radial-gradient(circle at 80% 12%,rgba(244,114,182,.22),transparent 30%),linear-gradient(135deg,#030712,#0f172a 45%,#111827)}body:before{content:"";position:fixed;inset:0;pointer-events:none;background:linear-gradient(rgba(255,255,255,.025) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.025) 1px,transparent 1px);background-size:46px 46px;mask-image:linear-gradient(to bottom,black,transparent 84%)}.app{width:min(1180px,100%)}.hero,.panel{background:linear-gradient(180deg,rgba(15,23,42,.9),rgba(2,6,23,.88));border:1px solid var(--line);border-radius:30px;box-shadow:0 30px 90px rgba(0,0,0,.5),inset 0 1px 0 rgba(255,255,255,.12);padding:clamp(22px,3.5vw,42px);backdrop-filter:blur(16px);overflow:hidden}.hero{position:relative;text-align:center}.hero:after{content:"🚹";position:absolute;right:7%;top:6%;font-size:120px;opacity:.08}.badge{display:inline-flex;padding:10px 16px;border-radius:999px;border:1px solid rgba(34,211,238,.35);background:rgba(34,211,238,.12);font-weight:900}.hero h1{font-family:Inter,system-ui,sans-serif;font-size:clamp(46px,8vw,100px);line-height:.9;margin:20px 0 16px;letter-spacing:-.035em;text-shadow:0 0 18px rgba(34,211,238,.36)}.hero p{max-width:780px;margin:0 auto;color:#c9d8eb;font-size:18px;line-height:1.6}.actions{display:flex;gap:13px;justify-content:center;flex-wrap:wrap;margin-top:24px}button{border:0;border-radius:16px;padding:14px 18px;font-weight:1000;font-size:15px;cursor:pointer;transition:.16s transform,.16s filter}.primary{background:linear-gradient(135deg,var(--cyan),var(--blue));color:white;box-shadow:0 14px 34px rgba(37,99,235,.32)}.ghost{background:rgba(255,255,255,.08);color:var(--ink);border:1px solid var(--line)}button:hover{transform:translateY(-2px)}button:disabled{opacity:.5;cursor:not-allowed;transform:none}
.panel.game{height:860px;display:grid;grid-template-rows:86px 98px 430px 42px 116px 58px;gap:14px;padding:26px}.hud{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;min-height:0}.hud div{background:linear-gradient(180deg,rgba(255,255,255,.11),rgba(255,255,255,.055));border:1px solid var(--line);border-radius:20px;padding:14px;overflow:hidden}.hud span{display:block;color:#b8c6da;font-size:11px;text-transform:uppercase;letter-spacing:.14em}.hud strong{font-size:30px}.scenario{display:flex;justify-content:space-between;gap:20px;align-items:center;min-height:0}.scenario h2{margin:0 0 6px;font-size:28px;white-space:nowrap}.scenario p{margin:0;color:#c3d0e2;line-height:1.42;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.pressure{padding:11px 16px;border-radius:999px;background:rgba(52,211,153,.15);color:#bbf7d0;border:1px solid rgba(52,211,153,.32);font-weight:1000;white-space:nowrap}
.restroom{position:relative;height:430px;min-height:430px;display:grid;grid-template-rows:repeat(3,1fr);gap:12px;padding:34px 24px 24px;background:linear-gradient(180deg,#172033,#0c1424 62%,#08101d);border:1px solid var(--line);border-radius:26px;box-shadow:inset 0 18px 40px rgba(255,255,255,.035),inset 0 -20px 70px rgba(0,0,0,.28);overflow:hidden}.restroom:after{content:"MEN'S ROOM ETIQUETTE TEST";position:absolute;top:10px;left:50%;transform:translateX(-50%);color:rgba(255,255,255,.18);font-size:11px;font-weight:1000;letter-spacing:.22em;white-space:nowrap}.wall{display:grid;grid-template-columns:92px 1fr;gap:14px;align-items:center;min-height:0;padding:8px;border:1px solid rgba(255,255,255,.08);border-radius:18px;background:linear-gradient(90deg,rgba(255,255,255,.055),rgba(255,255,255,.025));opacity:1}.wall.inactive{opacity:.16}.wallLabel{font-weight:1000;letter-spacing:.1em;text-transform:uppercase;color:#cffafe;font-size:11px;writing-mode:vertical-rl;transform:rotate(180deg);justify-self:center}.wallRow{display:grid;grid-template-columns:repeat(10,minmax(0,1fr));gap:10px;align-items:end;height:100%;min-width:0}.slot,.urinal{height:100%;min-height:0}.spacer{visibility:hidden}.urinal{appearance:none;border-radius:20px 20px 26px 26px;border:2px solid rgba(219,234,254,.65);background:linear-gradient(180deg,#f8fbff 0%,#dbeafe 50%,#93c5fd 100%);position:relative;color:#082f49;display:grid;place-items:end center;padding:9px 3px;font-weight:1000;font-size:16px;box-shadow:inset 0 -16px 0 rgba(37,99,235,.12),inset 0 3px 8px rgba(255,255,255,.9),0 10px 18px rgba(0,0,0,.28);isolation:isolate}.urinal:before{content:"";position:absolute;top:12px;width:48%;height:42%;border-radius:0 0 999px 999px;background:radial-gradient(circle at 50% 20%,#fff,rgba(255,255,255,.72));border:2px solid rgba(8,47,73,.13)}.urinal.free:hover{outline:3px solid rgba(34,211,238,.55);transform:translateY(-2px)}.urinal.occupied{background:linear-gradient(180deg,#475569,#1f2937);border-color:#64748b;color:#cbd5e1}.urinal.occupied:after{content:"🧍";position:absolute;top:-20px;font-size:30px;text-shadow:0 8px 18px rgba(0,0,0,.45)}.urinal.correct{outline:4px solid var(--green);animation:pop .28s ease}.urinal.wrong{outline:4px solid var(--red);animation:shake .3s ease}.urinal.bestHint{box-shadow:inset 0 -16px 0 rgba(37,99,235,.12),0 0 0 5px rgba(52,211,153,.45),0 0 26px rgba(52,211,153,.45)}@keyframes pop{50%{transform:scale(1.05)}}@keyframes shake{25%{transform:translateX(-4px)}55%{transform:translateX(4px)}80%{transform:translateX(-2px)}}
.legend{display:flex;gap:14px;justify-content:center;align-items:center;margin:0;color:#bfd0e3;flex-wrap:wrap;min-height:0}.legend span{padding:6px 10px;border-radius:999px;background:rgba(255,255,255,.055);border:1px solid rgba(255,255,255,.08)}.legend i{display:inline-block;width:13px;height:13px;border-radius:4px;margin-right:7px;vertical-align:-2px}.legend .free{background:#93c5fd}.legend .occupied{background:#475569}.legend .chosen{background:#34d399}.feedback{height:116px;display:grid;grid-template-columns:52px 1fr;gap:14px;align-items:center;background:linear-gradient(180deg,rgba(255,255,255,.09),rgba(255,255,255,.055));border:1px solid var(--line);border-radius:20px;padding:16px 18px;color:#dcecff;overflow:hidden}.feedback .resultIcon{width:46px;height:46px;display:grid;place-items:center;border-radius:15px;background:rgba(255,255,255,.11);font-size:25px}.feedback b{display:block;font-size:18px;margin-bottom:4px}.feedback span{display:block;color:#dbeafe;line-height:1.32;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.feedback small{display:block;color:#9fb3c8;margin-top:6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.feedback.good{border-color:rgba(52,211,153,.55);background:rgba(52,211,153,.14)}.feedback.bad{border-color:rgba(251,113,133,.55);background:rgba(251,113,133,.14)}.actions.bottom{margin:0;align-items:center}.rules{max-width:820px;margin:20px auto}.rules h2,.end h2{font-size:34px;margin-top:0}.rules li{margin:13px 0;color:#dbeafe;line-height:1.55}.end{text-align:center;max-width:720px;margin:20px auto}.end p{font-size:20px;color:#dbeafe;line-height:1.55}
@media(max-width:760px){body{padding:10px;place-items:start center}.hero,.panel{border-radius:22px;padding:20px}.hero h1{font-size:52px}.panel.game{height:820px;grid-template-rows:150px 124px 344px 38px 126px 58px;padding:14px;gap:10px}.hud{grid-template-columns:repeat(2,1fr);gap:10px}.hud div{padding:11px}.hud strong{font-size:24px}.scenario{align-items:flex-start;flex-direction:column;gap:8px}.scenario h2{white-space:normal;font-size:23px}.pressure{white-space:normal}.restroom{height:344px;min-height:344px;padding:30px 10px 12px;gap:8px}.restroom:after{font-size:8px;letter-spacing:.14em}.wall{grid-template-columns:64px 1fr;gap:8px;padding:6px}.wallLabel{font-size:9px}.wallRow{gap:5px}.urinal{border-radius:14px 14px 19px 19px;font-size:12px;padding:5px 1px}.urinal:before{top:8px;border-width:1px}.urinal.occupied:after{font-size:22px;top:-16px}.legend{font-size:12px;gap:6px}.feedback{height:126px;grid-template-columns:40px 1fr;padding:12px;gap:10px}.feedback .resultIcon{width:36px;height:36px;border-radius:12px;font-size:20px}.feedback b{font-size:15px}.feedback span{-webkit-line-clamp:3;font-size:13px}.feedback small{font-size:12px}}

/* v5: no page-scroll layout; every row fits inside the panel */
.panel.game{height:800px;grid-template-rows:70px 76px 360px 30px 100px 48px;gap:10px;padding:20px}.hud strong{font-size:26px}.scenario h2{font-size:24px}.restroom{height:360px;min-height:360px;padding:30px 20px 18px;gap:10px}.wall{grid-template-columns:82px 1fr;padding:7px}.wallRow{gap:8px}.urinal{font-size:14px;border-radius:17px 17px 22px 22px}.urinal.occupied:after{font-size:25px;top:-17px}.legend{font-size:13px}.feedback{height:100px;grid-template-columns:46px 1fr;padding:13px 16px}.feedback .resultIcon{width:40px;height:40px;font-size:22px}.feedback b{font-size:16px}.feedback span{font-size:14px}.feedback small{font-size:12px}.actions.bottom{height:48px}@media(max-width:760px){.panel.game{height:780px;grid-template-rows:138px 112px 310px 32px 112px 44px;padding:12px;gap:8px}.restroom{height:310px;min-height:310px;padding:28px 8px 10px;gap:6px}.wall{grid-template-columns:56px 1fr;gap:6px}.wallRow{gap:4px}.feedback{height:112px}.actions.bottom{height:44px}}

/* v6: mobile grid rows fit inside fixed panel */
@media(max-width:760px){.panel.game{height:820px}}

/* v7: Grundriss statt Listenlayout */
.restroom{display:grid;grid-template-columns:minmax(0,1fr) 104px;grid-template-rows:96px minmax(0,1fr) 96px;grid-template-areas:"north east" "floor east" "south east";gap:12px;padding:34px 22px 20px;background:linear-gradient(180deg,#172033,#0b1220 62%,#070d18);overflow:hidden}.restroom:before{content:"";grid-area:floor;border-radius:24px;background:radial-gradient(circle at 50% 45%,rgba(34,211,238,.1),transparent 45%),repeating-linear-gradient(45deg,rgba(255,255,255,.035) 0 10px,rgba(255,255,255,.018) 10px 20px);border:1px dashed rgba(255,255,255,.12);box-shadow:inset 0 0 50px rgba(0,0,0,.22)}.wall{display:grid;grid-template-columns:1fr;grid-template-rows:22px 1fr;gap:6px;padding:8px;border-radius:18px;border:1px solid rgba(255,255,255,.12);background:linear-gradient(180deg,rgba(255,255,255,.075),rgba(255,255,255,.032));min-height:0}.wall.north{grid-area:north}.wall.east{grid-area:east}.wall.south{grid-area:south}.wall.inactive{opacity:.13}.wallLabel{writing-mode:horizontal-tb;transform:none;justify-self:start;align-self:center;font-size:10px;letter-spacing:.12em;color:#cffafe;padding:2px 8px;border-radius:999px;background:rgba(34,211,238,.1);border:1px solid rgba(34,211,238,.16)}.wallRow{height:100%;display:grid;gap:7px;align-items:center;justify-content:stretch;min-width:0}.wall.north .wallRow,.wall.south .wallRow{grid-template-columns:repeat(10,minmax(0,1fr));grid-template-rows:1fr}.wall.east .wallRow{grid-template-columns:1fr;grid-template-rows:repeat(10,minmax(0,1fr))}.wall.east .urinal{height:100%;width:100%;min-width:0}.slot,.urinal{height:100%;min-width:0}.urinal{border-radius:12px;background:linear-gradient(180deg,#f8fbff,#bfdbfe 55%,#60a5fa);font-size:12px;padding:2px;box-shadow:inset 0 -9px 0 rgba(37,99,235,.13),inset 0 2px 6px rgba(255,255,255,.86),0 8px 14px rgba(0,0,0,.22)}.urinal:before{top:7px;width:42%;height:38%;border-width:1px}.urinal.occupied:after{font-size:21px;top:-13px}.wall.east .urinal.occupied:after{top:-10px;left:50%;transform:translateX(-50%)}.wall.east .urinal:before{top:50%;left:8px;width:34%;height:42%;transform:translateY(-50%);border-radius:0 999px 999px 0}.restroom:after{font-size:10px;top:9px}.panel.game{grid-template-rows:70px 76px 360px 30px 100px 48px}@media(max-width:760px){.panel.game{height:760px;grid-template-rows:132px 98px 292px 30px 112px 44px}.restroom{height:292px;min-height:292px;grid-template-columns:minmax(0,1fr) 72px;grid-template-rows:74px minmax(0,1fr) 74px;gap:7px;padding:28px 8px 10px}.wall{border-radius:14px;padding:5px;grid-template-rows:18px 1fr;gap:4px}.wallLabel{font-size:8px;padding:1px 6px}.wallRow{gap:3px}.urinal{font-size:10px;border-radius:9px;border-width:1px}.urinal:before{top:5px}.urinal.occupied:after{font-size:16px;top:-11px}.wall.east .urinal:before{left:5px}.restroom:after{font-size:7px;letter-spacing:.12em}.feedback span{-webkit-line-clamp:3}}

/* v8: mobile floorplan rows fit exactly; no vertical shift */
@media(max-width:760px){.panel.game{height:792px}}

/* v9: spielerischer moderner Grundriss mit vier Wänden */
.panel.game{height:900px;grid-template-rows:74px 82px 520px 34px 104px 50px;gap:12px;padding:24px;background:linear-gradient(180deg,rgba(8,13,28,.94),rgba(3,7,18,.92))}.scenario h2{font-size:28px}.restroom{height:520px;min-height:520px;display:grid;grid-template-columns:132px minmax(0,1fr) 132px;grid-template-rows:128px minmax(0,1fr) 128px;grid-template-areas:"cornerA north cornerB" "west floor east" "cornerC south cornerD";gap:14px;padding:24px;background:linear-gradient(145deg,#111827,#0b1220 55%,#060b14);border:2px solid rgba(148,163,184,.22);border-radius:34px;box-shadow:inset 0 0 0 10px rgba(255,255,255,.025),inset 0 0 80px rgba(34,211,238,.08),0 24px 70px rgba(0,0,0,.38);overflow:hidden}.restroom:before{content:"";grid-area:floor;border-radius:30px;background:radial-gradient(circle at 48% 42%,rgba(34,211,238,.18),transparent 34%),linear-gradient(135deg,rgba(15,23,42,.95),rgba(30,41,59,.55)),repeating-linear-gradient(45deg,rgba(255,255,255,.055) 0 18px,rgba(255,255,255,.025) 18px 36px);border:2px dashed rgba(34,211,238,.22);box-shadow:inset 0 0 45px rgba(0,0,0,.28)}.restroom:after{content:"ETIQUETTE FLOORPLAN";top:50%;left:50%;transform:translate(-50%,-50%);font-size:18px;letter-spacing:.28em;color:rgba(255,255,255,.08);z-index:0;pointer-events:none}.wall{position:relative;z-index:2;border-radius:26px;border:1px solid rgba(125,211,252,.22);background:linear-gradient(180deg,rgba(15,23,42,.94),rgba(30,41,59,.78));box-shadow:inset 0 1px 0 rgba(255,255,255,.12),0 12px 26px rgba(0,0,0,.22);padding:10px;display:grid;gap:8px}.wall.north{grid-area:north;grid-template-rows:24px 1fr}.wall.east{grid-area:east;grid-template-rows:24px 1fr}.wall.south{grid-area:south;grid-template-rows:24px 1fr}.wall.west{grid-area:west;grid-template-rows:24px 1fr}.wall.inactive{opacity:.18;filter:saturate(.35)}.wallLabel{font-size:11px;letter-spacing:.16em;color:#e0f2fe;background:linear-gradient(90deg,rgba(34,211,238,.18),rgba(59,130,246,.12));border:1px solid rgba(34,211,238,.22);justify-self:center;align-self:center;text-align:center;writing-mode:horizontal-tb;transform:none}.wallRow{display:grid;height:100%;gap:10px;min-width:0;align-items:stretch}.wall.north .wallRow,.wall.south .wallRow{grid-template-columns:repeat(8,minmax(0,1fr));grid-template-rows:1fr}.wall.east .wallRow,.wall.west .wallRow{grid-template-columns:1fr;grid-template-rows:repeat(8,minmax(0,1fr))}.slot,.urinal{height:100%;width:100%;min-width:0}.urinal{border-radius:18px;border:2px solid rgba(226,232,240,.78);background:linear-gradient(180deg,#ffffff,#dbeafe 48%,#7dd3fc);font-size:15px;padding:4px;color:#082f49;box-shadow:inset 0 -13px 0 rgba(14,165,233,.14),inset 0 3px 8px rgba(255,255,255,.92),0 9px 18px rgba(0,0,0,.28)}.urinal:before{top:11px;width:44%;height:39%;border-radius:0 0 999px 999px;background:radial-gradient(circle at 50% 20%,#fff,rgba(240,249,255,.72));border:1px solid rgba(8,47,73,.16)}.wall.east .urinal:before,.wall.west .urinal:before{top:50%;width:35%;height:44%;transform:translateY(-50%)}.wall.east .urinal:before{left:8px;border-radius:0 999px 999px 0}.wall.west .urinal:before{right:8px;left:auto;border-radius:999px 0 0 999px}.urinal.free:hover{outline:4px solid rgba(34,211,238,.65);transform:scale(1.04);box-shadow:inset 0 -13px 0 rgba(14,165,233,.14),0 0 24px rgba(34,211,238,.38)}.urinal.occupied{background:linear-gradient(180deg,#64748b,#263241);border-color:#94a3b8;color:#dbeafe}.urinal.occupied:after{font-size:24px;top:-17px}.wall.east .urinal.occupied:after,.wall.west .urinal.occupied:after{top:50%;left:50%;transform:translate(-50%,-50%);font-size:19px}.feedback{height:104px}.legend{font-size:14px}@media(max-width:760px){.panel.game{height:800px;grid-template-rows:116px 94px 342px 30px 112px 44px;padding:12px;gap:8px}.scenario h2{font-size:21px}.restroom{height:342px;min-height:342px;grid-template-columns:70px minmax(0,1fr) 70px;grid-template-rows:82px minmax(0,1fr) 82px;gap:7px;padding:10px;border-radius:24px}.restroom:after{font-size:10px;letter-spacing:.14em}.wall{border-radius:15px;padding:5px;gap:4px;grid-template-rows:16px 1fr!important}.wallLabel{font-size:7px;letter-spacing:.09em;padding:1px 4px}.wallRow{gap:3px}.urinal{border-radius:9px;font-size:9px;border-width:1px;padding:1px}.urinal:before{top:5px;border-width:1px}.wall.east .urinal:before,.wall.west .urinal:before{left:4px}.wall.west .urinal:before{right:4px;left:auto}.urinal.occupied:after{font-size:14px;top:-10px}.wall.east .urinal.occupied:after,.wall.west .urinal.occupied:after{font-size:13px}.feedback{height:112px}.legend{font-size:11px}}

/* v10: anchor game to top so browser/focus never recenters the board */
body{place-items:start center}.panel.game{margin-top:0}

/* v11: final fitted Grundriss dimensions */
.panel.game{height:940px;grid-template-rows:70px 74px 500px 30px 100px 48px}.restroom{height:500px;min-height:500px}.feedback{height:100px}.actions.bottom{height:48px}@media(max-width:760px){.panel.game{height:820px}}

/* v12: restore compact mobile floorplan after desktop enlargement */
@media(max-width:760px){.panel.game{height:820px;grid-template-rows:116px 94px 342px 30px 112px 44px}.restroom{height:342px;min-height:342px;grid-template-columns:70px minmax(0,1fr) 70px;grid-template-rows:82px minmax(0,1fr) 82px}.feedback{height:112px}.actions.bottom{height:44px}}

/* v13: absolute floorplan coordinates, no grid reflow possible */
.restroom{position:relative!important;display:block!important}.restroom:before{position:absolute;left:166px;right:166px;top:166px;bottom:166px;grid-area:auto}.wall{position:absolute!important;display:grid!important}.wall.north{left:156px;right:156px;top:24px;height:128px;width:auto}.wall.south{left:156px;right:156px;bottom:24px;height:128px;width:auto}.wall.west{left:24px;top:166px;bottom:166px;width:132px;height:auto}.wall.east{right:24px;top:166px;bottom:166px;width:132px;height:auto}.wall.north .wallRow,.wall.south .wallRow{grid-template-columns:repeat(8,minmax(0,1fr));grid-template-rows:1fr}.wall.east .wallRow,.wall.west .wallRow{grid-template-columns:1fr;grid-template-rows:repeat(8,minmax(0,1fr))}@media(max-width:760px){.restroom:before{left:88px;right:88px;top:100px;bottom:100px}.wall.north{left:86px;right:86px;top:10px;height:82px}.wall.south{left:86px;right:86px;bottom:10px;height:82px}.wall.west{left:8px;top:100px;bottom:100px;width:70px}.wall.east{right:8px;top:100px;bottom:100px;width:70px}}
