:root {
  --ink: #14211f;
  --ink-soft: #586764;
  --teal: #0f786f;
  --teal-dark: #095c55;
  --teal-pale: #e7f4f1;
  --yellow: #ffd94a;
  --snow: #f4f7f6;
  --white: #ffffff;
  --line: #dce5e2;
  --dark: #102b28;
  --shadow: 0 18px 55px rgba(17, 55, 50, 0.11);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--white);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", Arial, sans-serif;
  line-height: 1.6;
  letter-spacing: 0;
}

button,
input,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: absolute;
  z-index: 20;
  top: 0;
  left: 0;
  width: 100%;
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 5vw;
  color: var(--white);
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
}

.wordmark {
  display: flex;
  align-items: baseline;
  gap: 11px;
  min-width: max-content;
}

.wordmark span {
  font-size: 21px;
  font-weight: 900;
}

.wordmark small {
  font-size: 12px;
  opacity: 0.78;
}

.desktop-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  font-size: 13px;
}

.desktop-nav a {
  opacity: 0.82;
  transition: opacity 180ms ease;
}

.desktop-nav a:hover {
  opacity: 1;
}

.header-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 18px;
  color: var(--ink);
  background: var(--yellow);
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
}

.hero {
  position: relative;
  min-height: 660px;
  height: min(82vh, 820px);
  overflow: hidden;
  display: flex;
  align-items: center;
  color: var(--white);
  background: #315e59;
}

.hero-slides,
.hero-image,
.hero-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-image {
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 900ms ease, transform 6s ease;
}

.hero-image.is-active {
  opacity: 1;
  transform: scale(1);
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(5, 34, 31, 0.82) 0%, rgba(5, 34, 31, 0.58) 34%, rgba(5, 34, 31, 0.08) 68%, rgba(5, 34, 31, 0.12) 100%),
    linear-gradient(0deg, rgba(5, 34, 31, 0.28), transparent 35%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(630px, 86vw);
  margin-left: 8vw;
  padding-top: 60px;
}

.signal-label,
.yellow-label {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 28px;
  padding: 3px 10px;
  color: var(--ink);
  background: var(--yellow);
  border-radius: 3px;
  font-size: 12px;
  font-weight: 800;
}

.hero h1 {
  max-width: 620px;
  margin: 24px 0 18px;
  font-size: clamp(50px, 6vw, 88px);
  line-height: 1.02;
  font-weight: 900;
}

.hero-content p {
  max-width: 470px;
  margin: 0 0 32px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

.primary-link {
  display: inline-flex;
  align-items: center;
  gap: 26px;
  min-height: 52px;
  padding: 0 24px;
  color: var(--white);
  background: var(--teal);
  border-radius: 4px;
  font-weight: 700;
  transition: transform 180ms ease, background 180ms ease;
}

.primary-link:hover {
  transform: translateY(-2px);
  background: var(--teal-dark);
}

.hero-note {
  position: absolute;
  right: 5vw;
  bottom: 32px;
  z-index: 2;
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 13px 18px;
  border-left: 3px solid var(--yellow);
  background: rgba(6, 42, 38, 0.7);
  backdrop-filter: blur(10px);
}

.hero-note strong {
  font-size: 21px;
}

.hero-note span {
  font-size: 12px;
  opacity: 0.78;
}

.hero-dots {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 30px;
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
}

.hero-dots button {
  width: 28px;
  height: 4px;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.42);
  transition: width 180ms ease, background 180ms ease;
}

.hero-dots button.is-active {
  width: 44px;
  background: var(--yellow);
}

.generator-section,
.library-section {
  padding: 96px max(5vw, 24px);
  background: var(--snow);
}

.section-heading {
  width: min(720px, 100%);
  margin: 0 auto 38px;
  display: grid;
  grid-template-columns: 1fr;
  align-items: end;
  gap: 16px;
}

.section-heading h2,
.rules-heading h2,
.checklist-copy h2 {
  margin: 8px 0 0;
  font-size: clamp(34px, 4vw, 54px);
  line-height: 1.14;
}

.section-heading > p,
.rules-heading > p,
.checklist-copy > p {
  margin: 0;
  color: var(--ink-soft);
}

.eyebrow {
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
}

.generator-layout {
  width: min(720px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  align-items: stretch;
  border: 1px solid var(--line);
  background: var(--white);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  overflow: hidden;
}

.generator-form,
.result-panel {
  min-width: 0;
  padding: 38px;
}

.generator-form {
  border-bottom: 1px solid var(--line);
}

.form-intro,
.result-toolbar,
.copy-block-heading,
.result-meta,
.assistant-header > div,
.assistant-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.form-intro {
  margin-bottom: 28px;
}

.form-intro p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
}

