:root {
  color-scheme:dark;
  --studio-text:#f2f3f8;
  --studio-base:#090f1c;
  --studio-surface:#151f32;
  --studio-inset:#101929;
  --studio-line:#2c3b52;
  --studio-muted:#b7c7db;
  --studio-accent:#51e7d1;
  --studio-violet:#82c9ff;
}

html[data-theme="dark"] body {
  color: var(--studio-text);
  background: var(--studio-base);
  font-size: 1rem;
  line-height: 1.55;
}

html[data-theme="dark"] body :where(a, button, input, select, textarea, summary):focus-visible {
  outline: 2px solid var(--studio-accent);
  outline-offset: 3px;
}

#appView :where(p, label, small, strong, button, input, select, textarea, summary, option, legend, span, h1, h2, h3, h4),
#accessView :where(p, label, small, strong, button, input, select, textarea, summary, span, h1, h2, h3, h4, a, li, em) {
  font-family: var(--interface-font) !important;
}

/* La tarjeta principal también es una vista previa del overlay personalizable. */
#appView #timer { font-family: var(--interface-font) !important; }
#appView[data-section="appearance"] #timer { font-family: var(--preview-font, var(--interface-font)) !important; }

html[data-theme="dark"] body .topbar {
  z-index: 20;
  min-height: 68px;
  padding-inline: clamp(14px, 4vw, 64px);
  border-bottom: 1px solid var(--studio-line);
  background: #101117;
  box-shadow: none;
  backdrop-filter: none;
}

.topbar .brand span { display: inline; }
.topbar .brand { white-space: nowrap; gap: .55rem; }
.topbar .brand-logo { inline-size: 32px; block-size: 32px; }
.topbar .header-actions { display: flex; flex-direction: row; flex-wrap: nowrap; width: auto; gap: .55rem; }
.topbar .logout-btn .logout-icon { display: inline-block; flex: 0 0 16px; }
.topbar .topbar-nav a { font-size: .875rem; }

