:root {
  --paper: #f8f0df;
  --paper-light: #fffaf0;
  --ink: #263b3a;
  --ink-soft: #5d736f;
  --coral: #e76f51;
  --coral-deep: #b84935;
  --sky: #b8d9d3;
  --sky-deep: #4f8581;
  --sun: #f2b94b;
  --plum: #6d546f;
  --line: rgb(38 59 58 / 0.28);
  --focus: #174a91;
  --shadow: 0 22px 70px rgb(38 59 58 / 0.12);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 8%, rgb(231 111 81 / 0.12), transparent 24rem),
    radial-gradient(circle at 88% 40%, rgb(79 133 129 / 0.13), transparent 31rem),
    #eee5d5;
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", "Noto Sans TC", sans-serif;
  line-height: 1.6;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(rgb(38 59 58 / 0.12) 0.65px, transparent 0.75px);
  background-size: 8px 8px;
  opacity: 0.28;
  pointer-events: none;
}

button,
input,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

button,
a,
input,
textarea {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  z-index: 100;
  left: 15px;
  top: -70px;
  padding: 12px 16px;
  background: var(--ink);
  color: #fff;
}

.skip-link:focus {
  top: 15px;
}

.app-shell {
  width: min(100%, 1180px);
  min-height: 100dvh;
  margin: 0 auto;
  background: rgb(248 240 223 / 0.92);
  box-shadow: 0 0 100px rgb(38 59 58 / 0.1);
}

.app-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  min-height: 74px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  background: rgb(255 250 240 / 0.76);
  backdrop-filter: blur(10px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--sun);
  transform: rotate(-4deg);
}

.brand-mark svg {
  width: 34px;
  fill: none;
  stroke: var(--ink);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.4;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 17px;
  letter-spacing: 0.04em;
}

