:root {
  --ink: #172b35;
  --ink-soft: #53656d;
  --paper: #f8f5ed;
  --paper-deep: #efe9dd;
  --white: #fffefb;
  --coral: #e86f57;
  --coral-dark: #bf4d3e;
  --coral-soft: #f9ddd4;
  --teal: #2f817a;
  --teal-soft: #d9ece7;
  --yellow: #f0c85d;
  --line: #d9d5ca;
  --shadow: 0 20px 60px rgba(37, 48, 50, 0.1);
  --radius: 22px;
  --content: min(1180px, calc(100vw - 64px));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(23, 43, 53, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 43, 53, 0.025) 1px, transparent 1px),
    var(--paper);
  background-size: 40px 40px;
  font-family: "Yu Gothic", "YuGothic", "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  font-size: 18px;
  line-height: 1.8;
  line-break: strict;
  overflow-wrap: break-word;
  word-break: normal;
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
}

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

button,
select,
input[type="radio"],
input[type="checkbox"] {
  cursor: pointer;
}

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  transform: translateY(-150%);
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--ink);
  color: white;
}

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

.site-header {
  width: var(--content);
  min-height: 88px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(23, 43, 53, 0.16);
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: var(--white);
  color: var(--coral);
  font-family: Georgia, serif;
  font-size: 28px;
  line-height: 1;
}
.brand-mark img {
  width: 26px;
  height: 26px;
  display: block;
}

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

.brand b {
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 19px;
  letter-spacing: 0.08em;
  line-height: 1.3;
}

.brand small {
  color: var(--ink-soft);
  font-family: Arial, sans-serif;
  font-size: 9px;
  letter-spacing: 0.17em;
  line-height: 1.4;
}

.header-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 14px;
}

.header-note::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 5px var(--teal-soft);
}

.hero {
  width: var(--content);
  min-height: 680px;
  margin: 0 auto;
  padding: 86px 0 94px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(420px, 0.95fr);
  align-items: center;
  gap: clamp(50px, 7vw, 106px);
}

.eyebrow {
  margin: 0 0 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--teal);
  font-family: Arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow > span {
  width: 34px;
  height: 1px;
  background: currentColor;
}

.hero h1 {
  margin: 0;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(44px, 4.5vw, 70px);
  font-weight: 600;
  line-height: 1.32;
  letter-spacing: -0.035em;
}

.hero h1 em {
  position: relative;
  color: var(--coral-dark);
  font-style: normal;
  white-space: nowrap;
}

.hero h1 em::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -8px;
  left: 0;
  height: 9px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='10' viewBox='0 0 260 10'%3E%3Cpath d='M2 6c44-5 82 1 126-1 42-2 80-5 130 0' fill='none' stroke='%23e86f57' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}

.keep-together {
  overflow-wrap: normal;
  word-break: keep-all;
  white-space: nowrap;
}

.hero-lead {
  max-width: 620px;
  margin: 34px 0 30px;
  color: var(--ink-soft);
  font-size: 18px;
  line-height: 1.95;
}

.primary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  min-height: 58px;
  padding: 0 28px;
  border-radius: 999px;
  background: var(--ink);
  color: white;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 12px 28px rgba(23, 43, 53, 0.18);
  transition: transform 0.2s ease, background 0.2s ease;
}

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

.primary-link span {
  font-size: 22px;
}

.translation-demo {
  position: relative;
  min-height: 500px;
  overflow: hidden;
  border-radius: 36px;
  isolation: isolate;
}

.translation-demo::before {
  content: "";
  position: absolute;
  z-index: -3;
  inset: 40px 10px 30px 30px;
  border-radius: 48% 52% 45% 55% / 50% 45% 55% 50%;
  background: var(--teal-soft);
  transform: rotate(-4deg);
}

.translation-demo::after {
  content: "";
  position: absolute;
  z-index: -2;
  right: 4%;
  bottom: 2%;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--coral-soft);
}

.demo-orbit {
  position: absolute;
  z-index: -1;
  border: 1px solid rgba(23, 43, 53, 0.18);
  border-radius: 50%;
}

.orbit-one {
  inset: 0 26px 30px 8px;
  transform: rotate(10deg);
}

.orbit-two {
  inset: 30px 4px 0 45px;
  transform: rotate(-15deg);
}

