:root {
  color-scheme: light;
  --ink: #171514;
  --ink-soft: #2b2826;
  --ivory: #f3eee5;
  --paper: #fbf8f2;
  --warm-white: #fffdf9;
  --vermilion: #c96554;
  --red-dark: #8d3f36;
  --gold: #b69a67;
  --mint: #9bb9ad;
  --muted: #776f68;
  --line: rgba(23, 21, 20, .16);
  --line-light: rgba(255,255,255,.18);
  --serif: "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", "BIZ UDPMincho", serif;
  --sans: "Yu Gothic", "YuGothic", "Hiragino Sans", "Meiryo", system-ui, sans-serif;
  font-family: var(--sans);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--ivory); color: var(--ink); letter-spacing: 0; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
[hidden] { display: none !important; }

.site-header {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 10;
  height: 86px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 4vw;
  border-bottom: 1px solid rgba(23,21,20,.11);
}
.brand { display: inline-flex; align-items: center; gap: 11px; width: max-content; text-decoration: none; }
.brand-moon { position: relative; width: 29px; height: 29px; border: 1px solid var(--ink); border-radius: 50%; }
.brand-moon::after { content: ""; position: absolute; width: 24px; height: 24px; top: -3px; left: 8px; border-radius: 50%; background: var(--ivory); }
.brand-name { font-family: Georgia, "Times New Roman", serif; font-size: 22px; letter-spacing: .13em; }
.brand-note { margin-left: 4px; color: var(--muted); font-family: Georgia, "Times New Roman", serif; font-size: 9px; letter-spacing: .11em; text-transform: uppercase; }
.header-nav { display: flex; gap: 28px; }
.header-nav a { position: relative; color: #4f4a46; font-size: 11px; text-decoration: none; }
.header-nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -7px; height: 1px; background: var(--vermilion); transition: right .2s ease; }
.header-nav a:hover::after, .header-nav a:focus-visible::after { right: 0; }
.header-date { justify-self: end; font-family: Georgia, "Times New Roman", serif; font-size: 10px; letter-spacing: .1em; }

