/* ==========================================================================
   OMEGA App-Ansicht (app.php) – Update 2.7
   Handy hochkant: eine Spalte · Tablet / Querformat: zwei Spalten
   ========================================================================== */

body.app-body {
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: contain;
}

.app {
  --art: min(72vw, 340px, 44dvh);
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "top" "clock" "weather" "player" "sleep" "alarm" "links" "hint";
  align-content: start;
  gap: 14px;
  padding:
    max(14px, env(safe-area-inset-top))
    max(16px, env(safe-area-inset-right))
    max(22px, env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-left));
}
.app > * { min-width: 0; }
.app p, .app h1, .app h2 { margin: 0; }

/* ---------- Kopfzeile ---------- */
.app-top { grid-area: top; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; }
.app-brand { display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 44px; padding: 2px 0; }
.app-brand > span:last-child { min-width: 0; }
.app-brand .brand-mark { width: 38px; height: 38px; border-radius: 12px; font-size: 18px; flex: none; }
.app-brand .logo-omega { font-size: 18px; display: block; }
.app-brand small { display: block; color: var(--muted); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-top-actions { display: flex; align-items: center; gap: 8px; flex: none; }

.app-install {
  min-height: 44px; padding: 0 16px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--grad); color: #fff; font-weight: 600; font-size: 14px; box-shadow: var(--glow);
}
.app-install[hidden] { display: none; }
.app-iconbtn {
  width: 44px; height: 44px; border-radius: 50%; cursor: pointer; padding: 0;
  display: grid; place-items: center; font-size: 20px; line-height: 1;
  color: var(--text); background: var(--surface); border: 1px solid var(--line);
  transition: background .2s var(--ease), border-color .2s var(--ease);
}
.app-iconbtn:hover, .app-iconbtn[aria-pressed="true"] { background: var(--surface-2); border-color: var(--line-strong); }

/* ---------- Uhr + Datum ---------- */
.app-clock { grid-area: clock; text-align: center; padding: 4px 0 2px; }
.app-time {
  font-family: var(--font-head); font-weight: 700; line-height: 1;
  font-size: clamp(64px, 22vw, 132px);
  font-variant-numeric: tabular-nums; letter-spacing: -.02em;
  display: flex; align-items: baseline; justify-content: center; gap: .08em;
  text-shadow: 0 0 40px rgba(139, 92, 246, .45);
}
.app-time time { display: block; }
.app-time #app-sec { font-size: .34em; color: var(--muted); font-weight: 600; min-width: 1.7em; text-align: left; letter-spacing: 0; text-shadow: none; }
.app-date { margin-top: 6px !important; color: var(--muted); font-size: clamp(15px, 4.2vw, 19px); font-weight: 500; overflow-wrap: anywhere; }

/* ---------- Wetter ---------- */
.app-weather {
  grid-area: weather; display: flex; align-items: center; gap: 12px; min-height: 60px;
  padding: 10px 16px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--line);
  transition: background .2s var(--ease), border-color .2s var(--ease);
}
.app-weather:hover { background: var(--surface-2); border-color: var(--line-strong); }
.app-wx-icon { font-size: 32px; line-height: 1; flex: none; }
.app-wx-main { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; line-height: 1.25; }
.app-wx-main strong { font-family: var(--font-head); font-size: 24px; font-weight: 700; }
.app-wx-main span { color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-wx-side { display: flex; flex-direction: column; align-items: flex-end; text-align: right; min-width: 0; flex: 0 1 auto; line-height: 1.3; font-size: 14px; }
.app-wx-side small { color: var(--muted); font-size: 12.5px; max-width: 14ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Player ---------- */
.app-player {
  grid-area: player; display: grid; justify-items: center; gap: 14px; text-align: center;
  padding: 18px 16px 16px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.app-art {
  width: var(--art); aspect-ratio: 1 / 1; border-radius: 26px; overflow: hidden;
  background: var(--bg-2); border: 1px solid var(--line);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .04);
  transition: box-shadow .5s var(--ease), transform .5s var(--ease);
}
.app-art img { width: 100%; height: 100%; object-fit: cover; }
.app.is-playing .app-art { box-shadow: 0 18px 60px rgba(139, 92, 246, .45), 0 0 0 1px var(--line-strong); }

.app-meta { width: 100%; min-width: 0; display: grid; gap: 4px; }
.app-kicker {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; justify-self: center;
  font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--cyan);
}
.app-dot { width: 8px; height: 8px; border-radius: 50%; background: #ef4444; box-shadow: 0 0 0 0 rgba(239, 68, 68, .6); flex: none; }
.app.is-playing .app-dot { animation: app-pulse 1.8s ease-out infinite; }
@keyframes app-pulse { 70% { box-shadow: 0 0 0 9px rgba(239, 68, 68, 0); } 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); } }
.app-title {
  font-family: var(--font-head); font-weight: 700; font-size: clamp(20px, 5.6vw, 26px); line-height: 1.25;
  overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.app-artist { color: var(--muted); font-size: 16px; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.app-play {
  width: 88px; height: 88px; border-radius: 50%; border: 0; cursor: pointer; padding: 0;
  display: grid; place-items: center; color: #fff; font-size: 32px; line-height: 1;
  background: var(--grad); box-shadow: var(--glow);
  transition: transform .18s var(--ease), box-shadow .25s var(--ease);
}
.app-play span { display: block; transform: translateX(2px); }
.app.is-playing .app-play span { transform: none; font-size: 28px; letter-spacing: -2px; }
.app-play:hover { box-shadow: 0 16px 48px rgba(192, 38, 211, .5); }
.app-play:active { transform: scale(.94); }
.app-play:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; }
.app-play:focus-visible, .app-chip:focus-visible, .app-iconbtn:focus-visible, .app-install:focus-visible,
.app-links a:focus-visible, .app-weather:focus-visible, .app-brand:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }

