/* aimagic studio */
:root {
  color-scheme: light;
  --ink: #222435;
  --muted: #5e6577;
  --line: #e0e3ed;
  --accent: #5744a6;
  --active: #efedfb;
  --page: #f8f9fc;
  font:
    100%/1.5 "Inter",
    "Microsoft YaHei UI",
    system-ui,
    sans-serif;
  color: var(--ink);
  background: var(--page);
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input {
  font: inherit;
}
button {
  cursor: pointer;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
canvas:focus-visible {
  outline: 3px solid #8170c6;
  outline-offset: 3px;
}
h1,
h2,
h3,
p,
figure {
  margin: 0;
}
.icon {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.65;
}
.icon-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.skip {
  position: absolute;
  left: 1rem;
  top: -5rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  background: white;
}
.skip:focus {
  top: 0.5rem;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  font-size: 1.55rem;
  line-height: 1;
  letter-spacing: -0.07em;
  font-weight: 770;
}
.spark {
  width: 35px;
  height: 35px;
  flex: none;
  background: url("/assets/aimagic.png?v=prism2") center / cover;
  border-radius: 11px;
}
.workspace {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  min-height: 100svh;
}
.rail {
  position: sticky;
  top: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 0 16px 18px;
  background: white;
  border-right: 1px solid var(--line);
}
.brand-row {
  display: flex;
  align-items: center;
  min-height: 80px;
  padding: 0 11px;
}
#workspace-nav {
  display: flex;
  flex-direction: column;
  gap: 27px;
  flex: 1;
  padding-top: 18px;
  overflow-y: auto;
}
.nav-group {
  display: grid;
  gap: 4px;
}
.nav-group p {
  color: var(--muted);
  font-size: 0.78rem;
  margin: 0 12px 5px;
}
.nav-group a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 8px;
  color: #465063;
  font-size: 0.91rem;
  font-weight: 530;
}
.nav-group a .icon {
  color: #74769a;
}
.nav-group a[aria-current] .icon {
  color: #7560b1;
}
.nav-group a:hover {
  background: #f4f4f9;
}
.nav-group a[aria-current] {
  color: var(--accent);
  background: var(--active);
  font-weight: 680;
}
.nav-foot {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.mobile-menu {
  display: none;
}
.top,
.mast {
  border-bottom: 1px solid var(--line);
  background: white;
}
.top-inner,
.content {
  max-width: 1320px;
  padding-inline: clamp(22px, 3.6vw, 62px);
  margin-inline: auto;
}
.top-inner,
.bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 64px;
  gap: 12px;
}
.crumb {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 0.875rem;
  color: var(--muted);
}
.crumb .icon {
  width: 16px;
  height: 16px;
}
.crumb span {
  color: #a9afbc;
}
.crumb strong {
  font-weight: 600;
  color: var(--ink);
}
.console,
.primary,
.secondary,
.mobile-menu {
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid #d6d9e3;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
}
.console,
.primary,
.secondary {
  display: inline-flex;
}
.console:hover,
.secondary:hover,
.mobile-menu:hover {
  border-color: #aaa3c4;
  background: #faf9ff;
}
.console .icon {
  width: 16px;
  height: 16px;
}
.content {
  padding-block: clamp(22px, 2.6vw, 42px) 24px;
}
.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.98fr);
  min-height: 255px;
  overflow: hidden;
  border: 1px solid #dcdbee;
  border-radius: 18px;
  background: linear-gradient(108deg, #f8f6ff 8%, #efeefa 55%, #e6e8f6);
}
.hero-copy {
  align-self: center;
  padding: clamp(25px, 2.8vw, 44px);
  padding-right: 0;
}
.hero h1 {
  font-size: clamp(2.15rem, 3.35vw, 3.75rem);
  line-height: 1.17;
  letter-spacing: -0.05em;
  font-weight: 720;
  color: #28253f;
}
.hero-copy p {
  color: #55556c;
  font-size: 1rem;
  line-height: 1.75;
  margin-top: 13px;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 22px;
}
.actions a {
  min-height: 40px;
}
.primary {
  color: white;
  background: #564497;
  border-color: #564497;
}
.primary:hover {
  background: #43327f;
  border-color: #43327f;
}
.secondary {
  background: #ffffffc9;
}
.spectral {
  position: relative;
  display: grid;
  min-width: 0;
  overflow: hidden;
  background-image: radial-gradient(#878aad45 0.85px, transparent 0.95px);
  background-size: 15px 15px;
  mask-image: linear-gradient(90deg, transparent, black 13%);
}
.spectral canvas {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: pan-y;
}
.spectral canvas:active {
  cursor: grabbing;
}
.spectral canvas:focus-visible {
  outline-offset: -4px;
}
.spectral figcaption {
  position: absolute;
  bottom: 11px;
  right: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #5c5875;
}
.gesture {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  background: #f0eff9d9;
  border-radius: 5px;
  padding: 2px 5px;
}
.gesture .icon {
  width: 13px;
  height: 13px;
}
.motion {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid #c9c7d9;
  background: #fffffff2;
  color: #4c4665;
}
.motion .icon {
  width: 15px;
  height: 15px;
}
.tools,
.connect {
  margin-top: clamp(24px, 2.1vw, 36px);
}
.content h2 {
  font-size: 1.22rem;
  letter-spacing: -0.035em;
  font-weight: 680;
  margin-bottom: 12px;
}
.tools-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.tool-card {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.1vw, 17px);
  padding: 19px clamp(12px, 1.4vw, 23px);
  border: 1px solid var(--line);
  border-radius: 13px;
  background: white;
  transition:
    border-color 0.18s,
    box-shadow 0.18s;
}
.tool-card:hover {
  border-color: #b9afd9;
  box-shadow: 0 3px 15px #3a31630b;
}
.tool-icon {
  width: 39px;
  height: 39px;
  border-radius: 12px;
  flex: none;
  display: grid;
  place-items: center;
}
.tool-icon .icon {
  width: 21px;
  height: 21px;
}
.key .tool-icon {
  color: #7966ad;
  background: #f2eefb;
  border: 1px solid #e3dcf1;
}
.usage .tool-icon {
  color: #507a8a;
  background: #eaf4f8;
  border: 1px solid #d7e8ee;
}