.speech {
  position: absolute;
  border: 1px solid rgba(23, 43, 53, 0.18);
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.speech > span {
  display: block;
  margin-bottom: 8px;
  font-family: Arial, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.speech p {
  margin: 0;
}

.speech-before {
  top: 55px;
  left: 10px;
  width: min(280px, 63%);
  padding: 26px 28px;
  transform: rotate(-3deg);
}

.speech-before > span {
  color: var(--coral-dark);
}

.speech-before p {
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 20px;
  line-height: 1.65;
}

.translate-mark {
  position: absolute;
  z-index: 2;
  top: 210px;
  left: 43%;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--coral-dark);
  font-family: "Yu Mincho", serif;
  font-size: 28px;
  transform: rotate(5deg);
}

.translate-mark span {
  font-family: "Yu Gothic", sans-serif;
  font-size: 12px;
  font-weight: 700;
}

.speech-after {
  right: 0;
  bottom: 62px;
  width: min(390px, 82%);
  padding: 30px 32px;
  border-color: rgba(47, 129, 122, 0.35);
  transform: rotate(2deg);
}

.speech-after > span {
  color: var(--teal);
}

.speech-after p {
  font-size: 16px;
  line-height: 1.85;
}

.value-strip {
  width: var(--content);
  margin: 0 auto 120px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.value-strip > div {
  position: relative;
  min-height: 140px;
  padding: 28px 34px 26px 70px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.value-strip > div + div {
  border-left: 1px solid var(--line);
}

.value-strip b {
  position: absolute;
  top: 34px;
  left: 26px;
  color: var(--coral);
  font-family: Georgia, serif;
  font-size: 17px;
  font-style: italic;
}

.value-strip span {
  font-family: "Yu Mincho", serif;
  font-size: 20px;
  font-weight: 700;
}

.value-strip small {
  color: var(--ink-soft);
  font-size: 14px;
}

.tool-section {
  width: min(980px, calc(100vw - 64px));
  margin: 0 auto;
  padding-bottom: 130px;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 46px;
}

.section-heading h2,
.result-heading h2,
.privacy-note h2 {
  margin: 0;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(34px, 4vw, 50px);
  line-height: 1.35;
  letter-spacing: -0.025em;
}

.section-heading > p:last-child {
  margin: 16px 0 0;
  color: var(--ink-soft);
}

#prompt-form {
  display: grid;
  gap: 22px;
}

.question-card,
.result-card {
  margin: 0;
  padding: clamp(28px, 4vw, 46px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 254, 251, 0.92);
  box-shadow: 0 10px 34px rgba(37, 48, 50, 0.055);
}

.question-card h3,
.question-card legend {
  margin: 0 0 24px;
  padding: 0;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 25px;
  font-weight: 700;
  line-height: 1.45;
}

.question-card legend {
  width: 100%;
}

.step-number {
  width: 34px;
  height: 34px;
  margin-right: 12px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: white;
  font-family: Georgia, serif;
  font-size: 15px;
  font-style: italic;
  vertical-align: 3px;
}

.mode-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.mode-card {
  position: relative;
  min-height: 205px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  border: 2px solid var(--line);
  border-radius: 18px;
  background: var(--white);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.mode-card:hover {
  transform: translateY(-2px);
  border-color: rgba(47, 129, 122, 0.55);
}

.mode-card:has(input:checked) {
  border-color: var(--teal);
  background: linear-gradient(145deg, var(--white), #edf7f3);
  box-shadow: 0 12px 28px rgba(47, 129, 122, 0.12);
}

.mode-card input {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 22px;
  height: 22px;
  accent-color: var(--teal);
}

.mode-card strong {
  margin-top: 18px;
  font-size: 20px;
}

.mode-card small {
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.55;
}

.mode-card > b {
  position: absolute;
  top: 18px;
  left: 18px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--coral-soft);
  color: var(--coral-dark);
  font-size: 11px;
}

.mode-visual {
  position: relative;
  width: 82px;
  height: 55px;
  display: block;
}

.edit-visual i:first-child,
.edit-visual i:last-child {
  position: absolute;
  width: 54px;
  height: 40px;
  border: 1px solid var(--ink);
  border-radius: 6px;
}

.edit-visual i:first-child {
  top: 0;
  left: 0;
  background: var(--coral-soft);
}

.edit-visual i:last-child {
  right: 0;
  bottom: 0;
  background: var(--teal-soft);
}

.create-visual i {
  position: absolute;
  border: 1px solid var(--ink);
  background: var(--yellow);
  transform: rotate(45deg);
}

.create-visual i:first-child {
  top: 8px;
  left: 4px;
  width: 34px;
  height: 34px;
}

.create-visual i:nth-child(2) {
  right: 10px;
  bottom: 0;
  width: 24px;
  height: 24px;
  background: var(--teal-soft);
}

.create-visual i:last-child {
  top: 0;
  right: 18px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--coral);
}

.reference-visual {
  width: 92px;
}

.reference-visual i {
  position: absolute;
  width: 55px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 7px;
  background: var(--white);
  color: var(--ink);
  font-family: Georgia, serif;
  font-size: 15px;
  font-style: normal;
  font-weight: 700;
}

.reference-visual i:first-child {
  top: 0;
  left: 0;
  background: var(--yellow);
  transform: rotate(-5deg);
}

.reference-visual i:last-child {
  right: 0;
  bottom: 0;
  background: var(--teal-soft);
  transform: rotate(5deg);
}

#edit-fields,
#create-fields,
#reference-fields {
  display: grid;
  gap: 22px;
}

.reference-intro > p {
  margin: -8px 0 22px;
  color: var(--ink-soft);
  line-height: 1.8;
}

.reference-intro > p b {
  color: var(--ink);
}

.reference-order {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.reference-order > span {
  min-height: 88px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
}

.reference-order > span:first-child {
  border-color: rgba(232, 111, 87, 0.45);
  background: #fff6f2;
}

.reference-order > span:last-child {
  border-color: rgba(47, 129, 122, 0.4);
  background: #f0f8f5;
}

.reference-order b {
  font-family: "Yu Mincho", serif;
  font-size: 20px;
}

.reference-order small {
  color: var(--ink-soft);
}

.reference-order i {
  color: var(--coral-dark);
  font-size: 24px;
  font-style: normal;
}

.reference-card:first-of-type {
  border-color: rgba(232, 111, 87, 0.32);
}

.reference-card:last-of-type {
  border-color: rgba(47, 129, 122, 0.32);
}

.exact-role span {
  border-style: dashed;
}

.exact-reference-field {
  margin-top: 20px;
  padding: 20px;
  border-radius: 14px;
  background: #f5f1e8;
}

.reference-scene-field {
  margin-top: 0;
}

.proportion-detail-card {
  border-color: rgba(47, 129, 122, 0.42);
  background: linear-gradient(135deg, rgba(226, 240, 237, 0.72), rgba(255, 255, 255, 0.94));
}

.detail-marker {
  width: 32px;
  height: 32px;
  margin-right: 10px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: var(--teal);
  color: var(--white);
  font-size: 18px;
  line-height: 1;
}

.proportion-detail-grid {
  align-items: start;
}

.photo-person-option {
  min-height: 98px;
  padding: 18px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  border: 1px solid #c9c5bb;
  border-radius: 12px;
  background: var(--white);
  cursor: pointer;
}

.photo-person-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.photo-person-check {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 2px solid #aaa69d;
  border-radius: 8px;
  color: transparent;
  font-size: 16px;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.photo-person-option b,
.photo-person-option small {
  display: block;
}

.photo-person-option b {
  color: var(--ink);
  font-size: 15px;
}

.photo-person-option small {
  margin-top: 5px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.5;
}

.photo-person-option:has(input:checked) {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(47, 129, 122, 0.08);
}

.photo-person-option input:focus-visible ~ .photo-person-check {
  outline: 3px solid rgba(47, 129, 122, 0.26);
  outline-offset: 2px;
}

.photo-person-option input:checked + .photo-person-check {
  border-color: var(--teal);
  background: var(--teal);
  color: var(--white);
}

.photo-person-source {
  max-width: calc(50% - 9px);
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px dashed rgba(47, 129, 122, 0.32);
}

.field-grid {
  display: grid;
  gap: 18px;
}

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

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

.field-label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
}

.field-label b {
  color: var(--coral-dark);
  font-size: 12px;
}

.field-label small {
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.6;
}

input[type="text"],
select,
textarea {
  width: 100%;
  border: 1px solid #c9c5bb;
  border-radius: 12px;
  outline: none;
  background: var(--white);
  color: var(--ink);
  font-size: 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="text"],
select {
  min-height: 54px;
  padding: 0 15px;
}

textarea {
  min-height: 105px;
  padding: 14px 15px;
  line-height: 1.7;
  resize: vertical;
}

input[type="text"]:focus,
select:focus,
textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(47, 129, 122, 0.12);
}

.detail-field {
  margin-top: 22px;
}

.question-help {
  margin: -12px 0 20px;
  color: var(--ink-soft);
  font-size: 14px;
}

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

.choice-grid label {
  position: relative;
}

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

.choice-grid span {
  min-height: 48px;
  padding: 10px 12px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  line-height: 1.4;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.choice-grid input:focus-visible + span {
  outline: 3px solid rgba(47, 129, 122, 0.26);
  outline-offset: 2px;
}

.choice-grid input:checked + span {
  border-color: var(--teal);
  background: var(--teal-soft);
  color: #215f5a;
}

.reference-role-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.reference-role-grid span {
  min-height: 72px;
  align-content: center;
  gap: 2px;
}

.reference-role-grid span b,
.reference-role-grid span small {
  display: block;
}

.reference-role-grid span b {
  font-size: 14px;
  line-height: 1.4;
}

.reference-role-grid span small {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
}

.reference-role-grid input:checked + span small {
  color: inherit;
}

.common-card {
  border-color: rgba(232, 111, 87, 0.36);
}

.text-option {
  margin-top: 26px;
  padding-top: 24px;
  border-top: 1px dashed var(--line);
}

.toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.toggle-label input {
  position: absolute;
  opacity: 0;
}

.toggle-label > span {
  position: relative;
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background: #cbc8c0;
  transition: background 0.2s ease;
}

.toggle-label > span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease;
}

.toggle-label input:checked + span {
  background: var(--teal);
}

.toggle-label input:checked + span::after {
  transform: translateX(20px);
}

.toggle-label input:focus-visible + span {
  outline: 3px solid rgba(47, 129, 122, 0.25);
  outline-offset: 3px;
}

#text-fields {
  margin-top: 18px;
  padding: 20px;
  border-radius: 14px;
  background: #f5f1e8;
}