.app-vol { width: 100%; max-width: 380px; display: grid; gap: 2px; }
.app-vol label { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 13.5px; }
.app-vol output { color: var(--text); font-variant-numeric: tabular-nums; }
.app-vol input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 44px; margin: 0; background: transparent; cursor: pointer; accent-color: var(--purple);
}
.app-vol input[type="range"]::-webkit-slider-runnable-track { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .14); }
.app-vol input[type="range"]::-moz-range-track { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .14); }
.app-vol input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; margin-top: -10px; border-radius: 50%; background: #fff; border: 4px solid var(--purple-2); box-shadow: 0 2px 10px rgba(0, 0, 0, .5); }
.app-vol input[type="range"]::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 4px solid var(--purple-2); box-shadow: 0 2px 10px rgba(0, 0, 0, .5); }
.app-vol input[type="range"]:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; border-radius: 8px; }

.app-status { color: var(--muted); font-size: 14px; min-height: 2.7em; max-width: 36ch; overflow-wrap: anywhere; }

/* ---------- Sleep-Timer ---------- */
.app-sleep { grid-area: sleep; padding: 14px 14px 16px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); display: grid; gap: 10px; }
.app-sleep-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.app-sleep-head h2 { font-family: var(--font-head); font-size: 17px; font-weight: 700; }
.app-sleep-info { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.app-chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.app-chip {
  min-height: 48px; padding: 0 8px; border-radius: 999px; cursor: pointer;
  color: var(--text); font-weight: 600; font-size: 15px;
  background: rgba(255, 255, 255, .05); border: 1px solid var(--line);
  transition: background .2s var(--ease), border-color .2s var(--ease), transform .15s var(--ease);
}
.app-chip:hover { background: var(--surface-2); border-color: var(--line-strong); }
.app-chip:active { transform: scale(.97); }
.app-chip[aria-pressed="true"] { background: var(--grad); border-color: transparent; box-shadow: var(--glow); }
.app-chip-off[aria-pressed="true"] { background: rgba(255, 255, 255, .14); box-shadow: none; border-color: var(--line-strong); }

/* ---------- Links / Hinweis ---------- */
.app-links { grid-area: links; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.app-links a {
  min-height: 48px; display: grid; place-items: center; border-radius: 999px; font-weight: 500; font-size: 15px; color: var(--muted);
  border: 1px solid var(--line); background: rgba(255, 255, 255, .03);
  transition: color .2s, background .2s, border-color .2s;
}
.app-links a:hover { color: #fff; background: var(--surface-2); border-color: var(--line-strong); }
.app-help { grid-area: hint; display: grid; gap: 10px; }
.app-help .app-howto { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); padding: 0 14px; }
.app.is-standalone .app-help .app-howto { display: none; }   /* schon installiert: Anleitung überflüssig */
.app-ios-hint { padding: 12px 14px; border-radius: var(--radius-sm); border: 1px dashed var(--line-strong); color: var(--muted); font-size: 14px; }
.app-ios-hint[hidden] { display: none; }

/* ---------- Tablet / breit: zwei Spalten ---------- */
@media (min-width: 760px) {
  .app {
    --art: min(34vw, 320px, 46dvh);
    max-width: 1040px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      "top top"
      "clock player"
      "weather player"
      "sleep player"
      "alarm player"
      "links links"
      "hint hint";
    grid-template-rows: auto minmax(auto, 1fr) auto auto auto auto auto;   /* Restplatz geht an die Uhr, nicht an die Karten */
    align-content: start;
    column-gap: 22px;
    row-gap: 16px;
  }
  .app-clock { align-self: center; }
  .app-weather, .app-sleep, .app-alarm { align-self: end; }
  .app-player { align-self: center; }
  .app-time { font-size: clamp(76px, 11vw, 132px); }
  .app-chips { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .app-links { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- Breit, aber nicht sehr hoch (Laptop, Tablet quer): kompakter, damit möglichst nichts scrollt ---------- */
@media (min-width: 760px) and (max-height: 900px) {
  .app { --art: min(30vw, 280px, 36dvh); row-gap: 12px; }
  .app-player { gap: 10px; padding: 14px 16px; }
  .app-play { width: 76px; height: 76px; }
  .app-status { min-height: 1.5em; }
  .app-time { font-size: clamp(72px, 10vw, 118px); }
}

@media (min-width: 760px) and (max-height: 900px) and (pointer: fine) {
  .app-vol input[type="range"] { height: 38px; }
}

/* ---------- Handy hochkant: Uhr, Cover und Play-Knopf sollen auch bei langen Titeln auf den ersten Bildschirm passen ---------- */
@media (max-width: 759px) and (orientation: portrait) {
  .app { --art: min(64vw, 300px, 38dvh); }
  .app-artist { -webkit-line-clamp: 1; }
  .app-player { gap: 12px; }
}

/* ---------- Handy quer (wenig Höhe): Cover links, Bedienung rechts ---------- */
@media (orientation: landscape) and (max-height: 540px) {
  .app {
    --art: min(30vw, 200px, 52dvh);
    max-width: none;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    grid-template-areas:
      "top top"
      "clock player"
      "weather player"
      "sleep player"
      "alarm player"
      "links links"
      "hint hint";
    grid-template-rows: auto minmax(auto, 1fr) auto auto auto auto auto;
    gap: 10px 18px;
    padding-top: max(8px, env(safe-area-inset-top));
  }
  .app-top { min-height: 44px; }
  .app-time { font-size: clamp(56px, 13vw, 104px); }
  .app-date { font-size: 15px; margin-top: 2px !important; }
  .app-player {
    grid-template-columns: var(--art) minmax(0, 1fr);
    grid-template-areas: "art meta" "art play" "art vol" "status status";
    justify-items: stretch; align-items: center; text-align: left; column-gap: 16px; row-gap: 8px; padding: 12px 14px;
  }
  .app-player { align-self: start; }
  .app-art { grid-area: art; align-self: center; border-radius: 18px; }
  .app-meta { grid-area: meta; }
  .app-kicker { justify-self: start; }
  .app-play { grid-area: play; width: 72px; height: 72px; justify-self: start; font-size: 28px; }
  .app-vol { grid-area: vol; max-width: none; }
  .app-status { grid-area: status; min-height: 0; max-width: none; text-align: center; }
  .app-chips { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .app-chip { padding: 0 2px; font-size: 14px; min-height: 44px; white-space: nowrap; }
  .app-links { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .app-links a { min-height: 44px; }
}
@media (orientation: landscape) and (max-height: 540px) and (min-width: 900px) {
  .app-chips { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

/* ---------- Sehr kleine Handys ---------- */
@media (max-width: 359px) {
  .app { padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right)); }
  .app-brand small { display: none; }
  .app-wx-side small { max-width: 9ch; }
}

/* ---------- Nachttisch-Modus: dunkel, ruhig, keine versehentlichen Taps ---------- */
body.is-night { background: #000; }
body.is-night::before { opacity: 0; }
body.is-night .app-weather, body.is-night .app-sleep, body.is-night .app-player { background: rgba(255, 255, 255, .02); box-shadow: none; }
body.is-night .app-clock { opacity: .78; }
body.is-night .app-time { color: #c9bcff; text-shadow: none; }
body.is-night .app-art { opacity: .4; box-shadow: none; }
body.is-night .app-weather, body.is-night .app-player > *:not(.app-art):not(.app-play) { opacity: .75; }
body.is-night .app-play { box-shadow: none; filter: brightness(.7); }
body.is-night .app-links, body.is-night .app-install, body.is-night .app-help { display: none; }
body.is-night .app-chip[aria-pressed="true"] { box-shadow: none; filter: brightness(.75); }

@media (prefers-reduced-motion: reduce) {
  .app.is-playing .app-dot { animation: none; }
  .app *, .app *::before, .app *::after { transition-duration: .01ms !important; }
}
/* Im installierten Modus ohne Browserleiste etwas mehr Luft nach oben */
.app.is-standalone { padding-top: max(18px, env(safe-area-inset-top)); }

/* ---------- Wecker (Update 2.8) ---------- */
.app-alarm { grid-area: alarm; container-type: inline-size; padding: 14px 14px 16px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); display: grid; gap: 12px; }
.app-alarm > * { min-width: 0; }
.app-alarm-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.app-alarm-head h2 { font-family: var(--font-head); font-size: 17px; font-weight: 700; }
.app-alarm-info { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.app-alarm-main { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 10px; }
.app-alarm-time { display: block; min-width: 0; }
.app-alarm-time input {
  width: 100%; min-height: 60px; padding: 0 4px; border-radius: 16px; text-align: center;
  color: var(--text); background: rgba(255, 255, 255, .06); border: 1px solid var(--line-strong);
  font-family: var(--font-head); font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.02em; color-scheme: dark;
}
.app-alarm-time input::-webkit-calendar-picker-indicator { display: none; }   /* Symbol überflüssig: Antippen öffnet die Zeitauswahl */
.app-alarm-time input:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }
.app-alarm-toggle {
  min-height: 60px; padding: 0 10px; border-radius: 16px; cursor: pointer; font-weight: 700; font-size: 16px; line-height: 1.2; color: #fff;
  background: rgba(255, 255, 255, .1); border: 1px solid var(--line);
  transition: background .2s var(--ease), box-shadow .2s var(--ease);
}
.app-alarm-toggle[aria-pressed="true"] { background: var(--grad); border-color: transparent; box-shadow: var(--glow); }
.app-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.app-day {
  min-height: 46px; padding: 0; border-radius: 12px; cursor: pointer; color: var(--text); font-weight: 600; font-size: 14px;
  background: rgba(255, 255, 255, .05); border: 1px solid var(--line);
}
.app-day[aria-pressed="true"] { background: var(--grad); border-color: transparent; }
@container (max-width: 343px) { .app-alarm-time input { font-size: 24px; } .app-days { grid-template-columns: repeat(4, minmax(0, 1fr)); } }   /* schmale Karte: 4 + 3 statt 7 winziger Knöpfe */
.app-alarm-hint, .app-alarm-note { color: var(--muted); font-size: 13.5px; line-height: 1.5; overflow-wrap: anywhere; }
.app-alarm-note strong { color: var(--text); font-weight: 600; }
.app-alarm-warn { padding: 10px 12px; border-radius: 12px; font-size: 14px; line-height: 1.45; color: #fcd34d; border: 1px dashed rgba(251, 191, 36, .55); background: rgba(251, 191, 36, .06); overflow-wrap: anywhere; }
.app-alarm-missed { color: #fca5a5; border-color: rgba(248, 113, 113, .6); background: rgba(248, 113, 113, .07); }
.app-alarm-warn[hidden], .app-alarm-night[hidden], .app-alarm-next[hidden], .app-ring[hidden] { display: none; }
.app-alarm-night, .app-alarm-test {
  min-height: 48px; padding: 0 16px; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: 15px; color: var(--text);
  background: rgba(255, 255, 255, .06); border: 1px solid var(--line-strong);
}
.app-alarm-more summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 600; font-size: 15px; list-style: none; border-radius: 10px; }
.app-alarm-more summary::-webkit-details-marker { display: none; }
.app-alarm-more summary::after { content: "▾"; margin-left: auto; color: var(--muted); transition: transform .2s var(--ease); }
.app-alarm-more[open] summary::after { transform: rotate(180deg); }
.app-alarm-more-body { display: grid; gap: 10px; padding: 2px 0 6px; }
.app-alarm-vol label { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 13.5px; }
.app-alarm-vol output { color: var(--text); font-variant-numeric: tabular-nums; }
.app-alarm-vol input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 44px; margin: 0; background: transparent; cursor: pointer; accent-color: var(--purple); }
.app-alarm-vol input[type="range"]::-webkit-slider-runnable-track { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .14); }
.app-alarm-vol input[type="range"]::-moz-range-track { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .14); }
.app-alarm-vol input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; margin-top: -10px; border-radius: 50%; background: #fff; border: 4px solid var(--purple-2); box-shadow: 0 2px 10px rgba(0, 0, 0, .5); }
.app-alarm-vol input[type="range"]::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 4px solid var(--purple-2); }
.app-check { display: flex; align-items: center; gap: 12px; min-height: 44px; font-size: 15px; cursor: pointer; }
.app-check input { width: 24px; height: 24px; flex: none; accent-color: var(--purple); }
.app-alarm-time input:focus-visible, .app-alarm-toggle:focus-visible, .app-day:focus-visible, .app-alarm-night:focus-visible, .app-alarm-test:focus-visible,
.app-alarm-more summary:focus-visible, .app-check input:focus-visible, .app-alarm-vol input:focus-visible, .app-ring-btn:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }
.app-alarm-next { margin-top: 4px !important; color: var(--cyan); font-weight: 600; font-size: clamp(15px, 4.2vw, 18px); font-variant-numeric: tabular-nums; }

/* Weckruf: Vollbild, groß bedienbar */
.app-ring {
  position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; text-align: center; overflow-y: auto;
  padding: max(20px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  background: radial-gradient(60rem 40rem at 50% 0%, rgba(192, 38, 211, .45), transparent 60%), radial-gradient(50rem 40rem at 50% 110%, rgba(34, 211, 238, .22), transparent 60%), #06050d;
}
.app-ring-inner { width: min(440px, 100%); display: grid; gap: 10px; justify-items: center; }
.app-ring-inner p, .app-ring-inner h2 { margin: 0; }
.app-ring-icon { font-size: 64px; line-height: 1; animation: app-ring-shake 1.1s ease-in-out infinite; transform-origin: 50% 10%; }
@keyframes app-ring-shake { 0%, 60%, 100% { transform: rotate(0); } 10%, 30%, 50% { transform: rotate(-14deg); } 20%, 40% { transform: rotate(14deg); } }
.app-ring-title { font-family: var(--font-head); font-size: clamp(24px, 7vw, 32px); font-weight: 700; }
.app-ring-time { font-family: var(--font-head); font-weight: 700; font-size: clamp(72px, 26vw, 140px); line-height: 1; font-variant-numeric: tabular-nums; text-shadow: 0 0 40px rgba(139, 92, 246, .5); }
.app-ring-msg { color: var(--muted); font-size: 16px; min-height: 2.8em; overflow-wrap: anywhere; }
.app-ring-actions { width: 100%; display: grid; gap: 12px; margin-top: 8px; }
.app-ring-btn { min-height: 68px; border-radius: 22px; border: 1px solid var(--line-strong); cursor: pointer; font-weight: 700; font-size: 20px; color: #fff; background: rgba(255, 255, 255, .08); }
.app-ring-stop { background: var(--grad); border-color: transparent; box-shadow: var(--glow); }
.app-ring-btn[hidden] { display: none; }
body.is-ringing { overflow: hidden; }
@media (orientation: landscape) and (max-height: 540px) {
  .app-ring-inner { width: min(760px, 100%); grid-template-columns: 1fr 1fr; column-gap: 24px; align-items: center; text-align: left; justify-items: stretch; }
  .app-ring-icon, .app-ring-title, .app-ring-time, .app-ring-msg { grid-column: 1; text-align: center; }
  .app-ring-icon { font-size: 40px; }
  .app-ring-time { font-size: clamp(56px, 16vw, 100px); }
  .app-ring-msg { min-height: 0; }
  .app-ring-actions { grid-column: 2; grid-row: 1 / span 4; margin: 0; }
}
body.is-night .app-alarm { background: rgba(255, 255, 255, .02); }
body.is-night .app-alarm-next { opacity: .85; }
@media (prefers-reduced-motion: reduce) { .app-ring-icon { animation: none; } }
