:root {
  --bg-1: #f4f6fb;
  --bg-2: #e8edf5;
  --bg-3: #f6efe6;
  --surface: rgba(255, 255, 255, 0.9);
  --surface-strong: #ffffff;
  --text: #101626;
  --muted: #5c667a;
  --primary: #1f4b99;
  --primary-strong: #14346d;
  --secondary: #0f766e;
  --accent: #f2b24b;
  --border: rgba(16, 22, 38, 0.12);
  --shadow: 0 22px 40px rgba(16, 22, 38, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Manrope', 'Noto Sans TC', sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top left, rgba(31, 75, 153, 0.12), transparent 52%),
    radial-gradient(circle at 80% 0%, rgba(242, 178, 75, 0.18), transparent 46%),
    linear-gradient(160deg, var(--bg-1), var(--bg-2) 55%, var(--bg-3));
  min-height: 100vh;
  overflow-x: hidden;
}

.bg-shapes {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.shape {
  position: absolute;
  border-radius: 40%;
  filter: blur(0);
  opacity: 0.12;
  animation: float 14s ease-in-out infinite;
}

.shape-1 {
  width: 320px;
  height: 260px;
  background: #1f4b99;
  top: -60px;
  left: -80px;
}

.shape-2 {
  width: 240px;
  height: 240px;
  background: #0f766e;
  top: 220px;
  right: -80px;
  animation-delay: -4s;
}

.shape-3 {
  width: 260px;
  height: 220px;
  background: #f2b24b;
  bottom: -90px;
  left: 10%;
  animation-delay: -2s;
}

.shape-4 {
  width: 180px;
  height: 180px;
  background: #334155;
  bottom: 120px;
  right: 12%;
  animation-delay: -6s;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px) translateX(0px);
  }
  50% {
    transform: translateY(-16px) translateX(12px);
  }
}

.app {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 80px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  animation: rise 0.6s ease both;
}

.topbar {
  display: flex;
  justify-content: flex-end;
  z-index: 5;
}

.settings-btn {
  border: 1px solid rgba(31, 75, 153, 0.2);
  backdrop-filter: blur(12px);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  align-items: center;
}

.brand {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 18px;
  row-gap: 6px;
  align-items: center;
}

.logo {
  width: 72px;
  height: 72px;
  filter: drop-shadow(0 12px 24px rgba(16, 22, 38, 0.2));
  grid-row: 2;
  align-self: center;
}

.brand-text {
  display: contents;
}

.hero-text h1 {
  font-family: 'Fraunces', 'Noto Sans TC', serif;
  font-size: clamp(2.6rem, 4vw, 3.6rem);
  margin: 0 0 12px;
  letter-spacing: 0.5px;
  grid-column: 2;
  grid-row: 2;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 22, 38, 0.08);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-strong);
  grid-column: 1 / span 2;
  grid-row: 1;
  justify-self: start;
  width: fit-content;
  max-width: 100%;
}

