:root{--bg:#f6f7f9;--card:#fff;--text:#172033;--muted:#697386;--line:#dde2ea;--accent:#2457d6;--accent2:#173e9f;--good:#177245;--warn:#8b5d00;--danger:#b3261e;--shadow:0 14px 40px rgba(25,39,72,.08)}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;line-height:1.5}.shell{width:min(1080px,calc(100% - 32px));margin:42px auto 64px}.narrow{width:min(760px,calc(100% - 32px))}.tiny{width:min(460px,calc(100% - 32px))}.hero{text-align:center;margin-bottom:24px}.hero h1,.adminbar h1{margin:.2rem 0;font-size:clamp(2rem,4vw,3.25rem);letter-spacing:-.04em}.hero p{color:var(--muted);max-width:620px;margin:10px auto}.eyebrow{text-transform:uppercase;letter-spacing:.14em;font-size:.75rem;font-weight:800;color:var(--accent)}.card{background:var(--card);border:1px solid var(--line);border-radius:24px;padding:28px;box-shadow:var(--shadow);margin-bottom:22px}.stack{display:grid;gap:20px}label{display:grid;gap:8px;font-weight:650}input,textarea{width:100%;border:1px solid #c9d0dc;border-radius:12px;padding:13px 14px;font:inherit;background:#fff;color:var(--text);outline:none}input:focus,textarea:focus{border-color:var(--accent);box-shadow:0 0 0 3px rgba(36,87,214,.12)}.codeinput{text-align:center;font-size:2.4rem;font-weight:800;letter-spacing:.28em;padding-left:.28em}.biglabel{text-align:center;font-size:1.05rem}.hint,.muted{color:var(--muted)}button,.buttonlike{border:0;border-radius:12px;padding:13px 18px;font:inherit;font-weight:750;cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;justify-content:center}.primary{background:var(--accent);color:#fff}.primary:hover{background:var(--accent2)}.secondary,.buttonlike{background:#edf1f7;color:var(--text)}button:disabled{opacity:.55;cursor:not-allowed}.linkbtn{background:transparent;color:var(--accent);padding:8px 0}.teamgrid{display:grid;gap:12px;margin:18px 0}.teamcard{display:block}.teamcard input{position:absolute;opacity:0;pointer-events:none}.teamcard span{display:block;border:2px solid var(--line);border-radius:16px;padding:22px;font-size:1.15rem;font-weight:800;cursor:pointer;transition:.15s;background:#fff}.teamcard input:checked+span{border-color:var(--accent);background:#eef3ff;box-shadow:0 0 0 3px rgba(36,87,214,.1)}.class-ok{display:inline-block;background:#eaf7ef;color:var(--good);font-weight:750;padding:8px 12px;border-radius:999px}.alert{margin-top:16px;padding:13px 15px;border-radius:12px}.alert.error{background:#fff0ef;color:#8d201a}.alert.success{background:#eaf7ef;color:#12633a}.successscreen{text-align:center;padding:24px 4px}.check{width:72px;height:72px;border-radius:50%;display:grid;place-items:center;margin:0 auto 16px;background:#eaf7ef;color:var(--good);font-size:2.3rem;font-weight:900}.closed{text-align:center;padding:22px}.grid3{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}footer{text-align:center;margin-top:22px}a{color:var(--accent)}.adminbar{display:flex;gap:20px;align-items:center;justify-content:space-between;margin-bottom:16px}.actions{display:flex;gap:10px;align-items:center}.status{display:inline-flex;align-items:center;gap:9px;padding:9px 13px;border-radius:999px;font-weight:750;margin-bottom:20px}.live{background:#eaf7ef;color:var(--good)}.closedstatus{background:#f1f3f6;color:#596273}.dot{width:9px;height:9px;border-radius:50%;background:currentColor}.statgrid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-bottom:22px}.stat{background:#fff;border:1px solid var(--line);border-radius:18px;padding:20px;box-shadow:var(--shadow)}.stat span{display:block;color:var(--muted);font-size:.9rem}.stat strong{font-size:2rem;letter-spacing:-.03em}.sectionhead{display:flex;align-items:center;justify-content:space-between;gap:12px}.resultrow{margin:18px 0}.resulttop{display:flex;justify-content:space-between;gap:12px}.bar{height:12px;background:#edf0f4;border-radius:999px;overflow:hidden;margin-top:8px}.bar>div{height:100%;background:var(--accent);border-radius:999px}.tablewrap{overflow:auto}table{width:100%;border-collapse:collapse}th,td{text-align:left;padding:12px 10px;border-bottom:1px solid var(--line)}th{font-size:.84rem;color:var(--muted);text-transform:uppercase;letter-spacing:.05em}.small{font-size:.88rem}.center{text-align:center}
@media(max-width:720px){.shell{margin-top:22px}.card{padding:20px;border-radius:20px}.grid3,.statgrid{grid-template-columns:1fr}.adminbar{align-items:flex-start;flex-direction:column}.actions{width:100%;flex-wrap:wrap}.actions form,.actions button,.actions .buttonlike{flex:1}.resulttop{align-items:flex-start;flex-direction:column;gap:2px}}
.alert.warning{background:#fff7e8;border:1px solid #ead6a5;color:#5b451c}
.alert.success{background:#eef8f0;border:1px solid #bfdcc5;color:#234f2d}
.dangerzone{margin-top:1.25rem}

select{width:100%;border:1px solid #c9d0dc;border-radius:12px;padding:13px 14px;font:inherit;background:#fff;color:var(--text);outline:none}select:focus{border-color:var(--accent);box-shadow:0 0 0 3px rgba(36,87,214,.12)}.paperform{display:grid;grid-template-columns:1fr 1fr;gap:14px;align-items:end}.paperactions{grid-column:1/-1;display:flex;gap:10px;flex-wrap:wrap}.completebadge{display:inline-flex;padding:5px 9px;border-radius:999px;background:#eaf7ef;color:var(--good);font-size:.84rem;font-weight:800}.stat small{display:block;color:var(--muted);margin-top:2px}@media(max-width:720px){.paperform{grid-template-columns:1fr}.paperactions{grid-column:auto}.paperactions button{width:100%}}


/* v0.1.4 – Branding & Layout-Polish */
.school-logo{display:block;width:min(260px,70vw);height:auto;object-fit:contain}.hero-logo{margin:0 auto 18px}.brandline{display:flex;justify-content:flex-start;align-items:center;margin:0 0 18px 4px}.adminbrand{display:flex;align-items:center;margin-bottom:18px}.admin-logo{width:220px}.admin-title{min-width:0}.adminbar h1{font-size:clamp(1.8rem,3.2vw,2.7rem)}
.actions{flex-shrink:0}.actions form{margin:0}.actions button,.actions .buttonlike{white-space:nowrap;line-height:1.2;min-height:48px;padding:12px 16px}
.setup-card{padding-top:26px}.setup-head{margin-bottom:4px}.setup-head h1{margin:.2rem 0 .4rem;font-size:clamp(1.8rem,3.8vw,2.6rem);letter-spacing:-.03em}.setup-card .alert.warning{font-size:1rem;line-height:1.55;padding:16px 18px;margin:18px 0 22px}.setup-card .stack{gap:18px}.field-title{display:block;min-height:24px}.optional-inline{font-weight:600;white-space:nowrap}.team-settings{align-items:start}.team-settings label{min-width:0}.team-settings input{min-width:0}
@media(max-width:960px){.adminbar{align-items:flex-start;flex-direction:column}.actions{width:100%;flex-wrap:wrap}.actions form{flex:0 0 auto}.actions button,.actions .buttonlike{flex:0 0 auto}}
@media(max-width:720px){.brandline{justify-content:center;margin-left:0}.adminbrand{justify-content:center}.admin-logo{width:min(220px,68vw)}.actions{display:grid;grid-template-columns:1fr 1fr;width:100%}.actions form{display:block}.actions button,.actions .buttonlike{width:100%;white-space:normal}.actions .buttonlike:last-child{grid-column:1/-1}.setup-head{align-items:flex-start}.setup-head .buttonlike{white-space:nowrap}.team-settings{grid-template-columns:1fr}.field-title{min-height:0}}

/* v0.1.5 – Lehrermodus, farbige Zugänge & Gruppensteuerung */
.public-links{display:flex;justify-content:center;gap:18px;align-items:center;flex-wrap:wrap}.public-links a{font-weight:800;text-decoration:none}.admin-link{color:#b42318!important}.admin-link:hover{color:#8f1c13!important}.teacher-link{color:#2457d6!important}.teacher-link:hover{color:#173fa7!important}.teacher-primary{background:#2457d6;color:#fff;border:0;border-radius:12px;padding:13px 18px;font:inherit;font-weight:800;cursor:pointer}.teacher-primary:hover{background:#173fa7}.teacher-code-input{text-transform:uppercase}.teacher-class-card{text-align:center}.teacher-class-card h2{margin-top:16px}.completebadge.manual{background:#eef3ff;color:#2457d6}.inlineform{margin:0}.smallbtn{min-height:36px;padding:8px 11px;border-radius:10px;font-size:.88rem;white-space:nowrap}.teacher-outline{background:#eef3ff;color:#2457d6}.paperform{grid-template-columns:1fr 1fr 140px}.paperform input[type="number"]{width:100%}@media(max-width:820px){.paperform{grid-template-columns:1fr 1fr}.paperform label:nth-of-type(3){grid-column:1/-1}}@media(max-width:720px){.paperform{grid-template-columns:1fr}.paperform label:nth-of-type(3){grid-column:auto}.public-links{gap:14px}}


/* v0.1.7 – iPad: Wahl- und Lehrermodus ohne vertikales Scrollen */
@media (min-width:700px) and (max-width:1180px) and (min-height:700px){
  body.public-page{
    min-height:100vh;
    min-height:100dvh;
    overflow:hidden;
  }
  .public-page .public-shell{
    height:100vh;
    height:100dvh;
    margin:0 auto;
    padding:clamp(12px,2vh,22px) 0 max(10px,env(safe-area-inset-bottom));
    display:flex;
    flex-direction:column;
    justify-content:flex-start;
  }
  .public-page .hero{
    margin-bottom:clamp(8px,1.2vh,14px);
    flex:0 0 auto;
  }
  .public-page .hero-logo{
    width:min(190px,32vw);
    max-height:clamp(58px,8.5vh,92px);
    margin-bottom:clamp(6px,1vh,10px);
  }
  .public-page .hero h1{
    font-size:clamp(1.7rem,3.2vw,2.45rem);
    line-height:1.05;
    margin:.08rem 0;
  }
  .public-page .hero p{
    margin:clamp(4px,.7vh,8px) auto 0;
    font-size:clamp(.9rem,1.45vw,1rem);
    line-height:1.35;
  }
  .public-page .eyebrow{
    font-size:.69rem;
    line-height:1.2;
  }
  .public-page .card{
    padding:clamp(16px,2vh,22px);
    margin-bottom:clamp(8px,1.2vh,14px);
    border-radius:20px;
    flex:0 1 auto;
  }
  .public-page .stack{gap:clamp(10px,1.4vh,16px)}
  .public-page .codeinput{
    font-size:clamp(1.9rem,4vw,2.35rem);
    padding-top:clamp(8px,1vh,12px);
    padding-bottom:clamp(8px,1vh,12px);
  }
  .public-page .hint{
    margin:.15rem 0 0;
    font-size:.9rem;
    line-height:1.3;
  }
  .vote-page #stepVote h2{
    margin:clamp(8px,1vh,12px) 0 clamp(6px,.9vh,10px);
    font-size:clamp(1.25rem,2.5vw,1.6rem);
  }
  .vote-page .teamgrid{
    gap:clamp(7px,1vh,10px);
    margin:clamp(8px,1vh,12px) 0;
  }
  .vote-page .teamcard span{
    padding:clamp(12px,1.55vh,17px) 18px;
    font-size:clamp(1rem,1.8vw,1.12rem);
  }
  .vote-page .class-ok{padding:6px 11px}
  .vote-page .successscreen{padding:clamp(10px,1.5vh,18px) 4px}
  .vote-page .check{
    width:clamp(54px,7vh,66px);
    height:clamp(54px,7vh,66px);
    margin-bottom:10px;
    font-size:2rem;
  }
  .teacher-page .teacher-class-card h2{
    margin:clamp(8px,1.1vh,14px) 0;
    font-size:clamp(1.45rem,2.7vw,1.9rem);
  }
  .teacher-page .teacher-class-card p{
    margin:clamp(7px,1vh,11px) 0;
    line-height:1.35;
  }
  .teacher-page .teacher-primary{
    padding:clamp(10px,1.2vh,13px) 16px;
  }
  .public-page footer.public-links{
    margin-top:auto;
    padding-top:clamp(3px,.6vh,8px);
    flex:0 0 auto;
    font-size:.92rem;
  }
}

/* iPad quer: noch etwas kompakter, damit auch die Team-Auswahl sicher komplett sichtbar bleibt. */
@media (min-width:900px) and (max-width:1366px) and (max-height:900px){
  .public-page .public-shell{padding-top:10px}
  .public-page .hero-logo{width:155px;max-height:58px;margin-bottom:5px}
  .public-page .hero h1{font-size:1.75rem}
  .public-page .hero p{font-size:.88rem;margin-top:3px}
  .public-page .card{padding:15px 20px;margin-bottom:7px}
  .vote-page .teamcard span{padding:10px 16px}
  .vote-page .teamgrid{gap:6px;margin:7px 0}
  .public-page footer.public-links{font-size:.88rem;padding-top:2px}
}

.classcode{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace;font-size:.95em;font-weight:700;letter-spacing:.08em;background:#f4f6f8;border:1px solid #e1e6eb;border-radius:7px;padding:.28rem .48rem;white-space:nowrap}

.completebadge.adminclosed{background:#fff0ef;color:#b42318}

.teacher-closed-card{max-width:560px;margin:18px auto 0;padding:28px 26px;text-align:center;background:#f4faf6;border:1px solid #cfe5d5;border-radius:24px}
.teacher-closed-icon{width:52px;height:52px;margin:0 auto 12px;border-radius:50%;display:grid;place-items:center;background:#dff2e6;color:#18794e;font-size:28px;font-weight:800}
.teacher-closed-title{font-size:1.35rem;font-weight:800;color:#172033;margin-bottom:8px}
.teacher-closed-class{display:inline-flex;align-items:center;justify-content:center;min-width:72px;padding:9px 18px;margin:2px auto 8px;border-radius:999px;background:#e4f4ec;color:#18794e;font-size:1.15rem;font-weight:800}
.teacher-closed-card p{margin:6px auto 0;max-width:430px;color:#667085;line-height:1.45}
@media (min-width:768px) and (max-width:1366px){.teacher-closed-card{padding:22px 24px;margin-top:12px}.teacher-closed-icon{width:46px;height:46px;font-size:24px}.teacher-closed-title{font-size:1.25rem}}


/* v0.3.0 – persönliche Einmalcodes */
.codes-cell{position:relative;display:inline-block}.codes-summary{background:#f1f4f8;color:#344054;border:1px solid #d9e0e8;padding:7px 10px;border-radius:10px;font-size:.86rem;white-space:nowrap}.codes-popover{display:none;position:absolute;z-index:20;right:0;top:calc(100% + 8px);width:min(430px,80vw);max-height:330px;overflow:auto;background:#fff;border:1px solid var(--line);border-radius:16px;padding:14px;box-shadow:0 18px 48px rgba(25,39,72,.18)}.codes-cell:hover .codes-popover,.codes-cell:focus-within .codes-popover,.codes-cell.open .codes-popover{display:block}.codes-popover-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}.code-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.personal-code{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-weight:750;font-size:.84rem;letter-spacing:.04em;padding:7px 8px;border-radius:9px;background:#f2f4f7;color:#667085;border:1px solid #e4e7ec;text-align:center}.personal-code.used{background:#eaf7ef;color:#177245;border-color:#b7ddc7}.teacher-session-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.teacher-groups{display:grid;gap:12px}.teacher-group-row{display:flex;align-items:center;justify-content:space-between;gap:16px;border:1px solid var(--line);border-radius:18px;padding:16px}.teacher-group-row h2{font-size:1.15rem;margin:9px 0}.teacher-group-row form{margin:0}.teacher-page .teacher-code-input{letter-spacing:.08em;font-size:1.8rem}.vote-page .codeinput{letter-spacing:.2em;padding-left:.2em}@media(max-width:720px){.code-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.teacher-group-row{align-items:flex-start;flex-direction:column}.teacher-group-row form,.teacher-group-row button{width:100%}}

/* v0.3.4 – Countdown bei geschlossener Wahl */
.countdown-closed{padding:24px 18px 20px}
.countdown-closed h2{margin:8px 0 6px}
.countdown-closed>p{margin:6px auto;color:var(--muted)}
.countdown-icon{font-size:2rem;line-height:1}
.countdown{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;max-width:560px;margin:22px auto 12px}
.countdown>div{background:#f4f6fa;border:1px solid #e1e6ee;border-radius:16px;padding:14px 8px}
.countdown strong{display:block;font-size:clamp(1.7rem,4vw,2.35rem);line-height:1;font-variant-numeric:tabular-nums;letter-spacing:-.04em}
.countdown span{display:block;margin-top:7px;color:var(--muted);font-size:.78rem;font-weight:700;text-transform:uppercase;letter-spacing:.04em}
.countdown-note{font-size:.9rem}
@media(max-width:560px){
  .countdown{gap:6px}
  .countdown>div{padding:12px 4px;border-radius:13px}
  .countdown span{font-size:.68rem;letter-spacing:0}
}
@media(min-width:768px) and (max-width:1366px){
  .countdown-closed{padding:18px 16px 15px}
  .countdown{margin:15px auto 8px}
  .countdown>div{padding:11px 7px}
}

/* v0.3.5 – größerer horizontaler Countdown + viewport-fit */
.countdown-closed{
  padding:18px 18px 14px;
  margin-top:8px;
}
.countdown-closed h2{
  margin:6px 0 4px;
}
.countdown-closed>p{
  margin:4px auto;
}
.countdown-icon{
  font-size:1.7rem;
  margin-bottom:2px;
}
.countdown{
  display:flex;
  justify-content:center;
  align-items:stretch;
  gap:12px;
  max-width:760px;
  margin:18px auto 10px;
}
.countdown>div{
  flex:1 1 0;
  min-width:0;
  background:#f4f6fa;
  border:1px solid #e1e6ee;
  border-radius:18px;
  padding:16px 10px 13px;
}
.countdown strong{
  display:block;
  font-size:clamp(2.6rem,5.8vw,4.6rem);
  line-height:.95;
  font-variant-numeric:tabular-nums;
  letter-spacing:-.055em;
}
.countdown span{
  display:block;
  margin-top:8px;
  font-size:.8rem;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.06em;
}
.countdown-note{
  margin-top:6px !important;
  font-size:.88rem;
}

/* Geschlossene Wahl auf üblichen Laptop-/iPad-Höhen ohne Scrollen */
body:has(.countdown-closed){
  min-height:100dvh;
}
body:has(.countdown-closed) .page,
body:has(.countdown-closed) .public-page,
body:has(.countdown-closed) main{
  min-height:0;
}
body:has(.countdown-closed) .brand,
body:has(.countdown-closed) .hero,
body:has(.countdown-closed) .public-header{
  margin-top:0;
  margin-bottom:8px;
}
body:has(.countdown-closed) footer,
body:has(.countdown-closed) .public-footer{
  margin-top:8px;
  padding-top:6px;
  padding-bottom:6px;
}

/* iPad quer / typische MacBook-Höhe */
@media (min-width:768px) and (max-height:900px){
  .countdown-closed{
    padding:12px 16px 10px;
  }
  .countdown-icon{
    font-size:1.45rem;
  }
  .countdown-closed h2{
    font-size:1.35rem;
    margin:3px 0;
  }
  .countdown-closed>p{
    font-size:.93rem;
    margin:2px auto;
  }
  .countdown{
    gap:10px;
    margin:12px auto 7px;
  }
  .countdown>div{
    padding:12px 8px 10px;
    border-radius:15px;
  }
  .countdown strong{
    font-size:clamp(2.4rem,5vw,3.7rem);
  }
  .countdown span{
    margin-top:5px;
    font-size:.72rem;
  }
  .countdown-note{
    font-size:.8rem;
  }
}

/* iPad hoch / kleinere Breite: trotzdem nebeneinander */
@media (max-width:767px){
  .countdown{
    gap:6px;
  }
  .countdown>div{
    padding:12px 4px 10px;
    border-radius:13px;
  }
  .countdown strong{
    font-size:clamp(2rem,10vw,3rem);
  }
  .countdown span{
    font-size:.62rem;
    letter-spacing:0;
  }
}

/* v0.3.6 – Live-Aktualisierung im Wahlleiterbereich */
.live-refresh-badge{
  position:fixed;
  top:14px;
  right:14px;
  z-index:1000;
  display:flex;
  align-items:center;
  gap:8px;
  min-height:38px;
  padding:7px 8px 7px 11px;
  border:1px solid #dce3ec;
  border-radius:999px;
  background:rgba(255,255,255,.94);
  box-shadow:0 8px 28px rgba(20,35,55,.10);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  color:#52606f;
  font-size:.82rem;
  font-weight:650;
  white-space:nowrap;
  transition:.2s ease;
}
.live-refresh-dot{
  width:8px;height:8px;border-radius:50%;
  background:#2f80ed;
  box-shadow:0 0 0 3px rgba(47,128,237,.12);
  flex:0 0 auto;
}
.live-refresh-badge strong{color:#172033;font-variant-numeric:tabular-nums}
.live-refresh-badge button{
  width:26px;height:26px;
  display:grid;place-items:center;
  padding:0;margin:0 0 0 2px;
  border:0;border-radius:50%;
  background:#eef3f8;color:#40556d;
  font:700 1rem/1 inherit;
  cursor:pointer;
}
.live-refresh-badge button:hover{background:#e2eaf3}
.live-refresh-badge button:disabled{opacity:.55;cursor:default}
.live-refresh-badge.refreshing .live-refresh-dot{animation:refreshPulse 1s infinite;background:#2f80ed}
.live-refresh-badge.success{border-color:#cfe7d7;background:rgba(245,252,247,.96);color:#26734d}
.live-refresh-badge.success .live-refresh-dot{background:#31a66a;box-shadow:0 0 0 3px rgba(49,166,106,.12)}
.live-refresh-badge.error{border-color:#f1d0cd;background:rgba(255,248,247,.97);color:#a63d35}
.live-refresh-badge.error .live-refresh-dot{background:#d85a50;box-shadow:0 0 0 3px rgba(216,90,80,.12)}
@keyframes refreshPulse{50%{opacity:.35;transform:scale(.82)}}

@media(max-width:760px){
  .live-refresh-badge{
    top:8px;right:8px;
    font-size:.74rem;
    min-height:34px;
    padding:5px 6px 5px 9px;
    box-shadow:0 5px 18px rgba(20,35,55,.10);
  }
  .live-refresh-badge button{width:24px;height:24px}
}

/* v0.3.7 – robustere Live-Aktualisierung */
.live-refresh-badge.error{max-width:min(92vw,430px)}


/* v0.3.8 – stabile Wahlcodes + kompakte Wahlansicht */
.code-version-note{margin:.2rem 0 0}.danger-actions{display:grid;grid-template-columns:1fr 1fr;gap:18px}.regenerate-box{border-left:1px solid var(--line);padding-left:18px}.danger-button{background:#fff0ef;color:#a92a22;border:1px solid #efc1bd}.danger-button:hover{background:#ffe5e2}

/* Öffentliche Wahlansicht nutzt die sichtbare Viewport-Höhe konsequent aus. */
body.public-page.vote-page{min-height:100dvh}
.vote-page .public-shell{min-height:100dvh;margin:0 auto;padding-top:clamp(10px,2.2vh,24px);padding-bottom:max(8px,env(safe-area-inset-bottom));display:flex;flex-direction:column}
.vote-page .hero{margin-bottom:clamp(7px,1.2vh,14px)}
.vote-page .hero-logo{width:min(180px,42vw);max-height:clamp(54px,9vh,82px);margin-bottom:clamp(5px,.8vh,9px)}
.vote-page .hero h1{font-size:clamp(1.55rem,3.8vw,2.35rem);line-height:1.02;margin:.05rem 0}
.vote-page .hero p{font-size:clamp(.82rem,1.6vw,.96rem);line-height:1.25;margin:clamp(3px,.5vh,6px) auto 0}
.vote-page #voteCard{padding:clamp(13px,1.8vh,20px);margin-bottom:clamp(6px,.8vh,10px)}
.vote-page .stack{gap:clamp(8px,1.1vh,12px)}
.vote-page .biglabel{font-size:.98rem}
.vote-page .codeinput{font-size:clamp(1.8rem,5.3vw,2.3rem);padding:clamp(7px,1vh,10px) 12px}
.vote-page .hint{font-size:.82rem;margin:2px 0 0}
.vote-page #stepVote h2{font-size:clamp(1.12rem,2.5vw,1.42rem);margin:clamp(6px,.8vh,9px) 0}
.vote-page .teamgrid{gap:clamp(5px,.8vh,8px);margin:clamp(6px,.8vh,9px) 0}
.vote-page .teamcard span{padding:clamp(9px,1.2vh,13px) 14px;font-size:clamp(.94rem,1.8vw,1.05rem)}
.vote-page #stepVote>.primary{padding:clamp(9px,1.2vh,12px) 16px}
.vote-page .class-ok{padding:5px 10px;font-size:.9rem}
.vote-page footer.public-links{margin-top:auto;padding-top:4px;font-size:.84rem}

@media (min-height:600px){body.public-page.vote-page{overflow:hidden}}

@media (max-width:720px){
  .danger-actions{grid-template-columns:1fr}.regenerate-box{border-left:0;border-top:1px solid var(--line);padding-left:0;padding-top:16px}
  .vote-page .public-shell{width:min(100% - 20px,760px);padding-top:max(7px,env(safe-area-inset-top));padding-bottom:max(6px,env(safe-area-inset-bottom))}
  .vote-page .hero{margin-bottom:6px}
  .vote-page .hero-logo{width:min(145px,38vw);max-height:54px;margin-bottom:4px}
  .vote-page .eyebrow{font-size:.62rem}
  .vote-page .hero h1{font-size:clamp(1.35rem,6vw,1.75rem)}
  .vote-page .hero p{font-size:.76rem;line-height:1.18;margin-top:2px;max-width:92%}
  .vote-page #voteCard{padding:12px 14px;border-radius:18px;margin-bottom:5px}
  .vote-page .biglabel{font-size:.9rem}
  .vote-page .codeinput{font-size:1.85rem;padding:7px 10px;border-radius:10px}
  .vote-page .hint{font-size:.74rem;line-height:1.15}
  .vote-page #stepVote h2{font-size:1.06rem;line-height:1.15;margin:5px 0}
  .vote-page .teamgrid{gap:5px;margin:5px 0 7px}
  .vote-page .teamcard span{padding:9px 11px;border-radius:12px;font-size:.92rem}
  .vote-page #stepVote>.primary{padding:9px 12px;border-radius:10px}
  .vote-page .class-ok{font-size:.82rem;padding:4px 9px}
  .vote-page footer.public-links{font-size:.76rem;padding-top:2px}
}

/* Sehr niedrige Handy-/Browserhöhen: Inhalt bleibt vollständig sichtbar statt unnötig zu scrollen. */
@media (max-height:700px){
  .vote-page .public-shell{padding-top:6px}
  .vote-page .hero-logo{width:125px;max-height:46px;margin-bottom:2px}
  .vote-page .hero h1{font-size:1.4rem}
  .vote-page .hero p{font-size:.72rem}
  .vote-page #voteCard{padding:10px 13px}
  .vote-page .teamcard span{padding:7px 10px}
  .vote-page .teamgrid{gap:4px;margin:4px 0 6px}
  .vote-page footer.public-links{font-size:.72rem}
}

/* v0.3.9 – Links direkt unter dem Eingabebereich + entspanntere Handyansicht */
.vote-page .vote-access-links{
  margin-top:14px;
  padding-top:12px;
  border-top:1px solid var(--line);
  display:flex;
  justify-content:center;
  align-items:center;
  gap:22px;
  font-size:.84rem;
}
.vote-page .vote-access-links a{white-space:nowrap}

/* Die normale Smartphone-Ansicht bekommt wieder etwas mehr Luft.
   Nur bei tatsächlich knapper Höhe wird stärker verdichtet. */
@media (max-width:720px){
  .vote-page .public-shell{
    width:min(100% - 24px,760px);
    padding-top:max(12px,env(safe-area-inset-top));
    padding-bottom:max(10px,env(safe-area-inset-bottom));
  }
  .vote-page .hero{margin-bottom:9px}
  .vote-page .hero-logo{
    width:min(158px,42vw);
    max-height:62px;
    margin-bottom:6px;
  }
  .vote-page .eyebrow{font-size:.68rem}
  .vote-page .hero h1{font-size:clamp(1.48rem,6.3vw,1.9rem)}
  .vote-page .hero p{
    font-size:.82rem;
    line-height:1.25;
    margin-top:4px;
    max-width:96%;
  }
  .vote-page #voteCard{
    padding:16px 16px 14px;
    border-radius:20px;
    margin-bottom:0;
  }
  .vote-page .biglabel{font-size:.96rem}
  .vote-page .codeinput{
    font-size:2rem;
    padding:10px 11px;
    border-radius:12px;
  }
  .vote-page .hint{
    font-size:.8rem;
    line-height:1.22;
    margin-top:4px;
  }
  .vote-page #stepVote h2{
    font-size:1.12rem;
    line-height:1.2;
    margin:7px 0;
  }
  .vote-page .teamgrid{
    gap:7px;
    margin:7px 0 9px;
  }
  .vote-page .teamcard span{
    padding:11px 12px;
    border-radius:13px;
    font-size:.97rem;
  }
  .vote-page #stepVote>.primary{
    padding:11px 13px;
    border-radius:11px;
  }
  .vote-page .class-ok{
    font-size:.88rem;
    padding:5px 10px;
  }
  .vote-page .vote-access-links{
    margin-top:13px;
    padding-top:11px;
    font-size:.8rem;
    gap:20px;
  }
}

/* Erst bei niedriger Höhe wieder kompakt, damit kein unnötiges Scrollen entsteht. */
@media (max-width:720px) and (max-height:700px){
  .vote-page .public-shell{padding-top:6px;padding-bottom:5px}
  .vote-page .hero{margin-bottom:5px}
  .vote-page .hero-logo{width:130px;max-height:48px;margin-bottom:2px}
  .vote-page .eyebrow{font-size:.62rem}
  .vote-page .hero h1{font-size:1.42rem}
  .vote-page .hero p{font-size:.73rem;line-height:1.15;margin-top:2px}
  .vote-page #voteCard{padding:11px 13px 9px}
  .vote-page .codeinput{font-size:1.8rem;padding:7px 10px}
  .vote-page .hint{font-size:.73rem;margin-top:2px}
  .vote-page .teamcard span{padding:8px 10px}
  .vote-page .teamgrid{gap:4px;margin:4px 0 6px}
  .vote-page #stepVote>.primary{padding:8px 11px}
  .vote-page .vote-access-links{margin-top:8px;padding-top:7px;font-size:.73rem}
}
