/* ============================================================
   ランタンナイト エピソード募集ページ
   アイスフェスHP「ランタンナイト」トンマナ × Liquid Glass
   - 夕暮れ→夜のグラデーション背景
   - 白明朝＋暖色グロー＋ゆるやかアーチのタイトル
   - すりガラス（Liquid Glass）のカード・ピル・吹き出し
   - リアル寄りのスカイランタンSVG
   ============================================================ */

:root {
  /* 夕暮れグラデーション */
  --dusk-1: #f9c46a;
  --dusk-2: #ee8f92;
  --dusk-3: #cf6aa8;
  --dusk-4: #8e51a8;
  --dusk-5: #4a3b8e;
  --night-1: #23307c;
  --night-2: #16245f;

  /* アクセント */
  --magenta: #c2258a;
  --purple: #7b2d9c;
  --yellow: #ffe100;

  /* ガラス面 */
  --glass-bg: linear-gradient(155deg,
    rgba(255, 255, 255, 0.22) 0%,
    rgba(255, 255, 255, 0.08) 45%,
    rgba(255, 255, 255, 0.16) 100%);
  --glass-border: rgba(255, 255, 255, 0.42);
  --glass-shadow:
    0 10px 34px rgba(25, 12, 70, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    inset 0 -1px 0 rgba(255, 255, 255, 0.12);

  /* 入力欄内テキスト */
  --ink: #2b2b52;

  --font-head: "Shippori Mincho", serif;
  --font-body: "Zen Kaku Gothic New", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: #fff;
  background: linear-gradient(180deg,
    var(--dusk-1) 0%,
    var(--dusk-2) 11%,
    var(--dusk-3) 24%,
    var(--dusk-4) 40%,
    var(--dusk-5) 58%,
    var(--night-1) 76%,
    var(--night-2) 100%);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.8;
}

/* ---------- 背景 ---------- */
.sky {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

/* ぼんやり光る玉ボケ */
.dot {
  position: absolute;
  border-radius: 50%;
  background: #fff;
  filter: blur(var(--dot-blur, 1px));
  opacity: 0.6;
  animation: twinkle var(--tw-dur, 3.4s) ease-in-out var(--tw-delay, 0s) infinite;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.12; }
  50%      { opacity: 0.75; }
}

/* ---------- ランタン（リアル寄りスカイランタンSVG・JS生成） ---------- */
.lantern {
  position: absolute;
  bottom: -18vh;
  width: var(--ln-size, 48px);
  opacity: var(--ln-opacity, 1);
  animation:
    rise var(--ln-rise, 34s) linear var(--ln-delay, 0s) infinite,
    sway var(--ln-sway, 5.5s) ease-in-out var(--ln-delay, 0s) infinite alternate;
}

.lantern svg { display: block; width: 100%; height: auto; }

.lantern.far { filter: blur(1.6px); }

@keyframes rise {
  0%   { transform: translateY(0) rotate(var(--ln-tilt, 0deg)); }
  100% { transform: translateY(-145vh) rotate(var(--ln-tilt, 0deg)); }
}

@keyframes sway {
  from { margin-left: calc(var(--ln-drift, 14px) * -1); }
  to   { margin-left: var(--ln-drift, 14px); }
}

/* ---------- レイアウト ---------- */
.page {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin: 0 auto;
  padding: 18px 18px 56px;
}

/* ---------- ヒーロー（コンパクト） ---------- */
.hero { text-align: center; margin-bottom: 16px; }

.logo {
  display: block;
  width: clamp(150px, 42vw, 190px);
  height: auto;
  margin: 0 auto 8px;
  filter: drop-shadow(0 2px 8px rgba(120, 40, 90, 0.35));
}

/* エピソード募集チップ（マゼンタ→紫グラデ） */
.entry-chip {
  display: inline-block;
  padding: 3px 20px;
  margin-bottom: 10px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: #fff;
  background: linear-gradient(90deg, var(--magenta) 0%, var(--purple) 100%);
  border-radius: 999px;
  box-shadow: 0 2px 10px rgba(120, 30, 120, 0.35),
              inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.title { display: block; margin-bottom: 10px; }

/* タイトル: 白明朝＋暖色グロー、1文字ずつゆるやかアーチ */
.title-main {
  display: inline-flex;
  justify-content: center;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(2.6rem, 11.5vw, 3.7rem);
  letter-spacing: 0.02em;
  color: #fff;
  text-shadow:
    0 0 14px rgba(255, 165, 70, 0.95),
    0 0 34px rgba(255, 130, 50, 0.6),
    0 0 70px rgba(255, 110, 40, 0.35);
}

.title-main span { display: inline-block; }
.title-main span:nth-child(1) { transform: translateY(3px) rotate(-2deg); }
.title-main span:nth-child(2) { transform: translateY(1.2px) rotate(-1.2deg); }
.title-main span:nth-child(3) { transform: translateY(0.3px) rotate(-0.4deg); }
.title-main span:nth-child(4) { transform: translateY(0); }
.title-main span:nth-child(5) { transform: translateY(0.3px) rotate(0.4deg); }
.title-main span:nth-child(6) { transform: translateY(1.2px) rotate(1.2deg); }
.title-main span:nth-child(7) { transform: translateY(3px) rotate(2deg); }

.title-sub {
  display: block;
  margin-top: 10px;
  font-family: var(--font-head);
  font-size: clamp(0.9rem, 3.6vw, 1.1rem);
  font-weight: 600;
  letter-spacing: 0.12em;
  color: #fff;
  text-shadow: 0 0 12px rgba(255, 150, 70, 0.45);
}

.date-line {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.date-line .dow { font-size: 0.72em; margin: 0 1px; }

/* カウントダウン: 日付と同系のフラット表示（ボタンと区別） */
.countdown {
  display: block;
  margin-top: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.88);
  text-shadow: 0 1px 8px rgba(40, 10, 60, 0.35);
}
.countdown strong {
  font-size: 1.08em;
  color: var(--yellow);
  text-shadow: 0 0 10px rgba(255, 225, 0, 0.35);
}

/* ---------- チケット・関連リンク（Liquid Glass） ---------- */
.promo-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  width: 100%;
}

.promo-links__row {
  display: flex;
  justify-content: center;
  gap: 8px;
  width: 100%;
}

.promo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-decoration: none;
  line-height: 1.3;
  text-align: center;
  color: #fff;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(18px) saturate(1.6);
  -webkit-backdrop-filter: blur(18px) saturate(1.6);
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.promo-btn:hover,
.promo-btn:focus-visible {
  background: linear-gradient(155deg,
    rgba(255, 255, 255, 0.32) 0%,
    rgba(255, 255, 255, 0.14) 45%,
    rgba(255, 255, 255, 0.24) 100%);
  border-color: rgba(255, 255, 255, 0.6);
  outline: none;
}

.promo-btn--lantern {
  width: min(100%, 360px);
  padding: 12px 24px;
  font-size: 0.86rem;
}

.promo-btn--site,
.promo-btn--ig {
  flex: 1;
  max-width: 168px;
}

/* ---------- MC セクション（コンパクト） ---------- */
.mc-section {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.mc-figure {
  position: relative;
  flex-shrink: 0;
  width: 72px;
  text-align: center;
}

.mc-figure img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  object-position: top;
  border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 14px rgba(60, 20, 60, 0.35);
  background: var(--night-1);
}

.mc-silhouette {
  display: none;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, 0.9);
  background: radial-gradient(circle at 50% 34%, #55488f 26%, #372f6e 68%);
  box-shadow: 0 2px 14px rgba(60, 20, 60, 0.35);
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}
.mc-figure.no-photo .mc-silhouette { display: flex; }

.mc-badge {
  display: inline-block;
  margin-top: 4px;
  font-size: 0.58rem;
  line-height: 1.45;
  letter-spacing: 0.05em;
  color: #fff;
}
.mc-badge strong { font-size: 1.15em; }

/* 吹き出し: フラットな白（写真の高さにしっぽを合わせる） */
.bubble {
  position: relative;
  flex: 1;
  padding: 12px 15px;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 14px;
  box-shadow: 0 3px 14px rgba(60, 20, 60, 0.2);
  font-size: 0.84rem;
  font-weight: 500;
  line-height: 1.7;
  color: var(--ink);
  min-height: 60px;
  display: flex;
  align-items: center;
}

.bubble::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 28px;
  border: 8px solid transparent;
  border-right-color: rgba(255, 255, 255, 0.96);
}

