/* Keep the approved timer and responsive panel structure. */
/* Carry the wordmark's two square dots into action surfaces, including popouts.
   Keep the existing hit areas and theme colors; only soften the corners slightly. */
#with-timer-minimal { --mt-control-radius: 4px; --mt-surface-bottom: 22px; }
#with-timer-minimal:has(.mt-legal-footer) { --mt-surface-bottom: max(52px, env(safe-area-inset-bottom)); }
#with-timer-minimal .mt-content > .mt-surface:has(.mt-legal-footer) { padding-bottom: var(--mt-surface-bottom); }
#with-timer-minimal .mt-legal-footer {
  position: absolute; inset-inline: clamp(16px, 3.4%, 36px); bottom: max(8px, env(safe-area-inset-bottom));
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 12px;
  color: var(--mt-muted); font-size: 11px; line-height: 20px; text-align: start;
}
#with-timer-minimal .mt-legal-footer > :is(span, a) { opacity: .4; }
#with-timer-minimal .mt-legal-footer a { margin-inline-start: auto; color: inherit; text-decoration: none; padding: 2px 0; text-align: end; }
#with-timer-minimal .mt-legal-footer a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 3px; }
#with-timer-minimal .mt-legal-footer a:focus-visible { opacity: 1; outline: 2px solid currentColor; outline-offset: 3px; }
#with-timer-minimal button.mt-icon,
#with-timer-minimal .mt-controls > button.mt-play { border-radius: var(--mt-control-radius); }
#with-timer-minimal :is(.mt-icon, .mt-icon-button, .mt-presence, .mt-viewer-chip, .mt-panel-toggle):focus-visible {
  outline: 2px solid var(--mt-fg); outline-offset: 2px;
}
/* Let a wrapped controls grid reserve its own height instead of overlapping the clock. */
#with-timer-minimal .mt-content > .mt-surface { grid-template-rows: auto minmax(0, 1fr) minmax(80px, max-content); }

/* Swipe the timer, leaving the message scroller, toolbar and page edges alone. */
#with-timer-minimal .mt-clock-stage { touch-action: pan-y pinch-zoom; -webkit-user-select: none; user-select: none; }
#with-timer-minimal .mt-clock-stage input { -webkit-user-select: text; user-select: text; }
#with-timer-minimal .mt-clock-stage[data-mode-dragging="true"],
#with-timer-minimal .mt-clock-stage[data-mode-dragging="true"] * { cursor: grabbing; }

/* A first-visit gesture demonstration stays local and does not intercept input. */
#with-timer-minimal .mt-clock-stage { position: relative; }
#with-timer-minimal .mt-mode-guide {
  position: absolute; inset: 0; z-index: 12; display: grid; place-items: center;
  pointer-events: none; animation: mt-mode-guide-in 180ms ease-out;
}
#with-timer-minimal .mt-mode-guide[hidden] { display: none; }
#with-timer-minimal .mt-mode-guide-card { position: relative; box-sizing: border-box; text-align: center; }
#with-timer-minimal .mt-mode-guide-close {
  position: absolute; width: 36px; height: 36px; display: grid; place-items: center;
  padding: 0; border: 0; border-radius: var(--mt-control-radius); background: transparent;
  color: var(--mt-muted); cursor: pointer; pointer-events: auto;
}
#with-timer-minimal .mt-mode-guide-close svg { width: 16px; height: 16px; }
#with-timer-minimal .mt-mode-guide-close:hover { color: var(--mt-fg); }
#with-timer-minimal .mt-mode-guide-close:focus-visible { outline: 2px solid var(--mt-fg); outline-offset: -4px; }
@keyframes mt-mode-guide-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion:reduce) { #with-timer-minimal .mt-mode-guide { animation:none; } }
#with-timer-minimal .mt-mode-guide {
  --mt-guide-cycle: 5s;
  padding: 12px; color: var(--mt-fg); grid-template-columns: minmax(0,1fr);
  background: radial-gradient(ellipse at center, color-mix(in srgb, var(--mt-bg) 99%, transparent) 0%, color-mix(in srgb, var(--mt-bg) 97%, transparent) 45%, color-mix(in srgb, var(--mt-bg) 85%, transparent) 100%);
}
#with-timer-minimal .mt-mode-guide-card {
  width: min(100%, 460px); min-width: 0; padding: 20px 28px 22px; border: 0; border-radius: 0; background: none;
  display: flex; flex-direction: column; align-items: center;
}
#with-timer-minimal .mt-guide-instructions { display: flex; flex-direction: column; gap: 10px; width: min(100%,360px); margin-top: 18px; }
#with-timer-minimal .mt-guide-instructions p {
  display: flex; align-items: center; justify-content: center; column-gap: 12px;
  margin: 0; font-size: 16px; font-weight: 500; line-height: 1.45; letter-spacing: -.015em;
  text-align: center; text-wrap: balance; word-break: keep-all; overflow-wrap: anywhere;
  animation: mt-guide-step var(--mt-guide-cycle) step-end infinite;
}
#with-timer-minimal .mt-guide-instructions svg { flex: 0 0 20px; width: 20px; height: 20px; }
#with-timer-minimal .mt-guide-instructions [data-guide-copy] { min-width: 0; }
#with-timer-minimal .mt-guide-instructions .mt-guide-instruction-time { animation-delay: -2.5s; }
#with-timer-minimal .mt-guide-instruction-time svg { transform: rotate(90deg); }
#with-timer-minimal .mt-mode-guide-close { inset-block-start: -12px; inset-inline-end: 0; opacity: .65; }
#with-timer-minimal .mt-mode-guide-close:hover { opacity: 1; }
#with-timer-minimal .mt-guide-demo { width: min(100%, 340px); overflow: hidden; mask-image: linear-gradient(90deg,transparent,#000 12%,#000 88%,transparent); }
#with-timer-minimal .mt-guide-track { display: flex; width: 200%; animation: mt-guide-pages var(--mt-guide-cycle) cubic-bezier(.65,0,.2,1) infinite; }
#with-timer-minimal .mt-guide-page { flex: 0 0 50%; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 16px; }
#with-timer-minimal .mt-guide-page span { font: 500 12px/1.5 'SameTimer Mode',Arial,sans-serif; letter-spacing: .2em; color: var(--mt-muted); }
#with-timer-minimal .mt-guide-page strong { font: 400 clamp(38px,5vw,58px)/1.1 'SameTimer Brand',Arial,sans-serif; letter-spacing: -.035em; white-space: nowrap; }
#with-timer-minimal .mt-guide-values { display: flex; justify-content: center; font-variant-numeric: tabular-nums; }
#with-timer-minimal .mt-guide-values b { display: block; font: inherit; }
#with-timer-minimal .mt-guide-minute-window { height: 1.1em; overflow: hidden; }
#with-timer-minimal .mt-guide-values .mt-guide-minute-track { display: flex; flex-direction: column; animation: mt-guide-minute-roll var(--mt-guide-cycle) ease-in-out infinite; }
#with-timer-minimal .mt-guide-minute-track b { flex: 0 0 auto; height: 1.1em; }
#with-timer-minimal .mt-guide-swipe { width: 200px; height: 60px; margin-top: 8px; position: relative; direction: ltr; }
#with-timer-minimal .mt-guide-horizontal { position: absolute; inset: 0; animation: mt-guide-show-x var(--mt-guide-cycle) linear infinite; }
#with-timer-minimal .mt-guide-vertical { position: absolute; inset-block: 0; left: calc(50% - 30px); width: 60px; animation: mt-guide-show-y var(--mt-guide-cycle) linear infinite; }
#with-timer-minimal .mt-guide-rail { position: absolute; left: 8px; right: 8px; top: 30px; height: 1px; background: linear-gradient(90deg,transparent,color-mix(in srgb,var(--mt-fg) 18%,transparent),transparent); }
#with-timer-minimal .mt-guide-chevron { position: absolute; top: 24px; width: 6px; height: 12px; opacity: .4; }
#with-timer-minimal .mt-guide-chevron:first-child { left: 0; }
#with-timer-minimal .mt-guide-chevron:last-child { right: 0; transform: scaleX(-1); }
#with-timer-minimal .mt-guide-touch { position: absolute; top: 12px; left: calc(50% - 18px); width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; border: 1px solid color-mix(in srgb,var(--mt-fg) 23%,transparent); background: color-mix(in srgb,var(--mt-bg) 90%,var(--mt-fg)); animation: mt-guide-touch-sweep var(--mt-guide-cycle) cubic-bezier(.65,0,.2,1) infinite; }
#with-timer-minimal .mt-guide-touch-core { width: 14px; height: 14px; border-radius: 50%; background: var(--mt-fg); box-shadow: 0 0 0 5px color-mix(in srgb,var(--mt-fg) 7%,transparent); }
#with-timer-minimal .mt-guide-pagination { display: flex; gap: 7px; margin-top: 6px; }
#with-timer-minimal .mt-guide-pagination i { width: 4px; height: 4px; background: var(--mt-fg); opacity: .18; animation: mt-guide-page-dot var(--mt-guide-cycle) step-end infinite; }
#with-timer-minimal .mt-guide-pagination i:nth-child(2) { animation-delay: -2.5s; }
#with-timer-minimal .mt-guide-vertical .mt-guide-rail { top: 8px; bottom: 8px; left: 50%; right: auto; height: auto; width: 1px; background: linear-gradient(0deg,transparent,color-mix(in srgb,var(--mt-fg) 18%,transparent),transparent); }
#with-timer-minimal .mt-guide-vertical .mt-guide-chevron { left: calc(50% - 3px); right: auto; }
#with-timer-minimal .mt-guide-vertical .mt-guide-chevron:first-child { top: 0; transform: rotate(90deg); }
#with-timer-minimal .mt-guide-vertical .mt-guide-chevron:last-child { top: auto; bottom: 0; transform: rotate(-90deg); }
#with-timer-minimal .mt-guide-vertical .mt-guide-touch { --mt-guide-travel-y: 10px; width: 26px; height: 26px; top: 17px; left: calc(50% - 13px); animation: mt-guide-touch-y var(--mt-guide-cycle) ease-in-out infinite; }
#with-timer-minimal .mt-guide-vertical .mt-guide-touch-core { width: 12px; height: 12px; }
@keyframes mt-guide-pages { 0%,8% {transform:translateX(0);} 24%,100% {transform:translateX(-50%);} }
@keyframes mt-guide-touch-sweep { 0%,8% {transform:translateX(48px);opacity:0;} 12% {opacity:1;} 24% {transform:translateX(-48px);opacity:1;} 36%,100% {transform:translateX(-48px);opacity:0;} }
@keyframes mt-guide-show-x { 0%,38% {opacity:1;} 46%,100% {opacity:0;} }
@keyframes mt-guide-show-y { 0%,46%,100% {opacity:0;} 50%,96% {opacity:1;} }
@keyframes mt-guide-touch-y { 0%,50%,100% {transform:translateY(var(--mt-guide-travel-y));opacity:0;} 54% {transform:translateY(var(--mt-guide-travel-y));opacity:1;} 65%,74% {transform:translateY(calc(-1 * var(--mt-guide-travel-y)));opacity:1;} 86% {transform:translateY(var(--mt-guide-travel-y));opacity:1;} 94% {transform:translateY(var(--mt-guide-travel-y));opacity:0;} }
@keyframes mt-guide-minute-roll { 0%,55%,86%,100% {transform:translateY(0);} 65%,74% {transform:translateY(-50%);} }
@keyframes mt-guide-page-dot { 0%,49% {opacity:1;} 50%,100% {opacity:.18;} }
@keyframes mt-guide-step { 0%,49% {opacity:1;} 50%,100% {opacity:.58;} }
@container (max-width:480px) {
  #with-timer-minimal .mt-mode-guide-card { padding:12px; }
  #with-timer-minimal .mt-guide-page { gap:12px; }
  #with-timer-minimal .mt-guide-instructions { margin-top:14px; }
  #with-timer-minimal .mt-guide-swipe { height:50px; margin-top:8px; }
  #with-timer-minimal .mt-guide-rail { top:25px; }
  #with-timer-minimal .mt-guide-chevron { top:19px; }
  #with-timer-minimal .mt-guide-touch { top:7px; }
  #with-timer-minimal .mt-guide-vertical .mt-guide-touch { --mt-guide-travel-y: 8px; top:14px; width:22px; height:22px; left:calc(50% - 11px); }
  #with-timer-minimal .mt-guide-pagination { margin-top:0; }
  #with-timer-minimal .mt-mode-guide-close { inset-block-start:-4px; }
}
@media (min-width:480px) and (max-height:480px) {
  #with-timer-minimal .mt-mode-guide-card { display: grid; width: min(100%,560px); grid-template-columns: 144px minmax(0,1fr); column-gap: 20px; padding: 4px 16px; }
  #with-timer-minimal .mt-guide-demo { grid-column:1; grid-row:1; width:144px; }
  #with-timer-minimal .mt-guide-page { gap:6px; }
  #with-timer-minimal .mt-guide-page span { font-size:10px; }
  #with-timer-minimal .mt-guide-page strong { font-size:28px; }
  #with-timer-minimal .mt-guide-swipe { grid-column:1; grid-row:2; width:140px; height:26px; margin:4px auto 0; }
  #with-timer-minimal .mt-guide-rail { top:13px; }
  #with-timer-minimal .mt-guide-chevron { top:7px; }
  #with-timer-minimal .mt-guide-touch { top:0; width:26px; height:26px; left:calc(50% - 13px); }
  #with-timer-minimal .mt-guide-pagination { display:none; }
  #with-timer-minimal .mt-guide-instructions { grid-column:2; grid-row:1/3; margin:0; gap:8px; }
  #with-timer-minimal .mt-guide-instructions p { font-size:15px; line-height:1.4; column-gap:8px; }
  #with-timer-minimal .mt-guide-vertical .mt-guide-touch { --mt-guide-travel-y:4px; top:5px; width:16px; height:16px; left:calc(50% - 8px); }
  #with-timer-minimal .mt-guide-vertical .mt-guide-touch-core { width:8px; height:8px; }
  #with-timer-minimal .mt-guide-vertical .mt-guide-rail { top:3px; bottom:3px; }
  #with-timer-minimal .mt-mode-guide-close { inset-block-start:-12px; inset-inline-end:-8px; }
}
@media (prefers-reduced-motion:reduce) {
  #with-timer-minimal .mt-mode-guide :is(.mt-guide-track,.mt-guide-touch,.mt-guide-minute-track,.mt-guide-horizontal,.mt-guide-vertical,.mt-guide-pagination i,.mt-guide-instructions p) { animation:none; }
  #with-timer-minimal .mt-guide-vertical { display:none; }
}