.form-intro p span,
.field b {
  color: #dc594e;
}

.step-badge {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 2px 9px;
  color: var(--teal-dark);
  background: var(--teal-pale);
  border-radius: 3px;
  font-size: 12px;
  font-weight: 800;
}

.step-badge-dark {
  color: var(--white);
  background: var(--teal);
}

.field {
  display: block;
  margin: 0 0 24px;
  padding: 0;
  border: 0;
}

.field > span,
.field legend {
  display: block;
  margin-bottom: 9px;
  padding: 0;
  font-size: 14px;
  font-weight: 700;
}

.field legend small {
  display: inline;
  margin-left: 8px;
  color: #788582;
  font-size: 11px;
  font-weight: 400;
}

.field input[type="text"],
.field textarea {
  width: 100%;
  border: 1px solid #cbd8d5;
  border-radius: 5px;
  outline: none;
  background: #fbfcfc;
  transition: border 160ms ease, box-shadow 160ms ease;
}

.field input[type="text"] {
  height: 48px;
  padding: 0 14px;
}

.field textarea {
  resize: vertical;
  min-height: 108px;
  padding: 12px 14px;
}

.field input[type="text"]:focus,
.field textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 120, 111, 0.12);
}

.field small {
  display: block;
  margin-top: 5px;
  color: #788582;
  text-align: right;
}

.choice-grid,
.feeling-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.choice-grid label,
.feeling-grid label,
.segment-control label {
  position: relative;
  min-width: 0;
}

.choice-grid input,
.feeling-grid input,
.segment-control input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice-grid span,
.feeling-grid span,
.segment-control span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 42px;
  padding: 7px 6px;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--white);
  font-size: 12px;
  text-align: center;
  transition: color 160ms ease, border 160ms ease, background 160ms ease;
}

.choice-grid input:checked + span,
.feeling-grid input:checked + span,
.segment-control input:checked + span {
  color: var(--teal-dark);
  border-color: var(--teal);
  background: var(--teal-pale);
  font-weight: 700;
}

.feeling-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.feeling-grid span {
  min-height: 46px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 8px 11px;
  text-align: left;
}

.feeling-grid span em {
  margin-bottom: 2px;
  color: #899491;
  font-size: 9px;
  font-style: normal;
  font-weight: 500;
}

.feeling-grid input:checked + span em {
  color: var(--teal);
}

.feeling-grid input:checked + span::before {
  content: "✓";
  position: absolute;
  top: 8px;
  right: 9px;
  margin-right: 6px;
  color: var(--teal);
  font-weight: 900;
}

.feeling-empty {
  grid-column: 1 / -1;
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 18px;
  color: #7b8885;
  border: 1px dashed #c8d6d3;
  border-radius: 5px;
  background: #fbfcfc;
  font-size: 12px;
  text-align: center;
}

.segment-control {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.consent-line {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 20px;
  color: var(--ink-soft);
  font-size: 12px;
}

.consent-line input,
.checklist input {
  accent-color: var(--teal);
}

.consent-line input {
  width: 17px;
  height: 17px;
  margin: 1px 0 0;
  flex: 0 0 auto;
}

.generate-button,
.copy-all-button {
  width: 100%;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 20px;
  color: var(--white);
  border: 0;
  border-radius: 4px;
  background: var(--teal);
  font-weight: 800;
  transition: background 160ms ease, transform 160ms ease;
}

.generate-button:hover,
.copy-all-button:hover {
  background: var(--teal-dark);
  transform: translateY(-1px);
}

.form-tip {
  margin: 10px 0 0;
  color: #7b8885;
  font-size: 11px;
  text-align: center;
}

.result-panel {
  display: flex;
  flex-direction: column;
  background: #fbfdfc;
}

.result-toolbar h3 {
  margin: 8px 0 0;
  font-size: 24px;
}

.text-button {
  min-width: 72px;
  min-height: 36px;
  color: var(--teal);
  border: 1px solid var(--teal);
  border-radius: 4px;
  background: transparent;
  font-size: 13px;
}

.text-button:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.generated-result {
  margin-top: 18px;
}

.copy-block {
  margin: 0 0 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--white);
}

.copy-block-heading {
  margin-bottom: 12px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
}

.copy-block-heading button {
  padding: 4px 8px;
  color: var(--teal);
  border: 0;
  background: transparent;
  font-size: 12px;
  font-weight: 700;
}

.copy-block p {
  margin: 0;
  white-space: pre-line;
}