.topbar .support-button {--tone:#aaadff;--base:#252747}
.topbar .changelog-button {--tone:#76ceff;--base:#142c42;gap:8px}
.topbar .logout-btn {--tone:#ff97ac;--base:#322031}
.topbar .header-access-cta {--tone:#76ffe5;--base:#54e5ce;--text:#09232b}
html[data-theme="dark"] body .topbar .header-actions :is(.header-access-cta,.support-button,.changelog-button,.logout-btn) {
  min-height:43px;padding:9px 15px;box-sizing:border-box;align-items:center;justify-content:center;
  font:590 .9rem/1.3 var(--interface-font)!important;letter-spacing:0;text-transform:none;
  color:var(--text,#f5f8ff)!important;text-decoration:none;
  background:linear-gradient(155deg,#ffffff0c,transparent 80%) var(--base)!important;
  border:1px solid color-mix(in srgb,var(--tone) 40%,var(--base))!important;border-radius:13px!important;
  box-shadow:inset 0 1px #ffffff12,0 3px 9px #03081240!important;
  filter:none!important;transform:none!important;
  transition:background-color .16s,border-color .16s,box-shadow .16s!important;
}
html[data-theme="dark"] body .topbar .header-actions :is(.header-access-cta,.support-button,.changelog-button,.logout-btn):is(:hover,:focus-visible) {
  background-color:color-mix(in srgb,var(--base),var(--tone) 13%)!important;
  border-color:var(--tone)!important;
  box-shadow:inset 0 1px #ffffff26,0 0 18px color-mix(in srgb,var(--tone) 16%,transparent)!important;
}
.topbar .changelog-button::before {
  content:"";width:19px;height:19px;flex:none;background:var(--tone);
  mask:url('/icon-history.png') center/contain no-repeat;
}
html[data-theme="dark"] body .topbar .topbar-nav a {
  transition:background-color .15s,color .15s;transform:none;
}
html[data-theme="dark"] body .topbar .topbar-nav a:hover {background:#192a40;color:#82efdc}
@media(max-width:760px){
  html[data-theme="dark"] body .topbar .header-actions :is(.support-button,.changelog-button,.logout-btn) {padding:8px 10px;min-height:41px}
}
@media(max-width:480px){
  .topbar .changelog-button::before {display:none}
}

html[data-theme="dark"] body :is(.header-access-cta, .landing-cta) {
  border-color: var(--studio-accent);
  color: #122521 !important;
  background: var(--studio-accent);
  box-shadow: none;
  transform: none;
}

html[data-theme="dark"] body :is(.header-access-cta, .landing-cta):hover { background: #c4fce9; }

.panel-access-icon { flex: 0 0 auto; }

/* Portada */
html[data-theme="dark"] body:has(.landing:not(.hidden)),
html[data-theme="dark"] body #accessView { background: var(--studio-base); }

#accessView {
  --land-aqua: var(--studio-accent);
  --land-mint: var(--studio-violet);
  --land-text: var(--studio-text);
  --land-muted: var(--studio-muted);
}

#accessView .section-shell { width: min(100% - 3rem, 76rem); }

#accessView .hero-copy { width: auto; min-width: 0; }
#accessView .hero-copy h1 {
  display: block;
  max-width: 14ch;
  margin: 0;
  font-size: clamp(2.7rem, 5.1vw, 5.25rem);
  font-weight: 720;
  line-height: 1.05;
  letter-spacing: -.06em;
  text-wrap: balance;
}
#accessView .hero-copy h1 em {
  display: inline;
  color: var(--studio-accent);
  font: inherit;
  -webkit-text-stroke: 0;
  text-shadow: none;
}
#accessView .landing-kicker, .studio-kicker {
  margin: 0 0 .75rem;
  color: var(--studio-accent);
  font-size: .875rem;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
}
#accessView .hero-lead { max-width: 40ch; margin-top: 1.25rem; color: #d3d5e0; line-height: 1.6; }
#accessView .hero-actions { margin-top: 1.65rem; }
#accessView :is(.landing-cta, .landing-secondary) { min-height: 48px; padding-inline: 1rem; border-radius: 9px; font-size: .9375rem; }
#accessView .landing-secondary { background: #242432; }
#accessView .hero-proof { gap: .5rem 1rem; margin-top: 1.4rem; }
#accessView .hero-proof li { font-size: .875rem; color: #d8dbe5; }

#accessView .login-card {
  min-width: 0;
  width: 100%;
  margin: 0;
  padding: clamp(1.25rem, 3.2vw, 2.25rem);
  border: 1px solid #535269;
  border-radius: 18px;
  background: #1b1b28;
  box-shadow: 0 18px 45px #09091165;
  backdrop-filter: none;
}
#accessView .login-card::after { display: none; }
#accessView .login-card-copy { margin: 0 0 1.35rem; }
#accessView .login-card-copy img { object-fit: contain; }
#accessView .login-card-copy h2 { margin: .55rem 0 .45rem; font-size: clamp(1.5rem, 2.7vw, 2.1rem); line-height: 1.15; letter-spacing: -.04em; }
#accessView .login-card-copy p { margin: 0; font-size: .9375rem; line-height: 1.55; color: var(--studio-muted); }
#accessView .social-login { display: grid; gap: .625rem; }
#accessView .social-login-button {
  justify-content: flex-start;
  min-height: 50px;
  padding-inline: .85rem;
  border: 1px solid #625182;
  border-radius: 10px;
  color: #f6f1ff;
  background: #382953;
  box-shadow: none;
  font-weight: 650;
  transform: none;
}
#accessView .social-login-button:hover { border-color: #b291f1; background: #473363; filter: none; }
#accessView .kick-login { border-color: #4a6054; background: #23372d; }
#accessView .kick-login:hover { border-color: #91d4aa; background: #304b3d; }

#accessView :is(.workflow, .feature-showcase, .platform-section, .obs-section, .faq-section, .product-demo, .community-section) {
  margin-block: 0;
  padding-block: clamp(2.5rem, 6vw, 5.75rem);
}
#accessView .section-heading { align-items: end; gap: 1rem 2rem; margin-bottom: 1.5rem; }
#accessView :is(.section-heading, .platform-copy, .obs-copy, .faq-heading, .community-section) h2 {
  max-width: 24ch;
  font-size: clamp(1.85rem, 3.7vw, 3.3rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -.045em;
}
#accessView :is(.section-heading, .platform-copy, .obs-copy, .community-section) h2 em { color: var(--studio-violet); font-style: normal; }
#accessView :is(.workflow-grid li, .feature-list-grid article, .connection-shot, .live-demo-card, .faq-list details, .community-section) {
  min-width: 0;
  border: 1px solid var(--studio-line);
  border-radius: 16px;
  background: var(--studio-surface);
  box-shadow: none;
}
#accessView :is(.section-heading > p, .workflow-grid li p, .feature-list-grid p, .live-demo-card footer p, .obs-copy p, .faq-list p) {
  color: var(--studio-muted);
  font-size: .9375rem;
  line-height: 1.6;
}
#accessView :is(.live-demo-card > header span, .feature-list-grid article > span) { font-size: .75rem; color: var(--studio-accent); letter-spacing: .07em; font-weight: 650; }
#accessView .live-demo-card > header > i { display: none; }
#accessView .live-demo-card > header { padding: 1.2rem 1.35rem; }
#accessView .live-demo-card > header h3 { font-weight: 680; line-height: 1.2; }
#accessView .live-demo-card > footer { min-height: 0; grid-template-columns: 1fr; gap: 1rem; padding: 1.2rem 1.35rem; }
#accessView .demo-capabilities li { color: var(--studio-muted); font-size: .875rem; }
#accessView .live-demo-card > footer .demo-controls { justify-content: flex-start; }
#accessView .live-demo-card .demo-controls button {
  border: 1px solid #514760 !important;
  color: var(--studio-text) !important;
  background: #2a2438 !important;
  font-size: .875rem !important;
}
#accessView .live-demo-card .demo-controls button:is(:hover, .active) { border-color: #bba8f1 !important; background: #46365e !important; }
#accessView .platform-list span { font-size: .875rem !important; }
#accessView .connection-shot small { color: var(--studio-muted); }
#accessView .faq-list summary { font-size: .9375rem; padding-block: .9rem; }
#accessView .community-section h2 { margin-inline: auto; }
#accessView .landing-footer { border-top-color: var(--studio-line); }

/* Estudio del streamer */
html[data-theme="dark"] body:has(#appView:not(.hidden)) main {
  width: min(100% - 3rem, 104rem);
  max-width: none;
  margin-inline: auto;
  padding: 1.5rem 0 4rem;
}

