* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  --oa-bg: #ffffff;
  --oa-surface: #ffffff;
  --oa-soft: #f4f5f6;
  --oa-raised: #f8f9fa;
  --oa-text: #101111;
  --oa-muted: #6d777c;
  --oa-line: #dadee1;
  --oa-line-strong: #cbd1d5;
  --oa-button: #101111;
  --oa-button-text: #ffffff;
  --oa-yellow: #ffd600;
  --oa-yellow-hover: #ffe14a;
  --oa-gray-900: #101111;
  --oa-gray-700: #393c4e;
  color-scheme: light dark;
  margin: 0;
  background: var(--oa-bg);
  color: var(--oa-text);
  font-family: Inter, "Noto Sans CJK SC", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

button,
select,
textarea {
  font: inherit;
}

.oa-app {
  min-height: 100vh;
}

.oa-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: auto auto;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 78px;
  background: color-mix(in srgb, var(--oa-bg) 96%, transparent);
  backdrop-filter: blur(18px);
}

.oa-brand {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  font-weight: 650;
  white-space: nowrap;
}

.oa-brand-mark {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: var(--oa-gray-900);
}

.oa-brand-mark svg {
  width: 26px;
  height: 20px;
}

.md-frame {
  fill: var(--oa-yellow);
}

.md-glyph {
  fill: var(--oa-gray-900);
}

.oa-nav-actions {
  display: flex;
  align-items: center;
}

.oa-theme-toggle {
  position: relative;
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--oa-yellow);
  color: var(--oa-gray-900);
  cursor: pointer;
}

.oa-theme-toggle svg {
  position: absolute;
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  transition: opacity 160ms ease, transform 160ms ease;
}

.oa-theme-toggle:hover {
  background: var(--oa-yellow-hover);
}

.oa-theme-moon {
  opacity: 0;
  transform: scale(0.72);
}

.oa-main {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 20px 0 64px;
}

.oa-site-footer {
  border-top: 1px solid var(--oa-line);
  background: var(--oa-soft);
}

.oa-site-footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  gap: 32px;
  padding: 48px 0;
}

.oa-site-footer-brand {
  color: var(--oa-text);
  font-size: 22px;
  font-weight: 680;
  letter-spacing: -0.03em;
  line-height: 1.25;
  text-decoration: none;
}

.oa-site-footer-description {
  max-width: 560px;
  margin: 14px 0 0;
  color: var(--oa-muted);
  font-size: 14px;
  line-height: 1.9;
}

.oa-site-footer-operator {
  margin: 8px 0 0;
  color: var(--oa-muted);
  font-size: 13px;
  line-height: 1.7;
}

.oa-site-footer-operator a {
  color: var(--oa-text);
  font-weight: 650;
  text-decoration-color: color-mix(in srgb, var(--oa-text) 35%, transparent);
  text-underline-offset: 0.22em;
}

.oa-site-footer-operator a:hover {
  text-decoration-color: currentColor;
}

.oa-site-footer-copyright {
  margin: 0;
  align-self: end;
  color: var(--oa-muted);
  font-size: 12px;
}

.oa-hero {
  position: relative;
  display: grid;
  min-height: clamp(360px, 48vh, 520px);
  align-content: center;
  justify-items: center;
  overflow: hidden;
  padding: 46px 0 54px;
  text-align: center;
  isolation: isolate;
}

.oa-hero::after {
  position: absolute;
  inset: auto 0 0;
  z-index: 0;
  height: 36%;
  background: linear-gradient(180deg, transparent, var(--oa-bg) 72%);
  content: "";
  pointer-events: none;
}

.oa-hero-field {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.oa-hero-copy {
  position: relative;
  z-index: 1;
}

.oa-hero h1 {
  max-width: 980px;
  margin: 0 auto;
  color: var(--oa-text);
  font-size: clamp(56px, 8vw, 108px);
  font-weight: 680;
  line-height: 0.92;
}

.oa-hero-copy > p:last-child {
  max-width: 520px;
  margin: 22px auto 0;
  color: var(--oa-gray-700);
  font-size: 18px;
  line-height: 1.55;
}

.oa-workspace {
  scroll-margin-top: 86px;
}

.oa-panel {
  min-width: 0;
  overflow: hidden;
  border: 0;
  border-radius: 20px;
  background: var(--oa-surface);
  box-shadow: 0 0 0 1px var(--oa-line) inset;
}

.oa-step {
  display: none;
}

.oa-step.is-active {
  display: block;
}

.oa-panel-header {
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--oa-line);
  background: var(--oa-surface);
}