/* Mode, date and digits move together. A single browser snapshot preserves WebGL
   and the themed transforms; controls stay live and no second clock is mounted. */
html[data-timer-mode-transition] { view-transition-name: none; }
html[data-timer-mode-transition] #with-timer-minimal .mt-surface { overflow-x: clip; }
html[data-timer-mode-transition]::view-transition { pointer-events: none; }
html[data-timer-mode-transition]::view-transition-group(*) { animation-duration: 240ms; animation-timing-function: cubic-bezier(.22,.7,.25,1); }
html[data-timer-mode-transition]::view-transition-image-pair(*) { overflow: clip; }
html[data-timer-mode-transition]::view-transition-old(*),
html[data-timer-mode-transition]::view-transition-new(*) { mix-blend-mode: normal; animation-duration: 240ms; animation-timing-function: cubic-bezier(.22,.7,.25,1); }
html[data-timer-mode-transition="next"]::view-transition-old(*) { animation-name: mt-mode-out-left; }
html[data-timer-mode-transition="next"]::view-transition-new(*) { animation-name: mt-mode-in-right; }
html[data-timer-mode-transition="previous"]::view-transition-old(*) { animation-name: mt-mode-out-right; }
html[data-timer-mode-transition="previous"]::view-transition-new(*) { animation-name: mt-mode-in-left; }
@keyframes mt-mode-out-left { to { transform: translateX(-100%); } }
@keyframes mt-mode-in-right { from { transform: translateX(100%); } }
@keyframes mt-mode-out-right { to { transform: translateX(100%); } }
@keyframes mt-mode-in-left { from { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) {
  html[data-timer-mode-transition]::view-transition-group(*),
  html[data-timer-mode-transition]::view-transition-old(*),
  html[data-timer-mode-transition]::view-transition-new(*) { animation-duration: 0s; }
}

/* Mode and target date belong to the same centered group as the digits. */
#with-timer-minimal .mt-header { position: relative; }
#with-timer-minimal input.mt-number-input { background: transparent; }
#with-timer-minimal .mt-number-input::selection { background: transparent; color: inherit; }
#with-timer-minimal .mt-mode-label {
  flex: 0 0 auto;
  max-width: 100%; color: var(--mt-brand); font-family: "SameTimer Mode", "SameTimer Brand", Arial, sans-serif;
  font-size: 16px; font-weight: 500; line-height: 20px; letter-spacing: .18em;
  text-indent: .18em; direction: ltr; unicode-bidi: isolate; white-space: nowrap; pointer-events: none;
}
#with-timer-minimal .mt-surface > .mt-clock-stage { gap: 12px; }
#with-timer-minimal .mt-mode-label[hidden] { display: none; }
@container (max-width: 600px) {
  #with-timer-minimal .mt-mode-label { font-size: 14px; line-height: 18px; }
  #with-timer-minimal .mt-header [data-action="theme"] { display: none; }
}
@container (max-width: 360px) {
  #with-timer-minimal .mt-header .mt-brand { font-size: 14px; }
}

#with-timer-minimal .mt-stage-banner {
  position: relative; z-index: 8; grid-row: 3; min-width: 0; min-height: 0; margin: 8px 0 16px;
  display: flex; align-items: flex-start; padding: 20px 0;
  background: var(--mt-bg, #000); color: var(--mt-fg, #fff);
  text-align: center; font-size: clamp(36px, 12cqw, 260px); font-weight: 700;
  line-height: 1.25; -webkit-user-select: none; user-select: none;
}
#with-timer-minimal .mt-stage-banner[hidden] { display: none; }
/* Meet at the middle of the available area. Extra height belongs outside the
   time/message pair, so portrait screens cannot stretch the space between them. */
#with-timer-minimal[data-stage-message="true"] .mt-surface { grid-template-rows: auto minmax(0, 1fr) minmax(0, 1fr) minmax(80px, max-content); }
#with-timer-minimal[data-stage-message="true"] .mt-clock-stage { justify-content: flex-end; }
#with-timer-minimal[data-stage-message="true"] .mt-status:empty { display: none; }
#with-timer-minimal[data-stage-message="true"] .mt-controls { grid-row: 4; }
#with-timer-minimal[data-stage-view="true"][data-stage-message="true"] .mt-surface { grid-template-rows: auto minmax(0, 1fr) minmax(0, 1fr); }
#with-timer-minimal .mt-stage-banner-text {
  width: 100%; min-width: 0; overflow: hidden; direction: ltr;
  /* Keep keyboard/touch scrolling without framing the stage message as an input. */
  outline: none; scrollbar-width: none;
}
#with-timer-minimal .mt-stage-banner-text::-webkit-scrollbar { display: none; }
#with-timer-minimal .mt-stage-banner[data-draggable="true"] .mt-stage-banner-text { cursor: grab; touch-action: pan-y; }
#with-timer-minimal .mt-stage-banner[data-dragging="true"] .mt-stage-banner-text { cursor: grabbing; }
#with-timer-minimal .mt-stage-message { display: inline-block; width: max-content; max-width: none; white-space: pre; vertical-align: top; unicode-bidi: plaintext; }
#with-timer-minimal .mt-stage-banner[data-overflow="true"] .mt-stage-banner-text { text-align: left; }
#with-timer-minimal .mt-stage-banner[data-motion="manual"] .mt-stage-banner-text { overflow-x: auto; overscroll-behavior-inline: contain; }
/* A short viewport or docked panel still gets a readable message and usable time controls. */
#with-timer-minimal[data-stage-message="true"][data-stage-compact="true"] .mt-surface {
  grid-template-rows: auto minmax(0, 1fr) minmax(0, 1fr) minmax(72px, max-content);
  padding-block: 12px max(56px, calc(env(safe-area-inset-bottom) + 48px));
}
#with-timer-minimal[data-stage-message="true"][data-stage-compact="true"][data-mode="deadline"] .mt-surface {
  grid-template-rows: auto minmax(0, 1.25fr) minmax(0, .75fr) minmax(72px, max-content);
}
#with-timer-minimal[data-stage-view="true"][data-stage-message="true"][data-stage-compact="true"] .mt-surface { grid-template-rows: auto minmax(0, 1fr) minmax(0, 1fr); }
#with-timer-minimal[data-stage-view="true"][data-stage-message="true"][data-stage-compact="true"][data-mode="deadline"] .mt-surface { grid-template-rows: auto minmax(0, 1.25fr) minmax(0, .75fr); }
#with-timer-minimal[data-stage-message="true"][data-stage-compact="true"] .mt-stage-banner { margin: 4px 0; padding: 6px 0; }
#with-timer-minimal[data-stage-message="true"][data-stage-compact="true"] .mt-clock-stage { padding-block: 4px; gap: 6px; }
#with-timer-minimal[data-stage-message="true"][data-stage-compact="true"] .mt-status { flex-basis: 20px; height: 20px; font-size: 14px; line-height: 20px; }
#with-timer-minimal[data-stage-view="true"] :is(.mt-tools, .mt-controls, .mt-chat, .mt-share) { display: none !important; }
#with-timer-minimal .mt-stage-controls { flex-shrink: 0; margin-bottom: 10px; font-size: 13px; border-bottom: 1px solid var(--mt-line); padding-bottom: 10px; }
#with-timer-minimal .mt-stage-controls summary { cursor: pointer; padding-block: 8px; }
#with-timer-minimal .mt-stage-controls input { box-sizing: border-box; width: 100%; margin-top: 10px; padding: 9px; border: 1px solid currentColor; border-radius: 6px; background: transparent; color: inherit; }
#with-timer-minimal .mt-stage-link { color: inherit; text-underline-offset: 3px; }
#with-timer-minimal .mt-stage-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
#with-timer-minimal .mt-stage-actions [hidden] { display: none; }
#with-timer-minimal .mt-stage-actions button { padding: 8px 12px; border: 1px solid currentColor; border-radius: var(--mt-control-radius); background: transparent; color: inherit; cursor: pointer; }
#with-timer-minimal .mt-stage-actions button:disabled { opacity: .45; cursor: default; }
#with-timer-minimal .mt-stage-controls p:empty { display: none; }
#with-timer-minimal .mt-stage-library { margin-top: 12px; border-top: 1px solid var(--mt-line); min-width: 0; }
#with-timer-minimal .mt-stage-library[hidden] { display: none; }
#with-timer-minimal .mt-stage-scheduler summary { color: var(--mt-muted); }
#with-timer-minimal .mt-stage-scheduler label { display: grid; gap: 6px; }
#with-timer-minimal .mt-stage-scheduler input { margin: 0; min-width: 0; font: inherit; color-scheme: dark; }
#with-timer-minimal .mt-stage-scheduler select { box-sizing: border-box; width: 100%; min-width: 0; padding: 9px; border: 1px solid var(--mt-line); border-radius: 6px; background: var(--mt-bg); color: var(--mt-fg); font: inherit; }
#with-timer-minimal .mt-stage-basis { margin-bottom: 10px; }
#with-timer-minimal .mt-stage-duration { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
#with-timer-minimal .mt-stage-duration input { text-align: center; font-variant-numeric: tabular-nums; }
#with-timer-minimal .mt-stage-scheduler [hidden] { display: none; }
#with-timer-minimal[data-theme="light"] .mt-stage-scheduler input { color-scheme: light; }
#with-timer-minimal .mt-stage-scheduler small { display: block; margin-top: 7px; color: var(--mt-muted); line-height: 1.5; }
#with-timer-minimal .mt-stage-library-tabs { display: flex; gap: 8px; border-bottom: 1px solid var(--mt-line); }
#with-timer-minimal .mt-stage-library-tabs button { flex: 1; min-width: 0; padding: 10px 4px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--mt-muted); font: inherit; cursor: pointer; }
#with-timer-minimal .mt-stage-library-tabs [aria-selected="true"] { color: var(--mt-fg); border-bottom-color: currentColor; }
#with-timer-minimal .mt-stage-library-list { max-height: 180px; min-height: 54px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
#with-timer-minimal .mt-stage-library-list > p { color: var(--mt-muted); padding: 10px 0; }
#with-timer-minimal .mt-stage-entry { padding: 12px 0; border-bottom: 1px solid var(--mt-line); }
#with-timer-minimal .mt-stage-entry p { margin: 7px 0; line-height: 1.5; overflow-wrap: anywhere; }
#with-timer-minimal .mt-stage-entry-meta { display: flex; flex-wrap: wrap; gap: 4px 8px; color: var(--mt-muted); font-size: 11px; }
#with-timer-minimal .mt-stage-entry-meta span { overflow-wrap: anywhere; }
#with-timer-minimal .mt-stage-entry-actions { display: flex; flex-wrap: wrap; gap: 8px; }
#with-timer-minimal .mt-stage-entry-actions button { padding: 6px 9px; border: 1px solid var(--mt-line); border-radius: var(--mt-control-radius); background: var(--mt-soft); color: var(--mt-fg); font: inherit; font-size: 12px; cursor: pointer; }
#with-timer-minimal .mt-stage-entry-actions button:disabled { opacity: .45; cursor: default; }
#with-timer-minimal .mt-stage-library-status { font-size: 12px; line-height: 1.5; }
#with-timer-minimal .mt-room-actions { grid-column: 1; grid-row: 1; justify-self: start; display: flex; align-items: center; gap: 4px; }
#with-timer-minimal .mt-stage-toggle { width: 44px; height: 44px; flex: 0 0 44px; }
#with-timer-minimal .mt-stage-toggle[hidden] { display: none; }
#with-timer-minimal .mt-stage-toggle svg { width: 22px; height: 22px; stroke-width: 1.8px; }
#with-timer-minimal .mt-controls:has(.mt-stage-toggle:not([hidden])) { grid-template-columns: minmax(92px, 1fr) 44px var(--mt-play-width) 44px minmax(92px, 1fr); }