.brand small {
  margin-top: -2px;
  color: var(--ink-soft);
  font: 700 8px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.privacy-note {
  margin: 0;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
  text-decoration-color: var(--sky-deep);
  text-underline-offset: 3px;
}

.privacy-note span {
  display: inline-grid;
  width: 19px;
  height: 19px;
  margin-right: 4px;
  place-items: center;
  border: 1px solid var(--sky-deep);
  border-radius: 50%;
  color: var(--sky-deep);
}

.journey-steps {
  position: relative;
  z-index: 10;
  padding: 0 18px;
  background: var(--ink);
  color: #d9e5df;
}

.journey-steps ol {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 680px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.journey-steps li {
  position: relative;
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  opacity: 0.48;
}

.journey-steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  right: -4px;
  width: 8px;
  height: 8px;
  border-right: 1px solid #8ba39d;
  border-top: 1px solid #8ba39d;
  transform: rotate(45deg);
}

.journey-steps li[aria-current="step"] {
  color: #fff6dd;
  opacity: 1;
}

.journey-steps li[aria-current="step"]::before {
  content: "";
  position: absolute;
  left: 24%;
  right: 24%;
  bottom: 0;
  height: 4px;
  border-radius: 4px 4px 0 0;
  background: var(--sun);
}

.journey-steps span {
  color: var(--sun);
  font: 700 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.journey-steps strong {
  font-size: 11px;
  letter-spacing: 0.03em;
}

.app-view {
  min-height: 70vh;
}

.input-view {
  position: relative;
  overflow: hidden;
  padding: 42px 18px 76px;
  background:
    linear-gradient(180deg, #f5c8ba 0, #f8f0df 26rem),
    var(--paper);
}

.input-scene {
  width: calc(100% + 36px);
  margin: -42px -18px 12px;
  overflow: hidden;
}

.input-scene svg {
  display: block;
  width: 100%;
  min-width: 560px;
  margin-left: 50%;
  transform: translateX(-50%);
}

.input-scene .sun {
  fill: var(--sun);
}

.input-scene .cloud {
  fill: #fff9eb;
  stroke: var(--ink);
  stroke-width: 2;
}

.input-scene .mountain-back {
  fill: #a9ccc4;
  stroke: #496c68;
  stroke-width: 2;
}

.input-scene .mountain-front {
  fill: #6b9e94;
  stroke: #355f5c;
  stroke-width: 2;
}

.input-scene .rail {
  fill: none;
  stroke: var(--ink);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 2 11;
}

.input-scene .train {
  fill: var(--coral);
  stroke: var(--ink);
  stroke-width: 3;
  animation: train-arrives 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.input-scene .train path:nth-child(2) {
  fill: #fff9eb;
}

.input-scene .train circle {
  fill: var(--sun);
}

.input-scene .foreground {
  fill: #355f58;
}

.input-copy {
  position: relative;
  z-index: 2;
  max-width: 770px;
  margin: 0 auto 30px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--coral-deep);
  font: 800 11px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.12em;
}

.input-copy h1,
.view-heading h1 {
  margin: 0;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif TC", serif;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

.input-copy h1 {
  max-width: 11em;
  font-size: clamp(34px, 9.5vw, 64px);
}

.input-copy h1 span {
  position: relative;
  display: inline;
  background: linear-gradient(transparent 68%, rgb(242 185 75 / 0.65) 68%);
}

.lead {
  max-width: 560px;
  margin: 20px 0 0;
  color: #415c58;
  font-size: 15px;
  line-height: 1.9;
}

.source-sheet {
  position: relative;
  z-index: 3;
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 28px 20px 22px;
  border: 2px solid var(--ink);
  background:
    linear-gradient(90deg, transparent 38px, rgb(231 111 81 / 0.25) 38px, rgb(231 111 81 / 0.25) 39px, transparent 39px),
    repeating-linear-gradient(to bottom, transparent 0 37px, rgb(79 133 129 / 0.16) 37px 38px),
    #fffaf0;
  box-shadow: 8px 9px 0 var(--sky-deep), var(--shadow);
  transform: rotate(-0.35deg);
}

.sheet-tape {
  position: absolute;
  top: -13px;
  left: 50%;
  width: 105px;
  height: 25px;
  background: rgb(245 220 156 / 0.78);
  transform: translateX(-50%) rotate(1.5deg);
}

.field-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.field-heading > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.field-heading label {
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 18px;
  font-weight: 800;
}

.field-number {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border-radius: 50%;
  background: var(--coral);
  color: #fff;
  font-family: serif;
  font-size: 14px;
}

.text-button,
.quiet-action,
.add-action,
.remove-action {
  min-height: 44px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-weight: 800;
}

.text-button {
  padding: 7px 2px;
  color: var(--coral-deep);
  font-size: 12px;
  text-decoration: underline;
  text-decoration-style: wavy;
  text-underline-offset: 4px;
}

.source-sheet textarea {
  width: 100%;
  min-height: 320px;
  resize: vertical;
  padding: 15px 12px 15px 28px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 16px;
  line-height: 2.35;
}

.source-sheet textarea::placeholder {
  color: #7d8c85;
  opacity: 1;
}

.field-hint {
  margin: 12px 0 18px;
  padding-left: 28px;
  color: var(--ink-soft);
  font-size: 11px;
}

.document-upload {
  display: grid;
  gap: 7px;
  margin: 14px 0 0 28px;
  padding: 15px;
  border: 1px dashed var(--sky-deep);
  background: #e7f1eb;
}

.document-upload label { font-size: 13px; font-weight: 800; }
.document-upload input { max-width: 100%; font-size: 12px; }
.document-upload p { margin: 0; color: var(--ink-soft); font-size: 11px; line-height: 1.6; }
.import-status { margin: 0 0 14px 28px; padding: 12px; background: #e7f1eb; color: var(--ink); font-size: 12px; line-height: 1.6; }
.import-confirm { display: flex; align-items: center; gap: 8px; margin: 0 0 16px 28px; font-size: 12px; font-weight: 800; }
.import-confirm input { width: 20px; height: 20px; flex: 0 0 auto; }

@media (max-width: 359px) {
  .input-copy h1 { font-size: 30px; }
  .privacy-note { font-size: 10px; }
}

.form-message {
  margin: 0 0 14px 28px;
  padding: 10px 12px;
  border-left: 4px solid var(--coral-deep);
  background: #f8ddd3;
  color: #7d281d;
  font-size: 13px;
  font-weight: 700;
}

.primary-action {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 15px;
  padding: 12px 18px;
  border: 2px solid var(--ink);
  background: var(--coral);
  color: #fff;
  box-shadow: 5px 5px 0 var(--sun);
  cursor: pointer;
  font-weight: 800;
  letter-spacing: 0.04em;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.source-sheet .primary-action {
  width: calc(100% - 28px);
  margin-left: 28px;
}

.primary-action svg {
  width: 29px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.primary-action:hover {
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0 var(--sun);
}

.primary-action:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--sun);
}

.review-view,
.preview-view {
  padding: 42px 16px 70px;
  background: var(--paper);
}

.view-heading {
  display: grid;
  gap: 18px;
  width: min(100%, 920px);
  margin: 0 auto 28px;
}

.view-heading h1 {
  font-size: clamp(34px, 8vw, 56px);
}

.view-heading p:not(.eyebrow) {
  max-width: 600px;
  margin: 11px 0 0;
  color: var(--ink-soft);
  font-size: 14px;
}

.quiet-action {
  align-self: start;
  justify-self: start;
  padding: 9px 13px;
  border: 1px solid var(--ink);
  background: var(--paper-light);
  box-shadow: 3px 3px 0 var(--sky);
  font-size: 12px;
}

.review-summary {
  display: flex;
  width: min(100%, 920px);
  align-items: center;
  gap: 15px;
  margin: 0 auto 24px;
  padding: 15px 16px;
  border: 1px dashed var(--sky-deep);
  background: #e7f1eb;
}

.review-summary strong,
.review-summary p {
  display: block;
  margin: 0;
}

.review-summary strong {
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 15px;
}

.review-summary p {
  color: var(--ink-soft);
  font-size: 11px;
}

.summary-stamp {
  flex: 0 0 auto;
  display: grid;
  width: 53px;
  height: 53px;
  place-items: center;
  border: 2px solid var(--sky-deep);
  border-radius: 50%;
  color: var(--sky-deep);
  font: 800 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.08em;
  transform: rotate(-7deg);
}

.error-stamp {
  border-color: var(--coral-deep);
  color: var(--coral-deep);
}

.travel-notebook {
  position: relative;
  width: min(100%, 920px);
  margin: 0 auto;
  padding: 10px 12px 28px 31px;
  border: 2px solid var(--ink);
  background:
    linear-gradient(90deg, transparent 42px, rgb(231 111 81 / 0.19) 42px, rgb(231 111 81 / 0.19) 43px, transparent 43px),
    repeating-linear-gradient(to bottom, transparent 0 35px, rgb(79 133 129 / 0.1) 35px 36px),
    #fffaf0;
  box-shadow: 9px 10px 0 var(--sky-deep), var(--shadow);
}

.notebook-binding {
  position: absolute;
  z-index: 2;
  left: 7px;
  top: 20px;
  bottom: 20px;
  width: 12px;
  background: repeating-linear-gradient(to bottom, var(--ink) 0 8px, transparent 8px 24px);
  opacity: 0.65;
}

.notebook-section {
  position: relative;
  padding: 26px 5px 29px;
  border-bottom: 2px dashed rgb(38 59 58 / 0.28);
}

.section-label {
  display: flex;
  align-items: start;
  gap: 10px;
  margin-bottom: 19px;
}

.section-label > span {
  flex: 0 0 auto;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--sun);
  font: 800 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  transform: rotate(-5deg);
}

.section-label h2,
.section-label p {
  margin: 0;
}

.section-label h2 {
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 21px;
}

.section-label p {
  color: var(--ink-soft);
  font-size: 11px;
}

.form-grid {
  display: grid;
  gap: 15px;
}

.form-grid label,
.repeatable-row label,
.item-grid label {
  display: grid;
  gap: 5px;
}

.form-grid label > span,
.repeatable-row label > span,
.item-grid label > span {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.form-grid label small,
.item-grid label small {
  color: var(--ink-soft);
  font-weight: 500;
}

.form-grid input,
.repeatable-row input[type="text"],
.item-grid input {
  width: 100%;
  min-height: 46px;
  padding: 10px 11px;
  border: 1px solid #708781;
  border-radius: 0;
  background: rgb(255 255 255 / 0.64);
  color: var(--ink);
}

.form-grid input:focus,
.repeatable-row input:focus,
.item-grid input:focus {
  border-color: var(--focus);
  background: #fff;
}

.day-editor {
  padding: 0;
}

.day-summary {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 88px;
  padding: 17px 5px;
  cursor: pointer;
  list-style: none;
}

.day-summary::-webkit-details-marker {
  display: none;
}

.day-summary::after {
  content: "＋";
  position: absolute;
  right: 5px;
  bottom: 8px;
  color: var(--coral-deep);
  font-size: 18px;
  font-weight: 800;
}

.day-editor[open] .day-summary::after {
  content: "−";
}

.day-summary > span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--sun);
  font: 800 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  transform: rotate(-5deg);
}

.day-summary h2,
.day-summary p {
  margin: 0;
}

.day-summary h2 {
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 20px;
}

.day-summary p {
  color: var(--ink-soft);
  font-size: 10px;
}

.day-summary > strong {
  align-self: start;
  margin: 4px 25px 0 0;
  color: var(--sky-deep);
  font: 800 9px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.05em;
}

.day-editor-body {
  position: relative;
  padding: 8px 5px 28px;
}

.remove-action {
  min-width: 44px;
  padding: 7px 4px;
  color: #9c3d2e;
  font-size: 11px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.remove-day {
  position: absolute;
  right: 0;
  top: -2px;
}

.itinerary-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 24px 0 12px;
}

.itinerary-heading h3 {
  margin: 0;
  font-size: 14px;
}

.add-action {
  padding: 9px 12px;
  border: 1px dashed var(--sky-deep);
  background: #e7f1eb;
  color: #315f5a;
  font-size: 12px;
}

.add-action.compact {
  min-height: 40px;
  padding: 7px 9px;
  font-size: 11px;
}

.itinerary-fields {
  display: grid;
  gap: 13px;
}

.itinerary-item,
.lodging-editor {
  position: relative;
  margin: 0;
  padding: 20px 12px 14px;
  border: 1px solid var(--line);
  background: rgb(231 241 235 / 0.74);
}

.itinerary-item:nth-child(even) {
  background: rgb(248 221 211 / 0.66);
}

.itinerary-item legend,
.lodging-editor legend {
  padding: 0 8px;
  color: var(--coral-deep);
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 13px;
  font-weight: 800;
}

.itinerary-item > .remove-action {
  position: absolute;
  right: 7px;
  top: -17px;
}

.item-grid {
  display: grid;
  gap: 11px;
}

.lodging-editor {
  margin-top: 20px;
  border-color: #6d546f;
  background: rgb(109 84 111 / 0.1);
}

.empty-editor {
  margin: 0;
  padding: 20px;
  border: 1px dashed var(--line);
  color: var(--ink-soft);
  text-align: center;
  font-size: 12px;
}

.repeatable-fields {
  display: grid;
  gap: 9px;
  margin-bottom: 12px;
}

.repeatable-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
  padding: 10px;
  border: 1px solid var(--line);
  background: rgb(255 255 255 / 0.52);
}

.done-toggle {
  display: flex !important;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 6px !important;
  padding: 6px;
}

.done-toggle input {
  width: 21px;
  height: 21px;
  accent-color: var(--coral);
}

.done-toggle span {
  font-size: 10px !important;
}

.repeatable-row .remove-action {
  grid-column: 2;
}

.loose-row {
  grid-template-columns: minmax(0, 1fr) auto;
  background: #f8e4cb;
}

.warning-label > span {
  background: var(--coral);
  color: #fff;
}

.review-actions {
  display: grid;
  gap: 13px;
  padding: 28px 5px 4px;
}

.preview-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  width: min(100%, 480px);
  margin: 32px auto 0;
}

.download-action {
  min-width: 205px;
}

.download-action svg {
  width: 23px;
}

.cover-choices {
  width: min(100%, 480px);
  margin: 0 auto 24px;
}

.cover-choices > p {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

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

.cover-choice {
  min-width: 0;
  padding: 12px 14px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: #fffaf0;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  box-shadow: 3px 4px 0 rgb(38 59 58 / .13);
}

.cover-choice b,
.cover-choice span {
  display: block;
}

.cover-choice b {
  font-size: 14px;
}

.cover-choice span {
  color: var(--ink-soft);
  font-size: 12px;
}

.cover-choice[aria-pressed="true"] {
  background: var(--sun);
  box-shadow: 4px 5px 0 var(--coral);
}

.cover-choice:focus-visible {
  outline: 3px solid #163f7a;
  outline-offset: 3px;
}

.phone-stage {
  position: relative;
  width: min(100%, 480px);
  margin: 0 auto;
  padding: 12px;
  border: 2px solid var(--ink);
  border-radius: 34px;
  background: #203a39;
  box-shadow: 16px 20px 0 var(--sun), 0 35px 100px rgb(38 59 58 / 0.22);
}

.phone-stage::before {
  content: "";
  position: absolute;
  z-index: 3;
  top: 17px;
  left: 50%;
  width: 84px;
  height: 20px;
  border-radius: 12px;
  background: #203a39;
  transform: translateX(-50%);
  pointer-events: none;
}

.preview-frame {
  height: clamp(680px, 85dvh, 850px);
  overflow: hidden;
  border-radius: 23px;
  background: #fff;
}

.preview-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fbf4e5;
}

.download-status {
  min-height: 27px;
  max-width: 600px;
  margin: 30px auto 0;
  color: #315f5a;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.ai-cover-lab {
  width: min(100%, 720px);
  margin: 44px auto 0;
  padding: 24px;
  border: 2px solid var(--ink);
  border-radius: 18px;
  background: #fffaf0;
}
.ai-cover-lab h2 { margin: 0 0 8px; font-size: clamp(22px, 4vw, 29px); }
.ai-cover-lab p { line-height: 1.7; }
.ai-cover-lab .primary-action { margin-top: 8px; }
#ai-cover-status { min-height: 24px; font-weight: 700; color: #315f5a; white-space: pre-line; }
.ai-cover-preview { overflow: hidden; border: 2px solid var(--ink); border-radius: 14px; background: #f8e9ce; }
.ai-cover-preview iframe { display: block; width: 100%; aspect-ratio: 2 / 1; border: 0; }

.public-info {
  padding: clamp(28px, 5vw, 52px) 18px;
  border-top: 1px solid var(--line);
  background: #f3ead8;
  scroll-margin-top: 16px;
}

.public-info-heading {
  max-width: 680px;
  margin-bottom: 20px;
}

.public-info-heading h2 {
  margin: 2px 0 6px;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(24px, 5vw, 34px);
  line-height: 1.3;
}

.public-info-heading p:last-child { margin: 0; color: var(--ink-soft); font-size: 13px; }
.public-info-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.public-info-grid > section, .public-info-support, .public-info-feedback { padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper-light); }
.public-info h3 { margin: 0 0 10px; font-size: 17px; line-height: 1.4; }
.public-info-grid p, .public-info-support p, .public-info-feedback p { margin: 0; color: #405754; font-size: 13px; line-height: 1.8; }
.public-info-grid p + p { margin-top: 12px; }
.public-info-support, .public-info-feedback { margin-top: 14px; }
.public-info-support a { display: block; width: fit-content; margin-top: 18px; color: #22584f; font-weight: 700; text-underline-offset: 3px; overflow-wrap: anywhere; }
.public-info-support .text-button { display: block; margin-top: 12px; padding: 0; color: #22584f; font-size: 13px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.public-info-support #feedback-copy-status { display: block; margin-top: 7px; color: #405754; font-size: 12px; }
.public-info-feedback .feedback-no-reply { margin-top: 12px; font-weight: 600; }
.feedback-form { display: grid; gap: 8px; margin-top: 18px; max-width: 660px; }
.feedback-form label { color: var(--ink); font-size: 13px; font-weight: 700; }
.feedback-form select, .feedback-form textarea { width: 100%; box-sizing: border-box; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); font: inherit; font-size: 14px; }
.feedback-form textarea { min-height: 104px; resize: vertical; }
.feedback-form select:focus-visible, .feedback-form textarea:focus-visible { outline: 2px solid #22584f; outline-offset: 2px; }
.feedback-form textarea[aria-invalid="true"] { border-color: #a74435; }
.feedback-count { justify-self: end; color: var(--ink-soft); font-size: 12px; }
.public-info-feedback #feedback-note { color: var(--ink-soft); font-size: 12px; }
.feedback-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.feedback-actions .primary-action { min-height: 42px; padding: 9px 18px; }
.feedback-actions #feedback-status { color: #405754; font-size: 13px; line-height: 1.5; }
.feedback-email-fallback { width: 170px; max-width: 100%; font: inherit; }

.info-page { background: #f3ead8; }
.info-shell { width: min(calc(100% - 36px), 900px); margin: 0 auto; }
.info-nav { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 22px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.info-nav a, .info-footer a { color: var(--ink); text-underline-offset: 3px; }
.info-brand { font-size: 17px; font-weight: 800; text-decoration: none; }
.info-brand span { margin-left: 5px; color: var(--ink-soft); font-size: 12px; font-weight: 600; }
.info-nav nav, .info-footer { display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: 13px; }
.info-main { padding: clamp(32px, 6vw, 60px) 0 48px; }
.info-heading { margin-bottom: 22px; }
.info-heading h1 { margin: 4px 0 8px; font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: clamp(30px, 6vw, 44px); line-height: 1.25; }
.info-heading > p:last-child { margin: 0; color: var(--ink-soft); font-size: 14px; line-height: 1.7; }
.info-main > section { margin-top: 14px; padding: clamp(20px, 4vw, 30px); border: 1px solid var(--line); border-radius: 14px; background: var(--paper-light); }
.info-main h2 { margin: 0 0 11px; font-size: clamp(19px, 3vw, 24px); line-height: 1.4; }
.info-main section p { margin: 0; color: #405754; font-size: 14px; line-height: 1.85; }
.info-main section p + p { margin-top: 12px; }
.info-main section p a { color: #22584f; font-weight: 700; text-underline-offset: 3px; }
.info-email { display: block; width: fit-content; margin-top: 16px; color: #22584f; font-size: 17px; font-weight: 700; text-underline-offset: 3px; overflow-wrap: anywhere; }
.info-copy-button { display: block; margin-top: 10px; padding: 0; border: 0; background: none; color: #22584f; font-size: 14px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.info-copy-status { display: block; margin-top: 7px; color: #405754; font-size: 12px; }
.info-footer { justify-content: space-between; padding: 18px 0 32px; border-top: 1px solid var(--line); }
.info-page .feedback-form { max-width: 100%; }
.info-page .feedback-form label { font-size: 14px; }
.info-page .feedback-form select, .info-page .feedback-form textarea { font-size: 15px; }
.info-page #feedback-note { font-size: 12px; }
.info-page .feedback-no-reply { font-weight: 700; }
.app-footer-links { display: flex; flex-wrap: wrap; gap: 12px 18px; }
.app-footer-links a { color: #e4efea; font-size: 12px; text-underline-offset: 3px; }

.app-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  padding: 24px 18px;
  background: var(--ink);
  color: #c9d8d3;
  font-size: 10px;
  letter-spacing: 0.04em;
}

.app-footer p {
  margin: 0;
}

@keyframes train-arrives {
  from {
    transform: translateX(-170px);
  }
  to {
    transform: none;
  }
}

@media (min-width: 620px) {
  .app-header,
  .journey-steps,
  .public-info,
  .app-footer {
    padding-inline: 34px;
  }

  .input-view {
    padding-inline: 34px;
  }

  .input-scene {
    width: calc(100% + 68px);
    margin-inline: -34px;
  }

  .source-sheet {
    padding: 36px 34px 28px;
  }

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

  .form-grid .full-field {
    grid-column: 1 / -1;
  }

  .item-grid {
    grid-template-columns: 130px minmax(0, 1fr);
  }

  .item-grid .wide-field {
    grid-column: 1 / -1;
  }

  .repeatable-row {
    grid-template-columns: minmax(0, 1fr) 90px 52px;
  }

  .repeatable-row .remove-action {
    grid-column: auto;
  }

  .loose-row {
    grid-template-columns: minmax(0, 1fr) 52px;
  }

  .review-actions {
    grid-template-columns: auto minmax(260px, 1fr);
  }
}

@media (min-width: 880px) {
  .app-header {
    min-height: 84px;
    padding-inline: 48px;
  }

  .input-view {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(420px, 1fr);
    grid-template-rows: 350px auto;
    column-gap: 44px;
    padding: 20px 48px 100px;
  }

  .input-scene {
    grid-column: 1 / -1;
    grid-row: 1;
    width: calc(100% + 96px);
    margin: -20px -48px -40px;
  }

  .input-scene svg {
    min-width: 800px;
  }

  .input-copy {
    grid-column: 1;
    grid-row: 2;
    align-self: start;
    margin-top: 72px;
  }

  .source-sheet {
    grid-column: 2;
    grid-row: 2;
    margin-top: 0;
  }

  .view-heading {
    grid-template-columns: 1fr auto;
    align-items: end;
  }

  .travel-notebook {
    padding: 20px 36px 36px 56px;
  }

  .notebook-section {
    padding-block: 34px;
  }

  .itinerary-item {
    padding: 24px 18px 18px;
  }

  .preview-heading {
    grid-template-columns: 1fr;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* A native menu keeps moving retained text available on touch and keyboard. */
.move-field{min-width:0}.move-field select{width:100%;min-height:44px;padding:10px;border:1px solid var(--ink,#304d4a);border-radius:8px;background:#fff8e9;font:inherit;color:inherit}
.loose-row{grid-template-columns:minmax(0,1fr) auto}.loose-row>label{grid-column:1 / -1;min-width:0}.loose-row .remove-action{grid-column:2}
@media(min-width:700px){.loose-row{grid-template-columns:minmax(0,1fr) minmax(190px,.65fr) 52px}.loose-row>label{grid-column:auto}.loose-row .remove-action{grid-column:auto}}
#generate-cover:disabled{opacity:.65;cursor:wait}

.draft-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 18px;
  flex-basis: 100%;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgb(255 255 255 / .2);
}
.draft-bar p { margin: 0; color: #c9d8d3; font-size: 10px; }
.draft-bar p[data-state="error"] { color: #ffd6c9; }
.draft-bar .text-button { min-height: 36px; color: #e9d8be; font-size: 10px; }

.preview-view { --preview-block-gap: clamp(22px, 4vw, 36px); }
.preview-heading { margin-bottom: var(--preview-block-gap); }
.cover-action {
  display: grid;
  justify-items: center;
  gap: 0;
  width: min(100%, 480px);
  margin: 0 auto var(--preview-block-gap);
  text-align: center;
}
.cover-action h2 { margin: 0; font-size: clamp(21px, 4vw, 28px); line-height: 1.35; }
.cover-action > p:not(#ai-cover-status) { margin: 8px 0 20px; color: var(--ink-soft); font-size: 13px; line-height: 1.6; }
.cover-action #generate-cover { width: min(100%, 320px); justify-content: center; }
.cover-action #ai-cover-status { min-height: 0; margin: 12px 0 0; line-height: 1.5; }
.preview-scroll-hint {
  width: min(100%, 480px);
  margin: 0 auto 10px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}
.download-cover-note {
  width: min(100%, 480px);
  margin: 14px auto 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}
.preview-view > #download-status { margin-top: 14px; }
@media (max-width: 619px) {
  .preview-actions { display: grid; grid-template-columns: 1fr; gap: 12px; }
  .preview-actions button { width: 100%; min-height: 50px; justify-content: center; }
  .cover-action #generate-cover { width: 100%; }
}
