:root {
    --map-bg: #000;
    --area-stroke: #39ff14;
    --area-fill: rgba(0, 0, 0, 0.8);
    --area-hover: rgba(57, 255, 20, 0.3);
    --text-color: #39ff14;
    --modal-bg: #1a1a1a;
}

/* ============================= */
/* 基本レイアウト */
/* ============================= */

body {
    margin: 0;
    background-color: var(--map-bg);
    color: var(--text-color);
    font-family: 'Noto Sans JP', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
}

header {
    margin-top: 20px;
    text-align: center;
}

h1 {
    font-size: 2.5rem;
    margin: 0;
    text-transform: uppercase;
    text-shadow: 0 0 10px var(--area-stroke);
}

/* ============================= */
/* PC：完全固定サイズ */
/* ============================= */

main {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

/* ★ PCでは完全固定 */
.map-container {
    position: relative;
    width: 528px;   /* ← ご希望サイズ */
    height: 704px;  /* 3:4比率ならこれ */
    margin: 0 auto;
}


/* SVG固定 */
svg#nakano-map {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 8px var(--area-stroke));
}

/* ============================= */
/* エリアデザイン */
/* ============================= */

path.area {
    fill: var(--area-fill);
    stroke: var(--area-stroke);
    stroke-width: 2;
    cursor: pointer;
    transition: fill 0.3s ease, transform 0.2s ease;
}

path.area:hover {
    fill: var(--area-hover);
    transform: scale(1.01);
}

/* ============================= */
/* ラベル */
/* ============================= */

text.label {
    fill: var(--text-color);
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    text-anchor: middle;
    alignment-baseline: middle;
    text-shadow: 0 0 3px black;
    transition: filter 0.2s;
}

/* ===== ホラー揺れ ===== */

@keyframes horrorWiggle {
    0%   { transform: translate(0, 0) rotate(0deg) scale(1); }
    10%  { transform: translate(-2px, 1px) rotate(-2deg) scale(1.05); }
    20%  { transform: translate(2px, -2px) rotate(2deg) scale(0.95); }
    30%  { transform: translate(-3px, 2px) rotate(-3deg) scale(1.1); }
    40%  { transform: translate(3px, -1px) rotate(3deg) scale(0.9); }
    50%  { transform: translate(-2px, -2px) rotate(-2deg) scale(1.05); }
    60%  { transform: translate(2px, 2px) rotate(2deg) scale(0.95); }
    70%  { transform: translate(-1px, 3px) rotate(-1deg) scale(1.08); }
    80%  { transform: translate(1px, -3px) rotate(1deg) scale(0.92); }
    90%  { transform: translate(-2px, 1px) rotate(-2deg) scale(1.03); }
    100% { transform: translate(0, 0) rotate(0deg) scale(1); }
}

text.label.wiggle {
    animation: horrorWiggle 0.6s cubic-bezier(.36,.07,.19,.97);
    fill: #ff0000;
    filter:
        drop-shadow(0 0 8px red)
        drop-shadow(0 0 15px darkred);
}

/* ============================= */
/* タイトル装飾画像 */
/* ============================= */

.map-title-decoration {
    position: absolute;
    top: -111px;
    left: 52%;
    transform: translateX(-50%);
    width: 540px; /* PC固定 */
    z-index: 5;
    pointer-events: none;
}

/* ============================= */
/* モーダル */
/* ============================= */

.modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.85);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: var(--modal-bg);
    padding: 20px;
    border: 1px solid var(--area-stroke);
    width: 90%;
    max-width: 800px;
    border-radius: 10px;
    box-shadow: 0 0 25px rgba(57, 255, 20, 0.6);
    animation: zoomIn 0.3s forwards;
    position: relative;
    text-align: center;
}

@keyframes zoomIn {
    from {transform: scale(0.8); opacity: 0;}
    to {transform: scale(1); opacity: 1;}
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
}

/* ============================= */
/* 動画 */
/* ============================= */

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    margin-top: 20px;
}

.video-wrapper iframe,
.video-wrapper #player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ============================= */
/* SP：完全フレキシブル最適化 */
/* ============================= */

@media (max-width: 768px) {

    main {
        padding: 0 4vw;
    }

    .map-container {
        width: 100%;
        height: auto;
        aspect-ratio: 3 / 4;
        display: flex;
        justify-content: center;  /* ← 中央配置 */
        align-items: center;
    }

    svg#nakano-map {
        width: 94%;
        height: auto;
        transform: scale(0.85);   /* ← 縮小率ここで調整 */
        position: absolute;
        transform-origin: center center;  /* ← これが超重要 */
        top: -5%;
    }

    .map-title-decoration {
        width: 85%;
        top: -14vw;
    }

    text.label {
        font-size: 16px; /* 画面幅依存でバランス維持 */
    }

    h1 {
        font-size: 1.8rem;
    }
}

/* ===================== */
/* Splash Screen */
/* ===================== */

#splash {
    position: fixed;
    inset: 0;
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 1s ease;
}

#splash img {
    width: 90%;
    max-width: 600px;
}

#splash.fade-out {
    opacity: 0;
    pointer-events: none;
}
/* ============================= */
/* 右下固定 極小コピーライト */
/* ============================= */

.site-footer-fixed {
    position: fixed;
    bottom: 12px;
    right: 16px;
    font-size: 0.6rem;
    letter-spacing: 1px;
    color: rgba(57, 255, 20, 0.4);
    text-shadow: 0 0 6px rgba(57, 255, 20, 0.5);
    pointer-events: none; /* クリック邪魔しない */
    z-index: 10;
}

.seo-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  border: 0;
}