/* Mode, date and digits share the clock stage and its mode transition. */
#with-timer-minimal .mt-clock-stage { position: relative; }
/* A completion pulse keeps both the time and controls readable. */
#with-timer-minimal .mt-completion-flash {
  position: absolute; inset: 0; pointer-events: none; z-index: 5;
  border: clamp(3px, .5vmin, 7px) solid var(--mt-digits, var(--mt-fg));
  box-shadow: inset 0 0 70px color-mix(in srgb, var(--mt-digits, var(--mt-fg)) 16%, transparent);
  animation: mt-completion-pulse 1.2s ease-in-out 3;
}
#with-timer-minimal .mt-overtime-sign { font-family: Arial, sans-serif; font-size: .6em; font-weight: 400; text-align: center; align-self: center; }
#with-timer-minimal .mt-status:is([data-kind="finished"], [data-kind="overtime"]) { visibility: visible; color: var(--mt-muted); }
#with-timer-minimal .mt-completion-settings { border-top: 1px solid var(--mt-line); padding-top: 16px; margin-top: 16px; }
#with-timer-minimal .mt-completion-settings h3 { margin: 0 0 12px; font-size: 14px; font-weight: 600; }
#with-timer-minimal .mt-alarm-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: end; }
#with-timer-minimal .mt-alarm-controls .mt-field { margin: 0; }
#with-timer-minimal .mt-alarm-controls button { min-height: 42px; }
#with-timer-minimal .mt-alarm-volume { margin-top: 16px; grid-template-columns: minmax(0, 1fr) auto; }
#with-timer-minimal .mt-alarm-volume input { grid-column: 1 / -1; }
#with-timer-minimal [data-alarm-volume-value] { text-align: end; color: var(--mt-muted); font-variant-numeric: tabular-nums; }
#with-timer-minimal .mt-alarm-notice {
  position: absolute; top: calc(100% + 12px); inset-inline: 0;
  z-index: 4; box-sizing: border-box; width: fit-content; max-width: calc(100% - 32px); margin-inline: auto;
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px 16px;
  padding: 8px 8px 8px 16px; border: 1px solid var(--mt-line); border-radius: var(--mt-control-radius);
  background: var(--mt-panel); color: var(--mt-fg); font-size: 14px;
}
#with-timer-minimal .mt-alarm-notice[hidden] { display: none; }
@container (max-width: 600px) {
  #with-timer-minimal .mt-alarm-notice { top: calc(100% + 36px); }
}
@media (max-height: 500px) and (min-width: 600px) {
  #with-timer-minimal .mt-alarm-notice { top: calc(100% + 12px); }
}
#with-timer-minimal .mt-alarm-notice button {
  min-height: 44px; padding: 8px 16px; border: 1px solid var(--mt-fg); border-radius: var(--mt-control-radius);
  background: var(--mt-fg); color: var(--mt-bg); font: inherit; font-weight: 600; cursor: pointer;
}
#with-timer-minimal .mt-alarm-notice button:focus-visible { outline: 2px solid var(--mt-fg); outline-offset: 3px; }
@keyframes mt-completion-pulse { 0%, 100% { opacity: 0; } 40%, 60% { opacity: .65; } }
@media (prefers-reduced-motion: reduce) { #with-timer-minimal .mt-completion-flash { animation: none; opacity: .5; } }
#with-timer-minimal .mt-deadline {
  /* Large digit glyph boxes extend above their line box. Keep date editing
     above that hit area without adding visual space between the rows. */
  position: relative; z-index: 2;
  flex: 0 0 auto; margin-top: -6px; display: flex; justify-content: center; align-items: center; gap: .85em;
  direction: ltr; color: var(--mt-muted); font-family: var(--mt-timer-font, "With Timer Manrope", Arial, sans-serif);
  font-size: clamp(16px, 2.6vmin, 24px); font-weight: 500; line-height: 1.4; letter-spacing: .02em;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
#with-timer-minimal .mt-deadline[hidden], #with-timer-minimal .mt-deadline-time[hidden] { display: none; }
#with-timer-minimal .mt-deadline-date { display: inline-flex; align-items: baseline; }
#with-timer-minimal .mt-date-unit { display: inline-block; width: 1.6em; }
#with-timer-minimal .mt-date-dot { width: .5em; text-align: center; font-weight: 600; }
#with-timer-minimal .mt-deadline .mt-number, #with-timer-minimal .mt-deadline .mt-number-input {
  color: inherit; font: inherit; letter-spacing: inherit; border-radius: 4px;
}
#with-timer-minimal .mt-deadline-time { font: inherit; letter-spacing: inherit; }
#with-timer-minimal[data-stage-message="true"][data-stage-compact="true"] .mt-deadline { margin-top: 0; font-size: 14px; line-height: 20px; }
#with-timer-minimal .mt-clock-stage[data-clock-compact="true"] { padding-block: 4px; gap: 6px; }
#with-timer-minimal .mt-clock-stage[data-clock-compact="true"] .mt-status:empty { display: none; }
#with-timer-minimal .mt-clock-stage[data-clock-compact="true"] .mt-deadline {
  margin-top: 0; font-size: 14px; line-height: 20px;
}

#with-timer-minimal:not([data-timer-known="true"]) .mt-clock {
  visibility: hidden;
}

#with-timer-minimal:not([data-view-mounted]) .mt-participant-count {
  visibility: hidden;
}

#with-timer-minimal .mt-connection {
  /* The full-width status container must not cover nearby timer controls. */
  pointer-events: none;
  position: absolute;
  bottom: 5px;
  left: 16px;
  right: 16px;
  min-height: 16px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 2px 8px;
  margin: 0;
  color: var(--mt-muted);
  text-align: center;
  font-size: 12px;
  line-height: 16px;
}
#with-timer-minimal .mt-connection > :is(.mt-latency-group, a) { pointer-events: auto; }

#with-timer-minimal .mt-connection[hidden],
#with-timer-minimal .mt-connection > [hidden] { display: none; }
#with-timer-minimal:has(.mt-legal-footer):has(.mt-latency-group:not([hidden])) {
  --mt-surface-bottom: max(76px, calc(env(safe-area-inset-bottom) + 68px));
}
#with-timer-minimal .mt-surface:has(.mt-legal-footer) .mt-connection {
  bottom: max(32px, calc(env(safe-area-inset-bottom) + 24px));
}
#with-timer-minimal .mt-latency-group { display: inline-flex; }
#with-timer-minimal .mt-latency {
  display: inline-flex; align-items: center; gap: 5px; flex: 0 0 auto;
  min-height: 24px; padding: 3px 4px; margin: 0; border: 0; background: transparent;
  color: inherit; font: inherit; border-radius: var(--mt-control-radius); cursor: pointer;
  font-variant-numeric: tabular-nums; white-space: nowrap; direction: ltr;
  --mt-latency-color: #969696;
}
#with-timer-minimal .mt-latency:focus-visible { outline: 2px solid var(--mt-fg); outline-offset: 2px; }
#with-timer-minimal .mt-latency:hover { color: var(--mt-fg); }
#with-timer-minimal .mt-latency::before,
#with-timer-minimal .mt-latency-ranges > span::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: var(--mt-latency-color); flex-shrink: 0;
}
#with-timer-minimal .mt-connection [data-latency="good"] { --mt-latency-color: #35b875; }
#with-timer-minimal .mt-connection [data-latency="elevated"] { --mt-latency-color: #e5b137; }
#with-timer-minimal .mt-connection [data-latency="poor"] { --mt-latency-color: #ef625d; }
#with-timer-minimal[data-theme="light"] .mt-connection [data-latency="good"] { --mt-latency-color: #16814b; }
#with-timer-minimal[data-theme="light"] .mt-connection [data-latency="elevated"] { --mt-latency-color: #a97500; }
#with-timer-minimal[data-theme="light"] .mt-connection [data-latency="poor"] { --mt-latency-color: #c73530; }
#with-timer-minimal .mt-latency-info {
  width: 13px; height: 13px; display: inline-grid; place-items: center; border: 1px solid currentColor;
  border-radius: 50%; font: 600 10px/1 Arial, sans-serif; opacity: .8;
}
#with-timer-minimal .mt-latency-help {
  position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); z-index: 15;
  display: grid; gap: 12px; width: 304px; max-width: 100%; box-sizing: border-box;
  padding: 16px; border: 1px solid var(--mt-line); border-radius: var(--mt-control-radius);
  background: var(--mt-panel, var(--mt-bg)); color: var(--mt-fg); box-shadow: 0 6px 24px #0003;
  text-align: start; font-size: 13px; line-height: 1.5; white-space: normal;
}
#with-timer-minimal .mt-latency-help [hidden], #with-timer-minimal .mt-latency-help[hidden] { display: none; }
#with-timer-minimal .mt-latency-ranges { display: grid; gap: 6px; }
#with-timer-minimal .mt-latency-ranges > span { display: flex; align-items: center; gap: 8px; }
#with-timer-minimal .mt-latency-ranges bdi { margin-inline-start: auto; font-variant-numeric: tabular-nums; }
#with-timer-minimal .mt-latency-warning { color: var(--mt-muted); }

#with-timer-minimal .mt-connection a {
  margin-left: 8px;
  color: inherit;
  text-underline-offset: 3px;
}

#with-timer-minimal .mt-message-input:disabled {
  cursor: default;
}

#with-timer-minimal [data-action="toggle"]:disabled:hover {
  opacity: .35;
}

#with-timer-minimal .mt-header .mt-tools {
  grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 44px;
}

/* Browser bars leave very little height after a phone rotates. Reserve only
   the space the footer/controls use, rather than shrinking digits to body text. */
@media (max-height: 500px) and (min-width: 560px) {
  #with-timer-minimal:has(.mt-legal-footer),
  #with-timer-minimal:has(.mt-legal-footer):has(.mt-latency-group:not([hidden])) {
    --mt-surface-bottom: max(56px, calc(env(safe-area-inset-bottom) + 48px));
  }
  #with-timer-minimal:not([data-stage-message="true"]) .mt-content > .mt-surface {
    padding-top: 8px;
    grid-template-rows: auto minmax(0, 1fr) minmax(56px, max-content);
  }
  #with-timer-minimal .mt-surface > .mt-controls { padding-block: 6px; }
  #with-timer-minimal .mt-controls > button.mt-play { height: 44px; }
  #with-timer-minimal[data-view-mounted] .mt-clock-stage { padding-block: 4px; gap: 4px; }
  #with-timer-minimal .mt-mode-label { font-size: 13px; line-height: 18px; }
  #with-timer-minimal[data-view-mounted] .mt-status { flex-basis: 20px; height: 20px; font-size: 14px; line-height: 20px; }
  #with-timer-minimal .mt-status:empty { display: none; }
  #with-timer-minimal .mt-deadline { margin-top: 0; font-size: 14px; line-height: 20px; }
}

#with-timer-minimal .mt-fullscreen-button { width: 100%; margin-bottom: 22px; }
#with-timer-minimal .mt-theme-scheme { width: 100%; margin-bottom: 18px; }
#with-timer-minimal .mt-fullscreen-shortcut[hidden],
#with-timer-minimal .mt-fullscreen-shortcut[aria-pressed="false"] [data-fullscreen-exit],
#with-timer-minimal .mt-fullscreen-shortcut[aria-pressed="true"] [data-fullscreen-enter],
#with-timer-minimal .mt-fullscreen-notice[hidden] { display: none; }
#with-timer-minimal .mt-fullscreen-notice {
  position: absolute; inset-inline-end: 0; top: 100%; z-index: 45; box-sizing: border-box;
  width: min(320px, 100%); margin: 4px 0 0; padding: 12px; border: 1px solid var(--mt-line);
  border-radius: var(--mt-control-radius); background: var(--mt-bg); color: var(--mt-fg); font-size: 14px; line-height: 1.5;
}
#with-timer-minimal:fullscreen { width: 100%; max-width: none; height: 100dvh; min-height: 0; border-radius: 0; }
#with-timer-minimal:fullscreen .mt-content { height: 100%; }
#with-timer-minimal:fullscreen[data-session-panel="closed"] .mt-surface { height: 100%; min-height: 0; }

