/*
Theme Name: Atare DQ
Theme URI: https://atare-jp.com
Author: Atare Inc.
Description: ドラゴンクエスト風ホームページテーマ
Version: 1.0
*/

@import url('https://fonts.googleapis.com/css2?family=DotGothic16&family=Noto+Serif+JP:wght@400;700&display=swap');

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #0a0a1a;
  --bg2:       #12122a;
  --win:       #1a1a3a;
  --win2:      #0f0f28;
  --border:    #c8a800;
  --border2:   #7a6600;
  --gold:      #f0d840;
  --gold2:     #c8a800;
  --text:      #f0e8c0;
  --text2:     #b8a870;
  --red:       #e84040;
  --green:     #40c840;
  --blue:      #4080ff;
  --white:     #ffffff;
  --hp:        #40c840;
  --mp:        #4080ff;
  --exp:       #f0a000;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DotGothic16', 'Noto Serif JP', monospace;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cpolygon points='2,2 2,16 6,12 8,18 10,17 8,11 14,11' fill='%23f0d840' stroke='%23000' stroke-width='1'/%3E%3C/svg%3E") 2 2, auto;
}

a { text-decoration: none; color: var(--gold); transition: color 0.2s; }
a:hover { color: var(--white); }
img { max-width: 100%; height: auto; display: block; }

/* ===== PIXEL BORDER WINDOW ===== */
.dq-window {
  background: var(--win);
  border: 4px solid var(--border);
  box-shadow:
    0 0 0 2px var(--bg),
    0 0 0 4px var(--border2),
    inset 0 0 0 2px var(--border2);
  border-radius: 4px;
  position: relative;
}
.dq-window::before, .dq-window::after {
  content: '◆';
  position: absolute;
  color: var(--gold);
  font-size: 10px;
  line-height: 1;
}
.dq-window::before { top: 4px; left: 8px; }
.dq-window::after  { top: 4px; right: 8px; }

/* ===== STARS BG ===== */
@keyframes twinkle { 0%,100%{opacity:0.3} 50%{opacity:1} }
.stars-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.star {
  position: absolute;
  width: 2px; height: 2px;
  background: white;
  border-radius: 50%;
  animation: twinkle var(--dur, 3s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}

/* ===== SCROLL PROGRESS ===== */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--gold), var(--red), var(--gold));
  z-index: 9999;
  width: 0%;
  transition: width 0.1s;
  box-shadow: 0 0 10px var(--gold);
}

/* ===== HEADER ===== */
.site-header {
  position: fixed;
  top: 4px; left: 0; right: 0;
  z-index: 1000;
  padding: 0 40px;
}
.header-inner {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--win2);
  border: 3px solid var(--border);
  border-radius: 4px;
  padding: 10px 24px;
  box-shadow: 0 0 20px rgba(200,168,0,0.3), inset 0 0 0 1px var(--border2);
}

.logo img { height: 42px; width: auto; filter: drop-shadow(0 0 6px var(--gold)); }
.logo-text {
  font-size: 20px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.1em;
  text-shadow: 0 0 10px var(--gold);
}

.header-nav { display: flex; gap: 0; list-style: none; }
.header-nav a {
  color: var(--text);
  font-size: 13px;
  padding: 8px 16px;
  letter-spacing: 0.05em;
  transition: all 0.2s;
  position: relative;
}
.header-nav a::before {
  content: '▶';
  position: absolute;
  left: 4px;
  color: var(--gold);
  font-size: 10px;
  opacity: 0;
  transition: opacity 0.2s;
  top: 50%; transform: translateY(-50%);
}
.header-nav a:hover { color: var(--gold); padding-left: 20px; }
.header-nav a:hover::before { opacity: 1; }

