/*
  Tipp-Kick Stoppuhr – bereinigtes CSS
  Ziel: gleiches UI, aber klarere Struktur und deutlich weniger !important.
*/

/* =========================================================
   1. Design Tokens
   ========================================================= */
:root{
  --green:#3d7b42;
  --green-dark:#2f6836;
  --green-soft:#eef5ef;
  --theme-wash:#f5f9f5;
  --theme-hover:rgba(61,123,66,.08);
  --bg:var(--theme-wash);
  --card:#ffffff;
  --text:#0b0f0d;
  --muted:#707a72;
  --line:#dfe9df;
  --shadow:0 14px 34px rgba(24,45,28,.10);
  --shadow-soft:0 6px 18px rgba(24,45,28,.08);
  --radius-lg:28px;
  --radius-md:18px;
  --radius-sm:10px;
  --topbar-height:72px;
  --app-height:100dvh;
  --logo-bg:#ffffff;
}

/* =========================================================
   2. Base / Reset
   ========================================================= */
*{box-sizing:border-box}
html,body{width:100%;min-height:100%;margin:0;-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{
  background:var(--bg);
  color:var(--text);
  font-family:Arial,Helvetica,sans-serif;
  overflow:hidden;
}
button,input,select{font:inherit}
button{cursor:pointer;align-items:center;-webkit-tap-highlight-color:transparent;touch-action:manipulation}
input,select,textarea{font-size:16px}
@supports (-webkit-touch-callout:none){input,select,textarea{font-size:16px}}
svg{display:block}

/* =========================================================
   3. Top Navigation
   ========================================================= */
.topbar{
  
  display:flex;
  align-items:center;
  gap:22px;
  padding:0 16px;
  background:#fff;
  border-bottom:1px solid var(--line);
  position:sticky;
  top:0;
  z-index:20;
  overflow-x:auto;
  overflow-y:hidden;
  scrollbar-width:none;
}
.topbar::-webkit-scrollbar{display:none}
.tab{
  min-height:var(--topbar-height);
  display:inline-flex;
  align-items:center;
  gap:9px;
  border:0;
  border-bottom:4px solid transparent;
  background:transparent;
  color:#4d5a50;
  font-weight:900;
  font-size:16px;
  line-height:1;
  white-space:nowrap;
  padding:0 0 3px;
}
.tab.active{color:var(--green);border-bottom-color:var(--green)}
.nav-icon,.title-icon,.control-icon,.ico{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:currentColor;
  flex:0 0 auto;
}
.nav-icon{width:22px;height:22px}
.nav-icon svg,.title-icon svg,.control-icon svg,.ico svg{
  width:100%;
  height:100%;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}

/* =========================================================
   4. Main Panels
   ========================================================= */
main{
  height:calc(100dvh - var(--topbar-height));
  min-height:0;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:auto;
}
.panel{display:none}
.panel.active{display:block}
.panel.card.active{display:block}

/* =========================================================
   5. Stopwatch Screen
   ========================================================= */
.timer-panel{
  width:100%;
  max-width:1500px;
  height:calc(100dvh - var(--topbar-height));
  margin:0 auto;
  padding:18px 30px 24px;
  overflow:hidden;
  text-align:center;
}
.timer-panel.active{
  display:grid;
  grid-template-rows:auto minmax(0,1fr) auto auto;
  justify-items:center;
  gap:10px;
}
.brand{text-align:center;min-width:0}
.brand img{
  max-height:100px;
  max-width:190px;
  object-fit:contain;
  transition:.15s ease;
}
.brand img.logo-bg-pad,
#logoPreview{
  padding:14px 22px;
  border:1px solid #d8e5da;
  border-radius:12px;
  background:var(--logo-bg,#fff);
  box-shadow:0 3px 12px rgba(0,0,0,.07);
}
.brand div{
  margin-top:4px;
  color:var(--green);
  font-weight:900;
  font-size:clamp(21px,2.9vh,30px);
  line-height:1.05;
}
#timeDisplay{
  width:100%;
  max-width:calc(100vw - 28px);
  align-self:center;
  display:block;
  margin:0;
  color:#050806;
  font-size:min(clamp(190px,20vw,330px),calc((100vw - 28px) / 3.15));
  font-weight:950;
  line-height:.78;
  letter-spacing:-.01em;
  text-align:center;
  white-space:nowrap;
  overflow:visible;
}