.oa-output-header {
  align-items: flex-end;
}

.oa-panel-header h2 {
  margin: 0;
  color: var(--oa-text);
  font-size: 22px;
  font-weight: 660;
}

.oa-panel-header p {
  margin: 5px 0 0;
  color: var(--oa-muted);
  font-size: 12px;
  line-height: 1.5;
}

.oa-panel-tools,
.oa-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.oa-button,
.oa-small-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--oa-yellow);
  border-radius: 100px;
  background: var(--oa-yellow);
  color: var(--oa-gray-900);
  padding: 0 18px;
  font-size: 14px;
  font-weight: 560;
  cursor: pointer;
  white-space: nowrap;
}

.oa-button-secondary,
.oa-small-button {
  border-color: var(--oa-line-strong);
  background: transparent;
  color: var(--oa-text);
}

.oa-small-button-primary {
  border-color: var(--oa-yellow);
  background: var(--oa-yellow);
  color: var(--oa-gray-900);
}

.oa-small-button {
  min-height: 36px;
  padding: 0 14px;
  font-size: 13px;
}

#oa-editor {
  display: block;
  width: 100%;
  height: min(720px, calc(100vh - 330px));
  min-height: 430px;
  resize: none;
  border: 0;
  outline: 0;
  padding: 24px;
  background: var(--oa-raised);
  color: var(--oa-text);
  font: 14px/1.82 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

#oa-editor::placeholder {
  color: var(--oa-muted);
}

#oa-editor:focus {
  background: var(--oa-surface);
  box-shadow: inset 0 0 0 2px rgba(255, 214, 0, 0.42);
}

.oa-controls label {
  display: grid;
  gap: 5px;
  color: var(--oa-muted);
  font-size: 11px;
  line-height: 1;
}

.oa-control-large select {
  min-width: 150px;
}

.oa-controls select {
  height: 36px;
  min-width: 96px;
  border: 1px solid var(--oa-line-strong);
  border-radius: 100px;
  background: var(--oa-surface);
  color: var(--oa-text);
  padding: 0 28px 0 10px;
  font-size: 13px;
}

.oa-preview-shell {
  height: min(760px, calc(100vh - 250px));
  min-height: 500px;
  overflow: auto;
  padding: 26px 12px 32px;
  background: var(--oa-soft);
}

.oa-phone {
  width: min(390px, 100%);
  min-height: 620px;
  margin: 0 auto;
  border: 1px solid var(--oa-line);
  border-radius: 20px;
  background: #ffffff;
  color: #111111;
  box-shadow: none;
}

.oa-preview {
  padding: 22px 18px 34px;
}

.oa-step-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--oa-line);
}

.oa-output-footer {
  position: sticky;
  bottom: 0;
  background: color-mix(in srgb, var(--oa-bg) 94%, transparent);
  backdrop-filter: blur(16px);
}

.oa-toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
  transform: translateY(14px);
  border: 1px solid var(--oa-gray-900);
  border-radius: 100px;
  background: var(--oa-yellow);
  color: var(--oa-text);
  padding: 11px 16px;
  box-shadow: none;
  font-size: 14px;
  font-weight: 650;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
  backdrop-filter: blur(16px);
}

.oa-toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.oa-empty-preview {
  display: grid;
  min-height: 360px;
  place-items: center;
  padding: 28px;
  color: #777777;
  font-size: 14px;
  line-height: 1.8;
  text-align: center;
}

.oa-preview img {
  max-width: 100%;
}

@media (prefers-color-scheme: dark) {
  body {
    --oa-bg: #000000;
    --oa-surface: #101111;
    --oa-soft: #17191a;
    --oa-raised: #151718;
    --oa-text: #ffffff;
    --oa-muted: #9c9da7;
    --oa-line: #2d3133;
    --oa-line-strong: #393c4e;
    --oa-button: #ffffff;
    --oa-button-text: #101111;
    --oa-gray-700: #dadee1;
    --oa-preview-bg: #101111;
    --oa-preview-text: #f4f4f4;
  }

  .oa-brand-mark {
    background: #101111;
  }

  .oa-phone {
    border-color: #2d3133;
  }

  .oa-theme-sun {
    opacity: 0;
    transform: scale(0.72);
  }

  .oa-theme-moon {
    opacity: 1;
    transform: scale(1);
  }

}

