:root {
  color-scheme: light;
  --ink: #1c3029;
  --muted: #78877f;
  --green: #267455;
  --green-dark: #1c6045;
  --green-soft: #e9f4ed;
  --line: #e8eee9;
  --paper: #fff;
  --bg: #f5f8f4;
  font-family: "DM Sans", "Noto Sans JP", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); }
[hidden] { display: none !important; }
.account-label { font-size: 11px; color: var(--green); }
.login-page { display: grid; min-height: 100dvh; place-items: center; padding: 20px; }
.login-card { width: min(420px, 100%); margin: 0; border: 1px solid var(--line); border-radius: 14px; padding: 30px; background: white; }
.login-card h1 { font-size: 24px; }
.login-card p { font-size: 12px; line-height: 1.7; color: var(--muted); }
.login-card form, .login-card label { display: grid; gap: 10px; }
.login-card label { font-size: 12px; margin-bottom: 10px; }
.login-card input { width: 100%; padding: 10px; border-radius: 6px; border: 1px solid var(--line); }
#login-error { color: #b84949; }
.lookup-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.lookup-actions button { padding: 8px; border-radius: 6px; cursor: pointer; font-size: 11px; }
#lookup-result { white-space: pre-wrap; overflow-wrap: anywhere; }
button:disabled { opacity: .6; cursor: wait; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
.app-shell { min-height: 100vh; }
.topbar {
  height: 76px; padding: 0 max(32px, calc((100vw - 1180px) / 2));
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(255,255,255,.92); border-bottom: 1px solid #edf1ed;
}
.brand { display: inline-flex; gap: 11px; align-items: center; color: inherit; text-decoration: none; }
.brand-mark { width: 39px; height: 39px; display: grid; place-items: center; color: var(--green); }
.brand-mark svg { width: 39px; }
.brand-copy { display: grid; gap: 1px; }
.brand-name { font-size: 14px; font-weight: 800; letter-spacing: .13em; line-height: 1.1; }
.brand-caption { font-size: 10px; color: #839087; letter-spacing: .02em; }
.topbar-right { display: flex; gap: 17px; align-items: center; }
.demo-pill { background: #f0f6f1; color: var(--green); border-radius: 20px; padding: 6px 10px; font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.demo-pill span, .eyebrow-dot { display: inline-block; width: 6px; height: 6px; background: #58a77e; border-radius: 50%; margin: 0 5px 1px 0; }
.icon-button { width: 34px; height: 34px; border: 0; background: transparent; display: grid; place-items: center; cursor: pointer; }
.icon-button svg { width: 19px; fill: none; stroke: #809087; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
main { max-width: 1180px; margin: 0 auto; padding: 45px 26px 26px; }
.intro { min-height: 174px; position: relative; display: flex; align-items: center; margin-bottom: 25px; overflow: hidden; }
.intro-copy { position: relative; z-index: 1; }
.eyebrow, .section-label { color: #91a097; font-size: 9px; letter-spacing: .16em; font-weight: 700; }
.eyebrow { margin-bottom: 12px; }
.intro h1 { margin: 0; font-size: clamp(28px, 3.4vw, 39px); line-height: 1.48; letter-spacing: -.045em; font-weight: 800; }
.intro h1 span { color: var(--green); }
.intro p { margin: 9px 0 0; color: #7d8a82; font-size: 12px; }
.intro-art { width: 245px; height: 180px; position: absolute; right: 18px; top: -4px; }
.art-orbit { position: absolute; border: 1px solid #e0ece2; border-radius: 50%; transform: rotate(-25deg); }
.orbit-one { width: 200px; height: 100px; right: 4px; top: 34px; }
.orbit-two { width: 160px; height: 80px; right: 26px; top: 44px; border-color: #e8f0e8; }
.art-pin { width: 63px; height: 63px; position: absolute; top: 47px; right: 84px; color: var(--green); filter: drop-shadow(0 8px 10px rgba(38,116,85,.16)); }
.art-pin svg { width: 100%; }
.art-spark { position: absolute; color: #9ac6a6; }
.spark-a { top: 21px; right: 44px; font-size: 17px; }
.spark-b { top: 117px; right: 180px; font-size: 13px; }
.search-panel { min-height: 68px; display: flex; align-items: center; padding: 0 20px; gap: 21px; border: 1px solid #e5ece6; border-radius: 11px; background: var(--paper); box-shadow: 0 4px 14px rgba(32,63,43,.025); }
.search-field { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 120px; }
.search-field svg, .area-selector svg, .sort-button svg, .map-title-icon svg, .open-map-link svg, .list-footnote svg, .data-icon svg, .data-actions svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.search-field svg { color: #95a39a; flex: none; }
.search-field input { width: 100%; border: 0; outline: 0; color: var(--ink); font-size: 12px; background: transparent; }
.search-field input::placeholder { color: #aab4ad; }
kbd { color: #9aa69e; border: 1px solid #e9eeea; border-radius: 4px; padding: 2px 7px; font-size: 10px; background: #fafcfb; }
.search-divider { width: 1px; height: 28px; background: #edf1ee; }
.area-selector { display: flex; align-items: center; gap: 9px; border: 0; background: transparent; font-size: 11px; cursor: pointer; white-space: nowrap; }
.area-selector > svg:first-child { color: var(--green); width: 17px; }
.area-selector .chevron { width: 14px; color: #9aa69e; }
.search-hint { color: #a6b0a9; font-size: 9px; border-left: 1px solid #edf1ee; padding-left: 16px; white-space: nowrap; }
.content-grid { display: grid; grid-template-columns: minmax(340px, .88fr) minmax(460px, 1.12fr); gap: 20px; margin-top: 29px; align-items: start; }
.results-column { min-width: 0; }
.section-heading { display: flex; justify-content: space-between; align-items: end; margin: 2px 1px 14px; }
.section-heading h2, .map-title h2 { margin: 5px 0 0; font-size: 17px; letter-spacing: -.03em; }
.count-badge { display: inline-grid; place-items: center; width: 21px; height: 21px; background: #eaf3ed; color: var(--green); border-radius: 50%; font-size: 10px; font-weight: 700; vertical-align: 2px; margin-left: 5px; }
.sort-button { border: 0; background: transparent; color: #829087; display: flex; align-items: center; gap: 5px; font-size: 10px; cursor: pointer; padding: 6px 0; }
.sort-button svg { width: 16px; }
.store-list { display: grid; gap: 10px; }
.store-card { width: 100%; min-width: 0; display: flex; text-align: left; align-items: center; gap: 12px; padding: 15px 14px; border: 1px solid #e8eee9; border-radius: 10px; background: white; cursor: pointer; transition: border-color .18s, box-shadow .18s, transform .18s; }
.store-card:hover { border-color: #b9d5c1; transform: translateY(-1px); }
.store-card.is-selected { border-color: #76ae89; box-shadow: 0 0 0 2px rgba(65,139,91,.08); }
.store-select { display: flex; gap: 10px; align-items: center; flex: 1; min-width: 0; cursor: pointer; }
.store-actions { display: grid; justify-items: end; gap: 6px; flex: none; }
.edit-store { background: white; border: 1px solid #dce8de; border-radius: 4px; color: var(--green); font-size: 10px; padding: 3px 8px; cursor: pointer; }
.status-filter { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; color: #68786e; font-size: 11px; }
.status-filter select { border: 1px solid #dce8de; border-radius: 5px; padding: 6px; background: white; color: var(--ink); }
.store-badge.release-day-only { background: #fff4db; color: #94640c; }
.store-pin.release-day-only, .legend-dot.release-day-only { background: #c78918; }
.store-pin.release-day-only { font-size: 14px; font-weight: 700; }
.chain-icon { width: 42px; height: 42px; flex: none; border-radius: 10px; display: grid; place-items: center; color: white; background: #287a53; font-size: 11px; font-weight: 800; letter-spacing: -.06em; }
.chain-icon.lawson { background: #2879bb; font-size: 10px; }
.store-main { flex: 1; min-width: 0; }
.store-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 700; }
.store-meta { display: flex; align-items: center; gap: 6px; margin-top: 6px; color: #89968e; font-size: 10px; }
.store-meta svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.store-badge { white-space: nowrap; align-self: flex-start; padding: 5px 7px; border-radius: 5px; background: #f0f7f1; color: #47815a; font-size: 9px; font-weight: 600; }
.store-arrow { width: 15px; color: #a8b2ab; flex: none; }
.store-arrow svg { width: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.list-footnote { margin: 13px 2px 0; display: flex; align-items: flex-start; gap: 7px; color: #9aa59e; font-size: 9px; line-height: 1.6; }
.list-footnote svg { width: 14px; height: 14px; flex: none; color: #a7b4aa; }
.empty-state { min-height: 170px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; color: #94a097; background: #fff; border: 1px dashed #dce6dd; border-radius: 10px; font-size: 11px; }
.empty-state[hidden] { display: none; }
.empty-state strong { color: #68786e; font-size: 12px; }
.empty-icon { font-family: serif; font-size: 34px; line-height: 1; color: #a6bba9; }
.map-card { border: 1px solid #e7eee8; border-radius: 12px; overflow: hidden; background: white; box-shadow: 0 5px 18px rgba(34,70,44,.035); }
.map-header { min-height: 69px; display: flex; align-items: center; justify-content: space-between; padding: 0 17px; }
.map-title { display: flex; align-items: center; gap: 10px; }
.map-title h2 { font-size: 14px; }
.map-title-icon { width: 34px; height: 34px; border-radius: 9px; background: #edf6ef; display: grid; place-items: center; color: var(--green); }
.map-title-icon svg { width: 17px; }
.map-title .section-label { font-size: 8px; }
.open-map-link { display: flex; align-items: center; gap: 4px; color: var(--green); font-size: 9px; text-decoration: none; }
.open-map-link:hover { text-decoration: underline; }
.open-map-link svg { width: 13px; }
.map-frame-wrap { height: 365px; position: relative; overflow: hidden; background: #e8eee8; }
#area-map { width: 100%; height: 100%; z-index: 0; }
.map-error { color: #b84949; font-size: 11px; padding: 12px 17px; margin: 0; }
.store-pin { border: 2px solid white; border-radius: 50%; background: var(--green); color: white; display: grid; place-items: center; box-shadow: 0 2px 5px #0004; font-size: 22px; line-height: 1; }
.store-popup { font-family: "Noto Sans JP", sans-serif; font-size: 11px; line-height: 1.7; }
.store-popup a { display: block; margin-top: 10px; color: var(--green); }
.store-popup p { color: #78877f; }
.store-checkbox { width: 17px; height: 17px; accent-color: var(--green); flex: none; cursor: pointer; }
.selection-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin: 0 0 14px; font-size: 10px; color: #68786e; }
.selection-toolbar span { margin-right: auto; }
.selection-toolbar button { border: 1px solid #dce8de; background: white; border-radius: 5px; padding: 5px 7px; color: var(--green); cursor: pointer; }
.area-selector select { border: 1px solid #dce8de; border-radius: 6px; padding: 8px; background: #f5faf6; color: var(--ink); max-width: 210px; min-width: 0; cursor: pointer; }
.search-panel .area-selector { order: -1; }
.csv-message { overflow-wrap: anywhere; }
.map-overlay-tag { position: absolute; left: 13px; top: 13px; display: flex; align-items: center; gap: 7px; background: white; padding: 8px 10px; border-radius: 6px; box-shadow: 0 2px 8px rgba(30,55,36,.13); color: #617067; font-size: 9px; pointer-events: none; }
.map-overlay-tag span { width: 7px; height: 7px; background: #398758; border-radius: 50%; box-shadow: 0 0 0 3px #e7f3e9; }
.selected-store { padding: 13px 17px 12px; min-height: 63px; border-bottom: 1px solid #eef2ef; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.selected-store-copy { min-width: 0; }
.selected-store-label { color: #96a299; font-size: 8px; letter-spacing: .12em; }
.selected-store-name { margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 700; }
.selected-store-area { margin-top: 3px; color: #89968e; font-size: 9px; }
.selected-store-status { flex: none; border: 1px solid #dcebe0; background: #f4faf5; color: #43815a; padding: 6px 8px; border-radius: 20px; font-size: 9px; }
.map-footer { height: 35px; padding: 0 17px; display: flex; align-items: center; justify-content: space-between; color: #a0aaa3; font-size: 8px; }
.map-legend { display: flex; align-items: center; gap: 7px; color: #78877e; }
.legend-dot { width: 7px; height: 7px; border-radius: 50%; background: #3b8a58; }
.data-panel { margin-top: 25px; padding: 17px 19px; border: 1px solid #e5ece6; border-radius: 10px; background: #fff; display: flex; justify-content: space-between; align-items: center; gap: 20px; position: relative; }
.data-copy { display: flex; gap: 11px; align-items: center; }
.data-icon { width: 37px; height: 37px; border-radius: 9px; display: grid; place-items: center; color: var(--green); background: #eef6ef; flex: none; }
.data-icon svg { width: 20px; }
.data-copy strong { font-size: 11px; }
.data-copy p { margin: 4px 0 0; color: #929e96; font-size: 9px; }
.data-actions { display: flex; gap: 8px; }
.data-actions button { height: 35px; padding: 0 12px; border-radius: 6px; display: flex; align-items: center; gap: 7px; cursor: pointer; font-size: 9px; font-weight: 600; white-space: nowrap; transition: background .15s; }
.data-actions svg { width: 15px; }
.button-secondary { border: 1px solid #dce8de; background: white; color: #47785a; }
.button-secondary:hover { background: #f5faf6; }
.button-download { border: 1px solid var(--green); background: var(--green); color: white; }
.button-download:hover { background: var(--green-dark); }
.button-download svg { stroke: white; }
.csv-message { width: 100%; color: var(--green); font-size: 11px; line-height: 1.6; }
.csv-message:empty { display: none; }
.data-panel { flex-wrap: wrap; }
.csv-message.error { color: #b84949; }
.page-footer { display: flex; justify-content: space-between; padding: 24px 2px 0; color: #a0aaa3; font-size: 9px; }
.help-dialog { width: min(440px, calc(100% - 32px)); padding: 29px; border: 1px solid #e2ebe3; border-radius: 14px; color: var(--ink); box-shadow: 0 20px 70px rgba(22,45,29,.22); }
.help-dialog::backdrop { background: rgba(21,39,28,.32); backdrop-filter: blur(2px); }
.dialog-close { position: absolute; top: 12px; right: 15px; border: 0; background: transparent; color: #829087; font-size: 24px; cursor: pointer; }
.dialog-kicker { color: #90a096; font-size: 9px; letter-spacing: .15em; font-weight: 700; }
.help-dialog h2 { margin: 9px 0; font-size: 19px; }
.help-dialog p, .help-dialog li { color: #75837a; font-size: 11px; line-height: 1.8; }
.help-dialog ul { padding-left: 19px; margin: 12px 0 20px; }
.button-primary { width: 100%; height: 39px; border: 0; border-radius: 7px; background: var(--green); color: white; font-weight: 700; font-size: 11px; cursor: pointer; }
.editor-dialog { width: min(760px, calc(100% - 24px)); max-height: calc(100dvh - 24px); overflow-y: auto; border: 1px solid #e2ebe3; border-radius: 14px; padding: 25px; color: var(--ink); }
.editor-dialog::backdrop { background: rgba(21,39,28,.4); }
.editor-dialog h2 { margin: 8px 0; font-size: 20px; }
.editor-hint { font-size: 11px; color: #68786e; line-height: 1.7; }
#editor-map { height: 280px; width: 100%; border-radius: 8px; background: #e8eee8; }
.editor-pin { border-radius: 50%; border: 2px solid white; background: #2879bb; color: white; display: grid; place-items: center; font-size: 22px; box-shadow: 0 2px 5px #0004; }
.editor-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.editor-fields label { display: grid; gap: 5px; font-size: 11px; min-width: 0; }
.editor-fields input, .editor-fields select, .editor-fields textarea { width: 100%; min-width: 0; border: 1px solid #dce8de; border-radius: 5px; padding: 8px; color: var(--ink); background: white; }
.wide-field { grid-column: 1 / -1; }
.editor-buttons { display: flex; gap: 10px; }
.editor-buttons button { width: auto; flex: 1; border-radius: 7px; cursor: pointer; }

@media (max-width: 900px) {
  .topbar { height: 64px; padding: 0 18px; }
  main { padding: 30px 16px 23px; }
  .intro { min-height: 160px; margin-bottom: 17px; }
  .intro-art { opacity: .45; right: -39px; transform: scale(.78); transform-origin: right center; }
  .intro h1 { font-size: clamp(22px, 5vw, 29px); }
  .intro p { max-width: 270px; font-size: 10px; }
  .search-panel { min-height: 60px; padding: 13px; gap: 11px; flex-wrap: wrap; }
  .search-panel .area-selector { width: 100%; }
  .area-selector select { flex: 1; max-width: none; }
  .search-divider { display: none; }
  .search-field { gap: 8px; }
  .search-field input { font-size: 10px; }
  .search-divider { height: 24px; }
  .area-selector { gap: 5px; font-size: 9px; }
  .area-selector > svg:first-child { width: 14px; }
  .search-hint, kbd { display: none; }
  .content-grid { display: flex; flex-direction: column; gap: 23px; margin-top: 21px; }
  .map-card, .results-column { width: 100%; }
  .map-frame-wrap { height: min(80vw, 360px); min-height: 260px; }
  .section-heading { margin-top: 0; }
  .data-panel { margin-top: 23px; padding: 15px; align-items: flex-start; flex-direction: column; gap: 13px; }
  .data-actions { width: 100%; }
  .data-actions { flex-wrap: wrap; }
  .data-actions button { flex: 1; justify-content: center; padding: 0 7px; }
  .csv-message { margin-top: 0; }
  .page-footer { font-size: 8px; gap: 8px; }
}

button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
@media (max-width: 480px) {
  .editor-dialog { padding: 18px; }
  .editor-fields { grid-template-columns: minmax(0, 1fr); }
  #editor-map { height: 230px; }
  .map-footer { flex-wrap: wrap; height: auto; min-height: 40px; gap: 5px; padding: 8px 12px; }
}

@media (max-width: 390px) {
  .brand-caption { font-size: 9px; }
  .area-selector span { max-width: 104px; overflow: hidden; text-overflow: ellipsis; }
  .store-card { gap: 9px; padding: 13px 10px; }
  .store-badge { font-size: 8px; padding: 5px 6px; }
  .data-copy p { line-height: 1.5; }
}