#generated-title {
  font-size: 18px;
  font-weight: 800;
}

.body-block {
  min-height: 265px;
}

#generated-body {
  font-size: 14px;
  line-height: 1.9;
}

.result-meta {
  margin: 12px 0;
  color: #788582;
  font-size: 11px;
}

.copy-all-button {
  background: var(--dark);
}

.photo-section {
  padding: 96px max(5vw, 24px);
  color: var(--white);
  background: var(--dark);
}

.light-heading .eyebrow {
  color: #82d0c8;
}

.light-heading > p {
  color: rgba(255, 255, 255, 0.62);
}

.photo-grid {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.photo-guide {
  position: relative;
  min-width: 0;
  padding: 30px 30px 10px;
  border-right: 1px solid rgba(255, 255, 255, 0.15);
}

.photo-guide:first-child {
  padding-left: 0;
}

.photo-guide:last-child {
  padding-right: 0;
  border-right: 0;
}

.guide-number {
  color: #83c9c2;
  font-size: 12px;
  font-weight: 900;
}

.photo-reference {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  margin: 22px 0 25px;
  object-fit: cover;
  object-position: center;
  border-radius: 4px;
  background: #183a36;
}

.photo-guide h3 {
  margin: 0 0 10px;
  font-size: 19px;
}

.photo-guide p {
  min-height: 100px;
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 13px;
}

.photo-tag {
  display: inline-flex;
  padding: 4px 8px;
  color: var(--yellow);
  border: 1px solid rgba(255, 217, 74, 0.45);
  border-radius: 3px;
  font-size: 11px;
}

.library-section {
  background: var(--white);
}

.library-toolbar {
  width: min(1180px, 100%);
  margin: 0 auto 22px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
}

.library-toolbar button {
  min-width: 104px;
  min-height: 40px;
  padding: 0 15px;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--white);
}

.library-toolbar button[aria-selected="true"] {
  color: var(--white);
  border-color: var(--teal);
  background: var(--teal);
}

.title-list {
  width: min(1180px, 100%);
  margin: 0 auto;
  border-top: 1px solid var(--line);
}

.title-option {
  width: 100%;
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) 80px;
  align-items: center;
  gap: 14px;
  min-height: 74px;
  padding: 12px 8px;
  color: var(--ink);
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
}

.title-option:hover {
  background: var(--teal-pale);
}

.title-option > span:first-child {
  color: #93a09d;
  font-size: 12px;
}

.title-option strong {
  min-width: 0;
  font-size: 15px;
}

.title-option > span:last-child {
  color: var(--teal);
  font-size: 12px;
  text-align: right;
}

.rules-section {
  padding: 96px max(5vw, 24px);
  background: var(--teal-pale);
}

.rules-content {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  gap: 80px;
  align-items: start;
}

.rules-heading {
  position: sticky;
  top: 32px;
}

.rules-heading > p {
  margin: 22px 0;
  max-width: 470px;
}

.rules-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid #bcd7d2;
}

.rules-list li {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 16px;
  padding: 24px 0;
  border-bottom: 1px solid #bcd7d2;
}

.rules-list li > span {
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
}

.rules-list strong {
  display: block;
  margin-bottom: 4px;
  font-size: 18px;
}

.rules-list p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.checklist-section {
  padding: 96px max(5vw, 24px);
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 80px;
  width: min(1180px, calc(100% - max(10vw, 48px)));
  margin: 0 auto;
}

.checklist-copy > p {
  margin: 18px 0 24px;
}

.progress-track {
  width: min(340px, 100%);
  height: 6px;
  overflow: hidden;
  background: var(--line);
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--teal);
  transition: width 200ms ease;
}

.checklist-copy > strong {
  display: block;
  margin-top: 10px;
  color: var(--teal);
  font-size: 13px;
}

.checklist {
  border-top: 1px solid var(--line);
}