html[data-theme="light"] body {
  --oa-bg: #ffffff;
  --oa-surface: #ffffff;
  --oa-soft: #f0f1f2;
  --oa-raised: #f7f8f8;
  --oa-text: #101111;
  --oa-muted: #6d777c;
  --oa-line: #dadee1;
  --oa-line-strong: #cbd1d5;
  --oa-gray-700: #393c4e;
  --oa-preview-bg: #ffffff;
  --oa-preview-text: #111111;
  color-scheme: light;
}

html[data-theme="light"] .oa-theme-sun {
  opacity: 1;
  transform: scale(1);
}

html[data-theme="light"] .oa-theme-moon {
  opacity: 0;
  transform: scale(0.72);
}

html[data-theme="dark"] body {
  --oa-bg: #000000;
  --oa-surface: #101111;
  --oa-soft: #17191a;
  --oa-raised: #151718;
  --oa-text: #ffffff;
  --oa-muted: #9c9da7;
  --oa-line: #2d3133;
  --oa-line-strong: #393c4e;
  --oa-gray-700: #dadee1;
  --oa-preview-bg: #101111;
  --oa-preview-text: #f4f4f4;
  color-scheme: dark;
}

html[data-theme="dark"] .oa-theme-sun {
  opacity: 0;
  transform: scale(0.72);
}

html[data-theme="dark"] .oa-theme-moon {
  opacity: 1;
  transform: scale(1);
}

html[data-theme="dark"] .oa-phone .oa-empty-preview {
  color: #777777;
}

html[data-theme="dark"] .oa-empty-preview {
  color: #9c9da7;
}

@media (max-width: 900px) {
  .oa-site-footer-inner {
    grid-template-columns: 1fr;
  }

  .oa-hero {
    min-height: auto;
    padding: 34px 0 26px;
    text-align: center;
  }

  .oa-hero h1 {
    font-size: 56px;
    margin: 0 auto;
  }

  .oa-hero-copy > p:last-child {
    margin-right: auto;
    margin-left: auto;
  }
}

@media (max-width: 640px) {
  .oa-topbar {
    min-height: 58px;
    padding: 0 12px;
    gap: 12px;
  }

  .oa-brand {
    gap: 9px;
    font-size: 14px;
  }

  .oa-brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 12px;
  }

  .oa-theme-toggle {
    width: 38px;
    height: 38px;
  }

  .oa-main {
    width: min(100% - 16px, 1120px);
    padding-top: 0;
    padding-bottom: 28px;
  }

  .oa-site-footer-inner {
    width: min(100% - 28px, 1180px);
    padding: 40px 0;
  }

  .oa-workspace {
    scroll-margin-top: 66px;
  }

  .oa-hero h1 {
    font-size: 30px;
    line-height: 0.96;
  }

  .oa-hero-copy > p:last-child {
    display: none;
  }

  .oa-hero {
    min-height: 118px;
    padding: 12px 0;
  }

  .oa-hero-field {
    opacity: 0.72;
  }

  .oa-panel-header,
  .oa-output-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .oa-panel-tools,
  .oa-controls,
  .oa-controls label {
    width: 100%;
  }

  .oa-panel-tools {
    display: grid;
    grid-template-columns: 1fr 1fr 1.1fr;
    gap: 8px;
  }

  .oa-controls {
    display: grid;
    grid-template-columns: 1.25fr 1fr 0.7fr;
    gap: 8px;
  }

  .oa-controls select,
  .oa-control-large select {
    width: 100%;
    min-width: 0;
  }

  #oa-editor {
    height: calc(100dvh - 194px);
    min-height: 520px;
    padding: 16px;
    font-size: 16px;
  }

  .oa-preview-shell {
    height: calc(100dvh - 214px);
    min-height: 560px;
    padding-bottom: 88px;
  }

  .oa-step-footer {
    display: grid;
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .oa-output-footer {
    position: fixed;
    right: 10px;
    bottom: 10px;
    left: 10px;
    z-index: 50;
    grid-template-columns: 1fr 1.2fr;
    border: 1px solid var(--oa-line-strong);
    border-radius: 10px;
    background: color-mix(in srgb, var(--oa-bg) 96%, transparent);
    box-shadow: 0 14px 36px rgba(15, 15, 15, 0.14);
    backdrop-filter: blur(16px);
  }

  .oa-toast {
    right: 16px;
    bottom: 82px;
    left: 16px;
    text-align: center;
  }
}
