/*
 * Every Street Challenge — consolidated site stylesheet
 * Replaces the accumulated v0.1–v0.9 override history.
 */

:root {
    --esc-bg: #f7fbff;
    --esc-panel: #ffffff;
    --esc-ink: #1e2d3d;
    --esc-muted: #52677d;
    --esc-blue: #1467b2;
    --esc-blue-dark: #102f67;
    --esc-yellow: #ffc400;
    --esc-orange: #ef6c3e;
    --esc-line: #cfdbe7;
    --esc-radius: 6px;
    --esc-sidebar-width: 300px;
    --esc-gap: 28px;
    --esc-route-completed-color: #17355c;
    --esc-route-current-color: #ffc400;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body.esc-body {
    margin: 0;
    background: radial-gradient(circle at top left, rgba(20, 103, 178, .08), transparent 30rem), var(--esc-bg);
    color: var(--esc-ink);
    font-size: 18px;
    line-height: 1.55;
}

img {
    max-width: 100%;
}

a {
    color: inherit;
}

.screen-reader-text {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* =========================================================
   Page Shell and Intro
========================================================= */
.esc-site-shell {
    width: min(1220px, calc(100% - 28px));
    margin: 0 auto;
    padding: 28px 0 64px;
}

.esc-site-intro {
    margin-bottom: 18px;
}

.esc-dashboard-title {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 30px;
    align-items: start;
    margin-left: calc(var(--esc-sidebar-width) + var(--esc-gap));
}

.esc-title-copy {
    min-width: 0;
}

.esc-site-title-en {
    margin: 0 0 14px;
    color: #123b78;
    font-size: 25px;
    font-weight: 800;
    line-height: 1.08;
}

.esc-ja-title-panel {
    width: 100%;
    margin: 0 0 14px;
    padding: 16px 20px 15px;
    border-radius: var(--esc-radius);
    background: linear-gradient(100deg, #ffc400 0%, #ffd65a 48%, rgba(255, 226, 126, .78) 76%, rgba(255, 247, 220, .22) 100%);
}

.esc-ja-title-panel h1 {
    margin: 0;
    color: var(--esc-blue-dark);
    font-size: 42px;
    line-height: 1;
}

.esc-subtitle-ja {
    margin: 9px 0 0;
    color: var(--esc-blue-dark);
    font-size: 22px;
    font-weight: 850;
    line-height: 1.15;
}

.esc-subtitle-en {
    margin: 0;
    color: #123b78;
    font-size: 18px;
    font-weight: 650;
    line-height: 1.2;
}

/* =========================================================
   Walker Profile
========================================================= */
.esc-walker-card {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    color: var(--esc-blue-dark);
}

.esc-walker-icon {
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    overflow: hidden;
    border: 3px solid var(--esc-yellow);
    border-radius: 50%;
    background: #fff;
    font-size: 29px;
    line-height: 1;
}

.esc-walker-icon img {
    display: block;
    width: 58px;
    height: 58px;
    max-width: none;
    object-fit: contain;
    transform: translate(-1px, 0);
}

.esc-walker-copy {
    min-width: 0;
}

.esc-walker-copy strong {
    display: block;
    padding-bottom: 5px;
    border-bottom: 4px solid var(--esc-yellow);
    font-size: 29px;
    line-height: 1;
}

.esc-walker-copy p {
    margin: 9px 0 0;
    color: var(--esc-ink);
    font-size: 15px;
    font-style: italic;
    line-height: 1.35;
}

.esc-walker-profile-en {
    display: block;
    margin-top: 4px;
}

.esc-walker-card-mobile {
    display: none;
}

/* =========================================================
   Main Layout
========================================================= */
.esc-layout {
    display: grid;
    grid-template-columns: var(--esc-sidebar-width) minmax(0, 1fr);
    gap: var(--esc-gap);
    align-items: start;
}

.esc-sidebar {
    position: fixed;
    top: 12px;
    left: max(14px, calc(50% - 610px));
    z-index: 10;
    width: var(--esc-sidebar-width);
    max-height: calc(100vh - 24px);
    padding-right: 8px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.esc-walker-card-sidebar {
    margin-top: 32px;
}

@media (max-width: 767px) {
    .esc-walker-card-sidebar {
        display: none;
    }
}

.admin-bar .esc-sidebar {
    top: 44px;
    max-height: calc(100vh - 56px);
}

.esc-sidebar::-webkit-scrollbar {
    width: 7px;
}

.esc-sidebar::-webkit-scrollbar-thumb {
    background: rgba(14, 53, 91, .28);
    border-radius: 999px;
}

.esc-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.esc-journal {
    grid-column: 2;
    min-width: 0;
}

.esc-panel {
    margin: 0 0 18px;
}


/* =========================================================
   Sidebar
========================================================= */

/* Current Day */
.esc-progress-map-status {
    display: grid;
    gap: 6px;
    margin-bottom: 6px;
}

.esc-progress-map-day {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
    padding: 0 2px;
    color: var(--esc-blue-dark);
}

.esc-progress-map-day strong {
    font-size: 19px;
    line-height: 1.15;
    white-space: nowrap;
}

.esc-progress-map-day time {
    color: var(--esc-ink);
    font-size: 17px;
    line-height: 1.15;
    white-space: nowrap;
}

/* Sidebar latest link */
.esc-go-latest,
.esc-go-latest:visited {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    flex: 0 0 auto;
    margin-left: auto;
    padding-bottom: 2px;
    border: none;
    border-bottom: 1px solid transparent;
    background: transparent;
    color: #111;
    font-size: 15px;
    line-height: 1.2;
    text-decoration: none;
}

.esc-go-latest:hover,
.esc-go-latest:focus-visible {
    border-bottom-color: currentColor;
    background: transparent;
    color: #111;
    text-decoration: none;
}

.esc-go-latest small {
    color: var(--esc-muted);
    font-size: 0.72em;
    font-weight: 600;
}

.esc-go-latest-placeholder {
    visibility: hidden;
    pointer-events: none;
}

/* Coverage Map */
.esc-progress-map {
    padding-bottom: 18px;
}

.esc-progress-map-button {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--esc-line);
    background: #fff;
    cursor: pointer;
}

.esc-progress-map-stack {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #fff;
}

.esc-progress-map-layer {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.esc-progress-map-stack-modal {
    width: min(100%, 990px);
    margin-inline: auto;
}

.esc-progress-map-trigger {
    position: relative;
    width: 100%;
}

.esc-progress-map-trigger .esc-progress-map-layer {
    pointer-events: none;
}

.esc-progress-map-basemap {
    z-index: 1;
    object-fit: contain;
}

.esc-progress-map-routes {
    z-index: 2;
    pointer-events: none;
}

.esc-progress-map-base {
    z-index: 3;
}

.esc-progress-map-open-button {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.esc-progress-map-guide {
    position: absolute;
    right: 8px;
    bottom: 8px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    padding: 5px 7px;
    border-radius: 4px;
    background: rgba(255, 255, 255, .88);
    font-size: 11px;
    line-height: 1.2;
    pointer-events: none;
}

.esc-progress-map-enlarge {
    color: var(--esc-blue-dark);
    font-size: 1.1rem;
    font-weight: 600;
}

.esc-progress-map-town {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #c00000;
    font-weight: 600;
}

.esc-town-symbol {
    display: inline-block;
    width: 12px;
    height: 12px;
    box-sizing: border-box;
    flex-shrink: 0;
    border: 2px solid #ff0000;
    background: transparent;
}

/* Town tooltip */
.esc-town-tooltip {
    position: fixed;
    z-index: 9999;
    display: none;
    max-width: 260px;
    padding: 10px 14px;
    border: 1px solid #cfd6df;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
    font-size: 14px;
    line-height: 1.5;
    pointer-events: none;
}

.esc-town-tooltip-ja {
    color: #17355c;
    font-weight: 700;
}

.esc-town-tooltip-en {
    margin-top: 1px;
    color: #667085;
    font-size: 13px;
}

.esc-town-tooltip-status {
    margin-top: 7px;
    padding-top: 6px;
    border-top: 1px solid #e3e7ec;
    color: #667085;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.45;
}

/* =========================================================
   Progress Map Modal
========================================================= */

.esc-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
}

.esc-modal[hidden] {
    display: none;
}

.esc-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .65);
}

.esc-modal-dialog {
    position: relative;
    width: min(98vw, 1700px);
    max-height: 95vh;
    margin: 2vh auto;
    overflow: hidden;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
}

.esc-modal-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
    padding: 25px 58px 10px 20px;
    border-bottom: 1px solid #ddd;
}

