/* Screen-size corrections for the Syren web experience. Loaded after the theme. */
.syren-redesign { height: 100svh; height: 100dvh; min-height: 0; overflow-y: auto; }
.syren-login::before { display: none; }
.syren-redesign button { min-width: 46px; min-height: 46px; }
.syren-icon-button, .syren-builder-topline button, .memory-vault-back { width: 46px; height: 46px; }
.syren-field button { min-width: 46px; min-height: 46px; font-size: 16px; }
.syren-choice-card h2, .syren-topbar h1, .syren-studio-heading h2,
.syren-message p, .syren-settings-card, .syren-builder-step, .syren-builder-review {
  min-width: 0;
  overflow-wrap: anywhere;
}
.syren-message p, .syren-message strong { overflow-wrap: anywhere; word-break: break-word; }
.syren-transcript, .syren-choice-card { overscroll-behavior: contain; }
.syren-dot, .syren-dot[aria-current=true] { width: 46px; height: 46px; min-width: 46px; min-height: 46px; opacity: 1; }
.syren-dot::after { top: 20px; left: 21px; }
.syren-dot[aria-current=true]::after { top: 22px; left: 12px; }
.syren-dots { gap: 0; }
.syren-pager .syren-icon-button { width: 46px; height: 46px; }
.syren-voice-preview, .syren-bottom-nav button, .syren-intensity button, .syren-settings-row button { min-height: 46px; }
.syren-bottom-nav button { font-size: 16px; }
.syren-control { min-width: 0; min-height: 70px; font-size: 16px; line-height: 1.15; }
.syren-control-icon { min-width: 54px; min-height: 54px; }
.syren-controls { gap: clamp(10px, 4vw, 22px); }
.syren-choice-teaser, .syren-settings-card .syren-muted { font-size: 16px; }
.syren-age-note p, .syren-builder-hint, .syren-builder-label, .syren-builder-sparks small,
.syren-builder-voice small, .syren-builder-segments button, .syren-builder-palette-grid button,
.syren-builder-test-input button, .syren-builder-test-input input, .syren-builder-tuning button,
.syren-studio-tabs button, .syren-studio-heading small, .memory-vault-footnote,
.memory-vault-limit-note, .memory-vault-card-footer time, .memory-vault-card-footer button { font-size: 16px; }
.syren-builder-segments button, .syren-builder-palette-grid button, .syren-studio-tabs button,
.syren-builder-voice-select, .syren-builder-listen { min-height: 46px; }
.syren-builder-voice-select { width: 100%; }
.syren-builder-listen { font-size: 16px; }
.syren-builder-topline button { flex: none; }
.syren-builder-dialog, .syren-studio-dialog {
  max-height: min(calc(100dvh - 24px), calc(var(--syren-visual-height, 100dvh) - 16px));
  overflow-y: auto;
}
.syren-builder-footer { bottom: 0; }
.syren-typed-form { flex: none; margin-top: 8px; }
.syren-typed-form input { font-size: 16px; }
.memory-vault-filter button { max-width: 100%; min-height: 46px; white-space: normal; overflow-wrap: anywhere; }
.memory-vault-filter { flex-wrap: wrap; overflow-x: visible; }
.memory-vault-back { flex: none; }
.syren-redesign[data-keyboard-open=true] .syren-session { height: var(--syren-visual-height, 100dvh); min-height: 0; overflow-y: auto; }
.syren-redesign[data-keyboard-open=true] .syren-session-orb { height: 84px; min-height: 0; }
.syren-redesign[data-keyboard-open=true] .syren-session-orb .syren-orb { width: 75px; height: 75px; }
.syren-redesign[data-keyboard-open=true] .syren-transcript { min-height: 45px; }

@media (max-width: 699px) {
  .syren-frame {
    padding-left: max(18px, env(safe-area-inset-left));
    padding-right: max(18px, env(safe-area-inset-right));
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }
  .syren-login { padding-top: max(30px, env(safe-area-inset-top)); padding-bottom: max(22px, env(safe-area-inset-bottom)); }
  .syren-choice { height: 100dvh; min-height: 0; overflow: hidden; }
  .syren-choice-card { flex: 1 1 auto; min-height: 0; overflow-y: auto; justify-content: flex-start; }
  .syren-choice > div:last-child { flex: none; }
  .syren-session { height: 100dvh; min-height: 0; overflow: hidden; }
  .syren-session-orb { height: clamp(145px, 27dvh, 260px); min-height: 0; padding: 0; flex: none; }
  .syren-session-orb .syren-orb { width: clamp(130px, 24dvh, 235px); height: clamp(130px, 24dvh, 235px); }
  .syren-transcript { flex: 1 1 auto; min-height: 55px; max-height: none; margin: 5px 0 8px; padding: 8px 5px; }
  .syren-controls { flex: none; margin-top: 8px; padding-bottom: 0; }
  .syren-state-label { min-height: 30px; font-size: clamp(20px, 5vw, 24px); }
  .syren-intensity { flex: none; }
}

