:root {
  color-scheme: light;
  --ink: #153331;
  --muted: #60716e;
  --paper: #f6f2e9;
  --paper-deep: #ece4d6;
  --card: rgba(255, 253, 248, 0.92);
  --line: rgba(21, 51, 49, 0.16);
  --green: #143f3b;
  --green-soft: #d9eee5;
  --lime: #d9f45c;
  --coral: #ff7b61;
  --shadow: 0 24px 60px rgba(30, 54, 49, 0.12);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--paper);
  scroll-behavior: smooth;
}

body {
  position: relative;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 4%, rgba(217, 244, 92, 0.2), transparent 24rem),
    linear-gradient(180deg, #faf7f0 0%, var(--paper) 52%, #eee7da 100%);
  font-family: "Hiragino Sans", "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
  line-height: 1.65;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -3;
  background-image: radial-gradient(rgba(20, 63, 59, 0.13) 0.7px, transparent 0.7px);
  background-size: 18px 18px;
  content: "";
  opacity: 0.32;
  pointer-events: none;
}

button,
textarea,
input {
  font: inherit;
}

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

.ambient {
  position: fixed;
  z-index: -2;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  filter: blur(1px);
  pointer-events: none;
}

.ambient-one {
  top: 14%;
  right: -170px;
  border: 1px solid rgba(20, 63, 59, 0.14);
  box-shadow: inset 0 0 0 54px rgba(217, 244, 92, 0.06);
}

.ambient-two {
  bottom: -210px;
  left: -120px;
  background: rgba(255, 123, 97, 0.08);
}

.site-header,
main,
footer {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 0;
}

.brand {
  display: inline-flex;
  gap: 11px;
  align-items: center;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  grid-template-columns: repeat(3, 5px);
  gap: 3px;
  align-items: end;
  width: 25px;
  height: 25px;
  padding: 5px;
  border-radius: 7px;
  background: var(--green);
}

.brand-mark i {
  display: block;
  border-radius: 99px;
  background: var(--lime);
}

.brand-mark i:nth-child(1) { height: 6px; }
.brand-mark i:nth-child(2) { height: 12px; }
.brand-mark i:nth-child(3) { height: 9px; }

.privacy-badge {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.52);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.privacy-badge span {
  color: #39a26e;
  font-size: 0.58rem;
}

.hero {
  max-width: 800px;
  padding: 64px 0 50px;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow span {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.eyebrow span::before {
  width: 28px;
  height: 2px;
  background: var(--coral);
  content: "";
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 22px;
  font-size: clamp(2.5rem, 6.4vw, 5.1rem);
  font-weight: 900;
  letter-spacing: -0.055em;
  line-height: 1.08;
}

h1 em {
  position: relative;
  color: var(--green);
  font-style: normal;
  white-space: nowrap;
}

h1 em::after {
  position: absolute;
  right: -2px;
  bottom: 0.05em;
  left: -2px;
  z-index: -1;
  height: 0.22em;
  border-radius: 99px;
  background: var(--lime);
  content: "";
  transform: rotate(-1.5deg);
}

.lead {
  max-width: 680px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.14rem);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 20px;
  align-items: stretch;
}

.panel {
  min-width: 0;
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid rgba(21, 51, 49, 0.13);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.input-panel {
  background: var(--card);
  backdrop-filter: blur(14px);
}

.output-panel {
  display: flex;
  flex-direction: column;
  min-height: 620px;
  color: #f6f4ec;
  background:
    linear-gradient(150deg, rgba(217, 244, 92, 0.08), transparent 35%),
    var(--green);
}

.panel-heading {
  display: flex;
  gap: 13px;
  align-items: center;
  margin-bottom: 26px;
}

.output-heading {
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.step-number {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--coral);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 800;
}

.output-panel .step-number {
  border-color: rgba(255, 255, 255, 0.18);
  color: var(--lime);
}

.panel-kicker {
  margin: 0 0 2px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.output-panel .panel-kicker {
  color: rgba(255, 255, 255, 0.52);
}

h2 {
  margin-bottom: 0;
  font-size: 1.26rem;
  letter-spacing: -0.025em;
  line-height: 1.3;
}

.ready-light {
  width: 9px;
  height: 9px;
  margin-left: auto;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.26);
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.05);
  transition: 180ms ease;
}

.ready-light.is-ready {
  background: var(--lime);
  box-shadow: 0 0 0 5px rgba(217, 244, 92, 0.13), 0 0 20px rgba(217, 244, 92, 0.52);
}

.field-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.86rem;
  font-weight: 800;
}

.field-label span {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.7rem;
  font-weight: 700;
}