#appView {
  --o-panel: var(--studio-surface);
  --o-text: var(--studio-text);
  --o-muted: var(--studio-muted);
  --o-line: var(--studio-line);
  --lime: var(--studio-accent);
  --orange: #ffd598;
  display: grid;
  grid-template-columns: minmax(0,1fr);
  gap: 1.25rem;
  align-items: start;
}
html[data-theme="dark"] #appView :is(.timer-card, .obs-card, .tab-panel) {
  min-width: 0;
  min-height: 0;
  border: 1px solid var(--studio-line);
  border-radius: 16px;
  background: var(--studio-surface) !important;
  box-shadow: none;
  animation: none;
  padding: clamp(1rem, 2.7vw, 2rem);
}
html[data-theme="dark"] #appView .timer-card { background: radial-gradient(ellipse at top, #2b2a45, #1a1b27 75%) !important; }
#appView :is(.tab-panel, .obs-card)::before, #appView :is(.tab-panel, .obs-card)::after { display: none; }
#appView .timer { font-size: clamp(2.4rem, 6vw, 6rem); font-variant-numeric: tabular-nums; white-space: normal; overflow-wrap: anywhere; }
#appView .timer-display-row { gap: .7rem; min-width: 0; }
#appView .timer-top, #appView .timer-actions { gap: .5rem; flex-wrap: wrap; }
#appView .timer-top { color: var(--studio-muted); }
#appView .section-head { align-items: end; gap: 1rem; margin-bottom: 1.25rem; }
#appView .section-head > * { min-width: 0; }
#appView #multipliersTab .section-head { flex-wrap: wrap; }
#appView #multipliersTab .section-head > div:first-child { flex: 1 1 26rem; }
#appView #multipliersTab .multiplier-status-actions {
  flex: 0 1 auto;
  flex-wrap: wrap;
  max-width: 100%;
}
#appView #multipliersTab .multiplier-status-actions .danger { white-space: normal; }
#appView #multipliersTab .multiplier-now { min-width: 0; }
#appView .section-head h2 { margin: .15rem 0 .4rem; font-size: clamp(1.45rem, 2.8vw, 2.15rem); font-weight: 700; line-height: 1.16; letter-spacing: -.04em; }
#appView :is(.section-copy, .field-help, .note, .result-box) { color: var(--studio-muted); font-size: .9rem; line-height: 1.55; }
#appView .section-head .eyebrow { color: var(--studio-accent); font-size: .75rem; letter-spacing: .08em; }
html[data-theme="dark"] #appView :is(
  .rule-form, .appearance-group, .wheel-form, .wheel-preview-card, .connections article,
  .tiktok-connect-card, .rule-platform-card, .goal-form, .goal-help-card, .goal-card, .history-item,
  .multiplier-control, .multiplier-schedule-form, .hype-train-card
) {
  min-width: 0;
  border-color: var(--studio-line);
  background: var(--studio-inset);
  box-shadow: none;
}
#appView .rule-form { grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr)); gap: .85rem; }
#appView .rules-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#appView .rule-item { min-width: 0; }
#appView :is(.rule-item, .connections article, .history-item, .goal-card) { overflow-wrap: anywhere; }
#appView :is(.rule-item, .schedule-item) > * { min-width: 0; }
#appView label { min-width: 0; font-size: .875rem; letter-spacing: 0; }
html[data-theme="dark"] #appView :is(input:not([type="checkbox"]):not([type="color"]), select, textarea) {
  min-width: 0;
  min-height: 42px;
  max-width: 100%;
  border: 1px solid #474b5e !important;
  border-radius: 8px;
  color: var(--studio-text) !important;
  background: #11121a !important;
  box-shadow: none !important;
  font-size: .9375rem;
}
#appView button:disabled { opacity: .58; cursor: not-allowed; }

