/* ==========================================================================
   CYBERPUNK TAROT 2099 - DESIGN SYSTEM
   ========================================================================== */

:root {
  --bg-dark: #070913;
  --bg-card: rgba(16, 20, 38, 0.75);
  --neon-cyan: #00f3ff;
  --neon-pink: #ff0266;
  --neon-gold: #ffd700;
  --neon-purple: #9d00ff;
  --text-main: #e0f7fc;
  --text-muted: #839bb0;
  --border-neon: rgba(0, 243, 255, 0.4);
  --font-cyber: 'Orbitron', sans-serif;
  --font-body: 'Zen Kaku Gothic New', sans-serif;
}

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

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-body);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* --- 背景演出 --- */
.cyber-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  background: radial-gradient(circle at 50% 30%, #151936 0%, #070913 80%);
}

.scanlines {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,0) 50%, rgba(0,0,0,0.3) 50%, rgba(0,0,0,0.3));
  background-size: 100% 4px;
  pointer-events: none;
  opacity: 0.6;
}

.grid-overlay {
  position: absolute;
  width: 200%;
  height: 200%;
  top: -50%;
  left: -50%;
  background-image: 
    linear-gradient(rgba(0, 243, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 243, 255, 0.05) 1px, transparent 1px);
  background-size: 50px 50px;
  transform: perspective(500px) rotateX(60deg);
  animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
  0% { transform: perspective(500px) rotateX(60deg) translateY(0); }
  100% { transform: perspective(500px) rotateX(60deg) translateY(50px); }
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.35;
  pointer-events: none;
}

.orb-1 {
  width: 400px; height: 400px;
  background: var(--neon-cyan);
  top: 10%; left: 15%;
}

.orb-2 {
  width: 450px; height: 450px;
  background: var(--neon-purple);
  bottom: 10%; right: 15%;
}

/* --- コンテナ ＆ ヘッダー --- */
.app-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.header {
  text-align: center;
  margin-bottom: 35px;
}

.logo-badge {
  display: inline-block;
  font-family: var(--font-cyber);
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--neon-cyan);
  border: 1px solid var(--neon-cyan);
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 12px;
  box-shadow: 0 0 10px rgba(0, 243, 255, 0.3);
}

.glitch-title {
  font-family: var(--font-cyber);
  font-size: 3rem;
  font-weight: 900;
  letter-spacing: 4px;
  color: #fff;
  text-shadow: 
    0 0 10px var(--neon-cyan),
    0 0 20px var(--neon-cyan),
    0 0 40px var(--neon-cyan);
  margin-bottom: 8px;
}

.subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  letter-spacing: 1px;
}

/* --- ゼロ入力の入口（段階3）--- */
.daily-gate {
  width: 100%;
  max-width: 520px;
  margin-bottom: 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cyber-button.daily {
  background: linear-gradient(135deg, var(--neon-gold) 0%, var(--neon-pink) 100%);
  font-size: 1.05rem;
  padding: 18px;
  box-shadow: 0 0 24px rgba(255, 215, 0, 0.35);
}

.cyber-button.daily:hover {
  box-shadow: 0 0 34px rgba(255, 215, 0, 0.6);
}

.daily-note {
  margin-top: 10px;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.6;
}

/* 「または、じっくり占う」の区切り線 */
.gate-divider {
  width: 100%;
  margin-top: 26px;
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--text-muted);
  font-family: var(--font-cyber);
  font-size: 0.68rem;
  letter-spacing: 0.15em;
}

.gate-divider::before,
.gate-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 243, 255, 0.35), transparent);
}

/* --- 三枚の並びの見出し（段階5）--- */
.combo-banner {
  width: 100%;
  max-width: 720px;
  padding: 20px 24px;
  border: 1px solid var(--neon-pink);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 2, 102, 0.14), rgba(157, 0, 255, 0.14));
  box-shadow: 0 0 28px rgba(255, 2, 102, 0.25);
  text-align: center;
  animation: comboIn 0.55s cubic-bezier(0.2, 0.9, 0.25, 1);
}

