/* =========================================================
  Love Tarot UI (Light Mystic)
  - matches soft peach / gold tarot back design
  - modern, airy, "fortune" vibe
  - fixes Chrome dropdown option visibility
========================================================= */

/* ---------- Tokens ---------- */
:root{
  /* base */
  --bg-0: #fff7f1;          /* warm white */
  --bg-1: #fdebe1;          /* peach haze */
  --ink: #2b2326;           /* deep brown */
  --ink2: rgba(43,35,38,.78);
  --muted: rgba(43,35,38,.60);

  /* card / stroke */
  --card: rgba(255,255,255,.72);
  --card2: rgba(255,255,255,.82);
  --stroke: rgba(230, 188, 144, .35);

  /* accents */
  --gold: #d7a85b;
  --gold2:#f0c57b;
  --rose: #f0a7b6;
  --peach:#f6c7b4;

  /* shadows */
  --shadow: 0 18px 55px rgba(88, 40, 55, .12);
  --shadow2: 0 10px 26px rgba(88, 40, 55, .10);

  /* radius */
  --r-lg: 26px;
  --r-md: 18px;
  --r-sm: 14px;

  /* layout */
  --wrap: 980px;
  --cardw: 560px;
}

/* ---------- Reset ---------- */
*{ box-sizing: border-box; }
html, body{ height: 100%; }
body{
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(900px 480px at 18% 6%, rgba(240, 197, 123, .28), transparent 60%),
    radial-gradient(760px 520px at 85% 18%, rgba(240, 167, 182, .20), transparent 60%),
    radial-gradient(820px 560px at 58% 108%, rgba(246, 199, 180, .22), transparent 65%),
    linear-gradient(160deg, var(--bg-0), var(--bg-1));
  overflow-x: hidden;
}

/* soft sparkles */
body::before{
  content:"";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .35;
  background-image:
    radial-gradient(1px 1px at 14% 22%, rgba(215,168,91,.65), transparent 60%),
    radial-gradient(1px 1px at 28% 68%, rgba(240,167,182,.55), transparent 60%),
    radial-gradient(1px 1px at 42% 36%, rgba(215,168,91,.55), transparent 60%),
    radial-gradient(1px 1px at 56% 74%, rgba(240,167,182,.50), transparent 60%),
    radial-gradient(1px 1px at 72% 26%, rgba(215,168,91,.60), transparent 60%),
    radial-gradient(1px 1px at 86% 58%, rgba(240,167,182,.55), transparent 60%);
  filter: blur(.2px);
}

a{ color: inherit; text-decoration: none; }
.is-hidden{ display:none !important; }
.page{ padding: 24px 16px 72px; }

/* =========================================================
  Header (flashy but light)
========================================================= */
.site-header{
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 250, 246, .78);
  border-bottom: 1px solid rgba(215,168,91,.22);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 26px rgba(88, 40, 55, .08);
}
.site-header__inner{
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 12px 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
}

/* glowing top line */
.site-header::after{
  content:"";
  position:absolute;
  left:0; right:0; top:0;
  height: 64px;
  pointer-events:none;
  background:
    radial-gradient(520px 90px at 20% 0%, rgba(240,197,123,.35), transparent 60%),
    radial-gradient(520px 90px at 80% 0%, rgba(240,167,182,.28), transparent 60%);
  opacity: .95;
}

/* logo as gradient badge */
.logo{
  position: relative;
  font-weight: 900;
  letter-spacing: .02em;
  font-size: 15px;
  line-height: 1;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(215,168,91,.28);
  background: linear-gradient(180deg, rgba(255,255,255,.88), rgba(255,255,255,.66));
  box-shadow: 0 14px 40px rgba(88, 40, 55, .10);
}
.logo:hover{
  filter: brightness(1.02);
}