#with-timer-minimal .mt-presence {
  margin: 0;
  padding: 0 4px;
  border: 0;
  border-radius: var(--mt-control-radius);
  background: transparent;
  cursor: pointer;
}

#with-timer-minimal .mt-presence:is(:hover, :focus-visible, [aria-expanded="true"]) {
  background: var(--mt-soft);
  color: var(--mt-fg);
}

#with-timer-minimal .mt-presence:is(:focus-visible, [aria-expanded="true"]) > :is(svg, i) {
  opacity: 1;
}

/* Running timers keep the chrome quiet without moving the clock or removing
   controls. Only a live connection fades; reconnecting must stay conspicuous. */
#with-timer-minimal {
  --mt-chrome-fade: 180ms;
  --mt-chrome-wait: 0s;
  --mt-chrome-reveal: 140ms;
}
#with-timer-minimal .mt-header > .mt-brand,
#with-timer-minimal :is(.mt-tools, .mt-controls, .mt-room-actions) > button {
  transition: opacity var(--mt-chrome-fade) ease var(--mt-chrome-wait);
}
#with-timer-minimal[data-status="running"][data-connection="live"] {
  --mt-chrome-fade: 800ms;
  --mt-chrome-wait: 250ms;
}
#with-timer-minimal[data-status="running"][data-connection="live"] .mt-header > .mt-brand { opacity: .38; }
#with-timer-minimal[data-status="running"][data-connection="live"] :is(.mt-tools, .mt-controls, .mt-room-actions) > button:not(:disabled) { opacity: .46; }
#with-timer-minimal[data-status="running"][data-connection="live"] .mt-controls > .mt-play:not(:disabled) { opacity: .36; }
/* Touch controls stay easier to find and act on the first tap. */
@media (hover: none) {
  #with-timer-minimal[data-status="running"][data-connection="live"] :is(.mt-tools, .mt-controls, .mt-room-actions) > button:not(:disabled) { opacity: .62; }
  #with-timer-minimal[data-status="running"][data-connection="live"] .mt-controls > .mt-play:not(:disabled) { opacity: .5; }
}
@media (hover: hover) {
  #with-timer-minimal[data-status="running"][data-connection="live"] .mt-header > .mt-brand:hover,
  #with-timer-minimal[data-status="running"][data-connection="live"] :is(.mt-tools, .mt-controls, .mt-room-actions) > button:not(:disabled):hover {
    opacity: 1; transition-duration: var(--mt-chrome-reveal); transition-delay: 0s;
  }
}
#with-timer-minimal[data-status="running"][data-connection="live"] :is(.mt-tools, .mt-controls, .mt-room-actions) > button:not(:disabled):is(:focus-visible, :active, [aria-expanded="true"]) {
  opacity: 1; transition-duration: var(--mt-chrome-reveal); transition-delay: 0s;
}
@media (prefers-reduced-motion: reduce) {
  #with-timer-minimal, #with-timer-minimal[data-status="running"][data-connection="live"] {
    --mt-chrome-fade: 0s; --mt-chrome-wait: 0s; --mt-chrome-reveal: 0s;
  }
}
@media (forced-colors: active) {
  #with-timer-minimal[data-status="running"][data-connection="live"] .mt-header > .mt-brand,
  #with-timer-minimal[data-status="running"][data-connection="live"] :is(.mt-tools, .mt-controls, .mt-room-actions) > button:not(:disabled),
  #with-timer-minimal[data-status="running"][data-connection="live"] .mt-controls > .mt-play:not(:disabled) { opacity: 1; }
}

/*
 * Session panel placement is decided from the whole viewport, never from the
 * timer area the panel itself shrinks (that would flip the decision back and
 * forth). Later rules win: right dock > bottom dock > overlay sheet.
 * - right:  landscape, and a 320px panel still leaves >= 520px of timer (>= 840px wide)
 * - bottom: otherwise, when the bottom panel still leaves >= 300px of timer (>= 520px tall)
 * - sheet:  smaller screens; the panel covers the timer until it is closed
 * Docked panels own a grid track, so fitClock's ResizeObserver resizes the digits.
 */
#with-timer-minimal {
  --mt-side-panel: 320px;
  --mt-bottom-panel: clamp(220px, 38svh, 360px);
}

#with-timer-minimal .mt-content > .mt-chat {
  box-sizing: border-box;
  position: fixed;
  z-index: 3;
  right: 0;
  bottom: 0;
  left: 0;
  max-height: 75svh;
  height: 75svh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  overscroll-behavior: contain;
  padding: 8px 20px 0;
  border: 0;
  border-top: 1px solid var(--mt-line);
  border-radius: 18px 18px 0 0;
  background: var(--mt-panel);
  box-shadow: 0 -12px 40px rgb(0 0 0 / .16);
}

@media (orientation: landscape) {
  #with-timer-minimal .mt-content > .mt-chat {
    top: 0;
    left: auto;
    width: min(var(--mt-side-panel), 100vw);
    max-height: none;
    height: auto;
    border-top: 0;
    border-left: 1px solid var(--mt-line);
    border-radius: 18px 0 0 18px;
    box-shadow: -12px 0 40px rgb(0 0 0 / .16);
  }
}

@media (min-height: 520px) {
  #with-timer-minimal[data-session-panel="open"] .mt-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(280px, 1fr) var(--mt-bottom-panel);
    height: 100svh;
  }

  #with-timer-minimal[data-session-panel="open"] .mt-surface { height: auto; }

  #with-timer-minimal .mt-content > .mt-chat {
    position: static;
    width: auto;
    min-height: 0;
    max-height: none;
    height: auto;
    border: 0;
    border-top: 1px solid var(--mt-line);
    border-radius: 0;
    box-shadow: none;
  }
}

/* With time, date, a stage message and two control rows, let the scrollable
   panel yield some height rather than colliding with digits or the footer. */
@media (max-width: 480px) and (min-height: 520px) {
  #with-timer-minimal[data-stage-message="true"][data-session-panel="open"] .mt-content {
    --mt-bottom-panel: clamp(160px, 30svh, 220px);
  }
}

@media (orientation: landscape) and (min-width: 840px) {
  #with-timer-minimal[data-session-panel="open"] .mt-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--mt-side-panel);
    grid-template-rows: minmax(280px, 1fr);
    height: 100svh;
  }

  #with-timer-minimal[data-session-panel="open"] .mt-surface { height: auto; }

  #with-timer-minimal .mt-content > .mt-chat {
    position: static;
    width: auto;
    min-height: 0;
    max-height: none;
    height: auto;
    border: 0;
    border-left: 1px solid var(--mt-line);
    border-radius: 0;
    box-shadow: none;
  }
}

#with-timer-minimal .mt-chat h2,
#with-timer-minimal .mt-chat h3 {
  margin: 0;
  color: var(--mt-fg);
  font-size: 14px;
  font-weight: 600;
}

#with-timer-minimal .mt-chat h2 { font-size: 16px; }
#with-timer-minimal .mt-chat h3 { display: flex; align-items: center; gap: 8px; }
#with-timer-minimal .mt-chat .mt-chat-head { flex: 0 0 44px; gap: 8px; border-bottom: 1px solid var(--mt-line); }
#with-timer-minimal .mt-session-tabs { display: flex; flex-shrink: 0; align-items: center; gap: 4px; border-bottom: 1px solid var(--mt-line); }
#with-timer-minimal .mt-session-tabs [role="tablist"] { display: flex; flex: 1; min-width: 0; }
#with-timer-minimal .mt-session-tabs [role="tab"] { flex: 1; min-width: 0; min-height: 44px; padding: 6px 4px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; color: var(--mt-muted); font: inherit; font-size: 12px; cursor: pointer; }
#with-timer-minimal .mt-session-tabs [role="tab"][aria-selected="true"] { color: var(--mt-fg); border-bottom-color: currentColor; }
#with-timer-minimal .mt-session-tabs [hidden] { display: none; }
#with-timer-minimal .mt-panel-meta { flex: 0 1 auto; min-height: 0; max-height: 45%; overflow-y: auto; overscroll-behavior: contain; }
#with-timer-minimal .mt-panel-meta:not(:has(.mt-panel-section:not([hidden]))) { display: none; }
#with-timer-minimal :is(.mt-tab-slot, .mt-tab-pane) { display: flex; flex: 1; flex-direction: column; min-height: 0; min-width: 0; }
/* Keep the composer's intrinsic height when settings consume a short panel. */
#with-timer-minimal :is(.mt-tab-slot[data-panel-slot="chat"], .mt-tab-pane[data-panel-content="chat"]) { min-height: auto; }
#with-timer-minimal .mt-tab-pane[data-panel-content="chat"] > .mt-panel-scroll { contain: size; }
#with-timer-minimal .mt-tab-slot[hidden] { display: none; }
#with-timer-minimal .mt-stage-pane { overflow-y: auto; overscroll-behavior: contain; padding-top: 12px; }
#with-timer-minimal .mt-stage-pane .mt-stage-controls { border: 0; padding-top: 0; }
#with-timer-minimal .mt-popout-status { margin: 8px 0; color: var(--mt-fg); font-size: 12px; }
#with-timer-minimal .mt-detached-note { margin: auto 0; padding: 24px 0; text-align: center; color: var(--mt-muted); font-size: 13px; }
#with-timer-minimal .mt-detached-note p { margin: 0 0 16px; }
#with-timer-minimal .mt-detached-note button { min-height: 40px; margin: 4px; padding: 6px 10px; border: 1px solid var(--mt-line); border-radius: var(--mt-control-radius); font: inherit; color: var(--mt-fg); background: transparent; cursor: pointer; }
#with-timer-minimal[data-panel-window="true"] { display: block; width: 100%; height: 100dvh; min-height: 0; border-radius: 0; background: var(--mt-panel); }
#with-timer-minimal[data-panel-window="true"] .mt-detached-panel { position: static; display: flex; flex-direction: column; width: 100%; height: 100%; min-height: 0; max-height: none; box-sizing: border-box; padding: 0 16px; border: 0; border-radius: 0; background: var(--mt-panel); box-shadow: none; overflow: hidden; }
#with-timer-minimal .mt-detached-head { display: flex; flex: 0 0 52px; align-items: center; justify-content: space-between; gap: 8px; border-bottom: 1px solid var(--mt-line); }
#with-timer-minimal .mt-detached-head h1 { margin: 0; font: inherit; font-size: 14px; font-weight: 600; color: var(--mt-fg); }
#with-timer-minimal .mt-panel-actions { display: flex; gap: 4px; min-width: 0; }
#with-timer-minimal .mt-panel-toggle { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 8px; border: 0; border-radius: var(--mt-control-radius); font: inherit; font-size: 13px; color: var(--mt-muted); background: transparent; cursor: pointer; }
#with-timer-minimal .mt-panel-toggle:is(:hover, [aria-expanded="true"]) { background: var(--mt-soft); color: var(--mt-fg); }
#with-timer-minimal .mt-panel-toggle svg { width: 14px; height: 14px; }
#with-timer-minimal .mt-panel-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
#with-timer-minimal .mt-panel-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; }
#with-timer-minimal .mt-panel-section { flex-shrink: 0; border-bottom: 1px solid var(--mt-line); padding: 12px 0; }
#with-timer-minimal .mt-chat :is(button, input, select):focus-visible { outline: 2px solid var(--mt-fg); outline-offset: -2px; }
#with-timer-minimal .mt-chat-composer { flex-shrink: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; align-items: center; padding: 10px 0 max(10px, env(safe-area-inset-bottom)); border-top: 1px solid var(--mt-line); }
#with-timer-minimal .mt-chat-composer .mt-message-form { min-width: 0; }
#with-timer-minimal .mt-chat-composer .mt-form-status { grid-column: 1 / -1; margin: 0 0 4px; font-size: 12px; }
#with-timer-minimal [data-session-count] { color: var(--mt-muted); font-weight: 400; }
#with-timer-minimal .mt-participants-status { margin: 12px 0 0; color: var(--mt-muted); font-size: 13px; }
#with-timer-minimal .mt-session-chat { flex: 1 0 auto; display: flex; flex-direction: column; padding: 0; }
#with-timer-minimal .mt-chat .mt-messages { flex: 1 0 auto; min-height: 0; padding: 12px 0; overflow: visible; max-height: none; }
#with-timer-minimal .mt-chat-empty { margin: 0; color: var(--mt-muted); font-size: 13px; }
#with-timer-minimal .mt-profile { margin-bottom: 18px; }
/* A-27: one line per member — name, crown/"나", a quiet tag or state — with icon actions on the right. */
#with-timer-minimal .mt-member { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px 8px; padding: 10px 0; border-top: 1px solid var(--mt-line); }
#with-timer-minimal .mt-member:first-child { border-top: 0; padding-top: 2px; }
#with-timer-minimal .mt-member-info { display: grid; gap: 2px; min-width: 0; }
#with-timer-minimal .mt-member-name { display: flex; align-items: center; gap: 6px; min-width: 0; }
#with-timer-minimal .mt-member-name strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--mt-fg); font-size: 14px; font-weight: 500; }
#with-timer-minimal .mt-me { flex-shrink: 0; padding: 0 6px; border: 1px solid var(--mt-line); border-radius: 999px; color: var(--mt-muted); font-size: 10px; line-height: 16px; }
#with-timer-minimal .mt-owner-mark { display: inline-flex; flex-shrink: 0; color: var(--mt-muted); }
#with-timer-minimal .mt-owner-mark svg { width: 14px; height: 14px; }
#with-timer-minimal .mt-controller-mark { display: inline-flex; flex-shrink: 0; color: var(--mt-fg); }
#with-timer-minimal .mt-controller-mark svg { width: 14px; height: 14px; }
#with-timer-minimal .mt-member-controls [data-mod-kind="control"][aria-pressed="true"] { color: var(--mt-control-selected-fg, var(--mt-fg)); background: var(--mt-control-selected, var(--mt-soft)); }
#with-timer-minimal .mt-member-meta { display: flex; gap: 8px; color: var(--mt-muted); font-size: 11px; line-height: 1.5; }
#with-timer-minimal .mt-member-state { color: var(--mt-fg); }
/* The identity tag only helps the owner tell same-name senders apart. */
#with-timer-minimal:not([data-role="owner"]) .mt-member-tag { display: none; }
#with-timer-minimal:not([data-role="owner"]) .mt-member-meta:not(:has(.mt-member-state)) { display: none; }
#with-timer-minimal .mt-member-controls { display: flex; gap: 2px; }
#with-timer-minimal .mt-ban-confirm { grid-column: 1 / -1; padding: 10px 12px; border: 1px solid var(--mt-line); border-radius: 10px; background: var(--mt-soft); }
#with-timer-minimal .mt-ban-confirm p { margin: 0 0 8px; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
#with-timer-minimal .mt-ban-confirm button { margin: 0 6px 0 0; min-height: 36px; }
#with-timer-minimal .mt-icon-button {
  display: inline-grid; place-items: center; width: 40px; height: 40px; flex-shrink: 0; padding: 0; border: 0; border-radius: var(--mt-control-radius);
  background: transparent; color: var(--mt-muted); cursor: pointer;
}
#with-timer-minimal .mt-icon-button svg { width: 18px; height: 18px; }
#with-timer-minimal .mt-icon-button:not(:disabled):is(:hover, :focus-visible) { background: var(--mt-soft); color: var(--mt-fg); }
#with-timer-minimal .mt-icon-button:disabled { opacity: .35; cursor: default; }
#with-timer-minimal .mt-chat .mt-message { flex-shrink: 0; min-width: 0; text-align: left; }
#with-timer-minimal .mt-chat .mt-message[data-own="false"] { align-self: flex-start; border-radius: 14px 14px 14px 3px; }
#with-timer-minimal .mt-message-sender { display: flex; align-items: center; gap: 4px; margin-bottom: 4px; font-size: 11px; color: var(--mt-muted); font-weight: 500; }
#with-timer-minimal .mt-message-sender .mt-owner-mark svg { width: 12px; height: 12px; }
#with-timer-minimal .mt-member-tag { display: inline-block; margin-left: 2px; white-space: nowrap; font-weight: 400; opacity: .7; }