.esc-modal-title-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    flex: 1;
    min-width: 0;
}

.esc-modal-close {
    position: absolute;
    top: 8px;
    right: 12px;
    margin: 0;
    border: 0;
    background: none;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
}

.esc-modal-body {
    max-height: calc(90vh - 70px);
    padding: 18px;
    overflow: auto;
}

.esc-modal-body img {
    display: block;
    width: 100%;
    height: auto;
}

/* Modal instructions */
.esc-progress-map-help {
    flex: 0 1 auto;
    margin: 0;
    color: #465365;
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 1.35;
}

.esc-progress-map-help>.esc-map-help-mouse {
    display: block;
}

.esc-progress-map-help>.esc-map-help-touch {
    display: none;
}

.esc-map-help-mouse>span,
.esc-map-help-touch>span {
    display: block;
}

.esc-map-help-mouse>span:first-child,
.esc-map-help-touch>span:first-child {
    color: #465365;
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.35;
}

.esc-map-help-mouse>span:last-child,
.esc-map-help-touch>span:last-child {
    margin-top: 4px;
    color: #6a7788;
    font-size: 1.2rem;
    font-weight: 400;
    line-height: 1.35;
}

/* Modal legend */
.esc-map-legend-modal {
    position: static;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
    margin: 0;
    padding: 10px 16px;
    border-radius: 6px;
    background: rgba(255, 255, 255, .92);
    white-space: nowrap;
    pointer-events: none;
}

.esc-map-legend-modal .esc-town-symbol,
.esc-map-legend-modal .esc-legend-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    min-width: 12px;
    min-height: 12px;
    flex: 0 0 12px;
    box-sizing: border-box;
}

.esc-map-legend-modal .esc-legend-completed {
    border: 1px solid rgba(30, 45, 61, .25);
    background: var(--esc-route-completed-color);
}

.esc-map-legend-modal .esc-legend-selected {
    border: 1px solid rgba(30, 45, 61, .25);
    background: var(--esc-route-current-color);
}

.esc-map-legend {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-top: 8px;
    font-size: 14px;
    font-weight: 650;
    white-space: nowrap;
}

.esc-map-legend>* {
    display: flex;
    align-items: center;
    gap: 8px;
}

.esc-map-legend .esc-legend-en {
    font-size: 0.72em;
    font-weight: 400;
    color: #667085;
}

.esc-legend-dot {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(30, 45, 61, .18);
}

.esc-legend-completed {
    background: var(--esc-blue);
}

.esc-legend-selected {
    background: var(--esc-yellow);
}

.esc-legend-en {
    font-size: .9em;
    font-weight: 600;
    white-space: nowrap;
}

/* =========================================================
   Sidebar Progress
========================================================= */

.esc-progress-list {
    display: block;
    margin: 0;
}

.esc-progress-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 7px 4px;
    border-bottom: 1px solid var(--esc-line);
}

.esc-progress-row:last-child {
    border-bottom: 0;
}

.esc-progress-list dt {
    margin: 0;
    font-size: 15px;
    line-height: 1.12;
}

.esc-progress-list dt small {
    display: block;
    margin-top: 3px;
    font-size: 10px;
}

