/* =====================================================
   小江戸川越ドライブ旅のしおり：整理済みCSS
   styleタグの中身を、これに丸ごと置き換え
   ===================================================== */

/* ---------- 1. 変数 ---------- */
:root {
    --accent-gold: #D99B00;
    --font-title: "Zen Kurenaido", "Zen Kaku Gothic New", sans-serif;
}

/* ---------- 2. ベース ---------- */
html {
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
}

body {
    color: #2B2625;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.85;
    letter-spacing: 0.02em;
    line-break: strict;
    word-break: auto-phrase;      /* 文節で改行 */
    text-wrap: pretty;
    -webkit-text-size-adjust: 100%;

    /* 方眼ノート風の背景 */
    background-color: #FCFAF7;
    background-image: radial-gradient(rgba(35, 59, 93, 0.09) 1px, transparent 1.2px);
    background-size: 18px 18px;
}

details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }

h1, h2, h3, h4 {
    font-feature-settings: "palt";
    letter-spacing: 0.04em;
    line-height: 1.45;
    text-wrap: balance;
}

/* ---------- 3. 文字サイズ（Tailwindより優先させるため body 付き） ---------- */
body .text-xs       { font-size: 0.84rem; line-height: 1.75; }
body .text-\[11px\] { font-size: 0.75rem; }
body .text-\[10px\] { font-size: 0.7rem; }
body .text-base     { font-size: 1.0625rem; }
body .text-lg       { font-size: 1.2rem; }
body .text-xl       { font-size: 1.4rem; }

/* ---------- 4. 見出し：手書き風フォント＋マーカー線 ---------- */
body .font-serif {
    font-family: var(--font-title);
    font-weight: 400;                          /* Zen Kurenaido は400のみ */
    -webkit-text-stroke: 0.4px currentColor;   /* 細く感じるときの補強 */
}

body h2.font-serif {
    display: inline-flex;
    font-size: 1.5rem;
    letter-spacing: 0.06em;
    padding: 0 0.3em;
    background: linear-gradient(transparent 62%, rgba(217, 155, 0, 0.28) 62%);
}

/* ---------- 5. レイアウト・余白 ---------- */
main > section ~ section { margin-top: 3rem !important; }

main > section > .flex.justify-between:first-child {
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
}

section .p-4              { padding: 1.15rem; }
.grid.grid-cols-2         { gap: 0.875rem; }
.grid.grid-cols-1         { gap: 1.25rem; }

.spot-card {
    min-height: 4.25rem;
    padding: 0.9rem;
}
.spot-card.active {
    border-color: #C04851;
    box-shadow: 0 10px 25px -5px rgba(192, 72, 81, 0.2);
    transform: translateY(-2px);
}

details > summary.cursor-pointer {
    padding: 1.1rem;
    min-height: 3.25rem;
    font-size: 0.95rem;
}

/* 下部固定ボタン：iPhoneのホームバーと被らない */
.fixed.bottom-4 { bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); }

/* ---------- 6. スケジュール ---------- */
.relative.pl-6.border-l-2 {
    border-left-style: dashed;
    border-left-color: rgba(192, 72, 81, 0.45);
}

.group.cursor-pointer              { padding: 14px 10px; }
.group.cursor-pointer h3           { margin-top: 0.6rem; }
.group.cursor-pointer p            { margin-top: 0.4rem; }
.group.cursor-pointer .rounded-full.text-xs {
    font-family: var(--font-title);
    font-size: 0.95rem;
}

/* ---------- 7. ヘッダー ---------- */
.header-fused {
    position: relative;
    width: min(calc(100% - 2rem), 26rem);   /* main(max-w-md + px-4)と揃える */
    margin: 28px auto 0;                    /* 上のテープぶんの余白 */
    padding: 24px 18px 20px;
    color: #fff;
    border-radius: 20px;
    border-bottom: 4px solid var(--accent-gold);
    box-shadow: 0 6px 18px rgba(23, 38, 61, 0.25);
    overflow: visible;                      /* テープを枠外に出す */
    transform: rotate(-0.6deg);
    background-image:
        radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1.2px),
        linear-gradient(135deg, #1A2E4A 0%, #233B5D 50%, #17263D 100%);
    background-size: 16px 16px, 100% 100%;
}

