:root {
  --bg: #0e0e0f;
  --surface: #161618;
  --surface2: #1e1e21;
  --border: rgba(255, 255, 255, 0.07);
  --border-active: rgba(255, 255, 255, 0.15);
  --text: #e8e6e0;
  --text-muted: #888580;
  --text-dim: #555450;
  --accent: #c8a96e;
  --accent-dim: rgba(200, 169, 110, 0.12);
  --accent-mid: rgba(200, 169, 110, 0.25);
  --accent-text: #0e0e0f;
  --accent-hover: #d4b87a;
  --green: #5a9e7a;
  --green-dim: rgba(90, 158, 122, 0.12);
  --red: #c96e6e;
  --red-dim: rgba(201, 110, 110, 0.12);
  --orange: #c8966e;
  --orange-dim: rgba(200, 150, 110, 0.12);
  --badge-you-bg: rgba(150, 120, 200, 0.15);
  --badge-you-text: #b89be0;
  --badge-you-border: rgba(150, 120, 200, 0.2);
  --badge-skill-bg: rgba(200, 130, 80, 0.12);
  --badge-skill-text: #d4956a;
  --badge-skill-border: rgba(200, 130, 80, 0.2);
  --output-strong: #f0d9a8;
  --output-h3: #e0c88a;
  --format-h2: #e8e6e0;
  --format-blockquote-border: #c8a96e;
  --format-blockquote-bg: rgba(200, 169, 110, 0.06);
  --radius: 12px;
  --radius-sm: 8px;
  --content-scale: 1;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.header {
  padding: 20px 32px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  font-family: 'Noto Serif SC', serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.02em;
}

.logo-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 1px;
}

.header-steps {
  display: flex;
  gap: 0;
  margin-left: auto;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 4px;
}

.hstep {
  font-size: 11px;
  padding: 5px 14px;
  border-radius: 100px;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.hstep.active {
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 500;
}

.hstep.done {
  color: var(--text-muted);
}

.main {
  display: flex;
  flex: 1;
  height: calc(100vh - 65px);
}

.sidebar {
  width: 250px;
  min-width: 250px;
  border-right: 1px solid var(--border);
  background: var(--surface);
  padding: 16px 0 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.sidebar-section {
  padding: 8px 16px 4px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  text-transform: uppercase;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  cursor: pointer;
  transition: all 0.15s;
  border-left: 2px solid transparent;
  position: relative;
}

.step-item:hover {
  background: var(--accent-dim);
}

.step-item.active {
  background: var(--accent-dim);
  border-left-color: var(--accent);
  color: var(--accent);
}

.step-item.done {
  color: var(--green);
}

.step-item.done .step-icon {
  background: var(--green-dim);
  color: var(--green);
}

.step-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
  color: var(--text-muted);
}

.step-item.active .step-icon {
  background: var(--accent-mid);
  color: var(--accent);
}

.step-label {
  font-size: 13px;
}

.step-badge {
  margin-left: auto;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--surface2);
  color: var(--text-dim);
}

.step-item.active .step-badge {
  background: var(--accent-dim);
  color: var(--accent);
}

.config-panel {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin: 8px 16px 16px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.config-select,
.config-input {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 8px;
  border-radius: 4px;
  font-size: 11px;
  width: 100%;
  font-family: inherit;
  transition: border-color 0.2s;
}

.config-select:focus,
.config-input:focus {
  outline: none;
  border-color: var(--accent);
}

.content {
  flex: 1;
  overflow-y: auto;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: relative;
}

.zoom-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  width: fit-content;
  margin-left: auto;
  margin-bottom: -16px;
}

.zoom-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 4px;
  padding: 2px 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.15s;
}

.zoom-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.zoom-level {
  font-size: 11px;
  color: var(--text-dim);
  min-width: 36px;
  text-align: center;
}

.fullscreen-toggle {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 14px;
  padding: 2px 6px;
  line-height: 1;
  transition: color 0.15s;
}

