@charset "UTF-8";

/* =========================================
   WanderLens — 写真 × 地図の旅ジャーナル
   サイト共通トークン (--jh-*) の上に構築
   ========================================= */

.wl-page { padding-top: 48px; text-align: left; }
.wl-container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.wl-btn { padding: 10px 20px; font-size: 15px; }
.wl-muted { color: var(--jh-text-muted); font-size: 13px; }
.wl-required { color: var(--jh-red); }
.wl-error { color: var(--jh-red); font-size: 13px; margin: 8px 0 0; }

.wl-back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 32px 0 12px;
    color: var(--jh-accent);
    font-size: 15px;
    text-decoration: none;
}
.wl-back .material-symbols-outlined { font-size: 18px; }

/* ── 統計 ───────────────────────────────── */
.wl-stats { display: flex; gap: 28px; margin: 0; }
.wl-stats dt { order: 2; font-size: 13px; font-weight: 400; color: var(--jh-text-muted); }
.wl-stats dd { order: 1; margin: 0; font-size: 28px; font-weight: 600; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.wl-stats > div { display: flex; flex-direction: column; }
.wl-stats--large dd { font-size: 40px; }

/* =========================================
   地図
   ========================================= */
.wl-map { width: 100%; height: 100%; background: #111; }
.mapboxgl-map { font-family: var(--jh-font-text); }
.wl-hero { position: relative; height: min(78vh, 780px); min-height: 520px; }
.wl-map--hero { position: absolute; inset: 0; }
.wl-map-frame {
    position: relative;
    height: min(72vh, 760px);
    min-height: 460px;
    max-width: 1400px;
    margin: 0 auto;
    border-radius: 28px;
    overflow: hidden;
}
.wl-page--user .wl-view[data-view="map"] { padding: 0 20px; }

/* 見出しカード (地図に重ねるガラス) */
.wl-hero-card {
    position: absolute;
    z-index: 500;
    top: 24px;
    left: max(20px, calc((100vw - 1200px) / 2 + 20px));
    width: min(380px, calc(100vw - 40px));
    padding: 28px;
    border-radius: 28px;
    background: rgba(var(--jh-glass-rgb), 0.72);
    backdrop-filter: saturate(180%) blur(24px);
    -webkit-backdrop-filter: saturate(180%) blur(24px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}
.wl-hero-title { font-size: 40px; font-weight: 700; letter-spacing: -0.02em; margin: 0; }
.wl-hero-lead { color: var(--jh-text-muted); font-size: 17px; margin: 4px 0 20px; }
.wl-hero-card .wl-stats { margin-bottom: 22px; }

/* 検索とコントロール (地図に重ねる) */
.wl-map-search {
    position: absolute;
    z-index: 500;
    top: 24px;
    right: max(20px, calc((100vw - 1200px) / 2 + 20px));
    width: min(320px, calc(100vw - 40px));
    display: flex;
    align-items: center;
    gap: 8px;
    height: 44px;
    padding: 0 14px;
    border-radius: 980px;
    background: rgba(var(--jh-glass-rgb), 0.8);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}
.wl-map-frame .wl-map-search { top: 16px; right: 16px; }
.wl-map-search input { flex: 1; min-width: 0; border: none; outline: none; background: none; color: var(--jh-text); font-size: 15px; }
.wl-map-search .material-symbols-outlined { color: var(--jh-text-muted); font-size: 20px; }
.wl-map-controls {
    position: absolute;
    z-index: 500;
    right: max(20px, calc((100vw - 1200px) / 2 + 20px));
    bottom: 150px; /* 右下のズームボタンと帰属表示の上に置く */
    display: flex;
    flex-direction: column;
    border-radius: 14px;
    overflow: hidden;
    background: rgba(var(--jh-glass-rgb), 0.8);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}
.wl-map-frame .wl-map-controls { right: 16px; bottom: 140px; }
.wl-ctl {
    width: 44px;
    height: 44px;
    border: none;
    background: none;
    color: var(--jh-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.wl-ctl + .wl-ctl { border-top: 1px solid rgba(var(--jh-fg-rgb), 0.1); }
.wl-ctl:hover { background: rgba(var(--jh-fg-rgb), 0.08); }
.wl-ctl[aria-pressed="true"] { color: var(--jh-accent); }
.wl-ctl .material-symbols-outlined { font-size: 22px; }

/* 候補リスト (場所検索) */
.wl-suggest {
    position: absolute;
    z-index: 600;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    list-style: none;
    margin: 0;
    padding: 6px;
    border-radius: 14px;
    background: var(--jh-card-bg);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
    max-height: 320px;
    overflow-y: auto;
}
.wl-suggest li { display: flex; flex-direction: column; padding: 8px 10px; border-radius: 10px; cursor: pointer; }
.wl-suggest li:hover { background: rgba(var(--jh-fg-rgb), 0.08); }
.wl-suggest li strong { font-size: 14px; font-weight: 600; }
.wl-suggest li small { font-size: 12px; color: var(--jh-text-muted); }
.wl-suggest li.is-empty { color: var(--jh-text-muted); cursor: default; }

/* Mapbox のズームボタン・帰属表示をダークに */
.mapboxgl-ctrl-group { border-radius: 14px !important; overflow: hidden; background: rgba(var(--jh-glass-rgb), 0.85) !important; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4) !important; }
.mapboxgl-ctrl-group button { width: 44px !important; height: 44px !important; }
.mapboxgl-ctrl-group button + button { border-top-color: rgba(255, 255, 255, 0.1) !important; }
.mapboxgl-ctrl-group button:hover { background: var(--jh-card-bg-2) !important; }
.mapboxgl-ctrl-group .mapboxgl-ctrl-icon { filter: invert(1); }
.mapboxgl-ctrl-attrib.mapboxgl-compact, .mapboxgl-ctrl-attrib { background: rgba(0, 0, 0, 0.55) !important; color: #86868b; font-size: 10px; }
.mapboxgl-ctrl-attrib a { color: #a1a1a6 !important; }
.mapboxgl-ctrl-attrib-button { filter: invert(1); }
.wl-hero .mapboxgl-ctrl-bottom-right { right: max(0px, calc((100vw - 1200px) / 2)); }
/* ズームボタンを上の操作ボタン (.wl-map-controls) と縦にそろえる */
.wl-hero .mapboxgl-ctrl-bottom-right .mapboxgl-ctrl { margin-right: 20px; }
.wl-map-frame .mapboxgl-ctrl-bottom-right .mapboxgl-ctrl { margin-right: 16px; }
.wl-map-notice {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    max-width: min(90%, 360px);
    margin: 0;
    padding: 12px 16px;
    border-radius: 14px;
    background: rgba(var(--jh-glass-rgb), 0.9);
    color: var(--jh-text-muted);
    font-size: 14px;
    text-align: center;
    transform: translate(-50%, -50%);
}

/* ── 写真マーカー (写真アプリの「場所」風) ── */
.wl-marker-wrap { padding-bottom: 8px; cursor: pointer; outline: none; } /* 下の余白 = しっぽの長さ。anchor: bottom でしっぽの先を座標に合わせる */
.wl-marker-wrap:focus-visible .wl-marker { box-shadow: 0 0 0 3px var(--jh-accent), 0 6px 18px rgba(0, 0, 0, 0.45); }
.wl-marker-wrap--edit { padding-bottom: 6px; cursor: grab; }
.wl-marker {
    position: relative;
    width: 52px;
    height: 52px;
    box-sizing: border-box; /* 見た目のサイズを 52px に固定し、しっぽを座標の真上に置く */
    border-radius: 14px;
    padding: 3px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
    transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.wl-marker::after {
    /* 吹き出しのしっぽ */
    content: "";
    position: absolute;
    left: 50%;
    bottom: -7px;
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 0 0 3px 0;
    transform: translateX(-50%) rotate(45deg);
    z-index: -1;
}
.wl-marker img { width: 100%; height: 100%; object-fit: cover; border-radius: 11px; display: block; }
.wl-marker-wrap:hover .wl-marker { transform: scale(1.08); }
.wl-marker--dot { display: flex; align-items: center; justify-content: center; background: var(--jh-accent); }
.wl-marker--dot::after { background: var(--jh-accent); }
.wl-marker--dot .material-symbols-outlined { color: #fff; font-size: 26px; }
.wl-marker--cluster { width: 60px; height: 60px; border-radius: 16px; }
.wl-marker--cluster img { border-radius: 13px; }
.wl-marker--cluster > .material-symbols-outlined { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; border-radius: 13px; background: var(--jh-card-bg-2); color: #fff; }
.wl-marker-count {
    position: absolute;
    top: -8px;
    right: -8px;
    min-width: 24px;
    height: 24px;
    padding: 0 7px;
    border-radius: 12px;
    background: var(--jh-button);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    line-height: 24px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}
.wl-marker--edit { width: 40px; height: 40px; border-radius: 50%; }
.wl-marker--edit::after { bottom: -5px; width: 10px; height: 10px; }

/* =========================================
   一覧 (最近の旅 / タイムライン / 旅人)
   ========================================= */
.wl-section { padding: 56px 0 8px; }
.wl-section-title { font-size: clamp(28px, 3.4vw, 40px); font-weight: 600; letter-spacing: -0.01em; margin: 0 0 24px; }
.wl-rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(260px, 300px);
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 8px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}
.wl-rail::-webkit-scrollbar { display: none; }
.wl-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 0;
    border: none;
    border-radius: 24px;
    overflow: hidden;
    background: var(--jh-card-bg);
    color: var(--jh-text);
    text-align: left;
    cursor: pointer;
    scroll-snap-align: start;
    transition: background-color 0.25s ease;
}
.wl-card:hover { background: var(--jh-card-hover); }
.wl-card-media { aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; background: var(--jh-card-bg-2); overflow: hidden; }
.wl-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
.wl-card:hover .wl-card-media img { transform: scale(1.04); }
.wl-card-media .material-symbols-outlined { font-size: 36px; color: var(--jh-text-muted); }
.wl-card-body { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px 20px; }
.wl-card-body strong { font-size: 17px; font-weight: 600; line-height: 1.3; }
.wl-card-body small { font-size: 13px; color: var(--jh-text-muted); }
.wl-card-owner { color: var(--jh-accent) !important; }

.wl-travelers { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.wl-traveler {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    border-radius: 24px;
    overflow: hidden;
    background: var(--jh-card-bg);
    color: #fff;
    text-decoration: none;
}
.wl-traveler:hover { color: #fff; }
.wl-traveler-cover { position: absolute; inset: 0; background-size: cover; background-position: center; transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
.wl-traveler:hover .wl-traveler-cover { transform: scale(1.04); }
.wl-traveler::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, 0.75) 100%); }
.wl-traveler-body { position: absolute; z-index: 1; left: 18px; right: 18px; bottom: 16px; display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center; }
.wl-traveler-body .wl-avatar { grid-row: span 2; }
.wl-traveler-body strong { font-size: 17px; font-weight: 600; }
.wl-traveler-body small { font-size: 13px; color: rgba(255, 255, 255, 0.8); }
.wl-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #636366;
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    flex-shrink: 0;
}
.wl-avatar--sm { width: 30px; height: 30px; font-size: 13px; }

.wl-empty {
    padding: 48px 24px;
    border-radius: 28px;
    background: var(--jh-card-bg);
    text-align: center;
    color: var(--jh-text-muted);
    font-size: 17px;
    margin: 24px 0;
}
.wl-empty p { margin: 0 0 16px; }
.wl-empty p:last-child { margin-bottom: 0; }

/* ── ユーザーページ ─────────────────────────── */
.wl-user-header { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 24px; margin-bottom: 28px; }
.wl-user-title { font-size: clamp(36px, 5vw, 56px); font-weight: 700; letter-spacing: -0.015em; margin: 0 0 16px; }
.wl-user-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.wl-toolbar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.wl-views span { min-width: 88px; text-align: center; }
.wl-hint { margin: 0; font-size: 13px; color: var(--jh-text-muted); }
.wl-view[hidden] { display: none; }

.wl-timeline { padding: 8px 0 40px; }
.wl-tl-group { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 24px; padding: 28px 0; }
.wl-tl-group + .wl-tl-group { border-top: 1px solid var(--jh-line); }
.wl-tl-month { font-size: 21px; font-weight: 600; margin: 0; position: sticky; top: 72px; align-self: start; }
.wl-tl-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }

.wl-photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 4px; padding: 8px 0 40px; }
.wl-photo { aspect-ratio: 1; padding: 0; border: none; background: var(--jh-card-bg); overflow: hidden; cursor: zoom-in; }
.wl-photo:first-child { border-top-left-radius: 20px; }
.wl-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.2s; }
.wl-photo:hover img { transform: scale(1.04); }

/* =========================================
   詳細シート
   ========================================= */
.wl-sheet, .wl-editor {
    padding: 0;
    border: none;
    background: var(--jh-card-bg);
    color: var(--jh-text);
    border-radius: 28px;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.7);
}
.wl-sheet::backdrop, .wl-editor::backdrop { background: rgba(0, 0, 0, 0.65); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.wl-sheet { width: min(1080px, calc(100vw - 32px)); max-height: calc(100vh - 48px); }
/* showModal() でスクロール領域に自動でフォーカスが当たり、画面の縁に枠線が出るのを防ぐ */
.wl-sheet:focus-visible, .wl-sheet-inner:focus-visible { outline: none; }
.wl-sheet[open] { animation: wl-pop 0.35s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes wl-pop { from { opacity: 0; transform: translateY(16px) scale(0.98); } to { opacity: 1; transform: none; } }
.wl-sheet-inner { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); max-height: calc(100vh - 48px); }

.wl-gallery { position: relative; background: var(--jh-bg); min-height: 360px; overflow: hidden; }
.wl-gallery-track {
    display: flex;
    height: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}
.wl-gallery-track::-webkit-scrollbar { display: none; }
.wl-slide { position: relative; flex: 0 0 100%; margin: 0; overflow: hidden; scroll-snap-align: center; display: flex; align-items: center; justify-content: center; }
.wl-slide-img { position: relative; width: 100%; height: 100%; max-height: calc(100vh - 48px); object-fit: contain; }
/* 枠と縦横比が違う写真の左右・上下の余白を、同じ写真のぼかしで埋め、
   写真の縁から枠の端へ向かってなめらかに黒へ溶かす (--edge = 写真の外側の幅, JS で計測) */
.wl-slide-bg {
    --fade: linear-gradient(var(--fade-dir, to right),
        transparent 0,
        rgba(0, 0, 0, 0.12) calc(var(--edge, 0%) * 0.3),
        rgba(0, 0, 0, 0.45) calc(var(--edge, 0%) * 0.6),
        rgba(0, 0, 0, 0.85) calc(var(--edge, 0%) * 0.88),
        #000 var(--edge, 0%),
        #000 calc(100% - var(--edge, 0%)),
        rgba(0, 0, 0, 0.85) calc(100% - var(--edge, 0%) * 0.88),
        rgba(0, 0, 0, 0.45) calc(100% - var(--edge, 0%) * 0.6),
        rgba(0, 0, 0, 0.12) calc(100% - var(--edge, 0%) * 0.3),
        transparent 100%);
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(32px) saturate(1.3) brightness(0.7);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.wl-slide[data-fit] .wl-slide-bg { opacity: 1; -webkit-mask-image: var(--fade); mask-image: var(--fade); }
.wl-slide[data-fit="wide"] .wl-slide-bg { --fade-dir: to bottom; }
.wl-slide--empty { flex-direction: column; gap: 8px; color: var(--jh-text-muted); }
.wl-slide--empty .material-symbols-outlined { font-size: 48px; }
.wl-gallery-nav {
    position: absolute;
    top: 50%;
    width: 40px;
    height: 40px;
    margin-top: -20px;
    border: none;
    border-radius: 50%;
    background: rgba(var(--jh-glass-rgb), 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.wl-gallery:hover .wl-gallery-nav, .wl-gallery-nav:focus-visible { opacity: 1; }
.wl-gallery-nav--prev { left: 14px; }
.wl-gallery-nav--next { right: 14px; }
.wl-gallery.is-single .wl-gallery-nav, .wl-gallery.is-single .wl-gallery-dots { display: none; }
.wl-gallery-dots { position: absolute; left: 0; right: 0; bottom: 14px; display: flex; justify-content: center; gap: 6px; }
.wl-dot { width: 7px; height: 7px; padding: 0; border: none; border-radius: 50%; background: rgba(255, 255, 255, 0.45); cursor: pointer; }
.wl-dot.is-active { background: #fff; }

.wl-sheet-body { display: flex; flex-direction: column; gap: 16px; padding: 28px; overflow-y: auto; }
.wl-sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.wl-sheet-head form { margin: 0; }
.wl-sheet-meta { margin: 0 0 4px; font-size: 14px; color: var(--jh-text-muted); }
.wl-sheet-title { margin: 0; font-size: 28px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; }
.wl-sheet-desc { margin: 0; font-size: 17px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.wl-sheet-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; }
.wl-sheet-actions .jh-link[hidden] { display: none; }
.wl-inline-form { margin: 0; }
.wl-icon-btn {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border: none;
    border-radius: 50%;
    background: var(--jh-card-bg-2);
    color: var(--jh-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.wl-icon-btn:hover { background: var(--jh-card-bg-3); }
.wl-text-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0;
    border: none;
    background: none;
    color: var(--jh-accent);
    font-size: 15px;
    cursor: pointer;
}
.wl-text-btn:hover { text-decoration: underline; }
.wl-text-btn:disabled { color: var(--jh-text-muted); opacity: 0.5; cursor: default; text-decoration: none; }
.wl-text-btn--danger { color: var(--jh-red); }
.wl-text-btn .material-symbols-outlined { font-size: 18px; }

.wl-comments { padding-top: 16px; border-top: 1px solid var(--jh-line); }
.wl-comments h3 { font-size: 17px; font-weight: 600; margin: 0 0 12px; }
.wl-comment-list { display: flex; flex-direction: column; gap: 14px; margin-bottom: 14px; }
.wl-comment { display: flex; gap: 10px; }
.wl-comment > div { flex: 1; min-width: 0; }
.wl-comment-head { display: flex; gap: 8px; align-items: baseline; margin: 0; font-size: 14px; }
.wl-comment-head span { font-size: 12px; color: var(--jh-text-muted); }
.wl-comment-report { margin-left: auto; font-size: 12px; color: var(--jh-text-muted); text-decoration: none; }
.wl-comment-report:hover { color: var(--jh-text); text-decoration: underline; }
.wl-comment-text { margin: 2px 0 0; font-size: 15px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.wl-comment-form { display: flex; gap: 8px; }
.wl-comment-form .jh-input { padding: 10px 14px; font-size: 15px; }
.wl-comment-form .jh-btn { flex-shrink: 0; white-space: nowrap; }
.wl-sheet-pager .wl-text-btn { white-space: nowrap; }
.wl-sheet-pager { display: flex; justify-content: space-between; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--jh-line); }

/* =========================================
   追加・編集ダイアログ
   ========================================= */
.wl-editor { width: min(960px, calc(100vw - 32px)); max-height: calc(100vh - 32px); }
.wl-editor form { display: flex; flex-direction: column; max-height: calc(100vh - 32px); }
.wl-editor-head, .wl-editor-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 28px; }
.wl-editor-foot { justify-content: flex-end; border-top: 1px solid rgba(var(--jh-fg-rgb), 0.08); }
.wl-editor-title { font-size: 21px; font-weight: 600; margin: 0; }
.wl-editor-body { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; padding: 0 28px 24px; overflow-y: auto; }
.wl-editor-col { display: flex; flex-direction: column; min-width: 0; }
.wl-editor-col .jh-label { margin: 16px 0 8px; }
.wl-editor-col .jh-label:first-child { margin-top: 0; }
.wl-editor-col .jh-input { padding: 12px 14px; font-size: 15px; }
.wl-drop {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 22px;
    border-radius: 16px;
    border: 1.5px dashed rgba(var(--jh-fg-rgb), 0.2);
    color: var(--jh-text-muted);
    font-size: 14px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}
.wl-drop:hover, .wl-drop.is-over, .wl-drop:focus-visible { outline: none; border-color: var(--jh-accent); background: rgba(var(--jh-accent-rgb), 0.08); }
.wl-drop .material-symbols-outlined { font-size: 30px; color: var(--jh-accent); }
.wl-drop small { font-size: 12px; }
.wl-thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 10px; }
.wl-thumbs:empty { display: none; }
.wl-thumb { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--jh-card-bg-2); }
.wl-thumb img { width: 100%; height: 100%; object-fit: cover; }
.wl-thumb.is-removed img { opacity: 0.25; }
.wl-thumb-x {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
}
.wl-thumb-x .material-symbols-outlined { font-size: 16px; }
.wl-thumb-cover {
    position: absolute;
    left: 4px;
    bottom: 4px;
    padding: 1px 6px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
}
.wl-badge { display: inline-flex; align-items: center; gap: 6px; margin: 10px 0 0; font-size: 13px; color: var(--jh-green); }
.wl-badge .material-symbols-outlined { font-size: 16px; }
.wl-badge[hidden] { display: none; }
.wl-exif-use {
    display: inline-flex;
    align-self: flex-start;
    width: fit-content;
    align-items: center;
    gap: 6px;
    margin: 10px 0 0;
    padding: 6px 12px;
    border: 1px solid var(--jh-green);
    border-radius: 999px;
    background: transparent;
    color: var(--jh-green);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
}
.wl-exif-use .material-symbols-outlined { font-size: 16px; }
.wl-exif-use[hidden] { display: none; }
/* ブラウザが表示できない写真 (Safari 以外の HEIC など) のサムネイル */
.wl-thumb-ph { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; color: var(--jh-text-muted); }
.wl-place { position: relative; }
.wl-editor-map { height: 320px; margin-top: 12px; border-radius: 16px; overflow: hidden; background: var(--jh-card-bg-2); }
.wl-coords { margin: 8px 0 0; font-variant-numeric: tabular-nums; }

/* トースト */
.wl-toast {
    position: fixed;
    z-index: 20000;
    left: 50%;
    bottom: 32px;
    transform: translateX(-50%);
    padding: 12px 20px;
    border-radius: 980px;
    background: rgba(var(--jh-glass-rgb), 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: var(--jh-text);
    font-size: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: wl-pop 0.25s ease;
    transition: opacity 0.3s ease;
}
.wl-toast.is-out { opacity: 0; }

/* =========================================
   Responsive
   ========================================= */
@media (max-width: 833px) {
    /* 1 列のグリッドだと高さ制限の中で写真の行が潰れ、本文が写真の上に重なっていたので、
       写真 → 本文を縦に積んでシート全体をスクロールさせる */
    .wl-sheet-inner { display: block; overflow-y: auto; overscroll-behavior: contain; }
    .wl-gallery { min-height: 0; height: min(58vh, 125vw); }
    .wl-slide-img { max-height: none; }
    .wl-sheet-body { overflow: visible; }
    .wl-editor-body { grid-template-columns: 1fr; }
    .wl-tl-group { grid-template-columns: 1fr; gap: 12px; }
    .wl-tl-month { position: static; }
}
@media (max-width: 640px) {
    .wl-hero { height: auto; min-height: 0; display: flex; flex-direction: column; }
    .wl-map--hero { position: relative; height: 62vh; }
    .wl-hero-card { position: relative; top: 0; left: 0; width: auto; margin: 12px 12px 0; }
    .wl-map-search { top: 12px; right: 12px; left: 12px; width: auto; }
    /* 16px 未満の入力欄は iOS がフォーカス時に画面を拡大してしまう */
    .wl-map-search input,
    .wl-comment-form .jh-input,
    .wl-editor-col .jh-input { font-size: 16px; }
    /* 検索欄のすぐ下に置き、右下のズームボタンと重ならないようにする */
    .wl-map-controls,
    .wl-map-frame .wl-map-controls { right: 12px; bottom: auto; top: 68px; }
    .wl-map-frame { border-radius: 20px; height: 64vh; min-height: 380px; }
    .wl-page--user .wl-view[data-view="map"] { padding: 0 12px; }
    .wl-stats { gap: 20px; }
    .wl-stats--large dd { font-size: 30px; }
    .wl-photo-grid { grid-template-columns: repeat(3, 1fr); gap: 2px; }
    .wl-sheet, .wl-editor { width: 100vw; max-width: 100vw; max-height: 100dvh; height: 100dvh; border-radius: 0; margin: 0; }
    .wl-sheet-inner, .wl-editor form { max-height: 100dvh; }
    .wl-sheet-inner { height: 100%; }
    .wl-gallery { height: min(56dvh, 125vw); }
    .wl-gallery-dots { bottom: 10px; }
    .wl-sheet-body { gap: 14px; padding: 20px 20px 0; }
    .wl-sheet-title { font-size: 24px; }
    .wl-sheet-desc { font-size: 16px; }
    /* 閉じるボタンは常に押せるよう、写真の上に浮かせる */
    .wl-sheet-head { padding-right: 44px; }
    .wl-sheet-head form { position: fixed; z-index: 10; top: calc(12px + env(safe-area-inset-top)); right: 12px; }
    .wl-sheet-head .wl-icon-btn {
        width: 40px;
        height: 40px;
        background: rgba(var(--jh-glass-rgb), 0.72);
        backdrop-filter: saturate(180%) blur(20px);
        -webkit-backdrop-filter: saturate(180%) blur(20px);
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    }
    /* コメント入力欄は画面下に固定し、コメントを読みながら書けるようにする */
    .wl-comment-form {
        position: sticky;
        z-index: 5;
        bottom: 0;
        margin: 0 -20px;
        padding: 10px 20px calc(10px + env(safe-area-inset-bottom));
        background: rgba(var(--jh-glass-rgb), 0.9);
        backdrop-filter: saturate(180%) blur(20px);
        -webkit-backdrop-filter: saturate(180%) blur(20px);
        border-top: 1px solid rgba(var(--jh-fg-rgb), 0.08);
    }
    .wl-comment-list { margin-bottom: 4px; }
    .wl-sheet-pager { padding: 12px 0 calc(16px + env(safe-area-inset-bottom)); }
    .wl-editor-head, .wl-editor-foot { padding: 16px 20px; }
    .wl-editor-body { padding: 0 20px 20px; }
}