.esc-progress-list dd {
    margin: 0;
    font-size: 27px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.esc-progress-towns dd {
    color: var(--esc-blue);
    font-size: 32px;
}


/* =========================================================
   Town Search
========================================================= */

.esc-town-search-form {
    width: 100%;
}

.esc-town-search-row {
    display: block;
    width: 100%;
}

.esc-town-search-input-wrap {
    position: relative;
    width: 100%;
}

.esc-town-search-input-wrap input {
    display: block;
    width: 100%;
    min-width: 0;
    height: 36px;
    box-sizing: border-box;
    padding: 6px 62px 6px 9px;
    border: 1px solid var(--esc-line);
    border-radius: 4px;
    background: #fff;
    color: #111;
    font: inherit;
    font-size: 13px;
}

.esc-town-search-clear,
.esc-town-search-submit {
    position: absolute;
    top: 50%;
    display: grid;
    width: 26px;
    height: 26px;
    padding: 0;
    place-items: center;
    transform: translateY(-50%);
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    font: inherit;
    line-height: 1;
    cursor: pointer;
}

.esc-town-search-clear {
    right: 32px;
    color: #666;
    font-size: 24px;
}

.esc-town-search-submit {
    right: 6px;
    color: var(--esc-blue);
    font-size: 17px;
}

.esc-town-search-clear:hover,
.esc-town-search-clear:focus-visible,
.esc-town-search-submit:hover,
.esc-town-search-submit:focus-visible {
    background: #eef3f7;
    color: #222;
}

.esc-town-search-error {
    margin: 7px 0 0;
    color: #a51d1d;
    font-size: 12px;
    line-height: 1.4;
}


/* Search results */
.esc-town-search-results {
    display: grid;
    gap: 4px;
    max-height: 320px;
    margin-top: 6px;
    overflow-y: auto;
}

.esc-town-search-result {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 3px 10px;
    border: 0;
    border-bottom: 1px solid #d6dde5;
    border-radius: 0;
    background: transparent;
}

a.esc-town-search-result {
    color: inherit;
    text-decoration: none;
    transition: none;
}

a.esc-town-search-result:hover {
    background: #f7f9fb;
}

.esc-town-search-result-name {
    display: grid;
    min-width: 0;
    gap: 1px;
}

.esc-town-search-result-name strong {
    font-size: 0.98rem;
    line-height: 1.45;
}

.esc-town-search-result-name small {
    color: #66717c;
    font-size: 0.70rem;
    line-height: 1.35;
}

.esc-town-search-result-status {
    flex: 0 0 auto;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

.esc-town-search-result.is-completed .esc-town-search-result-status {
    color: #1f4d73;
}

.esc-town-search-result.is-coming-soon {
    background: #f6f7f8;
    color: #7b838a;
}

.esc-town-search-result.is-coming-soon .esc-town-search-result-status {
    color: #8b9298;
}


/* =========================================================
   Calendar
========================================================= */

.esc-mini-calendar {
    width: calc(100% - 36px);
    margin: 0 auto;
    padding: 8px;
    border: 1px solid var(--esc-line);
    background: #fff;
}

.esc-calendar-month {
    display: grid;
    grid-template-columns: 28px 1fr 28px;
    align-items: center;
    margin-bottom: 6px;
    text-align: center;
}

.esc-calendar-month strong {
    font-size: 16px;
}

.esc-calendar-month a {
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--esc-blue);
    font-size: 1.35rem;
    line-height: 1;
    text-decoration: none;
}

.esc-calendar-month a:hover,
.esc-calendar-month a:focus-visible {
    background: #f3f7fb;
}

.esc-calendar-weekdays,
.esc-calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
    text-align: center;
}

.esc-calendar-weekdays {
    margin-bottom: 5px;
    color: var(--esc-muted);
    font-size: 12px;
    font-weight: 750;
}

.esc-calendar-days span,
.esc-calendar-days a {
    display: grid;
    min-height: 25px;
    place-items: center;
    color: inherit;
    font-size: 13px;
    text-decoration: none;
}

.esc-calendar-days .has-journal {
    color: var(--esc-blue-dark);
    font-weight: 800;
    text-decoration: underline;
    text-decoration-color: var(--esc-yellow);
    text-decoration-thickness: 3px;
    text-underline-offset: 3px;
}

.esc-calendar-days .has-journal:hover {
    background: #eef6fc;
}

.esc-calendar-days .is-current {
    background: var(--esc-blue);
    color: #fff;
    font-weight: 800;
}

.esc-calendar-weekdays span:first-child,
.esc-calendar-days> :nth-child(7n + 1) {
    color: #9d2626;
}


/* =========================================================
   Sidebar Categories
========================================================= */

.esc-behind {
    padding: 0;
    background: transparent;
}

.esc-behind h2 {
    margin: 0 0 5px;
    color: #111;
    font-size: 18px;
    font-weight: 650;
    line-height: 1.2;
}

.esc-behind h2 small {
    margin-left: 5px;
    color: var(--esc-muted);
    font-size: 11px;
    font-weight: 500;
}

.esc-behind ul {
    margin: 0;
    padding: 0 0 0 1em;
    list-style: none;
}

.esc-behind li {
    margin: 0;
}

.esc-behind a {
    display: flex;
    align-items: baseline;
    gap: 7px;
    padding: 5px 0;
    color: var(--esc-muted);
    text-decoration: none;
}

.esc-behind a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.esc-behind-ja {
    color: #111;
    font-size: 15px;
    font-weight: 600;
}

.esc-behind-en,
.esc-behind-count {
    font-size: 11px;
}

.esc-behind-count {
    margin-left: auto;
}


/* =========================================================
   Errors and Day Navigation
========================================================= */

.esc-data-error {
    margin: 0 0 20px calc(var(--esc-sidebar-width) + var(--esc-gap));
    padding: 12px 14px;
    border: 1px solid #d64545;
    background: #fff3f3;
    color: #8f2020;
    font-weight: 700;
}

/* Shared navigation link */
.esc-nav-link,
.esc-nav-link:visited {
    background: transparent;
    color: #111;
    text-decoration: none;
}

.esc-nav-link:hover,
.esc-nav-link:focus-visible {
    background: transparent;
    color: #111;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Day navigation */
.esc-day-navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    margin: 24px 0 0;
}

.esc-day-navigation-top {
    margin-top: 0;
    margin-bottom: 12px;
}

.esc-day-navigation-bottom {
    margin-top: 24px;
    margin-bottom: 0;
}

.esc-day-nav-side-prev {
    flex: 0 0 auto;
}

.esc-day-nav-side-next {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-left: auto;
    text-align: right;
}

.esc-day-nav-link,
.esc-day-nav-link:visited {
    display: inline-flex;
    align-items: center;
    min-height: auto;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    color: #111;
    font-size: 18px;
    font-weight: 650;
    line-height: 1.3;
    text-decoration: none;
    white-space: nowrap;
}

.esc-day-nav-link:hover,
.esc-day-nav-link:focus-visible {
    background: transparent;
    color: #111;
    text-decoration: none;
    text-underline-offset: 3px;
}

.esc-day-nav-latest {
    margin-left: 0;
    white-space: nowrap;
}