textarea {
  display: block;
  width: 100%;
  min-height: 172px;
  resize: vertical;
  padding: 17px 18px;
  border: 1px solid var(--line);
  border-radius: 15px;
  outline: none;
  color: var(--ink);
  background: rgba(249, 246, 238, 0.86);
  line-height: 1.7;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

textarea::placeholder {
  color: #96a19e;
}

textarea:hover {
  background: #fffdf8;
}

textarea:focus {
  border-color: var(--green);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(20, 63, 59, 0.1);
}

.field-hint,
.form-error {
  margin: 7px 0 22px;
  color: var(--muted);
  font-size: 0.74rem;
}

.form-error {
  min-height: 1.25em;
  margin: 14px 0 8px;
  color: #b83e32;
  font-weight: 700;
}

.choice-grid {
  display: grid;
  gap: 20px;
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

legend {
  margin-bottom: 9px;
  font-size: 0.82rem;
  font-weight: 800;
}

legend span {
  margin-right: 8px;
  color: var(--coral);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.68rem;
}

.segmented {
  display: grid;
  gap: 7px;
}

.time-options {
  grid-template-columns: repeat(4, 1fr);
}

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

.segmented label {
  cursor: pointer;
}

.segmented input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.segmented span {
  display: grid;
  place-items: center;
  min-height: 44px;
  padding: 9px 6px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.52);
  font-size: 0.8rem;
  font-weight: 800;
  transition: 150ms ease;
}

.segmented label:hover span {
  border-color: rgba(20, 63, 59, 0.38);
  color: var(--ink);
}

.segmented input:checked + span {
  border-color: var(--green);
  color: #fff;
  background: var(--green);
  box-shadow: 0 6px 16px rgba(20, 63, 59, 0.18);
}

.segmented input:focus-visible + span {
  outline: 3px solid rgba(255, 123, 97, 0.45);
  outline-offset: 2px;
}

.primary-button,
.copy-button {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  border: 0;
  cursor: pointer;
  font-weight: 900;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.primary-button {
  gap: 12px;
  min-height: 56px;
  padding: 14px 18px;
  border-radius: 14px;
  color: var(--green);
  background: var(--lime);
  box-shadow: 0 12px 24px rgba(127, 150, 34, 0.19);
}

.primary-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 28px rgba(127, 150, 34, 0.26);
}

.button-arrow {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  color: var(--lime);
  background: var(--green);
}

.empty-state {
  display: grid;
  flex: 1;
  place-content: center;
  justify-items: center;
  padding: 50px 24px;
  text-align: center;
}

.empty-state p {
  max-width: 300px;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.78rem;
}

.empty-state p strong {
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.9rem;
}

.mini-plan {
  position: relative;
  width: 112px;
  height: 132px;
  margin-bottom: 25px;
  padding: 28px 18px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  transform: rotate(3deg);
}

.mini-plan::before {
  position: absolute;
  top: -10px;
  left: 24px;
  width: 62px;
  height: 20px;
  border-radius: 7px;
  background: var(--lime);
  content: "";
  opacity: 0.9;
}

.mini-plan span,
.mini-plan i {
  display: block;
  height: 7px;
  margin-bottom: 13px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.16);
}

.mini-plan span { width: 48%; background: var(--coral); }
.mini-plan i:nth-child(2) { width: 100%; }
.mini-plan i:nth-child(3) { width: 80%; }
.mini-plan i:nth-child(4) { width: 62%; }

.prompt-result {
  min-height: 0;
}

.result-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  color: rgba(255, 255, 255, 0.55);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.64rem;
  letter-spacing: 0.04em;
}

pre {
  max-height: 380px;
  margin: 0 0 14px;
  overflow: auto;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 14px;
  outline: none;
  color: #eff5ec;
  background: rgba(3, 23, 21, 0.42);
  font-family: "Hiragino Sans", "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
  font-size: 0.8rem;
  line-height: 1.68;
  white-space: pre-wrap;
  word-break: break-word;
}

pre:focus-visible {
  box-shadow: 0 0 0 3px rgba(217, 244, 92, 0.35);
}

.copy-button {
  gap: 9px;
  min-height: 50px;
  padding: 13px 16px;
  border-radius: 12px;
  color: var(--green);
  background: #fffdf7;
}

.copy-button:hover {
  transform: translateY(-1px);
  background: var(--lime);
}

.copy-button.is-copied {
  background: var(--lime);
}

.copy-icon {
  font-size: 1.1rem;
  transform: rotate(90deg);
}

.handoff-note {
  margin: 12px 2px 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.7rem;
  line-height: 1.55;
}

.how-it-works {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: center;
  padding: 36px 8px 0;
}

.how-it-works p {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0;
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 700;
}

.how-it-works span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: var(--green);
  background: var(--green-soft);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.65rem;
}

.how-it-works i {
  width: 22px;
  height: 1px;
  background: var(--line);
}

footer {
  padding: 36px 0 38px;
  text-align: center;
}

footer p {
  margin: 0;
  color: #7a8784;
  font-size: 0.68rem;
}

.sr-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 3px;
}

@media (max-width: 820px) {
  .hero {
    padding-top: 42px;
  }

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

  .output-panel {
    min-height: 520px;
  }
}

@media (max-width: 560px) {
  .site-header,
  main,
  footer {
    width: min(100% - 24px, 1120px);
  }

  .site-header {
    padding: 17px 0;
  }

  .brand {
    font-size: 0.78rem;
  }

  .privacy-badge {
    padding: 6px 8px;
    font-size: 0.63rem;
  }

  .privacy-badge span {
    display: none;
  }

  .hero {
    padding: 42px 2px 34px;
  }

  h1 {
    font-size: clamp(2.36rem, 12vw, 3.3rem);
  }

  h1 br {
    display: none;
  }

  .panel {
    padding: 20px;
    border-radius: 19px;
  }

  .time-options {
    grid-template-columns: repeat(2, 1fr);
  }

  .output-panel {
    min-height: 500px;
  }

  .how-it-works {
    display: grid;
    grid-template-columns: 1fr;
    gap: 9px;
    justify-items: start;
    padding: 26px 8px 0;
  }

  .how-it-works i {
    display: none;
  }
}

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