:root {
  --sky: #f6f0e7;
  --lilac: #e7efe7;
  --rose: #f7f4ee;
  --ink: #302a24;
  --soft-ink: #665d52;
  --brown: #735844;
  --gold: #b8844f;
  --gold-light: #e7c996;
  --paper: rgba(255, 253, 248, 0.84);
  --paper-strong: rgba(255, 253, 248, 0.96);
  --line: rgba(255, 255, 255, 0.9);
  --shadow: 0 18px 44px rgba(77, 63, 50, 0.14);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;
  color: var(--ink);
  font-family: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background:
    linear-gradient(180deg, var(--sky), var(--lilac) 52%, var(--rose));
}

body {
  min-height: 100vh;
}

.app-shell {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 28px 18px 56px;
  overflow-x: hidden;
}

.entry-screen,
.poster-screen {
  width: 100%;
}

.entry-screen {
  min-height: calc(100vh - 84px);
  display: grid;
  place-items: center;
}

.entry-frame,
.poster-sheet {
  max-width: 100%;
  min-width: 0;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.entry-frame {
  width: min(100%, 760px);
  padding: 42px 34px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--brown);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
}

h1,
.poster-header h2 {
  color: var(--gold);
  font-family: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-weight: 500;
}

h1 {
  line-height: 1.12;
}

.entry-title {
  margin: 0 auto 12px;
}

.entry-title-kicker,
.entry-title-main,
.entry-title-sub {
  display: block;
}

.entry-title-kicker {
  color: var(--brown);
  font-size: clamp(1.2rem, 2.4vw, 1.65rem);
  font-weight: 500;
  line-height: 1.5;
}

.entry-title-main {
  margin-top: 8px;
  color: var(--gold);
  font-size: clamp(2.15rem, 5vw, 4.05rem);
  font-weight: 500;
  line-height: 1.12;
}

.entry-title-sub {
  margin-top: 12px;
  color: var(--brown);
  font-size: clamp(1rem, 2.1vw, 1.35rem);
  font-weight: 500;
  line-height: 1.55;
}

.entry-guide {
  margin: 1.8em 0 30px;
  color: var(--soft-ink);
  font-size: 0.96rem;
  line-height: 1.8;
  text-align: left;
}

.reading-form {
  display: grid;
  gap: 18px;
}

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

.field {
  display: grid;
  gap: 10px;
  text-align: left;
}

.field span {
  color: var(--brown);
  font-weight: 500;
}

.field select {
  width: 100%;
  min-height: 58px;
  border: 1px solid rgba(123, 154, 184, 0.26);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  padding: 0 16px;
  font-size: 1rem;
  font-family: inherit;
}

.form-error {
  min-height: 1.5em;
  margin: 0;
  color: #8f4c57;
  font-weight: 500;
}

.primary-button,
.secondary-button {
  min-height: 58px;
  border: 0;
  border-radius: 999px;
  color: #6d5538;
  background: linear-gradient(135deg, rgba(255, 250, 239, 0.98), rgba(213, 171, 116, 0.94));
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(188, 166, 119, 0.18);
  border: 1px solid rgba(201, 161, 94, 0.22);
  width: min(100%, 320px);
  justify-self: center;
}

.poster-sheet {
  width: min(100%, 920px);
  margin: 0 auto;
  padding: 26px;
  display: grid;
  gap: 18px;
}

.poster-header,
.poster-block {
  min-width: 0;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-strong);
  box-shadow: inset 0 0 0 1px rgba(206, 225, 239, 0.3);
}

.poster-header {
  padding: 28px 22px;
  text-align: center;
}

.poster-header h2 {
  line-height: 1.12;
}

.poster-title-kicker,
.poster-title-main {
  display: block;
}

.poster-title-kicker {
  color: var(--brown);
  font-family: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: clamp(1.2rem, 2.4vw, 1.65rem);
  font-weight: 500;
  line-height: 1.5;
}