.checklist label {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 62px;
  padding: 8px 2px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.checklist input {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.checklist input:checked + span {
  color: #7b8885;
  text-decoration: line-through;
}

footer {
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 36px max(5vw, 24px);
  color: var(--white);
  background: #0a1e1b;
}

.footer-brand {
  display: flex;
  flex-direction: column;
}

.footer-brand strong {
  font-size: 25px;
}

.footer-brand span,
footer a {
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
}

.assistant-launcher {
  position: fixed;
  z-index: 40;
  right: 22px;
  bottom: 22px;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 16px;
  color: var(--white);
  border: 0;
  border-radius: 24px;
  background: var(--dark);
  box-shadow: 0 12px 35px rgba(4, 30, 27, 0.26);
  font-size: 13px;
  font-weight: 700;
}

.assistant-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 0 4px rgba(255, 217, 74, 0.15);
}

.assistant-panel {
  position: fixed;
  z-index: 50;
  right: 22px;
  bottom: 82px;
  width: min(380px, calc(100vw - 32px));
  height: min(560px, calc(100vh - 120px));
  overflow: hidden;
  border: 1px solid #cfdcd8;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 24px 70px rgba(4, 30, 27, 0.24);
}

.assistant-header {
  height: 68px;
  padding: 0 17px;
  color: var(--white);
  background: var(--dark);
}

.assistant-header > div {
  justify-content: flex-start;
}

.assistant-header strong,
.assistant-header small {
  display: block;
}

.assistant-header small {
  color: rgba(255, 255, 255, 0.55);
  font-size: 10px;
}

.assistant-header button {
  width: 34px;
  height: 34px;
  color: var(--white);
  border: 0;
  background: transparent;
  font-size: 25px;
}

.assistant-messages {
  height: calc(100% - 177px);
  overflow-y: auto;
  padding: 18px;
  background: #f5f8f7;
}

.message {
  width: fit-content;
  max-width: 88%;
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.65;
  white-space: pre-line;
}

.assistant-message {
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
}

.user-message {
  margin-left: auto;
  color: var(--white);
  background: var(--teal);
}

.quick-questions {
  height: 46px;
  display: flex;
  gap: 6px;
  padding: 7px 10px;
  overflow-x: auto;
  border-top: 1px solid var(--line);
  background: var(--white);
}

.quick-questions button {
  min-width: max-content;
  padding: 0 9px;
  color: var(--teal);
  border: 1px solid #bdd9d5;
  border-radius: 14px;
  background: var(--white);
  font-size: 10px;
}

.assistant-form {
  height: 63px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid var(--line);
  background: var(--white);
}

.assistant-form input {
  min-width: 0;
  padding: 0 11px;
  border: 1px solid #cad7d4;
  border-radius: 4px;
  outline: none;
}

.assistant-form input:focus {
  border-color: var(--teal);
}

.assistant-form button {
  color: var(--white);
  border: 0;
  border-radius: 4px;
  background: var(--teal);
  font-size: 12px;
  font-weight: 700;
}

.toast {
  position: fixed;
  z-index: 70;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 18px);
  padding: 10px 16px;
  color: var(--white);
  border-radius: 4px;
  background: var(--dark);
  box-shadow: var(--shadow);
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 980px) {
  .desktop-nav {
    display: none;
  }

  .hero-image {
    object-position: center;
  }

  .section-heading,
  .generator-layout {
    width: min(680px, 100%);
  }

  .generator-layout {
    grid-template-columns: 1fr;
  }

  .generator-form {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .photo-grid {
    width: min(680px, 100%);
    grid-template-columns: 1fr;
  }

  .photo-guide,
  .photo-guide:first-child,
  .photo-guide:last-child {
    padding: 28px 0;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  }

  .photo-guide:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 760px) {
  .site-header {
    position: absolute;
    height: 60px;
    gap: 12px;
    padding:
      env(safe-area-inset-top)
      max(16px, env(safe-area-inset-right))
      0
      max(16px, env(safe-area-inset-left));
  }

  .wordmark span {
    font-size: 18px;
  }

  .wordmark small {
    display: none;
  }

  .header-action {
    min-height: 38px;
    padding: 0 13px;
    font-size: 12px;
  }

  .hero {
    min-height: 520px;
    height: min(82dvh, 650px);
    align-items: flex-end;
  }

  .hero-image {
    object-position: center;
  }

  .hero-overlay {
    background:
      linear-gradient(0deg, rgba(5, 34, 31, 0.9) 0%, rgba(5, 34, 31, 0.45) 57%, rgba(5, 34, 31, 0.18) 100%);
  }

  .hero-content {
    width: 100%;
    margin: 0;
    padding:
      0
      max(18px, env(safe-area-inset-right))
      66px
      max(18px, env(safe-area-inset-left));
  }

  .signal-label {
    min-height: 25px;
    padding: 2px 8px;
    font-size: 10px;
  }

  .hero h1 {
    max-width: 360px;
    margin: 13px 0 10px;
    font-size: 39px;
    line-height: 1.04;
  }

  .hero-content p {
    max-width: 300px;
    margin-bottom: 18px;
    font-size: 14px;
    line-height: 1.55;
  }

  .primary-link {
    min-height: 46px;
    gap: 18px;
    padding: 0 18px;
    font-size: 14px;
  }

  .hero-note {
    display: none;
  }

  .hero-dots {
    left: auto;
    right: max(18px, env(safe-area-inset-right));
    bottom: 20px;
    transform: none;
  }

  .generator-section,
  .photo-section {
    padding:
      52px
      max(16px, env(safe-area-inset-right))
      56px
      max(16px, env(safe-area-inset-left));
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 24px;
  }

  .section-heading h2 {
    margin-top: 5px;
    font-size: 29px;
    line-height: 1.18;
  }

  .section-heading > p {
    font-size: 13px;
    line-height: 1.7;
  }

  .generator-layout {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .generator-form,
  .result-panel {
    padding: 22px 16px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--white);
    box-shadow: 0 10px 28px rgba(17, 55, 50, 0.08);
  }

  .generator-form {
    margin-bottom: 12px;
  }

  .result-panel {
    min-height: 82px;
  }

  .form-intro {
    margin-bottom: 22px;
  }

  .field {
    margin-bottom: 22px;
  }

  .field > span,
  .field legend {
    margin-bottom: 10px;
    font-size: 15px;
  }

  .field input[type="text"] {
    height: 50px;
    font-size: 16px;
  }

  .choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .choice-grid span,
  .segment-control span {
    min-height: 48px;
    padding: 8px;
    font-size: 13px;
  }

  .feeling-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .feeling-grid span {
    min-height: 54px;
    padding: 9px 34px 9px 12px;
    font-size: 13px;
  }

  .feeling-grid span em {
    font-size: 10px;
  }

  .segment-control {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .consent-line {
    gap: 11px;
    font-size: 13px;
    line-height: 1.55;
  }

  .consent-line input {
    width: 20px;
    height: 20px;
  }

  .generate-button,
  .copy-all-button {
    min-height: 52px;
    font-size: 15px;
  }

  .form-tip {
    padding: 0 8px;
    line-height: 1.55;
  }

  .result-toolbar {
    align-items: flex-start;
  }

  .result-toolbar h3 {
    margin-top: 5px;
    font-size: 20px;
  }

  .text-button {
    min-width: auto;
    min-height: 42px;
    padding: 0 11px;
    font-size: 12px;
  }

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

  .copy-block {
    padding: 15px;
  }

  #generated-title {
    font-size: 17px;
    line-height: 1.55;
  }

  .body-block {
    min-height: 0;
  }

  #generated-body {
    font-size: 14px;
    line-height: 1.85;
  }

  .photo-grid {
    width: calc(100% + 16px);
    display: flex;
    gap: 12px;
    margin-right: -16px;
    padding: 0 16px 8px 0;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    border-top: 0;
  }

  .photo-grid::-webkit-scrollbar {
    display: none;
  }

  .photo-guide,
  .photo-guide:first-child,
  .photo-guide:last-child {
    width: min(82vw, 330px);
    flex: 0 0 min(82vw, 330px);
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.04);
    scroll-snap-align: start;
  }

  .photo-reference {
    margin: 14px 0 18px;
    border-radius: 5px;
  }

  .photo-guide h3 {
    font-size: 18px;
  }

  .photo-guide p {
    min-height: 82px;
    margin-bottom: 14px;
    font-size: 12px;
  }

  footer {
    min-height: 126px;
    align-items: center;
    flex-direction: row;
    padding:
      28px
      max(18px, env(safe-area-inset-right))
      calc(28px + env(safe-area-inset-bottom))
      max(18px, env(safe-area-inset-left));
  }

  .footer-brand strong {
    font-size: 20px;
  }

  .footer-brand span {
    font-size: 10px;
  }

  .assistant-launcher {
    right: max(12px, env(safe-area-inset-right));
    bottom: calc(12px + env(safe-area-inset-bottom));
    min-height: 46px;
  }

  .assistant-panel {
    right: max(8px, env(safe-area-inset-right));
    bottom: calc(68px + env(safe-area-inset-bottom));
    width: calc(100vw - max(16px, env(safe-area-inset-left) + env(safe-area-inset-right)));
    height: min(560px, calc(100dvh - 84px - env(safe-area-inset-top)));
  }

  .toast {
    max-width: calc(100vw - 32px);
    bottom: calc(74px + env(safe-area-inset-bottom));
    text-align: center;
  }
}

@media (max-width: 370px) {
  .hero h1 {
    font-size: 34px;
  }

  .choice-grid {
    grid-template-columns: 1fr;
  }

  .generator-form,
  .result-panel {
    padding: 20px 14px;
  }

  .photo-guide,
  .photo-guide:first-child,
  .photo-guide:last-child {
    width: 84vw;
    flex-basis: 84vw;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