.combo-en {
  font-family: var(--font-cyber);
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  color: var(--neon-cyan);
}

.combo-name {
  font-size: 1.7rem;
  font-weight: 900;
  color: #fff;
  margin: 4px 0 10px;
  letter-spacing: 0.06em;
  text-shadow: 0 0 14px rgba(255, 2, 102, 0.8);
}

/* 「コンボ」の字は名前の一部ではないのでCSSで足す。data.js 側は名前だけ持つ */
.combo-name::after {
  content: "コンボ";
  font-size: 0.95rem;
  font-weight: 700;
  margin-left: 8px;
  color: var(--neon-pink);
  text-shadow: none;
}

.combo-text {
  font-size: 0.9rem;
  line-height: 1.75;
  color: var(--text-main);
  text-align: left;
}

@keyframes comboIn {
  from { opacity: 0; transform: translateY(-14px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .combo-banner { animation: none; }
}

@media (max-width: 600px) {
  .combo-banner { padding: 16px; }
  .combo-name { font-size: 1.35rem; }
}

/* --- 達成ボタンとストリーク（段階6）--- */
.action-done {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px dashed rgba(0, 243, 255, 0.25);
}

.cyber-button.done {
  background: linear-gradient(135deg, #27c93f 0%, var(--neon-cyan) 100%);
  font-size: 0.82rem;
  padding: 10px;
  box-shadow: 0 0 16px rgba(39, 201, 63, 0.35);
}

.cyber-button.done:hover:not(:disabled) {
  box-shadow: 0 0 26px rgba(39, 201, 63, 0.6);
}

.cyber-button.done:disabled {
  background: rgba(39, 201, 63, 0.14);
  border: 1px solid rgba(39, 201, 63, 0.5);
  color: #7fe08d;
  box-shadow: none;
  cursor: default;
  transform: none;
}

/* ★`.text-block p` が詳細度で勝つので、ブロック名込みで書くこと。
   `.streak-note` だけだと色も字サイズも本文の値に負ける（2026-08-11 に踏んだ） */
.text-block .streak-note {
  margin-top: 8px;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--neon-gold);
  text-align: center;
}

/* 入口の積み上げ表示 */
.streak-badge {
  margin-top: 10px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--neon-gold);
  text-align: center;
}

/* --- 再会の帯（段階4）--- */
.reunion-band {
  border: 1px solid var(--neon-gold);
  background: rgba(255, 215, 0, 0.08);
  color: var(--neon-gold);
  border-radius: 8px;
  padding: 9px 14px;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.5;
}

/* --- 入力フォーム --- */
.input-card {
  width: 100%;
  max-width: 520px;
  background: var(--bg-card);
  border: 1px solid var(--border-neon);
  border-radius: 12px;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 243, 255, 0.15);
  overflow: hidden;
  transition: transform 0.3s ease;
}

.terminal-header {
  background: rgba(0, 0, 0, 0.4);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dot {
  width: 10px; height: 10px; border-radius: 50%;
}
.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.terminal-title {
  font-family: var(--font-cyber);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 1px;
  margin-left: 6px;
}

.form-content {
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-group label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.neon-tag {
  font-family: var(--font-cyber);
  color: var(--neon-cyan);
  font-size: 0.75rem;
}

input[type="text"], select {
  width: 100%;
  padding: 14px 16px;
  background: rgba(5, 7, 18, 0.8);
  border: 1px solid rgba(0, 243, 255, 0.3);
  border-radius: 6px;
  color: #fff;
  font-size: 1rem;
  font-family: var(--font-body);
  outline: none;
  transition: all 0.3s ease;
}

input[type="text"]:focus, select:focus {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 15px rgba(0, 243, 255, 0.4);
}

/* ボタン */
.cyber-button {
  position: relative;
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, var(--neon-cyan) 0%, var(--neon-purple) 100%);
  border: none;
  border-radius: 6px;
  color: #fff;
  font-family: var(--font-cyber);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 1.5px;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(0, 243, 255, 0.4);
  transition: all 0.3s ease;
}

.cyber-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(0, 243, 255, 0.7);
}