.fullscreen-toggle:hover {
  color: var(--accent);
}

.fullscreen-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--bg);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.fullscreen-overlay textarea {
  width: 100%;
  height: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 15px;
  line-height: 1.8;
  padding: 24px;
  resize: none;
  outline: none;
}

.fullscreen-content {
  width: 100%;
  height: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 15px;
  line-height: 1.8;
  padding: 24px;
  overflow-y: auto;
  white-space: pre-wrap;
}

.fullscreen-close {
  position: fixed;
  top: 16px;
  right: 16px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  z-index: 1001;
}

.fullscreen-close:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.step-panel {
  display: none;
  flex-direction: column;
  gap: 20px;
}

.step-panel.active {
  display: flex;
}

.step-panel textarea,
.step-panel .output-body {
  font-size: calc(13px * var(--content-scale));
  line-height: calc(1.7 * var(--content-scale));
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.panel-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.panel-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.6;
}

.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}

.role-you {
  background: var(--badge-you-bg);
  color: var(--badge-you-text);
  border: 1px solid var(--badge-you-border);
}

.role-ai {
  background: var(--green-dim);
  color: var(--green);
  border: 1px solid var(--green-dim);
}

.role-both {
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid var(--accent-mid);
}

.role-skill {
  background: var(--badge-skill-bg);
  color: var(--badge-skill-text);
  border: 1px solid var(--badge-skill-border);
}

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

.field-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

textarea,
input[type="text"] {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 13px;
  padding: 12px 14px;
  width: 100%;
  resize: vertical;
  transition: border-color 0.2s;
  line-height: 1.7;
}

textarea:focus,
input[type="text"]:focus {
  outline: none;
  border-color: var(--border-active);
}

textarea::placeholder,
input::placeholder {
  color: var(--text-dim);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 12px;
  cursor: pointer;
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: all 0.15s;
}

.tag:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.tag.selected {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  font-family: 'Noto Sans SC', sans-serif;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-text);
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--border-active);
  color: var(--text);
}

.btn-success {
  background: var(--green-dim);
  color: var(--green);
  border: 1px solid var(--green-dim);
}

.btn-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.output-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.output-header {
  padding: 10px 16px;
  background: var(--accent-dim);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-muted);
}

.output-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}

.output-body {
  padding: 20px;
  font-size: 13px;
  color: var(--text);
  line-height: 1.8;
  white-space: pre-wrap;
  min-height: 80px;
  max-height: calc(100vh - 280px);
  overflow-y: auto;
}

.output-body.formatted {
  white-space: normal;
}

.output-body h2 {
  font-family: 'Noto Serif SC', serif;
  font-size: 16px;
  font-weight: 600;
  margin: 16px 0 8px;
  color: var(--text);
}

.output-body h3 {
  font-size: 15px;
  font-weight: 700;
  margin: 16px 0 6px;
  color: var(--output-h3);
}

.output-body p {
  margin-bottom: 10px;
}

.output-body ul {
  padding-left: 20px;
  margin-bottom: 10px;
}

.output-body li {
  margin-bottom: 4px;
}

.output-body strong {
  color: var(--output-strong);
}

.output-placeholder {
  color: var(--text-dim);
  font-style: italic;
}

.inspire-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: all 0.15s;
  cursor: pointer;
}

.inspire-item:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.inspire-checkbox {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}

.inspire-number {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 600;
  min-width: 18px;
  flex-shrink: 0;
}

.inspire-text {
  font-size: 13px;
  color: var(--text);
  line-height: 1.6;
}

.history-nav {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--accent-dim);
  border-radius: var(--radius-sm);
  padding: 2px 6px;
}

.history-btn {
  background: none;
  border: 1px solid var(--border-active);
  color: var(--accent);
  width: 24px;
  height: 24px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all 0.15s;
}

.history-btn:hover:not(:disabled) {
  background: var(--accent-mid);
  border-color: var(--accent);
}