@media (max-width: 560px) {
  #with-timer-minimal .mt-content > .mt-chat { padding: 8px 16px 0; }
}

/* Personal appearance changes the clock only; the brand keeps its own face. */
#with-timer-minimal .mt-clock-stage > .mt-clock {
  width: var(--mt-timer-width, 100%);
  color: var(--mt-digits, var(--mt-fg));
  font-family: var(--mt-timer-font, "With Timer Manrope", Arial, sans-serif);
  font-weight: var(--mt-timer-weight, 600);
}
#with-timer-minimal .mt-clock :is(.mt-number, .mt-number-input) { color: inherit; }
#with-timer-minimal .mt-clock .mt-milliseconds { color: inherit; opacity: .55; font-weight: inherit; }
#with-timer-minimal .mt-settings-overlay {
  position: fixed; inset: 0; z-index: 5; display: grid; place-items: center;
  padding: 16px; background: var(--mt-scrim); backdrop-filter: blur(6px);
}
#with-timer-minimal .mt-settings {
  width: min(100%, 400px); max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain;
  padding: 18px 24px 24px; border: 1px solid var(--mt-line); border-radius: 20px;
  background: var(--mt-panel); box-shadow: 0 16px 80px rgb(0 0 0 / .2);
}
#with-timer-minimal .mt-settings-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
#with-timer-minimal .mt-settings-head h2 { margin: 6px 0 8px; font-size: 20px; font-weight: 600; letter-spacing: -.03em; }
#with-timer-minimal .mt-settings-head p { margin: 0; color: var(--mt-muted); font-size: 13px; }
#with-timer-minimal .mt-display-fields { min-width: 0; margin: 0; padding: 0; border: 0; }
#with-timer-minimal .mt-display-fields:disabled :is(button, input, select) { cursor: default; }
#with-timer-minimal .mt-display-fields:disabled [data-settings-reset] { display: none; }
#with-timer-minimal .mt-settings-colors { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
#with-timer-minimal .mt-color-field { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; }
#with-timer-minimal .mt-color-field input { width: 44px; height: 44px; padding: 4px; border: 1px solid var(--mt-line); border-radius: 12px; background: var(--mt-soft); cursor: pointer; }
#with-timer-minimal .mt-field { display: grid; gap: 8px; margin: 16px 0; color: var(--mt-fg); font-size: 13px; line-height: 1.5; }
#with-timer-minimal .mt-field :is(select, input:not([type="range"])) {
  width: 100%; min-width: 0; min-height: 44px; border: 1px solid var(--mt-line); border-radius: 10px;
  background: var(--mt-soft); color: var(--mt-fg); padding: 10px 12px; font: inherit; font-size: 16px;
}
#with-timer-minimal .mt-field input[type="range"] { width: 100%; height: 24px; margin: 0; accent-color: var(--mt-fg); }
#with-timer-minimal [data-scale-value] { grid-column: 2; justify-self: end; color: var(--mt-muted); }
#with-timer-minimal .mt-field:has([data-pref="scale"]) { grid-template-columns: minmax(0, 1fr) auto; }
#with-timer-minimal [data-pref="scale"] { grid-column: 1 / -1; }
#with-timer-minimal .mt-field-hint { margin: 8px 0 16px; color: var(--mt-muted); font-size: 12px; line-height: 1.65; overflow-wrap: anywhere; }
#with-timer-minimal .mt-check { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 44px; font-size: 14px; cursor: pointer; }
#with-timer-minimal .mt-check input { width: 20px; height: 20px; margin: 0; accent-color: var(--mt-fg); }
#with-timer-minimal .mt-form-button { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--mt-fg); border-radius: var(--mt-control-radius); background: var(--mt-fg); color: var(--mt-panel); cursor: pointer; font: inherit; font-size: 13px; font-weight: 600; }
#with-timer-minimal .mt-form-button.mt-secondary { background: transparent; color: var(--mt-fg); border-color: var(--mt-line); }
#with-timer-minimal :is(.mt-form-button, .mt-small-button):hover { opacity: .8; }
#with-timer-minimal :is(.mt-form-button, .mt-small-button, select):disabled,
#with-timer-minimal fieldset:disabled .mt-form-button { opacity: .45; cursor: default; }
#with-timer-minimal .mt-form-status { margin: 12px 0; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; color: var(--mt-fg); }
#with-timer-minimal .mt-access { border-top: 1px solid var(--mt-line); padding: 14px 0 0; }
#with-timer-minimal .mt-access-summary { font-size: 13px; line-height: 1.5; color: var(--mt-fg); margin: 0 0 4px; }
#with-timer-minimal .mt-access fieldset { border: 0; min-width: 0; padding: 0; margin: 0; }
/* A-27: section labels, inline input + icon button, and the three-way entry switch. */
#with-timer-minimal :is(.mt-field-label, .mt-chat h3.mt-field-label) { display: block; margin: 0 0 8px; color: var(--mt-muted); font-size: 12px; font-weight: 500; }
#with-timer-minimal .mt-access[hidden] { display: none; }
#with-timer-minimal .mt-inline-field { display: flex; align-items: center; gap: 6px; }
#with-timer-minimal .mt-inline-field input {
  flex: 1; min-width: 0; min-height: 44px; padding: 0 12px; border: 1px solid var(--mt-line); border-radius: 10px;
  background: var(--mt-soft); color: var(--mt-fg); font: inherit; font-size: 15px;
}
#with-timer-minimal .mt-inline-field .mt-icon-button { width: 44px; height: 44px; border: 1px solid var(--mt-line); }
#with-timer-minimal .mt-segmented { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; border: 1px solid var(--mt-line); border-radius: 12px; background: var(--mt-soft); }
#with-timer-minimal .mt-segmented label {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 6px; min-width: 0; min-height: 38px; padding: 0 4px;
  border-radius: var(--mt-control-radius); color: var(--mt-muted); font-size: 13px; text-align: center; cursor: pointer;
}
#with-timer-minimal .mt-segmented input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
#with-timer-minimal .mt-segmented svg { width: 15px; height: 15px; flex-shrink: 0; }
#with-timer-minimal .mt-segmented label:has(input:checked) { background: var(--mt-panel); color: var(--mt-fg); box-shadow: 0 0 0 1px var(--mt-line); }
#with-timer-minimal .mt-segmented label:has(input:focus-visible) { outline: 2px solid var(--mt-fg); outline-offset: 1px; }
#with-timer-minimal fieldset:disabled .mt-segmented label { cursor: default; opacity: .6; }
#with-timer-minimal .mt-access [data-access-hint] { margin: 8px 0 10px; }
#with-timer-minimal .mt-access [data-password-field] { margin-bottom: 10px; }
#with-timer-minimal .mt-access .mt-form-button:disabled { opacity: .35; }
#with-timer-minimal [data-admission-requests] h4 { font-size: 13px; margin: 14px 0 6px; }
#with-timer-minimal .mt-admission-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 2px; padding-bottom: 4px; }
#with-timer-minimal .mt-admission-row span { font-size: 13px; overflow-wrap: anywhere; line-height: 1.5; }
#with-timer-minimal .mt-small-button { min-height: 44px; padding: 8px 10px; border: 1px solid var(--mt-line); border-radius: var(--mt-control-radius); background: var(--mt-soft); font: inherit; font-size: 12px; cursor: pointer; }
#with-timer-minimal .mt-request-dot { min-width: 18px; height: 18px; display: inline-grid; place-items: center; border-radius: 50%; background: var(--mt-fg); color: var(--mt-panel); font-size: 11px; }
#with-timer-minimal[data-connection="locked"] :is(.mt-clock, .mt-status) { display: none; }
#with-timer-minimal .mt-join-gate { flex: 0 1 auto; width: min(100%, 320px); min-height: 0; max-height: 100%; overflow-y: auto; padding: 4px 2px; }
#with-timer-minimal .mt-join-kicker { font-size: 10px; letter-spacing: .18em; color: var(--mt-muted); }
#with-timer-minimal .mt-join-gate h2 { margin: 12px 0; font-size: 24px; font-weight: 500; letter-spacing: -.04em; }
#with-timer-minimal [data-join-description] { color: var(--mt-muted); font-size: 13px; line-height: 1.7; margin: 0 0 20px; }
#with-timer-minimal .mt-text-button { display: inline-block; border: 0; margin: 12px 12px 0 0; padding: 8px 0; font: inherit; font-size: 12px; background: transparent; color: var(--mt-muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
#with-timer-minimal :is(.mt-settings, .mt-access, .mt-join-gate) :is(button, select, input, a):focus-visible { outline: 2px solid var(--mt-fg); outline-offset: 3px; }

/*
 * Refined wordmark (A-22, option B). Only the app build changes; the approved
 * prototype keeps its logo. The colon matches the cap height (.72em) and its
 * bottom sits on the text baseline; gaps around it are equal. scripts/build.mjs
 * wraps A, M and I so the tracked capitals look evenly spaced.
 * The prototype's own <style> comes later in the document, so these selectors
 * carry one more class than its `#with-timer-minimal .mt-brand…` rules.
 */
#with-timer-minimal :is(.mt-header, .mt-share-head) .mt-brand {
  align-items: baseline;
  gap: .5em;
}

#with-timer-minimal .mt-brand .mt-brand-colon {
  flex-basis: .28em;
  width: .28em;
  height: .72em;
}