.cyber-button.secondary {
  background: transparent;
  border: 1px solid var(--neon-cyan);
  color: var(--neon-cyan);
  box-shadow: none;
}

.cyber-button.secondary:hover {
  background: rgba(0, 243, 255, 0.1);
  box-shadow: 0 0 20px rgba(0, 243, 255, 0.4);
}

.cyber-button.share {
  background: linear-gradient(135deg, #1d9bf0 0%, #00f3ff 100%);
  color: #fff;
  box-shadow: 0 0 15px rgba(29, 155, 240, 0.4);
}

.cyber-button.share:hover {
  box-shadow: 0 0 25px rgba(29, 155, 240, 0.7);
}

/* --- タロットスプレッドエリア --- */
.tarot-board {
  width: 100%;
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  animation: fadeIn 0.8s ease;
}

.status-bar {
  background: rgba(0, 243, 255, 0.1);
  border: 1px solid var(--neon-cyan);
  padding: 10px 24px;
  border-radius: 30px;
  font-size: 0.9rem;
  color: var(--neon-cyan);
  font-weight: 700;
  letter-spacing: 1px;
  box-shadow: 0 0 15px rgba(0, 243, 255, 0.2);
}

.spread-container {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
  width: 100%;
}

/* カード3枚（220px×3）＋隙間が入りきる幅を稼ぐ。
   隙間30pxのままだとタブレット縦（768px）で縦スクロールバーのぶん足りず、
   2枚＋1枚に折り返してしまう */
@media (max-width: 900px) {
  .spread-container { gap: 16px; }
}

/* ★スロット幅はカード幅に固定する。
   見出しの長さで幅が決まると、デスクトップで3枚が横に並ばず折り返す
   （2026-08-11 に実際に起きた。詳細は HANDOFF.md §6「段階5」）。 */
.card-slot {
  width: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  position: relative;
}

/* 見出しは2行。上が英字コード、下が日本語。高さを揃えてカードの頭を並べる */
.slot-label {
  min-height: 2.9em;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  text-align: center;
  color: var(--text-muted);
}

.slot-code {
  font-family: var(--font-cyber);
  font-size: 0.68rem;
  letter-spacing: 1px;
  white-space: nowrap;
}

.slot-ja {
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  line-height: 1.4;
}

/* 3Dタロットカード本体 */
.tarot-card {
  width: 220px;
  height: 380px;
  perspective: 1000px;
  cursor: pointer;
  position: relative;
}

.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
  border-radius: 12px;
}

/* 裏面・表面共通 */
.card-face {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid var(--border-neon);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
}

/* カード裏面 */
.card-back {
  background: linear-gradient(145deg, #0d1127, #050714);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transform: rotateY(0deg);
}

.cyber-circuit {
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(circle at 50% 50%, rgba(0, 243, 255, 0.15) 0%, transparent 60%),
    linear-gradient(45deg, rgba(157, 0, 255, 0.1) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(0, 243, 255, 0.1) 25%, transparent 25%);
  background-size: 20px 20px;
}

.card-back-logo {
  font-family: var(--font-cyber);
  font-weight: 900;
  font-size: 1.2rem;
  letter-spacing: 3px;
  color: var(--neon-cyan);
  text-align: center;
  line-height: 1.4;
  text-shadow: 0 0 12px var(--neon-cyan);
  z-index: 2;
}

/* カード表面 */
.card-front {
  transform: rotateY(180deg);
  background: #050714;
  position: relative;
}

.card-front.is-reversed {
  border-color: var(--neon-pink);
  box-shadow: 0 0 20px rgba(255, 2, 102, 0.4);
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.card-img.is-reversed {
  transform: rotate(180deg);
}

/* ホログラムグレア */
.hologram-glare {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.4) 0%, rgba(0,243,255,0.25) 40%, transparent 80%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  mix-blend-mode: color-dodge;
  z-index: 3;
}

.tarot-card:hover .hologram-glare {
  opacity: 0.6;
}

.card-title-overlay {
  position: absolute;
  bottom: 0;
  left: 0; right: 0;
  padding: 12px;
  background: linear-gradient(to top, rgba(0,0,0,0.92), transparent);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 4;
}

.card-number {
  font-family: var(--font-cyber);
  font-size: 0.75rem;
  color: var(--neon-cyan);
}

.card-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
}