.hero { min-height: calc(100svh - 24px); display: grid; grid-template-columns: minmax(570px, 49%) 1fr; background: var(--ivory); }
.hero-copy { position: relative; z-index: 2; display: flex; flex-direction: column; justify-content: center; padding: 132px 5vw 62px 6vw; }
.kicker { display: flex; align-items: center; gap: 14px; margin: 0 0 24px; color: var(--red-dark); font-family: Georgia, "Times New Roman", serif; font-size: 10px; letter-spacing: .13em; text-transform: uppercase; }
.kicker span:first-child { display: flex; align-items: center; gap: 14px; }
.kicker span:first-child::before { content: ""; width: 36px; height: 1px; background: var(--vermilion); }
.kicker span:last-child { color: var(--muted); }
.hero h1 { margin: 0; max-width: 760px; font-family: var(--serif); font-size: 72px; font-weight: 500; line-height: 1.28; }
.hero h1 em { color: var(--vermilion); font-style: normal; }
.hero-lead { max-width: 600px; margin: 21px 0 0; color: #5e5752; font-size: 13px; line-height: 2; }

.reading-form { margin-top: 31px; padding-top: 22px; border-top: 1px solid var(--line); }
.form-heading { display: flex; gap: 14px; align-items: flex-start; }
.step { color: var(--vermilion); font-family: Georgia, "Times New Roman", serif; font-size: 10px; letter-spacing: .12em; }
.form-heading h2 { margin: -2px 0 0; font-family: var(--serif); font-size: 18px; font-weight: 600; }
.form-heading p { margin: 6px 0 0; color: var(--muted); font-size: 10px; }
.identity-fields { display: grid; grid-template-columns: 1.15fr .75fr 1fr; gap: 16px; margin-top: 19px; }
.field { min-width: 0; display: grid; gap: 7px; }
.field > span { color: #49433f; font-size: 10px; font-weight: 700; }
.field small { color: #9e958d; font-size: 8px; font-weight: 500; }
.field input, .field select {
  width: 100%; height: 44px; border: 0; border-bottom: 1px solid rgba(23,21,20,.26); border-radius: 0;
  background: rgba(255,255,255,.18); color: var(--ink); padding: 0 4px; outline: none;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.field input:focus, .field select:focus { border-color: var(--vermilion); background: rgba(255,255,255,.5); box-shadow: 0 1px 0 var(--vermilion); }
.field input::placeholder { color: #aaa198; }
.form-help { margin: 10px 0 0; color: #8a817a; font-size: 9px; line-height: 1.7; }
.primary-button {
  width: min(100%, 310px); min-height: 54px; margin-top: 15px; display: inline-flex; align-items: center; justify-content: space-between;
  border: 0; border-radius: 0; background: var(--ink); color: #fff; padding: 0 14px 0 22px; font-size: 12px; font-weight: 700;
  cursor: pointer; box-shadow: 0 14px 34px rgba(23,21,20,.17); transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}
.button-orbit { width: 29px; height: 29px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.34); border-radius: 50%; transition: transform .18s ease; }
.primary-button:hover { transform: translateY(-2px); background: var(--red-dark); box-shadow: 0 17px 38px rgba(23,21,20,.23); }
.primary-button:hover .button-orbit { transform: rotate(12deg); }
.primary-button:focus-visible { outline: 3px solid rgba(201,101,84,.38); outline-offset: 3px; }
.form-error { min-height: 18px; margin-top: 8px; color: var(--red-dark); font-size: 10px; }

.hero-visual { position: relative; min-width: 0; overflow: hidden; background: var(--ink); }
.hero-visual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(23,21,20,.12), transparent 35%, rgba(23,21,20,.18)); pointer-events: none; }
.hero-visual img { width: 100%; height: 100%; min-height: 720px; display: block; object-fit: cover; object-position: 54% center; animation: visual-reveal 1.25s cubic-bezier(.2,.78,.2,1) both; }
.visual-caption { position: absolute; z-index: 2; left: 32px; bottom: 31px; display: grid; gap: 4px; color: #fff; }
.visual-caption span, .visual-index { font-family: Georgia, "Times New Roman", serif; font-size: 8px; letter-spacing: .16em; text-transform: uppercase; }
.visual-caption strong { font-family: var(--serif); font-size: 12px; font-weight: 500; }
.visual-index { position: absolute; z-index: 2; right: 29px; top: 112px; color: rgba(255,255,255,.76); writing-mode: vertical-rl; }

.result-section { padding: 96px 7vw 0; background: var(--paper); animation: rise-in .65s ease both; }
.section-kicker { margin: 0 0 18px; color: var(--vermilion); font-family: Georgia, "Times New Roman", serif; font-size: 9px; letter-spacing: .17em; text-transform: uppercase; }
.result-title-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 28px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.result-date { margin: 0 0 7px; color: var(--muted); font-family: Georgia, "Times New Roman", serif; font-size: 10px; letter-spacing: .1em; }
.result-title-row h2 { margin: 0; font-family: var(--serif); font-size: 36px; font-weight: 500; }
.zodiac-stamp { display: flex; align-items: center; gap: 10px; }
.zodiac-stamp > span { font-size: 34px; color: var(--gold); }
.zodiac-stamp small { font-family: Georgia, "Times New Roman", serif; font-size: 9px; letter-spacing: .12em; text-transform: uppercase; }
.reading-layout { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(330px, .88fr); gap: 0; border-bottom: 1px solid var(--line); }
.main-reading { min-height: 430px; display: grid; grid-template-columns: 170px 1fr; gap: 40px; align-items: center; padding: 58px 5vw 58px 0; border-right: 1px solid var(--line); }
.score-orbit { width: 156px; height: 156px; display: grid; place-items: center; border: 1px solid var(--gold); border-radius: 50%; position: relative; }
.score-orbit::before, .score-orbit::after { content: ""; position: absolute; border-radius: 50%; border: 1px solid rgba(182,154,103,.28); }
.score-orbit::before { width: 132px; height: 132px; }
.score-orbit::after { width: 5px; height: 5px; top: -3px; background: var(--vermilion); border: 0; box-shadow: 0 0 0 5px rgba(201,101,84,.13); }
.score-orbit div { display: flex; align-items: baseline; }
.score-orbit strong { font-family: Georgia, "Times New Roman", serif; font-size: 48px; font-weight: 400; }
.score-orbit span { margin-left: 4px; color: var(--muted); font-size: 9px; }
.message-number { color: var(--gold); font-family: Georgia, "Times New Roman", serif; font-size: 8px; letter-spacing: .15em; }
.message-block h3 { margin: 11px 0 15px; font-family: var(--serif); font-size: 29px; font-weight: 500; line-height: 1.55; }
.message-block > p { margin: 0; color: #58514c; font-family: var(--serif); font-size: 14px; line-height: 2.1; }
.lucky-action { margin-top: 25px; padding: 15px 0 0 16px; border-left: 2px solid var(--vermilion); display: grid; gap: 5px; }
.lucky-action span { color: var(--muted); font-size: 9px; }
.lucky-action strong { font-family: var(--serif); font-size: 13px; font-weight: 600; }
.fortune-details { padding: 58px 0 58px 5vw; display: flex; flex-direction: column; justify-content: center; }
.meter-grid { display: grid; gap: 24px; }
.meter > div { display: flex; justify-content: space-between; gap: 18px; margin-bottom: 8px; }
.meter span, .meter strong { font-size: 10px; }
.meter strong { font-family: Georgia, "Times New Roman", serif; font-weight: 400; }
.meter-track { display: block; height: 2px; background: rgba(23,21,20,.1); overflow: hidden; }
.meter-track i { display: block; width: 0; height: 100%; background: var(--vermilion); transition: width .8s .2s cubic-bezier(.2,.75,.2,1); }
.lucky-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 45px; background: var(--line); border: 1px solid var(--line); }
.lucky-item { min-height: 102px; display: flex; flex-direction: column; justify-content: space-between; background: var(--warm-white); padding: 13px; }
.lucky-item > span { color: var(--muted); font-family: Georgia, "Times New Roman", serif; font-size: 7px; letter-spacing: .1em; }
.lucky-item strong { font-family: var(--serif); font-size: 11px; line-height: 1.5; }
.lucky-item i { width: 18px; height: 18px; display: block; border-radius: 50%; border: 3px solid rgba(255,255,255,.8); box-shadow: 0 0 0 1px rgba(23,21,20,.12); }
.share-band { min-height: 114px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 26px; position: relative; }
.share-band > div:first-child { display: flex; gap: 14px; align-items: flex-start; }
.share-band p { margin: -3px 0 0; display: grid; gap: 5px; }
.share-band p strong { font-family: var(--serif); font-size: 15px; }
.share-band p small { color: var(--muted); font-size: 9px; }
.share-actions { display: flex; gap: 8px; }
.share-actions button { min-height: 39px; border: 1px solid var(--line); border-radius: 0; background: transparent; color: var(--ink); padding: 0 12px; font-size: 10px; cursor: pointer; transition: color .18s ease, background .18s ease, border-color .18s ease; }
.share-actions button span { margin-right: 6px; font-size: 12px; }
.share-actions button:hover, .share-actions button:focus-visible { background: var(--ink); color: #fff; border-color: var(--ink); outline: none; }
.share-status { position: absolute; right: 0; bottom: 8px; color: var(--red-dark); font-size: 9px; }

.personal-reading { display: grid; grid-template-columns: minmax(320px, .72fr) minmax(540px, 1.28fr); background: var(--ink); color: #f5f0e8; }
.chat-intro { position: relative; min-height: 710px; display: flex; flex-direction: column; justify-content: center; padding: 80px 6vw; overflow: hidden; border-right: 1px solid var(--line-light); }
.chat-intro::before { content: ""; position: absolute; width: 420px; height: 420px; left: -215px; top: 95px; border: 1px solid rgba(182,154,103,.22); border-radius: 50%; box-shadow: 0 0 0 72px rgba(182,154,103,.035), 0 0 0 144px rgba(182,154,103,.025); }
.chat-intro .section-kicker { position: relative; color: #dcb6a9; }
.chat-intro h2 { position: relative; margin: 0; font-family: var(--serif); font-size: 46px; font-weight: 500; line-height: 1.5; }
.chat-intro > p:not(.section-kicker) { position: relative; max-width: 420px; margin: 26px 0 0; color: rgba(245,240,232,.67); font-size: 12px; line-height: 2.1; }
.chat-points { position: relative; display: flex; flex-wrap: wrap; gap: 18px; margin-top: 34px; color: rgba(245,240,232,.78); font-size: 9px; }
.chat-points span { display: flex; align-items: center; gap: 7px; }
.chat-points span::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--gold); }
.chat-studio { min-width: 0; padding: 74px 7vw; background: #201e1c; }
.chat-locked { min-height: 560px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; border: 1px solid var(--line-light); }
.lock-moon { position: relative; width: 72px; height: 72px; border: 1px solid rgba(245,240,232,.5); border-radius: 50%; }
.lock-moon::after { content: ""; position: absolute; width: 63px; height: 63px; top: -6px; left: 21px; border-radius: 50%; background: #201e1c; }
.chat-locked h3 { margin: 28px 0 8px; font-family: var(--serif); font-size: 20px; font-weight: 500; }
.chat-locked p { margin: 0; color: rgba(245,240,232,.56); font-size: 10px; }
.chat-locked a { margin-top: 24px; padding-bottom: 4px; border-bottom: 1px solid var(--gold); color: #dbc59d; font-size: 10px; text-decoration: none; }
.conversation-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--line-light); }
.conversation-head span { color: var(--gold); font-family: Georgia, "Times New Roman", serif; font-size: 8px; letter-spacing: .15em; }
.conversation-head h3 { margin: 7px 0 0; font-family: var(--serif); font-size: 24px; font-weight: 500; }
.conversation-head button { min-height: 32px; border: 0; border-bottom: 1px solid rgba(245,240,232,.32); background: transparent; color: rgba(245,240,232,.68); padding: 0 2px; font-size: 9px; cursor: pointer; }
.conversation-head button:hover { color: #fff; border-color: #fff; }
.thread { display: grid; gap: 16px; max-height: 480px; overflow: auto; padding: 26px 8px 25px 0; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.2) transparent; }
.empty-thread { margin: 0; color: rgba(245,240,232,.46); font-size: 11px; line-height: 1.8; }
.bubble { width: min(88%, 610px); padding: 17px 19px; border-left: 2px solid var(--mint); background: rgba(155,185,173,.08); color: rgba(255,255,255,.8); font-family: var(--serif); font-size: 13px; line-height: 2; white-space: pre-wrap; }
.bubble-user { justify-self: end; border-left: 0; border-right: 2px solid var(--vermilion); background: rgba(201,101,84,.09); }
.bubble-error { border-color: var(--vermilion); color: #f5b7ad; }
.speaker { display: block; margin-bottom: 7px; color: var(--mint); font-family: Georgia, "Times New Roman", serif; font-size: 8px; letter-spacing: .12em; }
.bubble-user .speaker { color: #e8a395; text-align: right; }
.bubble-pending .message-text::after { content: "···"; margin-left: 7px; color: var(--mint); animation: pulse 1s ease-in-out infinite; }
.chat-form { display: grid; gap: 17px; padding-top: 21px; border-top: 1px solid var(--line-light); }
.chat-options { display: grid; grid-template-columns: 180px 1fr; gap: 18px; }
.chat-options > label { display: grid; gap: 7px; color: rgba(245,240,232,.62); font-size: 9px; }
.chat-options select { width: 100%; height: 38px; border: 1px solid var(--line-light); border-radius: 0; background: #201e1c; color: #fff; padding: 0 10px; }
.chat-options fieldset { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; padding: 0; border: 1px solid var(--line-light); }
.chat-options legend { padding: 0 6px; color: rgba(245,240,232,.62); font-size: 9px; }
.chat-options fieldset label { position: relative; }
.chat-options input { position: absolute; opacity: 0; }
.chat-options fieldset span { min-height: 36px; display: grid; place-items: center; color: rgba(245,240,232,.48); font-size: 9px; cursor: pointer; }
.chat-options input:checked + span { background: rgba(255,255,255,.09); color: #fff; }
.chat-options input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: -2px; }
.chat-message { position: relative; display: grid; gap: 8px; }
.chat-message > span { color: rgba(245,240,232,.62); font-size: 9px; }
.chat-message textarea { width: 100%; min-height: 125px; max-height: 300px; resize: vertical; border: 1px solid var(--line-light); border-radius: 0; background: rgba(255,255,255,.035); color: #fff; padding: 14px 15px 29px; outline: none; line-height: 1.8; }
.chat-message textarea:focus { border-color: rgba(182,154,103,.7); background: rgba(255,255,255,.055); }
.chat-message textarea::placeholder { color: rgba(255,255,255,.3); }
.chat-message small { position: absolute; right: 10px; bottom: 9px; color: rgba(255,255,255,.3); font-family: Georgia, "Times New Roman", serif; font-size: 8px; }
.chat-send { min-height: 49px; display: flex; justify-content: space-between; align-items: center; border: 0; border-radius: 0; background: var(--ivory); color: var(--ink); padding: 0 16px 0 19px; font-size: 10px; font-weight: 700; cursor: pointer; transition: background .18s ease, color .18s ease; }
.chat-send span:last-child { width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid rgba(23,21,20,.25); border-radius: 50%; }
.chat-send:hover { background: var(--vermilion); color: #fff; }
.chat-send:disabled { cursor: wait; opacity: .6; }
.chat-status { min-height: 18px; color: #ccb991; font-size: 9px; }

.site-footer { min-height: 225px; display: grid; grid-template-columns: 1.2fr 1.5fr auto; gap: 50px; align-items: end; padding: 58px 6vw 34px; background: var(--paper); color: var(--muted); border-top: 1px solid var(--line); }
.site-footer > div p, .site-footer > p { margin: 12px 0 0; max-width: 550px; font-size: 9px; line-height: 1.9; }
.footer-brand { color: var(--ink); font-family: Georgia, "Times New Roman", serif; font-size: 20px; letter-spacing: .14em; text-decoration: none; }
.site-footer > span { font-family: Georgia, "Times New Roman", serif; font-size: 8px; white-space: nowrap; }

@keyframes visual-reveal { from { opacity: 0; transform: scale(1.05); } to { opacity: 1; transform: scale(1); } }
@keyframes rise-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0%,100% { opacity: .3; } 50% { opacity: 1; } }

@media (max-width: 1120px) {
  .hero { grid-template-columns: minmax(520px, 54%) 1fr; }
  .hero h1 { font-size: 61px; }
  .brand-note { display: none; }
  .reading-layout { grid-template-columns: 1fr; }
  .main-reading { border-right: 0; border-bottom: 1px solid var(--line); padding-right: 0; }
  .fortune-details { padding-left: 0; }
  .personal-reading { grid-template-columns: .76fr 1.24fr; }
}

@media (max-width: 860px) {
  .site-header { position: absolute; grid-template-columns: 1fr auto; padding: 0 22px; color: #fff; border-color: rgba(255,255,255,.2); }
  .brand-moon { border-color: #fff; }
  .brand-moon::after { background: #11100f; }
  .brand-note, .header-nav { display: none; }
  .header-date { color: rgba(255,255,255,.78); }
  .hero { display: flex; flex-direction: column; min-height: 0; }
  .hero-visual { order: 1; height: 410px; }
  .hero-visual img { min-height: 0; height: 100%; object-position: 58% center; }
  .visual-index { top: 112px; }
  .hero-copy { order: 2; padding: 48px 34px 54px; }
  .hero h1 { font-size: 52px; }
  .result-section { padding: 72px 34px 0; }
  .personal-reading { grid-template-columns: 1fr; }
  .chat-intro { min-height: 430px; padding: 68px 34px; border-right: 0; border-bottom: 1px solid var(--line-light); }
  .chat-studio { padding: 54px 34px; }
  .chat-locked { min-height: 410px; }
  .site-footer { grid-template-columns: 1fr; gap: 25px; align-items: start; padding: 48px 34px 32px; }
}

@media (max-width: 580px) {
  .site-header { height: 68px; }
  .brand-name { font-size: 19px; }
  .brand-moon { width: 25px; height: 25px; }
  .brand-moon::after { width: 21px; height: 21px; }
  .header-date { font-size: 8px; }
  .hero-visual { height: 305px; }
  .visual-caption { left: 19px; bottom: 18px; }
  .visual-index { right: 17px; top: 88px; }
  .hero-copy { padding: 35px 20px 46px; }
  .kicker { margin-bottom: 16px; }
  .hero h1 { font-size: 39px; line-height: 1.35; }
  .hero-lead { font-size: 12px; line-height: 1.9; }
  .reading-form { margin-top: 25px; }
  .identity-fields { grid-template-columns: 1fr 1fr; }
  .field-date { grid-column: 1 / -1; }
  .primary-button { width: 100%; }
  .result-section { padding: 58px 20px 0; }
  .result-title-row { align-items: center; }
  .result-title-row h2 { font-size: 27px; }
  .zodiac-stamp > span { font-size: 28px; }
  .main-reading { min-height: 0; grid-template-columns: 1fr; gap: 28px; padding: 40px 0; }
  .score-orbit { width: 126px; height: 126px; }
  .score-orbit::before { width: 106px; height: 106px; }
  .score-orbit strong { font-size: 40px; }
  .message-block h3 { font-size: 24px; }
  .fortune-details { padding: 40px 0; }
  .lucky-grid { margin-top: 34px; }
  .lucky-item { min-height: 92px; padding: 10px; }
  .share-band { grid-template-columns: 1fr; gap: 18px; padding: 27px 0 36px; }
  .share-actions { display: grid; grid-template-columns: repeat(3, 1fr); }
  .share-actions button { padding: 0 6px; }
  .share-status { left: 0; right: auto; bottom: 12px; }
  .chat-intro { min-height: 390px; padding: 56px 20px; }
  .chat-intro h2 { font-size: 37px; }
  .chat-studio { padding: 42px 20px; }
  .chat-locked { min-height: 350px; padding: 25px; }
  .chat-options { grid-template-columns: 1fr; }
  .chat-options fieldset span { min-height: 42px; padding: 4px; text-align: center; }
  .thread { max-height: none; overflow: visible; }
  .bubble { width: 94%; padding: 14px 15px; font-size: 12px; }
  .site-footer { padding-left: 20px; padding-right: 20px; }
}

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