#with-timer-minimal .mt-brand .mt-brand-colon::before,
#with-timer-minimal .mt-brand .mt-brand-colon::after {
  width: .28em;
  height: .28em;
}

#with-timer-minimal .mt-brand-kern { margin-left: -.02em; }
#with-timer-minimal .mt-brand-kern-ti { margin-left: -.05em; }

/*
 * The header colon shows clock synchronization. In these states the digits are
 * hidden or unconfirmed and the controls are locked, so the motion stands in for
 * a spinner instead of competing with the timer. A-35 keeps a short 2.4s
 * alternating finish visible after live, without delaying usable controls.
 */
@keyframes mt-colon-sync-top {
  0%, 40%, 100% { opacity: 1; }
  50%, 90% { opacity: .22; }
}

@keyframes mt-colon-sync-bottom {
  0%, 40%, 100% { opacity: .22; }
  50%, 90% { opacity: 1; }
}

@keyframes mt-colon-settle {
  0%, 32%, 64%, 80%, 100% { opacity: 1; }
  16%, 48% { opacity: .2; }
}

@keyframes mt-colon-settle-bottom {
  0%, 32%, 64% { opacity: .2; }
  16%, 48%, 80%, 100% { opacity: 1; }
}

@media (prefers-reduced-motion: no-preference) {
  #with-timer-minimal:is([data-connection="connecting"], [data-connection="syncing"], [data-connection="reconnecting"], [data-connection="stale"]) .mt-header .mt-brand-colon::before {
    animation: mt-colon-sync-top 600ms linear infinite;
  }

  #with-timer-minimal:is([data-connection="connecting"], [data-connection="syncing"], [data-connection="reconnecting"], [data-connection="stale"]) .mt-header .mt-brand-colon::after {
    animation: mt-colon-sync-bottom 600ms linear infinite;
  }

  #with-timer-minimal[data-connection="live"] .mt-header .mt-brand-colon::before {
    animation: mt-colon-settle 2.4s ease-in-out;
  }

  #with-timer-minimal[data-connection="live"] .mt-header .mt-brand-colon::after {
    animation: mt-colon-settle-bottom 2.4s ease-in-out;
  }
}

/* Reduced motion keeps the state visible as a still, dimmed colon. */
@media (prefers-reduced-motion: reduce) {
  #with-timer-minimal:is([data-connection="connecting"], [data-connection="syncing"], [data-connection="reconnecting"], [data-connection="stale"]) .mt-header .mt-brand-colon::before,
  #with-timer-minimal:is([data-connection="connecting"], [data-connection="syncing"], [data-connection="reconnecting"], [data-connection="stale"]) .mt-header .mt-brand-colon::after {
    opacity: .45;
  }
}

/* Contrast themes and printing drop backgrounds, which would erase the colon. */
@media (forced-colors: active) {
  #with-timer-minimal .mt-brand .mt-brand-colon::before,
  #with-timer-minimal .mt-brand .mt-brand-colon::after {
    forced-color-adjust: none;
    background: CanvasText;
  }
}

@media print {
  #with-timer-minimal .mt-brand-colon::before,
  #with-timer-minimal .mt-brand-colon::after {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/*
 * Theme picker and theme effects (A-25). Colors come from the presets in
 * web/display-settings.mjs; these rules only add the picker layout and the
 * per-theme gimmicks. Motion stops for prefers-reduced-motion.
 */
/* A-31: the dropdown shows a color sample before every theme name. */
#with-timer-minimal .mt-theme-field { margin: 0 0 10px; }
#with-timer-minimal .mt-theme-trigger {
  display: grid; grid-template-columns: 76px minmax(0, 1fr) 16px; align-items: center; gap: 10px;
  width: 100%; min-height: 48px; padding: 5px 10px 5px 5px; border: 1px solid var(--mt-line); border-radius: 10px;
  background: var(--mt-soft); color: var(--mt-fg); font: inherit; font-size: 16px; text-align: start; cursor: pointer;
}
#with-timer-minimal .mt-theme-trigger > :is(svg, i) { width: 16px; height: 16px; }
#with-timer-minimal [data-theme-name] { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#with-timer-minimal :is(.mt-theme-preview, .mt-theme-sample) {
  display: grid; place-items: center; min-height: 36px; border-radius: 7px; direction: ltr;
  box-shadow: inset 0 0 0 1px rgb(128 128 128 / .35);
  font-family: "With Timer Manrope", Arial, sans-serif; font-size: 20px; font-weight: 600;
}
#with-timer-minimal .mt-theme-options {
  position: fixed; z-index: 2; box-sizing: border-box; padding: 4px; overflow-y: auto; overflow-x: hidden;
  border: 1px solid var(--mt-line); border-radius: 12px; background: var(--mt-panel); color: var(--mt-fg);
  box-shadow: 0 12px 36px rgb(0 0 0 / .4); overscroll-behavior: contain; scrollbar-width: thin;
}
#with-timer-minimal .mt-theme-option {
  display: grid; grid-template-columns: 58px minmax(0, 1fr) 18px; gap: 10px; align-items: center;
  min-height: 48px; padding: 5px; border: 1px solid transparent; border-radius: 8px;
  font-size: 14px; line-height: 1.35; cursor: pointer; overflow-wrap: anywhere;
}
#with-timer-minimal .mt-theme-option:is(:hover, [data-active="true"]) { background: var(--mt-soft); border-color: var(--mt-muted); }
#with-timer-minimal .mt-theme-option[aria-selected="true"] { font-weight: 600; }
#with-timer-minimal .mt-theme-sample { min-height: 32px; font-size: 18px; }
#with-timer-minimal .mt-theme-check { visibility: hidden; text-align: center; }
#with-timer-minimal .mt-theme-option[aria-selected="true"] .mt-theme-check { visibility: visible; }
#with-timer-minimal [data-preview-theme="transparent"] { background-image: conic-gradient(#242424 25%, #444 0 50%, #242424 0 75%, #444 0); background-size: 14px 14px; }
#with-timer-minimal [data-preview-theme="rgb"] > span { background: linear-gradient(90deg, #ff4d6d, #ffd400, #3cff8f, #36d6ff, #b46bff); background-clip: text; color: transparent; }
#with-timer-minimal [data-preview-theme="blocks"] > span { background: linear-gradient(90deg, #d93025 25%, #1a73e8 25% 50%, #f9ab00 50% 75%, #188038 75%); background-clip: text; color: transparent; }
#with-timer-minimal [data-preview-theme="neon"] > span { text-shadow: 0 0 2px #fff, 0 0 7px currentColor; }
#with-timer-minimal [data-preview-theme="led"] > span { text-shadow: 0 0 6px currentColor; }
#with-timer-minimal [data-preview-theme="mirror"] > span { transform: scaleX(-1); }
#with-timer-minimal .mt-contrast { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: -8px 0 12px; color: var(--mt-muted); font-size: 12px; line-height: 1.5; }
#with-timer-minimal .mt-contrast[data-low="true"] { color: var(--mt-fg); font-weight: 600; }
#with-timer-minimal .mt-contrast .mt-text-button { margin: 0; padding: 6px 0; }

#with-timer-minimal[data-palette="led"] .mt-clock-stage > .mt-clock { text-shadow: 0 0 .03em currentColor, 0 0 .16em rgb(57 255 20 / .5); }
#with-timer-minimal[data-palette="neon"] .mt-clock-stage > .mt-clock { text-shadow: 0 0 .02em #fff, 0 0 .08em currentColor, 0 0 .22em rgb(255 79 216 / .55); }
#with-timer-minimal[data-palette="chalk"] .mt-clock-stage > .mt-clock { text-shadow: 0 0 1px rgb(255 255 255 / .5), .02em .02em .04em rgb(0 0 0 / .25); }
#with-timer-minimal[data-palette="sticky"] .mt-clock-stage > .mt-clock { transform: rotate(-2deg); }
#with-timer-minimal[data-palette="mirror"] .mt-clock-stage > .mt-clock { transform: scaleX(-1); }
#with-timer-minimal[data-palette="transparent"] .mt-clock-stage > .mt-clock { text-shadow: 0 2px 12px rgb(0 0 0 / .6); }
#with-timer-minimal[data-palette="rgb"] .mt-clock-stage > .mt-clock {
  background: linear-gradient(90deg, #ff4d6d, #ffd400, #3cff8f, #36d6ff, #b46bff);
  -webkit-background-clip: text; background-clip: text;
}
#with-timer-minimal[data-palette="rgb"] .mt-clock :is(.mt-number, .mt-colon, .mt-milliseconds) { color: transparent; }

@keyframes mt-neon-flicker {
  0%, 89%, 92%, 95%, 100% { opacity: 1; }
  90% { opacity: .55; }
  93% { opacity: .75; }
}

@keyframes mt-rgb-cycle { to { filter: hue-rotate(360deg); } }

@media (prefers-reduced-motion: no-preference) {
  #with-timer-minimal[data-palette="neon"] .mt-clock-stage > .mt-clock { animation: mt-neon-flicker 7s linear infinite; }
  #with-timer-minimal[data-palette="rgb"] .mt-clock-stage > .mt-clock { animation: mt-rgb-cycle 8s linear infinite; }
}

/*
 * A-26: language picker, right-to-left support, the status line's face and the
 * gimmick themes. Every animation below sits behind prefers-reduced-motion.
 */
/*
 * The title shares its row only with the close button and the language picker sits
 * beside the note, so long titles ("Anzeigeeinstellungen") keep the full width.
 * The panel never grows past the screen; a word that still cannot fit wraps.
 */
#with-timer-minimal .mt-settings-overlay { grid-template-columns: minmax(0, 1fr); }
#with-timer-minimal .mt-settings-head {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "title title close" "note language language";
  align-items: center; gap: 4px 12px; margin-bottom: 16px;
}
#with-timer-minimal :is(.mt-settings-head > div, .mt-settings-head-tools) { display: contents; }
#with-timer-minimal .mt-settings-head h2 { grid-area: title; margin: 0; }
#with-timer-minimal .mt-settings-head p { grid-area: note; }
#with-timer-minimal .mt-settings-head [data-settings-close] { grid-area: close; justify-self: end; }
#with-timer-minimal .mt-settings-head .mt-language { grid-area: language; justify-self: end; }
#with-timer-minimal .mt-settings-head h2 { overflow-wrap: anywhere; hyphens: auto; }
#with-timer-minimal .mt-language { position: relative; display: flex; align-items: center; }
#with-timer-minimal .mt-language > :is(svg, i) { position: absolute; inset-inline-start: 10px; width: 16px; height: 16px; color: var(--mt-muted); pointer-events: none; }
#with-timer-minimal .mt-language select {
  max-width: 150px; min-height: 40px; padding-block: 6px; padding-inline: 32px 10px; border: 1px solid var(--mt-line); border-radius: 10px;
  background: var(--mt-soft); color: var(--mt-fg); font: inherit; font-size: 13px;
}
#with-timer-minimal .mt-language select:focus-visible { outline: 2px solid var(--mt-fg); outline-offset: 2px; }

/* Digits, the wordmark and links read left to right in every language. */
#with-timer-minimal :is(.mt-clock, .mt-brand, .mt-link-input, .mt-session-code) { direction: ltr; unicode-bidi: isolate; }

/* A Latin status line ("PAUSED") uses the chosen digit face when that face has letters. */
#with-timer-minimal[data-font]:not([data-font="manrope"]):not([data-font="dseg"]) .mt-status[data-latin="true"] { font-family: var(--mt-timer-font); }

/* Matrix: a canvas of falling glyphs behind the clock (theme-effects.mjs). */
#with-timer-minimal[data-palette="matrix"] .mt-surface { isolation: isolate; }
#with-timer-minimal .mt-theme-canvas { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; opacity: .5; pointer-events: none; }
#with-timer-minimal .mt-theme-canvas[data-effect="matrix"] { opacity: 1; }
#with-timer-minimal[data-palette="matrix"] .mt-clock-stage > .mt-clock { text-shadow: 0 0 .04em currentColor, 0 0 .2em rgb(0 255 65 / .45); }

/* Racing red: a checkered strip, slanted digits, speed streaks while running. */
#with-timer-minimal[data-palette="racing"] .mt-surface {
  background-image: repeating-conic-gradient(#ffffff 0 25%, #111111 0 50%); background-size: 16px 16px; background-repeat: repeat-x;
}
#with-timer-minimal[data-palette="racing"] .mt-clock-stage > .mt-clock { transform: skewX(-6deg); }
#with-timer-minimal[data-palette="racing"][data-status="running"] .mt-clock-stage > .mt-clock {
  text-shadow: -.05em 0 0 rgb(255 255 255 / .2), -.1em 0 0 rgb(255 255 255 / .08);
}