/* 画面下部アクションエリア */
.board-action-footer {
  margin-top: 20px;
  display: flex;
  gap: 20px;
  width: 100%;
  max-width: 500px;
  justify-content: center;
}

@media (max-width: 600px) {
  .board-action-footer {
    flex-direction: column;
  }
}

/* --- モーダル結果表示 --- */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(3, 4, 10, 0.85);
  backdrop-filter: blur(10px);
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  animation: fadeIn 0.4s ease;
}

/* ★達成ボタンと再会の帯が入って縦が伸びたので、余白を詰めてある（2026-08-11）。
   本文がいちばん長いカード＋帯＋注記の全部乗せでも、
   高さ800px前後の画面でスクロールが出ないことを実測して決めた値。
   ここの padding / gap を戻すとスクロールが復活する。 */
.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--neon-cyan);
  box-shadow: 0 0 40px rgba(0, 243, 255, 0.3);
  border-radius: 16px;
  width: 100%;
  max-width: 820px;
  max-height: 94vh;
  overflow-y: auto;
  position: relative;
  padding: 22px 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.close-btn {
  position: absolute;
  top: 16px; right: 20px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 2rem;
  cursor: pointer;
  transition: color 0.2s;
}

.close-btn:hover { color: var(--neon-pink); }

.modal-header {
  border-bottom: 1px solid rgba(0, 243, 255, 0.2);
  padding-bottom: 12px;
}

.modal-badge {
  font-family: var(--font-cyber);
  font-size: 0.8rem;
  color: var(--neon-cyan);
  letter-spacing: 2px;
}

.modal-card-title {
  font-size: 1.5rem;
  color: #fff;
  margin: 4px 0;
}

.orientation-badge {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 4px;
}

.orientation-badge.upright {
  background: rgba(0, 243, 255, 0.2);
  color: var(--neon-cyan);
}

.orientation-badge.reversed {
  background: rgba(255, 2, 102, 0.2);
  color: var(--neon-pink);
}

.modal-body {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 20px;
}

@media (max-width: 680px) {
  .modal-body {
    grid-template-columns: 1fr;
  }
  .card-preview-box {
    margin: 0 auto;
  }
}

/* 左列。カードの下の余白に待ち受けボタンを収める（段階7）。
   ここに置いているぶんにはモーダルの高さが増えない（右列の方が背が高いため） */
.card-column {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.cyber-button.wallpaper {
  font-size: 0.76rem;
  padding: 9px 6px;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, var(--neon-purple) 0%, var(--neon-cyan) 100%);
  box-shadow: 0 0 14px rgba(157, 0, 255, 0.35);
}

.cyber-button.wallpaper:hover {
  box-shadow: 0 0 24px rgba(157, 0, 255, 0.6);
}

.card-preview-box {
  width: 180px;
  height: 310px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid var(--border-neon);
  box-shadow: 0 0 20px rgba(0, 243, 255, 0.2);
}

