/* Orbix-inspired visual layer. Functional layout and responsive behavior remain in style.css. */
:root {
  --ds-ink: #010101;
  --ds-muted: #616161;
  --ds-canvas: #f3f4f6;
  --ds-surface: #ffffff;
  --ds-soft: #fafafa;
  --ds-border: #e4e5e7;
  --ds-font-sans: Arial, Helvetica, sans-serif;
  --ds-font-editorial: Georgia, 'Times New Roman', serif;
  --ds-radius-panel: 18px;
  --ds-radius-control: 99px;
  --ds-space-1: 4px;
  --ds-space-2: 8px;
  --ds-space-3: 12px;
  --ds-space-4: 16px;
  --ds-space-5: 24px;
  --ds-space-6: 32px;
  --ds-shadow-action: -3px 6px 10px #00000016, -7px 14px 20px #00000010;
  --ds-motion: 160ms ease;
}
body { background: var(--ds-canvas); color: var(--ds-ink); font-family: var(--ds-font-sans); }
header { height: 78px; padding: 0 30px; background: var(--ds-surface); border-bottom: 1px solid #ededed; }
.brand { gap: 5px; color: var(--ds-ink); }
.brand-symbol { background: transparent; color: var(--ds-ink); font: italic 700 38px/38px var(--ds-font-editorial); width: 28px; height: 38px; border-radius: 0; margin-right: 6px; }
.brand strong { font-size: 27px; font-weight: 500; letter-spacing: -1.5px; }
.brand-sub { font: italic 28px/1 var(--ds-font-editorial); letter-spacing: -1.3px; color: var(--ds-ink); }
.header-actions { gap: 23px; }
.local-note { font-size: 11px; color: var(--ds-muted); margin-right: 12px; }
button { border-color: var(--ds-border); background: var(--ds-canvas); border-radius: var(--ds-radius-control); transition: background var(--ds-motion), border-color var(--ds-motion), transform var(--ds-motion); }
button:hover { background: #e9e9e9; border-color: #bcbcbc; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--ds-ink); outline-offset: 3px; }
button[aria-pressed=true] { background: var(--ds-ink); color: #fff; border-color: var(--ds-ink); }
button:disabled { cursor: wait; opacity: .5; }
.text-button { border: 0; background: transparent; font-size: 12px; }
.text-button:hover { background: var(--ds-canvas); }
.save-button { display:inline-flex; align-items:center; justify-content:center; gap:9px; min-height:42px; background:var(--ds-ink); color:#fff; border-color:var(--ds-ink); padding:10px 18px; font-size:12px; font-weight:500; line-height:20px; white-space:nowrap; box-shadow:0 1px 2px #00000012; }
.save-button:hover { background: #262626; color: #fff; border-color: #262626; }
.save-button .icon { width:18px; height:18px; }
.studio-intro { max-width: 1800px; margin: auto; height: 110px; padding: 22px 30px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.studio-intro h1 { margin: 0 0 9px; font-size: clamp(28px, 3vw, 43px); font-weight: 500; line-height: 1.08; letter-spacing: -1.7px; }
.studio-intro h1 em { font-family: var(--ds-font-editorial); font-weight: 400; }
.studio-intro p { margin: 0; color: var(--ds-muted); font-size: 12px; }
.studio-tag { display:flex; align-items:center; gap:12px; flex-shrink:0; padding:10px 15px; border:1px solid var(--ds-border); border-radius:14px; background:#ffffffa6; }
.studio-tag>.icon { width:21px; height:21px; color:#333; }
.studio-tag>span { display:grid; gap:3px; }
.studio-tag strong { font-size:11px; font-weight:500; line-height:14px; }
.studio-tag small { color:var(--ds-muted); font-size:10px; line-height:13px; }
main { gap: 24px; padding: 0 26px 20px; grid-template-columns: 280px minmax(280px,1fr) 280px; }
.left-panel, .right-panel { height: calc(100dvh - 209px); scrollbar-color: #d2d2d2 transparent; }
.panel, .right-panel .panel { border-color: #ececee; border-radius: var(--ds-radius-panel); padding: 18px; margin-bottom: 12px; }
h2 { font-size: 10px; color: #555; letter-spacing: .9px; font-weight: 500; margin-bottom: 14px; }
h2>span { color: #777; }
h2 small { color: #737373; font-size: 9px; }
.device-grid button { background: #fafafa; border-radius: 10px; border-color: #ededed; height: 80px; color: #383838; }
.device-grid button:hover { background: #f0f0f0; border-color: #999; }
.device-grid button[aria-pressed=true] { border-color: #111; background: #f4f4f4; color: #000; box-shadow: 0 0 0 1px #111; }
.device-grid .device-thumb { height: 44px; }
.template-grid button { border-radius: 10px; border-color: #ececec; }
.template-grid button[aria-pressed=true] { outline-color: #111; background: var(--ds-surface); }
.template-grid button[aria-pressed=true]:after { color: #000; }
.library-note { color: #757575; }
.workspace { height: calc(100dvh - 209px); min-height: 0; }
.workspace-top { color: #606060; font-size: 11px; padding: 3px 2px 10px; }
.preview-badge { color: #666; border-color: #dcdcdc; border-radius: 99px; font-size: 8px; padding: 5px 9px; background: #ffffff80; }
.preview-wrap { width: min(100%,calc(100dvh - 390px),570px); }
#uploadTarget { border-radius: 22px; border-color: #e7e7e7; box-shadow: 0 2px 3px #00000003; }
.upload-hint { bottom: -52px; }
.upload-hint strong { color: #454545; font-size: 12px; }
.upload-hint span { color: #6d6d6d; font-size: 10px; }
.upload-hint button { color: #111; font-size: 10px; }
.media-tools { margin-top: 49px; gap: 6px; }
.media-tools button { color: #626262; font-size: 10px; }
.media-tools button:hover { background: #e5e5e5; color: #000; }
.export-bar { display:grid; grid-template-columns:auto minmax(100px,1fr) repeat(2,minmax(88px,1fr)); align-items:center; width:min(100%,520px); border-radius:28px; padding:8px; border-color:var(--ds-border); gap:8px; margin-top:10px; }
.export-label { color:#616161; gap:7px; margin:0 5px 0 8px; line-height:18px; }
.export-bar select { color:#333; font-size:11px; width:100%; min-height:42px; padding:8px 6px; line-height:18px; }
.export-bar button { display:inline-flex; justify-content:center; align-items:center; gap:8px; min-height:42px; padding:10px 15px; font-size:12px; font-weight:500; line-height:20px; border-radius:99px; white-space:nowrap; }
.primary { background: var(--ds-ink); border-color: var(--ds-ink); color: #fff; }
.primary:hover { background: #282828; border-color: #282828; color: #fff; }
#exportVideo { box-shadow:0 2px 4px #00000012; }
.privacy-note { color: #6f6f6f; font-size: 9px; margin-top: 11px; }
select, input { background: #f5f5f5; border-color: #e6e6e6; border-radius: 8px; color: #222; }
input::placeholder { color: #757575; }
.app-fields button { background: #f5f5f5; border-radius: 8px; }
.app-fields button span { color: #777; }
.swatches button[aria-pressed=true] { outline-color: #111; }
.divider { background: #e9e9e9; }
.emojis { flex-wrap: wrap; }
.emojis button { background: #fafafa; border-color: #ececec; }
.emojis button[aria-pressed=true] { background: #ededed; border-color: #111; }
.emojis button:last-child { color: #555; }
.zoom-grid button { border-radius: 99px; }
.toggle-row input, progress { accent-color: #111; }
.small-note { color: #707070; }
.tip { color: #777; }
.tip strong { color: #555; }
.quiet { background: transparent; }
dt { color: #747474; } dd { color: #222; }
#toast { background: #111; color: #fff; border-radius: 99px; box-shadow: 0 8px 30px #0002; font-size: 12px; }
dialog { background: #fff; color: #111; border-color: #e3e3e3; border-radius: 24px; box-shadow: 0 24px 90px #0003; }
dialog::backdrop { background: #0005; }
dialog h1 { font-family: var(--ds-font-editorial); font-weight: 400; }
dialog h2 { color: #111; }
dialog p, dialog li { color: #5f5f5f; }
.dialog-eyebrow { color: #636363; }
body.dragging #uploadTarget { outline-color: #111; }
@media(min-width:1450px) {
  main { grid-template-columns: 310px minmax(300px,1fr) 310px; gap: 40px; }
  .panel,.right-panel .panel { padding: 22px; }
  .device-grid button { height: 94px; }
  .device-grid .device-thumb { height: 55px; }
}
@media(max-width:1100px) {
  main { grid-template-columns: 228px minmax(230px,1fr) 238px; gap: 16px; padding-inline: 18px; }
  .panel,.right-panel .panel { padding: 15px; }
  .header-actions { gap: 13px; }
  .export-bar { border-radius: 18px; }
}
@media(max-width:850px) {
  header { height: 72px; padding: 0 20px; }
  .brand-sub { display: inline; font-size: 25px; }
  .brand strong { font-size: 25px; }
  .header-actions { gap: 10px; }
  .studio-intro { height: auto; min-height: 112px; padding: 22px 20px; }
  .studio-intro h1 { font-size: 32px; letter-spacing: -1.2px; }
  .studio-tag { display: none; }
  main { grid-template-columns: 1fr 1fr; gap: 14px; padding-inline: 16px; }
  .left-panel,.right-panel,.workspace { height: auto; }
  .preview-wrap { width: min(100%,440px); margin: 12px auto 0; }
  .workspace-top { width: min(100%,440px); }
  .media-tools { margin-top: 64px; }
  .export-bar { border-radius: 20px; margin-top: 14px; width: min(100%,440px); padding: 12px; }
  .export-bar select { width: 100%; }
  .privacy-note { margin-bottom: 20px; }
}
@media(max-width:480px) {
  header { padding: 0 14px; gap: 12px; }
  .brand-symbol { display: none; }
  .brand strong { font-size: 22px; letter-spacing: -1px; }
  .brand-sub { font-size: 23px; }
  .header-actions { gap: 5px; }
  .text-button { font-size: 10px; padding: 5px; }
  .save-button { gap:6px; min-height:38px; padding:8px 11px; font-size:11px; }
  .save-button .icon { width:16px; height:16px; }
  .studio-intro { padding: 22px 17px; }
  .studio-intro h1 { font-size: 31px; line-height: 1.12; }
  .studio-intro h1 em { display: block; }
  .studio-intro p { font-size: 11px; }
  main { gap: 10px; padding-inline: 14px; }
  .panel,.right-panel .panel { padding: 12px; border-radius: 14px; }
  .device-grid button { height: 68px; font-size: 8px; }
  .device-grid .device-thumb { height: 37px; }
  .privacy-note { font-size: 8px; }
}
@media(min-width:851px) and (max-height:700px) {
  .studio-intro { height: 94px; padding-block: 16px; }
  .studio-intro h1 { font-size: 32px; }
  .workspace,.left-panel,.right-panel { height: calc(100dvh - 193px); min-height: 425px; }
  .preview-wrap { width: min(100%,max(250px,calc(100dvh - 374px)),570px); }
}
@media(max-width:360px) {
  .brand-sub { display: none; }
  .header-actions { gap: 7px; }
  .header-actions button { white-space: nowrap; }
  main { grid-template-columns: minmax(0,1fr); }
  .left-panel,.right-panel { min-width: 0; }
  .panel,.right-panel .panel { padding: 16px; }
  .device-grid button { height: 88px; font-size: 11px; }
  .device-grid .device-thumb { height: 55px; }
}
/* Complete editor controls and a larger working canvas. */
header { height:64px; }
.studio-intro { height:78px; padding-block:14px; }
.studio-intro h1 { font-size:clamp(26px,2.7vw,36px); margin-bottom:6px; }
.left-panel,.right-panel,.workspace { height:calc(100dvh - 162px); }
.preview-wrap { width:min(100%,calc(100dvh - 310px),620px); margin:auto 0 0; }
.media-tools { margin:12px 0 0; flex-wrap:wrap; justify-content:center; }
.workspace:has(#uploadHint:not([hidden])) .media-tools { margin-top:57px; }
.export-bar { margin-top:auto; flex-shrink:0; }
.export-summary { color:#555; font-size:10px; margin:9px 0 0; text-align:center; }
.privacy-note { margin-top:5px; }
.library-tabs { position:sticky; top:0; z-index:2; display:flex; gap:4px; background:#f3f4f6; padding:0 0 12px; }
.library-tabs button { flex:1; font-size:11px; padding:6px 7px; }
.panel h2 { font-size:11px; }
.device-grid button { font-size:11px; }
.swatches { flex-wrap:wrap; justify-content:flex-start; gap:9px; }
.swatches button,.swatches .color-picker { width:24px; height:24px; min-height:24px; }
.color-picker:focus-within { outline:2px solid #111; outline-offset:3px; }
.emojis { justify-content:flex-start; gap:7px; }
.emojis button { width:29px; height:29px; font-size:17px; min-height:29px; }
.pattern-title { margin:15px 0 10px; }
.pattern-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; }
.pattern-grid button { font-size:11px; padding:6px 5px; }
.background-media { display:flex; gap:4px 10px; flex-wrap:wrap; margin-top:12px; font-size:11px; }
#backgroundName { width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#606060; }
.timeline { display:flex; align-items:center; gap:10px; width:min(100%,400px); margin:5px 0 10px; }
.timeline input { accent-color:#111; padding:0; min-height:20px; }
.timeline output { white-space:nowrap; font-size:10px; font-variant-numeric:tabular-nums; }
#emojiDialog { width:min(520px,calc(100vw - 24px)); padding:24px; }
.dialog-top { display:flex; align-items:center; justify-content:space-between; margin-bottom:18px; gap:12px; }
.dialog-top h2 { margin:0; }.dialog-top button { font-size:20px; padding:0; width:34px; }
.emoji-results { display:grid; grid-template-columns:repeat(8,minmax(0,1fr)); gap:4px; max-height:300px; overflow-y:auto; margin-top:16px; }
.emoji-results button { font:25px 'Segoe UI Emoji',sans-serif; padding:4px; border-radius:8px; min-height:40px; background:#fafafa; }
.emoji-results button[aria-pressed=true] { background:#e8e8e8; border-color:#111; }
.dialog-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px; margin-top:18px; }
#presetName { margin-top:10px; }
#managePreset { margin-top:8px; }
@media(max-width:850px){
 .studio-intro { height:auto; min-height:88px; }
 .left-panel,.right-panel,.workspace { height:auto; }
 .preview-wrap { width:min(100%,440px); margin:6px auto 0; }
 .workspace:has(#uploadHint:not([hidden])) .media-tools { margin-top:60px; }
 .media-tools { margin:12px 0 2px; }.export-bar { margin-top:12px; }
 .privacy-note { margin-bottom:14px; }.library-tabs { position:static; }
}
@media(max-width:600px){
 main { grid-template-columns:minmax(0,1fr); }
 .studio-intro h1 { font-size:29px; }.studio-intro h1 em { display:inline; }
 .panel,.right-panel .panel { padding:18px; }
 .device-grid button { height:94px; font-size:12px; }.device-grid .device-thumb { height:60px; }
 .app-fields { flex-direction:row; }.zoom-grid { grid-template-columns:repeat(4,1fr); }
 h2 small { display:inline; }.left-panel { min-width:0; }
 .emojis button { width:33px; height:33px; }.emoji-results { grid-template-columns:repeat(7,minmax(0,1fr)); }
 .template-grid button::before { content:attr(aria-label); position:absolute; bottom:0; left:0; right:0; background:#0008; color:#fff; font-size:10px; padding:4px; }
}
@media(min-width:851px) and (max-height:700px){
 .studio-intro { height:68px; }.left-panel,.right-panel,.workspace { height:calc(100dvh - 152px); min-height:425px; }
 .preview-wrap { width:min(100%,max(270px,calc(100dvh - 300px)),620px); }
}
@media(min-width:851px) and (min-height:701px){
 .studio-intro { height:68px; }
 .left-panel,.right-panel,.workspace { height:calc(100dvh - 152px); }
 .preview-wrap { width:min(100%,calc(100dvh - 360px),620px); }
 .workspace:has(#uploadHint:not([hidden])) .preview-wrap { width:min(100%,calc(100dvh - 380px),620px); }
}

/* Hugeicons Stroke Rounded: one consistent size and optical alignment. */
.icon { display:inline-block; width:18px; height:18px; flex:0 0 auto; vertical-align:middle; fill:none; color:inherit; }
h2>.icon { width:16px; height:16px; color:#777; }
.export-label>.icon { width:17px; height:17px; }
.export-bar button>.icon { width:18px; height:18px; }
.app-fields button { display:inline-flex; align-items:center; justify-content:center; gap:7px; }
.app-fields button>.icon { width:14px; height:14px; }
.close,.dialog-top>button { display:inline-flex; align-items:center; justify-content:center; }
.tip>.icon { width:22px; height:22px; }
#shadows { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
#shadows button { min-height:40px; padding:10px 14px; font-size:12px; line-height:18px; }
@media(min-width:851px) and (max-width:1100px){
 .export-bar { grid-template-columns:repeat(2,minmax(0,1fr)); border-radius:20px; }
 .export-bar select { text-align:right; }
 .export-bar button { padding-inline:12px; }
}
@media(max-width:850px){
 .export-bar { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; padding:10px; }
 .export-bar button { min-height:44px; }
 .export-bar select { min-height:36px; }
}
@media(max-width:360px){
 .header-actions { gap:4px; }
 .save-button { gap:5px; padding-inline:10px; }
}
.save-button .button-label { margin:0; }
@media(max-width:480px){
 header { gap:8px; }
 .header-actions .text-button { white-space:nowrap; }
 .save-button { gap:5px; padding:8px 10px; font-size:10px; }
 .save-button .icon { width:14px; height:14px; }
}

/* Preset control: match the editor's rounded, quiet controls. */
#preset {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 11px 40px 11px 14px;
  border: 1px solid #e1e3e5;
  border-radius: 12px;
  background-color: #f7f8f9;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235d636b' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  color: #24272b;
  font: 400 13px/20px Arial, sans-serif;
  text-align: left;
  cursor: pointer;
  color-scheme: light;
  transition: border-color .15s, background-color .15s, box-shadow .15s;
}
#preset:hover { background-color: #f0f2f4; border-color: #cdd1d5; }
#preset:focus-visible { outline: 2px solid #25292d; outline-offset: 3px; border-color: #25292d; }
#preset option { background: #fff; color: #24272b; font: 400 13px Arial, sans-serif; }
#preset option:disabled { color: #81868c; }
@media (prefers-reduced-motion: reduce) { #preset { transition: none; } }

/* A compact editorial introduction with a clear path into the editor. */
.studio-intro { height:126px; padding:22px 30px 24px; gap:32px; }
.intro-copy { min-width:0; }
.intro-eyebrow { display:block; color:#616161; font:500 9px/14px Arial,sans-serif; letter-spacing:1.7px; margin-bottom:9px; }
.studio-intro h1 { font-size:clamp(27px,2.35vw,38px); line-height:1.12; letter-spacing:-1.25px; margin:0 0 9px; }
.studio-intro h1 em { white-space:nowrap; }
.studio-intro p { font-size:12px; line-height:1.5; color:#616161; }
.intro-details { flex:none; display:flex; flex-direction:column; align-items:flex-end; gap:15px; }
.intro-steps { list-style:none; display:flex; gap:18px; margin:0; padding:0; }
.intro-steps li { display:flex; align-items:center; gap:8px; font-size:11px; white-space:nowrap; color:#363a3f; }
.intro-steps li>span { display:grid; place-items:center; width:25px; height:25px; border:1px solid #dedfe2; border-radius:50%; background:#fff; font-size:9px; color:#616161; }
.intro-privacy { display:flex; align-items:center; gap:7px; font-size:10px; color:#616161; }
.intro-privacy .icon { width:14px; height:14px; }
@media(min-width:851px) { .left-panel,.right-panel,.workspace { height:calc(100dvh - 210px); } }
@media(max-width:1150px) { .intro-steps { gap:10px; }.intro-steps li { gap:5px;font-size:10px; }.studio-intro { gap:20px; }.studio-intro h1 { font-size:29px; }.studio-intro p { max-width:440px;font-size:11px; } }
@media(max-width:850px) { .studio-intro { height:auto;min-height:0;align-items:flex-start;flex-direction:column;padding:24px 20px;gap:18px; }.intro-details { align-items:flex-start;gap:12px; }.intro-steps { gap:18px; }.intro-steps li { font-size:11px; }.studio-intro h1 em { white-space:normal; }.studio-intro p { max-width:520px; } }
@media(max-width:430px) { .studio-intro { padding:22px 17px; }.studio-intro h1 { font-size:30px;line-height:1.15; }.studio-intro h1 em { display:block; }.intro-steps { flex-wrap:wrap;gap:10px 14px; }.intro-steps li { font-size:10px; } }

.screen-fit label { display:block; font-size:11px; color:#616161; margin:14px 0; }
.screen-fit input[type=range] { display:block; width:100%; margin-top:10px; padding:0; accent-color:#202020; cursor:pointer; }
.screen-fit .small-note { line-height:1.6; margin-top:0; }

/* Fully styled preset options; native select remains the state source. */
#preset[hidden] { display:none!important; }
.preset-picker { position:relative; }
#presetTrigger { width:100%; min-height:60px; display:flex; justify-content:space-between; align-items:center; padding:12px 14px; border:1px solid #dedfe2; border-radius:13px; background:#f7f8f9; text-align:left; }
#presetTrigger>span { display:grid; gap:5px; }
#presetTrigger small { font-size:8px; letter-spacing:1.1px; color:#676c72; }
#presetTrigger strong { font-size:13px; font-weight:500; }
#presetTrigger[aria-expanded=true] { border-color:#24272b; background:#fff; }
#presetTrigger[aria-expanded=true]>.icon { transform:rotate(180deg); }
#presetMenu { margin-top:8px; padding:6px; border:1px solid #e2e4e6; border-radius:14px; background:#fff; box-shadow:0 8px 24px #1720180c; max-height:330px; overflow:auto; }
#presetMenu[hidden] { display:none; }
#presetMenu [role=option] { display:flex; align-items:center; gap:10px; width:100%; border:0; border-radius:9px; background:transparent; padding:11px 8px; text-align:left; min-height:60px; }
#presetMenu [role=option]:hover,#presetMenu [role=option]:focus-visible { background:#f1f3f0; outline:2px solid #59664b; outline-offset:-2px; }
#presetMenu [aria-selected=true] { background:#eef2e8; color:#161a14; }
.preset-swatch { width:27px; height:32px; border-radius:6px; border:1px solid #00000010; flex:none; }
.preset-copy { display:grid; gap:5px; flex:1; min-width:0; }
.preset-copy strong { font-size:12px; font-weight:500; overflow-wrap:anywhere; }
.preset-copy small { font-size:10px; line-height:1.35; color:#62676d; }
.preset-check { width:13px; flex:none; font-size:12px; }

/* Keep the library stationary while the pointer crosses thumbnail boundaries. */
.left-panel { scrollbar-gutter:stable; overflow-x:hidden; overscroll-behavior-y:contain; }
.left-panel button { transition:background-color .15s,border-color .15s; }
.left-panel button:active { transform:none; }
.left-panel .template-grid button img,
.left-panel .template-grid button:hover img { transform:none; transition:none; }
.left-panel .template-grid button:hover { border-color:#73787e; }
.left-panel .device-grid button img { display:block; }
@media(max-width:850px) { .left-panel { scrollbar-gutter:auto; overflow-x:visible; overscroll-behavior-y:auto; } }

/* Export size opens above the toolbar, clear of the viewport edge. */
#resolution[hidden] { display:none!important; }
.resolution-picker { position:relative; min-width:0; }
.export-bar #resolutionTrigger { width:100%; justify-content:space-between; gap:8px; padding:10px 12px; border:1px solid #e1e3e5; border-radius:12px; background:#f7f8f9; font-size:11px; font-variant-numeric:tabular-nums; }
#resolutionTrigger .icon { width:14px; height:14px; flex:none; }
.export-bar #resolutionTrigger[aria-expanded=true] { background:#fff; border-color:#34383c; }
#resolutionMenu { position:absolute; z-index:30; bottom:calc(100% + 12px); left:50%; transform:translateX(-50%); width:232px; max-width:calc(100vw - 32px); padding:6px; border:1px solid #e1e3e5; border-radius:16px; background:#fff; box-shadow:0 12px 40px #2025201f; }
#resolutionMenu[hidden] { display:none; }
.export-bar #resolutionMenu [role=option] { width:100%; min-height:60px; padding:11px 12px; display:flex; justify-content:space-between; text-align:left; border:0; border-radius:10px; background:transparent; }
.export-bar #resolutionMenu [aria-selected=true] { background:#eef2e8; color:#161a14; }
.export-bar #resolutionMenu [role=option]:hover,.export-bar #resolutionMenu [role=option]:focus-visible { background:#f0f2ee; outline:2px solid #59664b; outline-offset:-2px; }
.resolution-copy { display:grid; gap:3px; }
.resolution-copy strong { font-size:12px; font-weight:500; }
.resolution-copy small { font-size:10px; font-weight:400; color:#62676d; }
.resolution-check { width:14px; font-size:12px; }
.mockup-position label { display:flex; justify-content:space-between; font-size:11px; color:#616161; margin:16px 0 9px; }
.mockup-position output { font-variant-numeric:tabular-nums; color:#333; }
.mockup-position input[type=range] { display:block; width:100%; padding:0; accent-color:#202020; cursor:pointer; }
 .mockup-alignment { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; margin-top:14px; }
.mockup-alignment button { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px; min-height:56px; padding:8px 3px; border:1px solid #e4e5e7; border-radius:10px; background:#f5f6f7; color:#333; font-size:10px; }
.mockup-alignment button:hover { background:#e9ebee; border-color:#c7cbd0; }
.mockup-alignment button:focus-visible { outline:2px solid #202020; outline-offset:2px; }
.mockup-alignment svg { width:20px; height:20px; flex:none; }
.mockup-position .small-note { line-height:1.6; }

.background-modes { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; }
.background-modes #bgVideo { grid-column:1 / -1; order:3; display:flex; justify-content:center; align-items:center; gap:8px; min-height:38px; }
.background-upload-note { margin:10px 0 0; line-height:1.6; }

.custom-mockup-panel #importMockup { display:flex; align-items:center; justify-content:center; gap:8px; width:100%; min-height:40px; margin-top:14px; border:1px dashed #b7bdc5; border-radius:12px; background:#f5f6f7; }
.custom-mockup-panel .small-note { line-height:1.6; }
#customMockups:empty, #customMockupStatus:empty { display:none; }
#customMockups button img { object-fit:contain; }

/* Keep each social aspect ratio visible within the editor's available height. */
.preview-wrap { width:min(100%,620px,calc(max(270px,100dvh - 380px) * var(--frame-ratio,1))); }
#uploadTarget { position:relative; }
#preview { display:block; width:100%; height:auto; }
#safeZoneOverlay { position:absolute; border:1px dashed #24795b; box-shadow:0 0 0 2000px #172b3630; pointer-events:none; z-index:2; }
#safeZoneOverlay[hidden] { display:none; }
#safeZoneOverlay > span { position:absolute; top:5px; left:5px; padding:3px 5px; border-radius:4px; background:#fff; color:#245b47; font-size:8px; letter-spacing:.1em; }
.safe-zone-panel .toggle-row { margin:14px 0; }
.safe-preset-label { display:block; margin:14px 0 7px; font-size:11px; color:#616161; }
.safe-zone-panel select { width:100%; padding:10px; border:1px solid #e4e5e7; border-radius:10px; background:#f5f6f7; color:#222; }
.safe-margin-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px 12px; margin:16px 0; }
.safe-margin-grid label { display:grid; grid-template-columns:1fr auto; gap:8px; font-size:11px; color:#616161; }
.safe-margin-grid input { grid-column:1/-1; width:100%; padding:0; accent-color:#222; }
.safe-margin-grid output { font-variant-numeric:tabular-nums; color:#333; }
.safe-zone-panel .small-note { line-height:1.6; }
#resolutionMenu { max-height:min(440px,65dvh); overflow-y:auto; overscroll-behavior:contain; }
.workspace:has(#uploadHint:not([hidden])) .preview-wrap { width:min(100%,620px,calc(max(270px,100dvh - 380px) * var(--frame-ratio,1))); }

#shareLive { cursor:pointer; padding:7px 10px; white-space:nowrap; }
#shareLive:hover { background:#e8ece9; }
#liveShareDialog { max-width:480px; width:calc(100% - 40px); }
#liveShareDialog p { line-height:1.65; }
#liveLinkResult { margin:18px 0; }
#liveLinkResult[hidden] { display:none; }
#liveLinkResult label { display:block; margin-bottom:8px; font-size:12px; }
#liveShareUrl { width:100%; padding:12px; border:1px solid #ddd; border-radius:10px; }
.live-share-actions { display:flex; flex-wrap:wrap; align-items:center; gap:12px; margin-top:12px; }
.live-share-actions a { color:inherit; font-size:12px; }
#liveShareStatus { font-size:12px; }

#safePreset[hidden] { display:none!important; }
#safePresetTrigger { display:flex; align-items:center; justify-content:space-between; gap:10px; width:100%; padding:12px; border:1px solid #e3e5e8; border-radius:12px; background:#f6f7f8; text-align:left; }
#safePresetTrigger small { display:block; font-size:8px; letter-spacing:.12em; color:#626970; margin-bottom:5px; }
#safePresetTrigger strong { display:block; font-size:12px; font-weight:500; }
#safePresetTrigger[aria-expanded=true] { border-color:#7b8c81; }
#safePresetMenu { margin-top:8px; padding:6px; border:1px solid #e4e7e5; border-radius:14px; background:#fff; box-shadow:0 8px 24px #182a1f0c; max-height:390px; overflow:auto; overscroll-behavior:contain; }
#safePresetMenu[hidden] { display:none; }
.safe-category { padding:9px 7px 5px; font-size:9px; font-weight:600; letter-spacing:.06em; text-transform:uppercase; color:#68716c; }
#safePresetMenu [role=option] { width:100%; display:flex; justify-content:space-between; align-items:center; gap:5px; padding:10px 8px; border:0; border-radius:9px; background:#fff; text-align:left; }
#safePresetMenu [role=option]:hover,#safePresetMenu [role=option]:focus-visible { background:#f0f3f1; outline:2px solid #6e8374; outline-offset:-2px; }
#safePresetMenu [aria-selected=true] { background:#e9efeb; }
#safePresetMenu strong { display:block; font-size:12px; font-weight:500; }
#safePresetMenu small { display:block; font-size:10px; line-height:1.5; color:#626970; margin-top:4px; }
#safePresetMenu .safe-ratio { font-size:9px; color:#64716a; }

/* Live sharing: a quiet editorial dialog with clear action hierarchy. */
#liveShareDialog { width:calc(100% - 32px); max-width:510px; max-height:calc(100dvh - 40px); padding:28px; border:1px solid #e3e6e3; border-radius:24px; background:#fff; color:#202421; box-shadow:0 24px 90px #1222192b; overflow-y:auto; }
#liveShareDialog::backdrop { background:#18221b55; backdrop-filter:blur(5px); }
.share-dialog-heading { display:flex; align-items:center; gap:10px; margin-bottom:24px; }
.share-dialog-icon { display:grid; place-items:center; width:36px; height:36px; border-radius:12px; background:#edf1ee; }
.share-dialog-icon .icon { width:19px; height:19px; }
.share-dialog-eyebrow { font-size:9px; letter-spacing:.13em; color:#66716a; }
#closeLiveShare { margin-left:auto; width:34px; height:34px; padding:0; display:grid; place-items:center; border:1px solid #e6e8e6; border-radius:50%; background:#fff; color:#505a53; }
#closeLiveShare:hover { background:#f0f3f1; }
#liveShareDialog #liveShareTitle { display:block; font-size:30px; line-height:1.15; letter-spacing:-1px; font-weight:400; margin:0 0 14px; color:#111; }
#liveShareTitle em { font-family:Georgia,serif; font-weight:400; }
#liveShareDescription { color:#626b65; font-size:13px; margin:0 0 22px; max-width:390px; }
.share-facts { display:grid; grid-template-columns:1fr 1fr; gap:14px; padding:16px 0; border-top:1px solid #edf0ed; border-bottom:1px solid #edf0ed; }
.share-facts strong { display:block; font-size:12px; font-weight:500; }
.share-facts span { display:block; font-size:11px; color:#6b746e; margin-top:6px; }
.share-local-notice { display:flex; gap:11px; padding:14px; margin:20px 0; background:#f3f5f3; border:1px solid #e8ece8; border-radius:12px; }
.share-local-notice > .icon { flex:none; margin-top:1px; width:17px; height:17px; color:#68766c; }
.share-local-notice strong { display:block; font-size:12px; font-weight:500; }
#liveShareDialog .share-local-notice p { margin:5px 0 0; font-size:11px; color:#647067; }
#startLiveShare { width:100%; min-height:46px; border-radius:12px; display:flex; align-items:center; justify-content:space-between; padding:12px 16px; background:#101410; color:white; }
#startLiveShare[hidden] { display:none; }
#liveLinkResult label { font-size:9px; letter-spacing:.1em; color:#647067; margin-bottom:8px; }
.share-link-field { display:flex; align-items:center; padding:5px; gap:6px; background:#f6f7f6; border:1px solid #dde3de; border-radius:12px; }
#liveShareUrl { flex:1; min-width:0; border:0; background:transparent; padding:9px 7px; font-size:12px; color:#4b574e; }
#copyLiveLink { flex:none; min-height:36px; padding:8px 12px; border:0; border-radius:8px; background:#121812; color:#fff; font-size:11px; }
.live-share-actions { justify-content:space-between; margin-top:12px; }
.live-share-actions #openLiveLink { display:flex; align-items:center; gap:8px; text-decoration:none; font-size:12px; padding:8px 0; }
#stopLiveShare { border:0; background:transparent; color:#8b4239; padding:8px 0; font-size:11px; }
#liveShareStatus { min-height:18px; margin:14px 0 0; color:#4d6454; font-size:11px; }
.share-dialog-footer { margin-top:15px; padding-top:16px; border-top:1px solid #edf0ed; font-size:10px; line-height:1.7; color:#747c76; text-align:center; }
#liveShareDialog button:focus-visible,#liveShareDialog a:focus-visible { outline:2px solid #597565; outline-offset:3px; }
@media(max-width:480px) { #liveShareDialog { padding:20px; } #liveShareDialog #liveShareTitle { font-size:27px; } .share-dialog-eyebrow { font-size:8px; letter-spacing:.08em; } }

/* Readable editor typography: 14px controls, 13px labels, 12px supporting copy. */
body { font-size:14px; line-height:1.5; }
button,input,select,textarea { font-size:14px; }
.local-note,.text-button,.save-button { font-size:13px; }
.studio-intro p { font-size:14px; }
.intro-eyebrow,.intro-steps li>span { font-size:11px; }
.intro-steps li { font-size:12px; }
.intro-privacy { font-size:12px; }
.panel h2 { font-size:12px; line-height:1.45; letter-spacing:.06em; }
.panel h2 small { font-size:11px; letter-spacing:0; }
.workspace-top { font-size:13px; }
.preview-badge,#shareLive { font-size:11px; letter-spacing:.04em; }
.library-tabs button,.device-grid button,.pattern-grid button { font-size:12px; line-height:1.4; }
.device-grid button { height:auto; min-height:84px; padding-bottom:7px; }
.segments button,#shadows button,.zoom-grid button { font-size:13px; line-height:1.4; }
.zoom-grid button { padding:8px 3px; }
.small-note,.library-note,.privacy-note,.export-summary,.tip,.background-media,.timeline output { font-size:12px; line-height:1.6; }
.upload-hint strong { font-size:14px; }
.upload-hint span,.upload-hint button,.media-tools button,.quiet { font-size:12px; line-height:1.5; }
.toggle-row,.screen-fit label,.mockup-position label,.safe-preset-label,.safe-margin-grid label { font-size:13px; line-height:1.5; }
.mockup-alignment button { font-size:12px; min-height:62px; }
#mediaDetails { font-size:12px; line-height:1.6; }
#presetTrigger small,#safePresetTrigger small { font-size:10px; letter-spacing:.07em; }
#presetTrigger strong,#safePresetTrigger strong,.preset-copy strong,.resolution-copy strong,#safePresetMenu strong { font-size:14px; line-height:1.4; }
.preset-copy small,.resolution-copy small,#safePresetMenu small { font-size:12px; line-height:1.5; }
.safe-category,#safePresetMenu .safe-ratio { font-size:11px; }
.export-bar button,.export-bar #resolutionTrigger { font-size:13px; }
.export-label { font-size:11px; }
.export-bar { width:min(100%,570px); }
#toast { font-size:13px; line-height:1.5; }
dialog { font-size:14px; line-height:1.6; }
.share-dialog-eyebrow,#liveLinkResult label { font-size:11px; letter-spacing:.06em; }
#liveShareDescription { font-size:14px; }
.share-facts strong,.share-local-notice strong { font-size:13px; }
.share-facts span,#liveShareDialog .share-local-notice p,#liveShareStatus,.share-dialog-footer { font-size:12px; }
#liveShareUrl,#copyLiveLink,#stopLiveShare,.live-share-actions #openLiveLink { font-size:13px; }
#liveShareDialog { max-width:540px; }
@media(max-width:600px) { .intro-steps { flex-wrap:wrap; } .export-bar { gap:6px; } .export-bar button { padding:9px 10px; } .device-grid button { font-size:12px; } }
.app-fields button,.app-fields input { font-size:14px; min-width:0; } #presetTrigger small,#safePresetTrigger small { font-size:11px; }

.app-fields { flex-direction:column; } .app-fields #logo { display:flex; justify-content:center; align-items:center; gap:8px; width:100%; min-height:40px; } .app-fields #appName { min-height:40px; }
