/* The guide shares the studio's circular transport language and electric-blue accent. */
.studio-guide-launcher,
.studio-guide-dialog {
  --guide-blue: #0066ff;
  --guide-ink: #080808;
  --guide-surface: #101010;
  --guide-line: #323232;
  --guide-muted: #a6a6a6;
  box-sizing: border-box;
  color: #f5f5f5;
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.studio-guide-launcher {
  position: fixed;
  z-index: 35;
  right: 56px;
  bottom: 230px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 15px;
  border: 1px solid #6a6a6a;
  border-radius: 999px;
  background: #080808ed;
  box-shadow: 0 8px 30px #0003;
  color: #fff;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 10px;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.studio-guide-launcher:hover { border-color: var(--guide-blue); background: #161616; }
.studio-guide-launcher:focus-visible,
.studio-guide-dialog :focus-visible { outline: 2px solid var(--guide-blue); outline-offset: 4px; }
.studio-guide-symbol {
  position: relative;
  display: block;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  border: 1px solid #7d7d7d;
  border-radius: 50%;
}
.studio-guide-symbol::before,
.studio-guide-symbol::after { content: ''; position: absolute; background: var(--guide-blue); }
.studio-guide-symbol::before { width: 4px; height: 4px; border-radius: 50%; left: 5px; top: 5px; }
.studio-guide-symbol::after { width: 6px; height: 1px; left: 6px; top: 4px; transform: rotate(-45deg); transform-origin: left center; }
body:not(.studio-guide-film) .studio-guide-launcher {
  width: 80px;
  height: 80px;
  min-height: 80px;
  padding: 12px;
  right: max(24px, env(safe-area-inset-right, 0px));
  bottom: max(24px, env(safe-area-inset-bottom, 0px));
  flex-direction: column;
  gap: 6px;
  border-color: #4a4a4a;
  border-radius: 50%;
  background: #080808;
  isolation: isolate;
}
body:not(.studio-guide-film) .studio-guide-launcher::before {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: repeating-conic-gradient(from -90deg, #797979 0deg 1deg, transparent 1deg 15deg);
  mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 4px));
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 4px));
  pointer-events: none;
}
body:not(.studio-guide-film) .studio-guide-launcher::after {
  content: '';
  position: absolute;
  width: 6px;
  height: 6px;
  right: 12px;
  top: 12px;
  border-radius: 50%;
  background: var(--guide-blue);
  box-shadow: 0 0 0 4px #080808;
}
body:not(.studio-guide-film) .studio-guide-launcher:hover { border-color: var(--guide-blue); }
.studio-guide-dialog {
  position: fixed;
  inset: auto max(24px, env(safe-area-inset-right, 0px)) max(24px, env(safe-area-inset-bottom, 0px)) auto;
  width: min(470px, calc(100vw - 32px));
  height: min(710px, calc(100dvh - 48px));
  max-height: calc(100dvh - 32px);
  max-width: none;
  margin: 0;
  padding: 0;
  border: 1px solid #545454;
  border-radius: 24px;
  background: var(--guide-ink);
  box-shadow: 0 24px 100px #0009;
  overflow: hidden;
  color-scheme: dark;
}
.studio-guide-dialog::backdrop { background: #0009; }
.studio-guide-dialog[open] { display: flex; flex-direction: column; }
.studio-guide-dialog[hidden] { display: none !important; }
.studio-guide-dialog * { box-sizing: border-box; }
.studio-guide-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
  padding: 22px 21px;
  border-bottom: 1px solid var(--guide-line);
  background: var(--guide-ink);
}
.studio-guide-heading { display: flex; align-items: center; gap: 15px; min-width: 0; }
.studio-guide-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  flex-shrink: 0;
  border: 1px solid #535353;
  border-radius: 50%;
  color: var(--guide-blue);
  isolation: isolate;
}
.studio-guide-mark::before {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: repeating-conic-gradient(from -90deg, #929292 0deg 1.5deg, transparent 1.5deg 12deg);
  mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 5px));
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 5px));
}
.studio-guide-mark::after {
  content: '';
  position: absolute;
  inset: 13px;
  border: 1px solid #414141;
  border-top-color: var(--guide-blue);
  border-right-color: var(--guide-blue);
  border-radius: 50%;
  transform: rotate(-45deg);
}
.studio-guide-mark-core {
  width: 10px;
  height: 10px;
  border: 1px solid var(--guide-blue);
  border-radius: 50%;
  background: var(--guide-blue);
  box-shadow: 0 0 18px #0066ff4d;
}
.studio-guide-eyebrow {
  margin: 0 0 6px;
  color: #999;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 8px;
  line-height: 1.4;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.studio-guide-heading h2 { margin: 0; color: #fff; font-size: 20px; font-weight: 500; line-height: 1.2; letter-spacing: -.035em; }
.studio-guide-mode { display: block; margin-top: 7px; color: #aaa; font-size: 10px; line-height: 1.4; }
.studio-guide-close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  padding: 0;
  border: 1px solid #3f3f3f;
  border-radius: 50%;
  background: transparent;
  color: #ddd;
  font-size: 24px;
  font-weight: 300;
  cursor: pointer;
}
.studio-guide-close:hover { border-color: #fff; background: #191919; color: #fff; }
.studio-guide-log {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 25px 24px 15px;
  scrollbar-width: thin;
  scrollbar-color: #494949 var(--guide-ink);
}
.studio-guide-message { max-width: 100%; margin: 0 0 24px; font-size: 14px; line-height: 1.65; overflow-wrap: anywhere; }
.studio-guide-message-label { display: flex; align-items: center; gap: 7px; margin-bottom: 9px; color: #a6a6a6; font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 9px; letter-spacing: .1em; line-height: 1.5; text-transform: uppercase; }
.studio-guide-message-label::before { content: ''; width: 5px; height: 5px; flex-shrink: 0; border: 1px solid #929292; border-radius: 50%; }
.studio-guide-message.assistant .studio-guide-message-label::before { border-color: var(--guide-blue); background: var(--guide-blue); }
.studio-guide-message p { margin: 0; white-space: pre-wrap; color: #e3e3e3; }
.studio-guide-message.user { margin-left: 25px; padding: 15px 18px; border: 1px solid #454545; border-radius: 18px 18px 3px 18px; background: #151515; }
.studio-guide-message.user p { color: #fff; }
.studio-guide-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 15px; }
.studio-guide-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 10px 15px; border: 1px solid #494949; border-radius: 999px; background: transparent; color: #eee; font-size: 12px; line-height: 1.4; text-decoration: none; }
.studio-guide-link:hover { border-color: var(--guide-blue); background: #0066ff1a; color: #fff; }
.studio-guide-starters { display: flex; flex-direction: column; align-items: stretch; gap: 8px; margin: 25px 0 10px; }
.studio-guide-starters > p { margin: 0 0 5px; font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 9px; line-height: 1.5; letter-spacing: .1em; text-transform: uppercase; color: #a6a6a6; }
.studio-guide-suggestion {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 7px 14px 7px 7px;
  border: 1px solid #414141;
  border-radius: 999px;
  background: transparent;
  color: #ddd;
  font: inherit;
  font-size: 13px;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.studio-guide-suggestion-index { display: grid; place-items: center; width: 32px; height: 32px; flex-shrink: 0; border: 1px solid #3e3e3e; border-radius: 50%; font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 9px; color: #a6a6a6; }
.studio-guide-suggestion-label { flex: 1; }
.studio-guide-suggestion-arrow { font-size: 16px; color: #aaa; }
.studio-guide-suggestion:hover { border-color: var(--guide-blue); background: #0066ff14; }
.studio-guide-suggestion:hover .studio-guide-suggestion-index { border-color: var(--guide-blue); color: #fff; }
.studio-guide-suggestion:disabled { opacity: .5; cursor: default; }
.studio-guide-compose { flex-shrink: 0; padding: 18px 22px 8px; border-top: 1px solid var(--guide-line); background: var(--guide-surface); }
.studio-guide-input-label { display: block; margin-bottom: 10px; color: #a6a6a6; font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 9px; letter-spacing: .07em; text-transform: uppercase; }
.studio-guide-input-row { display: flex; align-items: flex-end; gap: 9px; }
.studio-guide-input { display: block; width: 100%; min-width: 0; height: 48px; min-height: 48px; max-height: 112px; resize: none; padding: 13px 16px; border: 1px solid #555; border-radius: 24px; background: #080808; color: #fff; font: inherit; font-size: 16px; line-height: 1.4; }
.studio-guide-input::placeholder { color: #9a9a9a; }
.studio-guide-send { display: grid; place-items: center; width: 48px; height: 48px; flex-shrink: 0; padding: 0; border: 1px solid var(--guide-blue); border-radius: 50%; background: var(--guide-blue); color: #fff; font-size: 24px; cursor: pointer; }
.studio-guide-send:hover:not(:disabled) { background: #fff; border-color: #fff; color: #080808; }
.studio-guide-send:disabled { opacity: .4; cursor: default; }
.studio-guide-status { min-height: 15px; margin: 8px 0 0; color: #aaa; font-size: 11px; line-height: 1.5; }
.studio-guide-status.error { color: #fff; }
.studio-guide-footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px 12px; flex-shrink: 0; padding: 0 22px 17px; background: var(--guide-surface); }
.studio-guide-footer p { flex: 1 1 160px; max-width: none; margin: 0; color: #a6a6a6; font-size: 10px; line-height: 1.5; }
.studio-guide-footer p a { color: #ccc; text-decoration: underline; text-underline-offset: 2px; }
.studio-guide-footer p a:hover { color: #fff; }
.studio-guide-contact { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; color: #eee; font-size: 11px; text-decoration: none; white-space: nowrap; }
.studio-guide-contact-arrow { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid #555; border-radius: 50%; color: #fff; font-size: 15px; }
.studio-guide-contact:hover .studio-guide-contact-arrow { border-color: var(--guide-blue); background: var(--guide-blue); }
.studio-guide-footer .studio-guide-contact[hidden] { display: none; }
.studio-guide-dialog button:disabled { cursor: default; }
.studio-guide-dialog[aria-busy=true] .studio-guide-input { opacity: .8; }
.studio-guide-dialog[aria-busy=true] .studio-guide-mark::after { animation: studio-guide-dial 2s linear infinite; }
@keyframes studio-guide-dial { to { transform: rotate(315deg); } }
@media (max-width: 820px) {
  /* Preserve the film's three 88px controls and its safe-area transport position. */
  body.studio-guide-film #playBtn,
  body.studio-guide-film #soundBtn,
  body.studio-guide-film .studio-guide-launcher { width: 88px; min-height: 44px; padding: 10px 8px; gap: 6px; font-size: 9px; letter-spacing: .06em; right: auto; bottom: calc(122px + env(safe-area-inset-bottom, 0px)); }
  body.studio-guide-film #playBtn { left: calc(50% - 142px); }
  body.studio-guide-film #soundBtn { left: calc(50% - 44px); }
  body.studio-guide-film .studio-guide-launcher { left: calc(50% + 54px); }
  body:not(.studio-guide-film) .studio-guide-launcher { width: 72px; height: 72px; min-height: 72px; right: max(16px, env(safe-area-inset-right, 0px)); bottom: max(16px, env(safe-area-inset-bottom, 0px)); }
  .studio-guide-dialog { width: calc(100vw - 24px); right: 12px; bottom: max(12px, env(safe-area-inset-bottom, 0px)); height: min(710px, calc(100dvh - 24px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px))); max-height: calc(100dvh - 24px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); border-radius: 22px; }
  .studio-guide-header { padding: 16px; gap: 8px; }
  .studio-guide-heading { gap: 11px; }
  .studio-guide-mark { width: 54px; height: 54px; }
  .studio-guide-heading h2 { font-size: 18px; }
  .studio-guide-eyebrow { font-size: 7px; }
  .studio-guide-mode { font-size: 9px; }
  .studio-guide-log { padding: 22px 17px 12px; }
  .studio-guide-message { font-size: 14px; }
  .studio-guide-compose { padding: 15px 15px 7px; }
  .studio-guide-input { font-size: 16px; }
  .studio-guide-footer { padding: 0 15px 13px; }
}
@media (max-width: 820px) and (max-height: 680px) {
  body.studio-guide-film #playBtn,
  body.studio-guide-film #soundBtn,
  body.studio-guide-film .studio-guide-launcher { bottom: calc(112px + env(safe-area-inset-bottom, 0px)); }
  .studio-guide-dialog { height: calc(100dvh - 24px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); }
  .studio-guide-header { padding: 12px 13px; }
  .studio-guide-mark { width: 46px; height: 46px; }
  .studio-guide-eyebrow { display: none; }
  .studio-guide-log { padding: 18px 15px 8px; }
  .studio-guide-compose { padding: 12px 13px 6px; }
  .studio-guide-starters { margin-top: 20px; }
  .studio-guide-message { margin-bottom: 20px; }
}
@media (max-width: 1000px) and (max-height: 540px) and (orientation: landscape) {
  body.studio-guide-film #playBtn,
  body.studio-guide-film #soundBtn,
  body.studio-guide-film .studio-guide-launcher { width: 88px; min-height: 44px; padding: 10px 8px; gap: 6px; font-size: 9px; letter-spacing: .06em; right: auto; bottom: calc(94px + env(safe-area-inset-bottom, 0px)); }
  body.studio-guide-film #playBtn { left: calc(50% - 142px); }
  body.studio-guide-film #soundBtn { left: calc(50% - 44px); }
  body.studio-guide-film .studio-guide-launcher { left: calc(50% + 54px); }
  .studio-guide-dialog { height: calc(100dvh - 24px); bottom: 12px; }
  .studio-guide-header { padding: 8px 14px; }
  .studio-guide-mark { width: 38px; height: 38px; }
  .studio-guide-eyebrow { display: none; }
  .studio-guide-heading h2 { font-size: 16px; }
  .studio-guide-mode { margin-top: 4px; }
  .studio-guide-log { padding: 14px 16px 6px; }
  .studio-guide-compose { padding: 9px 14px 5px; }
  .studio-guide-input-label { margin-bottom: 6px; }
  .studio-guide-footer { padding-bottom: 7px; }
}
@media (prefers-reduced-motion: reduce) {
  .studio-guide-launcher,
  .studio-guide-dialog * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
  .studio-guide-dialog .studio-guide-mark::after { animation: none; }
}
