/* Phone refinements. Keep the desktop stationery system and its theme tokens.
   !important only overrides legacy inline styles in the imperative renderer. */
/* Keep the floral stationery, without continuous filter/compositing work on phones. */
@media (max-width: 760px), (prefers-reduced-motion: reduce) {
  .studio-bg-petals > div > div { animation: none !important; }
}
.lite .studio-bg-petals > div > div { animation: none !important; }
@media (max-width: 760px) {
  .at-studio .at-header,
  .at-studio .at-sidebar,
  .at-studio .at-editor-footer {
    background: var(--at-surface);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .at-studio .at-sidebar{min-width:0;align-self:stretch;}
  .at-step-rail{position:relative;min-width:0;padding-bottom:10px;}
  .at-step-rail .at-steps{min-width:0;overflow-x:auto;touch-action:pan-x pinch-zoom;scroll-snap-type:x proximity;padding:2px 0;cursor:grab;user-select:none;-webkit-overflow-scrolling:touch;}
  .at-step-rail .at-step{scroll-snap-align:center;touch-action:pan-x pinch-zoom;cursor:inherit;}
  .at-step-rail .is-dragging{cursor:grabbing;scroll-snap-type:none;}
  .at-step-rail::before,.at-step-rail::after{content:'';position:absolute;top:0;bottom:10px;width:18px;z-index:1;pointer-events:none;opacity:0;}
  .at-step-rail::before{left:0;background:linear-gradient(to right,var(--at-surface),transparent);}
  .at-step-rail::after{right:0;background:linear-gradient(to left,var(--at-surface),transparent);}
  .at-step-rail.has-earlier::before,.at-step-rail.has-later::after{opacity:1;}
  .at-header { padding: 16px 18px; gap: 12px; flex-wrap: wrap; }
  .at-header-actions { gap: 6px; }
  .at-header-actions .at-button { min-height: 44px; font-size: 12px; }
  .at-button, .at-step { min-height: 44px; }
  .at-page { scroll-padding-bottom: 110px; }
  .at-workspace-inner { padding: 28px 18px 64px; }
  .at-page h1 { font-size: clamp(36px, 10.5vw, 46px); }
  .at-lead { font-size: 15px; line-height: 1.75; }
  .at-current { gap: 16px; padding: 22px 18px; }
  .at-current > img { min-width: 64px; width: 25%; }
  .at-current > div { min-width: 0; }
  .at-current h2 { overflow-wrap: anywhere; }
  .at-current .at-button { padding-inline: 16px; }
  .at-template-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .at-template { min-width: 0; padding: 12px 13px 18px; }
  .at-template img { height: 112px; }
  .at-template-name { font-size: 24px; }
  .at-template-copy { font-size: 13px; line-height: 1.65; }
  .at-template-action { font-size: 12px; margin-top: 16px; }
  .at-section-title > p, .at-workspace-bottom p:not(.at-eyebrow) { font-size: 14px; }
  .at-editor-layout { padding-bottom: calc(120px + env(safe-area-inset-bottom)); }
  .at-sidebar { margin-bottom: 22px; }
  .at-steps { overscroll-behavior-x: contain; scrollbar-width: none; }
  .at-steps::-webkit-scrollbar { display: none; }
  .at-step { flex-shrink: 0; }
  .at-editor-top { gap: 12px; flex-wrap: wrap; }
  .at-editor-footer { padding-bottom: max(13px, env(safe-area-inset-bottom)); }
  .at-editor-footer .at-button { font-size: 13px; }
  .at-step-heading > p { font-size: 15px !important; line-height: 1.7 !important; }
  .at-finish-actions { flex-direction: column; }
  .at-finish-actions .at-button { width: 100%; }
  .at-finish-note { font-size: 13px; }
  .at-review > div > div { min-width: 0; overflow-wrap: anywhere; }
  .at-review .at-button { flex-shrink: 0; }
  .at-dialog { max-height: calc(100dvh - 32px); overflow-y: auto; }
  .at-studio select { font-size: 16px !important; }
  .phone-play-toolbar { padding: 12px !important; gap: 6px; }
  .phone-play-toolbar > div { gap: 5px !important; min-width: 0; }
  .phone-play-toolbar button { min-height: 44px; padding: 9px 12px !important; white-space: nowrap; }
  .phone-play-toolbar #sound-toggle-play { min-width: 44px; padding-inline: 8px !important; }
  .phone-play-progress { top: 69px !important; }
  .phone-play-back { top: auto !important; bottom: max(16px,env(safe-area-inset-bottom)); transform: none !important; opacity: 1 !important; }
  .romance-mobile > div { padding-top: 96px !important; }
  .romance-mobile.romance-light { background: #ecd8d3 !important; }
  .romance-mobile [aria-label="Flip card"] { width: 44px !important; height: 44px !important; }
  .phone-read-button { min-height: 44px; border: 1px solid currentColor; border-radius: 999px; padding: 10px 20px; background: #eed3d6; color: #472236; font: 14px 'Jost',sans-serif; }
  .mobile-letter-tools { width: 100%; margin-bottom: 0 !important; }
  .at-studio .mobile-letter-tools { display: none !important; }
  .mobile-letter-tools > div { border-radius: 16px !important; }
  .mobile-letter-tools button { min-width: 44px !important; height: 44px !important; font-size: 15px !important; }
  .mobile-letter-tools select { min-height: 44px; }

  /* Preview and actions stay on screen; only the options pane scrolls.
     Dynamic viewport units account for the mobile browser's address bar. */
  #bl-export { padding: 8px !important; }
  #bl-export .export-dialog {
    width: 100% !important;
    height: calc(100vh - 16px) !important;
    height: calc(100dvh - 16px) !important;
    max-height: calc(100dvh - 16px) !important;
    padding: 16px !important;
    padding-bottom: max(12px, env(safe-area-inset-bottom)) !important;
    border-radius: 20px !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto minmax(100px, 25dvh) minmax(0, 1fr) auto !important;
    gap: 12px !important;
  }
  #bl-export .export-title { font-size: 34px !important; grid-row: 1; }
  #bl-export .export-description { display: none; }
  #bl-export .export-preview { grid-column: 1 !important; grid-row: 2 !important; }
  #bl-export .export-choices {
    grid-row: 3 !important; margin: 0 !important; gap: 8px !important;
    overscroll-behavior-y: contain; scrollbar-width: thin;
  }
  #bl-export .export-choices button { min-height: 48px; }
  #bl-export .export-styles { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  #bl-export .export-styles button { flex-direction: column; text-align: center !important; padding: 9px 3px !important; }
  #bl-export .export-styles button > span:first-child { flex: 0 0 30px !important; width: 40px; }
  #bl-export .export-styles button > span:last-child > span:last-child { display: none; }
  #bl-export .export-actions { flex-wrap: nowrap !important; gap: 8px !important; }
  #bl-export .export-actions button { min-height: 44px; padding: 11px 14px !important; }
  #bl-export .export-actions button:last-child { flex: 1; }

  /* Studio on a phone: make the editor feel like a focused little desk. */
  .at-page{overscroll-behavior-y:none}
  .at-header{position:sticky;top:0;z-index:30;background:color-mix(in srgb,var(--at-glass) 92%,transparent);backdrop-filter:blur(18px);border-bottom-color:var(--at-line)}
  .at-workspace-inner{padding:22px 16px 84px}
  .at-workspace-intro{margin-bottom:22px}.at-workspace-intro h1{max-width:8ch;margin-top:10px}
  .at-current{display:grid;grid-template-columns:72px minmax(0,1fr);gap:14px;padding:14px;margin-bottom:34px;border-radius:18px}
  .at-current>img{width:72px;min-width:0;align-self:center}.at-current h2{font-size:26px;margin:2px 0 7px}.at-current p:not(.at-eyebrow){font-size:11px;line-height:1.5;margin-bottom:12px}
  .at-current .at-button{width:100%;padding:10px 12px;font-size:11px}
  .at-section-title{margin-bottom:16px}.at-section-title h2{font-size:31px}.at-section-title>p{font-size:11px;line-height:1.5}
  .at-template-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.at-template{padding:8px 10px 14px;border-radius:14px}.at-template img{height:92px}.at-template-name{font-size:21px;margin:7px 0 8px}.at-template-copy{font-size:11px;line-height:1.45}.at-template-action{font-size:10px;margin-top:12px}
  .at-workspace-bottom{margin-top:38px;padding-top:24px}.at-workspace-bottom h2{font-size:27px}
  .at-editor-layout{padding:0 14px calc(124px + env(safe-area-inset-bottom));}
  .at-sidebar{margin:0 -14px 20px;padding:10px 14px 0;background:var(--at-glass);backdrop-filter:blur(14px);position:static;z-index:20}
  .at-steps{gap:7px;padding-bottom:10px}.at-step{border:1px solid transparent;border-radius:999px;background:var(--at-surface);padding:9px 12px;font-size:11px}.at-step.is-active{border-color:var(--at-accent);background:var(--at-surface2)}
  .at-editor-top{margin-bottom:20px;padding-bottom:11px}.at-step-heading{margin-bottom:22px!important}.at-step-heading h2{font-size:29px!important;line-height:1!important}.at-step-heading>p{font-size:12px!important;line-height:1.55!important}
  .setup-bar{padding:10px 14px max(10px,env(safe-area-inset-bottom))!important;flex-direction:row!important;align-items:center!important;gap:8px!important}.setup-bar button{min-height:44px!important}.setup-bar button:last-child{flex:1}
  .seq-timeline{margin-inline:-2px;padding-bottom:4px}.seq-timeline-card{border-radius:14px}.seq-tl-preview{height:96px;border-radius:14px 14px 0 0}
  .mobile-letter-fit{margin-inline:auto}.phone-write-button{margin-inline:auto}
  .at-layout-preview{padding:12px;border-radius:14px}.at-preview-stage{height:225px}.at-sample-note{top:26px;width:73%;padding:18px 15px;font-size:17px}.at-sample-note p{font-size:14px}

  .at-studio .at-header { padding:12px 14px; gap:8px; flex-wrap:nowrap; }
  .at-studio .at-header .at-brand { font-size:21px; gap:5px; }
  .at-studio .at-header-actions { gap:4px; flex-wrap:nowrap; }
  .at-studio .at-header-actions .at-button { padding:8px 10px; font-size:11px; }
  .at-studio .at-step { font-size:12px; }
  .at-studio .at-step-heading > p { font-size:14px!important; line-height:1.6!important; }
  .at-studio .at-editor-footer { gap:12px; padding:10px 14px max(10px,env(safe-area-inset-bottom)); }
  .at-studio .at-editor-footer .at-primary { min-width:48%; min-height:48px; }
  .mobile-letter-tools > div { gap:4px!important; padding:6px!important; }
  .mobile-letter-tools button { min-width:44px!important; }
  .mobile-letter-tools select { max-width:130px; }
  .phone-play-toolbar { z-index:200!important; flex-wrap:wrap; row-gap:8px!important; padding-top:max(10px,env(safe-area-inset-top))!important; }
  .phone-play-toolbar > div { flex-wrap:wrap; flex:1; }
  .phone-play-toolbar button { font-size:12px!important; }
  .phone-play-progress { max-width:calc(100% - 32px); }
  .phone-reader-text { font-size:22px; line-height:1.65; }
}

/* Remains usable if the phone rotates while the reader is open. */
@media(max-width:760px){
  .at-studio:has(.phone-variant){display:flex;flex-direction:column;overflow:hidden;height:100dvh;}
  .at-studio:has(.phone-variant)>.at-header{flex:none;width:100%;box-sizing:border-box;}
  .at-studio:has(.phone-variant) .at-editor-layout{flex:1;min-height:0;display:flex;flex-direction:column;margin:0;padding-bottom:0;}
  .at-studio:has(.phone-variant) .at-sidebar{flex:none;margin-bottom:8px;}
  .at-studio:has(.phone-variant) .at-editor-section{display:flex;flex-direction:column;min-height:0;flex:1;width:100%;}
  .at-studio:has(.phone-variant) .at-editor-top{display:none;}
  .phone-variant{display:flex;flex-direction:column;min-height:0;flex:1;width:100%;}
  .phone-variant .at-step-heading{margin-bottom:10px!important;}
  .phone-variant .at-step-heading h2{margin:4px 0!important;font-size:26px!important;}
  .phone-variant .at-step-heading>p,.phone-variant .at-step-tip{display:none;}
  .phone-variant-columns{display:flex!important;flex-direction:column;gap:12px!important;min-height:0;flex:1;}
  .phone-variant-preview{order:-1;position:static!important;flex:none;width:100%;}
  .phone-variant-preview>div:first-child:not(:last-child){display:none;}
  .phone-variant-options{min-height:0;flex:1;overflow-y:auto;overscroll-behavior:contain;padding:6px 4px 12px;}
  .phone-variant-options .seq-type-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;}
  .phone-variant-options .seq-type-option{padding:12px 8px;gap:7px;}
  .phone-variant-options .seq-type-option>div[style*="height: 110px"]{display:none;}
  .at-studio:has(.phone-variant) .at-editor-footer{position:static;flex:none;margin-top:8px;}
  .phone-content-tools{margin-bottom:18px;border:1px solid var(--at-line);border-radius:18px;overflow:hidden;background:var(--at-surface);}
  .phone-content-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:3px;padding:6px;border-bottom:1px solid var(--at-line);}
  .phone-content-tabs button{min-height:48px;padding:5px 3px;border:0;border-radius:12px;background:transparent;color:var(--at-muted);font:12px/1.3 Jost,sans-serif;}
  .phone-content-tabs button[aria-pressed=true]{background:var(--at-accent);color:var(--at-accent-text);}
  .phone-content-pane{padding:14px;max-height:190px;overflow:auto;overscroll-behavior:contain;}
  .phone-content-pane>[hidden]{display:none!important;}
  .phone-music-slot{margin-top:0!important;padding-top:0!important;border-top:0!important;}
  .phone-music-slot input{min-width:0;font-size:16px!important;}
  .phone-content-pane:has(>.phone-music-slot:not([hidden])){max-height:none;overflow:visible;}
  .phone-contents .at-step-heading{margin-bottom:14px!important;}
  .phone-contents .at-step-heading>p{display:none;}
  .phone-layout .at-layout-preview{box-sizing:border-box;width:100%;max-width:none;padding:10px;}
  .phone-layout .at-preview-stage{height:clamp(100px,20dvh,180px);}
  .phone-layout .at-preview-stage>img{height:100%;object-fit:contain;right:-5%;bottom:0;}
  .phone-layout .phone-variant-options{width:100%;box-sizing:border-box;}
  .phone-layout .at-sample-note{box-sizing:border-box;top:12px;padding:10px 14px;font-size:17px;}
  .phone-layout .at-sample-note p{font-size:14px;line-height:1.4;margin:8px 0;}
  .phone-layout .at-preview-caption{margin:6px 0;font-size:11px;line-height:1.4;}
  .phone-layout .at-preview-controls{gap:18px;}
  .phone-layout .at-preview-controls .at-button{min-height:44px;padding:6px 18px;}
  .phone-layout .seq-type-grid{grid-template-columns:minmax(0,1fr);gap:10px;}
  .phone-layout .seq-type-option{display:grid;grid-template-columns:44px minmax(0,1fr);column-gap:12px;row-gap:4px;text-align:left;padding:12px;border-radius:16px;}
  .phone-layout .phone-layout-icon{grid-column:1;grid-row:1 / 3;width:44px!important;height:44px!important;overflow:hidden;}
  .phone-layout .phone-layout-name{grid-column:2;grid-row:1;font-size:19px!important;}
  .phone-layout .phone-layout-description{grid-column:2;grid-row:2;font-size:12px!important;}
  .phone-layout .phone-layout-soon{position:static!important;grid-column:2;grid-row:3;justify-self:start;}
  .phone-layout .seq-type-option[aria-pressed=true]{border-color:var(--at-accent)!important;}
  .phone-layout .film-selected-preview{padding:10px;background:var(--at-surface);}
  .phone-layout .film-selected-preview .film-swatch{height:clamp(90px,18dvh,160px);}
  .phone-layout .film-selected-preview h3{font-size:22px;margin:8px 0 0;}
  .phone-layout .film-selected-preview p{display:none;}
  .phone-layout .film-design-picker{margin-top:16px;padding-top:14px;}
  .phone-layout .film-design-picker h3{font-size:24px;}
  .phone-layout .film-design-picker>p{font-size:12px;line-height:1.5;margin-bottom:12px;}
  .phone-layout .film-design-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;}
  .phone-layout .film-design-choice{padding:8px;}
  .phone-layout .film-design-choice .film-swatch{height:82px;}
  .phone-layout .film-choice-name{font-size:12px;line-height:1.4;margin:8px 0 2px;}
  .phone-layout .film-choice-description{display:none;}
  .phone-reel-explore{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-height:44px;margin-top:8px;padding:10px 16px;border:1px solid var(--at-line);border-radius:12px;background:var(--at-surface2);color:var(--at-accent);font:500 13px Jost,sans-serif;cursor:pointer;}
  .phone-reel-explore>span:last-child{font-size:20px;transition:transform .2s;}
  .phone-reel-explore:active>span:last-child{transform:translateY(3px);}
  .phone-reel-explore:focus-visible{outline:2px solid var(--at-accent);outline-offset:2px;}
  .phone-layout .film-design-picker:focus{outline:none;}
  .phone-frame-rail{width:100%!important;max-height:none!important;background:var(--at-surface)!important;box-shadow:none!important;border:1px solid var(--at-line);border-radius:16px!important;box-sizing:border-box;}
  .phone-frame-heading{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:12px;color:var(--at-ink);font:12px Jost,sans-serif;}
  .phone-frame-heading span{font-size:11px;color:var(--at-muted);}
  .phone-frame-area{flex:none!important;min-width:0;}
  .phone-frame-area>[hidden]{display:none!important;}
  .phone-frame-strip{flex-direction:row!important;overflow-x:auto!important;overflow-y:hidden!important;gap:12px!important;padding:5px 12px 12px!important;touch-action:pan-x pinch-zoom;scroll-snap-type:x proximity;}
  .phone-frame-cell{width:108px!important;transform:none!important;border-radius:12px!important;overflow:hidden;scroll-snap-align:start;cursor:default!important;}
  .phone-frame-cell>[role=button]{height:100px!important;aspect-ratio:auto!important;box-sizing:border-box;}
  .phone-frame-cell [aria-label='Delete piece']{width:32px!important;height:32px!important;top:0!important;right:0!important;}
  .phone-frame-grip{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;min-height:44px;border:0;background:var(--at-surface2);color:var(--at-ink);font:12px Jost,sans-serif;touch-action:none;user-select:none;cursor:grab;}
  .phone-frame-grip>span:first-child{font-size:23px;}
  .at-studio .phone-frame-grip{touch-action:none;}
  .phone-frame-grip:active{cursor:grabbing;}
  .phone-frame-strip.is-reordering{scroll-snap-type:none;}
  .phone-frame-strip{cursor:grab;user-select:none;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;scrollbar-width:thin;scrollbar-color:var(--at-accent) transparent;}
  .phone-frame-strip.is-browsing{cursor:grabbing;scroll-snap-type:none;}
  .phone-frame-cell>[role=button]{touch-action:pan-x pinch-zoom;cursor:inherit!important;}
  .phone-frame-cell img{-webkit-user-drag:none;}
  .phone-frame-cell.is-dragged{transform:translateX(var(--frame-drag-x,0px)) scale(1.03)!important;z-index:5!important;transition:none!important;opacity:.9;}
  .phone-frame-cell.is-drop-target{outline:3px dashed var(--at-accent)!important;outline-offset:2px;}
  .phone-frame-add{margin:0 12px 12px!important;min-height:44px!important;border-radius:10px!important;border-color:var(--at-line)!important;color:var(--at-accent)!important;background:var(--at-surface2)!important;}
}