.header-cta a {
  background: var(--red);
  color: white;
  padding: 10px 22px;
  border: 2px solid #ff8080;
  border-radius: 3px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  transition: all 0.2s;
  display: inline-block;
  box-shadow: 0 0 10px rgba(232,64,64,0.5);
  animation: pulse-red 2s ease-in-out infinite;
}
@keyframes pulse-red {
  0%,100%{box-shadow:0 0 10px rgba(232,64,64,0.5)}
  50%{box-shadow:0 0 20px rgba(232,64,64,0.9)}
}
.header-cta a:hover { background: #ff5050; transform: scale(1.05); color: white; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span { display: block; width: 24px; height: 2px; background: var(--gold); transition: all 0.3s; }
.hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; }
.hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10,10,26,0.97);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  border: 4px solid var(--border);
}
.mobile-nav.is-open { display: flex; }
.mobile-nav a { color: var(--gold); font-size: 22px; letter-spacing: 0.1em; transition: all 0.2s; }
.mobile-nav a:hover { color: white; text-shadow: 0 0 10px white; }
.mobile-nav a::before { content: '▶ '; }

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 120px 40px 80px;
  background: radial-gradient(ellipse at 50% 100%, #1a0a3a 0%, #0a0a1a 70%);
}

/* タイル床 */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(200,168,0,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(200,168,0,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

.hero-inner {
  position: relative; z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
}

/* ストーリーウィンドウ */
.hero-story {
  padding: 36px 40px;
}
.hero-story .chapter {
  color: var(--gold2);
  font-size: 12px;
  letter-spacing: 0.3em;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero-story .chapter::before, .hero-story .chapter::after { content: '—'; }

.hero-title {
  font-size: clamp(28px, 3.5vw, 48px);
  font-weight: 700;
  line-height: 1.6;
  color: var(--gold);
  text-shadow: 0 0 20px rgba(240,216,64,0.4);
  margin-bottom: 24px;
  letter-spacing: 0.05em;
}
.hero-title .blink {
  animation: textBlink 1.2s step-end infinite;
  color: var(--white);
}
@keyframes textBlink { 0%,100%{opacity:1} 50%{opacity:0.3} }
.hero-title .highlight { color: var(--red); text-shadow: 0 0 15px rgba(232,64,64,0.6); }

.hero-desc {
  font-size: 15px;
  line-height: 2;
  color: var(--text2);
  margin-bottom: 32px;
  letter-spacing: 0.05em;
}

/* コマンドウィンドウ */
.command-window {
  margin-top: 24px;
}
.command-title {
  background: var(--border);
  color: var(--bg);
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  display: inline-block;
  margin-bottom: 0;
}
.command-list {
  border: 3px solid var(--border);
  border-top: none;
  padding: 12px 0;
}
.command-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  font-size: 16px;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all 0.15s;
  color: var(--text);
  position: relative;
}
.command-item:hover { background: rgba(200,168,0,0.1); color: var(--gold); padding-left: 36px; }
.command-item .cmd-cursor {
  color: var(--gold);
  font-size: 12px;
  opacity: 0;
  position: absolute;
  left: 12px;
}
.command-item:hover .cmd-cursor { opacity: 1; }
.command-item .cmd-icon { font-size: 20px; }
.command-item .cmd-label { flex: 1; }
.command-item .cmd-desc { font-size: 12px; color: var(--text2); }

/* キャラクターステータス */
.hero-status {
  padding: 28px 32px;
}
.status-name {
  font-size: 20px;
  color: var(--gold);
  margin-bottom: 4px;
  letter-spacing: 0.1em;
}
.status-class {
  font-size: 12px;
  color: var(--text2);
  margin-bottom: 20px;
  letter-spacing: 0.1em;
}
.status-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.status-label {
  font-size: 13px;
  color: var(--text2);
  width: 32px;
  flex-shrink: 0;
  letter-spacing: 0.05em;
}
.status-bar-wrap {
  flex: 1;
  height: 16px;
  background: var(--bg);
  border: 2px solid var(--border2);
  border-radius: 2px;
  overflow: hidden;
}
.status-bar {
  height: 100%;
  border-radius: 1px;
  transition: width 1.5s cubic-bezier(0.16,1,0.3,1);
  width: 0%;
}
.bar-hp  { background: linear-gradient(90deg, #20a020, var(--hp)); }
.bar-mp  { background: linear-gradient(90deg, #2040c0, var(--mp)); }
.bar-exp { background: linear-gradient(90deg, #c07000, var(--exp)); }
.status-val { font-size: 13px; color: var(--text); width: 70px; text-align: right; }

.status-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 2px solid var(--border2);
}
.stat-box {
  text-align: center;
  padding: 10px 8px;
  background: var(--win2);
  border: 2px solid var(--border2);
  border-radius: 3px;
  transition: border-color 0.3s;
}
.stat-box:hover { border-color: var(--border); }
.stat-box .val {
  font-size: 22px;
  font-weight: 700;
  color: var(--gold);
  display: block;
  text-shadow: 0 0 10px rgba(240,216,64,0.4);
}
.stat-box .lbl { font-size: 11px; color: var(--text2); margin-top: 2px; }

.hero-img-wrap {
  position: relative;
  text-align: center;
  margin-top: 20px;
}
.hero-img-wrap img {
  width: 100%;
  border: 3px solid var(--border2);
  border-radius: 4px;
  filter: sepia(20%) hue-rotate(20deg) saturate(0.8);
  box-shadow: 0 0 30px rgba(200,168,0,0.2);
}
.hero-img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10,10,26,0.6) 0%, transparent 50%);
  border-radius: 3px;
}

/* ===== SECTION COMMON ===== */
.section { padding: 80px 40px; position: relative; z-index: 1; }
.section-inner { max-width: 1200px; margin: 0 auto; }

.section-header { text-align: center; margin-bottom: 56px; }
.section-eyebrow {
  font-size: 11px;
  letter-spacing: 0.4em;
  color: var(--gold2);
  margin-bottom: 12px;
  display: block;
}
.section-eyebrow::before { content: '— '; }
.section-eyebrow::after  { content: ' —'; }
.section-title {
  font-size: clamp(24px, 3vw, 40px);
  color: var(--gold);
  text-shadow: 0 0 20px rgba(240,216,64,0.3);
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}
.section-title .ruby { font-size: 0.5em; color: var(--text2); display: block; margin-bottom: 4px; }
.section-desc { font-size: 14px; color: var(--text2); line-height: 2; letter-spacing: 0.05em; }

/* ===== FADE ===== */
.fade-up { opacity:0; transform:translateY(40px); transition:opacity 0.8s cubic-bezier(0.16,1,0.3,1), transform 0.8s cubic-bezier(0.16,1,0.3,1); }
.fade-up.is-visible { opacity:1; transform:translateY(0); }
.fade-left  { opacity:0; transform:translateX(-40px); transition:opacity 0.8s cubic-bezier(0.16,1,0.3,1), transform 0.8s cubic-bezier(0.16,1,0.3,1); }
.fade-left.is-visible  { opacity:1; transform:translateX(0); }
.fade-right { opacity:0; transform:translateX(40px);  transition:opacity 0.8s cubic-bezier(0.16,1,0.3,1), transform 0.8s cubic-bezier(0.16,1,0.3,1); }
.fade-right.is-visible { opacity:1; transform:translateX(0); }

/* ===== MESSAGE WINDOW ===== */
.msg-window {
  max-width: 900px;
  margin: 0 auto 60px;
  padding: 28px 36px;
  position: relative;
}
.msg-window .msg-text {
  font-size: 16px;
  line-height: 2;
  color: var(--text);
  letter-spacing: 0.05em;
}
.msg-window .msg-arrow {
  position: absolute;
  bottom: 12px; right: 20px;
  color: var(--gold);
  font-size: 12px;
  animation: msgArrow 0.8s ease-in-out infinite alternate;
}
@keyframes msgArrow { from{opacity:0.3} to{opacity:1} }

/* ===== WORRY / QUEST ===== */
.quest-section {
  background: var(--bg2);
  border-top: 3px solid var(--border2);
  border-bottom: 3px solid var(--border2);
}
.enemy-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 48px;
}
.enemy-card {
  padding: 24px 16px;
  text-align: center;
  transition: transform 0.3s;
  cursor: default;
}
.enemy-card:hover { transform: translateY(-6px); }
.enemy-emoji { font-size: 48px; display: block; margin-bottom: 12px; filter: drop-shadow(0 0 8px rgba(232,64,64,0.5)); }
.enemy-name { font-size: 14px; color: var(--red); margin-bottom: 8px; letter-spacing: 0.05em; }
.enemy-desc { font-size: 12px; color: var(--text2); line-height: 1.7; }

.battle-result {
  padding: 32px 40px;
  text-align: center;
  position: relative;
}
.battle-result::before {
  content: '！';
  position: absolute;
  top: -14px; left: 50%;
  transform: translateX(-50%);
  background: var(--red);
  color: white;
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
}
.battle-result .result-text {
  font-size: clamp(16px, 2.5vw, 26px);
  color: var(--gold);
  letter-spacing: 0.1em;
  line-height: 1.8;
  text-shadow: 0 0 20px rgba(240,216,64,0.3);
}
.battle-result .result-sub { font-size: 13px; color: var(--text2); margin-top: 12px; letter-spacing: 0.05em; }

/* ===== VISION / TAVERN ===== */
.tavern-section { background: var(--bg); }
.tavern-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-top: 0;
}
.tavern-card {
  padding: 36px;
  transition: transform 0.3s;
}
.tavern-card:hover { transform: translateY(-4px); }
.tavern-card .tavern-icon { font-size: 40px; margin-bottom: 16px; }
.tavern-card h3 { font-size: 18px; color: var(--gold); margin-bottom: 14px; letter-spacing: 0.08em; }
.tavern-card p { font-size: 14px; color: var(--text2); line-height: 2; }

/* ===== BUSINESS / DUNGEON ===== */
.dungeon-section { background: var(--bg2); }
.dungeon-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.dungeon-card {
  overflow: hidden;
  transition: transform 0.3s;
}
.dungeon-card:hover { transform: translateY(-6px); }
.dungeon-img {
  height: 180px;
  overflow: hidden;
  position: relative;
  border-bottom: 3px solid var(--border2);
}
.dungeon-img img { width:100%; height:100%; object-fit:cover; filter:sepia(30%) hue-rotate(20deg) saturate(0.7); transition:transform 0.5s; }
.dungeon-card:hover .dungeon-img img { transform: scale(1.06); }
.dungeon-img .dungeon-rank {
  position: absolute;
  top: 10px; left: 10px;
  background: var(--red);
  color: white;
  font-size: 11px;
  padding: 4px 10px;
  border: 1px solid #ff6060;
  letter-spacing: 0.1em;
}
.dungeon-body { padding: 24px; }
.dungeon-body h3 { font-size: 17px; color: var(--gold); margin-bottom: 10px; letter-spacing: 0.05em; }
.dungeon-body p  { font-size: 13px; color: var(--text2); line-height: 1.8; }
.dungeon-rewards {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.reward-tag {
  font-size: 11px;
  padding: 3px 10px;
  border: 1px solid var(--border2);
  color: var(--text2);
  letter-spacing: 0.05em;
}

/* ===== LEVELUP / CAREER ===== */
.levelup-section { background: var(--bg); }
.levelup-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}
.levelup-img img {
  width: 100%;
  border: 3px solid var(--border2);
  border-radius: 3px;
  filter: sepia(20%) hue-rotate(20deg) saturate(0.8);
  box-shadow: 0 0 30px rgba(200,168,0,0.15);
}
.levelup-steps { display: flex; flex-direction: column; gap: 0; }
.levelup-step {
  display: flex;
  gap: 0;
  position: relative;
}
.levelup-step:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 24px; top: 52px;
  width: 2px;
  height: calc(100% - 12px);
  background: linear-gradient(to bottom, var(--border2), transparent);
}
.step-lv {
  flex-shrink: 0;
  width: 48px; height: 48px;
  background: var(--win2);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--gold);
  letter-spacing: 0.05em;
  flex-direction: column;
  text-align: center;
  line-height: 1.2;
}
.step-lv span { font-size: 16px; font-weight: 700; }
.step-body {
  padding: 12px 20px 28px;
}
.step-body h4 {
  font-size: 16px;
  color: var(--gold);
  margin-bottom: 6px;
  letter-spacing: 0.05em;
}
.step-body p { font-size: 13px; color: var(--text2); line-height: 1.8; }
.levelup-badge {
  display: inline-block;
  background: var(--exp);
  color: var(--bg);
  font-size: 11px;
  padding: 2px 10px;
  margin-bottom: 8px;
  letter-spacing: 0.1em;
  font-weight: 700;
}