/* =========================================================
   Day Header
========================================================= */
.esc-day-header {
    display: grid;
    grid-template-columns: minmax(250px, auto) minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    padding: 8px 14px;
    border-left: 7px solid var(--esc-yellow);
    background: linear-gradient(135deg, #125b9f, #2178c5);
    color: #fff;
}

.esc-day-identity {
    display: flex;
    align-items: center;
    gap: 20px;
    min-width: 0;
}

.esc-day-identity h2 {
    margin: 0;
    padding-bottom: 3px;
    font-size: 34px;
    line-height: .95;
    white-space: nowrap;
}

.esc-day-identity time {
    font-size: 20px;
    line-height: 1;
    white-space: nowrap;
}

.esc-day-metrics {
    display: grid;
    grid-template-columns: repeat(3, 118px);
    gap: 0;
    margin: 0 0 0 auto;
    text-align: right;
}

.esc-day-metrics>div {
    display: grid;
    grid-template-rows: 22px 28px;
    align-content: center;
    justify-items: end;
    min-height: 48px;
    padding: 0 6px;
    border-left: 1px solid rgba(255, 255, 255, .35);
}

.esc-day-metrics dt {
    width: 100%;
    align-self: end;
    margin: 0;
    font-size: 11px;
    font-weight: 650;
    line-height: 1;
    text-align: right;
    white-space: nowrap;
}

.esc-day-metrics dd {
    width: 100%;
    align-self: start;
    margin: 3px 0 0;
    font-size: 20px;
    font-weight: 850;
    line-height: 1;
    text-align: right;
    white-space: nowrap;
}

/* =========================================================
   Route
========================================================= */
.esc-route {
    margin-top: 18px;
    margin-bottom: 6px;
}

.esc-route h3 {
    margin: 4px 0 0;
    font-size: 23px;
    color: var(--esc-ink);
}

.esc-route-flow {
    display: flex;
    align-items: center;
    gap: 0;
    overflow-x: auto;
    padding: 4px 2px 4px;
}

.esc-route-item {
    flex: 0 0 auto;
    min-width: 170px;
    padding: 6px 12px;
    border-radius: 6px;
    background: var(--esc-yellow);
    color: var(--esc-blue-dark);
    text-align: center;
    text-decoration: none;
}

.esc-route-sequence {
    display: block;
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: .09em;
}

.esc-route-ja {
    display: inline-block;
    margin-top: 1px;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.05;

    border-bottom: 1px solid currentColor;
    padding: 0 2px 2px;
}


.esc-route-en {
    display: block;
    margin-top: 1px;
    overflow: hidden;
    color: var(--esc-blue-dark);
    font-size: 12px;
    line-height: 1.05;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.esc-route-arrow {
    flex: 0 0 38px;
    width: 38px;
    margin: 0 6px 0 2px;
    color: var(--esc-blue);
    font-size: 44px;
    font-weight: 900;
    line-height: 1;
    text-align: center;
}

/* =========================================================
   Town Block
========================================================= */

/* Town block container */
.esc-town-list {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.esc-town-block {
    scroll-margin-top: 24px;
}

.esc-town-dashboard {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    margin: 0;
    overflow: hidden;
    border: 2px solid #7f9bb5;
    border-radius: var(--esc-radius);
    background: #fff;
    box-shadow: 0 4px 12px rgba(17, 24, 39, .08);
}

.esc-town-dashboard:hover {
    box-shadow: 0 6px 16px rgba(17, 24, 39, .11);
}

/* Town title band */
.esc-town-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 10px 18px;
    border-bottom: 2px solid #b7cde3;
    background: #dceaf7;
}

.esc-town-header {
    min-width: 0;
}

.esc-town-header h3 {
    margin: 0;
    color: var(--esc-ink);
    font-size: 30px;
    line-height: 1;
}

.esc-town-sequence {
    display: inline-block;
    margin-right: 10px;
    padding: 3px 7px;
    background: var(--esc-yellow);
    color: var(--esc-blue-dark);
    font-size: 23px;
    font-weight: 850;
    letter-spacing: .08em;
    vertical-align: .08em;
}

.esc-town-header p {
    margin: 2px 0 0;
    color: var(--esc-muted);
    font-size: 16px;
    font-weight: 650;
    line-height: 1.1;
}

/* Town statistics */
.esc-town-stats {
    display: grid;
    grid-template-columns: repeat(3, 118px);
    flex: 0 0 auto;
    gap: 0;
    margin: 0 0 0 auto;
    text-align: right;
}

.esc-town-stats>div {
    display: grid;
    grid-template-rows: 22px 28px;
    align-content: center;
    justify-items: end;
    min-height: 48px;
    padding: 0 6px;
    border-left: 1px solid rgba(16, 47, 103, .22);
}

.esc-town-stats dt {
    width: 100%;
    align-self: end;
    margin: 0;
    color: var(--esc-blue-dark);
    font-size: 11px;
    font-weight: 650;
    line-height: 1;
    text-align: right;
    white-space: nowrap;
}

.esc-town-stats dd {
    width: 100%;
    align-self: start;
    margin: 3px 0 0;
    color: var(--esc-ink);
    font-size: 20px;
    font-weight: 850;
    line-height: 1;
    text-align: right;
    white-space: nowrap;
}

/* Town features */
.esc-town-features {
    padding: 14px 36px;
    border-bottom: 1px solid #c8d8ea;
    color: #25384a;
    font-size: 18px;
    line-height: 1.6;
}

/* Town map and walking video */
.esc-town-media {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.7778fr);
    gap: 14px;
    align-items: stretch;
    padding: 14px 16px 0;
}

.esc-media-card {
    position: relative;
    display: block;
    min-width: 0;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border: 1px solid var(--esc-line);
    background: #eeeae5;
    color: inherit;
    text-decoration: none;
}

/* Show the complete town map inside a square */
.esc-town-media .esc-media-card.esc-town-map {
    width: 100%;
    height: auto !important;
    aspect-ratio: 1 / 1 !important;
    background: #f4f4f2;
}

.esc-town-media .esc-media-card.esc-town-map img.esc-generated-image {
    display: block;
    width: 100%;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center center;
}

.esc-town-video {
    aspect-ratio: 16 / 9;
}

.esc-generated-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.esc-placeholder-media {
    display: grid;
    width: 100%;
    height: 100%;
    min-height: 120px;
    place-items: center;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, .58),
            rgba(0, 0, 0, .05));
    color: var(--esc-muted);
}