/* gradient text inside logo (supported browsers) */
.logo{
  background-image: linear-gradient(90deg, rgba(255,255,255,.9), rgba(255,255,255,.65));
}
.logo{
  color: transparent;
  background-clip: padding-box;
}
.logo{
  -webkit-text-fill-color: transparent;
  background-image: linear-gradient(90deg, #c78f3b, #f0a7b6, #d7a85b);
  -webkit-background-clip: text;
  background-clip: text;
}

/* nav pills */
.nav a{
  font-size: 14px;
  color: rgba(43,35,38,.78);
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(215,168,91,.18);
  background: rgba(255,255,255,.55);
  box-shadow: 0 10px 22px rgba(88, 40, 55, .06);
}
.nav a:hover{
  border-color: rgba(215,168,91,.30);
  background: rgba(255,255,255,.75);
  box-shadow: 0 0 0 3px rgba(240,197,123,.18), 0 14px 30px rgba(88, 40, 55, .08);
}

/* last nav item = CTA style (if you have one link like "占う") */
.nav a:last-child{
  border: 1px solid rgba(215,168,91,.40);
  background: linear-gradient(90deg, rgba(240,197,123,.92), rgba(240,167,182,.88));
  color: #2b2326;
  font-weight: 900;
}
.nav a:last-child:hover{
  filter: brightness(1.03);
  box-shadow: 0 18px 38px rgba(240,167,182,.14), 0 18px 38px rgba(240,197,123,.14);
}

/* ---------- Footer ---------- */
.site-footer{
  text-align:center;
  padding: 40px 10px;
  color: var(--muted);
}

/* =========================================================
  Main Card
========================================================= */
.hero{
  display:flex;
  justify-content:center;
  padding-top: 24px;
}
.hero__card{
  width: 100%;
  max-width: var(--cardw);
  padding: 26px;
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, var(--card2), var(--card));
  border: 1px solid rgba(215,168,91,.22);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

/* soft decorative glow */
.hero__card::before{
  content:"";
  position:absolute;
  inset:-2px;
  pointer-events:none;
  background:
    radial-gradient(700px 180px at 30% 0%, rgba(240,197,123,.22), transparent 65%),
    radial-gradient(700px 180px at 80% 0%, rgba(240,167,182,.18), transparent 65%);
}
.hero__card > *{ position: relative; }

.hero__card h1{
  margin: 0 0 10px;
  font-size: 24px;
  letter-spacing: .02em;
}
.hero__card p{
  color: var(--ink2);
  line-height: 1.9;
  margin: 0 0 10px;
}
.hero__card .helper {
  margin-top: 24px;
}

/* ---------- Alert ---------- */
.alert{
  background: rgba(240, 167, 182, .14);
  border: 1px solid rgba(240, 167, 182, .38);
  color: rgba(43,35,38,.88);
  padding: 12px 14px;
  border-radius: 14px;
  margin: 14px 0;
  font-size: 14px;
  line-height: 1.7;
}

/* =========================================================
  Form
========================================================= */
.fortune-form{
  display:grid;
  gap: 16px;
  margin-top: 18px;
}
.field span{
  display:block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
  letter-spacing: .02em;
}

/* Inputs */
input, textarea, select{
  width: 100%;
  border-radius: 18px;
  border: 1px solid rgba(215,168,91,.24);
  background: rgba(255,255,255,.78);
  color: var(--ink);
  padding: 16px 16px;
  font-size: 17px;
  line-height: 1.6;
  outline: none;
  box-shadow: 0 1px 0 rgba(255,255,255,.85) inset, 0 14px 26px rgba(88, 40, 55, .07);
  min-height: 60px;
  -webkit-text-size-adjust: 100%;
}
input::placeholder, textarea::placeholder{
  color: rgba(43,35,38,.45);
}
textarea{
  min-height: 180px;
  resize: vertical;
  line-height: 1.75;
}

/* Focus glow */
input:focus, textarea:focus, select:focus{
  border-color: rgba(215,168,91,.55);
  box-shadow:
    0 0 0 4px rgba(240,197,123,.22),
    0 18px 34px rgba(240,167,182,.10);
}

/* Select arrow (iOS friendly) */
select{
  -webkit-appearance: none;
  appearance: none;
  padding-right: 52px;
  background-image: url("data:image/svg+xml;utf8,<svg fill='%23c78f3b' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 22px;
}

/* ✅ Chromeでドロップダウンを開いた時の「文字が白で見えない」対策 */
select option{
  color: #111 !important;
  background: #fff !important;
}
select optgroup{
  color: #111 !important;
  background: #fff !important;
}

/* If you use birth-grid somewhere */
.birth-grid{
  display:grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

/* =========================================================
  Buttons
========================================================= */
.primary-btn{
  width: 100%;
  min-height: 56px;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: .02em;
  color: #2b2326;
  background: linear-gradient(90deg, rgba(240,197,123,1), rgba(240,167,182,1));
  box-shadow:
    0 18px 36px rgba(240,197,123,.22),
    0 18px 36px rgba(240,167,182,.18);
  transition: transform .15s ease, filter .15s ease, box-shadow .15s ease;
  padding: 14px 18px;
}
.primary-btn:hover{
  transform: translateY(-1px);
  filter: brightness(1.02);
}
.primary-btn:active{
  transform: translateY(0);
  filter: brightness(0.99);
}
.primary-btn.is-loading,
.primary-btn[disabled]{
  opacity: .75;
  cursor: not-allowed;
  transform: none;
}
/* Result buttons spacing */
.cta-card .primary-btn{ margin-top: 10px; }
.fortune-card__footer{ margin-top: 18px; }
.fortune-card__footer .ghost-btn{ margin-top: 10px; }

/* ===== Buttons: make <a> and <button> consistent ===== */
.primary-btn, .ghost-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
/* Secondary / ghost button */
.ghost-btn{
  width: 100%;
  min-height: 54px;
  padding: 14px 18px;
  border-radius: 999px;
  border: 1px solid rgba(215,168,91,.28);
  background: rgba(255,255,255,.60);
  color: rgba(43,35,38,.85);
  font-size: 16px;
  font-weight: 800;
  box-shadow: 0 10px 22px rgba(88, 40, 55, .06);
  cursor: pointer;
  transition: transform .15s ease, filter .15s ease, box-shadow .15s ease, background .15s ease;
}
.ghost-btn:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.78);
  box-shadow: 0 0 0 3px rgba(240,197,123,.16), 0 14px 30px rgba(88, 40, 55, .08);
}
.ghost-btn:active{
  transform: translateY(0);
}
@media (max-width: 480px){
  .primary-btn, .ghost-btn{
    min-height: 62px;
    font-size: 17px;
  }
}

/* =========================================================
  Result / Pick UI (if used)
========================================================= */
.fortune-wrap{
  min-height: 100vh;
  display:flex;
  justify-content:center;
  align-items:center;
  padding: 22px 16px;
}
.fortune-card{
  width:100%;
  max-width: var(--cardw);
  padding: 28px;
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, var(--card2), var(--card));
  border: 1px solid rgba(215,168,91,.22);
  box-shadow: var(--shadow);
}
.fortune-card__header{ text-align:center; margin-bottom: 16px; }
.fortune-card__subtitle{
  display:inline-block;
  font-size: 12px;
  letter-spacing: .18em;
  color: rgba(43,35,38,.62);
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(215,168,91,.24);
  background: rgba(255,255,255,.66);
}
.fortune-card__title{ margin: 12px 0 0; font-size: 22px; }
.fortune-card__body{
  font-size: 15px;
  line-height: 1.95;
  color: var(--ink2);
}
.text-pre{ white-space: pre-wrap; line-height: 1.85; }