.phone-letter-reader { width: min(620px,calc(100% - 20px)); height: calc(100dvh - 24px); max-height: calc(100dvh - 24px); max-width: none; border: 1px solid #e5cdbc; border-radius: 18px; padding: 0; background: #fff6e8; color: #472236; overflow: hidden; }
.phone-letter-reader[open] { display: flex; flex-direction: column; }
.phone-letter-reader::backdrop { background: #160e21cc; backdrop-filter: blur(6px); }
.phone-reader-close { flex-shrink: 0; align-self: flex-end; margin: 10px 12px; min-height: 44px; padding: 10px 18px; border: 1px solid #ad7a8b; border-radius: 999px; background: transparent; color: inherit; font: 14px 'Jost',sans-serif; }
.phone-reader-text { overflow-y: auto; overscroll-behavior: contain; padding: 0 24px max(28px,env(safe-area-inset-bottom)); font: 20px/1.7 'Cormorant Garamond',Georgia,serif; overflow-wrap: anywhere; }
.phone-reader-text h2 { font-size: 30px; line-height: 1.2; margin: 14px 0 24px; }
.phone-reader-text > span { min-height: 1.7em; }
.phone-reader-text span { font-family: inherit !important; }
.phone-reader-signature { margin-top: 28px; }
.phone-reader-drawing { display: block; max-width: 100%; height: auto; margin-top: 24px; }
.phone-letter-reader :focus-visible,.phone-read-button:focus-visible { outline: 2px solid #ad5576; outline-offset: 3px; }

.phone-write-button { min-height: 48px; width: min(100%,360px); padding: 10px 18px; border: 1px solid #e6b7c6; border-radius: 999px; background: #fff1eb; color: #642c44; font: 600 15px 'Jost',sans-serif; box-shadow: 0 8px 24px #25101a22; cursor: pointer; }
.phone-write-button:focus-visible { outline: 2px solid #ad5576; outline-offset: 3px; }
.phone-letter-writer { width: min(640px,100%); max-width: 100%; height: 100dvh; max-height: 100dvh; margin: 0 auto; padding: 0; border: 0; background: #fff7ec; color: #472236; box-sizing: border-box; }
.phone-letter-writer[open] { display: flex; flex-direction: column; }
.phone-letter-writer::backdrop { background: #160e21cc; }
.phone-writer-header { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; padding: 8px 18px; border-bottom: 1px solid #e8d6c8; box-sizing: border-box; font: 600 15px 'Jost',sans-serif; }
.phone-writer-done { min-height: 44px; padding: 8px 22px; border: 0; border-radius: 999px; background: #642c44; color: #fff; font: 600 14px 'Jost',sans-serif; }
.phone-writer-body { min-height: 0; flex: 1; display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; padding: 20px 18px max(18px,env(safe-area-inset-bottom)); box-sizing: border-box; }
.phone-writer-title { width: 100%; box-sizing: border-box; padding: 10px 0; border: 0; border-bottom: 1px solid #dec5b9; background: transparent; color: inherit; font: 25px 'Cormorant Garamond',Georgia,serif; }
.phone-writer-tools { margin: 18px 0 10px !important; }
.phone-writer-tools > div { border-radius: 18px !important; }
.phone-writer-tools button,.phone-writer-tools select { min-height: 44px !important; min-width: 44px !important; }
.phone-writer-editor { flex: 1 0 180px; min-height: 180px; outline: none; white-space: pre-wrap; overflow-wrap: break-word; font-size: 22px; line-height: 1.65; padding: 12px 2px; }
.phone-writer-editor:empty::before { content: attr(data-placeholder); color: #9d7884; pointer-events: none; }
.phone-writer-note { flex: 0 0 auto; margin: 10px 0 0; color: #765466; font: 12px/1.4 'Jost',sans-serif; }
.phone-letter-writer :focus-visible { outline: 2px solid #ad5576; outline-offset: 3px; }

@media (max-width: 370px) {
  .at-header .at-brand { font-size: 24px; }
  .at-header-actions { width: 100%; justify-content: flex-start; }
  .at-template-grid { grid-template-columns: minmax(0, 1fr); }
  .at-template img { height: 145px; }
  .at-current { flex-direction: column; align-items: flex-start; }
  .at-current > img { width: 92px; align-self: center; }
}

@media (max-width: 760px) and (max-height: 500px) {
  #bl-export .export-dialog {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    grid-template-rows: auto minmax(0, 1fr) auto !important;
  }
  #bl-export .export-preview { grid-row: 2 !important; }
  #bl-export .export-choices { grid-column: 2 !important; grid-row: 2 !important; }
  #bl-export .export-actions { grid-row: 3 !important; }
}

/* Workspace only: keep navigation together without narrowing the welcome text. */
@media (max-width: 760px) {
  .at-workspace .at-header { padding: 10px 12px; gap: 8px; flex-wrap: nowrap; background: var(--at-glass); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .at-workspace .at-header .at-brand { font-size: 21px; gap: 5px; }
  .at-workspace .at-brand > span { font-size: 20px; }
  .at-workspace .at-header-actions { width: auto; gap: 4px; flex-wrap: nowrap; flex-shrink: 0; }
  .at-workspace .at-header-actions .at-button { padding: 8px 9px; font-size: 11px; }
  .at-workspace .at-header-actions > button { min-height: 44px; }
  .at-workspace .at-header-actions > button[aria-label] { min-width: 44px; }
  .at-workspace .at-header-actions > .tap-44:not([aria-label]) { padding: 8px 9px !important; font-size: 11px !important; }
  .at-workspace .at-workspace-intro h1 { max-width: none; font-size: clamp(34px, 10.5vw, 42px); line-height: 1.08; text-wrap: balance; margin: 10px 0 16px; }
}