.bubble p { transition: opacity 0.35s ease; }
.bubble p.fading { opacity: 0; }

/* ---------- ガラスカード ---------- */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(18px) saturate(1.6);
  -webkit-backdrop-filter: blur(18px) saturate(1.6);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  box-shadow: var(--glass-shadow);
  overflow: hidden;
}

/* 見出しバー: マゼンタ→紫グラデ */
.card-head {
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-align: center;
  color: #fff;
  background: linear-gradient(90deg,
    rgba(194, 37, 138, 0.85) 0%,
    rgba(123, 45, 156, 0.85) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
  padding: 10px;
}

.card-body { padding: 16px 16px 20px; }
.card-body.center { text-align: center; font-size: 0.95rem; }

/* ---------- 種類トグル（願い事 / 叶った夢） ---------- */
.type-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.type-opt { position: relative; }

.type-opt input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.type-opt span {
  display: block;
  text-align: center;
  padding: 9px 4px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.42);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.type-opt input:checked + span {
  background: #fff;
  color: var(--magenta);
  box-shadow: 0 2px 10px rgba(60, 20, 60, 0.28);
}

.type-opt input:focus-visible + span {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* ---------- 入力 ---------- */
textarea, input[type="text"], select {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 12px;
  padding: 11px 14px;
  outline: none;
  box-shadow: inset 0 1px 2px rgba(40, 20, 80, 0.08);
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}

textarea { resize: vertical; min-height: 90px; }

#wish {
  font-size: 1.06rem;
  min-height: 108px;
  line-height: 1.85;
}

textarea:focus, input[type="text"]:focus, select:focus {
  background: #fff;
  border-color: #fff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.35),
              0 0 18px rgba(255, 200, 120, 0.35);
}

::placeholder { color: #8f87a8; }

.box-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.85);
}

