:root {
  --paper: #fffaf2;
  --paper-deep: #f8f0e4;
  --paper-soft: #fffdf8;
  --ink: #2d3440;
  --ink-soft: #646771;
  --indigo: #28445f;
  --indigo-deep: #1f3449;
  --vermilion: #a83f4b;
  --vermilion-bright: #c95560;
  --sakura: #f4cbd2;
  --sakura-soft: #fff0f2;
  --gold: #c49843;
  --gold-soft: #f7e7bd;
  --green: #4f7d68;
  --line: #e8ddd0;
  --line-strong: #d9c9b8;
  --error: #a52c38;
  --error-soft: #fff0f1;
  --shadow-sm: 0 10px 30px rgba(66, 48, 36, 0.08);
  --shadow-lg: 0 24px 70px rgba(66, 48, 36, 0.14);
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 30px;
  --ease: cubic-bezier(0.2, 0.75, 0.25, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  color: var(--ink);
  background: var(--paper);
  font-family:
    "Hiragino Kaku Gothic ProN",
    "Yu Gothic",
    "YuGothic",
    "Noto Sans JP",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 10% 6%, rgba(244, 203, 210, 0.42), transparent 27rem),
    radial-gradient(circle at 94% 88%, rgba(196, 152, 67, 0.12), transparent 24rem),
    var(--paper);
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: 0.42;
  background-image:
    linear-gradient(90deg, rgba(132, 101, 69, 0.025) 1px, transparent 1px),
    linear-gradient(rgba(132, 101, 69, 0.02) 1px, transparent 1px);
  background-size: 8px 8px;
}

button,
input,
textarea {
  font: inherit;
}

