
*{box-sizing:border-box}body{margin:0;background:#f3f1eb;color:#233a35;font-family:system-ui,sans-serif}main{max-width:950px;margin:auto;padding:28px 20px}header{display:flex;justify-content:space-between;align-items:center;gap:16px}.brand{font-weight:850;font-size:23px}.badge{background:#e0e8db;border-radius:30px;padding:8px 14px;font-size:13px;font-weight:700}h1{font-size:clamp(32px,6vw,54px);letter-spacing:-2px;margin:35px 0 8px}p{line-height:1.6}.muted{color:#65766e}.toolbar{display:flex;gap:12px;flex-wrap:wrap;align-items:center;margin:22px 0}.stat{background:white;border-radius:14px;padding:12px 18px}button,select{font:inherit}button{cursor:pointer;border:0;border-radius:14px;padding:14px 22px;background:#233a35;color:white;font-weight:750}button:disabled{cursor:default;opacity:.5}button:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline:3px solid #dd7f37;outline-offset:4px}select{border:1px solid #cbd3ca;background:white;padding:10px;border-radius:12px}.stage{height:340px;position:relative;overflow:hidden;background:#e5ede4;border:1px solid #cedbce;border-radius:25px;background-image:radial-gradient(#c2d1c0 1px,transparent 1px);background-size:24px 24px}.stage:after{content:'';position:absolute;bottom:0;left:0;right:0;height:5px;background:#d89857}.word{position:absolute;top:0;left:50%;transform:translate(-50%,-110%);background:white;padding:16px 28px;border-radius:17px;box-shadow:0 8px 25px #233a3514;font-weight:800;font-size:clamp(22px,4vw,32px);white-space:nowrap}.overlay{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:25px;background:#e5ede4eb;z-index:2}.symbol{font-size:70px;font-weight:900;line-height:1.2}.overlay h2{margin:12px 0 4px}.overlay p{margin:6px 0 18px}.answers{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-top:18px}.answer{background:white;color:#233a35;min-height:80px;border:2px solid #dbe0d5;font-size:19px;overflow-wrap:anywhere}.answer:hover:not(:disabled){border-color:#233a35;transform:translateY(-2px)}.answer.correct{background:#d4edda;border-color:#398454}.answer.wrong{background:#f8dddd;border-color:#bc5656}.hint{text-align:center;font-size:13px;color:#65766e}details{margin-top:28px;border-top:1px solid #d3d9ce;padding-top:20px}summary{cursor:pointer;font-weight:700}textarea{width:100%;min-height:170px;border:1px solid #cad3c6;border-radius:14px;padding:15px;font:15px/1.7 monospace;background:#fff;margin:8px 0 12px}.notice{font-size:14px;color:#876134}footer{font-size:12px;color:#788579;margin-top:30px}@media(max-width:540px){main{padding:20px 14px}.answers{gap:8px}.answer{padding:12px 6px;font-size:16px}.stage{height:300px}h1{margin-top:25px}.stat{padding:10px 12px}}
.word{max-width:calc(100% - 24px);white-space:normal;text-align:center;width:max-content;font-size:clamp(19px,3.4vw,30px)}
body{background:var(--page-color,linear-gradient(135deg,#d4b3ff 0%,#f6acd2 48%,#95c9fa 100%));color:var(--page-text,#34304f);min-height:100vh;background-attachment:fixed}
.brand{color:#b62c88}.badge{background:#ffe18c;color:#654511}
.muted,.hint,footer{color:var(--page-text,#706584)}
button{background:#ab328c;color:#fff}
button:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline-color:#7554d6}
.stat{background:#fff;border:1px solid #edddf5;box-shadow:0 4px 12px #8259b00a}
.stat:first-child{background:#fff0d0}.stat:nth-child(2){background:#eee7ff}
select{border-color:#d9c9ed;color:#34304f}
.stage{background-color:var(--field-color,#c5a3ef);border-color:#9983bc;background-image:radial-gradient(#ffffff65 1.5px,transparent 1.5px);background-size:24px 24px}
.stage:after{background:linear-gradient(90deg,#ee72b3,#ffd56c,#79b5f3,#a888e9)}
.word{background:var(--word-color,#ffffff);color:var(--word-text,#56377f);border:2px solid #d7b9ef;box-shadow:0 8px 25px #8051ad20}
.overlay{background:var(--field-color,#c5a3ef);color:var(--field-text,#34304f)}
.answer{color:#34304f;box-shadow:0 5px 0 #d7c5e733}
.answer:nth-child(1){background:var(--answer1-color,#ffe7f1);color:var(--answer1-text,#34304f);border-color:#f4b5d4}
.answer:nth-child(2){background:var(--answer2-color,#e4efff);color:var(--answer2-text,#34304f);border-color:#abcaf5}
.answer:nth-child(3){background:var(--answer3-color,#fff1c7);color:var(--answer3-text,#34304f);border-color:#f0d478}
.answer:hover:not(:disabled){border-color:#9c57c4}
.answer.correct{background:#d4edda;color:#233a35;border-color:#398454}
.answer.wrong{background:#f8dddd;color:#233a35;border-color:#bc5656}
details{border-color:#e0cee9}summary{color:#8c328b}textarea{border-color:#dcc9e9;color:#34304f}.notice{color:#8a5b87}
.color-controls{display:flex;flex-wrap:wrap;gap:14px;margin:16px 0 22px}.color-controls label{display:flex;align-items:center;gap:8px;background:#ffffffdc;color:#34304f;padding:10px 12px;border-radius:12px;font-size:14px}.color-controls input{width:40px;height:32px;border:0;background:transparent;cursor:pointer}.points{background:#ffdc78!important;color:#50320d;font-size:19px}.point-rule{font-size:14px;margin:0}.color-controls input:focus-visible{outline:3px solid #7554d6;outline-offset:3px}
[hidden]{display:none!important}.header-actions{display:flex;align-items:center;gap:12px}.settings-icon{font-size:26px;padding:8px 14px;background:#ffffffdb;color:#633b87;border:1px solid #dcc9e9}.settings-card{background:#ffffffdf;color:#34304f;border:1px solid #ddc9ec;border-radius:24px;padding:24px;margin:20px 0}.settings-card h2{margin-top:0}.settings-card .muted{color:#706584}.settings-card .toolbar{margin-bottom:0}.settings-card details{margin:0;padding:0;border:0}.settings-card .color-controls{margin-bottom:0}.settings-card .color-controls label{border:1px solid #e1d2ee}.settings-back{margin-top:26px}
button,input,select,summary{touch-action:manipulation}button,select{min-height:48px}.answer{min-width:0}.word{overflow-wrap:anywhere}.overlay{overflow:auto}.stat{color:#34304f}.points{color:#50320d}main{padding-bottom:max(28px,env(safe-area-inset-bottom))}
@media(hover:none){.answer:hover:not(:disabled){transform:none}}
@media(max-width:600px){
body{background-attachment:scroll}main{padding: max(12px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(20px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left))}
header{gap:8px}.brand{font-size:20px}.header-actions{gap:8px}.badge{font-size:10px;padding:7px 9px}.settings-icon{width:48px;padding:6px;font-size:25px;flex-shrink:0}
h1{font-size:32px;letter-spacing:-1px;margin:18px 0 6px}#gamepage>.muted{font-size:14px;line-height:1.45;margin:6px 0 12px}
#gamepage>.toolbar{justify-content:space-between;gap:8px;margin:12px 0 8px}.points{font-size:17px;padding:12px}#restart{font-size:14px;padding:12px}.point-rule{font-size:12px;line-height:1.45;margin-bottom:12px}
.stage{height:clamp(210px,35svh,340px);border-radius:20px}.word{font-size:22px;padding:12px 18px;max-width:calc(100% - 20px)}
.answers{gap:8px;margin-top:12px}.answer{min-height:92px;padding:12px 8px;font-size:16px;line-height:1.3;border-radius:14px;box-shadow:none}
.overlay{padding:16px}.symbol{font-size:54px}.overlay h2{font-size:23px;margin:8px 0 4px}.overlay p{font-size:15px;line-height:1.4;margin:6px 0 14px}.overlay button{width:min(100%,280px)}
.hint{margin:12px 0 8px}.notice{font-size:12px;margin:8px 0}footer{font-size:11px;margin-top:14px}
.settings-back{margin-top:16px}.settings-card{padding:18px;border-radius:18px;margin:14px 0}.settings-card h2{font-size:21px}.settings-card p{font-size:14px}.settings-card select{font-size:16px;max-width:100%}
.color-controls{display:grid;grid-template-columns:1fr;gap:10px}.color-controls label{justify-content:space-between;font-size:16px;min-height:56px}.color-controls input{width:64px;height:44px}.settings-card textarea{font-size:16px}.settings-card summary{min-height:48px;line-height:1.5;padding:10px 0}
}
@media(max-width:360px){.badge{max-width:92px;text-align:center}.points{font-size:15px;padding:10px}#restart{padding:10px}.answer{font-size:14px}}
@media(max-height:500px) and (orientation:landscape){#gamepage>h1{font-size:26px;margin-top:10px}#gamepage>.muted{margin:4px 0}.stage{height:190px}.answers{margin-top:8px}.answer{min-height:64px}.toolbar{margin:8px 0}.symbol{font-size:36px}.overlay h2{font-size:20px;margin:4px 0}.overlay p{margin:4px 0 8px}}
.profile-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:14px 0;font-size:14px}.profile-bar button{padding:10px 14px;font-size:14px}.profile-form{display:flex;gap:10px;flex-wrap:wrap;margin:12px 0}.profile-form select{max-width:100%;font-size:16px}.profile-form label{align-self:center}.profile-form input{flex:1;min-width:0;width:100%;font:16px system-ui;padding:12px;border:1px solid #dcc9e9;border-radius:12px}.profile-form button{flex-shrink:0}.profile-status{font-size:14px;overflow-wrap:anywhere}.profile-form input:focus-visible{outline:3px solid #7554d6;outline-offset:3px}
.unit-picker{margin:14px 0}.unit-picker label{margin-right:10px;font-weight:700}.unit-picker p{font-size:13px;margin:6px 0}.unit-picker select{font-size:16px;max-width:100%}
.duelplayers{display:flex;flex-wrap:wrap;gap:10px;margin:14px 0}.duelplayers span{padding:12px;border-radius:12px;background:#ffffffdd;color:#34304f}#duelsetup input{font:16px system-ui;min-height:48px;padding:12px;border:1px solid #dcc9e9;border-radius:12px;max-width:100%;margin:8px 10px 8px 0}#duelstage{margin-top:16px;background:var(--field-color,#c5a3ef)}#duelmessage{overflow-wrap:anywhere}
@media(max-width:700px){
 #loginform{display:grid;grid-template-columns:minmax(0,1fr);gap:10px}
 #loginform label{font-size:16px;font-weight:650;margin-top:6px}
 #loginform input,#loginform select{width:100%;min-width:0;min-height:56px;font-size:18px;padding:14px;flex:none}
 #loginform button{width:100%;min-height:56px;padding:14px 12px;font-size:16px;white-space:normal}
 #loginform button[value="login"]{margin-top:10px}
 #deleteaccountpanel input,#adminpanel input{display:block;width:100%;min-height:56px;margin:10px 0;border:1px solid #dcc9e9;border-radius:12px}
 #deleteaccountpanel>button,#adminpanel>button{width:100%;min-height:56px}
}

/* Account fields stay full width on all screens. */
#loginform{display:grid;grid-template-columns:minmax(0,1fr);gap:10px;max-width:560px}
#loginform label{font-size:16px;font-weight:650;margin-top:6px}
#loginform input,#loginform select{width:100%;min-width:0;min-height:56px;font-size:18px;padding:14px;flex:none}
#loginform button{width:100%;min-height:56px;white-space:normal}
#loginform button[value="login"]{margin-top:8px}
/* Joined duels use the entire viewport, with answers anchored below the stage. */
body.duel-screen{overflow:hidden}
body.duel-screen #duelroom{position:fixed;inset:0;z-index:20;width:100%;height:100vh;height:100dvh;display:grid;grid-template-rows:auto auto auto auto minmax(0,1fr) auto auto;gap:8px;padding:max(10px,env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left));background:var(--page-color,#e6c0ed);color:var(--page-text,#34304f)}
body.duel-screen #duelroom>.toolbar{margin:0;gap:8px;flex-wrap:nowrap}
body.duel-screen #roomtitle{flex:1;min-width:0;font-size:14px;overflow-wrap:anywhere}
body.duel-screen #duelroom>.toolbar button{padding:10px;font-size:13px;min-height:44px}
body.duel-screen #duelround{margin:0;font-size:13px;line-height:1.3}
body.duel-screen #duelplayers{margin:0;gap:6px;flex-wrap:nowrap;overflow-x:auto}
body.duel-screen #duelplayers span{flex-shrink:0;padding:7px 10px;font-size:13px}
body.duel-screen #startduel{min-height:48px;padding:10px}
body.duel-screen #duelstage{grid-row:5;height:100%;min-height:0;margin:0;width:100%;border-radius:16px}
body.duel-screen #duelanswers{grid-row:6;margin:0;gap:8px}
body.duel-screen #duelanswers .answer{min-height:72px;padding:12px 8px;font-size:clamp(15px,2.2vw,21px)}
body.duel-screen #duelmessage{grid-row:7;margin:0;font-size:13px;line-height:1.3;max-height:3.9em;overflow:auto}
@media(max-height:500px) and (orientation:landscape){body.duel-screen #duelroom{gap:4px;padding:6px}body.duel-screen #duelplayers span{padding:4px 8px}body.duel-screen #duelanswers .answer{min-height:48px;padding:8px}body.duel-screen #duelroom>.toolbar button{min-height:36px;padding:6px}body.duel-screen #duelmessage{max-height:2.6em}}
#loginform .remember-login{display:flex;align-items:center;gap:12px;min-height:48px;cursor:pointer}
#loginform #rememberlogin{width:24px;height:24px;min-height:24px;flex:0 0 24px;padding:0;accent-color:#a52d91}

#schoolsettings label{display:block;margin:12px 0 8px;font-weight:650}
#profilegrade{width:100%;max-width:560px;min-height:56px;font-size:18px;padding:14px}

.pipe-map{background:#ffffffa8;border-radius:22px;margin:16px 0;overflow:hidden}.pipe-map svg{display:block;width:100%;height:clamp(150px,25vh,240px)}.pipe-task h2{font-size:clamp(24px,5vw,36px);overflow-wrap:anywhere}.pipe-letters{display:flex;flex-wrap:wrap;gap:6px;margin:18px 0;align-items:center}.pipe-letters input,.pipe-given{width:38px;min-width:0;height:52px;text-align:center;font:700 24px system-ui;border:2px solid #b592cb;border-radius:10px;background:white;color:#34304f}.pipe-given{display:inline-flex;align-items:center;justify-content:center;background:#e9e0f1;border-color:transparent}.pipe-space{width:16px}.pipe-letters input:focus{outline:3px solid #a52d91;outline-offset:2px}.pipe-letters .pipe-full{width:100%;height:60px;font-size:20px;text-align:left;padding:12px}.pipe-task button{min-height:56px}#pipemessage{overflow-wrap:anywhere}@media(max-width:600px){.pipe-letters{gap:4px}.pipe-letters input,.pipe-given{width:32px;height:48px;font-size:21px}.pipe-task button{width:100%}}

/* Animated pipe adventure and selectable routes. */
#pipepage .pipe-map{position:relative;background:radial-gradient(ellipse at 50% 90%,#254b73 0%,#102940 50%,#091b30 100%);border:2px solid #6ba3bf;border-radius:26px;box-shadow:inset 0 0 50px #061323,0 14px 32px #26254430;padding-top:100px;overflow:hidden}
#pipepage .pipe-map svg{width:100%;height:clamp(240px,38vh,390px);filter:drop-shadow(0 8px 8px #0006)}
.pipe-choices{position:absolute;inset:14px 10px auto;display:flex;gap:8px;z-index:2}
.pipe-choice{flex:1;min-width:0;padding:10px 6px;min-height:76px;background:linear-gradient(160deg,#254966,#142c46);border:2px solid var(--route-color);color:#fff;border-radius:15px;box-shadow:0 5px 0 #071a2b;font-size:clamp(12px,2vw,17px);transition:transform .2s,box-shadow .2s,background .2s;overflow-wrap:anywhere}
.pipe-choice span{display:block;color:var(--route-color);font-size:11px;margin-bottom:5px;font-weight:600;text-transform:uppercase;letter-spacing:1px}
.pipe-choice strong{display:block;line-height:1.3}.pipe-choice:hover:not(:disabled),.pipe-choice.selected{transform:translateY(-3px);background:#315979;box-shadow:0 0 18px var(--route-color)}
.pipe-choice:focus-visible{outline:3px solid white;outline-offset:3px}.pipe-choice:disabled{opacity:.8}.pipe-choice.selected:disabled{opacity:1}
.pipe-map-caption{position:absolute;bottom:12px;left:0;right:0;text-align:center;color:#cbe5f1;font-size:12px;letter-spacing:.4px}
.pipe-current{animation:pipe-flow 2s linear infinite}.pipe-open{stroke:#80ffcc;stroke-width:10;opacity:1;filter:drop-shadow(0 0 7px #68ffd0)}
.pipe-avatar{filter:drop-shadow(0 0 9px #ffe490)}.pipe-arrival svg{animation:pipe-enter .45s ease-out}.pipe-shake{animation:pipe-shake .28s ease-in-out}
@keyframes pipe-flow{to{stroke-dashoffset:-46}}@keyframes pipe-enter{from{opacity:.3;transform:scale(.95)}to{opacity:1;transform:scale(1)}}@keyframes pipe-shake{25%{transform:translateX(-5px)}75%{transform:translateX(5px)}}
@media(max-width:600px){#pipepage .pipe-map{padding-top:115px}.pipe-choices{gap:5px;inset:12px 7px auto}.pipe-choice{padding:9px 4px;font-size:12px;min-height:95px}.pipe-choice span{font-size:9px;letter-spacing:0}.pipe-map-caption{font-size:11px}}
@media(prefers-reduced-motion:reduce){.pipe-current,.pipe-arrival svg,.pipe-shake{animation:none}.pipe-choice{transition:none}}
.game-navigation{display:flex;gap:10px;flex-wrap:wrap;margin:18px 0 6px}.game-navigation button{flex:1;min-height:56px;font-size:18px;background:#ffffffbd;color:#34304f;border:2px solid transparent}.game-navigation .selected-game{background:#a52d91;color:white;border-color:#fff8}.pipe-duel-launch{margin:16px 0 0}#pdsetup input{display:block;width:100%;min-height:56px;padding:14px;font-size:18px;border:1px solid #dcc9e9;border-radius:12px;margin:12px 0}#pdsetup select{margin:12px}#pdhelp{background:#536782;margin:10px 0}#pdrole{font-weight:700}#pipeduelpage .pipe-map{position:relative;background:radial-gradient(ellipse at 50% 90%,#254b73 0%,#102940 50%,#091b30 100%);border:2px solid #6ba3bf;border-radius:26px;box-shadow:inset 0 0 50px #061323,0 14px 32px #26254430;padding-top:100px;overflow:hidden}#pipeduelpage .pipe-map svg{width:100%;height:clamp(240px,38vh,390px);filter:drop-shadow(0 8px 8px #0006)}@media(max-width:600px){#pipeduelpage .pipe-map{padding-top:115px}#pdsetup button{width:100%;margin-top:8px}.game-navigation button{font-size:16px;padding:12px}}

/* Explicit SVG sizing and a brighter scene for mobile browsers. */
#pipepage .pipe-map,#pipeduelpage .pipe-map{background:radial-gradient(ellipse at 50% 85%,#5789ae 0%,#345e86 60%,#274867 100%);color:#fff;box-shadow:inset 0 0 24px #25456555,0 10px 24px #26254422;min-height:280px}
#pipepage .pipe-map svg,#pipeduelpage .pipe-map svg{display:block;width:100%;max-width:100%;height:320px;filter:none}
.pipe-map:empty::before{content:'Röhrenspiel wird geladen …';display:block;padding:30px;text-align:center;color:white}
.pipe-map-caption{color:#fff;text-shadow:0 1px 3px #17334f}
@media(max-width:600px){#pipepage .pipe-map svg,#pipeduelpage .pipe-map svg{height:280px}.pipe-avatar{filter:none}.pipe-open{filter:none}}
.brand{display:flex;align-items:center;gap:9px}.brand img{display:block;flex-shrink:0}.pipe-avatar{filter:drop-shadow(0 0 8px #cdb9ff)}@media(max-width:600px){.pipe-avatar{filter:none}}

.avatar-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.avatar-choice{display:flex;align-items:center;flex-direction:column;gap:5px;background:#f4ebfb;color:#34304f;border:2px solid #e0cdeb;padding:10px;font-size:13px}.avatar-choice img{width:64px;height:64px}.avatar-choice.selected-avatar{border-color:#a52d91;background:#e7d6f4;box-shadow:0 0 0 2px #a52d9120}.friends-launch{margin-top:6px}.friends-visible:after{content:'';position:fixed;inset:0;background:#17243988;z-index:70}#friendspage{position:fixed;z-index:80;inset:12px auto 12px 50%;transform:translateX(-50%);width:min(900px,calc(100% - 24px));padding:20px;background:#f2e8fa;border-radius:22px;overflow:auto;overscroll-behavior:contain;box-shadow:0 15px 65px #10152680}#friendspage h1{font-size:34px}#friendname,.room-link-field{width:100%;min-height:54px;padding:12px;font-size:18px;border:1px solid #dac6e9;border-radius:12px;margin:10px 0}.friend-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:14px 0;border-bottom:1px solid #d6c8e2}.friend-row strong{flex:1}.friend-row img{flex-shrink:0}.friend-row button{padding:10px 12px;font-size:14px}.duel-arena{position:relative;width:100%;height:245px;background:radial-gradient(ellipse at 50% 65%,#6b6594 0%,#454267 52%,#25253d 80%);border:2px solid #ba9dda;border-radius:22px;overflow:hidden;box-shadow:inset 0 -15px 35px #171c3040}.duel-arena:before{content:'';position:absolute;inset:14% 10%;border:2px solid #d4bdf94a;border-radius:50%;box-shadow:0 0 0 16px #d4bdf908}.arena-player{position:absolute;transform:translate(-50%,-50%);width:115px;display:flex;flex-direction:column;align-items:center;gap:2px;text-align:center;color:white;z-index:1}.arena-player img{width:64px;height:64px;filter:drop-shadow(0 7px 3px #17172d77)}.arena-player strong{font-size:13px;max-width:110px;overflow-wrap:anywhere;line-height:1.1;text-shadow:0 1px 2px #17172d}.arena-player small{font-size:11px}.arena-self img{border:2px solid #f7d88b;border-radius:50%}.arena-active img{animation:arena-turn 1.3s ease-in-out infinite}.arena-away{opacity:.5}body.duel-screen #duelplayers{display:block;overflow:visible}body.duel-screen .duel-arena{height:150px;border-radius:15px}body.duel-screen .arena-player img{width:36px;height:36px}body.duel-screen .arena-player{width:90px}body.duel-screen .arena-player strong{font-size:11px}body.duel-screen .arena-player small{font-size:10px}body.duel-screen #duelroom>.toolbar{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}body.duel-screen #roomtitle{grid-column:1/-1}body.duel-screen #duelroom>.toolbar button{font-size:11px;padding:8px 4px;min-height:38px;white-space:normal}body.duel-screen #copycode{display:none}body.duel-screen #shareduel{grid-column:1}body.duel-screen #invitefriendsduel{grid-column:2}body.duel-screen #leaveroom{grid-column:3}@keyframes arena-turn{50%{transform:translateY(-5px)}}@media(max-width:600px){.avatar-choices{grid-template-columns:repeat(2,minmax(0,1fr))}#friendspage{padding:14px}.duel-arena{height:220px}.arena-player{width:90px}.arena-player img{width:50px;height:50px}.arena-player strong{font-size:12px}.arena-player small{font-size:10px}}@media(max-height:500px) and (orientation:landscape){body.duel-screen .duel-arena{height:85px}body.duel-screen .arena-player img{width:24px;height:24px}body.duel-screen .arena-player strong{font-size:9px}body.duel-screen .arena-player small{font-size:9px}}@media(prefers-reduced-motion:reduce){.arena-active img{animation:none}}
.pipe-sprite{animation:hirni-idle 2.1s ease-in-out infinite;transform-origin:0 0}.pipe-travelling .pipe-sprite{animation:hirni-travel .4s ease-in-out infinite}.avatar-choice:hover img{animation:hirni-hello .6s ease-in-out}.arena-player img{animation:hirni-idle 2.7s ease-in-out infinite}.arena-player:nth-child(2) img{animation-delay:-.6s}.arena-player:nth-child(3) img{animation-delay:-1.2s}.arena-player:nth-child(4) img{animation-delay:-1.8s}.arena-player:nth-child(5) img{animation-delay:-2.2s}.arena-active img{animation:arena-turn .9s ease-in-out infinite}.arena-away img{animation:none}@keyframes hirni-idle{0%,100%{transform:translateY(0) rotate(-3deg)}50%{transform:translateY(-4px) rotate(3deg)}}@keyframes hirni-travel{0%,100%{transform:rotate(-9deg) scale(1,.94)}50%{transform:rotate(9deg) scale(.96,1.04)}}@keyframes hirni-hello{25%{transform:rotate(-12deg)}75%{transform:rotate(12deg)}}@media(prefers-reduced-motion:reduce){.pipe-sprite,.pipe-travelling .pipe-sprite,.arena-player img,.arena-active img,.avatar-choice:hover img{animation:none}}
.pipe-plan{background:#234d65;border-radius:18px;color:white;margin-top:18px;padding:12px 16px}.pipe-plan summary{cursor:pointer;font-weight:700}.pipe-plan svg{display:block;width:100%;height:150px}#pipepage .pipe-map.pipe-finish{padding-top:0;background:#b8e9ff}.pipe-goal-hirni{animation:hirni-escape 3.4s ease-in-out forwards;transform-origin:165px 300px}.pipe-backslide .pipe-avatar{animation:hirni-backslide .7s ease-out}#pipesolohelp{background:#52687e;width:100%;margin-top:12px}
@keyframes hirni-escape{0%{transform:translate(-50px,12px) scale(.6)}35%{transform:translate(125px,0) rotate(8deg)}55%{transform:translate(125px,-75px) rotate(-12deg)}70%{transform:translate(125px,0) rotate(10deg)}85%{transform:translate(125px,-35px) rotate(-8deg)}100%{transform:translate(125px,0) rotate(0)}}@keyframes hirni-backslide{from{transform:translate(300px,265px)}to{transform:translate(300px,355px)}}@media(prefers-reduced-motion:reduce){.pipe-goal-hirni{animation:none;transform:translate(125px,0)}.pipe-backslide .pipe-avatar{animation:none}}
[hidden]{display:none!important}.page-navigation{display:flex;align-items:center;gap:10px;margin:18px 0}.page-navigation button{padding:12px 16px;min-height:46px}.page-navigation span{margin-left:auto;font-weight:700;font-size:14px}
.home-hero{text-align:center;position:relative}.home-kicker{display:inline-block;padding:7px 16px;border-radius:30px;background:#ffffffa8;font-weight:700;color:#863279}.home-hero h1{font-size:clamp(32px,5vw,48px);margin-top:20px}.hirni-anchor{height:190px;width:200px;margin:0 auto}.home-menu{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.home-menu button{text-align:left;display:grid;grid-template-columns:42px 1fr;gap:8px 12px;background:#ffffffda;color:#383255;min-height:115px;border:2px solid #fff;box-shadow:0 8px 20px #653e7020;transition:transform .2s,border-color .2s}.home-menu button:hover,.home-menu button:focus-visible{transform:translateY(-4px);border-color:#a52d91}.home-menu button>span{font-size:32px;grid-row:1/3}.home-menu strong{font-size:23px}.home-menu small{font-size:14px;font-weight:500;line-height:1.5}.home-menu button:last-child{grid-column:auto}.home-tip{text-align:center;font-size:13px;color:var(--page-text,#655a79)}
#homehirni{display:none;position:fixed;z-index:85;width:155px;pointer-events:none;transition:left .65s cubic-bezier(.2,.8,.3,1),top .65s cubic-bezier(.2,.8,.3,1),width .4s}.home-screen #homehirni{display:block}#hirnimotion{display:block;width:100%;filter:drop-shadow(0 10px 8px #693b6c30)}.hirni-speech{position:fixed;color:#34304f;width:270px;max-width:calc(100vw - 20px);padding:14px 18px;background:#fff;border:2px solid #b05aab;border-radius:18px;box-shadow:0 8px 24px #49275825;font-size:14px;line-height:1.5;z-index:90;pointer-events:none}.hirni-speech:after{content:'';position:absolute;bottom:-12px;left:28px;border:6px solid transparent;border-top-color:#b05aab}
#hirnimotion[data-motion="dance"]{animation:home-dance 1.2s ease-in-out infinite}#hirnimotion[data-motion="spin"]{animation:home-spin 2.5s ease-in-out infinite}#hirnimotion[data-motion="bounce"]{animation:home-bounce 1.4s ease-in-out infinite}#hirnimotion[data-motion="wiggle"]{animation:home-wiggle .7s ease-in-out infinite}#hirnimotion[data-motion="float"]{animation:home-float 2.5s ease-in-out infinite}#hirnimotion[data-motion="fly"]{animation:home-float 1s ease-in-out infinite}
@keyframes home-dance{0%,100%{transform:rotate(-12deg) translateY(0)}50%{transform:rotate(12deg) translateY(-12px)}}@keyframes home-spin{0%,100%{transform:rotate(0)}70%{transform:rotate(360deg)}}@keyframes home-bounce{0%,100%{transform:translateY(0) scale(1.05,.95)}45%{transform:translateY(-30px) scale(.95,1.05)}}@keyframes home-wiggle{0%,100%{transform:rotate(-8deg)}50%{transform:rotate(8deg)}}@keyframes home-float{0%,100%{transform:translateY(0) rotate(-4deg)}50%{transform:translateY(-12px) rotate(4deg)}}
#friendspage{position:static!important;inset:auto!important;transform:none!important;width:auto!important;min-width:0;max-width:100%;max-height:none!important;overflow:visible!important;box-shadow:none!important;background:transparent!important;z-index:auto!important}body:after{pointer-events:none}#loginpage .profile-form{display:grid;grid-template-columns:1fr;gap:10px}#loginpage .profile-form input:not([type="checkbox"]),#loginpage .profile-form select{width:100%;min-width:0;min-height:56px;font-size:18px}#loginpage .remember-login{display:flex;align-items:center;gap:10px}#loginpage h1{margin-top:8px}#loginpage{max-width:650px;margin:24px auto}.home-screen #opensettings{display:none}
@media(max-width:600px){.home-menu{grid-template-columns:1fr;gap:12px}.home-menu button:last-child{grid-column:auto}.home-menu button{min-height:100px;padding:18px}.home-menu strong{font-size:21px}.hirni-anchor{height:170px}.page-navigation span{display:none}}
@media(prefers-reduced-motion:reduce){#hirnimotion[data-motion]{animation:none}#homehirni,.home-menu button{transition:none}}
.home-menu a.home-link{text-decoration:none;text-align:left;display:grid;grid-template-columns:42px 1fr;gap:8px 12px;background:#ffffffda;color:#383255;min-height:115px;padding:14px 22px;border-radius:14px;border:2px solid #fff;box-shadow:0 8px 20px #653e7020;transition:transform .2s,border-color .2s}.home-menu a:hover,.home-menu a:focus-visible{transform:translateY(-4px);border-color:#a52d91}.home-menu a>span{font-size:32px;grid-row:1/3}.home-menu a:last-child{grid-column:auto}.hirni-anchor #homehirni{position:static;margin:auto;display:block;width:155px}.home-screen #homehirni{display:block}@media(max-width:600px){.home-menu a:last-child{grid-column:auto}.home-menu a.home-link{min-height:100px;padding:18px}}
.header-account{display:flex;align-items:center;justify-content:flex-end;gap:7px;flex-wrap:wrap;margin-left:auto}.mini-link{display:inline-flex;align-items:center;justify-content:center;min-height:36px;padding:7px 11px;border:1px solid #aa6b9b50;border-radius:10px;background:#ffffffb8;color:#533b5f;font-size:13px;font-weight:650;text-decoration:none}.header-account #headerauthstatus{width:100%;font-size:12px;text-align:right}#headerauthstatus:empty{display:none}.home-screen header{align-items:flex-start}.home-screen .hirni-anchor{position:relative;width:100%;height:265px}.hirni-scene-hint{font-size:14px;font-weight:650;margin:0 0 22px}.home-screen #hirnimotion{animation:none!important}.home-screen #hirniperformer{position:relative;width:100%;height:170px;transform-origin:50% 75%}.hirni-feet{position:absolute;width:100%;height:45px;left:0;top:117px;z-index:-1}.hirni-show-props{position:absolute;inset:-22px -6px auto;width:112%;height:190px;display:none}.hirni-treasure{display:none;position:absolute;top:80px;right:-10px;font-size:38px}.hirni-box{display:none;position:absolute;left:calc(50% + 83px);top:150px;width:65px;height:60px}.box-body{position:absolute;bottom:0;width:65px;height:48px;background:#bf8950;border:3px solid #79522b;border-radius:5px;color:#f9e7bc;font-size:30px;font-weight:900}.box-lid{position:absolute;top:3px;left:-3px;width:71px;height:14px;background:#d7a363;border:3px solid #79522b;border-radius:4px;transform-origin:left bottom;z-index:2}.box-surprise{position:absolute;left:14px;top:-16px;font-size:30px}.hirni-anchor[data-scene="box"] .hirni-box{display:block}.hirni-anchor[data-scene="box"] .box-lid{animation:box-lid 8s ease-in-out infinite}.hirni-anchor[data-scene="box"] .box-surprise{animation:box-sparkle 8s ease-in-out infinite}
#hirniperformer[data-scene="walk"]{animation:hirni-walk 8s ease-in-out infinite}#hirniperformer[data-scene="showman"]{animation:hirni-showman 8s ease-in-out infinite}#hirniperformer[data-scene="showman"] .hirni-show-props{display:block}#hirniperformer[data-scene="showman"] .hirni-cane{animation:cane-twirl 2s ease-in-out infinite;transform-origin:140px 128px}#hirniperformer[data-scene="box"]{animation:hirni-find 8s ease-in-out infinite}#hirniperformer[data-scene="box"] .hirni-treasure{display:block;animation:hirni-prize 8s ease-in-out infinite}#hirniperformer[data-scene="dance"]{animation:home-dance 1.2s ease-in-out infinite}#hirniperformer[data-scene="fly"]{animation:home-float 1.2s ease-in-out infinite}#hirniperformer[data-scene="fly"] .hirni-feet{display:none}.hirni-leg-left{transform-origin:61px 4px;animation:hirni-step .5s ease-in-out infinite}.hirni-leg-right{transform-origin:99px 4px;animation:hirni-step .5s ease-in-out -.25s infinite}
@keyframes hirni-walk{0%,100%{transform:translateX(-65px) rotate(-3deg)}45%{transform:translateX(65px) rotate(4deg)}55%{transform:translateX(65px) rotate(-4deg)}}@keyframes hirni-step{50%{transform:rotate(24deg)}}@keyframes hirni-showman{0%,100%{transform:translateX(-45px) rotate(-8deg)}35%{transform:translateX(40px) rotate(8deg)}55%{transform:translateX(40px) translateY(-22px) rotate(-12deg)}75%{transform:translateX(-20px) rotate(6deg)}}@keyframes cane-twirl{50%{transform:rotate(-45deg)}}@keyframes hirni-find{0%,100%{transform:translateX(-55px)}35%{transform:translateX(25px) rotate(8deg)}48%{transform:translateX(25px) translateY(20px) rotate(20deg)}65%{transform:translateX(5px) translateY(-16px) rotate(-8deg)}85%{transform:translateX(-55px)}}@keyframes hirni-prize{0%,49%,100%{opacity:0;transform:scale(0)}60%,90%{opacity:1;transform:scale(1)}}@keyframes box-lid{0%,30%,90%,100%{transform:rotate(0)}45%,80%{transform:rotate(-70deg)}}@keyframes box-sparkle{0%,35%,95%,100%{opacity:0}50%,85%{opacity:1;transform:translateY(-20px)}}
@media(max-width:600px){header{flex-wrap:wrap;gap:8px}.header-account{max-width:75%}.mini-link{font-size:12px;padding:7px 9px}.home-screen .hirni-anchor{height:250px}.hirni-box{left:calc(50% + 65px);width:60px}}
@media(prefers-reduced-motion:reduce){#hirniperformer[data-scene],.hirni-leg-left,.hirni-leg-right,.hirni-box span,.hirni-cane,.hirni-treasure{animation:none!important}.hirni-anchor[data-scene="box"] .hirni-treasure{opacity:1}}

/* Smooth scene changes use the outer mascot; each action animates inside it. */
.home-screen #homehirni{transform-origin:50% 75%;transition:none}
.hirni-box{transform-origin:50% 100%}
.hirni-scene-hint{display:none}
.hirni-show-props,.hirni-treasure,.hirni-playthings,.hirni-sleepy{pointer-events:none}
.hirni-playthings{display:none;position:absolute;inset:0}
.hirni-playthings span{position:absolute;left:calc(50% - 12px);top:10px;font-size:30px;color:#db5499;text-shadow:0 2px 4px #50335533}
.hirni-playthings span:nth-child(2){color:#f1ba38;animation-delay:-1s!important}
.hirni-playthings span:nth-child(3){color:#45aeca;animation-delay:-2s!important}
.hirni-sleepy{display:none;position:absolute;right:-18px;top:-5px;font-size:24px;font-weight:700;color:#85629f}
#hirniperformer[data-scene="juggle"]{animation:hirni-juggle-body 3s ease-in-out infinite}
#hirniperformer[data-scene="juggle"] .hirni-playthings{display:block}
#hirniperformer[data-scene="juggle"] .hirni-playthings span{animation:hirni-juggle-ball 3s linear infinite}
#hirniperformer[data-scene="hop"]{animation:hirni-hop 2.4s ease-in-out infinite}
#hirniperformer[data-scene="balance"]{animation:hirni-balance 4s ease-in-out infinite}
#hirniperformer[data-scene="balance"] .hirni-leg-right{animation:hirni-balance-leg 4s ease-in-out infinite}
#hirniperformer[data-scene="wave"]{animation:hirni-wave 3s ease-in-out infinite}
#hirniperformer[data-scene="nap"]{animation:hirni-nap 4s ease-in-out infinite}
#hirniperformer[data-scene="nap"] .hirni-sleepy{display:block;animation:hirni-sleep 4s ease-in-out infinite}
#hirniperformer:not([data-scene="walk"]) .hirni-leg-left,#hirniperformer:not([data-scene="walk"]):not([data-scene="balance"]) .hirni-leg-right{animation:none}
@keyframes hirni-juggle-body{0%,100%{transform:rotate(-3deg) translateY(0)}50%{transform:rotate(3deg) translateY(-4px)}}
@keyframes hirni-juggle-ball{0%{transform:translate(-48px,40px) scale(.85)}25%{transform:translate(0,-58px) scale(1)}50%{transform:translate(48px,40px) scale(.85)}75%{transform:translate(0,65px) scale(.85)}100%{transform:translate(-48px,40px) scale(.85)}}
@keyframes hirni-hop{0%,100%{transform:translateY(0) scale(1)}15%,65%{transform:translateY(4px) scale(1.06,.94)}35%{transform:translateY(-38px) rotate(-8deg) scale(.96,1.04)}80%{transform:translateY(-22px) rotate(8deg)}}
@keyframes hirni-balance{0%,100%{transform:rotate(-9deg)}25%{transform:rotate(7deg) translateY(-5px)}50%{transform:rotate(-5deg)}75%{transform:rotate(10deg) translateY(-5px)}}
@keyframes hirni-balance-leg{0%,100%{transform:rotate(-35deg)}50%{transform:rotate(-55deg)}}
@keyframes hirni-wave{0%,100%{transform:rotate(0)}20%,60%{transform:rotate(-13deg) translateY(-6px)}40%,80%{transform:rotate(13deg) translateY(-6px)}}
@keyframes hirni-nap{0%,100%{transform:translateY(10px) rotate(-12deg) scale(1,.96)}50%{transform:translateY(7px) rotate(-10deg) scale(1.02,1)}}
@keyframes hirni-sleep{0%,100%{opacity:.2;transform:translate(0,8px) scale(.7)}60%{opacity:1;transform:translate(8px,-16px) scale(1)}}
@media(prefers-reduced-motion:reduce){.hirni-playthings span,.hirni-sleepy{animation:none!important}.hirni-playthings span:nth-child(1){transform:translate(-44px,-16px)}.hirni-playthings span:nth-child(2){transform:translate(0,-36px)}.hirni-playthings span:nth-child(3){transform:translate(44px,-16px)}}

#friendaddform input,#friendaddform + .settings-card input,#friendspage input[readonly]{box-sizing:border-box;width:100%;max-width:100%;min-width:0}#friendspage .friend-row{overflow-wrap:anywhere}

/* Friends: one column, touch targets and clear invitation cards. */
#friendspage{transform:none!important;min-width:0;max-width:100%}
.friends-content{max-width:720px;margin:auto;display:grid;gap:16px}
.friends-content>.settings-card{margin:0}
.friend-share-card{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.friend-share-card h2,.friend-share-card p,.friend-own-code{grid-column:1/-1;margin:0}
.friend-own-code{width:100%;min-height:52px;padding:12px;border:1px solid #d9c9ed;border-radius:12px;background:#fff;text-align:center;font:700 22px/1.4 monospace;letter-spacing:2px;color:#533b5f}
#friendspage button,#friendspage .mini-link{min-height:48px;white-space:normal}
#friendaddform>button{width:100%;margin-top:12px}
.friend-preview{display:flex;align-items:center;gap:14px;background:#f2e8fa;padding:14px;border-radius:14px;overflow-wrap:anywhere}
.friend-preview img{flex-shrink:0}
.friend-duel-choices{flex-basis:100%;display:flex;gap:8px;flex-wrap:wrap}
.friend-invitation{padding:16px;border:2px solid #a52d91;border-radius:16px;background:#fff2d6;margin-top:10px}
.friend-invitation>span{flex-basis:100%;font-weight:700}
.friend-inbox h2.has-invites{color:#8c2776}
#friendsmessage:empty{display:none}#friendsmessage>button{display:block;margin-top:10px}
#friendspage [hidden]{display:none!important}
#hirniperformer[data-scene="idle"]{animation:hirni-rest 3s ease-in-out infinite}
@keyframes hirni-rest{0%,100%{transform:translateY(0) scale(1)}50%{transform:translateY(-2px) scale(1.015)}}
#homehirni:focus-visible{outline:3px solid #7554d6;outline-offset:6px;border-radius:50%}
@media(max-width:600px){.friends-content{gap:12px}#friendspage .settings-card{padding:16px}.friend-share-card{grid-template-columns:1fr}.friend-row{gap:10px}.friend-row>strong{min-width:calc(100% - 70px)}.friend-row>button,.friend-duel-choices button{flex:1;min-width:110px}}

.room-friends{padding:16px;margin:14px 0}.room-friends-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}.room-friends-heading h2{font-size:20px;margin:0}.room-friends-refresh{min-height:44px;font-size:13px;padding:9px 12px;background:#f2e8fa;color:#633b87}.room-friend-row{display:flex;align-items:center;gap:10px;padding:12px 0;border-bottom:1px solid #e5d5ee}.room-friend-row:last-child{border-bottom:0}.room-friend-row img{flex-shrink:0}.room-friend-info{flex:1;min-width:0;display:grid;gap:3px;overflow-wrap:anywhere}.room-friend-info small{color:#247246;font-weight:650}.room-friend-row button{min-height:48px;font-size:14px;padding:10px 14px}.room-friends-status{font-size:14px;margin:10px 0 0}.room-friends-status:empty{display:none}body.duel-screen .room-friends{padding:12px}body.duel-screen .room-friends h2{font-size:17px}@media(max-width:360px){.room-friend-row{flex-wrap:wrap}.room-friend-row button{width:100%}.room-friends-heading{flex-wrap:wrap}}

.home-invitations{margin:22px 0;padding:18px;border:2px solid #a52d91;border-radius:20px;background:#fff2d6;position:relative;z-index:86}.home-invitations h2{margin:0 0 14px;font-size:22px;color:#7e286e}.home-invitation{padding:12px 0;border-top:1px solid #dfbad2;overflow-wrap:anywhere}.home-invite-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px}.home-invite-join{display:inline-flex;align-items:center;justify-content:center;min-height:48px;padding:12px 22px;border-radius:14px;background:#ab328c;color:white;font-weight:750;text-decoration:none}.home-invite-actions button{min-height:48px;background:#fff;color:#533b5f;border:1px solid #d5b4cc}.home-invitation p:empty{display:none}@media(max-width:540px){.home-invitations{padding:16px}.home-invite-actions>*{flex:1}}
#headeraccountmenu{position:absolute;right:0;top:calc(100% + 8px);display:grid;gap:6px;min-width:210px;padding:10px;background:#fff8fd;border:1px solid #dcc9e9;border-radius:16px;box-shadow:0 8px 24px #49275825;z-index:100}#headeraccountmenu .mini-link{width:100%;box-sizing:border-box;justify-content:flex-start}.header-account{position:relative}#headerlogin{max-width:100%;overflow-wrap:anywhere}.header-account #headerauthstatus{flex-basis:100%}@media(max-width:600px){.home-screen header{align-items:center}.header-account{max-width:100%}.home-screen .header-account{flex:1;min-width:0}.home-screen #headerlogin{font-size:12px}.home-screen .hirni-speech{font-size:13px;padding:12px;box-sizing:border-box;width:260px}}

.avatar-choice small{display:block;font-size:12px;line-height:1.4}.avatar-choice:disabled{opacity:.6;cursor:default}#avatarprogress,#soloscorestatus{font-size:14px;line-height:1.5}

.avatar-unlock-dialog{box-sizing:border-box;width:min(560px,calc(100vw - 28px));max-height:calc(100dvh - 40px);overflow:auto;padding:24px;border:2px solid #b05aab;border-radius:24px;background:#fff8fd;color:#493450;box-shadow:0 18px 70px #43274966;text-align:center}.avatar-unlock-dialog::backdrop{background:#35223e80;backdrop-filter:blur(3px)}.avatar-unlock-dialog h2{margin:0;font-size:26px}.avatar-unlock-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(115px,1fr));gap:14px;margin:20px 0}.avatar-unlock-list>div{display:grid;justify-items:center;gap:8px;padding:12px;background:#f5eafa;border-radius:16px}.avatar-unlock-list strong{font-size:14px}.avatar-unlock-actions{display:flex;justify-content:center;gap:10px;flex-wrap:wrap}.avatar-unlock-actions button{min-height:48px}.avatar-unlock-dialog p:empty{display:none}@media(max-width:480px){.avatar-unlock-dialog{padding:20px 16px}.avatar-unlock-dialog h2{font-size:23px}.avatar-unlock-actions button{flex:1}}

.suggestion-form-card{max-width:700px;margin:24px auto}.suggestion-form-card h1{font-size:clamp(25px,5vw,38px);overflow-wrap:anywhere}.suggestion-form-card label{display:block;font-weight:700;margin:18px 0 8px}.suggestion-form-card textarea{box-sizing:border-box;display:block;width:100%;min-height:180px;padding:14px;border:1px solid #bc9fcf;border-radius:14px;font:16px/1.5 system-ui;color:#493450;background:#fff;resize:vertical}#suggestionlength,#suggestionprivacy{font-size:14px}.suggestion-entry h2{overflow-wrap:anywhere}.suggestion-body{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.6}.suggestion-entry button{background:#95435d}

.home-footer{text-align:center;margin:24px 0 8px}.home-footer .mini-link{font-size:12px;min-height:40px;padding:7px 11px}