/* ===== PARTY / VOICE ===== */
.party-section { background: var(--bg2); }
.party-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.party-card { padding: 28px; transition: transform 0.3s; }
.party-card:hover { transform: translateY(-4px); }
.party-header { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.party-avatar {
  width: 56px; height: 56px;
  border: 2px solid var(--border);
  border-radius: 2px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 0 10px rgba(200,168,0,0.3);
}
.party-avatar img { width:100%; height:100%; object-fit:cover; filter:sepia(20%) saturate(0.9); }
.party-info .name  { font-size: 15px; color: var(--gold); letter-spacing: 0.05em; }
.party-info .class { font-size: 11px; color: var(--text2); margin-top: 2px; }
.party-info .class::before { content: '【'; }
.party-info .class::after  { content: '】'; }
.party-quote { font-size: 13px; color: var(--text); line-height: 1.9; position: relative; padding-left: 12px; }
.party-quote::before { content: '「'; }
.party-quote::after  { content: '」'; }

/* ===== NUMBERS ===== */
.numbers-section {
  background: var(--bg);
  border-top: 3px solid var(--border2);
  border-bottom: 3px solid var(--border2);
  padding: 70px 40px;
}
.numbers-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 48px;
}
.number-card {
  padding: 28px 20px;
  text-align: center;
  transition: all 0.3s;
}
.number-card:hover { transform: translateY(-4px) scale(1.02); }
.number-val {
  font-size: 44px;
  color: var(--gold);
  text-shadow: 0 0 20px rgba(240,216,64,0.5);
  display: block;
  line-height: 1;
  margin-bottom: 6px;
}
.number-unit { font-size: 16px; }
.number-lbl { font-size: 12px; color: var(--text2); letter-spacing: 0.05em; }