@media (max-width: 699px) and (max-height: 740px) {
  .syren-frame { padding-top: max(8px, env(safe-area-inset-top)); padding-bottom: max(8px, env(safe-area-inset-bottom)); }
  .syren-login-hero { min-height: 175px; padding-top: 22px; }
  .syren-login-hero .syren-wordmark { font-size: clamp(60px, 16vw, 76px); }
  .syren-login-content { gap: 14px; }
  .syren-choice-intro { margin-top: 4px; }
  .syren-choice-card { gap: 5px; padding: 1px 0; }
  .syren-orb-stage { height: 135px; min-height: 135px; }
  .syren-choice .syren-orb { width: 135px; height: 135px; }
  .syren-orbit-ring { width: 160px; height: 160px; }
  .syren-choice-card h2 { font-size: 39px; }
  .syren-choice-card > p:not(.syren-choice-teaser):not(.syren-help) { font-size: 16px; line-height: 1.2; }
  .syren-choice-teaser { font-size: 16px; }
  .syren-choice-actions .syren-button { min-height: 44px; padding: 6px 16px; }
  .syren-session-orb { height: clamp(138px, 25dvh, 185px); }
  .syren-session-orb .syren-orb { width: clamp(125px, 23dvh, 170px); height: clamp(125px, 23dvh, 170px); }
}

@media (max-width: 699px) and (max-height: 820px) {
  .syren-login-hero { min-height: 155px; padding-top: 14px; }
  .syren-login-hero .syren-wordmark { font-size: clamp(60px, 16vw, 76px); }
  .syren-login-content { gap: 12px; }
}

@media (max-width: 699px) and (min-height: 821px) {
  .syren-login { justify-content: flex-start; }
  .syren-login-hero { min-height: 190px; padding-top: 34px; }
  .syren-login-hero .syren-kicker { margin-top: 12px; }
  .syren-login-content { gap: 15px; margin-block: auto; }
}

@media (min-width: 400px) and (max-width: 425px) and (min-height: 880px) {
  .syren-login-hero .syren-kicker { font-size: 15px; }
}

@media (min-width: 1000px) and (max-height: 820px) {
  .syren-frame.syren-session { height: calc(100dvh - 32px); min-height: 0; overflow: hidden; }
  .syren-session-orb { height: clamp(170px, 29dvh, 225px); min-height: 0; padding: 0; flex: none; }
  .syren-session-orb .syren-orb { width: clamp(160px, 25dvh, 210px); height: clamp(160px, 25dvh, 210px); }
  .syren-transcript { flex: 1 1 auto; min-height: 60px; max-height: none; margin: 6px 0; padding: 8px 5px; }
  .syren-controls { flex: none; margin-top: 8px; }
  .syren-intensity { flex: none; }
}

@media (max-width: 950px) and (orientation: landscape) and (max-height: 500px) {
  .syren-session {
    display: grid;
    grid-template-columns: minmax(0, 34%) minmax(0, 66%);
    grid-template-rows: 44px minmax(0, 1fr) auto auto auto;
    column-gap: 12px;
    row-gap: 3px;
    width: min(100%, 900px);
    height: 100dvh;
    min-height: 0;
    margin: 0 auto;
    padding: max(5px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(5px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
    overflow: hidden;
    border-radius: 0;
  }
  .syren-session .syren-topbar { grid-column: 1; grid-row: 1; min-height: 44px; }
  .syren-session .syren-topbar h1 { font-size: clamp(22px, 5dvh, 30px); line-height: 1.05; }
  .syren-session .syren-topbar small { margin-top: 0; }
  .syren-session-orb { grid-column: 1; grid-row: 2; height: auto; min-height: 0; padding: 0; }
  .syren-session-orb .syren-orb { width: clamp(105px, 39dvh, 180px); height: clamp(105px, 39dvh, 180px); }
  .syren-session .syren-state-label { grid-column: 1; grid-row: 3 / 6; align-self: center; min-height: 0; font-size: clamp(17px, 4dvh, 21px); }
  .syren-session .syren-transcript { grid-column: 2; grid-row: 1 / 3; min-width: 0; min-height: 0; max-height: none; margin: 0; padding: 6px 5px; overflow: auto; }
  .syren-session .syren-intensity { grid-column: 2; grid-row: 3; min-width: 0; padding: 2px 5px; }
  .syren-session .syren-intensity button { min-height: 46px; }
  .syren-session .syren-typed-form { grid-column: 2; grid-row: 4; margin: 0; min-height: 44px; }
  .syren-session .syren-controls { grid-column: 2; grid-row: 5; margin: 0; gap: 8px; align-self: end; }
  .syren-session .syren-control-icon { width: 44px; height: 44px; min-width: 44px; min-height: 44px; margin-bottom: 2px; }
  .syren-session .syren-control-end .syren-control-icon { width: 49px; height: 49px; }
  .syren-session .syren-control { min-height: 58px; font-size: 16px; }
  .syren-session-menu { top: 45px; right: max(14px, env(safe-area-inset-right)); }
  .syren-session > .syren-error { position: absolute; z-index: 4; top: 48px; right: max(14px, env(safe-area-inset-right)); max-width: 60%; }
  .syren-redesign[data-keyboard-open=true] .syren-session { height: var(--syren-visual-height, 100dvh); }
  .syren-redesign[data-keyboard-open=true] .syren-session-orb .syren-orb { width: clamp(75px, 27dvh, 110px); height: clamp(75px, 27dvh, 110px); }
}