.card-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.reading-texts {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.text-block {
  background: rgba(5, 7, 18, 0.6);
  border-left: 4px solid var(--neon-cyan);
  padding: 10px 15px;
  border-radius: 0 8px 8px 0;
}

.text-block.harsh {
  border-left-color: var(--neon-pink);
}

.text-block.encouragement {
  border-left-color: var(--neon-gold);
}

.text-block.action {
  border-left-color: var(--neon-cyan);
}

.text-block h3 {
  font-size: 0.9rem;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.text-block p {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text-main);
}

/* 辛口の切替と閉じるボタンを同じ行に並べる。
   ★行の高さは閉じるボタンで決まるので、切替を足してもモーダルは伸びない（段階8） */
.modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ★上下の余白は 9px。11px に戻すと行が4px伸び、モーダルにスクロールが出る（実測） */
.modal-footer .cyber-button {
  width: auto;
  flex: 1 1 180px;
  padding: 9px 20px;
}

/* --- 辛口レベル（段階8）--- */
.spice-switch {
  display: flex;
  align-items: center;
  gap: 6px;
}

.spice-label {
  font-family: var(--font-cyber);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  margin-right: 2px;
}

.spice-btn {
  background: transparent;
  border: 1px solid rgba(0, 243, 255, 0.3);
  color: var(--text-muted);
  border-radius: 5px;
  padding: 6px 10px;
  font-family: var(--font-body);
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.spice-btn:hover {
  border-color: var(--neon-cyan);
  color: var(--text-main);
}

.spice-btn[aria-pressed="true"] {
  background: rgba(0, 243, 255, 0.16);
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
}

/* 激辛だけ警戒色にする */
.spice-btn[data-spice="hot"][aria-pressed="true"] {
  background: rgba(255, 2, 102, 0.18);
  border-color: var(--neon-pink);
  color: var(--neon-pink);
}

/* 甘口だけ本文の並びを入れ替える。喝 → アクション → ツッコミ の順 */
.reading-texts.sweet .text-block.encouragement { order: 1; }
.reading-texts.sweet .text-block.action { order: 2; }
.reading-texts.sweet .text-block.harsh { order: 3; }

.harsh-toggle {
  background: transparent;
  border: none;
  color: var(--neon-pink);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 2px 0;
  cursor: pointer;
}

.harsh-toggle:hover { text-decoration: underline; }

/* --- 生成した画像を出すパネル（段階7）--- */
.image-panel-content {
  background: var(--bg-card);
  border: 1px solid var(--neon-cyan);
  box-shadow: 0 0 40px rgba(0, 243, 255, 0.3);
  border-radius: 16px;
  width: 100%;
  max-width: 560px;
  max-height: 94vh;
  overflow-y: auto;
  position: relative;
  padding: 22px 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.panel-title {
  font-size: 1.25rem;
  color: #fff;
  align-self: flex-start;
}

.panel-status {
  font-size: 0.82rem;
  color: var(--text-muted);
  align-self: flex-start;
}

.panel-preview {
  width: 100%;
  display: flex;
  justify-content: center;
}

/* ★img で出す。スマホは長押しで保存する動線が主（HANDOFF §8） */
.panel-preview img {
  max-width: 100%;
  max-height: 46vh;
  border-radius: 8px;
  border: 1px solid var(--border-neon);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

.panel-hint {
  font-size: 0.78rem;
  line-height: 1.65;
  color: var(--neon-gold);
  background: rgba(255, 215, 0, 0.07);
  border: 1px solid rgba(255, 215, 0, 0.35);
  border-radius: 8px;
  padding: 9px 12px;
  width: 100%;
}

/* シェア本文。クリップボードが使えない環境の逃げ道でもあるので、
   必ず選択できる状態で置くこと（user-select を殺さない） */
.panel-text {
  width: 100%;
  margin: 0;
  padding: 10px 12px;
  background: rgba(5, 7, 18, 0.7);
  border: 1px solid rgba(0, 243, 255, 0.25);
  border-radius: 8px;
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.76rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 22vh;
  overflow-y: auto;
  user-select: text;
}

.panel-actions {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.panel-actions .cyber-button {
  padding: 11px;
  font-size: 0.85rem;
}

.hidden {
  display: none !important;
}

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

/* --- 一つ上の階層へ戻る導線 --- */
.upstairs {
  margin-top: 48px;
  text-align: center;
}

.upstairs a {
  font-family: var(--font-cyber);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

.upstairs a:hover {
  color: var(--neon-cyan);
  text-shadow: 0 0 12px rgba(0, 243, 255, 0.6);
}
