*{box-sizing:border-box}
body{min-height:100vh;margin:0;padding:2rem;background:#241036;color:#fff;font:18px Arial,Helvetica,sans-serif}
header{width:min(1200px,100%);margin:0 auto;display:flex;align-items:center;justify-content:space-between}header strong{font-size:1.15rem;letter-spacing:-.03em}
a,.link{color:inherit;font-weight:700;text-decoration:none;background:transparent;border:0;cursor:pointer}
.welcome-screen,.card{width:min(100%,760px);margin:clamp(2rem,9vh,6rem) auto;text-align:center}.welcome-screen h1,.card h1{margin:.5rem 0 0;font-size:clamp(3.2rem,10vw,6rem);line-height:.92;letter-spacing:-.065em}.card h1{font-size:clamp(2.4rem,7vw,4rem)}
.intro-row{display:contents}.qr{width:118px;padding:7px;background:#fff;border-radius:.75rem}.eyebrow{margin:1.5rem 0 0;font-size:.78rem;font-weight:700;letter-spacing:.13em;color:#58d6c7}.zigzag{display:block;width:min(82%,46rem);height:auto;margin:1.35rem auto 0;color:#fff}.intro-copy>p:not(.eyebrow),.card>p{margin:1.4rem auto 0;max-width:34rem;font-size:clamp(1.15rem,2.5vw,1.55rem);line-height:1.42;color:#d8f5f1}
form{width:min(100%,38rem);display:grid;gap:.8rem;margin:2.5rem auto 0;text-align:left}label{display:grid;gap:.5rem;font-weight:700}input,textarea{width:100%;padding:1rem 1.1rem;color:#241036;background:#fff;border:0;border-radius:.75rem;font:inherit}input:focus,textarea:focus{outline:.25rem solid #58d6c7;outline-offset:.2rem}textarea{min-height:7rem;resize:vertical}button:not(.link){padding:1rem 1.35rem;color:#241036;font-weight:700;background:#fff;border:0;border-radius:.75rem;font:inherit;cursor:pointer}button:not(.link):hover{background:#d8f5f1}.hidden{display:none}
.messages{display:grid;gap:.8rem;min-height:220px;margin:2rem 0;text-align:left}.message{max-width:85%;padding:1rem 1.1rem;line-height:1.45;white-space:pre-wrap;color:#241036;background:#fff;border-radius:.8rem}.message.admin{margin-left:auto;background:#58d6c7}.message small{display:block;margin-bottom:.3rem;font-size:.75rem;font-weight:700;color:#5f4b6e}.welcome{align-self:center;text-align:center;color:#d8f5f1}
.admin{display:grid;grid-template-columns:300px 1fr;width:min(1200px,100%);min-height:calc(100vh - 100px);margin:2rem auto 0;background:#301543;border-radius:1rem;overflow:hidden}aside{padding:1.5rem;border-right:1px solid #5a3d6b}.thread{width:100%;max-width:800px;padding:2rem;margin:auto}.chat-row{display:grid;width:100%;padding:.9rem;margin:.35rem 0;text-align:left;color:#fff;background:transparent;border:0;border-radius:.75rem;font:inherit;cursor:pointer}.chat-row:hover{color:#241036;background:#d8f5f1}.chat-row small{margin-top:.3rem;color:#c9b7d5}.chat-row:hover small{color:#5f4b6e}.error{color:#ffe29a;font-weight:700}
@media (min-width:701px) and (max-height:900px) and (orientation:landscape){.welcome-screen{width:min(100%,920px);margin:clamp(1rem,5vh,3rem) auto}.intro-row{display:grid;grid-template-columns:150px 1fr;gap:2.5rem;align-items:center;text-align:left}.qr{width:150px}.intro-copy .eyebrow{margin:0}.intro-copy .zigzag{width:100%;margin:1rem 0 0}.intro-copy>p:not(.eyebrow){margin:1rem 0 0}.welcome-screen form{margin:1.8rem auto 0}.welcome-screen h1{font-size:clamp(3.2rem,8vw,5rem)}}
@media (min-width:701px) and (orientation:landscape){.admin{grid-template-columns:350px minmax(0,1fr);height:calc(100vh - 120px);min-height:0;margin-top:2.5rem;overflow:hidden}.admin aside{padding:2rem;overflow-y:auto}.admin aside h2{font-size:2rem}.thread{max-width:none;height:100%;padding:2.5rem 3rem;overflow-y:auto}.thread h2{margin-top:0;font-size:2.3rem;letter-spacing:-.045em}.chat-row{padding:.25rem .5rem;margin:.08rem 0}.chat-row b{overflow:hidden;font-size:.92rem;text-overflow:ellipsis;white-space:nowrap}.chat-row small{margin-top:.12rem;font-size:.68rem;white-space:nowrap}.new-label{display:inline-block;padding:.12rem .32rem;font-size:.58rem}.messages{min-height:0}.thread form{width:100%;max-width:none;margin-top:1.5rem}}
@media (min-width:701px) and (orientation:landscape){body:not(.student-page){height:100vh;overflow:hidden}.admin aside,.thread{overscroll-behavior:contain;-webkit-overflow-scrolling:touch;touch-action:pan-y}}
@media(max-width:700px){body{padding:1.25rem}.admin{grid-template-columns:1fr}.admin aside{border-right:0;border-bottom:1px solid #5a3d6b}.thread{padding:1.25rem}.welcome-screen,.card{margin:2rem auto}.welcome-screen h1{font-size:clamp(3rem,16vw,5rem)}}
.messages{display:block!important;min-height:0!important;margin:1.1rem 0}.message{display:block;width:fit-content;max-width:85%;min-height:0!important;margin:0 0 .65rem;padding:.72rem .9rem;background:#e3d5eb;border-radius:.65rem}.message.admin{margin-left:auto;background:#58d6c7}.message small{margin-bottom:.18rem}.thread .messages{min-height:0!important}.chat-row.needs-reply{background:#4a2360;box-shadow:inset .25rem 0 #58d6c7}.new-label{display:inline-block;margin-left:.55rem;padding:.18rem .45rem;font-size:.68rem;letter-spacing:.04em;color:#241036;background:#58d6c7;border-radius:.3rem;vertical-align:middle}
.student-page .message{width:86%;max-width:86%;height:fit-content!important;min-height:0!important;align-self:start!important;margin-left:0;border-radius:.55rem}.student-page .message.admin{margin-left:auto;margin-right:0}
.student-page .chat-actions{display:flex;gap:.7rem;width:100%;align-items:stretch}.student-page .chat-actions button{min-height:3.2rem;font-size:1rem}.student-page .chat-actions button[type="submit"]{flex:1}.student-page .leave-button{flex:.55;padding:.78rem 1rem;color:#241036;background:#e3d5eb}.student-page .leave-button:hover{background:#d4c0df}
.admin-chat-actions{display:flex;gap:.7rem;width:100%}.admin-chat-actions button{min-height:3.2rem;font-size:1rem}.admin-chat-actions button[type="submit"]{flex:1}.admin-chat-actions .delete-chat{flex:.55;padding:.78rem 1rem;color:#241036;background:#e3d5eb}.admin-chat-actions .delete-chat:hover{background:#d4c0df}
.delivery{float:right;margin-left:1rem;font-size:.9rem;font-weight:700;letter-spacing:-.2rem;color:#897891}.delivery.read{color:#168c85}
.admin .chat-row{padding:.22rem .5rem;margin:.08rem 0}
.thread.chat-ended textarea{color:#74657c;background:#cfc8d2;border-color:#b3aab8;cursor:not-allowed}.thread.chat-ended button[type="submit"]{color:#81758a;background:#bdb5c2;cursor:not-allowed}.thread.chat-ended button[type="submit"]:hover{background:#bdb5c2}
.qr{cursor:zoom-in}.qr-overlay{position:fixed;z-index:20;inset:0;display:grid;place-items:center;padding:1rem;background:#12071de6;cursor:zoom-out}.qr-overlay[hidden]{display:none}.qr-overlay img{width:auto;max-width:calc(100vw - 2rem);height:auto;max-height:calc(100vh - 2rem);padding:1rem;background:#fff;border-radius:1rem;box-shadow:0 1.5rem 4rem #000;object-fit:contain}
.access-blocked .intro-row{display:block;text-align:center}.access-blocked .qr,.access-blocked #start-form,.access-blocked .intro-copy>p:not(.eyebrow){display:none}.access-note{display:none;margin:1.4rem auto 0;max-width:34rem;font-size:clamp(1.15rem,2.5vw,1.55rem);line-height:1.42;color:#d8f5f1}.access-blocked .access-note{display:block}.access-panel{margin-top:1.5rem;padding-top:1.2rem;border-top:1px solid #5a3d6b}.access-panel h3{margin:0 0 .7rem;font-size:1rem}.access-panel img{display:block;width:100%;max-width:180px;margin:.5rem 0;padding:.35rem;background:#fff;border-radius:.5rem;cursor:zoom-in}.access-panel button{display:block;width:100%;padding:.6rem;font-size:.78rem}.access-panel .access-link{margin-top:.6rem;padding:.5rem;text-align:left;font-size:.64rem;font-weight:400;line-height:1.25;word-break:break-all;color:#d8f5f1;background:#4a2360}.access-panel .access-link:hover{background:#5a2c70}.access-panel .access-link.copied::after{content:' ✓ kopiert';color:#58d6c7;font-weight:700}
.access-panel .delete-all{margin-top:.6rem;color:#fff;background:#8d365b}.access-panel .delete-all:hover{background:#aa426c}
@media (min-width:701px){.access-note{max-width:none;white-space:nowrap}}
.student-page .welcome-screen .qr{display:none}.student-page .welcome-screen .intro-row{display:block;text-align:center}
dialog{width:min(92vw,32rem);padding:0;color:#fff;background:#301543;border:1px solid #5a3d6b;border-radius:1rem;box-shadow:0 1.5rem 4rem #12071d}dialog::backdrop{background:#12071dbb}dialog section{padding:2rem}dialog h2{margin:.25rem 0 1rem;font-size:2rem;letter-spacing:-.04em}dialog p:not(.eyebrow){margin:0;color:#d8f5f1;line-height:1.45}.dialog-actions{display:flex;gap:.7rem;margin-top:2rem}.dialog-actions button{flex:1;min-height:3.1rem;font-size:1rem}.dialog-actions .cancel-delete{color:#241036;background:#e3d5eb}.dialog-actions .confirm-delete{color:#fff;background:#8d365b}.dialog-actions .confirm-delete:hover{background:#aa426c}
.thread .message{width:86%;max-width:86%;height:auto!important;min-height:0!important;align-self:start!important;margin-left:0;border-radius:.55rem}.thread .message.admin{margin-left:auto;margin-right:0}