/* Four-color blocks: each pair gets its own color; digits wiggle under the pointer. */
#with-timer-minimal[data-palette="blocks"] .mt-clock .mt-unit:nth-of-type(1) { color: #1a73e8; }
#with-timer-minimal[data-palette="blocks"] .mt-clock .mt-unit:nth-of-type(2) { color: #d93025; }
#with-timer-minimal[data-palette="blocks"] .mt-clock .mt-unit:nth-of-type(3) { color: #188038; }
#with-timer-minimal[data-palette="blocks"] .mt-clock .mt-colon { color: #f9ab00; }
#with-timer-minimal[data-palette="blocks"] .mt-clock .mt-number { transition: transform 160ms ease; }

/* Blue screen: a sad face in the corner. */
#with-timer-minimal[data-palette="bluescreen"] .mt-clock-stage { position: relative; }
#with-timer-minimal[data-palette="bluescreen"] .mt-clock-stage::before {
  content: ":("; position: absolute; top: 2%; inset-inline-start: 3%; color: #ffffff; opacity: .9;
  font: 600 clamp(28px, 8vmin, 96px) / 1 Arial, sans-serif; pointer-events: none;
}

/* Amber CRT: glow, scanlines and a vignette. */
#with-timer-minimal[data-palette="amber"] .mt-surface {
  background-image: repeating-linear-gradient(0deg, rgb(0 0 0 / .22) 0 1px, transparent 1px 3px), radial-gradient(ellipse at center, transparent 55%, rgb(0 0 0 / .55));
}
#with-timer-minimal[data-palette="amber"] .mt-clock-stage > .mt-clock { text-shadow: 0 0 .04em currentColor, 0 0 .2em rgb(255 176 0 / .45); }

/* 8-bit: an LCD pixel grid with ghosting. */
#with-timer-minimal[data-palette="pixel"] .mt-surface {
  background-image: linear-gradient(rgb(15 56 15 / .07) 1px, transparent 1px), linear-gradient(90deg, rgb(15 56 15 / .07) 1px, transparent 1px);
  background-size: 4px 4px;
}
#with-timer-minimal[data-palette="pixel"] .mt-clock-stage > .mt-clock { text-shadow: .03em .03em 0 rgb(15 56 15 / .25); }

/* Cyberpunk: split-channel digits that glitch now and then. */
#with-timer-minimal[data-palette="cyberpunk"] .mt-clock-stage > .mt-clock { text-shadow: .03em 0 0 #00f0ff, -.03em 0 0 #ff003c; }

/* Galaxy (A-28): a quiet deep field, with crisp pale digits above the stars. */
#with-timer-minimal[data-palette="galaxy"] .mt-surface { isolation: isolate; }
#with-timer-minimal .mt-theme-canvas[data-effect="space"] { opacity: 1; }
#with-timer-minimal[data-palette="galaxy"] .mt-clock-stage > .mt-clock { text-shadow: 0 1px 2px rgb(0 0 0 / .85), 0 0 .035em rgb(0 0 0 / .75); }

/* Luxury gold: metallic digits with a passing shine. */
#with-timer-minimal[data-palette="gold"] .mt-clock-stage > .mt-clock {
  background: linear-gradient(100deg, #b8862b 0%, #f6e3a1 22%, #d4a640 40%, #fff3c4 50%, #c99a3a 62%, #f1d27a 80%, #a8782a 100%) 0 0 / 250% 100%;
  -webkit-background-clip: text; background-clip: text;
}
#with-timer-minimal[data-palette="gold"] .mt-clock :is(.mt-number, .mt-colon, .mt-milliseconds) { color: transparent; }

@keyframes mt-race-launch { from { transform: skewX(-6deg) translateX(-6%); filter: blur(6px); opacity: .4; } to { transform: skewX(-6deg); filter: none; opacity: 1; } }
@keyframes mt-crt-flicker { 0%, 100% { opacity: 1; } 48% { opacity: .96; } 50% { opacity: .9; } 52% { opacity: .97; } }
@keyframes mt-pixel-blink { 50% { opacity: .15; } }
@keyframes mt-glitch {
  0%, 92%, 100% { transform: none; clip-path: none; }
  93% { transform: translateX(-.02em) skewX(-4deg); clip-path: inset(10% 0 55% 0); }
  95% { transform: translateX(.02em); clip-path: inset(50% 0 20% 0); }
  97% { transform: none; clip-path: inset(0); }
}
@keyframes mt-gold-shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }

@media (prefers-reduced-motion: no-preference) {
  #with-timer-minimal[data-palette="racing"][data-status="running"] .mt-clock-stage > .mt-clock { animation: mt-race-launch 420ms cubic-bezier(.2, .8, .2, 1); }
  #with-timer-minimal[data-palette="blocks"] .mt-clock .mt-number:not(:disabled):hover { transform: translateY(-.04em) rotate(-3deg); }
  #with-timer-minimal[data-palette="amber"] .mt-clock-stage > .mt-clock { animation: mt-crt-flicker 3.2s linear infinite; }
  #with-timer-minimal[data-palette="pixel"][data-status="running"] .mt-clock .mt-colon { animation: mt-pixel-blink 1s steps(1) infinite; }
  #with-timer-minimal[data-palette="cyberpunk"] .mt-clock-stage > .mt-clock { animation: mt-glitch 5s steps(1) infinite; }
  #with-timer-minimal[data-palette="gold"] .mt-clock-stage > .mt-clock { animation: mt-gold-shimmer 6s ease-in-out infinite alternate; }
}

/*
 * A-27/A-33: a joined viewer gets no timer controls. Their compact nickname
 * and chat icon replace the play button; tapping toggles the session panel.
 */
#with-timer-minimal[data-viewer="true"] .mt-controls > :is([data-action="mode"], [data-action="toggle"], [data-action="reset"]) { display: none; }
#with-timer-minimal .mt-controls > .mt-viewer-chip { display: none; }
#with-timer-minimal[data-viewer="true"] .mt-controls > .mt-viewer-chip:not([hidden]) {
  grid-column: 2 / 5; grid-row: 1; justify-self: center; display: inline-flex; align-items: center; gap: 8px;
  max-width: 100%; min-height: 44px; padding: 0 18px; border: 1px solid var(--mt-line); border-radius: var(--mt-control-radius);
  background: transparent; color: var(--mt-muted); font: inherit; font-size: 14px; cursor: pointer;
}
#with-timer-minimal .mt-viewer-chip svg { width: 16px; height: 16px; flex: 0 0 16px; }
#with-timer-minimal .mt-viewer-chip span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#with-timer-minimal .mt-viewer-chip:is(:hover, :focus-visible, [aria-expanded="true"]) { color: var(--mt-fg); border-color: var(--mt-muted); }

/* Floating actions need feedback in the page palette, not the form fill.
   Keep these more specific than the approved prototype's icon defaults. */
#with-timer-minimal :is(.mt-tools, .mt-controls, .mt-room-actions) > :is(.mt-icon:not(.mt-play), .mt-presence, .mt-viewer-chip) { background: transparent; }
#with-timer-minimal :is(.mt-tools, .mt-controls, .mt-room-actions) > :is(.mt-icon:not(.mt-play), .mt-presence, .mt-viewer-chip):not(:disabled):is(:hover, :focus-visible) {
  background: var(--mt-control-hover, var(--mt-soft)); color: var(--mt-control-hover-fg, var(--mt-fg));
}
#with-timer-minimal :is(.mt-tools, .mt-controls, .mt-room-actions) > :is(.mt-icon:not(.mt-play), .mt-presence, .mt-viewer-chip):not(:disabled):is([aria-pressed="true"], [aria-expanded="true"], :active) {
  background: var(--mt-control-selected, var(--mt-soft)); color: var(--mt-control-selected-fg, var(--mt-fg));
}
#with-timer-minimal :is(.mt-tools, .mt-controls, .mt-room-actions) > :is(.mt-icon:not(.mt-play), .mt-presence, .mt-viewer-chip):is([aria-pressed="true"], [aria-expanded="true"]) > :is(svg, i, .mt-precision-glyph) { opacity: 1; }

/* A-33: an overlay must leave the guest's chat toggle reachable on a second tap.
 * Reserve the same 80px controls row and footer space as the timer surface.
 * Docked panels at larger sizes retain their existing tracks. */
@media (max-height: 519px) and (max-width: 839px) {
  #with-timer-minimal[data-viewer="true"] .mt-content > .mt-chat {
    bottom: calc(80px + var(--mt-surface-bottom));
    height: min(75svh, calc(100svh - 80px - var(--mt-surface-bottom)));
    max-height: calc(100svh - 80px - var(--mt-surface-bottom));
  }
}
@media (orientation: landscape) and (max-height: 519px) and (max-width: 839px) {
  #with-timer-minimal[data-viewer="true"] .mt-content > .mt-chat { height: auto; }
}

/*
 * A-29: countdown progress gauge, shaped by the theme. timer-view sets
 * data-gauge="on", --mt-progress (time left, 1 → 0) and data-gauge-urgent on the
 * root while a countdown runs with the hourglass on. Fields and lines shrink
 * toward the start side; fading digits keep the seconds side bright (A-34).
 *   wash       a tinted field behind the digits with a clear moving edge (default)
 *   bar        a solid bar along the bottom edge, styled per theme
 *   underline  a glowing line under the digits
 *   fade       the digits dim from physical left to right, hours before seconds
 *   bluescreen a bottom bar plus "n% 완료" under the sad face
 */
#with-timer-minimal .mt-surface { isolation: isolate; }
#with-timer-minimal:dir(rtl) { --mt-gauge-left: auto; --mt-gauge-right: 0; }
#with-timer-minimal .mt-progress, #with-timer-minimal .mt-progress-label { display: none; }
#with-timer-minimal .mt-progress {
  --mt-gauge-fill: color-mix(in srgb, var(--mt-digits, var(--mt-fg)) 8%, transparent);
  --mt-gauge-line: 2px solid color-mix(in srgb, var(--mt-digits, var(--mt-fg)) 70%, transparent);
  --mt-gauge-glow: 0 0 0 transparent;
  position: absolute; inset-block: 0; inset-inline-start: 0; z-index: -1; pointer-events: none;
  width: calc(var(--mt-progress, 0) * 100%);
  background: var(--mt-gauge-fill); border-inline-end: var(--mt-gauge-line); box-shadow: var(--mt-gauge-glow);
}
#with-timer-minimal[data-gauge="on"] .mt-progress { display: block; }
/* Keep the moving wash subordinate to the clock. A fine background-colored
   halo separates text from its bright edge without a box behind the digits. */
#with-timer-minimal[data-gauge="on"]:is([data-palette="dark"], [data-palette="light"], [data-palette="mirror"], [data-palette="custom"]) :is(.mt-clock, .mt-status) {
  text-shadow: 0 0 2px var(--mt-bg);
}
#with-timer-minimal[data-gauge="on"]:is([data-palette="dark"], [data-palette="light"], [data-palette="mirror"], [data-palette="custom"]) .mt-clock .mt-milliseconds { opacity: .8; }
#with-timer-minimal[data-gauge="on"]:is([data-palette="dark"], [data-palette="light"], [data-palette="mirror"], [data-palette="custom"]) .mt-status {
  color: color-mix(in srgb, var(--mt-digits, var(--mt-fg)) 80%, var(--mt-bg));
}
#with-timer-minimal[data-gauge-urgent="true"] .mt-progress {
  --mt-gauge-fill: rgb(255 90 60 / .24); --mt-gauge-line: 3px solid #ff5a3c; --mt-gauge-glow: 6px 0 20px -6px rgb(255 90 60 / .9);
}
/* The field is outside the mirrored clock. Reflect its anchor, edge and glow
   together so the remaining-time direction also reads normally in a mirror. */
#with-timer-minimal[data-palette="mirror"] .mt-progress {
  inset-inline: auto 0; transform: scaleX(-1);
}
/* Sticky note keeps the wash, drawn as pencil hatching. */
#with-timer-minimal[data-palette="sticky"] .mt-progress {
  --mt-gauge-fill: repeating-linear-gradient(-45deg, rgb(40 40 40 / .18) 0 2px, transparent 2px 9px); --mt-gauge-line: 2px solid rgb(40 40 40 / .6);
}