/* ===== CTA / CASTLE ===== */
.castle-section {
  background: radial-gradient(ellipse at 50% 0%, #2a1a5a 0%, #0a0a1a 70%);
  padding: 100px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.castle-section::before {
  content: '🏰';
  position: absolute;
  font-size: 300px;
  opacity: 0.03;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.castle-inner { max-width: 800px; margin: 0 auto; position: relative; z-index: 1; }
.castle-eyebrow { font-size: 12px; color: var(--gold2); letter-spacing: 0.3em; margin-bottom: 20px; display: block; }
.castle-title {
  font-size: clamp(26px, 4vw, 52px);
  color: var(--gold);
  text-shadow: 0 0 30px rgba(240,216,64,0.5);
  line-height: 1.5;
  margin-bottom: 20px;
  letter-spacing: 0.08em;
}
.castle-desc { font-size: 15px; color: var(--text2); line-height: 2; margin-bottom: 48px; letter-spacing: 0.05em; }
.castle-buttons { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; }

.btn-dq-primary {
  background: var(--red);
  color: white;
  padding: 18px 48px;
  border: 2px solid #ff8080;
  font-size: 16px;
  letter-spacing: 0.1em;
  display: inline-block;
  transition: all 0.2s;
  box-shadow: 0 0 20px rgba(232,64,64,0.5), inset 0 1px 0 rgba(255,255,255,0.2);
  position: relative;
  overflow: hidden;
}
.btn-dq-primary::before {
  content: '▶ ';
  font-size: 12px;
}
.btn-dq-primary::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  transition: left 0.4s;
}
.btn-dq-primary:hover { background: #ff4444; transform: scale(1.05); color: white; }
.btn-dq-primary:hover::after { left: 100%; }

.btn-dq-secondary {
  background: transparent;
  color: var(--gold);
  padding: 18px 48px;
  border: 2px solid var(--border);
  font-size: 16px;
  letter-spacing: 0.1em;
  display: inline-block;
  transition: all 0.2s;
  box-shadow: 0 0 10px rgba(200,168,0,0.2);
}
.btn-dq-secondary::before { content: '▷ '; font-size: 12px; }
.btn-dq-secondary:hover { background: rgba(200,168,0,0.1); color: var(--gold); transform: scale(1.05); }

/* ===== COMPANY ===== */
.company-section { background: var(--bg2); }
.company-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 40px;
}
.company-table tr { border-bottom: 1px solid var(--border2); }
.company-table tr:last-child { border-bottom: none; }
.company-table th {
  background: var(--win2);
  color: var(--gold2);
  font-size: 13px;
  padding: 16px 24px;
  width: 200px;
  letter-spacing: 0.08em;
  border-right: 2px solid var(--border2);
}
.company-table th::before { content: '■ '; font-size: 8px; }
.company-table td {
  padding: 16px 24px;
  color: var(--text);
  font-size: 14px;
  background: var(--win);
  letter-spacing: 0.03em;
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--win2);
  border-top: 4px solid var(--border2);
  padding: 56px 40px 28px;
}
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  padding-bottom: 40px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border2);
}
.footer-logo img { height: 36px; filter: drop-shadow(0 0 6px var(--gold)) brightness(0) invert(1); margin-bottom: 12px; }
.footer-logo p { font-size: 12px; color: var(--text2); line-height: 1.9; }
.footer-nav { display: flex; gap: 48px; }
.footer-nav-col h4 { color: var(--gold); font-size: 13px; margin-bottom: 14px; letter-spacing: 0.1em; }
.footer-nav-col h4::before { content: '◆ '; font-size: 8px; }
.footer-nav-col a { display: block; font-size: 12px; color: var(--text2); margin-bottom: 8px; transition: all 0.2s; letter-spacing: 0.05em; }
.footer-nav-col a::before { content: '▷ '; font-size: 10px; }
.footer-nav-col a:hover { color: var(--gold); padding-left: 6px; }
.footer-bottom { text-align: center; font-size: 12px; color: var(--text2); letter-spacing: 0.05em; }