@media(max-width:900px){.topbar .topbar-nav{display:none}}
@media (max-width: 680px) {
  html[data-theme="dark"] body .topbar { min-height: 62px; padding-inline: .75rem; }
  .topbar .header-access-cta { display: none; }
  .topbar .brand span { font-size: .875rem; }
  .topbar .support-button, .topbar .changelog-button { padding-inline: .55rem; }
  .topbar .session-menu { padding-left: 0; border-left: 0; }
  #accessView :is(.section-shell, .landing-hero),
  html[data-theme="dark"] body:has(#appView:not(.hidden)) main { width: calc(100% - 1.5rem); }

  #accessView .hero-copy h1 { font-size: clamp(2.2rem, 9.4vw, 3.6rem); }
  #accessView .hero-proof { margin-bottom: 0; }
  #accessView :is(.section-heading, .platform-section, .obs-section, .faq-section) { grid-template-columns: minmax(0, 1fr); align-items: start; }
  #accessView :is(.live-demo-grid, .workflow-grid, .feature-list-grid) { grid-template-columns: minmax(0, 1fr); }
  #accessView .live-demo-card > :is(header, footer) { padding-inline: 1rem; }
  #appView .rules-list { grid-template-columns: minmax(0, 1fr); }
  #appView .section-head { align-items: start; }
  #appView #multipliersTab .section-head > div:first-child { flex: 0 1 auto; }
}
@media (prefers-reduced-motion: reduce) {
  #accessView *, #appView *, .topbar * { transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

#appView[data-section="overview"], [data-tab="overview"], [data-tone="overview"] { --tone: #43e5cd; }
#appView[data-section="rules"], [data-tab="rules"], [data-tone="rules"] { --tone: #75b6ff; }
#appView[data-section="test"], [data-tab="test"], [data-tone="test"] { --tone: #b798ff; }
#appView[data-section="history"], [data-tab="history"], [data-tone="history"] { --tone: #ffac74; }
#appView[data-section="multipliers"], [data-tab="multipliers"], [data-tone="multipliers"] { --tone: #ffcf48; }
#appView[data-section="widgets"], [data-tab="widgets"], [data-tone="widgets"] { --tone: #ff7fae; }
#appView[data-section="goals"], [data-tab="goals"], [data-tone="goals"] { --tone: #7de389; }
#appView[data-section="connections"], [data-tab="connections"], [data-tone="connections"] { --tone: #54cffa; }
#appView[data-section="appearance"], [data-tab="appearance"], [data-tone="appearance"] { --tone: #db95ff; }

/* Osiris. El color identifica la herramienta tanto en el menú como en sus acciones. */

.glyph {width:21px;height:21px;flex:none;fill:none;stroke:currentColor;stroke-width:1.95;stroke-linecap:round;stroke-linejoin:round}
html[data-theme="dark"] body .topbar {background:#0b1322;border-color:#233149}
html[data-theme="dark"] body:has(#appView:not(.hidden)) main {width:min(94%,1376px);padding-top:1.25rem}
html[data-theme="dark"] body:has(#appView:not(.hidden)) {background:radial-gradient(ellipse at 42% 0,#142745 0,transparent 60%),var(--studio-base)}
#appView.app:not(.hidden) {display:grid;grid-template: auto / minmax(0,1fr);gap:22px}
#appView.app > * {grid-area:auto;min-width:0;width:100%;margin:0}
#appView.app > .hidden, #appView.app.hidden {display:none!important}
#appView #navToggle {display:none}
html[data-theme="dark"] #appView #sectionDock {
  position:relative;inset:auto;display:grid;grid-template-columns:repeat(9,minmax(0,1fr));grid-auto-rows:auto;
  height:auto;min-height:0;max-height:none;overflow:visible;gap:6px;padding:7px;
  background:#101a2bd9;border:1px solid #293b52;border-radius:21px;box-shadow:0 8px 28px #01071130;
}
#sectionDock::before,#sectionDock::after,#sectionDock button::before,#sectionDock button::after {display:none!important}
html[data-theme="dark"] #appView #sectionDock button[data-tab] {
  display:flex;position:relative;flex-direction:column;align-items:center;justify-content:center;
  height:auto;min-height:88px;min-width:0;width:100%;max-width:none;gap:7px;padding:11px 2px;
  background:linear-gradient(180deg,#ffffff06,transparent 76%) color-mix(in srgb,var(--tone) 4%,#101a2b)!important;
  border:1px solid #29384c!important;border-radius:14px!important;
  color:#e6edf8!important;box-shadow:inset 0 1px #ffffff08!important;transform:none!important;filter:none!important;
  text-align:center;transition:background-color .16s,border-color .16s,box-shadow .16s,color .16s!important;
}
#appView #sectionDock button[data-tab] span {display:block;width:auto;opacity:1;font-size:clamp(.8rem,1.05vw,.96rem);font-weight:580;line-height:1.3;letter-spacing:0;text-transform:none;white-space:normal}
#sectionDock .glyph {width:36px;height:36px;color:var(--tone);filter:drop-shadow(0 2px 8px color-mix(in srgb,var(--tone) 20%,transparent))}
html[data-theme="dark"] #appView #sectionDock button[data-tab]:is(:hover,:focus-visible,.active) {
  color:var(--tone)!important;border-color:color-mix(in srgb,var(--tone) 60%,#182334)!important;
  background-color:color-mix(in srgb,var(--tone) 11%,#101928)!important;
}
html[data-theme="dark"] #appView #sectionDock button[data-tab].active {
  border-color:var(--tone)!important;background-color:color-mix(in srgb,var(--tone) 17%,#101928)!important;
  box-shadow:inset 0 -3px var(--tone),inset 0 0 22px color-mix(in srgb,var(--tone) 9%,transparent),0 0 14px color-mix(in srgb,var(--tone) 13%,transparent)!important;
}
#appView .studio-heading,.desk-card header {display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
#appView .studio-heading h1 {font-size:clamp(1.7rem,2.4vw,2.3rem);font-weight:720;letter-spacing:-.04em;line-height:1.2;margin:0;outline:none}
#appView:not([data-section="overview"]) .studio-heading {display:none}
#appView .hidden {display:none!important}
#appView #counterWorkspace {display:grid;grid-template-columns:minmax(0,1.8fr) minmax(340px,1fr);gap:20px;align-items:stretch;animation:none}
#appView #counterWorkspace.hidden {display:none}
#appView .desk-card,html[data-theme="dark"] #appView #timerPreview {
  min-width:0;margin:0;border:1px solid var(--studio-line);border-radius:21px;
  background:linear-gradient(130deg,#18263b,#111b2d)!important;box-shadow:0 12px 32px #03081236;
}
#appView .desk-card {padding:clamp(18px,2vw,28px);display:flex;flex-direction:column;gap:18px}
#appView .desk-card h2 {display:flex;align-items:center;gap:11px;margin:0;font-size:1.24rem;font-weight:680;line-height:1.3;letter-spacing:-.025em;color:#f6f9ff}
.desk-card h2 .glyph {width:26px;height:26px;color:#7ebfff}
.feed-card h2 .glyph {color:#ffb178}
.broadcast-card h2 .glyph {color:#b89aff}
#appView .desk-card p {color:var(--studio-muted);font-size:.94rem;line-height:1.6;margin:0}
#appView[data-section="overview"] #timerPreview {padding:0;display:flex;flex-direction:column;overflow:hidden;isolation:isolate}
#appView[data-section="overview"] #timerPreview::before,#appView[data-section="overview"] #timerPreview::after {display:none}
.clock-scene {position:relative;min-width:0}
#appView[data-section="overview"] .clock-scene {
  container-type:inline-size;display:flex;flex:1;min-height:252px;flex-direction:column;align-items:center;justify-content:center;
  background:linear-gradient(90deg,#07153015,#07122d88 32% 68%,#07153015),url('/osiris-dusk.webp') center/100% 100% no-repeat;
  padding:26px 12px;color:white;text-align:center;
}
#appView[data-section="overview"] .timer-top {display:flex;align-items:center;justify-content:center;gap:13px;margin:0;width:100%;flex-wrap:wrap}
#appView[data-section="overview"] #timerPreview .timer-top>span:first-child {font-size:.92rem;font-weight:650;color:#f1f7ff;letter-spacing:.015em;text-transform:none}
#appView #timerStatus {display:inline-flex;align-items:center;gap:7px;padding:5px 11px;border:1px solid #ffc66966;border-radius:30px;background:#302719;color:#ffcf7a;font-size:.8rem;letter-spacing:0;font-weight:620;line-height:1.25;text-transform:none}
#timerStatus::before {content:"";width:7px;height:7px;border-radius:50%;background:currentColor}
#appView #timerStatus[data-running="true"] {background:#0b3834;color:#6cf3bf;border-color:#52ddad66}
#appView[data-section="overview"] .timer-display-row {display:grid;justify-items:center;grid-template-columns:minmax(0,1fr);gap:10px;margin:10px 0 0;width:100%}
#appView[data-section="overview"] #timerPreview #timer {
  font-size:min(14cqw,7.7rem);line-height:1.06;font-weight:710;letter-spacing:-.045em;font-variant-numeric:tabular-nums;
  background:none!important;color:white!important;-webkit-text-fill-color:white!important;filter:none!important;
  text-shadow:0 3px 25px #001024,0 2px 4px #00102a!important;white-space:nowrap;overflow:visible;margin:0;padding:0;
}
#appView[data-section="overview"] #timerPreview #timer.long-clock {font-size:min(11cqw,5.6rem)}
#appView[data-section="overview"] .total-time-card {display:flex;align-items:center;justify-content:center;gap:8px;width:auto;min-width:0;min-height:0;padding:6px 13px;margin:0;border:0;border-radius:30px;background:#041532a6;box-shadow:none}
#appView .total-time-card :is(span,strong) {margin:0;font-size:.94rem;line-height:1.4;color:white;letter-spacing:0;text-transform:none}
#appView .total-time-card span {font-weight:450;color:#dae5fb}
.total-time-card .glyph {width:17px;height:17px}
#clockHint {margin:12px 0 0;padding:6px 12px;border-radius:10px;background:#07162ddd;color:#f1f6ff;font-size:.9rem}
#appView[data-section="appearance"] #clockHint {display:none}
#appView .timer-actions {display:grid;grid-template-columns:1.25fr 1fr 1fr;gap:12px;margin:0;padding:18px;background:#101b2c;border:0;border-top:1px solid #2c4158;border-radius:0;box-shadow:none}
#appView .presets {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}
#appView #customTimeForm {display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px;margin:0;padding:0;border:0;background:transparent;box-shadow:none;width:100%}
#appView #customTimeForm label {grid-column:1/-1;color:#dce8fa;font-weight:520;text-transform:none;letter-spacing:0}
#appView #customTimeForm input {width:100%;height:46px}
#appView .initial-settings {margin-top:auto;padding-top:14px;border-top:1px solid #324257}
.initial-settings summary {cursor:pointer;font-weight:580;font-size:.93rem;color:#aad2ff}
#appView .initial-time-form {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:15px;padding:0;border:0;background:transparent}
#appView .initial-time-form :is(.initial-time-copy,button) {grid-column:1/-1}
#appView .initial-time-form label {grid-column:auto}
#appView .broadcast-actions {display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:auto}
.broadcast-actions a {display:inline-flex;gap:7px;align-items:center;justify-content:center;color:#e1d9ff;text-decoration:none;font-size:.92rem;font-weight:600;min-height:44px;padding:0 8px}
.broadcast-actions a:hover {text-decoration:underline}
#appView .activity-row {display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:14px;padding:13px 0;border-bottom:1px solid var(--studio-line);overflow-wrap:anywhere}
#appView .activity-row:last-child {border-bottom:none}
.activity-row img {width:34px;height:34px;border-radius:9px;object-fit:contain}
.activity-row div {display:grid;gap:2px}
.activity-row span {font-size:.84rem;color:var(--studio-muted)}
.activity-row b {color:#68eed1;font-variant-numeric:tabular-nums}
#appView #historyList {display:block;background:#111c2e;padding:10px 20px;border-radius:18px}
#appView .quiet {padding:22px 0;color:var(--studio-muted)}

/* Portada panorámica y acceso centrado */
#accessView .landing-hero {
  display:flex;flex-direction:column;align-items:center;justify-content:center;isolation:isolate;
  width:100%;max-width:none;min-height:0;margin:0;gap:24px;padding:clamp(42px,4vw,74px) 16px 32px;
  border:0;border-radius:0;text-align:center;box-shadow:none;
  background:#0a2248;
}
@media(min-width:681px) {
  #accessView .landing-hero::before,#accessView .landing-hero::after {
    content:"";display:block;position:absolute;inset:0 50% 0 0;width:auto;height:auto;
    opacity:1;transform:none;animation:none;pointer-events:none;z-index:-1;filter:none;mix-blend-mode:normal;
    background:linear-gradient(0deg,#090f1c,transparent 34%),url('/osiris-dusk.webp') 4% center / auto 100% no-repeat;
    mask-image:linear-gradient(to right,black 28%,transparent 100%);
  }
  #accessView .landing-hero::after {
    inset:0 0 0 50%;background-position:center,96% center;
    mask-image:linear-gradient(to left,black 28%,transparent 100%);
  }
  #accessView .landing-hero {background:linear-gradient(#091e40,#093466 63%,#090f1c)}
}
#accessView .hero-copy {width:100%;max-width:850px;margin:0 auto;text-align:center;text-shadow:0 2px 18px #041227}
#accessView .hero-copy h1 {font-size:clamp(2.6rem,5.3vw,5.4rem);line-height:1.06;letter-spacing:-.048em;max-width:none;margin:0 auto;text-align:center}
#accessView .hero-copy h1 em {display:block;color:#62f4d8;width:auto;max-width:none;margin:0 auto;text-align:center}
#accessView .hero-copy .landing-kicker {width:fit-content;margin:0 auto 17px;color:#ffd388;letter-spacing:.08em;font-size:.8rem;text-transform:uppercase}
#accessView .hero-lead {max-width:54ch;margin:20px auto 0;color:#f1f6ff;font-size:clamp(1rem,1.45vw,1.2rem);line-height:1.55;text-wrap:pretty}
#accessView .hero-proof {display:flex;flex-wrap:wrap;justify-content:center;margin:15px auto 0;padding:0;gap:5px 20px}
#accessView .hero-proof li {color:#fff}
#accessView #acceso {max-width:606px;padding:23px 28px 19px;border:1px solid #789cc077;border-radius:23px;background:#0c172bef;box-shadow:0 15px 45px #0004;scroll-margin-top:90px;text-align:center}
#accessView .login-card-copy {margin:0 0 18px;text-align:center}
#accessView .login-card-copy h2 {font-size:1.38rem;margin:0 0 6px;letter-spacing:-.025em}
#accessView .login-card-copy p {max-width:none;margin-inline:auto;text-align:center}
#accessView .social-login {grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
#accessView .social-login-button {justify-content:center;min-height:52px;gap:10px;font-size:1rem;border-radius:14px}
#accessView .twitch-login {background:#7938d9;border-color:#b385ff;box-shadow:0 3px #51209b}
#accessView .kick-login {background:#71ec4d;color:#092607;border-color:#a1fc82;box-shadow:0 3px #3b9628}
#accessView .twitch-login:hover {background:#8a49ed}
#accessView .kick-login:hover {background:#96ff71;color:#092607}
#accessView .explore {display:inline-flex;align-items:center;gap:10px;color:white;position:relative;z-index:2;text-decoration:none;font-weight:600;font-size:.96rem;min-height:42px}
#accessView .explore:hover {color:var(--studio-accent)}
.explore .glyph {transform:rotate(90deg)}
#accessView [data-tone] .glyph {width:38px;height:38px;color:var(--tone)}
#accessView .feature-list-grid article>.glyph {display:block;margin-bottom:22px}
#accessView .feature-list-grid article>span {color:var(--tone)}
#accessView .workflow-icon {background:color-mix(in srgb,var(--tone) 12%,transparent);border-color:color-mix(in srgb,var(--tone) 38%,transparent)}
@media(max-width:680px) {
  #accessView .landing-hero::before,#accessView .landing-hero::after {display:none}
  #accessView .landing-hero {
    gap:17px;padding:38px 16px 12px;
    background:linear-gradient(0deg,#090f1c 0%,#090f1c 33%,transparent 54%),linear-gradient(#06162c44,#06162c88 29%,transparent 50%),url('/osiris-dusk.webp') 70% top / auto 62% no-repeat;
  }
  #accessView .hero-copy h1 {font-size:clamp(2.2rem,9vw,3.6rem)}
  #accessView .hero-copy .landing-kicker {font-size:.7rem}
  #accessView .hero-lead {margin-top:14px}
  #accessView .hero-proof {gap:5px 12px}
  #accessView .hero-proof li {font-size:.8rem}
  #accessView #acceso {padding:20px 16px 14px}
  #accessView .social-login {grid-template-columns:minmax(0,1fr)}
}


/* Controles comunes y estados de cada herramienta */
html[data-theme="dark"] #appView.app button:not([data-tab]) {
  --fill:#263954;--edge:#405778;--ink:#f0f6ff;
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  min-height:46px;padding:10px 17px;line-height:1.3;font-size:.94rem;font-weight:650;letter-spacing:0;text-transform:none;
  /* Keep the opaque base and the same highlight throughout hover transitions. */
  background:linear-gradient(165deg,#ffffff0d,transparent 80%) var(--fill)!important;
  color:var(--ink)!important;border:1px solid var(--edge)!important;border-radius:13px!important;
  box-shadow:inset 0 1px #ffffff15,0 2px 5px #02081442!important;
  filter:none!important;transform:none!important;transition:background-color .16s,border-color .16s,box-shadow .16s!important;white-space:normal;
}
html[data-theme="dark"] #appView.app button:not([data-tab]):hover:not(:disabled) {
  background-color:color-mix(in srgb,var(--fill),white 7%)!important;
  border-color:color-mix(in srgb,var(--edge),white 28%)!important;
  box-shadow:inset 0 1px #ffffff24,0 0 15px color-mix(in srgb,var(--edge) 22%,transparent)!important;
}
html[data-theme="dark"] #appView.app button:not([data-tab]):active:not(:disabled) {box-shadow:inset 0 2px 4px #0003!important;transform:translateY(1px)!important}
html[data-theme="dark"] #appView.app button.primary:not([data-tab]) {--fill:var(--tone);--edge:var(--tone);--ink:#091529}
html[data-theme="dark"] #appView.app button:is(.danger,[data-delete-rule],[data-delete-schedule],[data-delete-goal]) {--fill:#361e30;--ink:#ff9eae;--edge:#743a52}
html[data-theme="dark"] #appView.app .timer-actions button {min-width:0;min-height:51px;font-size:1.02rem}
html[data-theme="dark"] #appView.app #pauseBtn {--fill:#3c3041;--edge:#8f7049;--ink:#ffce83}
html[data-theme="dark"] #appView.app #copyBtn {--tone:#c1a6ff}
html[data-theme="dark"] #appView.app .presets button {padding:9px 2px;--fill:#123e3f;--ink:#74f6d8;--edge:#257569;white-space:nowrap;font-size:.9rem}
html[data-theme="dark"] #appView.app .presets button[data-adjust^="-"] {--fill:#402435;--ink:#ffa6b6;--edge:#82405b}
html[data-theme="dark"] #appView.app button.jump,html[data-theme="dark"] #appView.app button.jump:hover:not(:disabled) {background:transparent!important;box-shadow:none!important;border:0!important;color:#96d6ff!important;padding:3px;min-height:38px;font-size:.9rem}
#appView .jump .glyph {width:18px;height:18px}
#appView .jump:hover {text-decoration:underline}
html[data-theme="dark"] #appView.app #navToggle {display:none}
html[data-theme="dark"] #appView.app .tab-panel {border:none;background:none!important;box-shadow:none;padding:0;overflow:visible}
#appView .section-head {align-items:center;margin:0 0 24px;padding:5px 0 5px 20px;border-left:4px solid var(--tone)}
#appView .section-head .eyebrow {display:none}
#appView .section-head h2 {margin:0 0 7px;font-size:clamp(1.6rem,2.5vw,2.2rem)}
#appView .section-head .section-copy {max-width:78ch;font-size:1rem;color:#c4d2e5;line-height:1.55;margin:0;border:0;padding:0}
#appView .section-head h2 {color:var(--studio-text);outline:none}
#appView .group-title {margin:24px 0 14px;font-size:1.18rem;font-weight:640}
html[data-theme="dark"] #appView.app :is(.rule-form,.appearance-group,.wheel-form,.wheel-preview-card,.connections article,.tiktok-connect-card,.rule-platform-card,.goal-form,.goal-help-card,.goal-card,.multiplier-control,.multiplier-schedule-form,.hype-train-card,.result-box) {
  background:linear-gradient(130deg,color-mix(in srgb,var(--tone) 5%,#142033),#101b2b)!important;
  border:1px solid #304259!important;border-radius:19px;box-shadow:0 6px 22px #0002;
}
#appView .rule-form {padding:22px;gap:16px;align-items:end}
#appView label {color:#e3ebf8;font-weight:540;line-height:1.4}
html[data-theme="dark"] #appView.app :is(input:not([type="checkbox"]):not([type="color"]),select,textarea) {
  background-color:#0a1525!important;border-color:#435772!important;border-radius:11px;min-height:46px;color:#f4f7ff!important;
}
html[data-theme="dark"] #appView.app :is(input,select,textarea):focus-visible {outline:2px solid var(--tone);outline-offset:2px}
#appView input[type="checkbox"] {accent-color:var(--tone)}
html[data-theme="dark"] #appView.app select {
  appearance:none;padding-right:2rem;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18'%3E%3Cpath d='m4 7 5 5 5-5' fill='none' stroke='%23c5d9ee' stroke-width='2'/%3E%3C/svg%3E")!important;
  background-position:right .65rem center!important;background-repeat:no-repeat!important;
}
@media(min-width:961px) {
  #appView #ruleForm {grid-template-columns:repeat(4,minmax(0,1fr))}
  #appView #ruleForm label:has([name="eventType"]) {grid-column:span 2}
  #appView #ruleForm:not(:has(.range-field:not(.hidden))) label:has([name="secondsAdded"]) {grid-column:span 2}
  #appView #ruleForm:not(:has(:is(.range-field,.exact-field,.unit-field,.rate-field):not(.hidden))) label:has([name="secondsAdded"]) {grid-column:span 3}
  #appView #ruleForm .add-rule {grid-column:-2}
  #appView.app[data-section="appearance"] {grid-template-columns:minmax(0,1fr) minmax(0,1.25fr)}
  #appView[data-section="appearance"] #sectionDock {grid-column:1/-1}
  #appView[data-section="appearance"] #counterWorkspace {position:sticky;top:90px}
  #appView[data-section="appearance"] #timerPreview {container-type:inline-size}
  #appView[data-section="appearance"] #timerPreview #timer {font-size:13cqw}
  #appView[data-section="appearance"] #timerPreview #timer.long-clock {font-size:10cqw}
}
#appView .connections {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
#appView .connections article {padding:22px}
#appView .connections article:has(.twitch) {--tone:#ba90ff}
#appView .connections article:has(.kick) {--tone:#82ec65}
#appView .connections article:has(.se) {--tone:#ffcc63}
#appView .multiplier-buttons button[data-multiplier="2"] {--level:#5ad9ff}
#appView .multiplier-buttons button[data-multiplier="3"] {--level:#c492ff}
#appView .multiplier-buttons button[data-multiplier="5"] {--level:#ff9957}
html[data-theme="dark"] #appView.app .multiplier-buttons button[data-multiplier] {--edge:var(--level,#8bdccc);--ink:var(--edge);--fill:color-mix(in srgb,var(--edge) 13%,#101928);font-size:1.12rem;min-height:56px}
html[data-theme="dark"] #appView.app .multiplier-buttons button[data-multiplier].active {--fill:var(--edge);--ink:#091529}
#appView[data-section="appearance"] #counterWorkspace {grid-template-columns:minmax(0,1fr)}
#appView[data-section="appearance"] :is(.desk-card,.timer-actions,.total-time-card) {display:none}
#appView[data-section="appearance"] .timer-display-row {display:block}
#appView[data-section="appearance"] #timerPreview::before,#appView[data-section="appearance"] #timerPreview::after {display:none}
#appView[data-section="appearance"] #timer {text-align:center;font-size:clamp(2rem,9vw,6.5rem);letter-spacing:0;line-height:1.25;font-weight:700}
#appView .appearance-group legend {float:left;width:100%;margin-bottom:18px;padding:0}
#appView .appearance-group .appearance-fields {clear:both}
#appView .appearance-group {padding:22px}
#appView .appearance-group .fill-fields {grid-template-columns:repeat(2,minmax(0,1fr))}
@media(max-width:1040px) {
  #appView #counterWorkspace {grid-template-columns:minmax(0,1.5fr) minmax(315px,1fr);gap:14px}
  #appView .connections {grid-template-columns:minmax(0,1fr)}
  html[data-theme="dark"] #appView.app .timer-actions button {font-size:.94rem;padding-inline:8px}
  #appView .timer-actions {padding:14px;gap:8px}
}
@media(max-width:960px) {
  html[data-theme="dark"] #appView.app #navToggle {display:flex;justify-content:flex-start;width:100%;min-height:54px}
  #navToggle strong {margin-left:auto;color:var(--tone)}
  html[data-theme="dark"] #appView #navToggle[aria-expanded="false"]+#sectionDock {display:none}
  html[data-theme="dark"] #appView #sectionDock {grid-template-columns:repeat(3,minmax(0,1fr))}
  #appView #sectionDock button[data-tab] span {font-size:.86rem}
  #appView #counterWorkspace {grid-template-columns:minmax(0,1fr)}
  #appView .broadcast-card {grid-row:3}
  #appView .rules-list {grid-template-columns:minmax(0,1fr)}
  #appView[data-section="overview"] .clock-scene {min-height:clamp(195px,32vw,290px)}
}
@media(max-width:600px) {
  html[data-theme="dark"] body:has(#appView:not(.hidden)) main {width:calc(100% - 24px);padding-top:14px}
  #appView.app:not(.hidden) {gap:14px}
  #appView .studio-heading h1 {font-size:1.42rem}
  #appView .studio-heading {gap:4px}
  html[data-theme="dark"] #appView.app button.jump {font-size:.81rem}
  #appView .timer-actions {padding:12px 9px 15px;grid-template-columns:repeat(3,minmax(0,1fr))}
  html[data-theme="dark"] #appView.app .timer-actions button {flex-direction:column;gap:4px;padding:9px 0;font-size:.85rem}
  #appView .section-head {padding-left:12px;margin-bottom:16px;flex-wrap:wrap}
  #appView .section-head .section-copy {font-size:.92rem}
  #appView .desk-card {padding:17px 14px;gap:14px}
  #appView .desk-card h2 {font-size:1.07rem;gap:7px}
  #appView .rule-form {padding:17px}
  #appView .activity-row {gap:9px}
  .activity-row img {width:25px;height:25px}
  #appView[data-section="overview"] .clock-scene {background-size:100% 100%,auto 100%;min-height:183px}
  #appView[data-section="overview"] #timerPreview #timer {font-size:16cqw}
  #appView[data-section="overview"] #timerPreview #timer.long-clock {font-size:12cqw}
  #appView #sectionDock button[data-tab] span {font-size:clamp(.71rem,3.4vw,.9rem)}
  #appView #sectionDock .glyph {width:33px;height:33px}
  #appView .broadcast-actions {gap:7px}
  #appView .broadcast-actions>* {flex:1 1 125px}
  html[data-theme="dark"] #appView.app #copyBtn {padding-inline:8px;font-size:.88rem}
}



/* Las muestras de OBS mantienen espacio para sus efectos en pantallas pequeñas. */
#accessView .platform-list {display:flex;flex-wrap:wrap;gap:10px}
#accessView .platform-list span {background:#16273b;flex-wrap:wrap}
#accessView .platform-list small {font-size:.68rem}
#accessView .connection-shot {transform:none}
#accessView .live-demo-card .demo-controls button {min-height:44px;border-radius:12px!important}
#accessView .live-demo-card .demo-controls button.active {background:#58e6d1!important;color:#0d1826!important;border-color:#58e6d1!important}
@media(max-width:600px){
  #accessView :is(.platform-copy,.obs-visual,.obs-copy,.connection-shot,.live-demo-card,.overlay-stage) {min-width:0;max-width:100%}
  #accessView .real-counter-overlay {width:85%;min-width:0;max-width:100%;padding:18px 12px}
  #accessView .real-counter-overlay strong {font-size:clamp(2rem,10vw,3.1rem)}
  #accessView .demo-live-counter {width:85%;min-width:0;max-width:85%;padding-inline:12px}
  #accessView .demo-live-counter .demo-live-time {font-size:clamp(2.3rem,12vw,3.4rem)}
  #accessView .obs-counter {width:80%;min-width:0;max-width:100%;padding:14px}
  #accessView .obs-counter strong {font-size:clamp(1.6rem,8vw,2.75rem)}
  #accessView .obs-counter b {right:10px;white-space:nowrap}
}
@media(max-width:350px){
  .topbar .brand {gap:2px}
  .topbar .header-actions {gap:5px}
}

#ruleForm #rateHelp {
  grid-column: 1 / -1;
  padding: 15px 17px;
  border: 1px solid #52dfcf38;
  border-radius: 14px;
  background: #52dfcf08;
  overflow-wrap: anywhere;
}
#ruleForm #rateHelp[hidden] { display: none; }
#ruleForm #rateHelp p { margin: 7px 0 0; color: #bed1d0; font-size: .9rem; line-height: 1.5; }
#rateExamples { display: flex; gap: 8px; flex-wrap: wrap; }
#rateExamples span {
  flex: 1 1 195px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 9px;
  background: #081818;
  font-variant-numeric: tabular-nums;
}
#rateExamples b { color: #5be6cf; font-size: 1.1rem; }