.esc-media-label {
    position: absolute;
    left: 12px;
    bottom: 12px;
    padding: 4px 7px;
    border-radius: 999px;
    background: rgba(20, 103, 178, .9);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

/* WordPress-managed town photos */
.esc-town-photos {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
    padding: 14px 16px 16px;
}

.esc-town-photo {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    column-gap: 14px;
    row-gap: 6px;
    align-items: stretch;
    width: 100%;
    margin: 0;
}

.esc-town-photo.is-reverse {
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
}

.esc-town-photo.is-reverse .esc-town-photo-image {
    order: 2;
}

.esc-town-photo.is-reverse .esc-town-photo-caption {
    order: 1;
}

.esc-town-photo-link {
    display: block;
    width: 100%;
    min-width: 0;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #eeeae5;
}

.esc-town-photo-image {
    display: block;
    width: 100%;
    height: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    transition: transform .2s ease;
}

.esc-town-photo-link:hover .esc-town-photo-image,
.esc-town-photo-link:focus-visible .esc-town-photo-image {
    transform: scale(1.015);
}

/* Town photo captions */
.esc-town-photo figcaption {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    min-width: 0;
    padding: 10px 18px;
    background: #fff;
    color: #25384a;
    font-size: 16px;
    line-height: 1.6;
}

.esc-town-photo figcaption:empty {
    display: none;
}

.esc-town-photo:not(:has(figcaption)) {
    grid-template-columns: 1fr;
}


/* Reward and reflection */
.esc-reward {
    margin-top: 24px;
    padding: 16px;
    background: rgba(243, 182, 63, .12);
}

.esc-reward .esc-town-photos {
    padding: 0;
}

.esc-reward-count-1 .esc-reward-item {
    grid-template-columns: minmax(0, 3fr) minmax(180px, 2fr);
}

.esc-reward-count-2,
.esc-reward-count-3 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.esc-reward-count-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.esc-reward-count-2 .esc-reward-item,
.esc-reward-count-3 .esc-reward-item {
    grid-template-columns: 1fr;
}

.esc-reward .esc-generated-image {
    aspect-ratio: 16 / 9;
}

/* =========================================================
   Reflection
========================================================= */

.esc-day-reflection {
    margin-top: 26px;
    padding: 0;
    border: 1px solid var(--esc-line);
    border-left: 7px solid var(--esc-yellow);
    background: #fffdf4;
}

.esc-day-reflection p {
    margin: 0;
    font-size: 18px;
    line-height: 1.65;
}

.esc-reflection-heading {
    padding: 18px 22px 12px;
    border-bottom: 1px solid var(--esc-line);
}

.esc-reflection-heading h2 {
    margin: 0;
    color: #111;
    font-size: 26px;
    line-height: 1.2;
}

.esc-reflection-heading p {
    margin: 3px 0 0;
    color: var(--esc-muted);
    font-size: 13px;
    line-height: 1.2;
}

.esc-reflection-text {
    padding: 18px 22px 4px;
}

.esc-reflection-text p {
    margin: 0 0 1em;
    font-size: 18px;
    line-height: 1.75;
}

.esc-reflection-photos {
    padding-top: 12px;
}

/* =========================================================
   Comments
========================================================= */
.esc-comments {
    margin-top: 27px;
    padding: 18px;
    border: 1px solid var(--esc-line);
    background: rgba(255, 255, 255, .52);
}

.esc-comment-list {
    padding-left: 1.4em;
}

.esc-comments input:not([type="submit"]),
.esc-comments textarea {
    width: 100%;
}


/* =========================================================
   Responsive: up to 1150px
========================================================= */

@media (max-width: 1150px) {

    /* Town title and statistics */
    .esc-town-main {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .esc-town-stats {
        width: 100%;
        justify-content: flex-end;
    }

    /* Day header and metrics */
    .esc-day-header {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .esc-day-identity {
        justify-content: flex-start;
    }

    .esc-day-metrics {
        width: 100%;
        grid-template-columns: repeat(3, 1fr);
        margin-left: 0;
    }

    .esc-day-metrics>div {
        justify-items: end;
    }
}

/* 1000px以下：タイトルを横幅いっぱい、Walkerを最下段へ */
@media (min-width: 768px) and (max-width: 1000px) {
    .esc-dashboard-title {
        grid-template-columns: 1fr;
    }

    .esc-title-copy {
        width: 100%;
        min-width: 0;
    }

    .esc-walker-card {
        width: 100%;
        margin-top: 14px;
    }
}


/* =========================================================
   Responsive: up to 767px
========================================================= */

@media (max-width: 767px) {

    /* Page and main layout */
    body.esc-body {
        font-size: 16px;
    }

    .esc-site-shell {
        width: min(100% - 20px, 740px);
        padding-top: 20px;
    }

    .esc-dashboard-title {
        grid-template-columns: 1fr;
        margin-left: 0;
    }

    .esc-dashboard-title>.esc-walker-card {
        display: none;
    }

    .esc-layout {
        display: flex;
        flex-direction: column;
        gap: 0;
        grid-template-columns: 1fr;
    }

    .esc-sidebar {
        position: static;
        display: contents;
        width: 100%;
        max-height: none;
        padding-right: 0;
        overflow: visible;
    }

    .esc-journal {
        grid-column: 1;
        order: 3;
        width: 100%;
    }

    .esc-data-error {
        margin-left: 0;
    }

    /* Intro title */
    .esc-site-title-en {
        font-size: 23px;
    }

    .esc-ja-title-panel {
        padding: 13px 14px 12px;
    }

    .esc-ja-title-panel h1 {
        font-size: 32px;
    }

    .esc-subtitle-ja {
        font-size: 22px;
    }

    .esc-subtitle-en {
        font-size: 18px;
    }

    /* Mobile content order */
    .esc-progress-map {
        order: 1;
        width: 100%;
    }

    .esc-progress {
        order: 2;
        width: 100%;
    }

    .esc-town-search {
        order: 4;
        width: 100%;
        margin-top: 16px;
    }

    .esc-calendar {
        order: 5;
        width: 100%;
    }

    .esc-behind {
        order: 6;
        width: 100%;
    }

    .esc-walker-card-mobile {
        display: grid;
        width: 100%;
        margin-top: 18px;
    }

    /* Sidebar elements */
    .esc-progress-map-button {
        max-width: 420px;
        margin-inline: auto;
    }

    .esc-map-legend {
        max-width: 420px;
        margin-inline: auto;
    }

    .esc-mini-calendar {
        width: 100%;
        margin: 0;
    }

    /* Day header */
    .esc-day-header {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .esc-day-identity {
        justify-content: space-between;
    }

    .esc-day-metrics {
        grid-template-columns: repeat(3, 1fr);
    }

    .esc-day-metrics>div {
        border-left: 1px solid rgba(255, 255, 255, .4);
    }

    /* Town block */
    .esc-town-main {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .esc-town-header h3 {
        font-size: 31px;
    }

    .esc-town-header p {
        font-size: 18px;
    }

    .esc-town-stats {
        width: 100%;
        justify-content: flex-end;
    }

    .esc-town-media {
        grid-template-columns: 1fr;
    }

    .esc-town-photo,
    .esc-town-photo.is-reverse {
        grid-template-columns: 1fr;
    }

    @media (max-width: 767px) {

        .esc-town-photo,
        .esc-town-photo.is-reverse {
            grid-template-columns: 1fr;
        }

        .esc-town-photo .esc-town-photo-image,
        .esc-town-photo.is-reverse .esc-town-photo-image {
            order: 1;
        }

        .esc-town-photo .esc-town-photo-caption,
        .esc-town-photo.is-reverse .esc-town-photo-caption {
            order: 2;
        }
    }

    .esc-town-photo-link,
    .esc-town-photo-image {
        aspect-ratio: 16 / 10;
    }

    .esc-reward-count-1 .esc-reward-item,
    .esc-reward-count-2,
    .esc-reward-count-3 {
        grid-template-columns: 1fr;
    }

    /* Search results */
    .esc-town-search-result {
        align-items: flex-start;
        gap: 10px;
        padding: 11px 12px;
    }

    .esc-town-search-result-status {
        padding-top: 2px;
        font-size: 0.72rem;
    }

    .esc-town-search-result-name strong {
        font-size: 0.92rem;
    }

    .esc-town-search-result-name small {
        font-size: 0.74rem;
    }
}

@media (max-width: 560px) {
    .esc-day-navigation {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .esc-day-nav-link {
        font-size: 18px;
    }

    .esc-day-identity h2 {
        font-size: 31px;
    }

    .esc-day-metrics dd {
        font-size: 18px;
    }

    .esc-route-item {
        min-width: 158px;
    }

    .esc-route-ja {
        font-size: 20px;
    }

    .esc-town-header h3 {
        font-size: 29px;
    }

    .esc-town-sequence {
        font-size: 20px;
    }

    .esc-town-stats {
        width: 100%;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0;
    }

    .esc-town-stats > div {
        min-width: 0;
        padding: 0 6px;
    }

    .esc-town-stats dd {
        font-size: 23px;
    }
}


/* =========================================================
   Component Sections and Local Responsive Rules
========================================================= */

/* =========================================================
   Blog Card: Behind the Challenge
========================================================= */
.esc-background-card {
    grid-column: 2;
    min-width: 0;
    margin-top: 28px;
    overflow: hidden;
    border: 1px solid #d7dce2;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 3px 10px rgba(17, 24, 39, .06);
}

@media (max-width: 767px) {
    .esc-background-card {
        grid-column: auto;
        width: 100%;
    }
}

.esc-background-header {

    display: flex;

    justify-content: space-between;

    align-items: flex-start;

    gap: 20px;

    padding: 18px 24px;

    background: #1f5ea8;

    color: #fff;

    border-radius: 12px 12px 0 0;
}

.esc-background-title-group {
    display: flex;
    align-items: flex-start;
    gap: 64px;
}

.esc-background-heading {
    flex: 0 0 auto;
}

.esc-background-posted-day {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.esc-background-posted-ja {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
}

.esc-background-posted-en {
    margin: 6px 0 0;
    font-size: .9rem;
    line-height: 1.2;
    color: rgba(255, 255, 255, .82);
}

.esc-background-heading h2 {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
}

.esc-background-heading p {
    margin: 6px 0 0;
    font-size: 1.05rem;
    font-style: italic;
    line-height: 1.2;
    color: rgba(255, 255, 255, .92);
    font-weight: 500;
}

.esc-background-view-all,
.esc-background-view-all:visited {

    flex: 0 0 auto;

    margin-top: 2px;

    color: #fff;

    font-size: 14px;

    font-weight: 650;

    text-decoration: none;

    white-space: nowrap;
}

.esc-background-view-all:hover,
.esc-background-view-all:focus-visible {

    color: rgba(255, 255, 255, .9);

    text-decoration: underline;

    text-underline-offset: 3px;
}

.esc-background-content {
    padding: 18px 20px 20px;
}

.esc-background-title {
    margin: 0;
    color: #111;
    font-size: 24px;
    line-height: 1.35;
}

.esc-background-title a {
    text-decoration: none;
}

.esc-background-title a:hover,
.esc-background-title a:focus-visible {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.esc-background-excerpt {
    margin: 13px 0 0;
    color: #3e4852;
    font-size: 16px;
    line-height: 1.7;
}

.esc-background-link {
    margin: 14px 0 0;
    text-align: right;
}

.esc-background-link a,
.esc-background-link a:visited {
    color: var(--esc-orange);
    font-size: 14px;
    font-weight: 750;
    text-decoration: none;
}

.esc-background-link a:hover,
.esc-background-link a:focus-visible {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.esc-background-category {
    margin: 0 0 10px;
}

.esc-background-category a,
.esc-background-category a:visited {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    background: var(--esc-orange);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
}

.esc-background-category a:hover,
.esc-background-category a:focus-visible {
    background: #d85a2c;
    color: #fff;
    text-decoration: none;
}

@media (max-width: 767px) {

    .esc-reflection-heading,
    .esc-reflection-text {
        padding-left: 16px;
        padding-right: 16px;
    }

    .esc-reflection-heading h2 {
        font-size: 23px;
    }

    .esc-day-navigation {
        align-items: flex-end;
        gap: 12px;
    }

    .esc-day-nav-side-next {
        flex-wrap: wrap;
        gap: 8px;
    }

    .esc-day-nav-link,
    .esc-day-nav-link:visited {
        min-height: 40px;
        padding: 7px 11px;
        font-size: 14px;
    }

    .esc-background-header {
        gap: 14px;
        padding: 15px 16px 13px;
    }

    .esc-background-heading h2 {
        font-size: 20px;
    }

    .esc-background-content {
        padding: 16px;
    }

    .esc-background-title {
        font-size: 21px;
    }
}

@media (max-width: 480px) {
    .esc-day-navigation {
        align-items: stretch;
    }

    .esc-day-nav-side-next {
        align-items: center;
        flex-direction: row;
        gap: 20px;
    }

    .esc-background-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .esc-background-view-all {
        align-self: flex-end;
    }
}

/* Blog card: heading metadata and site color alignment */
.esc-background-header-side {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    margin-left: auto;
}

.esc-background-posted-day {
    display: grid;
    gap: 2px;
    color: var(--esc-blue-dark);
    text-align: right;
    white-space: nowrap;
}

.esc-background-heading p {

    margin: 4px 0 0;

    color: rgba(255, 255, 255, .88);

    font-style: italic;
}


.esc-background-title,
.esc-background-title a,
.esc-background-title a:visited {
    color: var(--esc-blue-dark);
}

@media (max-width: 767px) {
    .esc-background-header-side {
        align-items: flex-end;
        flex-direction: column;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .esc-background-header-side {
        width: 100%;
        align-items: flex-end;
        margin-left: 0;
    }
}

/* =========================================================
   Front Page Header
========================================================= */

.esc-main-header {

    position: relative;

    overflow: hidden;

    margin-bottom: 14px;

    background: #1f5ea8;

    color: #fff;
}

.esc-main-header::before {

    content: "";

    position: absolute;

    inset: 0;

    background-image:
        linear-gradient(rgba(31, 94, 168, .68),
            rgba(31, 94, 168, .68)),
        url("../images/blog_road_overlay.png");

    background-repeat: no-repeat;

    background-position: center;

    background-size: cover, 115%;
}

.esc-main-header-inner {
    position: relative;
    z-index: 1;

    display: flex;
    flex-direction: column;
    justify-content: center;

    max-width: 1180px;
    height: 140px;
    margin: 0 auto;
    padding: 0 28px;
}

.esc-main-header-title-ja {

    margin: 0;

    color: #fff;

    font-size: clamp(34px, 4vw, 50px);

    font-weight: 700;

    line-height: 1.1;
}

.esc-main-header-title-en {

    margin: 10px 0 0;

    color: rgba(255, 255, 255, .92);

    font-size: clamp(18px, 2vw, 24px);

    font-style: italic;

    font-weight: 500;

    line-height: 1.35;
}

@media (max-width: 767px) {

    .esc-main-header {

        margin-bottom: 20px;
    }

    .esc-main-header-inner {

        padding: 26px 18px 16px;
    }

    .esc-main-header-title-ja {

        font-size: 28px;
    }

    .esc-main-header-title-en {

        font-size: 15px;
        line-height: 1.2;
        margin-top: 6px;
    }

}

/* =========================================================
   Blog Header
========================================================= */

.esc-blog-header {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #123b78;
    color: #fff;
}

.esc-blog-header::before {
    content: "";
    position: absolute;
    inset: 0;

    background-image:
        linear-gradient(rgba(18, 59, 120, 0.72),
            rgba(18, 59, 120, 0.72)),
        url("../images/blog_road_overlay.png");

    background-repeat: no-repeat;
    background-size:
        cover,
        120%;

    background-position:
        center,
        center;

    opacity: 1;
}

.esc-blog-header-inner {
    position: relative;
    z-index: 1;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;

    width: min(1180px, calc(100% - 40px));
    height: 64px;
    margin: 0 auto;
    padding: 0;
}

.esc-blog-header-title {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
    transform: translateY(3px);
}

.esc-blog-header-title-ja {
    margin: 0;
    color: #fff;
    font-size: 32px;
    font-weight: 700;
}

.esc-blog-header-title-en {
    margin: 0;
    font-family: inherit;
    font-size: 15px;
    font-style: italic;
    font-weight: 400;
    color: rgba(255, 255, 255, .78);
    line-height: 1;
    letter-spacing: .02em;
}

.esc-blog-header-main-link,
.esc-blog-header-main-link:visited {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;

    padding: 8px 16px;

    border: 1px solid rgba(255, 255, 255, .58);
    border-radius: 4px;

    color: #fff;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
}

.esc-blog-header-main-link:hover,
.esc-blog-header-main-link:focus-visible {
    border-color: #fff;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    text-decoration: none;
}

@media (max-width: 767px) {
    .esc-blog-header-inner {
        width: min(100% - 28px, 720px);
        height: auto;
        min-height: 72px;
        padding: 10px 0;
    }

    .esc-blog-header-title {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .esc-blog-header-title-ja {
        font-size: 30px;
    }

    .esc-blog-header-title-en {
        font-size: 14px;
    }

    .esc-blog-header-main-link {
        padding: 7px 12px;
        font-size: 13px;
    }
}

/* PCでは本文カラム内のヘッダーを表示 */
.esc-main-header-mobile {
    display: none;
}

.esc-main-header-desktop {
    display: block;
}

@media (max-width: 767px) {

    /* スマホではページ最上段のヘッダーを表示 */
    .esc-main-header-mobile {
        display: block;
    }

    /* 本文内のPC用ヘッダーは非表示 */
    .esc-main-header-desktop {
        display: none;
    }

}

/* 完全踏破ブログ：日本語行と英語行を左右で正確にそろえる */
.esc-background-title-group {
    display: grid;
    grid-template-columns: auto auto;
    grid-template-rows: auto auto;
    column-gap: 64px;
    row-gap: 6px;
    align-items: baseline;
}

.esc-background-heading,
.esc-background-posted-day {
    display: contents;
}

.esc-background-heading h2 {
    grid-column: 1;
    grid-row: 1;
    margin: 0;
}

.esc-background-heading p {
    grid-column: 1;
    grid-row: 2;
    margin: 0;
}

.esc-background-posted-ja {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
}

.esc-background-posted-en {
    grid-column: 2;
    grid-row: 2;
    margin: 0;
}

/* サムネイル地図：左下の拡大案内 */
.esc-progress-map-trigger .esc-progress-map-enlarge {
    position: absolute;
    left: 8px;
    bottom: 8px;
    z-index: 5;

    margin: 0;
    padding: 0;

    color: var(--esc-blue-dark);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;

    text-shadow:
        0 1px 2px #fff,
        0 0 4px #fff;

    pointer-events: none;
}

/* サムネイル地図：右下の縦並び凡例 */
.esc-progress-map-trigger .esc-map-legend {
    position: absolute;
    right: 8px;
    bottom: 8px;
    z-index: 5;

    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;

    margin: 0;
    padding: 5px 7px;

    border-radius: 4px;
    background: rgba(255, 255, 255, .9);

    color: var(--esc-ink);
    font-size: 11px;
    font-weight: 650;
    line-height: 1.2;
    white-space: nowrap;

    pointer-events: none;
}

.esc-progress-map-trigger .esc-map-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.esc-progress-map-trigger .esc-town-symbol,
.esc-progress-map-trigger .esc-legend-dot {
    display: inline-block;

    width: 12px;
    height: 12px;

    min-width: 12px;
    min-height: 12px;

    flex: 0 0 12px;
    flex-shrink: 0;

    box-sizing: border-box;
}

/* Coverage Map と統計ブロックの間隔 */
.esc-progress {
    margin-top: 18px;
}

@media (max-width: 900px) {
    .esc-map-legend-modal {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 8px 12px;
    }

    .esc-map-legend-item {
        width: 100%;
    }

}

/* タッチ端末ではタッチ操作だけ表示 */
@media (hover: none) and (pointer: coarse) {
    .esc-progress-map-help>.esc-map-help-mouse {
        display: none;
    }

    .esc-progress-map-help>.esc-map-help-touch {
        display: block;
    }
}

.esc-main-header-blog-link,
.esc-main-header-blog-link:visited {
    position: absolute;
    top: 12px;
    right: 18px;

    color: rgba(255, 255, 255, .82);
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;

    padding: 4px 8px;
    border-radius: 4px;
}

.esc-main-header-blog-link:hover,
.esc-main-header-blog-link:focus-visible {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ==========================================================
   Blog → Journal
   ========================================================== */

/* サイドバー */
.esc-back-to-main-sidebar {
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid #d7dce3;
}

.esc-back-to-main-sidebar a {
    display: inline-block;
    font-size: 1.2rem;
    font-weight: 600;
    color: #1f5ea8;
    text-decoration: none;
}

.esc-back-to-main-sidebar a:hover {
    text-decoration: underline;
}


/* 記事末尾 */
.esc-blog-return-bottom {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid #d7dce3;
    text-align: center;
}

.esc-back-to-main-bottom a {
    display: inline-block;
    font-size: 1.3rem;
    font-weight: 600;
    color: #1f5ea8;
    text-decoration: none;
}

.esc-back-to-main-bottom a:hover {
    text-decoration: underline;
}

html.esc-position-restoring {
    scroll-behavior: auto !important;
}

html.esc-position-restoring body {
    visibility: hidden;
}

/* =========================================================
   Mobile: town photos
========================================================= */
@media (max-width: 767px) {

    .esc-town-photos {
        width: 100%;
        padding-left: 10px;
        padding-right: 10px;
        overflow: hidden;
    }

    .esc-town-photo,
    .esc-town-photo.is-reverse {
        width: 100%;
        min-width: 0;
        grid-template-columns: minmax(0, 1fr);
    }

    .esc-town-photo-link {
        display: block;
        width: 100%;
        min-width: 0;
        max-width: 100%;
        overflow: hidden;
    }

    .esc-town-photo-image {
        display: block;
        width: 100%;
        max-width: 100%;
        height: auto;
        aspect-ratio: auto;
        object-fit: contain;
    }

    .esc-town-photo figcaption {
        width: 100%;
        min-width: 0;
        padding: 8px 4px 12px;
    }
}
/* ブログ個別記事：PCのアイキャッチ画像を縮小 */
@media (min-width: 768px) {
    .articleHeader .post-thumbnail {
        width: 70.7% !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .articleHeader .post-thumbnail img {
        display: block;
        width: 100% !important;
        height: auto !important;
        margin: 0 auto !important;
    }
}

/* =========================================================
   ブログへの導線
   ========================================================= */

.esc-blog-guide {
    margin: 10px 0 14px;
    padding: 0;
    font-size: 16px;
    line-height: 1.6;
}

.esc-blog-guide a {
    color: #c6532d;
    font-weight: 500;
    text-decoration: none;
}

.esc-blog-guide a:hover {
    text-decoration: underline;
}


/* スマホ */
@media (max-width: 767px) {
    .esc-blog-guide {
        margin: 14px 0 12px;
        padding: 0;
        font-size: 14px;
        line-height: 1.65;
    }
}

/* OpenStreetMap attribution: clickable independently from map/video cards */
.esc-progress-map-trigger,
.esc-progress-map-stack-modal,
.esc-media-with-credit {
    position: relative;
}

.esc-media-with-credit {
    min-width: 0;
}

.esc-osm-credit {
    position: absolute;
    right: 5px;
    top: 5px;
    z-index: 20;
    display: inline-block;
    padding: 2px 4px;
    border-radius: 3px;
    background: rgba(255, 255, 255, .86);
    color: #283440;
    font-size: 9px;
    line-height: 1.25;
    font-weight: 400;
    text-decoration: none;
    white-space: nowrap;
}

.esc-osm-credit:hover,
.esc-osm-credit:focus-visible {
    text-decoration: underline;
}

.esc-media-with-credit > .esc-media-card {
    width: 100%;
}

/* Town highlight photos: OSM credit at bottom-left of the image only */
.esc-highlight-image-wrap {
    position: relative;
    min-width: 0;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}
.esc-town-photo.is-reverse > .esc-highlight-image-wrap {
    order: 2;
}
.esc-highlight-image-wrap > .esc-town-photo-image {
    width: 100%;
    height: 100%;
}
.esc-osm-credit-highlight {
    top: auto;
    right: auto;
    bottom: 5px;
    left: 5px;
}
@media (max-width: 767px) {
    .esc-town-photo > .esc-highlight-image-wrap,
    .esc-town-photo.is-reverse > .esc-highlight-image-wrap {
        order: 1;
        aspect-ratio: 16 / 10;
    }
}

/* Sidebar progress-map thumbnail only: OSM attribution top-left. */
.esc-progress-map-trigger > .esc-osm-credit {
    left: 5px;
    right: auto;
}

/* OSM attribution: final placement */
.esc-osm-credit {
    position: absolute;
    top: auto;
    left: auto;
    right: 6px;
    bottom: 6px;
    z-index: 6;
    display: inline-block;
    padding: 3px 5px;
    border-radius: 3px;
    background: rgba(255,255,255,.90);
    color: #283440;
    font-size: 11px;
    line-height: 1.25;
    white-space: nowrap;
    text-decoration: none;
}
.esc-osm-credit a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.esc-osm-credit-header {
    right: 12px;
    bottom: 6px;
    background: transparent;
    color: #fff;
    font-size: 12px;
}
.esc-osm-credit-modal { right: 8px; bottom: 8px; z-index: 8; }
.esc-media-with-credit > .esc-osm-credit { right: 6px; bottom: 6px; }
/* Modal must be above all underlying thumbnail attribution overlays. */
.esc-modal { z-index: 100000; }

/* Header text position fine-tuning (2026-10-13, second adjustment) */
@media (min-width: 768px) {
    .esc-main-header-desktop .esc-main-header-title-en {
        transform: translateY(-8px);
    }
}
@media (max-width: 767px) {
    .esc-main-header-mobile .esc-main-header-title-en {
        transform: translateY(8px);
    }
    .esc-main-header-mobile .esc-osm-credit-header {
        bottom: -7px;
    }
}

/* ==================================================
   町丁写真のクリック拡大
================================================== */

.esc-town-photo-link {
    display: block;
    cursor: zoom-in;
}

.esc-town-photo-link .esc-town-photo-image {
    display: block;
    width: 100%;
}

/* 拡大表示中は背景スクロールを停止 */

body.esc-photo-zoom-open {
    overflow: hidden;
}

/* 拡大表示全体 */

.esc-photo-zoom {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
}

.esc-photo-zoom[hidden] {
    display: none;
}

/* 背景 */

.esc-photo-zoom-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
}

/* 拡大写真 */

.esc-photo-zoom-image {
    position: relative;
    z-index: 1;
    display: block;
    max-width: 100%;
    max-height: calc(100dvh - 48px);
    width: auto;
    height: auto;
    object-fit: contain;
}

/* 閉じるボタン */

.esc-photo-zoom-close {
    position: absolute;
    top: 12px;
    right: 16px;
    z-index: 2;
    width: 44px;
    height: 44px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(40, 40, 40, 0.8);
    color: #fff;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
}

/* スマートフォン */

@media (max-width: 767px) {

    .esc-photo-zoom {
        padding: 12px;
    }

    .esc-photo-zoom-image {
        max-height: calc(100dvh - 24px);
    }

    .esc-photo-zoom-close {
        top: 8px;
        right: 8px;
    }
}

/* 拡大写真のOpenStreetMapクレジット */

.esc-photo-zoom-credit {
    position: absolute;
    right: 16px;
    bottom: 12px;
    z-index: 2;
    color: #fff;
    font-size: 11px;
    line-height: 1.4;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.esc-photo-zoom-credit a {
    color: #fff;
    text-decoration: underline;
}

.esc-photo-zoom-credit a:hover {
    color: #ddd;
}

/* 進捗地図：町名ツールチップを拡大地図より前面に表示 */
.esc-town-tooltip {
    z-index: 100001;
}