/* マスキングテープ */
.header-fused::before {
    content: "";
    position: absolute;
    top: -13px;
    left: 50%;
    width: 96px;
    height: 24px;
    transform: translateX(-50%) rotate(2deg);
    background: repeating-linear-gradient(
        45deg,
        rgba(217, 155, 0, 0.8) 0 8px,
        rgba(255, 236, 190, 0.9) 8px 16px
    );
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    z-index: 5;
}

/* ステッチ風の枠 */
.noren-frame {
    position: relative;
    padding: 14px 10px;
    text-align: center;
    border: 2px dashed rgba(255, 213, 128, 0.55);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(4px);
}

.noren-crest {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 2px;
    font-size: 1.6rem;
    color: #FFD580;
}

.noren-title {
    display: inline-block;
    padding: 0 0.3em;
    font-family: var(--font-title);
    font-size: 2.1rem;
    font-weight: 400;
    letter-spacing: 0.12em;
    color: #FFF;
    background: linear-gradient(transparent 64%, rgba(217, 155, 0, 0.45) 64%);
    -webkit-text-stroke: 0.4px currentColor;
}

/* ドライブ路 */
.drive-road-container {
    position: relative;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px dashed rgba(255, 255, 255, 0.2);
}

.drive-road-track {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
}

.drive-road-line {
    position: absolute;
    top: 50%;
    left: 15%;
    right: 15%;
    border-top: 3px dashed rgba(255, 213, 128, 0.7);
    z-index: 1;
}

/* 池袋・川越：付箋風 */
.drive-spot-badge {
    z-index: 20;
    padding: 4px 12px;
    font-family: var(--font-title);
    font-size: 0.95rem;
    font-weight: 400;
    color: #233B5D;
    background: #FFF6DC;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}
.drive-spot-badge:first-of-type { transform: rotate(-3deg); }
.drive-spot-badge:last-of-type  { transform: rotate(2.5deg); }

/* クルマ（動きは前のまま：往復＋軽くバウンド） */
.drive-car-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    font-size: 1.6rem;
    color: #FF6B6B;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
    animation: driveCar 4s ease-in-out infinite alternate;
}

@keyframes driveCar {
    0%   { left: 22%; }
    100% { left: 68%; }
}

@keyframes carBounce {
    0%, 100% { margin-top: 0; }
    50%      { margin-top: -3px; }
}

/* マップ案内パネル */
.noren-map {
    margin-top: 14px;
    padding: 12px;
    text-align: left;
    border: 1.5px dashed rgba(255, 255, 255, 0.35);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
}

.noren-map-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.72rem;
    color: #E2D5C3;
}

.noren-map-official {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 700;
    color: #FFD580;
}

.noren-map-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 14px;
    font-family: var(--font-title);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #fff;
    background: #C04851;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    transition: background .2s, transform .1s;
}
.noren-map-btn:hover  { background: #A73840; }
.noren-map-btn:active { transform: scale(0.98); }

/* ---------- 8. スクラップ風の装飾 ---------- */

/* 食べ歩きカードを少し傾ける */
.grid.grid-cols-1 > div:nth-child(odd)  { transform: rotate(-0.7deg); }
.grid.grid-cols-1 > div:nth-child(even) { transform: rotate(0.7deg); }

/* 写真の上のマスキングテープ */
.h-40.relative::after,
#spotDetailViewer::before {
    content: "";
    position: absolute;
    left: 50%;
    width: 84px;
    height: 22px;
    transform: translateX(-50%) rotate(-3deg);
    background: repeating-linear-gradient(
        45deg,
        rgba(217, 155, 0, 0.55) 0 8px,
        rgba(255, 236, 190, 0.7) 8px 16px
    );
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    z-index: 5;
}
.h-40.relative::after        { top: 0; }
#spotDetailViewer            { position: relative; }
#spotDetailViewer::before    { top: -12px; }

/* 「絶対行くとこ！」スタンプ */
.h-40.relative > span {
    top: 0.9rem;
    left: 0.7rem;
    transform: rotate(-6deg);
    font-family: var(--font-title);
    font-size: 0.9rem;
    letter-spacing: 0.08em;
    border: 2px dashed rgba(255, 255, 255, 0.85);
    border-radius: 8px;
}

/* ---------- 9. モーダル ---------- */
.modal-enter { animation: modalIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards; }

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

/* ---------- 10. 動きを減らす設定 ---------- */
@media (prefers-reduced-motion: reduce) {
    .drive-car-icon { animation: none; left: 45%; }
    .grid.grid-cols-1 > div { transform: none !important; }
}