.inline-tip {
  margin: 12px 0 0;
  display: flex;
  gap: 9px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.6;
}

.inline-tip span {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--ink);
  font-weight: 800;
}

.form-error {
  margin: 0;
  padding: 14px 18px;
  border-left: 4px solid var(--coral-dark);
  border-radius: 8px;
  background: #fff0ec;
  color: #9e3e31;
  font-weight: 700;
}

.generate-button {
  width: min(520px, 100%);
  min-height: 70px;
  margin: 16px auto 0;
  padding: 0 22px 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 0;
  border-radius: 999px;
  background: var(--coral);
  color: white;
  font-size: 18px;
  font-weight: 800;
  box-shadow: 0 15px 34px rgba(191, 77, 62, 0.24);
  transition: transform 0.2s ease, background 0.2s ease;
}

.generate-button:hover,
.generate-button:focus-visible {
  transform: translateY(-2px);
  background: var(--coral-dark);
}

.generate-button b {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  font-size: 24px;
}

.result-card {
  margin-top: 54px;
  padding: clamp(30px, 5vw, 54px);
  border-color: rgba(47, 129, 122, 0.35);
  background: linear-gradient(155deg, #fffefb, #edf7f3);
  box-shadow: var(--shadow);
}

.result-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.result-heading .eyebrow {
  margin-bottom: 12px;
}

.result-heading h2 {
  font-size: clamp(32px, 4vw, 46px);
}

.result-check {
  flex: 0 0 auto;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--teal);
  color: white;
  font-size: 27px;
}