.poster-title-main {
  margin-top: 8px;
  color: var(--gold);
  font-family: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: clamp(2.15rem, 5vw, 4.2rem);
  font-weight: 500;
  line-height: 1.12;
}

.poster-header p {
  margin: 16px 0 0;
  color: var(--soft-ink);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  font-weight: 500;
}

.poster-block {
  padding: 22px;
}

.poster-block > h3,
.year-fortune p,
.tenchusatsu-block h3 {
  color: var(--brown);
  font-family: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: clamp(1.2rem, 2.4vw, 1.65rem);
  font-weight: 500;
}

.muse-hero,
.year-fortune,
.tenchusatsu-block,
.muse-quote {
  text-align: center;
}

.hero-label,
.year-fortune p {
  margin: 0 0 12px;
  font-weight: 500;
  text-align: center;
}

.muse-code {
  display: block;
  width: 100%;
  margin: 0 auto;
  color: var(--gold);
  font-family: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: clamp(2.1rem, 6vw, 4.6rem);
  font-weight: 500;
  line-height: 1.08;
  text-align: center;
}

.muse-stem,
.muse-reading {
  display: block;
}

.muse-reading {
  margin-top: 8px;
  font-size: 0.42em;
  line-height: 1.3;
}

.muse-description {
  display: block;
  width: 100%;
  margin: 18px auto 0;
  max-width: none;
  color: var(--brown);
  font-family: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: clamp(1.2rem, 2.4vw, 1.65rem);
  font-weight: 500;
  line-height: 1.55;
  text-align: center;
  white-space: pre-line;
}

.muse-hero .muse-code {
  font-size: clamp(1.75rem, 4vw, 3rem);
}

.muse-hero .muse-description {
  font-size: clamp(1.7rem, 3.4vw, 2.55rem);
}

.hero-subline {
  margin: 20px 0 0;
  color: var(--brown);
  font-size: clamp(1.15rem, 2.5vw, 1.6rem);
  font-weight: 500;
}

.hero-note {
  margin: 10px 0 0;
  color: var(--soft-ink);
  font-size: 1rem;
}

.year-fortune h3 {
  color: var(--gold);
  font-family: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: clamp(2.15rem, 5.4vw, 4.15rem);
  font-weight: 500;
  line-height: 1.08;
}

.tenchusatsu-block {
  background: rgba(255, 248, 225, 0.96);
}

.tenchusatsu-block p {
  margin: 12px 0 0;
  color: var(--gold);
  font-size: clamp(1.7rem, 4vw, 3rem);
  font-weight: 500;
}

.poster-block > p,
.caution-copy {
  margin: 14px 0 0;
  color: var(--ink);
  font-size: 1.05rem;
  line-height: 1.95;
}