/* ===== DIVIDER ===== */
.dq-divider {
  text-align: center;
  padding: 20px 0;
  color: var(--border2);
  font-size: 12px;
  letter-spacing: 0.5em;
}

/* ===== LEVEL UP POPUP ===== */
.levelup-popup {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0);
  z-index: 99999;
  padding: 32px 56px;
  text-align: center;
  pointer-events: none;
  transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1), opacity 0.3s;
  opacity: 0;
}
.levelup-popup.show { transform: translate(-50%,-50%) scale(1); opacity: 1; }
.levelup-popup .lv-text {
  font-size: 32px;
  color: var(--gold);
  text-shadow: 0 0 30px var(--gold);
  animation: lvFlash 0.5s ease-in-out infinite alternate;
  letter-spacing: 0.1em;
}
@keyframes lvFlash { from{text-shadow:0 0 10px var(--gold)} to{text-shadow:0 0 40px var(--gold), 0 0 80px rgba(240,216,64,0.5)} }

/* ===== CONTACT PAGE ===== */
.contact-hero {
  min-height: 40vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 140px 40px 60px;
  background: radial-gradient(ellipse at 50% 100%, #1a0a3a 0%, #0a0a1a 70%);
  position: relative;
}
.contact-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(200,168,0,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(200,168,0,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
}
.contact-hero-inner { position: relative; z-index: 1; }
.contact-title {
  font-size: clamp(32px, 5vw, 56px);
  color: var(--gold);
  text-shadow: 0 0 30px rgba(240,216,64,0.4);
  letter-spacing: 0.15em;
  margin-bottom: 16px;
}
.contact-sub { font-size: 15px; color: var(--text2); line-height: 2; letter-spacing: 0.05em; }

.contact-section { background: var(--bg); }
.contact-layout {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
  align-items: start;
}

/* フォームウィンドウタイトル */
.form-win-title, .info-win-title {
  background: var(--border2);
  color: var(--bg);
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.contact-form { padding: 28px 32px; }

/* ===== Contact Form 7 DQスタイル ===== */
.cf7-wrap { padding: 28px 32px; }
.cf7-wrap .wpcf7-form { display: flex; flex-direction: column; gap: 20px; }
.cf7-wrap .wpcf7-form p { margin: 0; }
.cf7-wrap label { display: block; color: var(--gold); font-family: 'DotGothic16', sans-serif; font-size: 13px; margin-bottom: 6px; }
.cf7-wrap input[type="text"],
.cf7-wrap input[type="email"],
.cf7-wrap input[type="tel"],
.cf7-wrap select,
.cf7-wrap textarea {
  width: 100%;
  background: var(--win2);
  border: 2px solid var(--border2);
  color: var(--text);
  font-family: 'DotGothic16', sans-serif;
  font-size: 14px;
  padding: 10px 14px;
  border-radius: 4px;
  outline: none;
  transition: border-color 0.2s;
}
.cf7-wrap input:focus,
.cf7-wrap select:focus,
.cf7-wrap textarea:focus { border-color: var(--gold); }
.cf7-wrap textarea { min-height: 140px; resize: vertical; }
.cf7-wrap select { appearance: none; cursor: pointer; }
.cf7-wrap .wpcf7-submit {
  background: var(--gold);
  color: #0a0a1a;
  border: none;
  font-family: 'DotGothic16', sans-serif;
  font-size: 15px;
  font-weight: 700;
  padding: 14px 32px;
  cursor: pointer;
  border-radius: 4px;
  letter-spacing: 0.1em;
  transition: opacity 0.2s;
  width: 100%;
}
.cf7-wrap .wpcf7-submit:hover { opacity: 0.85; }
.cf7-wrap .wpcf7-submit:disabled { cursor: pointer; opacity: 0.7; }
.cf7-wrap .wpcf7-not-valid-tip { color: var(--red); font-size: 12px; margin-top: 4px; }
.cf7-wrap .wpcf7-response-output { border: 2px solid var(--border); color: var(--text); padding: 10px 14px; font-family: 'DotGothic16', sans-serif; font-size: 13px; border-radius: 4px; margin-top: 10px; }
.cf7-wrap .wpcf7-mail-sent-ok { border-color: var(--hp); color: var(--hp); }
.cf7-wrap .wpcf7-mail-sent-ng,
.cf7-wrap .wpcf7-validation-errors { border-color: var(--red); color: var(--red); }

.form-group { margin-bottom: 24px; }
.form-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 10px;
  letter-spacing: 0.05em;
}
.label-icon { font-size: 16px; }
.required {
  font-size: 11px;
  background: var(--red);
  color: white;
  padding: 2px 8px;
  margin-left: 4px;
}
.optional {
  font-size: 11px;
  background: var(--border2);
  color: var(--bg);
  padding: 2px 8px;
  margin-left: 4px;
}

.form-input, .form-textarea, .form-select {
  width: 100%;
  background: var(--win2);
  border: 2px solid var(--border2);
  color: var(--text);
  padding: 12px 16px;
  font-family: 'DotGothic16', monospace;
  font-size: 14px;
  letter-spacing: 0.03em;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  border-radius: 2px;
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--border);
  box-shadow: 0 0 12px rgba(200,168,0,0.25);
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text2); opacity: 0.6; }
.form-textarea { resize: vertical; min-height: 140px; }