/* Bars along the bottom edge. */
#with-timer-minimal:is([data-palette="stage"], [data-palette="chroma"], [data-palette="transparent"], [data-palette="racing"],
  [data-palette="blocks"], [data-palette="bluescreen"], [data-palette="pixel"], [data-palette="cyberpunk"], [data-palette="rgb"]) .mt-progress {
  inset-block: auto 0; height: var(--mt-gauge-height, 8px); z-index: 1; border-inline-end: 0;
  background: var(--mt-gauge-bar, var(--mt-digits, var(--mt-fg)));
}
#with-timer-minimal[data-palette="stage"] .mt-progress { --mt-gauge-height: 12px; --mt-gauge-bar: #ffd400; }
#with-timer-minimal[data-palette="chroma"] .mt-progress { --mt-gauge-height: 12px; }
#with-timer-minimal[data-palette="bluescreen"] .mt-progress { --mt-gauge-height: 5px; --mt-gauge-bar: rgb(255 255 255 / .92); }
/* Racing: a white stint with a chequered flag riding its end. */
#with-timer-minimal[data-palette="racing"] .mt-progress { --mt-gauge-height: 10px; --mt-gauge-bar: #fff; }
#with-timer-minimal[data-palette="racing"][data-gauge="on"] .mt-progress::after {
  /* A long deadline stays at 100% for a while; keep its flag inside the viewport. */
  content: ""; position: absolute; inset-block-end: 0; inset-inline-end: 0; width: 24px; height: 24px;
  background: repeating-conic-gradient(#fff 0 25%, #111 0 50%) 0 0 / 12px 12px;
}
/* Four-color blocks: the colors stay put while the bar shrinks over them. */
#with-timer-minimal[data-palette="blocks"] .mt-progress {
  --mt-gauge-height: 10px;
  --mt-gauge-bar: linear-gradient(to right, #4285f4 0 25%, #ea4335 25% 50%, #fbbc04 50% 75%, #34a853 75%) 0 0 / 100cqw 100%;
}
/* 8-bit: a chunky segmented health bar. */
#with-timer-minimal[data-palette="pixel"] .mt-progress {
  --mt-gauge-height: 18px; --mt-gauge-bar: repeating-linear-gradient(to right, #0f380f 0 20px, transparent 20px 26px);
}
/* Cyberpunk: hazard stripes with a cyan tip. */
#with-timer-minimal[data-palette="cyberpunk"] .mt-progress {
  --mt-gauge-height: 14px; --mt-gauge-bar: repeating-linear-gradient(135deg, #000 0 12px, transparent 12px 24px);
  border-inline-end: 6px solid #00f0ff; box-shadow: 6px 0 14px -4px rgb(0 240 255 / .9);
}
/* Gaming RGB: a rainbow bar that cycles with the digits. */
#with-timer-minimal[data-palette="rgb"] .mt-progress {
  --mt-gauge-bar: linear-gradient(90deg, #ff4d6d, #ffd400, #3cff8f, #36d6ff, #b46bff) 0 0 / 100cqw 100%;
}
@media (prefers-reduced-motion: no-preference) {
  #with-timer-minimal[data-palette="rgb"] .mt-progress { animation: mt-rgb-cycle 8s linear infinite; }
}
#with-timer-minimal[data-gauge-urgent="true"]:is([data-palette="stage"], [data-palette="chroma"], [data-palette="transparent"],
  [data-palette="blocks"], [data-palette="bluescreen"], [data-palette="pixel"], [data-palette="rgb"]) .mt-progress { --mt-gauge-bar: #ff5a3c; }
#with-timer-minimal[data-gauge-urgent="true"][data-palette="racing"] .mt-progress { --mt-gauge-bar: #ffd400; }
#with-timer-minimal[data-gauge-urgent="true"][data-palette="cyberpunk"] .mt-progress { border-inline-end-color: #ff003c; box-shadow: 6px 0 14px -4px rgb(255 0 60 / .9); }
/* Bluescreen: "n% 완료" under the sad face, like an update screen. */
#with-timer-minimal[data-palette="bluescreen"][data-gauge="on"] .mt-clock-stage {
  /* Reserve the label's height so it cannot cover the clock on short screens or with a docked panel. */
  padding-block-start: calc(clamp(28px, 8vmin, 96px) + 1.2vmin + clamp(16px, 3.4vmin, 34px) * 1.2 + 2svh + 8px);
}
#with-timer-minimal[data-palette="bluescreen"][data-gauge="on"] .mt-progress-label {
  display: block; position: absolute; top: calc(2% + clamp(28px, 8vmin, 96px) + 1.2vmin); inset-inline-start: 3%; margin: 0;
  color: #fff; opacity: .9; font: 400 clamp(16px, 3.4vmin, 34px) / 1.2 Arial, sans-serif; pointer-events: none;
}

/* Underline and fade themes draw no field or bar. */
#with-timer-minimal[data-gauge="on"]:is([data-palette="navy"], [data-palette="galaxy"], [data-palette="gold"],
  [data-palette="matrix"], [data-palette="amber"], [data-palette="led"], [data-palette="neon"], [data-palette="chalk"]) .mt-progress { display: none; }

/* Underline: a glowing line under the digits. */
#with-timer-minimal:is([data-palette="navy"], [data-palette="galaxy"], [data-palette="gold"]) .mt-clock-stage > .mt-clock { position: relative; }
#with-timer-minimal[data-gauge="on"]:is([data-palette="navy"], [data-palette="gold"]) .mt-clock-stage > .mt-clock::after {
  content: ""; position: absolute; left: var(--mt-gauge-left, 0); right: var(--mt-gauge-right, auto); bottom: 0;
  width: calc(var(--mt-progress, 0) * 100%); height: max(3px, .022em);
  border-radius: 999px; background: var(--mt-gauge-under, var(--mt-digits, var(--mt-fg))); box-shadow: var(--mt-gauge-under-glow, none);
}
#with-timer-minimal[data-palette="gold"] .mt-clock { --mt-gauge-under: linear-gradient(90deg, #b8862b, #f6e3a1, #d4a640); --mt-gauge-under-glow: 0 0 .05em rgb(233 196 106 / .6); }
#with-timer-minimal[data-palette="navy"] .mt-clock { --mt-gauge-under-glow: 0 0 .04em rgb(170 200 255 / .5); }
#with-timer-minimal[data-gauge-urgent="true"] .mt-clock { --mt-gauge-under: #ff5a3c; --mt-gauge-under-glow: 0 0 .06em rgb(255 90 60 / .9); }

/* Space: a quiet, compact track with a star at the remaining-time edge. */
#with-timer-minimal[data-palette="galaxy"] .mt-clock {
  --mt-space-track: min(68%, 680px); --mt-space-ink: 146 172 189; --mt-space-core: #e0eaf0;
}
#with-timer-minimal[data-palette="galaxy"][data-gauge-urgent="true"] .mt-clock {
  --mt-space-ink: 222 164 115; --mt-space-core: #ffe1b5;
}
#with-timer-minimal[data-palette="galaxy"][data-gauge="on"] .mt-clock-stage > .mt-clock::before,
#with-timer-minimal[data-palette="galaxy"][data-gauge="on"] .mt-clock-stage > .mt-clock::after {
  content: ""; position: absolute; left: calc((100% - var(--mt-space-track)) / 2); right: auto;
  pointer-events: none; border-radius: 0; box-shadow: none;
}
#with-timer-minimal[data-palette="galaxy"][data-gauge="on"] .mt-clock-stage > .mt-clock::before {
  bottom: 3.5px; width: var(--mt-space-track); height: 1px;
  background: linear-gradient(90deg, rgb(146 172 189 / .1), rgb(146 172 189 / .23), rgb(146 172 189 / .1));
}
#with-timer-minimal[data-palette="galaxy"][data-gauge="on"] .mt-clock-stage > .mt-clock::after {
  bottom: 0; width: calc(var(--mt-space-track) * var(--mt-progress, 0)); height: 8px;
  background:
    radial-gradient(circle, var(--mt-space-core) 0 1.2px, rgb(var(--mt-space-ink) / .65) 1.7px, rgb(var(--mt-space-ink) / .14) 3px, transparent 4px) right center / 8px 8px no-repeat,
    linear-gradient(90deg, rgb(var(--mt-space-ink) / .24), rgb(var(--mt-space-ink) / .72)) left center / max(0px, calc(100% - 4px)) 1px no-repeat;
}
#with-timer-minimal[data-palette="galaxy"][data-gauge="on"]:dir(rtl) .mt-clock-stage > .mt-clock::after {
  left: auto; right: calc((100% - var(--mt-space-track)) / 2); transform: scaleX(-1);
}

/* A-34: digits always read left to right, even in RTL interfaces. Keep the
 * remaining bright portion on the seconds side; dim hours/minutes first. */
#with-timer-minimal[data-gauge="on"]:is([data-palette="matrix"], [data-palette="amber"], [data-palette="led"], [data-palette="neon"], [data-palette="chalk"]) .mt-clock-stage > .mt-clock {
  --mt-fade-edge: calc(var(--mt-progress, 0) * 100%);
  -webkit-mask-image: linear-gradient(to left, #000 calc(var(--mt-fade-edge) - var(--mt-fade-soft, .5%)), rgb(0 0 0 / var(--mt-fade-left, .14)) var(--mt-fade-edge));
  mask-image: linear-gradient(to left, #000 calc(var(--mt-fade-edge) - var(--mt-fade-soft, .5%)), rgb(0 0 0 / var(--mt-fade-left, .14)) var(--mt-fade-edge));
}
#with-timer-minimal[data-palette="neon"] .mt-clock { --mt-fade-left: .07; }
#with-timer-minimal[data-palette="chalk"] .mt-clock { --mt-fade-soft: 7%; --mt-fade-left: .1; }
#with-timer-minimal[data-gauge-urgent="true"]:is([data-palette="matrix"], [data-palette="amber"], [data-palette="led"], [data-palette="neon"], [data-palette="chalk"]) .mt-clock-stage > .mt-clock { color: #ff5a3c; }
/* Editing must stay readable even when an expired countdown has dimmed every digit. */
#with-timer-minimal .mt-clock-stage > .mt-clock:has([data-input]:not([hidden])) { -webkit-mask-image: none; mask-image: none; }

/* The hourglass that switches the gauge, beside .000. */
#with-timer-minimal .mt-controls > .mt-precision { grid-row: 1; }
#with-timer-minimal .mt-controls > [data-action="progress"] { grid-column: 5; grid-row: 1; justify-self: end; width: 44px; height: 44px; margin-inline-end: 48px; }
#with-timer-minimal .mt-controls > [data-action="progress"][hidden] { display: none; }
#with-timer-minimal .mt-icon[data-action="progress"] { background: transparent; color: var(--mt-muted); }
#with-timer-minimal .mt-icon[data-action="progress"][aria-pressed="true"] { color: var(--mt-fg); }
#with-timer-minimal .mt-icon[data-action="progress"] svg { width: 20px; height: 20px; }
/* Narrow timer surfaces: utility actions above, primary controls below.
   Query the available surface width so a docked panel also gets the usable layout. */
@container (max-width: 480px) {
  #with-timer-minimal[data-stage-message="true"][data-stage-compact="true"] .mt-clock-stage { padding-block-start: 4px; }
  #with-timer-minimal[data-stage-message="true"][data-stage-compact="true"] .mt-status:empty { flex-basis: 0; height: 0; }
  #with-timer-minimal[data-stage-message="true"][data-stage-compact="true"][data-mode="deadline"] .mt-clock-stage { gap: 4px; }
  #with-timer-minimal:not([data-viewer="true"]) .mt-surface > .mt-controls {
    --mt-play-width: 100%;
    grid-template-columns: minmax(44px, max-content) 44px minmax(0, 1fr) 44px 44px;
    grid-template-rows: repeat(2, 44px); gap: 8px; padding-block: 8px;
  }
  /* Both rows share the same edges and gutters; the play button spans the middle. */
  #with-timer-minimal:not([data-viewer="true"]) .mt-controls > .mt-room-actions {
    display: contents;
  }
  #with-timer-minimal:not([data-viewer="true"]) .mt-room-actions > .mt-stage-toggle {
    grid-column: 2; grid-row: 1;
  }
  #with-timer-minimal:not([data-viewer="true"]) .mt-controls > button:is([data-action="progress"], .mt-precision) {
    grid-row: 1; justify-self: end; width: 44px; height: 44px;
  }
  #with-timer-minimal:not([data-viewer="true"]) .mt-controls > button[data-action="progress"] { grid-column: 4; margin-inline-end: 0; }
  #with-timer-minimal:not([data-viewer="true"]) .mt-controls > button:is([data-action="mode"], [data-action="reset"]) {
    grid-row: 2; width: 100%; height: 44px;
  }
  #with-timer-minimal:not([data-viewer="true"]) .mt-controls > button[data-action="mode"] { grid-column: 1; }
  #with-timer-minimal:not([data-viewer="true"]) .mt-controls > button[data-action="reset"] { grid-column: 5; }
  #with-timer-minimal:not([data-viewer="true"]) .mt-controls > button.mt-play { grid-column: 2 / 5; grid-row: 2; width: 100%; height: 44px; }
}
/* A bounded participant page keeps large rooms usable on small screens. */
.mt-member-paging { display:flex; flex-wrap:wrap; gap:6px; margin-block:10px; }
.mt-member-paging[hidden] { display:none; }
.mt-member-paging input { min-width:80px; flex:1 1 120px; padding:8px; color:inherit; background:transparent; border:1px solid currentColor; border-radius:4px; }