.history-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.history-text {
  font-size: 11px;
  color: var(--accent);
  min-width: 36px;
  text-align: center;
  font-weight: 600;
}

.token-badge {
  background: var(--accent-dim);
  border-radius: var(--radius-sm);
  padding: 2px 8px;
  font-size: 10px;
  color: var(--accent);
  white-space: nowrap;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.theme-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--border);
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
  padding: 0;
}

.theme-dot:hover {
  border-color: var(--accent);
  transform: scale(1.1);
}

.theme-dot.active-theme {
  border-color: var(--accent);
  transform: scale(1.15);
}

.output-footer {
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  align-items: center;
  background: var(--accent-dim);
}

/* Edit toggle button in output-header */
.btn-edit-toggle {
  margin-left: auto;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 11px;
  padding: 2px 10px;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-edit-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.btn-edit-toggle.editing {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
  font-weight: 600;
}

/* Segment rewrite confirm card */
.segment-confirm-card {
  background: var(--surface2);
  border: 1px solid var(--accent-mid);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 4px;
}

.segment-confirm-card .output-header {
  gap: 10px;
}

.segment-confirm-card .btn-edit-toggle {
  margin-left: 0;
}

.segment-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.segment-compare-side {
  padding: 16px;
  border-right: 1px solid var(--border);
}

.segment-compare-side:last-child {
  border-right: none;
}

.segment-compare-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}

.segment-compare-side:last-child .segment-compare-label {
  color: var(--accent);
}

.segment-compare-body {
  font-size: 13px;
  line-height: 1.8;
  white-space: pre-wrap;
  color: var(--text);
}
.segment-compare-body .glow-progress-wrap {
  padding: 16px 10px;
  gap: 12px;
}
.segment-compare-body .glow-progress-bar {
  width: 100%;
}
  max-height: 300px;
  overflow-y: auto;
}

/* Content view/edit area */
.content-view {
  white-space: pre-wrap;
  word-break: break-word;
}
.content-edit {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--accent-dim);
  color: var(--text);
  font-size: 13px;
  line-height: 1.8;
  padding: 12px;
  border-radius: var(--radius-sm);
  resize: vertical;
  font-family: inherit;
  min-height: calc(100vh - 320px);
}
.content-edit:focus {
  outline: none;
  border-color: var(--accent);
}

.content-edit::selection {
  background: var(--accent-mid);
  color: var(--text);
}

/* Glow progress bar - replaces old loading-bar */
.glow-progress-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  gap: 20px;
}

.glow-progress-bar {
  width: 80%;
  height: 4px;
  border-radius: 4px;
  background: var(--surface2);
  position: relative;
  overflow: hidden;
}

.glow-progress-shine {
  position: absolute;
  top: 0;
  left: -40%;
  width: 40%;
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--accent),
    var(--green),
    var(--accent),
    transparent
  );
  animation: glow-slide 1.8s ease-in-out infinite;
  box-shadow: 0 0 12px 2px rgba(200, 169, 110, 0.5);
}

@keyframes glow-slide {
  0% { left: -40%; }
  100% { left: 100%; }
}

.glow-progress-text {
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  animation: glow-pulse 2s ease-in-out infinite;
}

@keyframes glow-pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* Streaming cursor */
.streaming-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--accent);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: cursor-blink 0.8s step-end infinite;
}

@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Deprecated: keep for any remaining references */
.loading-bar {
  height: 2px;
  background: var(--surface2);
  border-radius: 1px;
  overflow: hidden;
  margin-bottom: 8px;
}

.loading-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--green));
  border-radius: 1px;
  transition: width 0.3s ease;
}

.shimmer {
  background: linear-gradient(
    90deg,
    var(--surface2) 25%,
    rgba(255, 255, 255, 0.04) 50%,
    var(--surface2) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
  height: 14px;
  margin-bottom: 8px;
}

.shimmer.w60 {
  width: 60%;
}

.shimmer.w80 {
  width: 80%;
}

.shimmer.w40 {
  width: 40%;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.tip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-dim);
  background: var(--surface2);
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.success-box {
  background: var(--green-dim);
  border: 1px solid var(--green-dim);
  border-radius: var(--radius);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.success-icon {
  font-size: 28px;
}

.success-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--green);
}