.form-select-wrap { position: relative; }
.form-select { appearance: none; cursor: pointer; }
.select-arrow {
  position: absolute;
  right: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--gold2);
  font-size: 10px;
  pointer-events: none;
}

.form-privacy { display: flex; align-items: center; }
.form-check {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text2);
}
.form-check input[type="checkbox"] { display: none; }
.check-custom {
  width: 20px; height: 20px;
  border: 2px solid var(--border2);
  background: var(--win2);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.form-check input:checked + .check-custom {
  background: var(--gold);
  border-color: var(--gold);
}
.form-check input:checked + .check-custom::after { content: '✓'; font-size: 14px; color: var(--bg); font-weight: 700; }
.check-label a { color: var(--gold); }

.btn-dq-submit {
  width: 100%;
  background: var(--red);
  color: white;
  padding: 18px;
  border: 2px solid #ff8080;
  font-family: 'DotGothic16', monospace;
  font-size: 18px;
  letter-spacing: 0.15em;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 0 20px rgba(232,64,64,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
  border-radius: 2px;
  animation: pulse-red 2s ease-in-out infinite;
}
.btn-dq-submit:hover { background: #ff4444; transform: scale(1.02); box-shadow: 0 0 30px rgba(232,64,64,0.6); }
.submit-icon { font-size: 12px; }

/* インフォボックス */
.contact-info-box, .contact-msg-box { overflow: hidden; }
.info-list { padding: 20px 24px; display: flex; flex-direction: column; gap: 20px; }
.info-item { display: flex; align-items: flex-start; gap: 14px; }
.info-icon { font-size: 22px; flex-shrink: 0; margin-top: 2px; }
.info-label { font-size: 11px; color: var(--gold2); letter-spacing: 0.1em; margin-bottom: 4px; }
.info-val { font-size: 14px; color: var(--text); line-height: 1.8; letter-spacing: 0.03em; }
.info-val a { color: var(--gold); }
.info-val a:hover { color: white; }

.contact-king-msg { padding: 24px; }
.king-icon { font-size: 40px; margin-bottom: 14px; }
.contact-king-msg p { font-size: 13px; color: var(--text2); line-height: 2; letter-spacing: 0.05em; margin-bottom: 14px; }
.king-name { font-size: 12px; color: var(--gold2); letter-spacing: 0.1em; }

/* 送信完了モーダル */
.contact-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.contact-modal.show { opacity: 1; pointer-events: all; }
.modal-inner { padding: 48px 56px; text-align: center; max-width: 480px; }
.modal-icon { font-size: 56px; margin-bottom: 16px; animation: lvFlash 0.8s infinite alternate; }
.modal-title { font-size: 28px; color: var(--gold); margin-bottom: 20px; letter-spacing: 0.1em; text-shadow: 0 0 20px rgba(240,216,64,0.4); }
.modal-text { font-size: 15px; color: var(--text); line-height: 2; margin-bottom: 32px; letter-spacing: 0.05em; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .enemy-cards { grid-template-columns: repeat(2, 1fr); }
  .numbers-grid { grid-template-columns: repeat(2, 1fr); }
  .dungeon-cards { grid-template-columns: repeat(2, 1fr); }
  .party-cards { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .site-header { padding: 0 12px; }
  .header-nav, .header-cta { display: none; }
  .hamburger { display: flex; }

  .hero { padding: 100px 16px 60px; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-status { display: none; }

  .section { padding: 56px 20px; }

  .tavern-grid { grid-template-columns: 1fr; }
  .dungeon-cards { grid-template-columns: 1fr; }
  .levelup-inner { grid-template-columns: 1fr; }
  .levelup-img { display: none; }
  .party-cards { grid-template-columns: 1fr; }

  .footer-top { flex-direction: column; }
  .footer-nav { flex-wrap: wrap; gap: 24px; }

  .company-table th { width: 100px; padding: 12px 14px; }
  .company-table td { padding: 12px 14px; font-size: 13px; }

  .castle-buttons { flex-direction: column; align-items: center; }

  .contact-layout { grid-template-columns: 1fr; }
  .contact-form { padding: 20px; }
  .modal-inner { padding: 32px 24px; margin: 0 20px; }
}

@media (max-width: 480px) {
  .enemy-cards { grid-template-columns: 1fr 1fr; gap: 12px; }
  .numbers-grid { grid-template-columns: 1fr 1fr; }
}