.counter { font-variant-numeric: tabular-nums; }
.counter.limit { color: #ffb3a7; }

/* ---------- 段階展開エリア ---------- */
.details {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-6px);
  transition: max-height 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.55s ease 0.12s,
              transform 0.55s ease 0.12s;
}

.details.open {
  max-height: 1400px;
  opacity: 1;
  transform: translateY(0);
}

.field { margin-top: 16px; }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 12px;
}
.field-row .field {
  margin-top: 16px;
  min-width: 0;
}

.field label {
  display: block;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 5px;
  color: #fff;
}

.opt {
  font-size: 0.64rem;
  font-weight: 700;
  color: #fff;
  background: rgba(255, 255, 255, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  padding: 1px 7px;
  margin-left: 6px;
  vertical-align: 1px;
}

.note {
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 4px;
}

select {
  appearance: none;
  padding-right: 2.5rem;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237b2d9c' stroke-width='2' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.form-error {
  margin-top: 14px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #ffb3a7;
  text-align: center;
}

/* ---------- 同意（ガラス・ライト） ---------- */
.consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 18px;
  padding: 13px;
  font-size: 0.76rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.1);
  border: 1px dashed rgba(255, 255, 255, 0.45);
  border-radius: 12px;
  cursor: pointer;
}

.consent input {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--magenta);
  cursor: pointer;
}

/* ---------- honeypot ---------- */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- 送信ボタン: 青グラデ×ガラスハイライト ---------- */
.submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  margin-top: 20px;
  padding: 15px;
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #fff;
  background: linear-gradient(135deg,
    #63c3f7 0%, #2f8fe6 42%, #1b6fd0 72%, #3f5bd8 100%);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 14px;
  cursor: pointer;
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.55),
    inset 0 -6px 14px rgba(20, 40, 120, 0.25),
    0 6px 18px rgba(20, 70, 160, 0.45);
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s, filter 0.2s;
}

.submit-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  filter: brightness(1.07);
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.55),
    inset 0 -6px 14px rgba(20, 40, 120, 0.25),
    0 9px 24px rgba(20, 70, 160, 0.55);
}

.submit-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-accent { color: var(--yellow); }

.btn-arrow {
  margin-left: 8px;
  font-size: 1.3em;
  line-height: 1;
}

/* ---------- 送信成功 ---------- */
.success { animation: fadeUp 0.9s ease both; }

.success-date {
  margin-top: 20px;
  font-size: 0.78rem !important;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.8) !important;
}

.success-lantern {
  width: 72px;
  margin: 12px auto 18px;
  animation: successFloat 4s ease-in-out infinite alternate;
}
.success-lantern svg { display: block; width: 100%; height: auto; }

@keyframes successFloat {
  from { transform: translateY(6px); }
  to   { transform: translateY(-10px); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* 送信時に飛ぶランタン */
.fly-lantern {
  position: fixed;
  z-index: 50;
  width: 52px;
  pointer-events: none;
  animation: flyAway 2.6s cubic-bezier(0.3, 0, 0.5, 1) forwards;
}
.fly-lantern svg { display: block; width: 100%; height: auto; }

@keyframes flyAway {
  0%   { transform: translate(0, 0) scale(1); opacity: 1; }
  70%  { opacity: 1; }
  100% { transform: translate(-30px, -92vh) scale(0.45); opacity: 0; }
}

/* ---------- フッター ---------- */
.footer {
  margin-top: 48px;
  text-align: center;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.75);
}
.footer-note { margin-top: 6px; font-size: 0.66rem; }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.footer-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #fff;
  text-decoration: none;
  border-radius: 999px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(18px) saturate(1.6);
  -webkit-backdrop-filter: blur(18px) saturate(1.6);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.footer-btn:hover,
.footer-btn:focus-visible {
  background: linear-gradient(155deg,
    rgba(255, 255, 255, 0.32) 0%,
    rgba(255, 255, 255, 0.14) 45%,
    rgba(255, 255, 255, 0.24) 100%);
  border-color: rgba(255, 255, 255, 0.6);
  outline: none;
}

/* ---------- レスポンシブ ---------- */
@media (max-width: 560px) {
  .field-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

@media (min-width: 560px) {
  .hero { margin-top: 12px; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .lantern, .dot, .success-lantern { animation: none !important; }
  .details { transition: none; }
  html { scroll-behavior: auto; }
}