.subtitle {
  font-size: 1.1rem;
  color: var(--muted);
  margin: 0 0 18px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-note {
  margin-top: 16px;
  background: rgba(255, 255, 255, 0.85);
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 0.95rem;
  color: var(--muted);
  border: 1px solid var(--border);
}

.settings-actions {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.settings-status {
  font-size: 0.9rem;
  color: var(--muted);
}

.settings-status.is-loading {
  color: var(--primary-strong);
}

.settings-status.is-success {
  color: var(--secondary);
}

.settings-status.is-error {
  color: #9b1c1c;
}

.hero-card {
  background: var(--surface-strong);
  padding: 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.hero-card h3 {
  margin-top: 0;
  font-family: 'Fraunces', 'Noto Sans TC', serif;
}

.hero-card ol {
  padding-left: 18px;
  color: var(--muted);
}

.mini-tip {
  margin-top: 14px;
  padding: 10px 14px;
  background: rgba(31, 75, 153, 0.08);
  border-radius: 12px;
  font-size: 0.9rem;
  color: #1f3a6b;
}

.panel {
  background: var(--surface);
  padding: 26px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(10px);
  animation: rise 0.6s ease both;
}

.panel-header {
  margin-bottom: 18px;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-title h2 {
  margin: 0;
}

.panel-title + p {
  margin-top: 6px;
}

.btn.small {
  padding: 8px 14px;
  font-size: 0.9rem;
}

.panel-header h2 {
  margin: 0 0 6px;
  font-family: 'Fraunces', 'Noto Sans TC', serif;
}

.panel-header p {
  margin: 0;
  color: var(--muted);
}

.grid {
  display: grid;
  gap: 18px;
}

.grid.two {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.grid.two.connection-grid {
  grid-template-columns: minmax(360px, 2fr) minmax(200px, 1fr);
}

.grid.two.connection-grid .field.endpoint {
  grid-column: span 2;
}

@media (max-width: 900px) {
  .grid.two.connection-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }
  .grid.two.connection-grid .field.endpoint {
    grid-column: auto;
  }
}

.grid.three {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

label {
  font-weight: 600;
}

input,
textarea,
select {
  font-family: inherit;
  font-size: 1rem;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.95);
  color: var(--text);
}

textarea {
  resize: vertical;
}

small {
  color: var(--muted);
  font-size: 0.85rem;
}

.btn {
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn.primary {
  background: linear-gradient(120deg, var(--primary), #2b65c9);
  color: white;
  box-shadow: 0 14px 24px rgba(31, 75, 153, 0.35);
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: 0 10px 16px rgba(20, 20, 60, 0.08);
}

.btn:hover {
  transform: translateY(-2px);
}

.segmented {
  display: inline-flex;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  gap: 6px;
  border: 1px solid var(--border);
}

.segmented-btn {
  border: none;
  background: transparent;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  color: var(--muted);
}

.segmented-btn.is-active {
  background: var(--secondary);
  color: white;
}

.input-with-action {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-action input {
  flex: 1;
  padding-right: 46px;
  width: 100%;
}

.icon-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: #334155;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.icon-btn:hover {
  background: rgba(15, 23, 42, 0.08);
}

.icon-eye {
  width: 18px;
  height: 18px;
}

.icon-eye-closed {
  display: none;
}

.icon-btn[data-state="visible"] .icon-eye-open {
  display: none;
}

.icon-btn[data-state="visible"] .icon-eye-closed {
  display: block;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--muted);
}

.preview-box {
  padding: 14px;
  border-radius: 16px;
  border: 1px dashed rgba(31, 75, 153, 0.3);
  background: rgba(255, 255, 255, 0.7);
  min-height: 170px;
  white-space: pre-wrap;
}

#promptInput {
  min-height: 170px;
}

.prompt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.stack {
  margin-top: 22px;
}

.chip-grid,
.style-groups {
  display: grid;
  gap: 10px;
}


.chip-grid {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.template-dropdown {
  display: none;
  position: relative;
}

.dropdown-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(31, 75, 153, 0.18);
  background: rgba(255, 255, 255, 0.98);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  font-size: 1rem;
}

.dropdown-trigger-label {
  font-weight: 600;
}

.dropdown-chevron {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.2s ease;
}

.template-dropdown.is-open .dropdown-chevron {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.16);
  padding: 8px;
  display: none;
  max-height: min(60vh, 420px);
  max-height: min(60svh, 420px);
  overflow: auto;
  z-index: 3;
}

.template-dropdown.is-open .dropdown-menu {
  display: block;
}

.dropdown-item {
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  padding: 12px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.95rem;
}

.dropdown-item-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
}

.dropdown-item-desc {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.4;
}

.dropdown-item:hover {
  background: rgba(31, 75, 153, 0.08);
}

.dropdown-item.is-selected {
  background: rgba(15, 118, 110, 0.12);
  border: 1px solid rgba(15, 118, 110, 0.22);
}

.style-groups {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.chip {
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(31, 75, 153, 0.15);
  background: rgba(255, 255, 255, 0.95);
  cursor: pointer;
  text-align: left;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.chip:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 16px rgba(20, 20, 60, 0.08);
}

.style-group {
  background: rgba(255, 255, 255, 0.85);
  border-radius: 14px;
  padding: 12px;
  border: 1px solid rgba(31, 75, 153, 0.12);
}

.style-group h4 {
  margin: 0 0 8px;
  font-size: 0.95rem;
}

.style-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(31, 75, 153, 0.2);
  background: white;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.tag.is-active {
  background: rgba(15, 118, 110, 0.15);
  color: #0f4c46;
  border-color: rgba(15, 118, 110, 0.25);
}

.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.radio {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(31, 75, 153, 0.2);
  cursor: pointer;
}

.radio input {
  margin: 0;
}

.range-value {
  font-weight: 600;
  color: var(--primary);
}

.hint {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.generate-panel {
  background: rgba(255, 255, 255, 0.96);
}

.curl-preview {
  margin-bottom: 18px;
  display: grid;
  gap: 10px;
  min-width: 0;
}

.curl-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.curl-header h3 {
  margin: 0;
  font-family: 'Fraunces', 'Noto Sans TC', serif;
  font-size: 1.05rem;
}

.code-block {
  margin: 0;
  padding: 16px 18px;
  border-radius: 16px;
  background: #0b1220;
  color: #e2e8f0;
  border: 1px solid rgba(226, 232, 240, 0.12);
  overflow-x: auto;
  font-size: 0.9rem;
  line-height: 1.6;
  padding-right: 52px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.code-block code {
  font-family: 'JetBrains Mono', 'SFMono-Regular', Menlo, Consolas, 'Liberation Mono', monospace;
  white-space: pre;
}

.token-command {
  color: #7dd3fc;
  font-weight: 600;
}

.token-flag {
  color: #a5b4fc;
  font-weight: 600;
}

.token-string {
  color: #fbbf24;
}

.token-number {
  color: #34d399;
}

.code-block-wrap {
  position: relative;
  min-width: 0;
}

.copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(226, 232, 240, 0.2);
  background: rgba(15, 23, 42, 0.4);
  color: #e2e8f0;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.copy-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}

.copy-btn:hover {
  transform: translateY(-1px);
  background: rgba(226, 232, 240, 0.18);
  box-shadow: 0 10px 16px rgba(15, 23, 42, 0.25);
}

.copy-btn:focus-visible {
  outline: 2px solid rgba(125, 211, 252, 0.8);
  outline-offset: 2px;
}

.generate-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.status {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  color: var(--muted);
}

.timer {
  font-variant-numeric: tabular-nums;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(31, 75, 153, 0.1);
  color: var(--primary-strong);
  min-width: 72px;
  text-align: center;
}

.timer.is-running {
  background: rgba(15, 118, 110, 0.15);
  color: #0f4c46;
}

.error {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(215, 68, 68, 0.12);
  color: #9b1c1c;
  display: none;
}

.error.is-visible {
  display: block;
}

.result-meta {
  margin-top: 14px;
}

body:not(.debug) .debug-only {
  display: none;
}

body.debug .debug-only {
  display: block;
}

body.debug .field.debug-only {
  display: flex;
}

body.debug .curl-preview.debug-only {
  display: grid;
}

.result-card {
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  display: grid;
  gap: 12px;
}

.result-title {
  font-weight: 600;
  color: var(--primary-strong);
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.result-item {
  background: #f5f7fb;
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.result-label {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.result-value {
  font-weight: 600;
  color: var(--text);
  word-break: break-word;
}

.gallery {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.image-card {
  background: white;
  border-radius: 18px;
  padding: 14px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.image-card img {
  width: 100%;
  border-radius: 14px;
  cursor: zoom-in;
}

.image-card .meta {
  font-size: 0.85rem;
  color: var(--muted);
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10, 15, 25, 0.85);
  display: grid;
  place-items: center;
  padding: 32px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 10;
}

.lightbox.is-active {
  opacity: 1;
  visibility: visible;
}

.lightbox img {
  max-width: min(96vw, 1200px);
  max-height: 90vh;
  border-radius: 18px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(10, 15, 25, 0.35);
  color: rgba(255, 255, 255, 0.9);
  display: grid;
  place-items: center;
  cursor: pointer;
  transform: translateY(-50%);
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.lightbox-nav svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lightbox-nav.prev {
  left: 24px;
}

.lightbox-nav.next {
  right: 24px;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.35);
}

.lightbox-nav:disabled {
  opacity: 0.35;
  cursor: default;
  box-shadow: none;
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: white;
  font-size: 1.2rem;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  cursor: pointer;
}

.lightbox-hint {
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.9rem;
}

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 12;
}

.modal.is-open {
  opacity: 1;
  visibility: visible;
}

.test-overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(10, 15, 25, 0.55);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 20;
}

.test-overlay.is-active {
  opacity: 1;
  visibility: visible;
}

.test-overlay-card {
  width: min(520px, 92vw);
  max-height: 90vh;
  overflow: auto;
  background: #ffffff;
  border-radius: 20px;
  padding: 22px;
  box-shadow: 0 30px 60px rgba(15, 23, 42, 0.22);
  border: 1px solid rgba(15, 23, 42, 0.08);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.test-overlay-title {
  font-weight: 700;
  font-size: 1.05rem;
}

.test-overlay-message {
  font-size: 0.95rem;
  color: var(--muted);
}

.test-overlay-message:empty {
  display: none;
}

.test-overlay-spinner {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 3px solid rgba(31, 75, 153, 0.2);
  border-top-color: var(--primary);
  animation: spin 0.8s linear infinite;
  margin: 4px auto 2px;
  display: none;
}

.test-overlay-image {
  width: 100%;
  max-height: min(60vh, 520px);
  object-fit: contain;
  border-radius: 14px;
  background: #f8fafc;
  display: none;
}

.test-overlay-close {
  align-self: center;
}

.test-overlay[data-state="loading"] .test-overlay-spinner {
  display: block;
}

.test-overlay[data-state="loading"] .test-overlay-close {
  display: none;
}

.test-overlay[data-state="success"] .test-overlay-image {
  display: block;
}

.test-overlay[data-state="error"] .test-overlay-title {
  color: #9b1c1c;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 15, 25, 0.55);
}

.modal-content {
  position: relative;
  width: min(900px, 92vw);
  max-height: 88vh;
  overflow: auto;
  background: rgba(255, 255, 255, 0.98);
  border-radius: 20px;
  padding: 22px;
  box-shadow: 0 30px 60px rgba(15, 23, 42, 0.2);
  border: 1px solid rgba(15, 23, 42, 0.08);
  z-index: 1;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.modal-header h2 {
  margin: 0;
  font-family: 'Fraunces', 'Noto Sans TC', serif;
}

.modal-close {
  border: none;
  background: rgba(15, 23, 42, 0.08);
  color: var(--text);
  width: 36px;
  height: 36px;
  border-radius: 999px;
  cursor: pointer;
}

.no-scroll {
  overflow: hidden;
}

.footer {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
}

@media (max-width: 720px) {
  .brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .brand-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .logo {
    width: 64px;
    height: 64px;
    align-self: flex-start;
    grid-row: auto;
  }
  .eyebrow,
  .hero-text h1 {
    grid-column: auto;
    grid-row: auto;
  }
  .style-groups {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .app {
    padding: 24px 16px 60px;
  }
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .input-with-action {
    flex-direction: column;
  }
  .panel-title {
    flex-direction: column;
    align-items: flex-start;
  }
  .generate-actions {
    flex-direction: column;
    align-items: flex-start;
  }
  .curl-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .template-dropdown {
    display: block;
  }
  .chip-grid {
    display: none;
  }
  .dropdown-trigger {
    font-size: 1.05rem;
  }
  .dropdown-item {
    padding: 14px;
  }
  .dropdown-item-title {
    font-size: 1.05rem;
  }
  .dropdown-item-desc {
    font-size: 0.98rem;
    line-height: 1.5;
  }
  .test-overlay {
    padding: 16px;
  }
  .test-overlay-card {
    padding: 18px;
  }
  .test-overlay-image {
    max-height: calc(100svh - 260px);
  }
  .lightbox {
    padding: 16px;
  }
  .lightbox img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: calc(100vh - 96px);
    max-height: calc(100svh - 96px);
    object-fit: contain;
  }
  .lightbox-hint {
    margin-top: 12px;
    font-size: 0.8rem;
    text-align: center;
  }
  .modal-content {
    padding: 0 22px 22px;
  }
  .modal-header {
    position: sticky;
    top: 0;
    z-index: 2;
    margin: 0 -22px 16px;
    padding: 18px 22px;
    background: #ffffff;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