.card-grid{
  display:flex;
  gap: 14px;
  justify-content:center;
  margin-top: 18px;
  flex-wrap: wrap;
}
.card-btn{ padding:0; border:0; background:transparent; cursor:pointer; }
.tarot-img{
  width: 150px;
  height: 240px;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid rgba(215,168,91,.28);
  box-shadow: var(--shadow2);
  display:block;
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
  filter: saturate(1.03) contrast(1.01);
}
.card-btn:hover .tarot-img{
  transform: translateY(-2px);
  box-shadow: 0 22px 50px rgba(88, 40, 55, .14);
  filter: saturate(1.06) contrast(1.02);
}
/* ===== Result image: fit within card (no overflow) ===== */
.tarot-figure{
  margin: 0;
  width: 100%;
}
.tarot-img--result{
  width: 100% !important;
  height: auto !important;
  max-width: 100%;
  display: block;
  object-fit: contain;
}
.card-name{
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(215,168,91,.22);
  border-radius: 14px;
  background: rgba(255,255,255,.66);
  color: rgba(43,35,38,.78);
}
/* ===== Reverse card (upside-down) ===== */
.tarot-figure img{
  transition: transform .4s ease;
}

.tarot-figure.is-rev img{
  transform: rotate(180deg);
}

/* =========================================================
  Ad modal / overlays (keep usable on light theme)
========================================================= */
.ad-modal{
  position: fixed;
  inset: 0;
  background: rgba(30, 10, 20, .35);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}
.ad-modal__inner{
  width: 92%;
  max-width: 420px;
  background: linear-gradient(180deg, rgba(255,255,255,.88), rgba(255,255,255,.78));
  border: 1px solid rgba(215,168,91,.24);
  border-radius: 20px;
  padding: 18px;
  position: relative;
  box-shadow: 0 26px 70px rgba(88, 40, 55, .18);
}
.ad-close{
  position:absolute;
  top: -12px;
  right: -12px;
  width: 38px;
  height: 38px;
  border:none;
  border-radius: 999px;
  background: #fff;
  color: #2b2326;
  cursor:pointer;
  font-size: 18px;
  display:flex;
  align-items:center;
  justify-content:center;
  line-height:1;
  border: 1px solid rgba(215,168,91,.26);
  box-shadow: 0 12px 26px rgba(88, 40, 55, .14);
}
.ad-box{
  border: 1px dashed rgba(215,168,91,.35);
  border-radius: 14px;
  padding: 18px;
  text-align: center;
  color: rgba(43,35,38,.62);
}

.loading-overlay, .submit-overlay{
  position: fixed;
  inset: 0;
  background: rgba(30, 10, 20, .20);
  display: none;
  z-index: 10000;
  align-items: center;
  justify-content: center;
}
.loading-overlay.is-active{ display:flex; }
.submit-overlay.is-active{ display:block; }