.score-table {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.score-row {
  display: grid;
  grid-template-columns: 110px 110px 1fr;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid rgba(123, 89, 56, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
}

.score-row strong {
  color: var(--brown);
  font-weight: 600;
}

.stars {
  color: var(--gold);
  font-weight: 600;
  white-space: nowrap;
}

.score-row p {
  margin: 0;
  line-height: 1.8;
}

.muse-visual {
  width: min(100%, 520px);
  margin: 0 auto 24px;
  padding: 12px;
  border: 1px solid rgba(201, 161, 94, 0.22);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 16px 28px rgba(125, 145, 172, 0.16);
}

.muse-visual img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
}

.advice-grid.coffee-card-grid {
  grid-template-columns: minmax(0, min(100%, 560px));
  justify-content: center;
}

.coffee-card {
  min-height: auto;
  text-align: center;
}

.coffee-card h4 {
  margin: 0;
  color: var(--gold);
  font-size: clamp(1.35rem, 2.6vw, 2rem);
  font-weight: 600;
  line-height: 1.45;
}

.coffee-card .advice-index {
  color: #6d8574;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.advice-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.advice-card {
  min-height: 154px;
  display: grid;
  align-content: center;
  gap: 12px;
  padding: 18px 16px;
  border: 2px solid rgba(255, 255, 255, 0.94);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 22px rgba(132, 170, 199, 0.16);
  text-align: center;
}

.advice-index {
  color: #7aa8cf;
  font-family: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: 1.8rem;
  line-height: 1;
}

.advice-card p {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.8;
}

.muse-quote p {
  margin: 18px auto 0;
  width: min(100%, 720px);
  padding: 18px 20px;
  border-top: 1px solid rgba(200, 148, 50, 0.54);
  border-bottom: 1px solid rgba(200, 148, 50, 0.54);
  color: var(--brown);
  background: transparent;
  font-family: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: clamp(1.2rem, 2.5vw, 1.7rem);
  font-weight: 500;
  line-height: 1.6;
}

.chart-visual {
  width: min(100%, 780px);
  max-width: 100%;
  overflow: hidden;
  margin: 0 auto 24px;
  padding: 14px;
  border: 1px solid rgba(147, 178, 205, 0.24);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.76);
}

.chart-table {
  display: grid;
  width: 100%;
  min-width: 0;
  grid-template-columns: minmax(72px, 0.85fr) repeat(3, minmax(0, 1fr));
  border-top: 1px solid rgba(124, 145, 165, 0.42);
  border-left: 1px solid rgba(124, 145, 165, 0.42);
  background: rgba(255, 255, 255, 0.88);
}

.chart-panel .chart-table {
  grid-template-columns: minmax(132px, 0.9fr) minmax(0, 1.4fr);
}

.chart-cell {
  min-height: 68px;
  display: grid;
  place-items: center;
  min-width: 0;
  padding: 10px 6px;
  border-right: 1px solid rgba(124, 145, 165, 0.42);
  border-bottom: 1px solid rgba(124, 145, 165, 0.42);
  color: #29262d;
  text-align: center;
  line-height: 1.45;
}

.chart-head,
.chart-side {
  background: rgba(232, 241, 248, 0.96);
  color: #5c6672;
  font-family: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: clamp(0.82rem, 2.2vw, 1.05rem);
  font-weight: 500;
}

.chart-pillar {
  min-height: 122px;
  align-content: center;
  gap: 6px;
}

.chart-main {
  display: block;
  color: #17141b;
  font-size: clamp(1.15rem, 3vw, 2rem);
  font-family: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
}

.chart-sub {
  display: block;
  color: #665f6d;
  font-size: 0.84rem;
}

.chart-note {
  margin: 10px 0 0;
  color: var(--soft-ink);
  font-size: 0.92rem;
  text-align: left;
}

.line-contact-note {
  margin: 4px auto 0;
  color: var(--brown);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.9;
  text-align: center;
}

.secondary-button {
  margin: 10px auto 0;
  display: block;
}

.is-hidden {
  display: none;
}

