.aspire-studio {
  --studio-ink: #282b27;
  --studio-muted: #73766f;
  --studio-border: #e5e7e0;
  --studio-green: #3e5a3e;
  position: fixed;
  z-index: 1000;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  color: var(--studio-ink);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0;
  text-transform: none;
  -webkit-font-smoothing: antialiased;
}

.aspire-studio *, .aspire-studio *::before, .aspire-studio *::after { box-sizing: border-box; }
.aspire-studio [hidden] { display: none !important; }
.aspire-studio button, .aspire-studio input, .aspire-studio select { font: inherit; }
.aspire-studio button { cursor: pointer; color: inherit; -webkit-tap-highlight-color: transparent; }
.aspire-studio button:focus-visible, .aspire-studio select:focus-visible, .aspire-studio input:focus-visible {
  outline: 3px solid #768fce;
  outline-offset: 3px;
}

.studio-launcher {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  margin-left: auto;
  padding: 10px 17px 10px 13px;
  border: 1px solid #ffffffb3;
  border-radius: 30px;
  background: #fffef9;
  box-shadow: 0 3px 10px #23251b12, 0 12px 32px #23251b1a;
  font-size: 12px !important;
  font-weight: 600 !important;
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.studio-launcher:hover { transform: translateY(-2px); box-shadow: 0 5px 14px #23251b18, 0 15px 35px #23251b21; }
.studio-launcher-mark { color: #74825d; font-size: 24px; line-height: 20px; }
.studio-launcher[aria-expanded='true'] { background: #f1f2ed; }
.studio-panel {
  position: absolute;
  right: 0;
  bottom: 57px;
  width: 358px;
  max-width: calc(100vw - 32px);
  max-height: min(760px, calc(100dvh - 100px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #ffffff;
  border-radius: 20px;
  background: #fffefb;
  box-shadow: 0 16px 70px #25251b26, 0 3px 14px #25251b0d;
  text-align: left;
  isolation: isolate;
}
.studio-header { display: flex; flex-shrink: 0; align-items: center; justify-content: space-between; gap: 8px; padding: 23px 18px 17px 22px; }
.studio-eyebrow { display: block; margin-bottom: 7px; color: var(--studio-muted); font-size: 9px; font-weight: 650; letter-spacing: 1.55px; }
.studio-header h2 { margin: 0; color: var(--studio-ink); font-family: inherit; font-size: 19px; font-weight: 550; line-height: 1.2; letter-spacing: -.6px; text-transform: none; }
.studio-close { display: grid; place-items: center; flex: 0 0 38px; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 50%; background: #f0f1eb; font-size: 25px !important; font-weight: 300 !important; line-height: 1; }
.studio-close:hover { background: #e6e9e0; }
.studio-playback { flex-shrink: 0; margin: 0 20px 18px; padding: 10px 11px; border: 1px solid #dfe3d7; border-radius: 10px; background: #f5f7ef; }
.studio-playback-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 9px; }
.studio-scene-label { min-width: 0; overflow: hidden; color: #65715b; font-size: 10px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.studio-replay { display: flex; align-items: center; justify-content: center; flex-shrink: 0; gap: 5px; min-height: 30px; padding: 4px 7px; border: 0; border-radius: 5px; background: transparent; color: #405237 !important; font-size: 10px !important; font-weight: 600 !important; }
.studio-replay:hover { background: #e4eadb; }
.studio-replay span { font-size: 17px; line-height: 1; }
.studio-focus { flex-shrink: 0; margin-left: auto; min-height: 30px; padding: 4px 6px; border: 0; border-radius: 5px; background: transparent; color: #405237 !important; font-size: 9px !important; }
.studio-focus:hover, .studio-focus[aria-pressed='true'] { background: #e4eadb; }
.studio-scrub-label { margin-top: 12px; }
.studio-panel-focused .studio-body, .studio-panel-focused .studio-footer { display: none; }
.studio-panel-focused .studio-header { padding-top: 12px; padding-bottom: 10px; }
.studio-panel-focused .studio-eyebrow { display: none; }
.studio-panel-focused .studio-header h2 { font-size: 15px; }
.studio-panel-focused .studio-playback { margin-bottom: 14px; }
.studio-seek { display: grid; grid-template-columns: .85fr 1.25fr 1fr .85fr; gap: 4px; }
.studio-seek button { min-width: 0; min-height: 32px; padding: 5px 3px; border: 1px solid #dadfd1; border-radius: 5px; background: #fffefa; font-size: 9px !important; }
.studio-seek button:hover, .studio-seek button[aria-current='step'] { border-color: #7d936b; background: #e7eedb; color: #35502b; }
.studio-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding: 0 22px 2px; }
.studio-fieldset { min-width: 0; margin: 0 0 21px; padding: 0; border: 0; }
.studio-fieldset legend { display: block; width: 100%; margin-bottom: 13px; padding: 0; color: #939789; font-size: 10px; font-weight: 500; letter-spacing: .5px; }
.studio-fieldset legend span { margin-left: 8px; color: #63685e; font-size: 11px; font-weight: 600; letter-spacing: 0; }
.studio-presets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.studio-preset { position: relative; display: flex; align-items: center; gap: 8px; min-height: 56px; padding: 8px; border: 1px solid var(--studio-border); border-radius: 10px; background: #fffefb; text-align: left; }
.studio-preset:hover { border-color: #bbc2b1; background: #f8f9f3; }
.studio-preset[aria-pressed='true'] { border-color: #6a8061; background: #f5f7f0; box-shadow: 0 0 0 1px #6a8061; }
.studio-preset-swatch { flex: 0 0 31px; display: grid; place-items: center; width: 31px; height: 36px; border-radius: 5px; font-family: Georgia, serif; font-size: 17px; letter-spacing: -.7px; }
.studio-preset-text { min-width: 0; }
.studio-preset-text strong { display: block; font-size: 11px; font-weight: 600; line-height: 1.5; }
.studio-preset-text small { display: block; color: var(--studio-muted); font-size: 8px; line-height: 1.5; white-space: nowrap; }
.studio-preset-check { position: absolute; top: 4px; right: 5px; color: #536f47; font-size: 9px; opacity: 0; }
.studio-preset[aria-pressed='true'] .studio-preset-check { opacity: 1; }
.studio-motion-presets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-bottom: 14px; }
.studio-motion-preset { min-width: 0; min-height: 47px; padding: 7px 4px; border: 1px solid var(--studio-border); border-radius: 7px; background: #fffefb; text-align: center; }
.studio-motion-preset strong { display: block; font-size: 10px; font-weight: 600; line-height: 1.5; }
.studio-motion-preset small { display: block; color: var(--studio-muted); font-size: 8px; line-height: 1.6; }
.studio-motion-preset:hover { border-color: #bbc2b1; background: #f8f9f3; }
.studio-motion-preset[aria-pressed='true'] { border-color: #6a8061; background: #f0f4e8; box-shadow: 0 0 0 1px #6a8061; }
.studio-motion-note { margin: 6px 0 0; color: var(--studio-muted); font-size: 9px; line-height: 1.5; }
.studio-select-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; font-size: 11px; }
.studio-select-row select { max-width: 166px; min-height: 35px; padding: 6px 26px 6px 10px; border: 1px solid var(--studio-border); border-radius: 7px; background: #f8f8f3; color: var(--studio-ink); font-size: 11px; cursor: pointer; }
.studio-range-row { display: flex; justify-content: space-between; align-items: center; margin-top: 9px; font-size: 11px; }
.studio-range-row output { color: var(--studio-muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.aspire-studio input[type='range'] { display: block; width: 100%; height: 26px; margin: 0; padding: 0; background: transparent; accent-color: var(--studio-green); cursor: pointer; }
.studio-switches { margin-bottom: 13px; }
.studio-switch { position: relative; display: flex; align-items: center; justify-content: space-between; min-height: 39px; font-size: 11px; cursor: pointer; }
.studio-switch input { position: absolute; right: 0; width: 38px; height: 24px; opacity: 0; cursor: pointer; }
.studio-switch-track { position: relative; display: block; width: 34px; height: 20px; border-radius: 30px; background: #dddeda; transition: background 150ms ease; pointer-events: none; }
.studio-switch-track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px #0002; transition: transform 150ms ease; }
.studio-switch input:checked + .studio-switch-track { background: var(--studio-green); }
.studio-switch input:checked + .studio-switch-track::after { transform: translateX(14px); }
.studio-switch input:focus-visible + .studio-switch-track { outline: 3px solid #768fce; outline-offset: 3px; }
.studio-footer { flex-shrink: 0; padding: 14px 20px 15px; border-top: 1px solid var(--studio-border); background: #fbfcf6; }
.studio-actions { display: flex; align-items: center; gap: 9px; }
.studio-reset, .studio-copy { min-height: 40px; padding: 8px 15px; border-radius: 8px; font-size: 11px !important; font-weight: 600 !important; }
.studio-reset { border: 1px solid #dcdfd4; background: transparent; }
.studio-reset:hover { background: #eaeee3; }
.studio-copy { display: flex; justify-content: space-between; align-items: center; flex: 1; gap: 14px; border: 1px solid #283325; background: #283325; color: #fff !important; }
.studio-copy:hover { background: #40523a; }
.studio-copy span { font-size: 17px; line-height: 1; }
.studio-status { min-height: 14px; margin: 10px 0 0; color: var(--studio-muted); font-size: 9px; line-height: 1.5; text-align: center; }
.studio-link-fallback { width: 100%; margin-top: 9px; padding: 8px; border: 1px solid var(--studio-border); border-radius: 6px; background: #fff; color: var(--studio-ink); font-size: 11px !important; }

@media (max-width: 480px) {
  .aspire-studio { right: max(14px, env(safe-area-inset-right)); bottom: max(14px, env(safe-area-inset-bottom)); }
  .studio-panel { width: 342px; max-width: calc(100vw - 28px); max-height: calc(100dvh - 92px); border-radius: 17px; }
  .studio-header { padding: 19px 16px 17px 18px; }
  .studio-body { padding-right: 18px; padding-left: 18px; }
  .studio-playback { margin-right: 17px; margin-left: 17px; }
  .studio-footer { padding: 12px 17px; }
  .studio-launcher { min-height: 42px; padding: 9px 14px 9px 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .aspire-studio *, .aspire-studio *::before, .aspire-studio *::after { transition: none !important; }
}