.tool-card h3 {
  font-size: 1rem;
  font-weight: 650;
}
.tool-card p,
.config p {
  color: var(--muted);
  font-size: 0.83rem;
  line-height: 1.65;
  margin-top: 3px;
}
.bench {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.25fr);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: white;
}
.config {
  padding: clamp(16px, 1.75vw, 26px);
}
.config label {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 6px;
  font-size: 0.875rem;
  font-weight: 630;
}
.config label:not(:first-child) {
  margin-top: 15px;
}
.config label small {
  font:
    0.75rem/1.2 "IBM Plex Mono",
    Consolas,
    monospace;
  color: var(--muted);
}
.config input {
  width: 100%;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid #d8dce6;
  border-radius: 7px;
  color: #393850;
  font:
    0.85rem/1.55 "IBM Plex Mono",
    Consolas,
    monospace;
}
.config p {
  margin-top: 9px;
}
.field {
  display: flex;
  align-items: center;
  border: 1px solid #d8dce6;
  background: #fafbfe;
  border-radius: 7px;
  padding-right: 3px;
}
.field input {
  border: 0;
  background: transparent;
}
.field button,
.editor-head button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 5px 9px;
  border: 0;
  border-radius: 5px;
  color: var(--muted);
  background: transparent;
  font: inherit;
}
.field button:hover,
.editor-head button:hover {
  background: #eae9f3;
  color: var(--ink);
}
.field .icon,
.copy-code .icon {
  width: 15px;
  height: 15px;
}
.editor {
  border-left: 1px solid var(--line);
  background: #f4f5fa;
  min-width: 0;
}
.editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 12px 14px 10px;
  border-bottom: 1px solid #dfe2ec;
  font:
    0.825rem/1.4 "IBM Plex Mono",
    Consolas,
    monospace;
}
#langs {
  display: flex;
  gap: 2px;
}
#langs [aria-pressed="true"] {
  background: white;
  color: #4a397f;
  box-shadow: 0 0 0 1px #d8d5e7;
}
.editor pre {
  margin: 0;
  padding: 16px 20px 22px;
  overflow: auto;
  color: #444663;
  font:
    0.83rem/1.8 "IBM Plex Mono",
    Consolas,
    monospace;
  tab-size: 2;
}
.editor code {
  font: inherit;
}
.workspace-footer,
footer.frame {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 24px;
  border-top: 1px solid var(--line);
  padding-top: 15px;
  font-size: 0.8rem;
  color: var(--muted);
}
.toast:not(:empty) {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 8;
  transform: translateX(-50%);
  background: #303048;
  color: white;
  border-radius: 8px;
  padding: 8px 15px;
}
.frame {
  width: min(1040px, calc(100% - 40px));
  margin-inline: auto;
}
footer.frame {
  margin-bottom: 24px;
}
@media (max-width: 1080px) {
  .workspace {
    grid-template-columns: 190px minmax(0, 1fr);
  }
  .tool-card {
    align-items: flex-start;
    flex-direction: column;
  }
}
@media (max-width: 780px) {
  .workspace {
    display: block;
  }
  .rail {
    position: static;
    height: auto;
    padding: 0;
    border: 0;
    border-bottom: 1px solid var(--line);
  }
  .brand-row,
  .top-inner {
    padding-inline: 20px;
  }
  .brand-row {
    min-height: 58px;
    justify-content: space-between;
  }
  .mobile-menu {
    display: inline-flex;
    font-size: 0.84rem;
    padding: 6px 10px;
  }
  #workspace-nav {
    display: none;
    gap: 10px;
    padding: 12px 18px 16px;
  }
  .rail.is-open #workspace-nav {
    display: flex;
  }
  .nav-foot {
    padding-top: 8px;
  }
  .top-inner {
    min-height: 50px;
  }
  .console {
    padding: 5px 10px;
  }
  .tool-card {
    flex-direction: row;
    align-items: center;
  }
}
@media (max-width: 640px) {
  .content {
    padding: 16px 14px 24px;
  }
  .hero {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
  }
  .hero-copy {
    padding: 22px 22px 0;
  }
  .hero h1 {
    font-size: 2.15rem;
  }
  .hero-copy p {
    margin-top: 8px;
    font-size: 0.94rem;
  }
  .hero-copy br {
    display: none;
  }
  .actions {
    margin-top: 15px;
  }
  .spectral {
    height: 145px;
    mask-image: linear-gradient(180deg, transparent, black 20%);
  }
  .tools-grid {
    grid-template-columns: 1fr;
    gap: 7px;
  }
  .tool-card {
    padding: 11px 13px;
    gap: 12px;
  }
  .tool-card p {
    margin: 0;
  }
  .bench {
    grid-template-columns: minmax(0, 1fr);
  }
  .editor {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .editor-head {
    padding-inline: 9px;
  }
  .editor pre {
    padding-inline: 14px;
  }
  .workspace-footer {
    justify-content: flex-start;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0s !important;
  }
}
.scope-note {
  margin: 10px 2px 0;
  font-size: 0.79rem;
  line-height: 1.6;
  color: var(--muted);
}
.scope-note a {
  margin-inline-start: 0.4em;
}