/* =========================================================
   6. Stopwatch Controls
   ========================================================= */
.round-controls{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:0;
  min-height:60px;
  margin:0 0 14px;
  padding:9px 14px;
  border:1px solid #e6eee6;
  border-radius:999px;
  background:rgba(255,255,255,.92);
  box-shadow:var(--shadow-soft);
}
.circle{
  min-height:38px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:9px;
  border:0;
  border-radius:999px;
  background:transparent;
  color:var(--green);
  font-weight:900;
  font-size:14px;
  line-height:1;
  padding:0 19px;
  white-space:nowrap;
}

.circle:active {
  transform: translateY(1px);
}

.circle:hover{background:var(--theme-hover)}
.circle:first-child,
.circle.primary{
  min-width:120px;
  background:var(--green);
  color:#fff;
  box-shadow:0 6px 14px rgba(61,123,66,.20);
}
.control-icon{width:21px;height:21px}
.control-icon svg{stroke-width:1.8}

/* =========================================================
   7. Phase Sections
   ========================================================= */
.sections-wrap{
  width:min(1280px,94vw);
  margin:0 auto;
  text-align:left;
}
.sections-wrap h2{
  display:none;
  margin:0 0 18px;
  font-weight:950;
}
#phaseButtons.phase-grid{
  display:grid;
  grid-template-columns:1fr;
  justify-items:center;
  gap:12px;
  width:100%;
}
.phase-group{
  width:min(1120px,100%);
  padding:12px 14px;
  border:1px solid var(--line);
  border-radius:14px;
  background:rgba(255,255,255,.78);
  box-shadow:var(--shadow);
}
.extension-block{
  width:min(1120px,100%);
  margin:12px auto 0;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
}
.extension-block.is-open{
  width:min(1120px,100%);
  flex-direction:row;
  align-items:center;
  gap:10px;
}
.phase-group h3{
  margin:0 0 10px;
  color:#727d74;
  font-size:11px;
  line-height:1;
  font-weight:950;
  letter-spacing:.18em;
  text-transform:uppercase;
}

