:root {
  color-scheme: light;
  font-family: "Segoe UI", Arial, sans-serif;
  background: #fff9f4;
  color: #1f2937;
  --home-ink: #172033;
  --home-ink-soft: #1f2933;
  --home-text: #4b5563;
  --home-muted: #6b7280;
  --home-faint: #9ca3af;
  --home-brand: #ff4f6d;
  --home-brand-deep: #e93f5d;
  --home-blue: #2f80ed;
  --home-warm: #fff8f4;
  --home-warm-strong: #fff1eb;
}

* { box-sizing: border-box; }
html, body { max-width: 100%; overflow-x: hidden; }
body { margin: 0; background: linear-gradient(180deg, #fff9f4 0%, #fff 100%); }
.page { max-width: 860px; margin: 0 auto; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.card { background: #fff; border-radius: 18px; padding: 16px; box-shadow: 0 8px 24px rgba(0,0,0,0.06); }
.hero h1 { font-size: 1.5rem; margin: 0 0 8px; line-height: 1.25; }
.hero p { margin: 0; color: #6b7280; line-height: 1.6; }
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; font-size: 0.95rem; }
.field input, .field textarea, .field select, button, .secondary-btn, .copy-btn { font: inherit; }
.field input, .field textarea, .field select { width: 100%; border: 1px solid #e5e7eb; border-radius: 12px; padding: 12px; }
.field small { color: #8a6b57; line-height: 1.5; }
button, .secondary-btn, .copy-btn { border: none; border-radius: 999px; padding: 12px 16px; background: #ff6b6b; color: white; cursor: pointer; text-decoration: none; text-align: center; }
button:disabled { opacity: 0.72; cursor: wait; }
.secondary-btn, .copy-btn { background: #2f80ed; }
.form-card button { padding: 14px 16px; font-weight: 600; }
.upload-box { display: flex; flex-direction: column; gap: 10px; }
.upload-box input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.upload-preview {
  position: relative;
  min-height: 160px;
  border-radius: 16px;
  border: 1px dashed #f1b590;
  background: linear-gradient(135deg, #fff8f3 0%, #fff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8a6b57;
  overflow: hidden;
  cursor: pointer;
  padding: 12px;
  touch-action: manipulation;
}
.upload-preview.has-image {
  min-height: 220px;
}
.upload-preview:focus-visible {
  outline: 2px solid #ff8f5c;
  outline-offset: 2px;
}
.upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}
.upload-placeholder strong {
  font-size: 1rem;
  color: #333;
}
.upload-placeholder span {
  font-size: 0.9rem;
  color: #8a6b57;
}
.upload-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.upload-preview .upload-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 12px;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.6) 100%);
  color: white;
  font-size: 0.9rem;
  text-align: center;
  font-weight: 600;
}
.image-grid { display: grid; gap: 12px; }
.image-card { border: 1px solid #f3f4f6; border-radius: 16px; overflow: hidden; cursor: zoom-in; }
.image-card img { width: 100%; height: auto; display: block; }
.image-actions { padding: 10px; }
.image-actions a { color: #2f80ed; text-decoration: none; font-weight: 600; }
.lightbox[hidden] { display: none !important; }
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 1000;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.lightbox-shell {
  position: relative;
  width: auto;
  max-width: 90vw;
  max-height: 92vh;
  background: transparent;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.lightbox-image-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-height: 0;
}
.lightbox img {
  display: block;
  width: auto;
  height: auto;
  max-width: 90vw;
  max-height: 86vh;
  object-fit: contain;
  border-radius: 8px;
  background: transparent;
  box-shadow: 0 18px 50px rgba(0,0,0,0.34);
}
.lightbox-toolbar {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
}
.lightbox-toolbar a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 18px;
  border-radius: 999px;
  background: #fff;
  color: #111827;
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 10px 26px rgba(0,0,0,0.22);
}
.lightbox-close {
  position: absolute;
  top: -18px;
  right: -18px;
  z-index: 2;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  padding: 0;
  background: #fff;
  color: #111827;
  font-size: 1.65rem;
  line-height: 1;
  font-weight: 700;
  box-shadow: 0 8px 22px rgba(0,0,0,0.28);
  flex-shrink: 0;
}
ul { padding-left: 18px; }
li { margin-bottom: 6px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: rgba(17, 24, 39, 0.9); color: white; padding: 10px 14px; border-radius: 999px; font-size: 0.9rem; z-index: 1100; }
.form-message {
  padding: 10px 12px;
  border-radius: 8px;
  line-height: 1.5;
  font-size: 0.92rem;
  font-weight: 700;
}
.form-message[hidden] { display: none; }
.form-message-error { background: #fff1f2; color: #be123c; border: 1px solid #fecdd3; }
.form-message-warning { background: #fff7ed; color: #9a3412; border: 1px solid #fed7aa; }
.quota-hint {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff8f4;
  color: var(--home-text);
  border: 1px solid #f0ddd4;
  font-size: 0.92rem;
  line-height: 1.5;
}
.quota-hint-ok {
  background: linear-gradient(135deg, #fff8f4 0%, #fff 100%);
  color: var(--home-ink-soft);
}
.quota-hint-empty {
  background: #fff1f4;
  color: #9f2744;
  border-color: #ffd5de;
  font-weight: 700;
}
.quota-hint .btn {
  min-height: 36px;
  padding: 8px 12px;
}
.recent-records-card {
  display: grid;
  gap: 14px;
  width: 100%;
  background: linear-gradient(135deg, rgba(255, 248, 244, 0.96) 0%, rgba(255, 255, 255, 0.98) 100%);
  border-color: #f0ddd4;
}
.compact-heading {
  margin-bottom: 0;
}
.compact-heading .btn {
  width: 100%;
}
.recent-record-list {
  display: grid;
  gap: 10px;
}
.record-item {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #f0ddd4;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}
.record-item strong,
.record-item span,
.record-meta em {
  display: block;
}
.record-item strong {
  color: var(--home-ink);
  font-size: 0.98rem;
}
.record-item span {
  margin-top: 4px;
  color: var(--home-text);
  font-size: 0.9rem;
  line-height: 1.5;
}
.record-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.record-meta em {
  padding: 4px 8px;
  border-radius: 999px;
  background: #fff0f4;
  color: var(--home-brand-deep);
  font-style: normal;
  font-size: 0.82rem;
  font-weight: 800;
}
.empty-records {
  margin: 0;
  color: var(--home-muted);
  line-height: 1.6;
}
.version-note {
  margin: 0 0 8px;
  text-align: center;
  color: #a08b80;
  font-size: 0.82rem;
}
@media (min-width: 768px) {
  .page { padding: 32px; }
  .image-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* v0.1-2 result package polish */
.result-page { max-width: 1120px; }
.card { border-radius: 8px; border: 1px solid rgba(255, 107, 107, 0.1); }
.intro-card { display: flex; flex-direction: column; gap: 12px; }
.steps { display: grid; gap: 10px; }
.step {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px;
  border-radius: 8px;
  background: #fff7f2;
}
.step span {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ff6b6b;
  color: #fff;
  font-weight: 700;
  flex: 0 0 auto;
}
.step strong { font-size: 0.95rem; line-height: 1.35; }
.mvp-note { margin: 0; color: #8a6b57; font-size: 0.92rem; line-height: 1.6; }
.field input, .field textarea, .field select, button, .secondary-btn, .copy-btn, .btn { font: inherit; }
button, .secondary-btn, .copy-btn, .btn {
  border: none;
  border-radius: 999px;
  padding: 12px 16px;
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.result-actions .btn,
.section-heading .btn,
.copy-card-header .btn { width: 100%; }
.btn-primary { background: #ff4f64; box-shadow: 0 8px 18px rgba(255,79,100,0.22); }
.btn-secondary { background: #2f80ed; }
.btn-ghost { background: #fff; color: #374151; border: 1px solid #e5e7eb; }
.btn-download { width: 100%; background: #111827; color: #fff; font-weight: 700; }
.upload-preview,
.image-card,
.lightbox-shell,
.lightbox img,
.copy-content,
.title-list li,
.comment-list p { border-radius: 8px; }
.result-hero { display: flex; flex-direction: column; gap: 14px; }
.result-hero h1 { margin: 0 0 8px; font-size: 1.55rem; line-height: 1.25; }
.result-hero p { margin: 0; color: #6b7280; line-height: 1.6; }
.quota-result-tip {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: linear-gradient(135deg, #fff8f4 0%, #fff 100%);
  border-color: #f0ddd4;
}
.quota-result-tip strong,
.quota-result-tip span {
  display: block;
}
.quota-result-tip strong {
  color: var(--home-ink);
  font-size: 0.98rem;
}
.quota-result-tip span {
  margin-top: 4px;
  color: var(--home-text);
}
.quota-result-tip .btn {
  width: 100%;
}
.result-actions { display: flex; flex-direction: column; gap: 10px; }
.section-heading { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.section-heading h2,
.copy-card h2 { margin: 0; font-size: 1.12rem; line-height: 1.3; }
.section-heading p { margin: 6px 0 0; color: #6b7280; line-height: 1.55; font-size: 0.92rem; }
.image-package { background: linear-gradient(180deg, #fff 0%, #fff8f5 100%); }
.image-grid { grid-template-columns: 1fr; gap: 14px; }
.image-card { border: 1px solid #f1d5c7; background: #fff; min-width: 0; }
.image-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 12px;
  background: #fff7f2;
}
.image-card-header strong { color: #111827; font-size: 0.96rem; }
.image-card-header span { color: #9a5f44; font-size: 0.82rem; white-space: nowrap; }
.image-card img { width: 100%; aspect-ratio: 3 / 4; height: auto; object-fit: cover; background: #f9fafb; }
.image-actions { padding: 12px; }
.image-actions a { color: #fff; text-decoration: none; }
.copy-pack { display: grid; gap: 14px; }
.copy-card { display: flex; flex-direction: column; gap: 14px; }
.copy-card-header { display: flex; flex-direction: column; gap: 10px; }
.copy-card-actions { display: flex; flex-direction: column; gap: 10px; flex-wrap: wrap; }
.copy-card-actions .btn { width: 100%; }
.title-list {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: title;
  display: grid;
  gap: 10px;
}
.title-list li {
  counter-increment: title;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  background: #f9fafb;
  line-height: 1.55;
  margin: 0;
}
.title-list li::before {
  content: counter(title);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ffe5dc;
  color: #b84b2d;
  font-size: 0.82rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  margin-top: 1px;
}
.copy-content { padding: 14px; background: #f9fafb; white-space: pre-line; line-height: 1.75; color: #374151; }
.note-body-editor,
.editable-list-editor {
  width: 100%;
  min-height: 160px;
  border: 1px solid #f0e1d8;
  border-radius: 8px;
  padding: 16px;
  background: #fffaf7;
  color: #374151;
  font: inherit;
  line-height: 1.75;
  resize: vertical;
}
.editable-list-editor {
  min-height: 132px;
}
.note-body-editor[hidden],
.editable-list-editor[hidden],
.editor-hint[hidden] { display: none; }
.editor-hint {
  margin: -4px 0 0;
  color: #9a5f44;
  font-size: 0.88rem;
  line-height: 1.5;
}
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-list span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  background: #fff0f4;
  color: #b4234a;
  font-weight: 600;
  font-size: 0.92rem;
}
.comment-list { display: grid; gap: 10px; }
.comment-list p { margin: 0; padding: 12px; background: #f9fafb; line-height: 1.6; }
.toast { width: max-content; max-width: calc(100vw - 32px); }

@media (min-width: 768px) {
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .result-hero { flex-direction: row; justify-content: space-between; align-items: center; padding: 24px; }
  .result-hero h1 { font-size: 2rem; }
  .result-actions { flex-direction: row; flex-wrap: wrap; justify-content: flex-end; min-width: 420px; }
  .section-heading { flex-direction: row; justify-content: space-between; align-items: flex-start; }
  .section-heading .download-all-btn { flex: 0 0 auto; }
  .image-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .image-package { padding: 24px; }
  .copy-card { padding: 20px; }
  .copy-card-header { flex-direction: row; align-items: center; justify-content: space-between; }
  .result-actions .btn,
  .section-heading .btn,
  .copy-card-header .btn { width: auto; }
  .copy-card-header .btn { flex: 0 0 auto; }
  .copy-card-actions { flex-direction: row; align-items: center; justify-content: flex-end; }
}

/* v0.1-3 visual tightening */
.page { gap: 16px; }
.hero.card { padding: 20px; }
.hero h1 { font-size: 1.62rem; }
.hero p { font-size: 0.98rem; }
.intro-card { padding: 14px; }
.step { padding: 12px; background: #fff4ed; border: 1px solid #ffe3d4; }
.form-card { padding: 18px; }
.field { gap: 9px; margin-bottom: 15px; }
.field > span,
.field span:first-child { font-weight: 700; color: #374151; }
.field input,
.field textarea,
.field select { border-color: #eadfd8; background: #fffdfb; }
.form-card button[type="submit"] {
  width: 100%;
  background: #ff4f64;
  box-shadow: 0 10px 22px rgba(255,79,100,0.24);
}
.result-hero { border-color: #ffd6c8; background: linear-gradient(135deg, #fff 0%, #fff5ef 100%); }
.result-actions { align-items: stretch; }
.image-package { border-color: #ffd8c8; }
.section-heading { margin-bottom: 18px; }
.section-heading p { color: #7c6a62; }
.image-grid { gap: 18px; }
.image-card {
  border-color: #efd2c4;
  box-shadow: 0 12px 28px rgba(120, 72, 48, 0.08);
}
.image-card-header { padding: 14px 14px 12px; background: #fff8f4; }
.image-card-header strong { font-size: 1rem; }
.image-card-header span { color: #b19a8d; font-weight: 500; }
.image-card img { aspect-ratio: 3 / 4; }
.image-actions { padding: 14px; background: #fff; }
.btn-download { min-height: 48px; }
.copy-pack { gap: 16px; }
.copy-card { border-color: #eee4de; }
.copy-card-header { gap: 12px; }
.copy-card-header .copy-btn { min-height: 42px; padding-inline: 18px; }
.title-list { gap: 12px; }
.title-list li { background: #fffaf7; border: 1px solid #f0e1d8; padding: 12px 14px; }
.copy-content {
  background: #fffaf7;
  border: 1px solid #f0e1d8;
  padding: 16px;
  font-size: 0.98rem;
}
.tag-list { gap: 10px; }
.tag-list span { background: #fff0f4; border: 1px solid #ffd6e0; }
.comment-list { gap: 12px; }
.comment-list p { background: #fffaf7; border: 1px solid #f0e1d8; }

@media (min-width: 768px) {
  .page { gap: 18px; }
  .hero.card { padding: 26px; }
  .hero h1 { font-size: 2rem; }
  .intro-card,
  .form-card { padding: 22px; }
  .result-hero { padding: 28px; }
  .image-package { padding: 28px; }
  .image-grid { gap: 18px; }
  .copy-pack { gap: 18px; }
  .copy-card { padding: 22px; }
}

/* desktop layout width fix */
@media (min-width: 768px) {
  .page {
    width: min(1120px, calc(100% - 48px));
    max-width: 1120px;
  }

  .result-page {
    width: min(1280px, calc(100% - 48px));
    max-width: 1280px;
  }

  .hero.card,
  .intro-card,
  .form-card,
  .result-hero,
  .image-package,
  .copy-pack {
    width: 100%;
  }

  .image-grid {
    gap: 22px;
  }
}

.form-grid {
  display: grid;
  gap: 16px;
}

.form-media-column,
.form-fields-column {
  min-width: 0;
}

.form-fields-column {
  display: flex;
  flex-direction: column;
}

@media (min-width: 960px) {
  .home-page {
    width: min(1240px, calc(100% - 64px));
    max-width: 1240px;
  }

  .form-card {
    padding: 30px;
  }

  .form-media-column .field,
  .form-fields-column .field:last-of-type {
    margin-bottom: 0;
  }
}

@media (min-width: 1024px) {
  .page {
    padding-left: 0;
    padding-right: 0;
  }
}

/* v0.2-1 online trial polish */
.trial-card { display: flex; flex-direction: column; gap: 12px; }
.trial-grid { display: grid; gap: 12px; }
.trial-card h2 { margin: 0 0 8px; font-size: 1rem; }
.trial-card ul,
.feedback-questions { margin: 0; padding-left: 20px; color: #4b5563; line-height: 1.7; }
.trial-note,
.feedback-card p,
.regenerate-tip p { margin: 0; color: #7c6a62; line-height: 1.65; }
.regenerate-tip { display: flex; flex-direction: column; gap: 14px; background: #fffaf7; border-color: #f0e1d8; }
.regenerate-tip h2 { margin: 0 0 8px; font-size: 1.05rem; }
.regenerate-tip ul { margin: 8px 0 0; padding-left: 20px; color: #4b5563; line-height: 1.7; }
.regenerate-tip .btn { width: 100%; }
.feedback-card { border-color: #dbeafe; background: linear-gradient(135deg, #fff 0%, #f8fbff 100%); }
.feedback-questions { display: grid; gap: 6px; }

@media (min-width: 768px) {
  .trial-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
  .regenerate-tip { flex-direction: row; align-items: center; justify-content: space-between; }
  .regenerate-tip .btn { width: auto; flex: 0 0 auto; }
}

/* v0.2-6 home visual polish */
.home-page {
  width: calc(100% - 24px);
  max-width: none;
  margin: 0 auto;
  gap: 18px;
}

.home-hero {
  display: grid;
  gap: 22px;
  padding: 22px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 248, 244, 0.96) 0%, rgba(255, 255, 255, 0.98) 54%, rgba(247, 251, 255, 0.94) 100%);
  border-color: #f4ddd4;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hero-kicker,
.section-label {
  margin: 0;
  color: var(--home-brand);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.home-hero h1 {
  margin: 0;
  color: var(--home-ink);
  font-size: 2rem;
  line-height: 1.16;
}

.home-hero p {
  margin: 0;
  max-width: none;
  color: var(--home-text);
  font-size: 1rem;
  line-height: 1.75;
}

.hero-tags,
.pill-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags span,
.pill-grid span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid #f3e4dd;
  color: var(--home-ink-soft);
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(120, 72, 48, 0.045);
}

.hero-cta {
  align-self: flex-start;
  min-width: 136px;
}

.home-page .btn-primary,
.home-page .form-card button[type="submit"] {
  background: var(--home-brand);
  color: #fff;
  box-shadow: 0 10px 22px rgba(255, 79, 109, 0.24);
}

.home-page .btn-primary:hover,
.home-page .form-card button[type="submit"]:hover {
  background: var(--home-brand-deep);
}

.home-page .btn-secondary {
  background: var(--home-blue);
  color: #fff;
  box-shadow: 0 8px 18px rgba(47, 128, 237, 0.16);
}

.home-page .btn-ghost {
  background: rgba(255, 255, 255, 0.72);
  color: var(--home-ink-soft);
  border-color: #e6eaf0;
  box-shadow: none;
}

.hero-preview {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.result-preview {
  padding: 18px;
  border-radius: 24px;
  border: 1px solid rgba(240, 221, 212, 0.86);
  background:
    linear-gradient(180deg, rgba(255, 252, 249, 0.94) 0%, rgba(255, 246, 241, 0.84) 100%);
  box-shadow: 0 18px 44px rgba(136, 83, 62, 0.09);
}

.result-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.result-preview-header span {
  color: var(--home-brand);
  font-size: 0.86rem;
  font-weight: 800;
}

.result-preview-header strong {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #fff0f4;
  color: var(--home-ink);
  font-size: 0.88rem;
  font-weight: 800;
}

.result-preview-lead {
  margin: -2px 0 2px;
  color: var(--home-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.output-summary-list {
  display: grid;
  gap: 13px;
}

.output-summary-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 13px;
  align-items: start;
  padding: 15px;
  border-radius: 16px;
  border: 1px solid rgba(242, 227, 220, 0.84);
  background:
    linear-gradient(135deg, rgba(255, 252, 249, 0.94) 0%, rgba(255, 244, 240, 0.82) 100%);
  box-shadow: 0 12px 26px rgba(120, 72, 48, 0.055);
}

.output-summary-card:nth-child(2) {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92) 0%, rgba(247, 251, 255, 0.84) 100%);
}

.output-summary-card:nth-child(3) {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92) 0%, rgba(244, 250, 247, 0.84) 100%);
}

.output-index {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff0f4;
  border: 1px solid #ffd8e0;
  color: var(--home-brand);
  font-weight: 800;
  font-size: 0.86rem;
}

.output-summary-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.output-summary-card strong {
  display: block;
  color: var(--home-ink);
  font-size: 0.98rem;
  line-height: 1.35;
}

.output-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255, 240, 244, 0.88);
  color: var(--home-brand-deep);
  font-size: 0.76rem;
  font-weight: 800;
  white-space: nowrap;
}

.output-summary-card p {
  margin: 6px 0 0;
  color: var(--home-text);
  line-height: 1.55;
  font-size: 0.9rem;
}

.trial-card {
  display: grid;
  gap: 14px;
}

.info-panel {
  padding: 18px;
  border-radius: 18px;
  border: 1px solid #f0ddd4;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 10px 24px rgba(120, 72, 48, 0.05);
}

.info-panel .section-label {
  margin-bottom: 12px;
}

.muted-panel {
  background: rgba(255, 250, 247, 0.88);
}

.home-feedback {
  display: grid;
  gap: 16px;
  padding: 20px;
  border: 1px solid #d9e8ff;
  border-radius: 20px;
  background: linear-gradient(135deg, #fff4f7 0%, #f4f9ff 100%);
  box-shadow: 0 16px 36px rgba(80, 112, 160, 0.09);
}

.home-feedback h2,
.form-card-heading h2 {
  margin: 6px 0 8px;
  color: var(--home-ink);
  font-size: 1.22rem;
}

.home-feedback p,
.form-card-heading p {
  margin: 0;
  color: var(--home-text);
  line-height: 1.7;
}

.feedback-action {
  display: flex;
}

.feedback-action .btn {
  width: 100%;
}

.compact-steps {
  margin: 0 0 20px;
  padding: 4px 2px 8px;
  border: 0;
  background: transparent;
  gap: 14px;
}

.compact-steps .step {
  position: relative;
  align-items: flex-start;
  gap: 12px;
  padding: 0 0 20px;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.compact-steps .step:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 16px;
  top: 38px;
  bottom: 6px;
  width: 2px;
  background: #ffd8e0;
}

.compact-steps .step span {
  width: 34px;
  height: 34px;
  background: #fff0f4;
  border: 1px solid #ffd8e0;
  color: var(--home-brand);
  box-shadow: 0 8px 16px rgba(255, 79, 109, 0.12);
}

.compact-steps .step strong {
  display: block;
  color: var(--home-ink);
  font-size: 1rem;
}

.compact-steps .step p {
  margin: 5px 0 0;
  color: var(--home-muted);
  line-height: 1.55;
  font-size: 0.9rem;
}

.form-card {
  background: linear-gradient(180deg, #fff 0%, var(--home-warm) 100%);
}

.home-hero,
.form-card,
.trial-card,
.home-feedback {
  width: 100%;
  max-width: none;
}

.form-card-heading {
  margin-bottom: 18px;
}

.home-page .field > span,
.home-page .field span:first-child {
  color: var(--home-ink-soft);
}

.home-page .field input,
.home-page .field textarea,
.home-page .field select {
  color: var(--home-ink-soft);
  border-color: #eadfd8;
  background: rgba(255, 253, 251, 0.92);
}

.home-page .field input::placeholder,
.home-page .field textarea::placeholder {
  color: var(--home-faint);
}

.home-page .field small {
  color: var(--home-muted);
}

.home-page .upload-preview {
  border-color: #f3c8ba;
  background: linear-gradient(135deg, var(--home-warm) 0%, #fff 100%);
  color: var(--home-muted);
}

.home-page .upload-placeholder strong {
  color: var(--home-ink-soft);
}

.home-page .upload-placeholder span {
  color: var(--home-muted);
}

.account-bar {
  display: grid;
  gap: 14px;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #f0ddd4;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 248, 244, 0.78) 100%);
  box-shadow: 0 10px 24px rgba(120, 72, 48, 0.05);
}

.account-bar strong,
.account-bar span {
  display: block;
}

.account-bar strong {
  color: var(--home-ink);
  font-size: 0.98rem;
}

.account-bar span {
  margin-top: 4px;
  color: var(--home-text);
  font-size: 0.9rem;
  line-height: 1.5;
}

.account-bar .quota-status {
  color: var(--home-brand-deep);
  font-weight: 700;
}

.account-bar .quota-status-empty {
  color: #be123c;
}

.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.account-actions form {
  margin: 0;
}

.account-actions .btn {
  min-height: 40px;
  padding: 10px 14px;
}

.auth-page {
  min-height: 100vh;
  justify-content: center;
}

.auth-card {
  width: min(520px, 100%);
  margin: 0 auto;
  padding: 26px;
  background: linear-gradient(180deg, #fff 0%, #fffaf7 100%);
}

.auth-back {
  display: inline-flex;
  margin-bottom: 18px;
  color: #b85c49;
  font-weight: 700;
  text-decoration: none;
}

.auth-heading {
  display: grid;
  gap: 8px;
  margin-bottom: 20px;
}

.auth-heading h1,
.pricing-hero h1,
.pricing-card h2 {
  margin: 0;
  color: #1f2937;
}

.auth-heading h1 {
  font-size: 1.8rem;
  line-height: 1.18;
}

.auth-heading p,
.auth-switch,
.pricing-hero p {
  margin: 0;
  color: #6b5f59;
  line-height: 1.7;
}

.auth-form {
  display: grid;
  gap: 2px;
}

.auth-form .btn {
  width: 100%;
}

.auth-switch {
  margin-top: 18px;
  text-align: center;
}

.auth-switch a {
  color: #2f80ed;
  font-weight: 700;
  text-decoration: none;
}

.quota-empty-page {
  min-height: 100vh;
  justify-content: center;
}

.quota-empty-card {
  width: min(620px, 100%);
  margin: 0 auto;
  padding: 28px;
  background: linear-gradient(135deg, #fff8f4 0%, #fff 100%);
  border-color: #f0ddd4;
}

.quota-empty-card h1 {
  margin: 0 0 10px;
  color: var(--home-ink);
  font-size: 2rem;
  line-height: 1.18;
}

.quota-empty-card p {
  margin: 0;
  color: var(--home-text);
  line-height: 1.7;
}

.quota-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 22px;
}

.records-page {
  width: min(1120px, calc(100% - 24px));
  max-width: 1120px;
  gap: 18px;
}

.records-hero {
  display: grid;
  gap: 18px;
  padding: 26px;
  background: linear-gradient(135deg, #fff8f4 0%, #fff 100%);
  border-color: #f0ddd4;
}

.records-hero h1 {
  margin: 0 0 8px;
  color: var(--home-ink);
  font-size: 2rem;
  line-height: 1.18;
}

.records-hero p {
  margin: 0;
  color: var(--home-text);
  line-height: 1.7;
}

.records-quota {
  display: inline-flex;
  width: fit-content;
  margin-top: 12px !important;
  padding: 7px 12px;
  border-radius: 999px;
  background: #fff0f4;
  color: var(--home-brand-deep) !important;
  font-size: 0.9rem;
  font-weight: 800;
}

.records-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.records-summary-card {
  display: grid;
  gap: 6px;
  padding: 16px;
  background: linear-gradient(135deg, #fff8f4 0%, #fff 100%);
  border-color: #f0ddd4;
}

.records-summary-card span {
  color: var(--home-muted);
  font-size: 0.85rem;
  font-weight: 700;
}

.records-summary-card strong {
  color: var(--home-ink);
  font-size: 1.15rem;
  line-height: 1.25;
}

.records-card {
  overflow: hidden;
}

.records-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.records-table {
  width: 100%;
  border-collapse: collapse;
  color: var(--home-text);
  font-size: 0.92rem;
}

.records-table th,
.records-table td {
  padding: 13px 12px;
  border-bottom: 1px solid #f0e2dc;
  text-align: left;
  vertical-align: top;
}

.records-table th {
  color: var(--home-ink);
  background: #fff8f4;
  font-size: 0.85rem;
  font-weight: 800;
}

.records-table tr:last-child td {
  border-bottom: 0;
}

.records-engine-cell {
  display: grid;
  gap: 4px;
}

.records-engine-cell strong {
  color: var(--home-ink);
  font-size: 0.9rem;
  line-height: 1.35;
}

.records-engine-cell span {
  color: var(--home-muted);
  font-size: 0.8rem;
  line-height: 1.4;
  text-transform: none;
}

.records-empty {
  display: grid;
  gap: 10px;
  justify-items: start;
  padding: 8px;
}

.records-empty h2 {
  margin: 0;
  color: var(--home-ink);
  font-size: 1.15rem;
}

.records-empty p {
  margin: 0;
  color: var(--home-muted);
  line-height: 1.6;
}

.pricing-page {
  width: min(1320px, calc(100% - 24px));
  max-width: 1320px;
  gap: 22px;
}

.pricing-hero {
  display: grid;
  gap: 18px;
  padding: 26px;
  border-color: #f4ddd4;
  background:
    linear-gradient(135deg, rgba(255, 248, 244, 0.96) 0%, rgba(255, 255, 255, 0.98) 58%, rgba(247, 251, 255, 0.94) 100%);
  box-shadow: 0 18px 42px rgba(120, 72, 48, 0.07);
}

.pricing-hero-copy {
  display: grid;
  gap: 10px;
}

.pricing-hero h1 {
  color: var(--home-ink);
  font-size: 2.35rem;
  line-height: 1.14;
}

.pricing-hero p {
  max-width: 680px;
  color: var(--home-text);
}

.pricing-account-note {
  display: inline-flex;
  width: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  background: #fff0f4;
  color: var(--home-brand-deep) !important;
  font-size: 0.9rem;
  font-weight: 800;
}

.pricing-grid {
  display: grid;
  gap: 16px;
}

.pricing-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 300px;
  padding: 20px;
  overflow: hidden;
  border-color: #f0ddd4;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 248, 244, 0.88) 100%);
  box-shadow: 0 14px 34px rgba(120, 72, 48, 0.07);
}

.pricing-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--home-brand) 0%, rgba(255, 79, 109, 0.18) 100%);
  opacity: 0.45;
}

.pricing-card-head {
  display: grid;
  gap: 8px;
}

.pricing-card.featured {
  border-color: #ffd8e0;
  background:
    linear-gradient(180deg, rgba(255, 252, 249, 0.98) 0%, rgba(255, 240, 244, 0.82) 100%);
  box-shadow: 0 20px 44px rgba(255, 79, 109, 0.14);
}

.pricing-card.featured::before {
  opacity: 0.9;
}

.plan-badge {
  align-self: flex-start;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #fff0f4;
  color: var(--home-brand-deep);
  font-size: 0.8rem;
  font-weight: 800;
}

.plan-price {
  margin: 0;
  color: var(--home-brand);
  font-size: 1.52rem;
  font-weight: 800;
}

.pricing-card h2 {
  color: var(--home-ink);
  font-size: 1.08rem;
}

.pricing-card ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 17px;
  color: var(--home-text);
  line-height: 1.52;
  font-size: 0.92rem;
}

.pricing-card li::marker {
  color: var(--home-brand);
}

.pricing-card .btn {
  width: 100%;
  margin-top: auto;
  min-height: 42px;
  padding: 10px 12px;
  white-space: nowrap;
}

.pricing-page .btn-primary {
  background: var(--home-brand);
  color: #fff;
  box-shadow: 0 10px 22px rgba(255, 79, 109, 0.24);
}

.pricing-page .btn-primary:hover {
  background: var(--home-brand-deep);
}

.pricing-page .btn-ghost {
  background: rgba(255, 255, 255, 0.72);
  color: var(--home-ink-soft);
  border-color: #e6eaf0;
  box-shadow: none;
}

.pricing-card .btn:disabled {
  color: var(--home-muted);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid #e6eaf0;
  box-shadow: none;
}

@media (min-width: 768px) {
  .home-page {
    width: min(1240px, calc(100% - 64px));
    max-width: 1240px;
    gap: 22px;
  }

  .home-hero {
    padding: 36px;
  }

  .account-bar {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .compact-heading {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .compact-heading .btn {
    width: auto;
  }

  .record-item {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .record-meta {
    justify-content: flex-end;
    text-align: right;
  }

  .quota-result-tip {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .quota-result-tip .btn,
  .quota-actions .btn {
    width: auto;
  }

  .quota-actions {
    flex-direction: row;
  }

  .home-hero h1 {
    font-size: 2.7rem;
  }

  .trial-card {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .home-feedback {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    padding: 24px;
  }

  .feedback-action .btn {
    width: auto;
    min-width: 160px;
  }

  .compact-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
  }

  .compact-steps .step {
    padding: 0;
  }

  .compact-steps .step:not(:last-child)::after {
    left: calc(100% - 3px);
    top: 16px;
    bottom: auto;
    width: 34px;
    height: 2px;
  }

  .auth-card {
    padding: 34px;
  }

  .pricing-page {
    width: min(1320px, calc(100% - 64px));
  }

  .pricing-hero {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
  }

  .pricing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .records-page {
    width: min(1120px, calc(100% - 64px));
  }

  .records-hero {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
  }

  .records-summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .home-hero {
    grid-template-columns: minmax(0, 0.52fr) minmax(380px, 0.48fr);
    gap: 36px;
    align-items: center;
  }

  .home-hero h1 {
    font-size: 3rem;
  }

  .form-grid {
    grid-template-columns: minmax(0, 0.44fr) minmax(0, 0.56fr);
    gap: 32px;
    align-items: start;
  }

  .form-media-column .upload-preview {
    min-height: 320px;
  }

  .form-media-column .upload-preview.has-image {
    min-height: 340px;
  }
}

@media (min-width: 1180px) {
  .form-grid {
    grid-template-columns: minmax(420px, 0.95fr) minmax(520px, 1.05fr);
  }
}

@media (min-width: 1200px) {
  .pricing-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .home-page {
    width: calc(100% - 24px);
    max-width: none;
  }

  .home-hero,
  .form-grid,
  .trial-card,
  .compact-steps,
  .home-feedback {
    grid-template-columns: 1fr;
  }

  .compact-steps .step {
    padding: 0 0 20px;
  }

  .compact-steps .step:not(:last-child)::after {
    left: 16px;
    top: 38px;
    bottom: 6px;
    width: 2px;
    height: auto;
  }

  .records-table,
  .records-table thead,
  .records-table tbody,
  .records-table tr,
  .records-table th,
  .records-table td {
    display: block;
  }

  .records-table thead {
    display: none;
  }

  .records-table tbody {
    display: grid;
    gap: 10px;
  }

  .records-table tr {
    padding: 12px;
    border: 1px solid #f0ddd4;
    border-radius: 8px;
    background: #fffaf7;
  }

  .records-table td {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 10px;
    padding: 7px 0;
    border: 0;
  }

  .records-table td::before {
    content: attr(data-label);
    color: var(--home-muted);
    font-weight: 700;
  }
}