button,
summary {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

img,
picture {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

::selection {
  color: var(--indigo-deep);
  background: var(--sakura);
}

:focus-visible {
  outline: 3px solid rgba(168, 63, 75, 0.3);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  padding: 9px 14px;
  color: #fff;
  border-radius: 8px;
  background: var(--indigo);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

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

.site-shell {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
}

.site-header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 66px;
  padding: 10px max(18px, env(safe-area-inset-left)) 10px max(18px, env(safe-area-inset-right));
  border-bottom: 1px solid rgba(217, 201, 184, 0.7);
  background: rgba(255, 250, 242, 0.9);
  backdrop-filter: blur(16px);
}

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

.brand-seal {
  display: block;
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  object-fit: cover;
  mix-blend-mode: multiply;
  transform: rotate(-2deg);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.22;
}

.brand-copy strong {
  color: var(--indigo-deep);
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 17px;
  letter-spacing: 0.04em;
}

.brand-copy small {
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.page-layout {
  width: 100%;
}

.story-panel {
  position: relative;
  overflow: hidden;
}

.story-art {
  position: relative;
  height: clamp(174px, 51vw, 228px);
  overflow: hidden;
  background: var(--paper-deep);
}

.story-art::after {
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  pointer-events: none;
  content: "";
  background: linear-gradient(to bottom, transparent, rgba(255, 250, 242, 0.9));
}

.story-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 52%;
}

.story-copy {
  display: none;
}

.workflow-column {
  position: relative;
  z-index: 2;
  width: min(100%, 680px);
  padding: 0 14px max(32px, env(safe-area-inset-bottom));
  margin: -20px auto 0;
}

.mobile-welcome {
  padding: 24px 24px 17px;
  border: 1px solid rgba(232, 221, 208, 0.8);
  border-bottom: 0;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: rgba(255, 253, 248, 0.98);
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.mobile-welcome h1,
.story-copy h1 {
  margin: 0;
  color: var(--indigo-deep);
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(26px, 8.4vw, 35px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.06em;
}

.mobile-welcome h1 {
  font-size: clamp(21px, 6.2vw, 28px);
  white-space: nowrap;
}

.mobile-welcome p:last-child {
  margin: 9px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.progress-wrap {
  position: relative;
  padding: 11px 20px 13px;
  border-right: 1px solid rgba(232, 221, 208, 0.8);
  border-left: 1px solid rgba(232, 221, 208, 0.8);
  background: var(--paper-soft);
}

.progress-message {
  display: block;
  margin-bottom: 7px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: right;
}

.progress-track {
  width: 100%;
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: #eee4d9;
}

.progress-bar {
  display: block;
  width: 18%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--sakura), var(--vermilion));
  transition: width 380ms var(--ease);
}

.workflow-card {
  min-height: 390px;
  padding: 27px 20px 22px;
  border: 1px solid rgba(232, 221, 208, 0.85);
  border-top: 0;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  background: rgba(255, 253, 248, 0.985);
  box-shadow: var(--shadow-sm);
}

.flow-step {
  animation: step-in 300ms var(--ease) both;
}

@keyframes step-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.step-heading {
  margin-bottom: 25px;
  text-align: center;
}

.step-kicker {
  display: inline-block;
  margin-bottom: 7px;
  color: var(--vermilion);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.step-heading h2 {
  margin: 0;
  color: var(--indigo-deep);
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(24px, 7vw, 31px);
  line-height: 1.35;
  letter-spacing: 0.025em;
}

.step-heading p {
  max-width: 480px;
  margin: 9px auto 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.75;
}

.field-group {
  margin-bottom: 22px;
}

.field-group label {
  display: inline-block;
  margin-bottom: 7px;
  color: var(--indigo-deep);
  font-size: 14px;
  font-weight: 800;
}

.required-mark {
  margin-left: 2px;
  color: var(--vermilion);
}

.text-input,
input[type="text"],
textarea {
  width: 100%;
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  outline: 0;
  background: #fff;
  box-shadow: inset 0 1px 2px rgba(64, 48, 32, 0.04);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.text-input,
input[type="text"] {
  min-height: 54px;
  padding: 13px 14px;
}

textarea {
  min-height: 138px;
  padding: 13px 14px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: #a39d96;
  opacity: 1;
}

.text-input:focus,
input[type="text"]:focus,
textarea:focus {
  border-color: var(--vermilion);
  background: #fffefd;
  box-shadow: 0 0 0 4px rgba(168, 63, 75, 0.1);
}

input[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: var(--error);
  background: var(--error-soft);
  box-shadow: 0 0 0 3px rgba(165, 44, 56, 0.08);
}

.input-shell {
  position: relative;
}

.input-shell input {
  padding-right: 50px;
}

.input-icon {
  position: absolute;
  top: 50%;
  right: 15px;
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  color: var(--vermilion);
  border-radius: 50%;
  background: var(--sakura-soft);
  font-size: 10px;
  font-weight: 800;
  transform: translateY(-50%);
}

.field-hint,
.field-error {
  margin: 7px 2px 0;
  font-size: 11px;
  line-height: 1.55;
}

.field-hint {
  color: var(--ink-soft);
}

.field-error {
  color: var(--error);
  font-weight: 700;
}

.error-reference {
  display: block;
  width: fit-content;
  padding: 2px 7px;
  margin-top: 5px;
  color: #80555a;
  border: 1px solid rgba(168, 63, 75, 0.18);
  border-radius: 999px;
  background: rgba(168, 63, 75, 0.06);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1.5;
}

.standalone-error {
  padding: 10px 12px;
  margin: 12px 0;
  border-radius: 10px;
  background: var(--error-soft);
  text-align: left;
}

.notice-card {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 14px;
  margin: 3px 0 24px;
  color: #66553c;
  border: 1px solid #ead8ac;
  border-radius: var(--radius-sm);
  background: #fff9e9;
}

.notice-icon {
  display: grid;
  flex: 0 0 auto;
  width: 23px;
  height: 23px;
  place-items: center;
  color: #fff;
  border-radius: 50%;
  background: var(--gold);
  font-family: Georgia, serif;
  font-size: 13px;
  font-style: italic;
  font-weight: 700;
}

.notice-card p {
  margin: 0;
  font-size: 11px;
  line-height: 1.7;
}

.notice-card strong {
  display: block;
  margin-bottom: 2px;
  color: #5c4426;
  font-size: 12px;
}

.privacy-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 13px;
  margin: 2px 0 23px;
  color: #446456;
  border-radius: var(--radius-sm);
  background: #eff7f2;
  font-size: 11px;
  line-height: 1.6;
}

.privacy-shield {
  display: grid;
  flex: 0 0 auto;
  width: 24px;
  height: 27px;
  place-items: center;
  color: #fff;
  border-radius: 12px 12px 14px 14px;
  background: var(--green);
  font-size: 12px;
  font-weight: 900;
}

.form-actions {
  display: grid;
  grid-template-columns: minmax(92px, 0.72fr) minmax(0, 1.35fr);
  gap: 10px;
  margin-top: 28px;
}

.single-action {
  display: block;
}

.button {
  position: relative;
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease,
    border-color 160ms ease;
}

.button:not(:disabled):active {
  transform: translateY(1px) scale(0.995);
}

.button-primary {
  color: #fff;
  border-color: var(--vermilion);
  background: linear-gradient(135deg, var(--vermilion-bright), var(--vermilion));
  box-shadow: 0 10px 24px rgba(168, 63, 75, 0.22);
}

.button-primary:not(:disabled):hover {
  background: linear-gradient(135deg, #d15b65, #9e3642);
  box-shadow: 0 12px 28px rgba(168, 63, 75, 0.28);
}

.button-secondary {
  color: var(--indigo);
  border-color: var(--line-strong);
  background: #fff;
}

.button-secondary:not(:disabled):hover {
  border-color: #b8aa9b;
  background: var(--paper-deep);
}

.button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.button-spinner {
  display: none;
  width: 17px;
  height: 17px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

.button-secondary .button-spinner {
  border-color: rgba(40, 68, 95, 0.2);
  border-top-color: var(--indigo);
}

.button.is-loading .button-spinner {
  display: inline-block;
}

.button.is-loading .button-arrow {
  display: none;
}

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

.button-arrow {
  margin-left: 2px;
  font-size: 17px;
  line-height: 1;
}

.choice-group {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 0;
  border: 0;
}

.choice-card {
  position: relative;
  display: grid;
  min-height: 83px;
  grid-template-columns: 46px minmax(0, 1fr) 25px;
  align-items: center;
  gap: 11px;
  padding: 14px;
  cursor: pointer;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: #fff;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease,
    background 160ms ease;
}

.choice-card:hover {
  border-color: #c8a9ad;
  transform: translateY(-1px);
}

.choice-card:has(input:focus-visible) {
  outline: 3px solid rgba(168, 63, 75, 0.25);
  outline-offset: 2px;
}

.choice-card:has(input:checked) {
  border-color: var(--vermilion);
  background: var(--sakura-soft);
  box-shadow: 0 8px 22px rgba(168, 63, 75, 0.1);
}

.choice-card input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.choice-emoji {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: var(--vermilion);
  border-radius: 50%;
  background: #ffe5e8;
  font-family: Georgia, serif;
  font-size: 28px;
}

.choice-emoji-indigo {
  color: var(--indigo);
  background: #e9eff5;
  font-size: 22px;
}

.choice-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.choice-copy strong {
  color: var(--indigo-deep);
  font-size: 15px;
}

.choice-copy small {
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: 11px;
}

.choice-check {
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  color: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 900;
}

.choice-card:has(input:checked) .choice-check {
  color: #fff;
  border-color: var(--vermilion);
  background: var(--vermilion);
}

.feedback-field {
  padding-top: 24px;
  margin-top: 4px;
  border-top: 1px dashed var(--line-strong);
  animation: step-in 260ms var(--ease) both;
}

.field-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.field-meta > span {
  flex: 0 0 auto;
  margin-top: 7px;
  color: var(--ink-soft);
  font-size: 10px;
}

.review-heading {
  margin-bottom: 21px;
}

.mobile-only {
  display: initial;
}

.review-instructions {
  display: grid;
  gap: 9px;
}

.review-instructions article {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.instruction-number {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: #fff;
  border-radius: 50%;
  background: var(--indigo);
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 14px;
  font-weight: 700;
}

.review-instructions strong {
  display: block;
  color: var(--indigo-deep);
  font-size: 13px;
}

.review-instructions p {
  margin: 3px 0 0;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.6;
}

.warning-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px;
  margin: 16px 0;
  color: #7a3038;
  border: 1px solid #efc7cc;
  border-radius: 14px;
  background: var(--sakura-soft);
}

.warning-card > span {
  display: grid;
  flex: 0 0 auto;
  width: 23px;
  height: 23px;
  place-items: center;
  color: #fff;
  border-radius: 50%;
  background: var(--vermilion);
  font-family: Georgia, serif;
  font-size: 13px;
  font-weight: 800;
}

.warning-card p {
  margin: 0;
  font-size: 11px;
  line-height: 1.65;
}

.warning-card strong {
  display: block;
  margin-bottom: 1px;
  font-size: 12px;
}

.guide-details {
  overflow: hidden;
  margin: 16px 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.guide-picture {
  background: #f5f3ef;
}

.guide-zoom-trigger {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  cursor: default;
  border: 0;
  background: transparent;
  text-align: left;
}

.guide-picture img {
  width: 100%;
  height: auto;
}

.guide-lightbox {
  position: fixed;
  z-index: 110;
  inset: 0;
  display: grid;
  overflow: auto;
  place-items: center;
  padding: 28px;
  background: rgba(16, 28, 40, 0.88);
  backdrop-filter: blur(8px);
  animation: fade-in 180ms ease both;
}

.guide-lightbox-content {
  position: relative;
  width: min(1200px, calc(100vw - 56px));
}

.guide-lightbox-content img {
  width: 100%;
  height: auto;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.38);
}

.guide-lightbox-close {
  position: absolute;
  z-index: 1;
  top: -17px;
  right: -17px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  padding: 0;
  cursor: pointer;
  color: var(--indigo-deep);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24);
  font-size: 27px;
  line-height: 1;
}

.ready-card {
  padding: 17px 14px 7px;
  border: 1px solid #dfd2c4;
  border-radius: 16px;
  background: #fbf7f1;
}

.ready-card h3 {
  margin: 0 0 8px;
  color: var(--indigo-deep);
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 17px;
}

.check-row {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  padding: 11px 0;
  cursor: pointer;
}

.check-row + .check-row {
  border-top: 1px dashed var(--line-strong);
}

.check-row input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.custom-checkbox {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  color: transparent;
  border: 1px solid #b8a99a;
  border-radius: 7px;
  background: #fff;
  font-size: 13px;
  font-weight: 900;
  transition:
    color 140ms ease,
    background 140ms ease,
    border-color 140ms ease;
}

.check-row:has(input:checked) .custom-checkbox {
  color: #fff;
  border-color: var(--green);
  background: var(--green);
}

.check-row:has(input:focus-visible) .custom-checkbox {
  outline: 3px solid rgba(168, 63, 75, 0.25);
  outline-offset: 2px;
}

.check-row strong {
  display: block;
  color: var(--indigo-deep);
  font-size: 12px;
}

.check-row small {
  display: block;
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.55;
}

.processing-note {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 14px 15px;
  margin: 18px 0 0;
  color: #66553c;
  border: 1px solid rgba(181, 139, 65, 0.3);
  border-left: 3px solid var(--gold);
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.96);
  box-shadow: 0 6px 18px rgba(74, 56, 35, 0.06);
}

.processing-icon {
  position: relative;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(168, 63, 75, 0.2);
  border-radius: 50%;
  background: var(--sakura-soft);
  box-shadow: inset 0 0 0 5px rgba(255, 255, 255, 0.45);
}

.processing-icon::before,
.processing-icon::after {
  position: absolute;
  content: "";
  border-radius: 999px;
  background: var(--vermilion);
}

.processing-icon::before {
  top: 9px;
  left: 19px;
  width: 3px;
  height: 12px;
}

.processing-icon::after {
  top: 19px;
  left: 20px;
  width: 10px;
  height: 3px;
  transform: rotate(28deg);
  transform-origin: left center;
}

.processing-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.processing-copy > small {
  color: var(--gold);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.processing-copy strong {
  color: #554328;
  font-size: 13px;
  line-height: 1.45;
}

.processing-copy em {
  color: var(--vermilion);
  font-family: Georgia, "Yu Mincho", serif;
  font-size: 18px;
  font-style: normal;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.processing-copy > span {
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.65;
}

.site-footer {
  padding: 23px 4px 4px;
  color: var(--ink-soft);
  font-size: 10px;
  text-align: center;
}

.site-footer p {
  margin: 4px 0;
}

.reference-panel {
  display: flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 7px 9px 7px 11px;
  margin: 24px auto 0;
  border: 1px solid rgba(168, 63, 75, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
}

.reference-panel + .form-actions {
  margin-top: 12px;
}

.reference-panel > span {
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.reference-copy {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  padding: 3px 7px;
  color: var(--indigo-deep);
  border: 0;
  border-radius: 999px;
  background: var(--sakura-soft);
  cursor: pointer;
}

.reference-copy strong {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 10px;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.reference-copy small {
  color: var(--vermilion);
  font-size: 8px;
  font-weight: 800;
}

.reference-copy:focus-visible {
  outline: 3px solid rgba(168, 63, 75, 0.22);
  outline-offset: 2px;
}

.modal-backdrop {
  position: fixed;
  z-index: 80;
  inset: 0;
  display: grid;
  align-items: end;
  padding: 16px max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom))
    max(12px, env(safe-area-inset-left));
  overflow-y: auto;
  background: rgba(31, 52, 73, 0.5);
  backdrop-filter: blur(7px);
  animation: fade-in 180ms ease both;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.email-modal {
  width: min(100%, 610px);
  max-height: calc(100vh - 28px);
  max-height: calc(100dvh - 28px);
  padding: 21px 18px max(20px, env(safe-area-inset-bottom));
  margin: 0 auto;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 26px;
  background: var(--paper-soft);
  box-shadow: var(--shadow-lg);
  animation: modal-up 260ms var(--ease) both;
}

@keyframes modal-up {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--line);
}

.modal-header .step-kicker {
  margin: 0 0 3px;
}

.modal-header h2 {
  margin: 0;
  color: var(--indigo-deep);
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 21px;
  line-height: 1.35;
}

.modal-close {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  cursor: pointer;
  color: var(--indigo);
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  font-size: 25px;
  line-height: 1;
}

.modal-waiting {
  padding: 34px 10px 22px;
  text-align: center;
}

.mail-animation {
  position: relative;
  width: 70px;
  height: 52px;
  margin: 0 auto 20px;
  border: 2px solid var(--vermilion);
  border-radius: 10px;
  background: var(--sakura-soft);
}

.mail-animation::before,
.mail-animation::after {
  position: absolute;
  top: 10px;
  width: 42px;
  height: 2px;
  content: "";
  background: var(--vermilion);
}

.mail-animation::before {
  left: 1px;
  transform: rotate(35deg);
}

.mail-animation::after {
  right: 1px;
  transform: rotate(-35deg);
}

.mail-animation span {
  position: absolute;
  top: -9px;
  right: -9px;
  width: 19px;
  height: 19px;
  border: 3px solid #fff;
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

.modal-waiting strong {
  color: var(--indigo-deep);
  font-size: 15px;
}

.modal-waiting p {
  margin: 7px auto 0;
  color: var(--ink-soft);
  font-size: 11px;
}

.modal-content {
  padding-top: 18px;
}

.fallback-intro {
  margin-bottom: 13px;
}

.fallback-intro strong {
  color: var(--indigo-deep);
  font-size: 14px;
}

.fallback-intro p {
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-size: 11px;
}

.attachment-reminder {
  padding: 11px 12px;
  margin-bottom: 13px;
  color: #684f29;
  border-radius: 11px;
  background: #fff4d9;
  font-size: 10px;
  font-weight: 700;
}

.copy-field {
  padding: 12px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
}

.copy-field > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.copy-field strong {
  color: var(--indigo-deep);
  font-size: 11px;
}

.copy-field button,
.expand-button {
  padding: 4px 7px;
  cursor: pointer;
  color: var(--vermilion);
  border: 0;
  border-radius: 6px;
  background: var(--sakura-soft);
  font-size: 10px;
  font-weight: 800;
}

.copy-field p {
  margin: 8px 0 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 11px;
  white-space: pre-wrap;
}

.email-body-preview.is-collapsed {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
}

.expand-button {
  margin-top: 8px;
  color: var(--indigo);
  background: #edf2f6;
}

.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 16px;
}

.modal-actions .button {
  min-height: 48px;
  padding-inline: 10px;
  font-size: 12px;
}

.toast {
  position: fixed;
  z-index: 120;
  right: 16px;
  bottom: max(18px, calc(env(safe-area-inset-bottom) + 10px));
  left: 16px;
  width: fit-content;
  max-width: min(460px, calc(100% - 32px));
  padding: 11px 16px;
  margin: 0 auto;
  color: #fff;
  border-radius: 999px;
  background: var(--indigo-deep);
  box-shadow: 0 12px 30px rgba(31, 52, 73, 0.25);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  animation: toast-in 220ms var(--ease) both;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 760px) {
  .site-header {
    min-height: 72px;
    padding-inline: max(30px, calc((100vw - 1180px) / 2));
  }

  .brand-seal {
    width: 56px;
    height: 56px;
  }

  .brand-copy strong {
    font-size: 19px;
  }

  .page-layout {
    display: grid;
    width: min(1180px, calc(100% - 44px));
    grid-template-columns: minmax(0, 0.92fr) minmax(470px, 1.08fr);
    align-items: start;
    gap: 40px;
    padding: 42px 0 54px;
    margin: 0 auto;
  }

  .story-panel {
    position: sticky;
    top: 28px;
    overflow: hidden;
    border: 1px solid rgba(232, 221, 208, 0.9);
    border-radius: var(--radius-lg);
    background: rgba(255, 253, 248, 0.96);
    box-shadow: var(--shadow-lg);
  }

  .story-art {
    height: 300px;
  }

  .story-art::after {
    height: 24%;
    background: linear-gradient(to bottom, transparent, rgba(255, 253, 248, 0.98));
  }

  .story-copy {
    position: relative;
    display: block;
    padding: 26px 34px 31px;
  }

  .story-copy::before {
    position: absolute;
    top: 0;
    right: 34px;
    left: 34px;
    height: 1px;
    content: "";
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
  }

  .story-copy h1 {
    font-size: 34px;
  }

  .story-lead {
    max-width: 410px;
    margin: 13px 0 22px;
    color: var(--ink-soft);
    font-size: 13px;
    line-height: 1.8;
  }

  .assurance-list {
    display: grid;
    gap: 8px;
    margin-right: 110px;
  }

  .assurance-list span {
    position: relative;
    padding-left: 19px;
    color: var(--indigo);
    font-size: 11px;
    font-weight: 700;
  }

  .assurance-list span::before {
    position: absolute;
    top: 0.45em;
    left: 0;
    width: 9px;
    height: 9px;
    content: "";
    border: 2px solid var(--green);
    border-radius: 50%;
  }

  .thanks-mark {
    position: absolute;
    right: 18px;
    bottom: 20px;
    width: 98px;
    height: 98px;
    object-fit: cover;
    mix-blend-mode: multiply;
    opacity: 0.9;
    transform: rotate(-4deg);
  }

  .workflow-column {
    width: 100%;
    padding: 0;
    margin: 0;
  }

  .mobile-welcome {
    display: none;
  }

  .progress-wrap {
    padding: 13px 28px 15px;
    border: 1px solid rgba(232, 221, 208, 0.85);
    border-bottom: 0;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    box-shadow: var(--shadow-sm);
  }

  .workflow-card {
    min-height: 540px;
    padding: 38px 46px 36px;
    box-shadow: var(--shadow-lg);
  }

  .step-heading {
    margin-bottom: 31px;
  }

  .step-heading h2 {
    font-size: 31px;
  }

  .step-heading p {
    font-size: 13px;
  }

  .field-group {
    margin-bottom: 24px;
  }

  .form-actions {
    margin-top: 32px;
  }

  .button {
    min-height: 54px;
  }

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

  .choice-card {
    min-height: 115px;
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .choice-check {
    position: absolute;
    top: 12px;
    right: 12px;
  }

  .mobile-only {
    display: none;
  }

  .review-instructions {
    grid-template-columns: repeat(3, 1fr);
  }

  .review-instructions article {
    min-height: 164px;
    grid-template-columns: 1fr;
    align-content: start;
  }

  .guide-zoom-trigger:not(:disabled) {
    cursor: zoom-in;
  }

  .guide-zoom-trigger:not(:disabled)::after {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 6px 10px;
    content: "クリックで拡大";
    color: #fff;
    border-radius: 999px;
    background: rgba(31, 52, 73, 0.82);
    box-shadow: 0 4px 14px rgba(31, 52, 73, 0.2);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
    pointer-events: none;
  }

  .modal-backdrop {
    align-items: center;
    padding: 28px;
  }

  .email-modal {
    padding: 26px;
    border-radius: var(--radius-lg);
  }
}

@media (min-width: 1080px) {
  .page-layout {
    gap: 58px;
  }

  .story-art {
    height: 330px;
  }

  .workflow-card {
    padding-inline: 55px;
  }
}

@media (max-width: 380px) {
  .brand-copy small {
    display: none;
  }

  .workflow-column {
    padding-inline: 9px;
  }

  .mobile-welcome {
    padding-inline: 17px;
  }

  .workflow-card {
    padding-inline: 15px;
  }

  .step-heading h2 {
    font-size: 23px;
  }

  .form-actions {
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 8px;
  }

  .button {
    padding-inline: 11px;
    font-size: 13px;
  }

  .choice-card {
    grid-template-columns: 42px minmax(0, 1fr) 23px;
    gap: 9px;
    padding-inline: 11px;
  }

  .choice-emoji {
    width: 40px;
    height: 40px;
  }

  .modal-actions {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .site-header,
  .story-panel,
  .progress-wrap,
  .form-actions,
  .site-footer,
  .modal-backdrop,
  .toast {
    display: none !important;
  }

  body,
  .workflow-card {
    color: #000;
    background: #fff;
    box-shadow: none;
  }
}