.extension-toggle{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:38px;
  padding:8px 14px;
  white-space:nowrap;
  border:1px solid color-mix(in srgb, var(--green) 42%, transparent);
  border-radius:999px;
  background:color-mix(in srgb, var(--green) 9%, #fff);
  color:var(--green);
  font-weight:900;
  cursor:pointer;
  box-shadow:none;
}
.extension-toggle:hover{
  background:var(--theme-soft-hover);
  transform:translateY(-1px);
}
.extension-plus{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:18px;
  height:18px;
  border-radius:999px;
  background:var(--green);
  color:#fff;
  font-size:15px;
  line-height:1;
}
.extension-block .phase-grid-inner[hidden]{display:none;}
.extension-block .phase-grid-inner{margin-top:10px;width:100%;}
.extension-block.is-open .phase-grid-inner{margin-top:0;flex:1;}
.extension-block.is-open .extension-toggle{
  width:34px;
  height:34px;
  min-width:34px;
  min-height:34px;
  padding:0;
  border-radius:999px;
  border-color:transparent;
  background:var(--green);
  color:#fff;
  box-shadow:none;
}
.extension-block.is-open .extension-toggle:hover{
  background:var(--green);
}
.extension-block.is-open .extension-plus{
  width:18px;
  height:18px;
  background:transparent;
  color:#fff;
  font-size:22px;
  font-weight:900;
  line-height:.8;
}

.phase-grid-inner{display:grid;gap:10px}
.phase-group-hauptspiel .phase-grid-inner{grid-template-columns:repeat(5,minmax(0,1fr))}
.extension-block .phase-grid-inner{grid-template-columns:repeat(3,minmax(0,1fr))}
.phase-btn{
  width:100%;
  min-width:0;
  min-height:48px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:13px;
  border:1.5px solid var(--green);
  border-radius:10px;
  background:#fff;
  color:var(--green);
  font-weight:900;
  font-size:13px;
  line-height:1.1;
  padding:0px 9px;
  white-space:nowrap;
  box-shadow:0 2px 8px rgba(0,0,0,.04);
}
.phase-btn:not(.active):hover{background:var(--theme-hover)}
.phase-btn.active{
  background:linear-gradient(180deg,var(--green),var(--green-dark));
  color:#fff;
  box-shadow:0 4px 12px rgba(0,0,0,.14);
}
.phase-btn .ico{width:21px;height:21px}
.phase-btn .ico svg{stroke-width:1.75}

/* =========================================================
   8. Settings Cards
   ========================================================= */
.card{
  width:min(980px,92vw);
  max-height:calc(100dvh - var(--topbar-height) - 30px);
  margin:auto;
  padding:24px 30px;
  overflow:auto;
  border:1px solid var(--line);
  border-radius:14px;
  background:#fff;
  box-shadow:var(--shadow);
}
.compact-card{width:min(980px,94vw)}
.card h1{
  display:flex;
  align-items:center;
  gap:12px;
  margin:0 0 16px;
  color:var(--green);
  font-size:clamp(28px,4vh,38px);
  line-height:1.15;

}
.card h1::after{
  content:"";
  height:1px;
  flex:1;
  background:var(--line);
}
.card h2{margin:22px 0 8px;font-size:21px}
.card p{font-size:16px;line-height:1.45;color:#405045}
.title-icon{width:40px;height:40px}
.settings-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px 24px;
}
.time-grid-compact{grid-template-columns:repeat(4,minmax(0,1fr))}
.settings-grid label,
.card label:not(.check):not(.file-btn):not(.upload){

  gap:7px;
  font-size:17px;
  font-weight:900;
  display: flex;
  flex-direction: column;
}
.settings-grid input,
.settings-grid select,
.card input[type="text"],
.card select{
  width:100%;
  border:1px solid #b9cdbb;
  border-radius:8px;
  background:#fff;
  color:var(--text);
  font-size:17px;
  padding:11px 12px;
  font-weight: 400;
}
.card input[type="color"]{
  width:30px;
  height:30px;
  padding:3px;
  border:1px solid rgba(80,110,85,.28);
  border-radius:999px;
  background:#fff;
  box-shadow:0 1px 4px rgba(0,0,0,.05);
  cursor:pointer;
  -webkit-appearance:none;
  appearance:none;
  flex:0 0 auto;
}
.card input[type="color"]::-webkit-color-swatch-wrapper{padding:0;border-radius:999px}
.card input[type="color"]::-webkit-color-swatch{border:0;border-radius:999px}
.card input[type="color"]::-moz-color-swatch{border:0;border-radius:999px}
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible{
  outline:1px solid var(--green);
  outline-offset:2px;
  box-shadow:0 0 0 2px var(--theme-hover);
}
.settings-grid input:focus-visible,
.settings-grid select:focus-visible,
.card input[type="text"]:focus-visible,
.card select:focus-visible{
  border-color:var(--green);
}
.card input[type="color"]:focus-visible{
  outline:1px solid var(--green);
  outline-offset:2px;
  box-shadow:0 0 0 2px var(--theme-hover);
}
.logo-color-row{display:flex;flex-wrap:wrap;gap:12px;align-items:center;margin:16px 0 16px;max-width:620px}
.logo-color-row .color-pill{
  display:inline-flex!important;
  flex-direction:row!important;
  align-items:center;
  justify-content:space-between;
  gap:12px!important;
  width:auto;
  min-height:42px;
  padding:6px 8px 6px 14px;
  border:1px solid rgba(80,110,85,.22);
  border-radius:999px;
  background:#fff;
  color:#101812;
  font-size:16px;
  font-weight:900;
  box-shadow:0 2px 8px rgba(0,0,0,.035);
}
.logo-color-row .color-pill:hover{background:var(--theme-hover);border-color:rgba(80,110,85,.34)}
.logo-color-row .color-pill:focus-within{border-color:var(--green);box-shadow:0 0 0 2px var(--theme-hover)}
.brand-upload{margin:20px 0 18px;gap:10px!important;font-weight:900}
.brand-upload input[type="file"]{display:block;width:100%;margin:0;font-weight:400;line-height:1.3}
.brand-upload input[type="file"]::file-selector-button{font-weight:400;margin-right:10px;padding:7px 11px;border:1px solid #b9cdbb;border-radius:8px;background:#fff;color:var(--text)}
.brand-upload input[type="file"]::-webkit-file-upload-button{font-weight:400;margin-right:10px;padding:7px 11px;border:1px solid #b9cdbb;border-radius:8px;background:#fff;color:var(--text)}
.theme-color-actions{display:flex;flex-wrap:wrap;gap:10px;margin:10px 0 6px}
.theme-color-actions button{min-height:44px;padding:9px 18px;border-radius:14px;border:1px solid var(--green);background:#fff;color:var(--green);font-weight:850;box-shadow:0 2px 8px rgba(0,0,0,.04)}
.theme-color-actions button:hover{background:var(--theme-hover)}
.mini-hint{margin:4px 0 14px;color:#526057;font-size:13px;line-height:1.3}

/* =========================================================
   9. Toolbars / Actions / Form Controls
   ========================================================= */
.toolbar-row,.compact-toolbar{
  display:flex;
  align-items:center;
  gap:14px;
  flex-wrap:wrap;
  margin-bottom:14px;
  padding:12px 14px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fbfdfb;
}
.toolbar-row label,.compact-toolbar label{
  display:flex;
  flex-direction:row;
  align-items:center;
  gap:14px;
  font-size:17px;
  font-weight:900;
  white-space: nowrap;
}
.toolbar-row select,.compact-toolbar select{min-width:240px}
.actions{
  display:flex;
  align-items:center;
  gap:14px;
  flex-wrap:wrap;
  margin-top:22px;
}

.actions button,.file-btn,.toolbar-row button,.compact-toolbar button,.sound-card button,.sound-card .upload{
  border:1px solid var(--green);
  border-radius:9px;
  background:#fff;
  color:var(--green);
  font-size:13px;
  font-weight:900;
  padding:11px 18px;
  display: inline-flex;
  gap: 5px;
}

.actions .primary,.toolbar-row button,.compact-toolbar button{
  background:var(--green);
  color:#fff;
}
.file-btn input,.sound-card .upload input{display:none}
.check{
  display:flex;
  align-items:center;
  gap:14px;
  margin:12px 0 24px;
  font-size:17px;
  
}
.check input{
  appearance:none;
  width:20px;
  height:20px;
  display:inline-grid;
  place-content:center;
  border:1.5px solid var(--green);
  border-radius:3px;
}
.check input:checked{background:var(--green)}
.check input:checked::after{content:"✓";color:#fff;font-weight:950;font-size:17px;line-height:1}
input[type="range"]{accent-color:var(--green)}
input[type="range"]::-webkit-slider-runnable-track{height:6px;background:#d9e4da;border-radius:999px}
input[type="range"]::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:18px;height:18px;margin-top:-6px;border-radius:50%;background:var(--green);border:2px solid #fff;box-shadow:0 1px 4px rgba(0,0,0,.15)}
input[type="range"]::-moz-range-track{height:6px;background:#d9e4da;border-radius:999px}
input[type="range"]::-moz-range-thumb{width:18px;height:18px;border-radius:50%;background:var(--green);border:2px solid #fff}

/* =========================================================
   10. Sounds / Music / Branding
   ========================================================= */
#sounds.card{width:min(1280px,95vw)}
.hint{margin:6px 0 14px;color:#526057;font-size:15px}
.sound-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:11px;
  margin-bottom: 20px;
}
.sound-card{
  display:grid;
  grid-template-rows:auto auto 1fr;
  padding:12px 14px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fbfdfb;
}
.sound-card h3{margin:0 0 5px;font-size:19px;color:#1c2a20}
.sound-card p{min-height:32px;margin:0 0 10px;color:#526057;font-size:13px;line-height:1.2;word-break:break-word}
.sound-actions{display:flex;align-items:end;gap:8px;flex-wrap:wrap}
.slider-row{
  display:flex;
  align-items:center;
  gap:18px;
  padding:13px 16px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fbfdfb;
  font-size:16px;
}
.sound-actions button, .sound-actions label.upload {
  padding: 6px 11px;
}
.sound-actions button:active {
    transform: translateY(1px);
}

.test-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.slider-row input{flex:1}
.two-col{display:grid;grid-template-columns:1.55fr 1fr;gap:28px}
.brand-upload{display:none}
.brand-upload.visible{display:flex}
.preview{
  padding:20px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fbfdfb;
}
.preview img{
  width:100%;
  height:280px;
  object-fit:contain;
}
.preview.logo-bg-enabled img{background:var(--logo-bg,#fff)}
.preview span{display:none}

/* =========================================================
   11. Toast / Helper UI
   ========================================================= */
.toast{
  position:fixed;
  inset:0;
  width:min(320px,86vw);
  height:auto;
  min-height:0;
  display:grid;
  grid-template-columns:52px 1fr;
  gap:8px 14px;
  margin:auto;
  padding:22px 24px;
  z-index:100;
  border-radius:14px;
  background:#fff;
  box-shadow:0 20px 70px rgba(0,0,0,.32);
}
.toast[hidden]{display:none!important}
.toast::before{
  content:"✓";
  grid-row:1 / 3;
  width:38px;
  height:38px;
  display:grid;
  place-items:center;
  border:3px solid var(--green);
  border-radius:50%;
  color:var(--green);
  font-size:28px;
  font-weight:950;

}
.toast strong{color:var(--green);font-size:22px;line-height:1.1}
.toast span{font-size:15px;line-height:1.3;color:#405045}
.toast button{
  grid-column:2;
  height:40px;
  margin-top:6px;
  border:0;
  border-radius:8px;
  background:var(--green);
  color:#fff;
  font-size:16px;
  font-weight:900;
}
#beta-credit{
  position:fixed;
  right:14px;
  bottom:10px;
  z-index:20;
  color:rgba(60,60,60,.65);
  font-size:11px;
  font-weight:500;
  letter-spacing:.03em;
  pointer-events:none;
}
body.fullscreen #beta-credit,
:fullscreen #beta-credit,
body.beamer-mode #beta-credit,
body.fullscreen-active #beta-credit{display:none!important}

/* =========================================================
   12. Fullscreen / Beamer Mode
   ========================================================= */
body.fullscreen-active{
  overflow:hidden;
  background:#f7fbf7;
  position:fixed;
  inset:0;
  width:100%;
  height:var(--app-height);
  overscroll-behavior:none;
  -webkit-overflow-scrolling:auto;
}
body.fullscreen-active .topbar,
body.fullscreen-active .round-controls,
body.fullscreen-active .sections-wrap{display:none}
body.fullscreen-active main{
  height:var(--app-height);
  width:100vw;
  overflow:hidden;
}
body.fullscreen-active .timer-panel.active{
  max-width:none;
  height:var(--app-height);
  padding:6vh 6vw 7vh;
  display:grid;
  grid-template-rows:auto 1fr auto;
  gap:0;
}
body.fullscreen-active .brand{
  display:contents;
}
body.fullscreen-active .brand div{
  grid-row:1;
  align-self:start;
  color:var(--green);
  font-size:clamp(48px,5vw,72px);
  margin:0;
}
body.fullscreen-active #timeDisplay{
  grid-row:2;
  align-self:center;
  justify-self:center;
  max-width:100%;
  color:#050806;
  font-size:min(26vw,360px);
  line-height:.85;
  margin:0;
  letter-spacing:-.01em;
}
body.fullscreen-active .brand img{
  grid-row:3;
  justify-self:center;
  align-self:end;
  max-height:clamp(82px,15vh,130px);
  max-width:min(340px,40vw);
}
body.fullscreen-dark{background:#050806;color:#fff}
body.fullscreen-dark main{background:#050806}
body.fullscreen-dark .brand div,
body.fullscreen-dark #timeDisplay{color:#fff}
body.fullscreen-dark .brand img.logo-bg-pad{box-shadow:none}
body.fullscreen-light{background:#f7fbf7;color:#050806}
body.fullscreen-light main{background:#f7fbf7}
body.fullscreen-light .brand div{color:var(--green)}
body.fullscreen-light #timeDisplay{color:#050806}
.mobile-fullscreen-controls{
  position:fixed;
  left:50%;
  bottom:calc(22px + env(safe-area-inset-bottom, 0px));
  transform:translateX(-50%);
  display:flex;
  gap:50px;
  padding:12px 14px;
  border-radius:999px;
  background:rgba(255,255,255,.20);
  box-shadow:0 12px 36px rgba(0,0,0,.25);
  opacity:0;
  pointer-events:none;
  transition:.18s ease;
  z-index:2147483647;
}
.mobile-fullscreen-controls.visible,
.mobile-fullscreen-controls[aria-hidden="false"]{opacity:1;pointer-events:auto}
.mobile-fullscreen-controls button{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  border:0;
  border-radius:999px;
  background:var(--green);
  color:#fff;
  font-weight:900;
  font-size: 40px;
  min-height:88px;
  min-width: 88px;
  padding:10px 14px;
}

.mobile-fullscreen-controls button svg{
  width:46px;
  height:46px;
  flex:0 0 auto;
  display:block;
}




@supports not (height:100dvh){
  body.fullscreen-active main,
  body.fullscreen-active .timer-panel.active{
    height:var(--app-height);
    min-height:var(--app-height);
  }
}

/* =========================================================
   13. Responsive: Desktop Height
   ========================================================= */
@media (max-height:760px) and (min-width:761px){
  .timer-panel{padding-top:10px;padding-bottom:14px;gap:7px}
  .brand img{max-height:40px}
  .brand div{font-size:22px}
  #timeDisplay{font-size:min(clamp(130px,25vh,210px),calc((100vw - 28px) / 3.15))}
  .round-controls{min-height:52px;margin-bottom:8px;padding:6px 14px}
  .circle{min-height:40px;font-size:14px;padding:0 16px}
  .phase-btn{min-height:44px;font-size:13px;padding:6px 10px}
}

/* =========================================================
   14. Responsive: Tablet / Mobile Normal Mode
   ========================================================= */
@media (max-width:900px){
  :root{--topbar-height:126px}
  body{overflow:hidden}
  .topbar{
    display:grid;grid-template-columns:repeat(3, 1fr);
    align-content:flex-start;
    align-items:flex-start;
    flex-wrap:wrap;
    gap:0 34px;
    padding:0 20px;
  }
  .tab{
    width:100%;min-width:0;justify-content:center;
    min-height:62px;
    font-size:22px;
    border-bottom-width:5px;
  }
  .nav-icon{width:30px;height:30px}
  main{align-items:flex-start;justify-content:flex-start;width:100%;overflow-y:auto;overflow-x:hidden}
  .timer-panel.active{
    width:100%;
    max-width:100%;
    min-height:calc(100dvh - var(--topbar-height));
    height:auto;
    display:block;
    padding:82px 26px 70px;
    overflow:visible;
  }
  .brand img{max-height:92px;max-width:210px}
  .brand div{font-size:54px;margin-top:20px}
  #timeDisplay{
    max-width:calc(100vw - 40px);
    margin:70px 0 50px;
    line-height:.86;
    letter-spacing:-.035em;
  }
  .round-controls{
    background:transparent;border:0;box-shadow:none;padding:0;border-radius:0;
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:14px;
    width:80%;
    margin:0 auto 108px;
    padding:16px;
    
  }
  .round-controls .circle:first-child{grid-column:1 / -1;justify-self:center;width:min(420px, 100%);box-shadow:0 10px 24px rgba(0,0,0,.10);margin-bottom: 40px;}
  .round-controls .circle:not(:first-child){background:rgba(255,255,255,.45);border:1px solid rgba(67,122,68,.16);box-shadow:0 2px 8px rgba(0,0,0,.03);border-radius:18px;}
  .circle{
    min-height:72px;
    justify-content:center;
    gap:16px;
    font-size:20px;
    padding:0 16px;
    border-radius:999px;
  }
  .circle:first-child{min-width:0}
  .control-icon{width:38px;height:38px}
  .sections-wrap{width:100%;max-width:100%;overflow:hidden}
  .sections-wrap h2{display:block}
  #phaseButtons.phase-grid{gap:28px}
  .phase-group{width:100%;padding:20px;border-radius:34px;overflow:hidden}
  .phase-group h3{font-size:20px;margin-bottom:22px}
  .phase-group-hauptspiel > .phase-grid-inner{grid-template-columns:repeat(2,minmax(0,1fr))}
  .extension-block{width:100%;}
  .extension-block.is-open{width:100%;}
  .extension-block .phase-grid-inner{grid-template-columns:repeat(3,minmax(0,1fr))}
  .extension-block.is-open .phase-grid-inner{flex:1;width:auto;}
  .extension-block.is-open .extension-toggle{flex:0 0 34px;}
  .phase-btn{
    min-height:76px;
    gap:14px;
    border-radius:15px;
    font-size:20px;
    padding:12px 14px;
    overflow:hidden;
  }
  .phase-btn .ico{width:36px;height:36px}
  .phase-btn span:last-child{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .card{max-height:none;margin:24px auto;padding:24px}
  .settings-grid,.time-grid-compact,.two-col{grid-template-columns:1fr}
  .sound-grid {grid-template-columns: repeat(2, minmax(0, 1fr));}

  .toolbar-row label,
  .compact-toolbar label {
  text-align: left;
  white-space: nowrap;
  }
}

@media (max-width:600px){
  :root{--topbar-height:188px}
  .topbar{gap:0 22px;padding:0 10px;}
  .tab{min-height:50px;font-size:14px;gap:7px;padding:0 4px;white-space:nowrap;}
  .nav-icon{width:22px;height:22px}
  .timer-panel.active{padding:56px 14px 50px}
  .brand img{max-height:70px}
  .brand div{font-size:38px;margin-top:14px}
  #timeDisplay{margin:46px 0 36px;}
  .round-controls{width: 80%;display:grid;grid-template-columns:1fr 1fr;gap:12px;}
  .round-controls .circle{width:100%;}
  .circle{min-height:58px;font-size:16px;gap:7px}
  .control-icon{width:22px;height:22px}
  .sections-wrap h2{font-size:18px;margin-bottom:14px}
  .phase-group{padding:14px;border-radius:22px}
  .phase-group h3{font-size:14px;margin-bottom:10px;letter-spacing:.18em;}
  .phase-grid-inner{gap:10px}
  .phase-btn{min-height:62px;font-size:15px;gap:6px;padding:8px}
  .phase-btn .ico{width:22px;height:22px}
  .sound-grid {grid-template-columns: repeat(1, minmax(0, 1fr));}
  .compact-toolbar {align-items: stretch;}
  .compact-toolbar button {width: 100%;}
  .compact-toolbar {display: grid;grid-template-columns: 1fr;}
  .compact-toolbar button,.phase-btn,.circle,.sound-actions button {justify-content: center;text-align: center;}
  .toolbar-row label, .compact-toolbar label {align-items: normal;}
  .start-btn{box-shadow:0 10px 24px rgba(0,0,0,.10),inset 0 1px 0 rgba(255,255,255,.08);}
}


@media (max-width:520px){
  .logo-color-row{grid-template-columns:1fr}
  .extension-block .phase-grid-inner{grid-template-columns:repeat(3,minmax(0,1fr))}
}


/* Mobile: Verlängerungsbuttons kurz und nebeneinander */
@media (max-width:900px){
  .extension-block{width:100%;}
  .extension-block.is-open{width:100%;}
  .extension-block .phase-grid-inner{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
  .extension-block .phase-btn{
    gap:6px;
    padding:8px 6px;
  }
  .extension-block .phase-label{
    font-size:0;
  }
  .extension-block .phase-label::after{
    content:attr(data-mobile-label);
    font-size:15px;
  }
}

@media (max-width:380px){
  .tab{font-size:12px;gap:4px;}
  .nav-icon{width:18px;height:18px;}
}


/* Hover-Hilfen / Tooltips */
body.tooltips-enabled [data-tip]{
  position:relative;
}
body.tooltips-enabled [data-tip]::after{
  content:attr(data-tip);
  position:absolute;
  left:50%;
  bottom:calc(100% + 10px);
  transform:translateX(-50%) translateY(4px);
  width:max-content;
  max-width:min(280px, calc(100vw - 32px));
  padding:8px 10px;
  border-radius:10px;
  background:rgba(24,31,25,.94);
  color:#fff;
  font-size:12px;
  line-height:1.3;
  font-weight:700;
  text-align:center;
  white-space:normal;
  opacity:0;
  pointer-events:none;
  z-index:9999;
  box-shadow:0 8px 20px rgba(0,0,0,.18);
  transition:opacity .16s ease, transform .16s ease;
}
body.tooltips-enabled [data-tip]::before{
  content:'';
  position:absolute;
  left:50%;
  bottom:calc(100% + 4px);
  transform:translateX(-50%) translateY(4px);
  border:6px solid transparent;
  border-top-color:rgba(24,31,25,.94);
  opacity:0;
  pointer-events:none;
  z-index:9999;
  transition:opacity .16s ease, transform .16s ease;
}
body.tooltips-enabled [data-tip]:hover::after,
body.tooltips-enabled [data-tip]:focus-visible::after,
body.tooltips-enabled [data-tip]:hover::before,
body.tooltips-enabled [data-tip]:focus-visible::before{
  opacity:1;
  transform:translateX(-50%) translateY(0);
}

@media (hover:none){
  body.tooltips-enabled [data-tip]::before,
  body.tooltips-enabled [data-tip]::after{display:none}
}

/* =========================================================
   15. Responsive: Mobile Fullscreen
   ========================================================= */
@media (max-width:900px){
  body.fullscreen-active .topbar{display:none}
  body.fullscreen-active main{height:var(--app-height);width:100vw;overflow:hidden}
  body.fullscreen-active .timer-panel.active{
    height:var(--app-height);
    min-height:var(--app-height);
    display:grid;
    grid-template-rows:auto 1fr auto;
    padding:11vh 5vw 9vh;
  }
  body.fullscreen-active .brand div{font-size:clamp(22px,5vw,28px)}
  body.fullscreen-active .brand img{max-height:clamp(110px,16vh,170px);max-width:55vw}
}

@media (min-width:601px){
.sound-template, .zeit-template {
  display: flex;
  flex-direction: row !important;
}
}



/* v1.4.20: Verlängerung ohne separaten Rahmen, gleich breit wie Hauptspiel */
.extension-block{
  width:min(1120px,100%);
  max-width:min(1120px,100%);
  background:transparent;
  border:0;
  box-shadow:none;
  padding:0;
}
.extension-block.is-open{
  width:min(1120px,100%);
  max-width:min(1120px,100%);
}
.extension-block.is-open .extension-toggle{
  width:34px;
  height:34px;
  min-width:34px;
  min-height:34px;
  flex:0 0 34px;
}
.extension-block.is-open .extension-plus{
  width:18px;
  height:18px;
  font-size:22px;
  line-height:.8;
}
@media (max-width:900px){
  .extension-block,
  .extension-block.is-open{
    width:100%;
    max-width:100%;
  }
}


/* v1.4.21 Verlängerung wieder mit Card-Rahmen */
.extension-block.is-open{
  background:#fff;
  border:1px solid var(--line);
  border-radius:28px;
  box-shadow:0 14px 40px rgba(0,0,0,.06);
  padding:18px;
  position:relative;
}

.extension-block.is-open::before{
  content:"VERLÄNGERUNG";
  position:absolute;
  top:12px;
  left:20px;
  font-size:14px;
  font-weight:900;
  letter-spacing:.22em;
  color:#6f766f;
}

.extension-block.is-open .phase-grid-inner{
  margin-top:28px;
}

.extension-block.is-open .extension-toggle{
  margin-top:28px;
}
