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

:root {
    --c-dark: #2c2c2c;
    --c-gray: #7a7a7a;
    --c-light: #f0f0f0;
    --c-bg: #fafafa;
    --c-accent: #9F8A64;

    --f-title: 700 22px 'LINE Seed JP', sans-serif;
    --f-body-bold: 700 14px 'LINE Seed JP', sans-serif;
    --f-body: 400 14px 'LINE Seed JP', sans-serif;
    --f-detail: 400 12px 'LINE Seed JP', sans-serif;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    height: 100dvh;
    font-family: 'LINE Seed JP', sans-serif;
    background-color: var(--c-bg);
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
}

#map {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
}

/* ==== マップマーカー ==== */
.bakery-marker, .spot-marker {
    width: 36px;
    height: 36px;
    background-color: #f3f3f3;
    border-radius: 50%;
    background-size: 24px 24px;
    background-repeat: no-repeat;
    background-position: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    cursor: pointer;
    transition: opacity 0.3s ease, filter 0.3s ease;
}

.bakery-marker.dimmed, .spot-marker.dimmed {
    opacity: 0.3;
}

.bakery-marker.highlight, .spot-marker.highlight {
    filter: drop-shadow(0 0 6px rgba(159, 138, 100, 0.8)) brightness(1.1);
    z-index: 10;
}

.bakery-marker { background-image: url('icon-bakery.png'); }
.bakery-marker.visited-marker { background-image: url('icon-bakery-check.png'); }
.spot-marker { background-image: url('icon-spot.png'); }

.station-marker {
    background-color: var(--c-gray);
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    cursor: pointer;
}

/* ==== UI共通 ==== */
.ui-close-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--c-light);
    border: none;
    color: var(--c-dark);
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 0;
    line-height: 1;
    flex-shrink: 0;
}

#close-sheet {
    box-shadow: none;
}

/* 画面上部のボカシとヘッダー */
#top-blur-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 180px;
    z-index: 480;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100%);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100%);
    pointer-events: none;
}

#top-header {
    position: absolute;
    top: 24px;
    left: 0;
    right: 0;
    z-index: 490;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

#top-title {
    font: var(--f-body);
    color: var(--c-dark);
    margin: 0 24px;
}

#top-bakery-list {
    display: flex;
    gap: 12px;
    padding: 0 24px;
    overflow-x: auto;
    scrollbar-width: none;
    pointer-events: auto;
}

#top-bakery-list::-webkit-scrollbar {
    display: none;
}

#top-bakery-list::after {
    content: '';
    padding-right: 12px;
}

.story-bakery-btn {
    width: 48px;
    height: 48px;
    box-sizing: border-box;
    border-radius: 50%;
    border: 4px solid var(--c-bg);
    background-color: #f3f3f3;
    background-size: 24px 24px;
    background-repeat: no-repeat;
    background-position: center;
    background-image: url('icon-bakery.png');
    flex-shrink: 0;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, border-color 0.3s ease;
}

.story-bakery-btn:active {
    transform: scale(0.9);
}

.story-bakery-btn.visited {
    border-color: var(--c-accent);
}

/* 画面下部のボカシ */
#ui-blur-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 220px;
    z-index: 490;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    mask-image: linear-gradient(to top, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100%);
    -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    will-change: opacity;
}

#ui-blur-overlay.active {
    opacity: 1;
}

/* ==== 駅選択UI ==== */
#station-ui {
    position: absolute;
    bottom: 8px;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    z-index: 500;
    transform: translateY(150%);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.1, 0.8, 0.2, 1), opacity 0.4s ease;
    pointer-events: none;
}

#station-ui.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.station-ui-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: 24px;
}

.station-ui-title {
    font: var(--f-body-bold);
    color: var(--c-dark);
}

.station-ui-cards-container {
    display: flex;
    flex-direction: row;
    gap: 12px;
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 4px 24px 16px 24px;
    box-sizing: border-box;
}

.station-ui-cards-container::-webkit-scrollbar {
    display: none;
}

.station-ui-cards-container::after {
    content: '';
    padding-right: 24px;
}

.bakery-card {
    background-color: var(--c-light);
    padding: 16px;
    border-radius: 16px;
    width: fit-content;
    height: fit-content;
    display: flex;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: transform 0.2s ease;
}

.bakery-card:active {
    transform: scale(0.96);
}

.bakery-card-status {
    font: var(--f-detail);
    color: var(--c-dark);
}

.bakery-card-name {
    font: var(--f-body-bold);
    color: var(--c-dark);
    white-space: nowrap;
}

/* ==== ボトムシート ==== */
#bottom-sheet {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 100%;
    max-width: 500px;
    background-color: var(--c-bg);
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    max-height: 80%;
    transform: translate(-50%, 100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.4s cubic-bezier(0.1, 0.8, 0.2, 1), opacity 0.4s ease;
}

#bottom-sheet.active {
    transform: translate(-50%, 0);
    opacity: 1;
    pointer-events: auto;
}

.sheet-content {
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.sheet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left, .header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sheet-category {
    font: var(--f-body-bold);
    color: var(--c-dark);
}

.header-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--c-light);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    flex-shrink: 0;
}

.sheet-title {
    font: var(--f-title);
    color: var(--c-dark);
    margin: 0;
}

/* ZINE情報 */
.zine-info-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

.zine-page-badge {
    height: 40px;
    padding: 0 16px;
    border-radius: 12px;
    background-color: var(--c-accent);
    color: var(--c-bg);
    font: var(--f-body);
    display: flex;
    align-items: center;
    white-space: nowrap;
    flex-shrink: 0;
}

.zine-desc {
    font: var(--f-body);
    color: var(--c-dark);
    margin: 0;
}

.sheet-photo {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 12px;
    background-color: var(--c-light);
}

.info-panel {
    display: flex;
    gap: 12px;
}

.info-box {
    flex: 1;
    height: 40px;
    background-color: var(--c-light);
    border-radius: 12px;
    font: var(--f-body);
    color: var(--c-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.business-card {
    background-color: var(--c-light);
    border-radius: 16px;
    padding: 20px;
}

.business-card-title {
    font: var(--f-detail);
    color: var(--c-dark);
    margin-bottom: 16px;
}

.weekdays {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.day-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font: var(--f-body-bold);
    color: var(--c-gray);
}

.day-circle.active {
    background-color: var(--c-accent);
    color: var(--c-bg);
}

.time-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font: var(--f-body-bold);
    color: var(--c-dark);
}

.time-status {
    font: var(--f-detail);
    color: var(--c-dark);
}

.checkin-section {
    text-align: left;
}

.checkin-label {
    font: var(--f-detail);
    color: var(--c-dark);
    margin-bottom: 12px;
    display: block;
}

.checkin-btn {
    width: 100%;
    background-color: var(--c-dark);
    color: var(--c-bg);
    font: var(--f-body-bold);
    border: none;
    padding: 16px 0;
    border-radius: 24px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.checkin-btn.visited {
    background-color: var(--c-accent);
}