.result-guide {
  margin: 24px 0 14px;
  color: var(--ink-soft);
}

.prompt-box,
.retry-result {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(23, 43, 53, 0.2);
  border-radius: 16px;
  background: var(--white);
}

pre {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: "Yu Gothic", "YuGothic", sans-serif;
}

.prompt-box pre {
  min-height: 240px;
  padding: 28px 28px 92px;
  font-size: 16px;
  line-height: 1.9;
}

.copy-button {
  position: absolute;
  right: 18px;
  bottom: 18px;
  min-width: 150px;
  min-height: 48px;
  padding: 0 16px 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: white;
  font-size: 14px;
  font-weight: 700;
}

.copy-button:hover,
.copy-button:focus-visible {
  background: var(--teal);
}

.copy-button b {
  font-size: 18px;
}

.prompt-points {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.prompt-points > div {
  padding: 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
}

.prompt-points b,
.prompt-points span {
  display: block;
}

.prompt-points b {
  color: var(--teal);
  font-size: 12px;
}

.prompt-points span {
  margin-top: 3px;
  font-size: 13px;
  line-height: 1.55;
}

.result-actions {
  margin: 24px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.secondary-button,
.text-button,
.retry-button {
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
}

.secondary-button {
  border: 1px solid var(--ink);
  background: transparent;
}

.text-button {
  border: 0;
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.retry-panel {
  margin-top: 46px;
  padding-top: 38px;
  border-top: 1px dashed rgba(23, 43, 53, 0.28);
}

.retry-heading {
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.retry-heading > span {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--coral-soft);
  color: var(--coral-dark);
  font-size: 25px;
}

.retry-heading p,
.retry-heading h3 {
  margin: 0;
}

.retry-heading p {
  color: var(--coral-dark);
  font-size: 12px;
  font-weight: 800;
}

.retry-heading h3 {
  font-family: "Yu Mincho", serif;
  font-size: 23px;
}

.retry-panel > .field-label {
  max-width: 600px;
}

.retry-button {
  margin-top: 18px;
  border: 0;
  background: var(--teal);
  color: white;
}

.retry-result {
  margin-top: 20px;
}

.retry-result pre {
  min-height: 150px;
  padding: 24px 24px 82px;
  font-size: 15px;
  line-height: 1.85;
}

.copy-button.compact {
  min-width: 140px;
  min-height: 44px;
}

.privacy-note {
  width: var(--content);
  margin: 0 auto 120px;
  padding: clamp(34px, 5vw, 58px);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 28px;
  align-items: start;
  border-radius: 28px;
  background: var(--ink);
  color: white;
}

.privacy-icon {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  color: var(--teal-soft);
  font-size: 36px;
}

.privacy-note h2 {
  max-width: 800px;
  font-size: clamp(25px, 3vw, 36px);
}

.privacy-note p {
  max-width: 850px;
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: 16px;
}

footer {
  width: var(--content);
  min-height: 160px;
  margin: 0 auto;
  padding: 38px 0;
  border-top: 1px solid var(--line);
}

footer p {
  margin: 0 0 10px;
  display: flex;
  align-items: baseline;
  gap: 14px;
}

footer p b {
  font-family: "Yu Mincho", serif;
  font-size: 20px;
}

footer p span,
footer small {
  color: var(--ink-soft);
  font-size: 12px;
}

footer p a,
.footer-links a {
  color: var(--teal-dark);
  text-underline-offset: 4px;
}

footer p a {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 0 0 16px;
  font-size: 14px;
}

.footer-links span {
  color: var(--ink-soft);
}

footer small {
  display: block;
  max-width: 780px;
  margin-top: 7px;
  line-height: 1.65;
}

footer .copyright {
  margin-top: 14px;
}

.toast {
  position: fixed;
  z-index: 100;
  right: 22px;
  bottom: 22px;
  max-width: calc(100vw - 44px);
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: white;
  font-size: 14px;
  font-weight: 700;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1000px) {
  :root {
    --content: min(920px, calc(100vw - 48px));
  }

  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.82fr);
    gap: 36px;
  }

  .hero h1 {
    font-size: clamp(42px, 5.2vw, 58px);
  }

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

  .mode-card {
    padding: 22px;
  }

  .mode-card strong {
    font-size: 18px;
  }
}

@media (max-width: 760px) {
  :root {
    --content: calc(100vw - 40px);
  }

  .site-header {
    min-height: 76px;
  }

  .header-note {
    font-size: 12px;
  }

  .hero {
    min-height: 0;
    padding: 68px 0 78px;
    grid-template-columns: 1fr;
  }

  .hero-copy {
    max-width: 650px;
  }

  .hero h1 {
    font-size: clamp(40px, 8vw, 58px);
  }

  .translation-demo {
    width: min(520px, 100%);
    min-height: 450px;
    margin: 10px auto 0;
  }

  .value-strip {
    grid-template-columns: 1fr;
  }

  .value-strip > div {
    min-height: 108px;
  }

  .value-strip > div + div {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .tool-section {
    width: calc(100vw - 40px);
  }

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

  .mode-options {
    grid-template-columns: 1fr;
  }

  .mode-card {
    min-height: 160px;
  }

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

  .privacy-note {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  :root {
    --content: calc(100vw - clamp(36px, 10.6vw, 44px));
    --radius: 18px;
  }

  body {
    background-size: 28px 28px;
    font-size: 16px;
  }

  .site-header {
    min-height: 70px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .brand b {
    font-size: 16px;
  }

  .brand small,
  .header-note {
    display: none;
  }

  .hero {
    padding: 56px 0 70px;
    gap: 44px;
  }

  .eyebrow {
    margin-bottom: 16px;
    font-size: 11px;
  }

  .hero h1 {
    font-size: clamp(35px, 11.4vw, 47px);
    line-height: 1.36;
  }

  .hero-lead {
    margin: 28px 0 26px;
    font-size: 16px;
    line-height: 1.9;
  }

  .primary-link {
    width: 100%;
  }

  .translation-demo {
    min-height: 400px;
  }

  .translation-demo::before {
    inset: 35px 0 28px 10px;
  }

  .speech-before {
    top: 44px;
    width: 71%;
    padding: 20px 21px;
  }

  .speech-before p {
    font-size: 18px;
  }

  .translate-mark {
    top: 182px;
    left: 37%;
    font-size: 24px;
  }

  .speech-after {
    right: 0;
    bottom: 48px;
    width: 88%;
    padding: 23px 22px;
  }

  .speech-after p {
    font-size: 14px;
  }

  .value-strip {
    margin-bottom: clamp(72px, 18vw, 90px);
  }

  .value-strip > div {
    padding-right: 18px;
    padding-left: 60px;
  }

  .value-strip b {
    left: 18px;
  }

  .value-strip span {
    font-size: 18px;
  }

  .tool-section {
    width: calc(100vw - clamp(36px, 10.6vw, 44px));
    padding-bottom: clamp(72px, 18vw, 90px);
  }

  .section-heading {
    margin-bottom: 32px;
  }

  .section-heading h2 {
    font-size: clamp(29px, 9vw, 37px);
  }

  .question-card,
  .result-card {
    padding: 24px 18px;
  }

  .question-card h3,
  .question-card legend {
    margin-bottom: 20px;
    font-size: 21px;
  }

  .step-number {
    width: 30px;
    height: 30px;
    margin-right: 8px;
    font-size: 13px;
  }

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

  .photo-person-source {
    max-width: none;
  }

  .mode-card {
    min-height: 145px;
    padding: 20px;
  }

  .mode-visual {
    width: 64px;
    height: 42px;
  }

  .mode-card strong {
    margin-top: 10px;
    font-size: 18px;
  }

  .choice-grid {
    gap: 8px;
  }

  .choice-grid span {
    min-height: 48px;
    padding: 9px 7px;
    font-size: 13px;
  }

  .reference-role-grid span {
    min-height: 78px;
  }

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

  .reference-order > span {
    min-height: 76px;
  }

  .reference-order i {
    justify-self: center;
    transform: rotate(90deg);
  }

  .exact-reference-field {
    padding: 16px;
  }

  .field-label {
    font-size: 14px;
  }

  input[type="text"],
  select,
  textarea {
    font-size: 16px;
  }

  .generate-button {
    min-height: 64px;
    padding-left: 24px;
  }

  .result-card {
    margin-top: 42px;
  }

  .result-heading h2 {
    font-size: 30px;
  }

  .result-check {
    width: 45px;
    height: 45px;
  }

  .prompt-box pre {
    min-height: 280px;
    padding: 22px 18px 90px;
    font-size: 15px;
  }

  .prompt-points {
    grid-template-columns: 1fr;
  }

  .result-actions {
    flex-direction: column;
    gap: 8px;
  }

  .secondary-button {
    width: 100%;
  }

  .retry-heading {
    align-items: flex-start;
  }

  .retry-heading h3 {
    font-size: 20px;
  }

  .privacy-note {
    margin-bottom: clamp(72px, 18vw, 90px);
    padding: 30px 22px;
  }

  .privacy-note h2 {
    font-size: 25px;
  }

  footer {
    min-height: 150px;
  }

  footer p {
    align-items: flex-start;
    flex-direction: column;
    gap: 0;
  }

  .toast {
    right: 18px;
    bottom: 18px;
  }
}

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