@media (max-width: 768px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .app-shell {
    width: 100%;
    max-width: 100%;
    padding: 14px 8px 34px;
  }

  .poster-screen,
  .poster-sheet,
  .poster-header,
  .poster-block {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .entry-frame,
  .poster-sheet {
    padding: 14px;
  }

  .date-grid,
  .score-row,
  .advice-grid {
    grid-template-columns: 1fr;
  }

  .score-row {
    gap: 8px;
  }

  .entry-title {
    margin-bottom: 10px;
  }

  .entry-title-kicker {
    font-size: 1.05rem;
  }

  .entry-title-main {
    font-size: clamp(1.85rem, 7vw, 2.45rem);
  }

  .entry-title-sub {
    margin-top: 8px;
    font-size: 0.98rem;
  }

  .entry-guide {
    margin-top: 1.8em;
    margin-bottom: 24px;
    font-size: 0.9rem;
  }

  .poster-sheet {
    gap: 14px;
    overflow: hidden;
  }

  .poster-header,
  .poster-block {
    padding: 16px 14px;
  }

  .poster-header h2 {
    line-height: 1.22;
  }

  .poster-title-kicker {
    font-size: 1.05rem;
  }

  .poster-title-main {
    font-size: clamp(1.85rem, 7vw, 2.45rem);
  }

  .poster-header p {
    margin-top: 10px;
    font-size: 1rem;
  }

  .chart-visual {
    width: 100%;
    max-width: 100%;
    padding: 6px;
    overflow: hidden;
  }

  .chart-table {
    display: grid;
    width: 100%;
    min-width: 0;
    grid-template-columns: minmax(44px, 0.72fr) repeat(3, minmax(0, 1fr));
    white-space: normal;
  }

  .chart-cell {
    display: grid;
    width: auto;
    min-width: 0;
    min-height: 48px;
    padding: 6px 2px;
    font-size: 0.68rem;
    line-height: 1.32;
    overflow-wrap: anywhere;
  }

  .chart-head,
  .chart-side {
    width: auto;
  }

  .chart-pillar {
    min-height: 64px;
  }

  .chart-main {
    font-size: 0.88rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
  }

  .chart-note {
    font-size: 0.82rem;
    line-height: 1.6;
  }

  .muse-visual {
    width: 100%;
    max-width: 280px;
    padding: 6px;
    margin-bottom: 18px;
  }

  .muse-visual img {
    max-width: 100%;
  }

  .hero-label {
    font-size: 1rem;
    line-height: 1.6;
  }

  .muse-hero .muse-code {
    font-size: clamp(1.45rem, 6vw, 2rem);
    overflow-wrap: anywhere;
  }

  .muse-hero .muse-description {
    max-width: 100%;
    font-size: clamp(1.25rem, 5vw, 1.65rem);
    line-height: 1.55;
    overflow-wrap: anywhere;
  }

  .year-fortune p {
    font-size: 1rem;
    line-height: 1.6;
  }

  .year-fortune h3 {
    font-size: clamp(1.52rem, 6.8vw, 2.12rem);
    line-height: 1.22;
    overflow-wrap: anywhere;
  }

  .poster-block > h3,
  .tenchusatsu-block h3 {
    font-size: 1.12rem;
    line-height: 1.5;
  }

  .poster-block > p,
  .score-row p,
  .advice-card p,
  .line-contact-note,
  .muse-quote p {
    font-size: 0.92rem;
    line-height: 1.9;
  }

  .score-row {
    padding: 12px;
  }

  .advice-card {
    min-height: auto;
    padding: 16px 14px;
  }

  .advice-index {
    font-size: 1.5rem;
  }

  .muse-quote p {
    width: 100%;
    padding-inline: 8px;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
    min-height: 56px;
  }
}

@media (max-width: 380px) {
  .app-shell {
    padding-inline: 6px;
  }

  .entry-frame,
  .poster-sheet {
    padding: 10px;
  }

  .poster-header,
  .poster-block {
    padding: 14px 10px;
  }

  .chart-table {
    grid-template-columns: minmax(38px, 0.66fr) repeat(3, minmax(0, 1fr));
  }

  .chart-cell {
    min-height: 44px;
    padding: 5px 1px;
    font-size: 0.62rem;
    line-height: 1.28;
  }

  .chart-main {
    font-size: 0.78rem;
  }

  .muse-visual {
    max-width: 236px;
  }

  .muse-hero .muse-code {
    font-size: clamp(1.35rem, 6vw, 1.8rem);
  }

  .poster-block > p,
  .score-row p,
  .advice-card p,
  .line-contact-note,
  .muse-quote p {
    font-size: 0.86rem;
  }

  .muse-hero .muse-description {
    font-size: clamp(1.12rem, 5vw, 1.4rem);
  }
}