.loading-box{
  width: min(420px, 92%);
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(215,168,91,.24);
  border-radius: 20px;
  box-shadow: 0 26px 70px rgba(88, 40, 55, .18);
  padding: 18px 16px;
  text-align: center;
  color: rgba(43,35,38,.80);
}
.spinner{
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 3px solid rgba(215,168,91,.22);
  border-top-color: rgba(215,168,91,.95);
  margin: 12px auto 10px;
  animation: spin .9s linear infinite;
}
@keyframes spin{ to{ transform: rotate(360deg); } }

/* ---------- Responsive ---------- */
@media (max-width: 480px){
  .hero__card{ padding: 20px; }
  .fortune-card{ padding: 22px; }

  /* iPhoneでselectが小さく見えないように */
  input, textarea, select{
    font-size: 18px;
    min-height: 66px;
    border-radius: 20px;
  }
  .tarot-img{
    width: 138px;
    height: 224px;
  }

  .field textarea {
    min-height: 166px;
  }
}

/* honeypot */
.hp{ position:absolute; left:-9999px; width:1px; height:1px; opacity:0; }

.consult-summary {
  margin: 16px 0 24px;
  padding: 14px;
  background: #f7f7f7;
  border-radius: 8px;
  font-size: 14px;
}

.consult-name {
  margin-bottom: 6px;
  color: #333;
}

.consult-question {
  color: #555;
  line-height: 1.6;
}

/* ===== Footer disclaimer ===== */
.site-footer__inner{
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 16px;
}

.footer-disclaimer{
  margin: 0 auto 14px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(215,168,91,.22);
  background: rgba(255,255,255,.55);
  color: rgba(43,35,38,.70);
  font-size: 12px;
  line-height: 1.8;
  box-shadow: 0 10px 22px rgba(88, 40, 55, .05);
}

.footer-copy{
  margin: 0;
  color: var(--muted);
}

@media (max-width: 480px){
  .footer-disclaimer{
    padding: 14px 14px;
    border-radius: 14px;
    font-size: 12px;
  }
}

/* =========================================================
  Hamburger / Drawer Menu
========================================================= */
.menu-btn{
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(215,168,91,.28);
  background: rgba(255,255,255,.60);
  box-shadow: 0 10px 22px rgba(88, 40, 55, .06);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform .15s ease, filter .15s ease, box-shadow .15s ease, background .15s ease;
}
.menu-btn:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.78);
  box-shadow: 0 0 0 3px rgba(240,197,123,.16), 0 14px 30px rgba(88, 40, 55, .08);
}
.menu-btn:active{ transform: translateY(0); }

.menu-btn__lines{
  position: relative;
  width: 18px;
  height: 2px;
  background: rgba(43,35,38,.85);
  border-radius: 2px;
  display: block;
}
.menu-btn__lines::before,
.menu-btn__lines::after{
  content:"";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: rgba(43,35,38,.85);
  border-radius: 2px;
}
.menu-btn__lines::before{ top: -6px; }
.menu-btn__lines::after{ top: 6px; }

/* overlay */
.drawer-overlay{
  position: fixed;
  inset: 0;
  background: rgba(30, 10, 20, .28);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
  z-index: 9998;
}

/* drawer */
.drawer{
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: min(340px, 86vw);
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.82));
  border-left: 1px solid rgba(215,168,91,.24);
  box-shadow: -18px 0 55px rgba(88, 40, 55, .16);
  transform: translateX(104%);
  transition: transform .22s ease;
  z-index: 9999;
  display: flex;
  flex-direction: column;
}

.drawer__header{
  padding: 16px 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  border-bottom: 1px solid rgba(215,168,91,.18);
}
.drawer__title{
  font-weight: 900;
  letter-spacing: .02em;
}
.drawer__close{
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(215,168,91,.24);
  background: rgba(255,255,255,.70);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  display:flex;
  align-items:center;
  justify-content:center;
}

.drawer__body{
  padding: 12px 16px 18px;
  display: grid;
  gap: 10px;
}
.drawer__link{
  padding: 14px 14px;
  border-radius: 16px;
  border: 1px solid rgba(215,168,91,.18);
  background: rgba(255,255,255,.55);
  box-shadow: 0 10px 22px rgba(88, 40, 55, .06);
  font-weight: 800;
  color: rgba(43,35,38,.86);
}
.drawer__link:hover{
  background: rgba(255,255,255,.78);
  border-color: rgba(215,168,91,.30);
}

/* open state */
body.is-drawer-open .drawer{
  transform: translateX(0);
}
body.is-drawer-open .drawer-overlay{
  opacity: 1;
  pointer-events: auto;
}

/* prevent scroll when open */
body.is-drawer-open{
  overflow: hidden;
}

/* SP: tap target slightly larger */
@media (max-width: 480px){
  .menu-btn{ width: 48px; height: 48px; }
}