.success-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Toast container */
#toast-container {
  position: fixed;
  top: 80px;
  right: 32px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast-item {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  max-width: 280px;
  border-radius: var(--radius-sm);
  backdrop-filter: blur(12px);
  font-size: 13px;
  line-height: 1.5;
  transform: translateX(120%);
  transition: transform 0.3s ease;
  border: 1px solid;
}
.toast-item.show {
  transform: translateX(0);
}

.toast-success {
  background: var(--green-dim);
  border-color: var(--green);
  color: var(--green);
}
.toast-warning {
  background: var(--orange-dim);
  border-color: var(--orange);
  color: var(--orange);
}
.toast-error {
  background: var(--red-dim);
  border-color: var(--red);
  color: var(--red);
}

.toast-icon {
  font-size: 16px;
  line-height: 1;
}

/* Confirm overlay */
#confirm-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  z-index: 2500;
  display: none;
  align-items: center;
  justify-content: center;
}
#confirm-overlay.active {
  display: flex;
}
#confirm-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  max-width: 320px;
  width: 90vw;
  text-align: center;
}
#confirm-msg {
  font-size: 14px;
  color: var(--text);
  margin-bottom: 20px;
  line-height: 1.6;
}
#confirm-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 4px 0;
}

.img-card {
  background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
  border-radius: var(--radius-sm);
  aspect-ratio: 900/383;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.img-card:hover {
  border-color: var(--accent);
}

.img-card.selected {
  border-color: var(--accent);
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border-active);
  border-radius: 3px;
}

#skill-content-editor {
  background: var(--bg);
  border-color: var(--border);
  color: var(--text);
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

#skill-content-editor:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 2px var(--accent-dim);
}

#new-skill-name {
  animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Model config rows */
.model-row {
  display: grid;
  grid-template-columns: 60px 1fr 50px 50px;
  gap: 4px;
  align-items: center;
  padding: 2px 0;
}

.model-row-label {
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.model-input {
  font-size: 10px !important;
  padding: 3px 5px !important;
}

.model-temp, .model-tokens {
  font-size: 10px !important;
  padding: 3px 5px !important;
  text-align: center;
}

/* Mobile preview */
.preview-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 16px;
}

.preview-label {
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 8px;
}

/* iPhone preview shell */
.iphone-shell {
  width: 399px;
  height: 715px;
  background: #1e293b;
  border-radius: 40px;
  padding: 12px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  position: relative;
  overflow: hidden;
}

.iphone-notch {
  width: 100%;
  height: 24px;
  background: #1e293b;
  display: flex;
  justify-content: center;
  align-items: center;
}

.iphone-notch-pill {
  width: 60px;
  height: 6px;
  background: #334155;
  border-radius: 3px;
}

.iphone-screen {
  width: 375px;
  height: 667px;
  background: #fff;
  overflow-y: auto;
  overflow-x: hidden;
}

.iphone-home-indicator {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 4px;
  background: #e2e8f0;
  border-radius: 2px;
  opacity: 0.5;
  pointer-events: none;
}

.mobile-preview-frame {
  width: 375px;
  height: 667px;
  border: none;
  background: #fff;
  overflow: hidden;
}

/* Polish suggest */
#polish-suggest-output {
  margin-top: 8px;
}

/* Inspire output */
#inspire-output .output-body {
  cursor: pointer;
  line-height: 2;
}

/* Word count */
#word-count-display {
  font-variant-numeric: tabular-nums;
}

@media (max-width: 900px) {
  #panel-3 div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }
  .mobile-preview-frame {
    width: 100%;
    max-width: 375px;
  }
  .model-row {
    grid-template-columns: 50px 1fr 40px 40px;
  }
}