:root {
  color-scheme: light;
  --ink: #15191d;
  --muted: #606b73;
  --line: #d8e2e0;
  --paper: #f8fbfa;
  --surface: rgba(255, 255, 255, 0.9);
  --green: #16866f;
  --green-dark: #0f5f50;
  --coral: #ef6b5a;
  --aqua: #d7f0eb;
  --yellow: #f4c65f;
  --shadow: 0 20px 70px rgba(20, 33, 37, 0.14);
  font-family:
    "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(140deg, rgba(215, 240, 235, 0.9), rgba(248, 251, 250, 0.72)),
    linear-gradient(35deg, rgba(244, 198, 95, 0.26), transparent 42%),
    var(--paper);
}

button,
input {
  font: inherit;
}

.app-shell {
  width: min(960px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 40px;
  align-items: center;
  padding: 48px 0;
}

.landing-shell {
  width: min(960px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  gap: 32px;
  align-content: start;
  padding: 48px 0;
}

.comic-shell {
  width: min(1040px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  gap: 28px;
  align-content: start;
  padding: 40px 0 56px;
}

.hero {
  display: grid;
  gap: 18px;
}

.landing-hero {
  display: grid;
  gap: 18px;
  padding-top: 18px;
}

.comic-head {
  display: grid;
  gap: 16px;
}

.eyebrow {
  width: fit-content;
  margin: 0;
  padding: 8px 12px;
  border: 1px solid rgba(22, 134, 111, 0.25);
  border-radius: 999px;
  color: var(--green-dark);
  background: rgba(255, 255, 255, 0.58);
  font-size: 0.84rem;
  font-weight: 800;
}

h1 {
  display: grid;
  gap: 6px;
  margin: 0;
  letter-spacing: 0;
}

h1 span {
  font-size: clamp(3.4rem, 9vw, 6.4rem);
  line-height: 0.9;
}

h1 small {
  color: var(--coral);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 900;
}

.brand-title {
  width: min(100%, 520px);
}

.brand-title-guide {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: flex-end;
  width: min(100%, 620px);
}

.brand-logo {
  display: block;
  width: 100%;
  height: auto;
}

.brand-logo-mobile {
  display: none;
}

.brand-logo-horizontal {
  max-width: min(72vw, 430px);
}

.brand-logo-stacked {
  max-width: min(100%, 410px);
}

.guide-title-text {
  display: inline-block;
  padding-left: 2px;
  color: var(--green-dark);
  font-size: clamp(1.45rem, 4vw, 2.2rem);
  font-weight: 900;
  line-height: 1.1;
  white-space: nowrap;
}

.lead {
  max-width: 29rem;
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.8;
}

.primary-link,
.secondary-link,
.text-link {
  width: fit-content;
  min-height: 44px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  padding: 0 16px;
  color: inherit;
  font-weight: 900;
  text-decoration: none;
}

.primary-link {
  min-height: 56px;
  color: #fff;
  background: linear-gradient(135deg, var(--green), var(--coral));
  box-shadow: 0 15px 32px rgba(22, 134, 111, 0.25);
}

.secondary-link,
.text-link {
  border: 1px solid var(--line);
  background: #fff;
}

.guide {
  display: grid;
  gap: 18px;
  padding: 28px;
  border: 1px solid rgba(216, 226, 224, 0.95);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.guide h2 {
  margin: 0;
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  line-height: 1.25;
}

.scenario {
  margin: 0;
  color: var(--green-dark);
  font-weight: 900;
  line-height: 1.8;
}

.steps {
  margin: 0;
  padding-left: 1.35rem;
  color: var(--muted);
  line-height: 1.9;
}

.steps li + li {
  margin-top: 12px;
}

.comic-strip {
  display: grid;
  gap: 20px;
}

.image-panel {
  position: relative;
  overflow: hidden;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: #fff;
  box-shadow: 8px 8px 0 rgba(21, 25, 29, 0.12);
}

.image-panel img {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.panel-caption {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 18px;
  border-bottom: 3px solid var(--ink);
  background: #fff;
}

.panel-caption span {
  min-width: 52px;
  min-height: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: var(--coral);
  font-size: 0.78rem;
  font-weight: 900;
}

.panel-caption p {
  margin: 0;
  font-weight: 900;
  font-size: clamp(1.04rem, 3.8vw, 1.28rem);
  line-height: 1.7;
}

.panel-caption small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.82em;
  font-weight: 800;
  line-height: 1.75;
}

.final-card {
  display: grid;
  gap: 18px;
  justify-items: center;
  padding: 22px 12px 8px;
  text-align: center;
}

.final-card p {
  margin: 0;
  font-size: clamp(1.25rem, 4.8vw, 1.8rem);
  line-height: 1.45;
  font-weight: 900;
}

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

.comic-panel {
  position: relative;
  min-height: 280px;
  display: grid;
  gap: 14px;
  align-content: center;
  overflow: hidden;
  padding: 24px;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background:
    repeating-linear-gradient(
      -18deg,
      rgba(22, 134, 111, 0.07) 0,
      rgba(22, 134, 111, 0.07) 7px,
      transparent 7px,
      transparent 16px
    ),
    #fff;
  box-shadow: 8px 8px 0 rgba(21, 25, 29, 0.12);
}

.comic-panel.wide {
  grid-column: 1 / -1;
  min-height: 240px;
}

.panel-label {
  position: absolute;
  top: 14px;
  left: 14px;
  min-width: 42px;
  min-height: 34px;
  display: grid;
  place-items: center;
  padding: 0 10px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  color: #fff;
  background: var(--coral);
  font-size: 0.78rem;
  font-weight: 900;
}

.comic-character {
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  justify-self: end;
  border: 3px solid var(--ink);
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--green), var(--coral));
  font-size: 1.25rem;
  font-weight: 900;
  box-shadow: 5px 5px 0 rgba(21, 25, 29, 0.16);
}

.sub-character {
  width: 82px;
  height: 82px;
  justify-self: start;
  background: linear-gradient(135deg, var(--yellow), var(--green));
}

.speech {
  position: relative;
  margin: 0;
  padding: 16px 18px;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: #fff;
  font-weight: 900;
  line-height: 1.7;
}

.speech::after {
  content: "";
  position: absolute;
  right: 28px;
  bottom: -16px;
  width: 24px;
  height: 24px;
  border-right: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
  background: #fff;
  transform: rotate(45deg);
}

.speech.big {
  max-width: 620px;
  font-size: clamp(1.15rem, 3vw, 1.8rem);
}

.caption {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 800;
  line-height: 1.7;
}

.phone-art,
.post-card,
.search-art {
  width: min(100%, 300px);
  min-height: 122px;
  display: grid;
  gap: 8px;
  place-content: center;
  justify-self: center;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: var(--aqua);
  box-shadow: 6px 6px 0 rgba(21, 25, 29, 0.12);
  text-align: center;
}

.phone-art span {
  font-size: 3rem;
  line-height: 1;
  font-weight: 900;
}

.phone-art b,
.post-card b,
.search-art span {
  font-weight: 900;
}

.post-card {
  background: #fff;
}

.post-card span {
  color: var(--green-dark);
  font-weight: 900;
}

.search-art {
  position: relative;
  background: var(--yellow);
}

.search-art i {
  width: 48px;
  height: 48px;
  justify-self: center;
  border: 6px solid var(--ink);
  border-radius: 50%;
}

.search-art i::after {
  content: "";
  position: absolute;
  width: 34px;
  height: 7px;
  margin: 38px 0 0 -3px;
  background: var(--ink);
  transform: rotate(42deg);
}

.caution {
  background:
    repeating-linear-gradient(
      18deg,
      rgba(239, 107, 90, 0.09) 0,
      rgba(239, 107, 90, 0.09) 8px,
      transparent 8px,
      transparent 17px
    ),
    #fff;
}

.impact {
  margin: 0;
  font-size: clamp(2rem, 7vw, 4rem);
  line-height: 1.05;
  font-weight: 900;
}

.finale {
  justify-items: start;
  background:
    radial-gradient(circle at 14% 30%, rgba(244, 198, 95, 0.5), transparent 22%),
    radial-gradient(circle at 86% 26%, rgba(239, 107, 90, 0.24), transparent 22%),
    #fff;
}

.generator {
  display: grid;
  gap: 18px;
  padding: 28px;
  border: 1px solid rgba(216, 226, 224, 0.95);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.primary-button,
.secondary-button,
.copy-button,
.share-button {
  min-height: 52px;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  cursor: pointer;
  font-weight: 900;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.primary-button {
  width: 100%;
  min-height: 64px;
  color: #fff;
  background: linear-gradient(135deg, var(--green), var(--coral));
  box-shadow: 0 15px 32px rgba(22, 134, 111, 0.25);
  font-size: 1.1rem;
}

.secondary-button,
.copy-button,
.share-button {
  color: var(--ink);
  background: var(--aqua);
}

.share-button {
  min-height: 44px;
  padding: 0 14px;
  background: #fff;
  border: 1px solid var(--line);
}

button:hover:not(:disabled) {
  transform: translateY(-1px);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.56;
}

.tag-output {
  display: grid;
  place-items: center start;
  min-height: 104px;
  padding: 18px;
  border: 1px dashed var(--green);
  border-radius: 8px;
  color: var(--green-dark);
  background: rgba(22, 134, 111, 0.08);
  font-size: clamp(1rem, 2.4vw, 1.35rem);
  font-weight: 900;
  overflow-wrap: anywhere;
}

.tag-output.is-copyable {
  cursor: pointer;
  border-style: solid;
}

.tag-output.is-copyable:hover,
.tag-output.is-copyable:focus {
  box-shadow: 0 0 0 3px rgba(22, 134, 111, 0.18);
  outline: none;
}

.tag-output span {
  color: var(--muted);
  font-size: 0.96rem;
  font-weight: 700;
}

.postal-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.postal-panel[hidden] {
  display: none;
}

.field span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.field input {
  width: 100%;
  height: 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  color: var(--ink);
  background: #fff;
  outline: none;
}

.field input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(22, 134, 111, 0.18);
}

.actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: center;
}

.actions-title {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.primary-share {
  color: #fff;
  background: var(--green);
}

.message {
  min-height: 1.5em;
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.attribution {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.6;
}

.attribution a {
  color: var(--green-dark);
}

@media (max-width: 820px) {
  .app-shell {
    grid-template-columns: 1fr;
    min-height: auto;
    gap: 18px;
    align-items: start;
    align-content: start;
    padding: 32px 0;
  }

  .brand-logo-desktop {
    display: none;
  }

  .brand-logo-mobile {
    display: block;
  }

  .hero .brand-title {
    width: min(100%, 430px);
  }

  .hero {
    gap: 14px;
  }

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

  .comic-panel.wide {
    grid-column: auto;
  }

  .panel-caption {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .panel-caption span {
    width: fit-content;
  }

  h1 span {
    font-size: clamp(3rem, 17vw, 5.2rem);
  }
}

@media (max-width: 560px) {
  .app-shell {
    width: min(100% - 20px, 960px);
    gap: 16px;
    padding: 24px 0 40px;
  }

  .generator {
    padding: 18px;
  }

  .postal-panel {
    grid-template-columns: 1fr;
  }

  .secondary-button,
  .copy-button,
  .share-button {
    width: 100%;
  }

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

  .primary-share {
    grid-column: 1 / -1;
  }

  .share-button,
  .copy-button {
    min-height: 48px;
    padding: 0 10px;
    font-size: 0.92rem;
  }
}
