* {
    box-sizing: border-box;
}

:root {
    --bi-yellow: #ffe7a6;
    --bi-yellow-soft: #fff3d5;
    --bi-yellow-pale: #fffbef;
    --bi-yellow-border: #f4d27b;
    --bi-green-soft: #e9f8fa;
    --bi-green: #64c9d3;
    --bi-brown: #205f6d;
    --bi-brown-soft: #247181;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
    color: #2b201c;
    background: #f6f8fb;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

.container {
    width: min(100% - 40px, 1160px);
    margin: 0 auto;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid #e7e2d8;
    border-bottom: 1px solid #e4ded2;
    backdrop-filter: blur(10px);
}

.site-header-inner {
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.site-header-left {
    display: flex;
    align-items: center;
    gap: 28px;
    flex: 1 1 auto;
    min-width: 0;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    line-height: 1;
}

.site-logo span {
    width: 20px;
    height: 20px;
    display: inline-block;
    border-radius: 50%;
    background:
        radial-gradient(circle at 58% 42%, #2a261f 0 22%, transparent 23%),
        #f8c83d;
}

.site-logo strong {
    color: #181512;
    font-size: 17px;
    font-weight: 900;
    letter-spacing: 0;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.site-nav a {
    flex: 0 0 auto;
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    border-radius: 6px;
    color: #5d574e;
    font-size: 13px;
    font-weight: 800;
}

.site-nav a.active,
.site-nav a:hover {
    color: #ffffff;
    background: #171717;
}

.site-quick-search {
    width: 300px;
    min-height: 34px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    padding: 4px 6px 4px 12px;
    border: 1px solid #e3ded3;
    border-radius: 7px;
    background: #faf8f3;
}

.site-quick-search input {
    min-width: 0;
    flex: 1 1 auto;
    height: 24px;
    border: 0;
    outline: 0;
    color: #332f29;
    background: transparent;
    font-size: 12px;
    font-weight: 800;
}

.site-quick-search input::placeholder {
    color: #a49d92;
}

.site-quick-search button {
    width: 48px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border: 1px solid #ded7ca;
    border-radius: 5px;
    color: #332f29;
    background: #ffffff;
    font-family: inherit;
    font-size: 11px;
    font-weight: 900;
    cursor: pointer;
}

.site-quick-search button:hover {
    border-color: #cfc5b6;
    background: #f8c83d;
}

.page-wrap {
    min-height: calc(100vh - 145px);
}

.home-shell {
    padding: 28px 0 64px;
}

.hero-banner {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(233, 184, 75, 0.32);
    border-radius: 10px;
    background: #ffd36a;
    box-shadow: 0 24px 36px rgba(57, 45, 32, 0.2);
}

.hero-banner-image {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1740 / 608;
    object-fit: contain;
}

.visitor-stats {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 14px;
}

.visitor-stat {
    min-width: 132px;
    min-height: 54px;
    display: grid;
    align-content: center;
    gap: 2px;
    padding: 8px 14px;
    border: 1px solid #e8edf4;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 10px 20px rgba(26, 34, 46, 0.05);
}

.visitor-stat span {
    color: #697586;
    font-size: 12px;
    font-weight: 900;
}

.visitor-stat strong {
    color: var(--bi-brown);
    font-size: 19px;
    line-height: 1.2;
    font-weight: 900;
}

.info-section {
    padding-top: 48px;
}

.section-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
}

.section-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--bi-yellow);
}

.section-heading h2 {
    margin: 0;
    color: #201915;
    font-size: 17px;
    font-weight: 900;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.feature-card {
    min-height: 126px;
    display: grid;
    grid-template-columns: 44px 1fr;
    grid-template-rows: 1fr auto;
    column-gap: 14px;
    row-gap: 10px;
    padding: 22px 18px 18px;
    border: 1px solid #edf1f6;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 12px 24px rgba(26, 34, 46, 0.06);
}

.feature-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 32px rgba(26, 34, 46, 0.1);
}

.feature-card[href="/schools"] {
    order: 1;
}

.feature-card[href="/meals"] {
    order: 2;
}

.feature-card[href="/academies"] {
    order: 3;
}

.feature-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 16px;
}

.feature-icon svg {
    width: 28px;
    height: 28px;
    display: block;
}

.feature-icon .icon-fill {
    fill: #ffffff;
}

.feature-icon .icon-detail {
    fill: #2b201c;
}

.feature-icon .icon-stroke {
    fill: none;
    stroke: #2b201c;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.feature-icon-blue {
    background: #b8eef3;
}

.feature-icon-green {
    background: #ffe6a8;
}

.feature-icon-yellow {
    background: #dff4a8;
}

.feature-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.feature-copy strong {
    color: #201915;
    font-size: 15px;
    font-weight: 900;
}

.feature-copy span {
    color: #667085;
    font-size: 12px;
    line-height: 1.55;
}

.feature-link {
    grid-column: 2;
    color: #141414;
    font-size: 12px;
    font-weight: 900;
    justify-self: end;
}

.quick-section {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    padding-top: 28px;
}

.quick-card {
    min-height: 108px;
    padding: 22px;
    border: 1px solid #e8edf4;
    border-radius: 8px;
    background: #ffffff;
}

.quick-card strong {
    display: block;
    margin-bottom: 8px;
    color: #1f2937;
    font-size: 16px;
    font-weight: 900;
}

.quick-card span {
    color: #697586;
    font-size: 13px;
}

.home-dashboard-shell {
    background: #faf7ef;
}

.home-hero {
    min-height: 410px;
    display: grid;
    align-items: center;
    padding: 76px 0 60px;
    border-bottom: 1px solid #ece7db;
    background:
        linear-gradient(180deg, rgba(255, 249, 236, 0.94), rgba(255, 255, 255, 0.92)),
        repeating-linear-gradient(90deg, rgba(42, 36, 28, 0.035) 0 1px, transparent 1px 96px);
}

.home-hero-inner {
    display: grid;
    justify-items: center;
    text-align: center;
}

.home-data-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 30px;
    padding: 0 14px;
    border: 1px solid #ddd6c7;
    border-radius: 999px;
    color: #585247;
    background: #ffffff;
    font-size: 13px;
    font-weight: 800;
    box-shadow: 0 8px 22px rgba(49, 42, 31, 0.08);
}

.home-data-pill span {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #20c06b;
    box-shadow: 0 0 0 4px rgba(32, 192, 107, 0.12);
}

.home-hero h1 {
    margin: 24px 0 10px;
    color: #181512;
    font-size: 48px;
    line-height: 1.18;
    font-weight: 900;
    letter-spacing: 0;
}

.home-hero p {
    margin: 0;
    color: #6f6a60;
    font-size: 16px;
    font-weight: 700;
}

.home-search-panel {
    width: min(100%, 740px);
    min-height: 64px;
    display: grid;
    grid-template-columns: 192px minmax(0, 1fr) 92px;
    align-items: center;
    gap: 12px;
    margin-top: 32px;
    padding: 8px;
    border: 1px solid #ded8cd;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 14px 32px rgba(35, 31, 24, 0.12);
}

.home-search-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    padding-right: 12px;
    border-right: 1px solid #e7e1d6;
}

.home-search-tabs button {
    min-height: 42px;
    border: 0;
    border-radius: 8px;
    color: #4f4a42;
    background: transparent;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
}

.home-search-tabs button:hover,
.home-search-tabs button:focus-visible {
    color: #191714;
    background: #f4f1eb;
}

.home-search-panel input {
    width: 100%;
    min-height: 46px;
    border: 0;
    outline: 0;
    color: #2f2a24;
    background: transparent;
    font-size: 14px;
    font-weight: 700;
}

.home-search-panel input::placeholder {
    color: #a09a90;
}

.home-search-button {
    min-height: 46px;
    border: 0;
    border-radius: 8px;
    color: #191714;
    background: #f8c83d;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
}

.home-search-button:hover {
    background: #ffd65d;
}

.home-topic-row {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 22px;
}

.home-topic-row a {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    padding: 0 14px;
    border: 1px solid #e6dfd1;
    border-radius: 999px;
    color: #504a42;
    background: rgba(255, 255, 255, 0.82);
    font-size: 13px;
    font-weight: 800;
}

.home-topic-row a:hover {
    border-color: #d5c8ad;
    background: #ffffff;
}

.home-dashboard-grid {
    display: grid;
    grid-template-columns: 1.08fr 1fr 1fr;
    gap: 18px;
    padding: 32px 0 72px;
}

.home-middle-column,
.home-right-column {
    display: grid;
    gap: 18px;
}

.home-card {
    min-width: 0;
    padding: 22px;
    border: 1px solid #e5dfd3;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 10px 22px rgba(35, 31, 24, 0.04);
}

.home-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.home-card-head h2 {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: #211d18;
    font-size: 15px;
    line-height: 1.35;
    font-weight: 900;
}

.home-card-head h2 span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ef4444;
}

.home-card-head small,
.home-card-head a {
    color: #91897c;
    font-size: 12px;
    font-weight: 800;
}

.home-rank-card {
    min-height: 544px;
    display: flex;
    flex-direction: column;
}

.home-rank-list {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.home-rank-list li {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) 42px;
    align-items: center;
    gap: 12px;
    min-height: 68px;
    border-bottom: 1px solid #f0ece4;
}

.home-rank-list b {
    color: #e2ab17;
    font-size: 17px;
    font-weight: 900;
}

.home-rank-list span {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.home-rank-list strong {
    overflow: hidden;
    color: #242019;
    font-size: 14px;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-rank-list small {
    color: #847d72;
    font-size: 12px;
    font-weight: 700;
}

.home-rank-list em {
    color: #17a95a;
    font-size: 12px;
    font-style: normal;
    font-weight: 900;
    text-align: right;
}

.home-card-link {
    margin-top: auto;
    color: #211d18;
    font-size: 13px;
    font-weight: 900;
}

.home-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.home-stat-grid div {
    min-height: 112px;
    display: grid;
    align-content: center;
    gap: 6px;
    padding: 16px;
    border-radius: 6px;
    background: #faf9f6;
}

.home-stat-grid span {
    color: #837b70;
    font-size: 12px;
    font-weight: 800;
}

.home-stat-grid strong {
    color: #201d18;
    font-size: 28px;
    line-height: 1;
    font-weight: 900;
}

.home-stat-grid small {
    color: #0ca35a;
    font-size: 12px;
    font-weight: 900;
}

.home-meal-list,
.home-academy-list {
    display: grid;
    gap: 10px;
}

.home-meal-list article,
.home-academy-list article {
    min-height: 62px;
    display: grid;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 6px;
    background: #fbfaf7;
}

.home-meal-list article {
    grid-template-columns: minmax(0, 1fr) auto;
}

.home-meal-list strong,
.home-academy-list strong {
    display: block;
    overflow: hidden;
    color: #242019;
    font-size: 13px;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-meal-list p,
.home-academy-list p,
.home-map-card p {
    margin: 4px 0 0;
    color: #81786b;
    font-size: 12px;
    line-height: 1.45;
    font-weight: 700;
}

.home-meal-list article > span {
    min-width: 68px;
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    color: #8d6a00;
    background: #fff0af;
    font-size: 12px;
    font-weight: 900;
}

.home-empty {
    margin: 0;
    color: #847d72;
    font-size: 13px;
    font-weight: 800;
}

.home-map-preview {
    position: relative;
    display: block;
    height: 190px;
    overflow: hidden;
    border-radius: 6px;
    background:
        linear-gradient(90deg, rgba(255, 203, 63, 0.75) 0 4px, transparent 4px),
        linear-gradient(0deg, rgba(255, 203, 63, 0.75) 0 4px, transparent 4px),
        repeating-linear-gradient(90deg, #e8eadf 0 46px, #ffffff 46px 52px),
        repeating-linear-gradient(0deg, transparent 0 52px, rgba(107, 154, 204, 0.18) 52px 92px),
        #eef1e7;
    background-position: 55% 0, 0 50%, 0 0, 0 0, 0 0;
}

.home-map-preview::before,
.home-map-preview::after {
    content: "";
    position: absolute;
    border-radius: 8px;
    background: rgba(155, 199, 112, 0.38);
}

.home-map-preview::before {
    width: 132px;
    height: 52px;
    left: 46px;
    top: 54px;
}

.home-map-preview::after {
    width: 120px;
    height: 74px;
    right: 24px;
    bottom: 22px;
}

.map-pin {
    position: absolute;
    z-index: 1;
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    border-radius: 999px;
    color: #1f1b16;
    font-size: 12px;
    font-weight: 900;
    box-shadow: 0 8px 16px rgba(35, 31, 24, 0.16);
}

.map-pin-dark {
    left: 104px;
    top: 40px;
    color: #ffffff;
    background: #2d2a24;
}

.map-pin-yellow {
    right: 86px;
    top: 78px;
    background: #f8c83d;
}

.map-pin-light {
    left: 78px;
    bottom: 52px;
    background: #ffd65d;
}

.home-academy-list article {
    grid-template-columns: 44px minmax(0, 1fr);
}

.home-academy-list article > span {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    color: #9b7100;
    background: #fff0af;
    font-size: 12px;
    font-weight: 900;
}

.school-rank-shell {
    padding: 42px 0 72px;
    background: #f6f8fb;
}

.school-rank-container {
    display: grid;
    gap: 24px;
}

.school-rank-heading {
    display: grid;
    gap: 22px;
}

.school-rank-heading h1 {
    margin: 0;
    color: #111827;
    font-size: 32px;
    line-height: 1.25;
    font-weight: 900;
    letter-spacing: 0;
}

.school-search-form {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 190px 190px 170px;
    gap: 12px;
    align-items: center;
    padding: 16px;
    border: 1px solid #e3e9f0;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 14px 30px rgba(26, 34, 46, 0.05);
}

.school-search-box {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 92px;
    min-height: 48px;
    border: 1px solid #dde8ef;
    border-radius: 8px;
    overflow: hidden;
    background: #f9fbfd;
}

.school-search-box input,
.school-search-form select {
    width: 100%;
    min-height: 48px;
    border: 1px solid #dde8ef;
    border-radius: 8px;
    color: #344054;
    background: #ffffff;
    font-size: 14px;
    font-weight: 800;
}

.school-search-box input {
    border: 0;
    padding: 0 16px;
    background: transparent;
}

.school-search-box input::placeholder {
    color: #98a6b5;
}

.school-search-form select {
    padding: 0 15px;
}

.meal-search-form {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 180px;
    gap: 12px;
    align-items: center;
    padding: 16px;
    border: 1px solid #e3e9f0;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 14px 30px rgba(26, 34, 46, 0.05);
}

.meal-shell,
.meal-calendar-shell,
.meal-landing-shell,
.subpage-shell:has(.meal-home-search-form) {
    background:
        radial-gradient(circle at 14% 10%, rgba(248, 200, 61, 0.16), transparent 28%),
        radial-gradient(circle at 88% 8%, rgba(100, 201, 211, 0.14), transparent 24%),
        linear-gradient(180deg, #fffaf0 0%, #fbfaf7 48%, #f7fbfb 100%);
}

.meal-shell .school-rank-heading,
.meal-landing-shell .page-heading,
.subpage-shell:has(.meal-home-search-form) .page-heading {
    position: relative;
    display: grid;
    justify-items: center;
    text-align: center;
    margin-inline: auto;
    padding: 34px 0 12px;
}

.meal-shell .school-rank-heading::before,
.meal-landing-shell .page-heading::before,
.subpage-shell:has(.meal-home-search-form) .page-heading::before {
    content: "";
    width: 56px;
    height: 56px;
    margin-bottom: 14px;
    border-radius: 18px;
    background:
        radial-gradient(circle at 32% 34%, #fff8dc 0 10%, transparent 11%),
        radial-gradient(circle at 65% 35%, #fff8dc 0 10%, transparent 11%),
        linear-gradient(135deg, #f8c83d, #ffdf74);
    box-shadow: inset 0 -8px 0 rgba(183, 126, 23, 0.18), 0 16px 28px rgba(174, 126, 32, 0.18);
}

.meal-shell .school-rank-heading h1,
.meal-landing-shell .page-heading h1,
.subpage-shell:has(.meal-home-search-form) .page-heading h1 {
    margin: 12px 0 8px;
    color: #171717;
    font-size: 38px;
    line-height: 1.18;
    font-weight: 900;
    letter-spacing: 0;
}

.meal-shell .school-rank-heading p,
.meal-landing-shell .page-heading p,
.subpage-shell:has(.meal-home-search-form) .page-heading p {
    max-width: 620px;
    margin: 0;
    color: #736b61;
    font-size: 15px;
    font-weight: 800;
}

.meal-home-search-form,
.meal-search-form {
    width: min(100%, 700px);
    margin: 26px auto 32px;
    padding: 10px;
    border: 1px solid #e3dbcf;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 14px 30px rgba(46, 38, 24, 0.09);
}

.meal-school-search-form {
    width: min(100%, 780px);
}

.meal-home-search-form .school-search-box,
.meal-search-form .school-search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    border: 0;
    border-radius: 0;
    overflow: visible;
    background: transparent;
}

.meal-home-search-form .school-search-box input,
.meal-search-form .school-search-box input {
    height: 52px;
    min-height: 52px;
    flex: 1 1 auto;
    border-radius: 10px;
    background: #fbfaf7;
    color: #2b251d;
    font-size: 15px;
}

.meal-home-search-form .school-search-box input::placeholder,
.meal-search-form .school-search-box input::placeholder {
    color: #a79f93;
}

.meal-home-search-form .school-search-button,
.meal-search-form .school-search-button,
.meal-month-form .school-search-button {
    width: 92px;
    min-height: 52px;
    flex: 0 0 92px;
    margin: 0;
    border-radius: 10px;
    color: #191714;
    background: #f8c83d;
    box-shadow: 0 8px 16px rgba(248, 200, 61, 0.25);
}

.meal-home-search-form .school-search-button:hover,
.meal-search-form .school-search-button:hover,
.meal-month-form .school-search-button:hover {
    background: #ffdc69;
}

.meal-school-grid {
    gap: 16px;
}

.meal-school-card {
    position: relative;
    overflow: hidden;
    min-height: 158px;
    padding: 20px;
    border: 1px solid #e8dfd0;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 12px 26px rgba(46, 38, 24, 0.06);
}

.meal-school-card::after {
    content: "";
    position: absolute;
    right: -18px;
    top: -18px;
    width: 82px;
    height: 82px;
    border-radius: 26px;
    background:
        radial-gradient(circle at 36% 36%, #ffffff 0 8%, transparent 9%),
        linear-gradient(135deg, rgba(248, 200, 61, 0.28), rgba(100, 201, 211, 0.20));
    transform: rotate(14deg);
}

.meal-school-card:hover {
    border-color: #f8c83d;
    box-shadow: 0 18px 34px rgba(46, 38, 24, 0.11);
}

.meal-school-card .school-type-label {
    width: fit-content;
    border-radius: 8px;
    color: #7b5800;
    background: #fff0af;
}

.meal-school-card strong {
    position: relative;
    z-index: 1;
    color: #1d1a15;
    font-size: 19px;
}

.meal-school-card span:not(.school-type-label),
.meal-school-card small {
    position: relative;
    z-index: 1;
    color: #756d62;
    font-weight: 800;
}

.region-grid .region-card[href^="/meals/"] {
    position: relative;
    overflow: hidden;
    border-color: #e8dfd0;
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 252, 244, 0.96));
}

.region-grid .region-card[href^="/meals/"]::before {
    content: "";
    width: 38px;
    height: 38px;
    border-radius: 13px;
    background:
        radial-gradient(circle at 35% 35%, #fff7d6 0 13%, transparent 14%),
        linear-gradient(135deg, #f8c83d, #ffdf74);
    box-shadow: inset 0 -5px 0 rgba(183, 126, 23, 0.16);
}

.region-grid .region-card[href^="/meals/"]:hover {
    border-color: #f8c83d;
}

.meal-search-form input[type="date"] {
    width: 100%;
    min-height: 48px;
    border: 1px solid #dde8ef;
    border-radius: 8px;
    padding: 0 14px;
    color: #344054;
    background: #ffffff;
    font-size: 14px;
    font-weight: 800;
}

.meal-school-search-form {
    grid-template-columns: minmax(260px, 1fr);
}

.meal-date-form {
    display: grid;
    grid-template-columns: 180px 92px;
    gap: 12px;
    align-items: center;
    padding: 16px;
    border: 1px solid #e3e9f0;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 14px 30px rgba(26, 34, 46, 0.05);
}

.meal-date-form input[type="date"] {
    width: 100%;
    min-height: 48px;
    border: 1px solid #dde8ef;
    border-radius: 8px;
    padding: 0 14px;
    color: #344054;
    background: #ffffff;
    font-size: 14px;
    font-weight: 800;
}

.school-search-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    color: var(--bi-brown);
    background: var(--bi-yellow);
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
    transition: background 0.16s ease, transform 0.16s ease;
}

.school-search-button:hover {
    background: var(--bi-yellow-soft);
    transform: translateY(-1px);
}

.school-search-button span {
    font-size: 16px;
    line-height: 1;
}

.meal-list {
    display: grid;
    gap: 14px;
}

.meal-school-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.meal-school-card {
    display: flex;
    min-height: 150px;
    flex-direction: column;
    gap: 8px;
    padding: 18px;
    border: 1px solid #e4ebf3;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 12px 24px rgba(26, 34, 46, 0.05);
}

.meal-school-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 32px rgba(26, 34, 46, 0.1);
}

.meal-school-card strong {
    color: #111827;
    font-size: 18px;
    font-weight: 900;
    letter-spacing: 0;
}

.meal-school-card span:not(.school-type-label),
.meal-school-card small {
    color: #667085;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.45;
}

.meal-home-search-form {
    width: min(100%, 700px);
    margin: 26px auto 32px;
    padding: 10px;
    border: 1px solid #e3dbcf;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 14px 30px rgba(46, 38, 24, 0.09);
}

.meal-search-results {
    display: grid;
    gap: 16px;
    margin-bottom: 30px;
}

.meal-card {
    display: grid;
    gap: 16px;
    padding: 20px;
    border: 1px solid #e4ebf3;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 12px 24px rgba(26, 34, 46, 0.05);
}

.meal-card-head h2 {
    margin: 8px 0 4px;
    color: #111827;
    font-size: 20px;
    font-weight: 900;
    letter-spacing: 0;
}

.meal-card-head p {
    margin: 0;
    color: #667085;
    font-size: 13px;
    font-weight: 700;
}

.meal-items {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.meal-item {
    min-height: 150px;
    padding: 16px;
    border: 1px solid #edf1f6;
    border-radius: 8px;
    background: #fbfcfe;
}

.meal-item strong {
    display: block;
    margin-bottom: 10px;
    color: #201915;
    font-size: 15px;
    font-weight: 900;
}

.meal-item p {
    margin: 0;
    color: #475467;
    font-size: 13px;
    line-height: 1.65;
}

.meal-item small {
    display: block;
    margin-top: 12px;
    color: #667085;
    font-size: 12px;
    font-weight: 800;
}

.meal-calendar-shell {
    padding: 34px 0 72px;
    background: #f6f8fb;
}

.meal-calendar-container {
    display: grid;
    gap: 18px;
}

.meal-calendar-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.meal-action-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.meal-month-form {
    display: grid;
    grid-template-columns: 160px 82px;
    gap: 10px;
    align-items: center;
}

.meal-month-form input[type="month"] {
    min-height: 42px;
    border: 1px solid #cfd8e3;
    border-radius: 8px;
    padding: 0 12px;
    background: #ffffff;
    color: #344054;
    font-size: 14px;
    font-weight: 800;
}

.meal-print-button {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    border: 1px solid #cfd8e3;
    border-radius: 8px;
    color: #344054;
    background: #ffffff;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
}

.meal-print-button:hover {
    border-color: #171717;
    color: #ffffff;
    background: #171717;
}

.meal-print-button::before {
    content: "⎙";
    margin-right: 6px;
    font-size: 15px;
    line-height: 1;
}

.meal-calendar-board {
    border: 2px solid #1f2933;
    background: #ffffff;
}

.meal-calendar-title {
    display: grid;
    grid-template-columns: 136px 1fr 136px;
    min-height: 116px;
    border-bottom: 2px solid #1f2933;
}

.meal-calendar-title > div {
    display: grid;
    place-items: center;
    text-align: center;
}

.meal-calendar-title > div:nth-child(2) {
    border-left: 2px solid #1f2933;
    border-right: 2px solid #1f2933;
    padding: 18px 20px;
}

.meal-calendar-title span {
    color: #667085;
    font-size: 14px;
    font-weight: 900;
}

.meal-calendar-title h1 {
    margin: 6px 0;
    color: #111111;
    font-size: 38px;
    line-height: 1.1;
    font-weight: 900;
    letter-spacing: 0.12em;
}

.meal-calendar-title p {
    margin: 0;
    color: #475467;
    font-size: 13px;
    font-weight: 800;
}

.meal-title-figure::before,
.meal-title-figure-alt::before {
    content: "";
    width: 54px;
    height: 54px;
    border-radius: 50% 50% 45% 45%;
    background:
        radial-gradient(circle at 34% 34%, #fff7d6 0 12%, transparent 13%),
        radial-gradient(circle at 66% 34%, #fff7d6 0 12%, transparent 13%),
        linear-gradient(135deg, #ffd36a, #f5a24a);
    box-shadow: 0 10px 0 #8a5b34;
}

.meal-title-figure-alt::before {
    background:
        radial-gradient(circle at 34% 34%, #fff7d6 0 12%, transparent 13%),
        radial-gradient(circle at 66% 34%, #fff7d6 0 12%, transparent 13%),
        linear-gradient(135deg, #ffc5d4, #f08a9c);
}

.meal-calendar-weekdays,
.meal-calendar-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.meal-calendar-weekdays {
    border-bottom: 2px solid #1f2933;
}

.meal-calendar-weekdays div {
    min-height: 34px;
    display: grid;
    place-items: center;
    border-right: 1px solid #1f2933;
    color: #111111;
    font-size: 15px;
    font-weight: 900;
}

.meal-calendar-weekdays div:last-child {
    border-right: 0;
}

.meal-day {
    min-height: 214px;
    padding: 8px 9px 10px;
    border-right: 1px solid #1f2933;
    border-bottom: 1px solid #1f2933;
    background: #ffffff;
    color: #111111;
    overflow-wrap: anywhere;
}

.meal-day:nth-child(5n) {
    border-right: 0;
}

.meal-day strong {
    display: block;
    margin-bottom: 6px;
    text-align: center;
    font-size: 15px;
    font-weight: 900;
}

.meal-day.outside-month {
    background: #f8fafc;
}

.meal-day-item {
    display: grid;
    gap: 5px;
    padding-top: 2px;
    text-align: center;
}

.meal-day-item + .meal-day-item {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #cbd5e1;
}

.meal-day-item b {
    color: #7c2d12;
    font-size: 12px;
    font-weight: 900;
}

.meal-day-item p {
    margin: 0;
    color: #111827;
    font-size: 13px;
    line-height: 1.45;
    font-weight: 700;
}

.meal-day-item small,
.meal-empty-day {
    color: #667085;
    font-size: 11px;
    font-weight: 800;
}

.meal-empty-day {
    display: block;
    margin-top: 18px;
    text-align: center;
}

.meal-day-item details {
    margin-top: 4px;
    text-align: left;
}

.meal-day-item summary {
    color: #344054;
    font-size: 11px;
    font-weight: 900;
    cursor: pointer;
}

.meal-day-item em {
    display: block;
    margin-top: 7px;
    color: #111827;
    font-size: 11px;
    font-style: normal;
    font-weight: 900;
}

.meal-day-item details span {
    display: block;
    margin-top: 3px;
    color: #475467;
    font-size: 11px;
    line-height: 1.45;
}

/* Refined meal calendar */
.meal-calendar-shell {
    padding: 30px 0 76px;
    background:
        radial-gradient(circle at 12% 8%, rgba(248, 200, 61, 0.18), transparent 28%),
        radial-gradient(circle at 92% 6%, rgba(100, 201, 211, 0.15), transparent 24%),
        linear-gradient(180deg, #fffaf0 0%, #fbfaf7 48%, #f7fbfb 100%);
}

.meal-calendar-actions {
    padding: 10px 0 4px;
}

.meal-action-controls {
    flex-wrap: wrap;
}

.meal-month-form {
    grid-template-columns: 170px 86px;
    padding: 8px;
    border: 1px solid #e4ddd1;
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 12px 28px rgba(46, 38, 24, 0.08);
}

.meal-month-form input[type="month"] {
    min-height: 46px;
    border-color: #ddd5c8;
    border-radius: 10px;
    background: #fbfaf7;
    color: #2b251d;
}

.meal-print-button {
    min-height: 62px;
    padding: 0 18px;
    border-color: #e4ddd1;
    border-radius: 13px;
    color: #2b251d;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 12px 28px rgba(46, 38, 24, 0.08);
}

.meal-calendar-board {
    overflow: hidden;
    border: 1px solid #e5ddd1;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 20px 46px rgba(46, 38, 24, 0.10);
}

.meal-calendar-title {
    grid-template-columns: 118px 1fr 118px;
    min-height: 148px;
    border-bottom: 1px solid #eee7dc;
    background:
        linear-gradient(90deg, rgba(255, 240, 175, 0.58), rgba(255, 255, 255, 0.7), rgba(232, 248, 250, 0.72)),
        #ffffff;
}

.meal-calendar-title > div:nth-child(2) {
    border-left: 1px solid rgba(232, 225, 211, 0.72);
    border-right: 1px solid rgba(232, 225, 211, 0.72);
    padding: 22px 20px;
}

.meal-calendar-title span {
    width: fit-content;
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    justify-self: center;
    padding: 0 12px;
    border-radius: 999px;
    color: #7b5800;
    background: #fff0af;
    font-size: 13px;
}

.meal-calendar-title h1 {
    margin: 12px 0 8px;
    color: #171717;
    font-size: 40px;
    letter-spacing: 0;
}

.meal-calendar-title p {
    color: #756d62;
    font-weight: 900;
}

.meal-title-figure::before,
.meal-title-figure-alt::before {
    width: 64px;
    height: 64px;
    border-radius: 21px;
    background:
        radial-gradient(circle at 34% 34%, #fff7d6 0 10%, transparent 11%),
        radial-gradient(circle at 66% 34%, #fff7d6 0 10%, transparent 11%),
        linear-gradient(135deg, #f8c83d, #ffdf74);
    box-shadow: inset 0 -9px 0 rgba(183, 126, 23, 0.18), 0 14px 24px rgba(174, 126, 32, 0.16);
    transform: rotate(-8deg);
}

.meal-title-figure-alt::before {
    background:
        radial-gradient(circle at 34% 34%, #fff7d6 0 10%, transparent 11%),
        radial-gradient(circle at 66% 34%, #fff7d6 0 10%, transparent 11%),
        linear-gradient(135deg, #64c9d3, #b8eef3);
    transform: rotate(8deg);
}

.meal-calendar-weekdays,
.meal-calendar-grid {
    gap: 10px;
    padding-left: 14px;
    padding-right: 14px;
    background: #ffffff;
}

.meal-calendar-weekdays {
    padding-top: 12px;
    border-bottom: 0;
}

.meal-calendar-grid {
    padding-top: 12px;
    padding-bottom: 14px;
}

.meal-calendar-weekdays div {
    min-height: 38px;
    border: 0;
    border-radius: 999px;
    color: #5d554b;
    background: #fbfaf7;
    font-size: 13px;
}

.meal-day,
.meal-day:nth-child(5n) {
    min-height: 226px;
    padding: 12px;
    border: 1px solid #eee7dc;
    border-radius: 14px;
    background: #fffdf8;
    color: #171717;
    box-shadow: 0 8px 18px rgba(46, 38, 24, 0.04);
}

.meal-day strong {
    width: fit-content;
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    margin-bottom: 10px;
    padding: 0 10px;
    border-radius: 999px;
    color: #7b5800;
    background: #fff0af;
    text-align: left;
    font-size: 13px;
}

.meal-day.outside-month {
    opacity: 0.55;
    background: #f8f6f0;
}

.meal-day-item {
    gap: 7px;
    padding: 10px;
    border: 1px solid #f0eadf;
    border-radius: 12px;
    background: #ffffff;
    text-align: left;
}

.meal-day-item + .meal-day-item {
    border-top: 1px solid #f0eadf;
}

.meal-day-item b {
    width: fit-content;
    min-height: 22px;
    display: inline-flex;
    align-items: center;
    padding: 0 8px;
    border-radius: 6px;
    color: #1e7242;
    background: #d5f2df;
}

.meal-day-item p {
    color: #2b251d;
    line-height: 1.55;
    font-weight: 800;
}

.meal-day-item small,
.meal-empty-day {
    color: #8b8377;
}

.meal-empty-day {
    margin-top: 14px;
    padding: 14px 8px;
    border: 1px dashed #e5ddd1;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.58);
}

.meal-day-item summary {
    color: #5d554b;
}

.rank-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 0;
    border-top: 0;
}

.rank-title-row p {
    margin: 0;
    color: #667085;
    font-size: 15px;
    font-weight: 900;
}

.rank-title-row small {
    margin-left: 8px;
    font-size: 12px;
    color: #8a96a3;
}

.rank-method {
    position: relative;
    color: var(--bi-brown);
    font-size: 13px;
    font-weight: 900;
}

.rank-method summary {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    border: 1px solid var(--bi-yellow-border);
    border-radius: 999px;
    background: #ffffff;
    cursor: pointer;
}

.rank-method-panel {
    position: absolute;
    right: 0;
    top: 32px;
    z-index: 3;
    width: min(430px, calc(100vw - 40px));
    padding: 16px;
    border: 1px solid #e3e9f0;
    border-radius: 8px;
    color: #526274;
    background: #ffffff;
    box-shadow: 0 16px 32px rgba(26, 34, 46, 0.1);
    font-size: 13px;
    line-height: 1.5;
    font-weight: 700;
}

.rank-method-formula {
    display: grid;
    gap: 5px;
    margin-bottom: 12px;
    padding: 12px;
    border: 1px solid #dceff2;
    border-radius: 8px;
    color: #155b64;
    background: #f2fbfc;
}

.rank-method-formula b {
    color: #123f46;
    font-size: 13px;
}

.rank-method-formula span {
    color: #315c63;
    font-size: 12px;
    word-break: keep-all;
}

.rank-method-panel dl {
    display: grid;
    gap: 8px;
    margin: 0;
}

.rank-method-panel dl div {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
}

.rank-method-panel dt {
    color: #1f2937;
    font-weight: 900;
}

.rank-method-panel dd {
    margin: 0;
    color: #667085;
    font-weight: 700;
    word-break: keep-all;
}

.school-rank-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.school-rank-card {
    min-height: 112px;
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    align-items: center;
    gap: 18px;
    padding: 18px 22px;
    border: 1px solid #e3e9f0;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 14px 28px rgba(26, 34, 46, 0.04);
    transition: border-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.school-rank-card:hover {
    border-color: var(--bi-yellow-border);
    box-shadow: 0 18px 34px rgba(26, 34, 46, 0.08);
    transform: translateY(-2px);
}

.rank-medal {
    width: fit-content;
    min-width: 52px;
    height: 30px;
    display: grid;
    place-items: center;
    justify-self: start;
    align-self: start;
    padding: 0 11px;
    border: 0;
    border-radius: 999px;
    color: var(--bi-brown);
    background: var(--bi-yellow-soft);
    box-shadow: none;
    font-size: 13px;
    font-weight: 900;
}

.rank-school-copy {
    display: grid;
    gap: 7px;
}

.school-type-label {
    width: fit-content;
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    padding: 0 10px;
    border-radius: 999px;
    color: var(--bi-brown);
    background: var(--bi-green-soft);
    font-size: 12px;
    font-weight: 900;
}

.rank-school-copy h2 {
    margin: 0;
    color: #111827;
    font-size: 21px;
    line-height: 1.25;
    font-weight: 900;
    word-break: keep-all;
}

.school-rank-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    margin-top: 2px;
    color: #667085;
    font-size: 13px;
    font-weight: 700;
}

.school-rank-meta span + span::before {
    content: "·";
    margin-right: 18px;
    color: #a7b1bc;
}

.school-rank-meta span + span::before {
    content: none;
    margin-right: 0;
}

.empty-state {
    display: grid;
    gap: 8px;
    padding: 42px;
    border: 1px solid #e4eaf3;
    border-radius: 8px;
    text-align: center;
    background: #ffffff;
}

.empty-state strong {
    color: #202226;
    font-size: 18px;
    font-weight: 900;
}

.empty-state span,
.school-source-note {
    color: #758493;
    font-size: 13px;
}

.school-source-note {
    margin: 0;
}

.school-detail-shell {
    padding: 34px 0 72px;
    background:
        radial-gradient(circle at 12% 8%, rgba(248, 200, 61, 0.14), transparent 28%),
        radial-gradient(circle at 90% 4%, rgba(100, 201, 211, 0.13), transparent 24%),
        linear-gradient(180deg, #fffaf0 0%, #f7fbfb 100%);
}

.middle-school-rank-shell,
.middle-school-detail-shell {
    background:
        radial-gradient(circle at 12% 8%, rgba(100, 201, 211, 0.16), transparent 28%),
        radial-gradient(circle at 90% 4%, rgba(248, 200, 61, 0.13), transparent 24%),
        linear-gradient(180deg, #f7fbfb 0%, #fffaf0 100%);
}

.middle-school-rank-shell .rank-medal,
.middle-school-detail-shell .school-detail-rank {
    background:
        radial-gradient(circle at 35% 35%, #e9f8fa 0 13%, transparent 14%),
        linear-gradient(135deg, #64c9d3, #b8eef3);
}

.school-detail-container {
    display: grid;
    gap: 20px;
}

.school-detail-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    color: #736b61;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.school-detail-breadcrumb a:hover {
    color: #171717;
}

.school-detail-breadcrumb strong {
    color: #171717;
}

.school-detail-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px;
    gap: 22px;
    align-items: stretch;
    padding: 30px;
    border: 1px solid #e8dfd0;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 18px 36px rgba(46, 38, 24, 0.08);
}

.school-detail-hero h1 {
    margin: 14px 0 8px;
    color: #171717;
    font-size: 38px;
    line-height: 1.16;
    font-weight: 900;
    letter-spacing: 0;
    word-break: keep-all;
}

.school-detail-hero p {
    margin: 0;
    color: #736b61;
    font-size: 15px;
    font-weight: 800;
}

.school-detail-rank {
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 5px;
    min-height: 150px;
    border-radius: 13px;
    color: #2b201c;
    background:
        radial-gradient(circle at 36% 34%, #fff7d6 0 10%, transparent 11%),
        radial-gradient(circle at 64% 34%, #fff7d6 0 10%, transparent 11%),
        linear-gradient(135deg, #f8c83d, #ffdf74);
    box-shadow: inset 0 -8px 0 rgba(183, 126, 23, 0.16);
}

.school-detail-rank span,
.school-detail-rank small {
    font-size: 12px;
    font-weight: 900;
}

.school-detail-rank strong {
    font-size: 42px;
    line-height: 1;
    font-weight: 900;
}

.school-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.school-detail-action {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    border: 1px solid #e3dbcf;
    border-radius: 8px;
    color: #2b201c;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 10px 20px rgba(43, 32, 28, 0.06);
    font-size: 14px;
    font-weight: 900;
}

.school-detail-action.primary,
.school-detail-action:hover {
    border-color: #d5a431;
    background: #f8c83d;
}

.school-detail-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.school-detail-stats div,
.school-detail-section {
    border: 1px solid #e8dfd0;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 12px 26px rgba(46, 38, 24, 0.06);
}

.school-detail-stats div {
    min-height: 142px;
    display: grid;
    align-content: center;
    gap: 6px;
    padding: 18px;
}

.school-detail-stats span {
    color: #736b61;
    font-size: 12px;
    font-weight: 900;
}

.school-detail-stats strong {
    color: #171717;
    font-size: 28px;
    line-height: 1.1;
    font-weight: 900;
}

.school-detail-stats small {
    margin-left: 2px;
    font-size: 14px;
}

.school-detail-stats p {
    margin: 0;
    color: #847d72;
    font-size: 12px;
    line-height: 1.45;
    font-weight: 800;
}

.school-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.school-detail-section {
    padding: 22px;
}

.school-detail-section h2 {
    margin: 0 0 16px;
    color: #171717;
    font-size: 18px;
    font-weight: 900;
    letter-spacing: 0;
}

.school-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.school-section-head h2 {
    margin-bottom: 5px;
}

.school-section-head p {
    margin: 0;
    color: #847d72;
    font-size: 13px;
    font-weight: 800;
}

.school-section-link {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    padding: 0 12px;
    border: 1px solid #e3dbcf;
    border-radius: 8px;
    color: #2b201c;
    background: #fffdf8;
    font-size: 13px;
    font-weight: 900;
}

.school-section-link:hover {
    border-color: #d5a431;
    background: #fff0af;
}

.school-detail-table {
    display: grid;
    gap: 0;
    margin: 0;
}

.school-detail-table div {
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr);
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid #f0eadf;
}

.school-detail-table div:last-child {
    border-bottom: 0;
}

.school-detail-table dt {
    color: #8b8377;
    font-size: 13px;
    font-weight: 900;
}

.school-detail-table dd {
    min-width: 0;
    margin: 0;
    color: #2b251d;
    font-size: 14px;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.school-history-table {
    display: grid;
    overflow-x: auto;
}

.school-history-table > div {
    min-width: 720px;
    display: grid;
    grid-template-columns: 0.8fr 1fr 1.2fr 1.2fr 1fr;
    gap: 12px;
    padding: 13px 0;
    border-bottom: 1px solid #f0eadf;
    color: #2b251d;
    font-size: 14px;
    font-weight: 800;
}

.school-history-table > div:last-child {
    border-bottom: 0;
}

.school-history-table .school-history-head {
    color: #736b61;
    font-size: 12px;
    font-weight: 900;
}

.school-nearby-list {
    display: grid;
    gap: 10px;
}

.school-nearby-list a {
    min-height: 66px;
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) 74px;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid #f0eadf;
    border-radius: 10px;
    background: #fffdf8;
}

.school-nearby-list a:hover {
    border-color: #f8c83d;
    background: #ffffff;
}

.school-nearby-list b {
    color: #7b5800;
    font-size: 15px;
    font-weight: 900;
}

.school-nearby-list span {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.school-nearby-list strong {
    overflow: hidden;
    color: #171717;
    font-size: 14px;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.school-nearby-list small {
    color: #847d72;
    font-size: 12px;
    font-weight: 800;
}

.school-nearby-list em {
    color: #1e7242;
    font-size: 13px;
    font-style: normal;
    font-weight: 900;
    text-align: right;
}

.school-academy-map-layout {
    display: grid;
    grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.1fr);
    gap: 16px;
    align-items: start;
}

.school-academy-map {
    position: sticky;
    top: 76px;
    min-height: 430px;
    overflow: hidden;
    border: 1px solid #e5ddd1;
    border-radius: 14px;
    background:
        linear-gradient(90deg, rgba(248, 200, 61, 0.55) 0 5px, transparent 5px),
        linear-gradient(0deg, rgba(248, 200, 61, 0.55) 0 5px, transparent 5px),
        repeating-linear-gradient(90deg, #e8eadf 0 46px, #ffffff 46px 54px),
        repeating-linear-gradient(0deg, transparent 0 54px, rgba(100, 201, 211, 0.16) 54px 92px),
        #eef1e7;
    background-position: 51% 0, 0 48%, 0 0, 0 0, 0 0;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65);
}

.school-academy-map::before,
.school-academy-map::after {
    content: "";
    position: absolute;
    border-radius: 12px;
    background: rgba(155, 199, 112, 0.36);
}

.school-academy-map::before {
    width: 142px;
    height: 58px;
    left: 34px;
    top: 66px;
}

.school-academy-map::after {
    width: 132px;
    height: 78px;
    right: 28px;
    bottom: 34px;
}

.school-map-school {
    position: absolute;
    z-index: 2;
    left: 50%;
    top: 50%;
    max-width: 78%;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    border: 2px solid #171717;
    border-radius: 999px;
    color: #ffffff;
    background: #171717;
    box-shadow: 0 12px 22px rgba(23, 23, 23, 0.18);
    font-size: 13px;
    font-weight: 900;
    text-align: center;
    transform: translate(-50%, -50%);
}

.school-map-pin {
    position: absolute;
    z-index: 3;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 2px solid #ffffff;
    border-radius: 999px;
    color: #2b201c;
    background: #f8c83d;
    box-shadow: 0 10px 18px rgba(43, 32, 28, 0.18);
    font-size: 13px;
    font-weight: 900;
}

.school-map-pin::after {
    content: attr(class);
    display: none;
}

.school-map-pin {
    line-height: 1;
}

.school-map-pin-1 { left: 22%; top: 23%; }
.school-map-pin-2 { right: 21%; top: 27%; background: #64c9d3; }
.school-map-pin-3 { left: 25%; bottom: 24%; background: #dff4a8; }
.school-map-pin-4 { right: 28%; bottom: 22%; }
.school-map-pin-5 { left: 44%; top: 18%; background: #64c9d3; }
.school-map-pin-6 { right: 14%; top: 52%; background: #dff4a8; }

.school-academy-list {
    display: grid;
    gap: 10px;
    max-height: 430px;
    overflow: auto;
    padding-right: 4px;
}

.school-academy-list article {
    display: grid;
    gap: 8px;
    padding: 14px;
    border: 1px solid #f0eadf;
    border-radius: 12px;
    background: #fffdf8;
}

.school-academy-list article:hover {
    border-color: #f8c83d;
    background: #ffffff;
}

.school-academy-main {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
}

.school-academy-main b {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: #2b201c;
    background: #f8c83d;
    font-size: 13px;
    font-weight: 900;
}

.school-academy-main span {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.school-academy-main strong {
    overflow: hidden;
    color: #171717;
    font-size: 15px;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.school-academy-main small,
.school-academy-list p {
    color: #847d72;
    font-size: 12px;
    font-weight: 800;
}

.school-academy-list p {
    margin: 0;
    line-height: 1.45;
}

.school-academy-list article > div {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.school-academy-list article > div span,
.school-academy-list article > div em,
.school-academy-list article > div a {
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 12px;
    font-style: normal;
    font-weight: 900;
}

.school-academy-list article > div span {
    color: #7b5800;
    background: #fff0af;
}

.school-academy-list article > div em {
    color: #1e7242;
    background: #d5f2df;
}

.school-academy-list article > div a {
    color: #2b201c;
    background: #eef1e7;
}

.pagination.school-pagination {
    grid-column: 1 / -1;
    width: 100%;
    margin: -8px 0 0;
    padding-top: 0;
    justify-self: stretch;
}

.subpage-shell {
    padding: 42px 0 72px;
}

.page-heading {
    max-width: 760px;
    margin-bottom: 28px;
}

.page-heading h1 {
    margin: 10px 0 8px;
    color: #201915;
    font-size: 32px;
    line-height: 1.25;
    font-weight: 900;
}

.page-heading p {
    margin: 0;
    color: #667085;
    font-size: 15px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: fit-content;
    min-height: 42px;
    padding: 0 16px;
    border: 1px solid #d5a431;
    border-radius: 8px;
    color: #2b201c;
    background: #ffd36a;
    box-shadow: 0 10px 20px rgba(43, 32, 28, 0.12);
    font-size: 14px;
    font-weight: 900;
    transition: background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.back-link::before {
    content: "‹";
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    color: #ffffff;
    background: #2b201c;
    font-size: 20px;
    line-height: 1;
    font-weight: 900;
}

.back-link:hover {
    transform: translateY(-1px);
    background: #ffe09a;
    box-shadow: 0 14px 24px rgba(43, 32, 28, 0.16);
}

.region-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.region-card,
.academy-card {
    border: 1px solid #e8edf4;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 12px 24px rgba(26, 34, 46, 0.06);
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.region-card:hover,
.academy-card:hover {
    transform: translateY(-2px);
    border-color: var(--bi-yellow-border);
    box-shadow: 0 18px 34px rgba(26, 34, 46, 0.1);
}

.region-card {
    min-height: 126px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
    padding: 20px;
}

.region-office {
    color: #607180;
    font-size: 12px;
    font-weight: 800;
}

.region-card strong {
    color: #201915;
    font-size: 22px;
    line-height: 1.25;
    font-weight: 900;
}

.region-card span:last-child {
    color: var(--bi-brown-soft);
    font-size: 13px;
    font-weight: 900;
}

.region-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 24px;
}

.region-tab {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 13px;
    border: 1px solid #dde8ef;
    border-radius: 999px;
    color: #4d5d6b;
    background: #ffffff;
    font-size: 13px;
    font-weight: 900;
    box-shadow: 0 8px 18px rgba(26, 34, 46, 0.04);
}

.region-tab small {
    color: #7c8a97;
    font-size: 11px;
    font-weight: 900;
}

.region-tab:hover,
.region-tab.active {
    border-color: var(--bi-yellow-border);
    color: var(--bi-brown);
    background: var(--bi-yellow-soft);
}

.region-tab.active small {
    color: var(--bi-brown-soft);
}

.academy-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.academy-browser {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    align-items: start;
    gap: 18px;
    width: min(100vw - 40px, 1440px);
    margin-left: calc((min(100% - 40px, 1160px) - min(100vw - 40px, 1440px)) / 2);
}

.filter-sidebar {
    position: sticky;
    top: 86px;
}

.filter-sidebar form {
    display: grid;
    gap: 16px;
}

.filter-actions,
.filter-group {
    border: 1px solid #e2e9f1;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 10px 22px rgba(26, 34, 46, 0.05);
}

.filter-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 58px;
    padding: 0 16px;
}

.filter-actions strong {
    color: #201915;
    font-size: 15px;
    font-weight: 900;
}

.filter-actions a {
    color: var(--bi-brown-soft);
    font-size: 12px;
    font-weight: 900;
}

.filter-group {
    margin: 0;
    padding: 18px 16px 16px;
}

.filter-group legend {
    padding: 0;
    color: #201915;
    font-size: 15px;
    font-weight: 900;
}

.filter-option {
    min-height: 30px;
    display: grid;
    grid-template-columns: 18px 1fr auto;
    align-items: center;
    gap: 8px;
    color: #526274;
    font-size: 13px;
    cursor: pointer;
}

.filter-option + .filter-option {
    margin-top: 7px;
}

.filter-option input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--bi-yellow);
}

.filter-option span {
    overflow-wrap: anywhere;
}

.filter-option small {
    color: #8a97a5;
    font-size: 11px;
    font-weight: 800;
}

.filter-submit {
    min-height: 40px;
    border: 0;
    border-radius: 8px;
    color: #ffffff;
    background: var(--bi-brown);
    font-weight: 900;
    cursor: pointer;
}

.pagination {
    grid-column: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 8px;
}

.page-link {
    min-width: 38px;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    border: 1px solid #dde8ef;
    border-radius: 8px;
    color: #526274;
    background: #ffffff;
    font-size: 13px;
    font-weight: 900;
}

.page-link:hover,
.page-link.active {
    border-color: var(--bi-yellow-border);
    color: var(--bi-brown);
    background: var(--bi-yellow-soft);
}

.page-link.disabled {
    color: #a7b1bc;
    background: #f6f8fb;
    cursor: default;
}

.page-link.ellipsis {
    border-color: transparent;
    background: transparent;
    box-shadow: none;
}

.academy-card {
    min-height: 236px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
}

.academy-card-head,
.detail-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.academy-type,
.academy-status {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

.academy-type {
    color: var(--bi-brown);
    background: var(--bi-yellow-soft);
}

.academy-status {
    color: var(--bi-brown);
    background: var(--bi-green-soft);
}

.academy-card strong {
    color: #201915;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 900;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

.academy-card p {
    margin: 0;
    color: #667085;
    font-size: 13px;
    line-height: 1.55;
}

.academy-meta {
    display: grid;
    gap: 6px;
    margin: auto 0 0;
}

.academy-meta div {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 8px;
}

.academy-meta dt,
.academy-meta dd {
    margin: 0;
    font-size: 12px;
}

.academy-meta dt {
    color: #8a96a3;
    font-weight: 800;
}

.academy-meta dd {
    color: #344054;
    overflow-wrap: anywhere;
}

.academy-search-shell {
    min-height: calc(100vh - 64px);
    padding: 0 0 58px;
    background: #faf9f6;
}

.academy-search-container {
    width: min(100% - 48px, 1220px);
}

.academy-page-head {
    padding: 44px 0 30px;
}

.academy-page-head h1 {
    margin: 12px 0 8px;
    color: #171717;
    font-size: 34px;
    line-height: 1.18;
    font-weight: 900;
    letter-spacing: 0;
}

.academy-page-head p {
    margin: 0;
    color: #777167;
    font-size: 14px;
    font-weight: 800;
}

.academy-page-head-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.academy-bookmark-link {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    padding: 0 14px;
    border: 1px solid #ded7ca;
    border-radius: 6px;
    color: #201d18;
    background: #ffffff;
    font-size: 13px;
    font-weight: 900;
}

.academy-bookmark-link:hover {
    border-color: #f8c83d;
    background: #fff0af;
}

.academy-search-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.academy-filter-panel {
    position: sticky;
    top: 86px;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 18px;
    border: 1px solid #e5dfd3;
    border-radius: 8px;
    background: #ffffff;
}

.academy-filter-panel::-webkit-scrollbar {
    width: 8px;
}

.academy-filter-panel::-webkit-scrollbar-thumb {
    border: 2px solid #ffffff;
    border-radius: 999px;
    background: #d7d0c4;
}

.academy-filter-panel::-webkit-scrollbar-track {
    background: transparent;
}

.academy-filter-panel form {
    display: grid;
    gap: 18px;
}

.academy-filter-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.academy-filter-head strong,
.academy-range-filter strong,
.academy-search-input span,
.academy-filter-panel .filter-group legend {
    color: #22201b;
    font-size: 13px;
    font-weight: 900;
}

.academy-filter-head a {
    color: #9a9388;
    font-size: 12px;
    font-weight: 900;
}

.academy-search-input {
    display: grid;
    gap: 8px;
}

.academy-search-input input,
.academy-range-filter input,
.academy-sort-form select {
    width: 100%;
    min-height: 42px;
    border: 1px solid #dcd6ca;
    border-radius: 6px;
    padding: 0 12px;
    color: #28241e;
    background: #ffffff;
    font-size: 13px;
    font-weight: 800;
}

.academy-search-input input::placeholder,
.academy-range-filter input::placeholder {
    color: #aaa49a;
}

.academy-filter-panel .filter-group {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.academy-filter-panel .filter-group legend {
    margin-bottom: 10px;
}

.academy-filter-panel .filter-option {
    grid-template-columns: 18px minmax(0, 1fr) auto;
    min-height: 28px;
    color: #4f4a42;
    font-size: 13px;
}

.academy-filter-panel .filter-option input {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    accent-color: #20201d;
}

.academy-filter-panel .filter-option small {
    color: #aaa39a;
    font-size: 12px;
}

.academy-range-filter {
    display: grid;
    gap: 8px;
}

.academy-range-filter > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
}

.academy-range-filter span {
    color: #8e867a;
    font-size: 13px;
    font-weight: 900;
}

.academy-filter-submit {
    min-height: 42px;
    border: 0;
    border-radius: 6px;
    color: #171717;
    background: #f8c83d;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
}

.academy-result-panel {
    min-width: 0;
}

.academy-active-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 14px;
}

.academy-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 36px;
}

.academy-chip-row span {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    border-radius: 999px;
    color: #ffffff;
    background: #191919;
    font-size: 12px;
    font-weight: 900;
}

.academy-chip-row span::after {
    content: " ×";
    margin-left: 4px;
    color: rgba(255, 255, 255, 0.82);
}

.academy-sort-form {
    flex: 0 0 auto;
}

.academy-sort-form label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.academy-sort-form span {
    color: #9a9388;
    font-size: 12px;
    font-weight: 900;
}

.academy-sort-form select {
    min-width: 136px;
    min-height: 38px;
    padding-right: 30px;
}

.academy-result-summary {
    margin-bottom: 18px;
    color: #4f4a42;
    font-size: 14px;
    font-weight: 800;
}

.academy-result-summary strong {
    color: #171717;
    font-weight: 900;
}

.academy-modern-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.academy-modern-card {
    min-height: 176px;
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 18px;
    padding: 22px 20px 18px;
    border: 1px solid #e4ded2;
    border-radius: 8px;
    background: #ffffff;
    transition: border-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.academy-modern-card:hover {
    border-color: #d1c6b6;
    box-shadow: 0 16px 26px rgba(35, 31, 24, 0.08);
    transform: translateY(-2px);
}

.academy-initial {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: #16120c;
    font-size: 18px;
    font-weight: 900;
}

.academy-initial-1,
.academy-initial-5 {
    background: #f7c83d;
}

.academy-initial-2,
.academy-initial-6 {
    color: #ffffff;
    background: #2563eb;
}

.academy-initial-3 {
    background: #1fac5b;
}

.academy-initial-4 {
    color: #ffffff;
    background: #7c3aed;
}

.academy-modern-main {
    min-width: 0;
}

.academy-modern-main > strong {
    display: block;
    overflow: hidden;
    color: #201d18;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.academy-modern-main > p {
    position: relative;
    margin: 4px 0 8px;
    padding-left: 16px;
    overflow: hidden;
    color: #837a6f;
    font-size: 12px;
    line-height: 1.45;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.academy-modern-main > p::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 5px;
    width: 7px;
    height: 7px;
    border-radius: 50% 50% 50% 0;
    background: #ff4f87;
    transform: rotate(-45deg);
}

.academy-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 18px;
}

.academy-badges span,
.academy-badges em {
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    padding: 0 8px;
    border-radius: 4px;
    font-size: 12px;
    font-style: normal;
    font-weight: 900;
}

.academy-badges span {
    color: #7b5800;
    background: #fff0af;
}

.academy-badges em {
    color: #1e7242;
    background: #ccefd7;
}

.academy-modern-main dl {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
    padding-top: 14px;
    border-top: 1px solid #eee8dd;
}

.academy-modern-main dt,
.academy-modern-main dd {
    margin: 0;
}

.academy-modern-main dt {
    color: #8b8377;
    font-size: 11px;
    font-weight: 800;
}

.academy-modern-main dd {
    margin-top: 4px;
    color: #201d18;
    font-size: 13px;
    font-weight: 900;
}

.academy-modern-main dd small {
    margin-left: 1px;
    font-size: 11px;
    font-weight: 800;
}

.academy-empty-state {
    min-height: 160px;
    display: grid;
    place-items: center;
    border: 1px dashed #d9d1c3;
    border-radius: 8px;
    color: #7d7468;
    background: #ffffff;
    font-size: 14px;
    font-weight: 900;
}

.academy-modern-pagination {
    grid-column: auto;
    padding-top: 24px;
}

/* Refined school and academy search surfaces */
.school-rank-shell,
.academy-search-shell,
.subpage-shell:has(.academy-page-head-row) {
    background:
        radial-gradient(circle at 14% 10%, rgba(248, 200, 61, 0.16), transparent 28%),
        radial-gradient(circle at 88% 8%, rgba(100, 201, 211, 0.14), transparent 24%),
        linear-gradient(180deg, #fffaf0 0%, #fbfaf7 48%, #f7fbfb 100%);
}

.school-rank-heading {
    position: relative;
    justify-items: center;
    gap: 18px;
    text-align: center;
    padding: 34px 0 8px;
}

.school-rank-heading::before,
.subpage-shell:has(.academy-page-head-row) .page-heading::before,
.academy-page-head::before {
    content: "";
    width: 56px;
    height: 56px;
    margin-bottom: 2px;
    border-radius: 18px;
    background:
        radial-gradient(circle at 32% 34%, #fff8dc 0 10%, transparent 11%),
        radial-gradient(circle at 65% 35%, #fff8dc 0 10%, transparent 11%),
        linear-gradient(135deg, #f8c83d, #ffdf74);
    box-shadow: inset 0 -8px 0 rgba(183, 126, 23, 0.18), 0 16px 28px rgba(174, 126, 32, 0.18);
}

.school-rank-heading h1,
.subpage-shell:has(.academy-page-head-row) .page-heading h1,
.academy-page-head h1 {
    color: #171717;
    font-size: 38px;
    line-height: 1.18;
    font-weight: 900;
    letter-spacing: 0;
}

.school-search-form {
    width: min(100%, 940px);
    grid-template-columns: minmax(260px, 1fr) 150px 150px 140px;
    margin: 2px auto 0;
    padding: 10px;
    border: 1px solid #e3dbcf;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 14px 30px rgba(46, 38, 24, 0.09);
}

.school-search-box {
    min-height: 52px;
    border: 0;
    border-radius: 0;
    overflow: visible;
    background: transparent;
}

.school-search-box input,
.school-search-form select,
.academy-search-input input,
.academy-range-filter input,
.academy-sort-form select {
    min-height: 52px;
    border-color: #ddd5c8;
    border-radius: 10px;
    color: #2b251d;
    background: #fbfaf7;
}

.school-search-box input::placeholder,
.academy-search-input input::placeholder,
.academy-range-filter input::placeholder {
    color: #a79f93;
}

.school-search-button,
.academy-filter-submit {
    min-height: 52px;
    border-radius: 10px;
    color: #191714;
    background: #f8c83d;
    box-shadow: 0 8px 16px rgba(248, 200, 61, 0.25);
}

.school-search-button:hover,
.academy-filter-submit:hover {
    background: #ffdc69;
}

.rank-title-row {
    padding: 2px 0 0;
}

.rank-title-row p,
.academy-result-summary {
    color: #736b61;
}

.rank-method summary,
.academy-bookmark-link {
    border-color: #e3dbcf;
    border-radius: 8px;
    color: #2b201c;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 10px 20px rgba(43, 32, 28, 0.08);
}

.rank-method summary:hover,
.academy-bookmark-link:hover {
    border-color: #d5a431;
    background: #fff0af;
}

.school-rank-card,
.academy-filter-panel,
.academy-modern-card,
.region-grid .region-card[href^="/academies/"] {
    border-color: #e8dfd0;
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 252, 244, 0.96));
    box-shadow: 0 12px 26px rgba(46, 38, 24, 0.06);
}

.school-rank-card:hover,
.academy-modern-card:hover,
.region-grid .region-card[href^="/academies/"]:hover {
    border-color: #f8c83d;
    box-shadow: 0 18px 34px rgba(46, 38, 24, 0.11);
}

.rank-medal,
.academy-initial,
.region-grid .region-card[href^="/academies/"]::before {
    border-radius: 13px;
    color: #2b201c;
    background:
        radial-gradient(circle at 35% 35%, #fff7d6 0 13%, transparent 14%),
        linear-gradient(135deg, #f8c83d, #ffdf74);
    box-shadow: inset 0 -5px 0 rgba(183, 126, 23, 0.16);
}

.rank-medal {
    min-width: 54px;
    height: 38px;
}

.school-type-label,
.academy-badges span {
    color: #7b5800;
    background: #fff0af;
}

.academy-badges em {
    color: #1e7242;
    background: #d5f2df;
}

.academy-search-shell {
    padding-bottom: 72px;
}

.academy-page-head {
    position: relative;
    display: grid;
    justify-items: center;
    text-align: center;
    padding: 34px 0 30px;
}

.academy-page-head .back-link {
    margin-bottom: 14px;
}

.academy-page-head-row {
    width: min(100%, 860px);
    position: static;
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    align-items: center;
    text-align: center;
}

.academy-page-head p,
.subpage-shell:has(.academy-page-head-row) .page-heading p {
    color: #736b61;
    font-size: 15px;
    font-weight: 800;
}

.subpage-shell:has(.academy-page-head-row) .page-heading {
    position: relative;
    display: grid;
    justify-items: center;
    width: 100%;
    max-width: none;
    margin-inline: auto;
    text-align: center;
    padding: 34px 0 12px;
}

.subpage-shell:has(.academy-page-head-row) .academy-page-head-row {
    width: min(100%, 760px);
}

.subpage-shell:has(.academy-page-head-row) .back-link {
    margin-bottom: 14px;
}

.academy-page-head-row .academy-bookmark-link {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

.region-grid .region-card[href^="/academies/"] {
    position: relative;
    overflow: hidden;
}

.region-grid .region-card[href^="/academies/"]::before {
    content: "";
    width: 38px;
    height: 38px;
}

.academy-filter-panel {
    padding: 16px;
}

.academy-filter-panel .filter-option input {
    accent-color: #f8c83d;
}

.academy-chip-row span {
    color: #2b201c;
    background: #fff0af;
}

.academy-chip-row span::after {
    color: rgba(43, 32, 28, 0.58);
}

.detail-page {
    background: #ffffff;
}

.detail-container {
    max-width: 960px;
}

.detail-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 28px 0 34px;
    border-bottom: 1px solid #e3e9f0;
}

.detail-hero h1 {
    margin: 12px 0 8px;
    color: #111827;
    font-size: 34px;
    line-height: 1.2;
    font-weight: 900;
}

.detail-hero p {
    margin: 0;
    color: #667085;
    font-size: 15px;
}

.detail-section {
    padding: 34px 0;
    border-bottom: 1px solid #e3e9f0;
}

.detail-section h2 {
    margin: 0 0 28px;
    color: #111827;
    font-size: 22px;
    line-height: 1.35;
    font-weight: 900;
}

.detail-info-list {
    display: grid;
    gap: 24px;
}

.detail-info-row {
    display: grid;
    grid-template-columns: 28px 180px minmax(0, 1fr);
    align-items: start;
    gap: 14px;
}

.detail-icon {
    width: 24px;
    height: 24px;
    display: inline-grid;
    place-items: center;
    border-radius: 8px;
    color: var(--bi-brown);
    background: var(--bi-yellow-soft);
    font-size: 12px;
    font-weight: 900;
}

.detail-info-row strong {
    color: #111827;
    font-size: 16px;
    font-weight: 900;
}

.detail-info-row p {
    margin: 0;
    color: #111827;
    font-size: 16px;
    line-height: 1.65;
    overflow-wrap: anywhere;
}

.check-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 48px;
}

.check-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: #111827;
    font-size: 16px;
    line-height: 1.55;
}

.check-item span {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    margin-top: 3px;
    position: relative;
}

.check-item span::after {
    content: "";
    position: absolute;
    left: 3px;
    top: 1px;
    width: 7px;
    height: 12px;
    border: solid var(--bi-green);
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}

.intro-list {
    display: grid;
    gap: 26px;
    margin: 0;
}

.intro-list div {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 28px;
}

.intro-list dt,
.intro-list dd {
    margin: 0;
    font-size: 16px;
    line-height: 1.7;
}

.intro-list dt {
    color: #111827;
    font-weight: 900;
}

.intro-list dd {
    color: #1f2937;
    overflow-wrap: anywhere;
}

.similar-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.similar-card {
    min-height: 172px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 22px;
    border: 1px solid #e3e9f0;
    border-radius: 8px;
    background: #ffffff;
    text-align: center;
    box-shadow: 0 14px 28px rgba(26, 34, 46, 0.06);
}

.similar-card:hover {
    border-color: var(--bi-yellow-border);
}

.similar-card strong {
    color: #111827;
    font-size: 16px;
    font-weight: 900;
}

.similar-card p,
.similar-card small {
    margin: 0;
    color: #667085;
    font-size: 13px;
}

.academy-detail-shell {
    background: #ffffff;
}

.academy-detail-container {
    width: min(100% - 48px, 1160px);
}

.academy-breadcrumb {
    min-height: 52px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #e9e3d9;
    color: #8a8278;
    font-size: 13px;
    font-weight: 800;
}

.academy-breadcrumb a:hover {
    color: #171717;
}

.academy-breadcrumb strong {
    color: #171717;
}

.academy-detail-hero {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 22px;
    padding: 34px 0 28px;
}

.academy-detail-initial {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #201812;
    background: #f8c83d;
    font-size: 34px;
    font-weight: 900;
}

.academy-detail-main {
    min-width: 0;
}

.academy-detail-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 10px;
}

.academy-detail-badges span,
.academy-detail-badges em,
.academy-detail-badges small {
    min-height: 26px;
    display: inline-flex;
    align-items: center;
    padding: 0 9px;
    border-radius: 4px;
    font-size: 12px;
    font-style: normal;
    font-weight: 900;
}

.academy-detail-badges span {
    color: #8b6500;
    background: #fff0af;
}

.academy-detail-badges em {
    color: #1f7845;
    background: #d5f2df;
}

.academy-detail-badges small {
    color: #5c554c;
    background: #f1eee8;
}

.academy-detail-hero h1 {
    margin: 0 0 8px;
    color: #1b1814;
    font-size: 34px;
    line-height: 1.2;
    font-weight: 900;
    letter-spacing: 0;
}

.academy-detail-hero p {
    position: relative;
    margin: 0 0 14px;
    padding-left: 16px;
    color: #71695f;
    font-size: 14px;
    font-weight: 800;
}

.academy-detail-hero p::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 6px;
    width: 7px;
    height: 7px;
    border-radius: 50% 50% 50% 0;
    background: #ff4f87;
    transform: rotate(-45deg);
}

.academy-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.academy-action-phone,
.academy-action-button {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 13px;
    border: 1px solid #ded7ca;
    border-radius: 5px;
    color: #1f1b16;
    background: #ffffff;
    font-size: 13px;
    font-weight: 900;
}

.academy-action-phone {
    border-color: #f8c83d;
    background: #f8c83d;
}

button.academy-action-button {
    cursor: pointer;
}

.academy-action-button.is-active {
    border-color: #f8c83d;
    background: #fff0af;
}

.academy-detail-stats {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    border-top: 1px solid #e7e1d6;
    border-bottom: 1px solid #e7e1d6;
}

.academy-detail-stats div {
    min-height: 126px;
    display: grid;
    align-content: center;
    gap: 6px;
    padding: 20px;
    border-right: 1px solid #e7e1d6;
}

.academy-detail-stats div:last-child {
    border-right: 0;
}

.academy-detail-stats span {
    color: #837b70;
    font-size: 12px;
    font-weight: 800;
}

.academy-detail-stats strong {
    color: #1f1b16;
    font-size: 17px;
    line-height: 1.25;
    font-weight: 900;
    word-break: keep-all;
}

.academy-detail-stats strong small {
    margin-left: 1px;
    font-size: 13px;
}

.academy-detail-stats p {
    margin: 0;
    color: #837b70;
    font-size: 12px;
    font-weight: 800;
}

.academy-detail-tabs {
    display: flex;
    gap: 28px;
    min-height: 60px;
    align-items: flex-end;
    border-bottom: 1px solid #e9e3d9;
}

.academy-detail-tabs a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    border-bottom: 3px solid transparent;
    color: #5d554b;
    font-size: 14px;
    font-weight: 900;
}

.academy-detail-tabs a:first-child,
.academy-detail-tabs a:hover {
    color: #171717;
    border-bottom-color: #171717;
}

.academy-detail-section {
    padding: 34px 0 44px;
    border-bottom: 1px solid #e9e3d9;
}

.academy-detail-section h2 {
    position: relative;
    margin: 0 0 26px;
    padding-left: 13px;
    color: #201d18;
    font-size: 18px;
    font-weight: 900;
    letter-spacing: 0;
}

.academy-detail-section h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: 4px;
    width: 4px;
    height: 16px;
    border-radius: 2px;
    background: #f8c83d;
}

.academy-detail-table {
    display: grid;
    margin: 0;
}

.academy-detail-table div {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    min-height: 52px;
    align-items: center;
    border-bottom: 1px solid #eee8dd;
}

.academy-detail-table dt,
.academy-detail-table dd {
    margin: 0;
    font-size: 14px;
}

.academy-detail-table dt {
    color: #736b61;
    font-weight: 800;
}

.academy-detail-table dd {
    color: #24211b;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.academy-operation-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.academy-operation-grid div {
    min-height: 50px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
    border-radius: 8px;
    color: #5b554c;
    background: #fbfaf7;
    font-size: 15px;
    font-weight: 900;
}

.academy-operation-grid span {
    width: 22px;
    height: 22px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 22px;
    border-radius: 50%;
    background: #18a957;
}

.academy-operation-grid span::after {
    content: "";
    width: 6px;
    height: 10px;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.academy-capacity-box {
    display: grid;
    gap: 14px;
    margin-top: 24px;
    padding: 22px;
    border-radius: 8px;
    background: #fbfaf7;
}

.academy-capacity-box > div:first-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.academy-capacity-box span {
    color: #6d655b;
    font-size: 14px;
    font-weight: 900;
}

.academy-capacity-box strong {
    color: #201d18;
    font-size: 15px;
    font-weight: 900;
}

.academy-capacity-bar {
    height: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: #f0ece4;
}

.academy-capacity-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #f8c83d;
}

.academy-bookmark-shell {
    min-height: calc(100vh - 64px);
    padding-bottom: 72px;
    background: #faf9f6;
}

.academy-bookmark-container {
    width: min(100% - 48px, 1060px);
}

.academy-bookmark-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.academy-bookmark-toolbar span {
    color: #4d463c;
    font-size: 14px;
    font-weight: 900;
}

.academy-bookmark-toolbar button,
.academy-bookmark-actions button,
.academy-bookmark-actions a,
.academy-bookmark-empty a {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ded7ca;
    border-radius: 6px;
    padding: 0 12px;
    color: #201d18;
    background: #ffffff;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
}

.academy-bookmark-toolbar button:hover,
.academy-bookmark-actions button:hover,
.academy-bookmark-actions a:hover,
.academy-bookmark-empty a:hover {
    background: #f8c83d;
}

.academy-bookmark-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.academy-bookmark-card {
    display: grid;
    gap: 10px;
    min-height: 178px;
    padding: 22px;
    border: 1px solid #e4ded2;
    border-radius: 8px;
    background: #ffffff;
}

.academy-bookmark-card strong {
    overflow: hidden;
    color: #201d18;
    font-size: 18px;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.academy-bookmark-card p {
    margin: 0;
    color: #7e7569;
    font-size: 13px;
    font-weight: 800;
}

.academy-bookmark-card div:not(.academy-bookmark-actions) {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.academy-bookmark-card span,
.academy-bookmark-card em {
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    border-radius: 4px;
    padding: 0 8px;
    font-size: 12px;
    font-style: normal;
    font-weight: 900;
}

.academy-bookmark-card span {
    color: #7b5800;
    background: #fff0af;
}

.academy-bookmark-card em {
    color: #1e7242;
    background: #ccefd7;
}

.academy-bookmark-card small {
    color: #9a9388;
    font-size: 12px;
    font-weight: 800;
}

.academy-bookmark-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}

.academy-bookmark-empty {
    display: grid;
    justify-items: center;
    gap: 10px;
    min-height: 260px;
    padding: 42px;
    border: 1px dashed #d9d1c3;
    border-radius: 8px;
    background: #ffffff;
    text-align: center;
}

.academy-bookmark-empty[hidden],
.academy-bookmark-grid[hidden] {
    display: none;
}

.academy-bookmark-empty strong {
    color: #201d18;
    font-size: 20px;
    font-weight: 900;
}

.academy-bookmark-empty p {
    margin: 0;
    color: #7e7569;
    font-size: 14px;
    font-weight: 800;
}

.policy-shell {
    padding: 42px 0 72px;
    background: #f6f8fb;
}

.policy-container {
    max-width: 900px;
}

.policy-heading {
    margin-bottom: 24px;
}

.policy-heading span {
    color: var(--bi-brown);
    font-size: 13px;
    font-weight: 900;
}

.policy-heading h1 {
    margin: 8px 0;
    color: #111827;
    font-size: 32px;
    line-height: 1.25;
    font-weight: 900;
}

.policy-heading p {
    margin: 0;
    color: #667085;
    font-size: 15px;
}

.policy-content {
    display: grid;
    gap: 14px;
}

.policy-content section {
    padding: 22px;
    border: 1px solid #e4ebf3;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 12px 24px rgba(26, 34, 46, 0.04);
}

.policy-content h2 {
    margin: 0 0 10px;
    color: #111827;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 900;
}

.policy-content p {
    margin: 0;
    color: #475467;
    font-size: 14px;
    line-height: 1.75;
}

.site-footer {
    border-top: 1px solid #e8edf4;
    background: #f3f6fa;
}

.site-footer-inner {
    display: grid;
    grid-template-columns: minmax(300px, 1.35fr) minmax(620px, 2.5fr);
    gap: 56px;
    padding: 40px 0;
    border-top: 1px solid #dfe6ef;
}

.site-footer-brand {
    display: grid;
    align-content: start;
    gap: 12px;
}

.site-footer-logo {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

.site-footer-logo img {
    display: block;
    width: 79px;
    height: auto;
}

.site-footer-brand p,
.site-footer-bottom p {
    margin: 0;
    color: #526274;
    font-size: 13px;
    line-height: 1.65;
}

.site-footer-brand p {
    max-width: 420px;
}

.site-footer-links {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 34px;
}

.site-footer-links div {
    display: grid;
    align-content: start;
    gap: 8px;
}

.site-footer-links strong {
    margin-bottom: 8px;
    color: #0f172a;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.site-footer-links a,
.site-footer-links span {
    color: #263445;
    font-size: 13px;
    line-height: 1.5;
    font-weight: 400;
}

.site-footer-links a:hover {
    color: var(--bi-brown);
}

.site-footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px 0 24px;
    border-top: 1px solid #edf1f6;
}

.site-footer-bottom p:last-child {
    text-align: right;
}

@media (max-width: 860px) {
    .site-header-inner {
        min-height: 64px;
        align-items: center;
        flex-direction: row;
        justify-content: flex-start;
        gap: 14px;
    }

    .site-logo {
        flex: 0 0 auto;
    }

    .site-nav {
        flex: 1 1 auto;
        min-width: 0;
        overflow-x: auto;
        padding: 7px 0;
        scrollbar-width: none;
    }

    .site-nav::-webkit-scrollbar {
        display: none;
    }

    .site-nav a {
        min-height: 38px;
        padding: 0 13px;
        font-size: 13px;
    }

    .site-quick-search {
        width: 240px;
    }

    .feature-grid,
    .quick-section,
    .region-grid,
    .academy-grid,
    .academy-browser,
    .school-rank-list {
        grid-template-columns: 1fr;
    }

    .school-search-form {
        grid-template-columns: 1fr 1fr;
    }

    .meal-search-form,
    .meal-date-form,
    .meal-school-grid,
    .meal-items {
        grid-template-columns: 1fr;
    }

    .meal-calendar-actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .school-detail-hero,
    .school-detail-grid,
    .school-academy-map-layout {
        grid-template-columns: 1fr;
    }

    .school-academy-map {
        position: relative;
        top: auto;
        min-height: 320px;
    }

    .school-academy-list {
        max-height: none;
    }

    .school-detail-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .meal-action-controls {
        width: 100%;
        justify-content: flex-start;
    }

    .meal-calendar-title {
        grid-template-columns: 72px 1fr 72px;
        min-height: 92px;
    }

    .meal-calendar-title h1 {
        font-size: 24px;
        letter-spacing: 0.04em;
    }

    .meal-calendar-title span,
    .meal-calendar-title p {
        font-size: 12px;
    }

    .meal-title-figure::before,
    .meal-title-figure-alt::before {
        width: 42px;
        height: 42px;
        box-shadow: 0 8px 0 #8a5b34;
    }

    .meal-calendar-weekdays {
        display: none;
    }

    .meal-calendar-grid {
        display: grid;
        grid-template-columns: 1fr;
    }

    .meal-day {
        min-height: 0;
        display: grid;
        gap: 10px;
        padding: 14px;
        border-right: 0;
        border-bottom: 1px solid #1f2933;
    }

    .meal-day:nth-child(5n) {
        border-right: 0;
    }

    .meal-day strong {
        margin: 0;
        text-align: left;
        font-size: 16px;
    }

    .meal-day strong::after {
        content: " (" attr(data-weekday) ")";
    }

    .meal-day.outside-month {
        display: none;
    }

    .meal-day-item {
        padding: 12px;
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        background: #fbfcfe;
        text-align: left;
    }

    .meal-day-item p {
        font-size: 13px;
    }

    .meal-empty-day {
        margin: 0;
        text-align: left;
    }

    .school-search-form .school-search-box {
        grid-column: 1 / -1;
    }

    .academy-browser {
        width: 100%;
        margin-left: 0;
    }

    .filter-sidebar {
        position: static;
    }

    .pagination {
        grid-column: auto;
    }

    .filter-sidebar form {
        grid-template-columns: 1fr;
    }

    .check-grid,
    .similar-grid {
        grid-template-columns: 1fr;
    }

    .site-footer-inner {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .site-footer-links {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .site-footer-bottom {
        align-items: flex-start;
        flex-direction: column;
    }

    .site-footer-bottom p:last-child {
        text-align: left;
    }

    .site-header-inner,
    .site-header-left {
        gap: 12px;
    }

    .site-nav {
        gap: 6px;
    }

    .site-nav a {
        padding: 0 8px;
        font-size: 12px;
    }

    .site-quick-search {
        width: 230px;
    }

    .home-hero {
        min-height: 0;
        padding: 56px 0 42px;
    }

    .home-hero h1 {
        font-size: 38px;
    }

    .home-search-panel {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .home-search-tabs {
        padding-right: 0;
        padding-bottom: 8px;
        border-right: 0;
        border-bottom: 1px solid #e7e1d6;
    }

    .home-search-panel input {
        min-height: 42px;
        padding: 0 8px;
        text-align: left;
    }

    .home-dashboard-grid {
        grid-template-columns: 1fr;
    }

    .home-rank-card {
        min-height: 0;
    }

    .home-middle-column,
    .home-right-column {
        grid-template-columns: 1fr;
    }

    .academy-search-container {
        width: min(100% - 32px, 1220px);
    }

    .academy-search-layout {
        grid-template-columns: 1fr;
    }

    .academy-filter-panel {
        position: static;
    }

    .academy-filter-panel form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
    }

    .academy-filter-head,
    .academy-search-input,
    .academy-range-filter,
    .academy-filter-submit {
        grid-column: 1 / -1;
    }

    .academy-modern-grid {
        grid-template-columns: 1fr;
    }

    .academy-detail-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .academy-detail-stats div {
        border-bottom: 1px solid #e7e1d6;
    }

    .academy-detail-stats div:nth-child(2n) {
        border-right: 0;
    }

    .academy-operation-grid {
        grid-template-columns: 1fr;
    }

    .academy-bookmark-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .container {
        width: min(100% - 28px, 1160px);
    }

    .home-shell {
        padding-top: 18px;
    }

    .hero-banner {
        border-radius: 8px;
        box-shadow: 0 16px 26px rgba(57, 45, 32, 0.16);
    }

    .visitor-stats {
        justify-content: stretch;
    }

    .visitor-stat {
        flex: 1 1 0;
        min-width: 0;
    }

    .subpage-shell {
        padding: 28px 0 56px;
    }

    .page-heading h1 {
        font-size: 26px;
    }

    .academy-card-head,
    .detail-summary {
        align-items: flex-start;
        flex-direction: column;
    }

    .detail-hero {
        flex-direction: column;
    }

    .detail-hero h1 {
        font-size: 28px;
    }

    .detail-info-row,
    .intro-list div {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .school-search-form,
    .school-search-box {
        grid-template-columns: 1fr;
    }

    .school-rank-card {
        grid-template-columns: 1fr;
        align-items: start;
        min-height: 0;
    }

    .school-search-button {
        min-height: 44px;
    }

    .rank-title-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .school-detail-shell {
        padding: 22px 0 56px;
    }

    .school-detail-hero {
        padding: 22px 18px;
    }

    .school-detail-hero h1 {
        font-size: 30px;
    }

    .school-detail-stats {
        grid-template-columns: 1fr;
    }

    .school-detail-table div {
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .school-nearby-list a {
        grid-template-columns: 54px minmax(0, 1fr);
    }

    .school-nearby-list em {
        grid-column: 2;
        text-align: left;
    }

    .school-section-head {
        align-items: stretch;
        flex-direction: column;
    }

    .school-section-link {
        width: fit-content;
    }

    .school-academy-map {
        min-height: 260px;
    }

    .site-footer-inner {
        padding: 28px 0 22px;
    }

    .site-footer-links {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .site-header-inner {
        align-items: stretch;
        flex-direction: column;
        padding: 8px 0;
    }

    .site-header-left {
        justify-content: space-between;
    }

    .site-nav {
        overflow-x: auto;
        padding-bottom: 2px;
    }

    .site-quick-search {
        width: 100%;
    }

    .home-hero {
        padding: 42px 0 34px;
    }

    .home-data-pill {
        max-width: 100%;
        justify-content: center;
        white-space: normal;
    }

    .home-hero h1 {
        font-size: 31px;
    }

    .home-hero p {
        font-size: 14px;
    }

    .home-search-tabs {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .home-search-tabs button {
        padding: 0 6px;
        font-size: 13px;
    }

    .home-card {
        padding: 18px;
    }

    .home-stat-grid {
        grid-template-columns: 1fr;
    }

    .home-rank-list li {
        grid-template-columns: 26px minmax(0, 1fr) 38px;
        gap: 10px;
    }

    .home-map-preview {
        height: 170px;
    }

    .academy-page-head h1 {
        font-size: 28px;
    }

    .academy-filter-panel form {
        grid-template-columns: 1fr;
    }

    .academy-active-row {
        align-items: stretch;
        flex-direction: column;
    }

    .academy-page-head-row {
        align-items: stretch;
        flex-direction: column;
    }

    .school-rank-heading,
    .academy-page-head,
    .subpage-shell:has(.academy-page-head-row) .page-heading {
        padding-top: 22px;
    }

    .school-rank-heading h1,
    .academy-page-head h1,
    .subpage-shell:has(.academy-page-head-row) .page-heading h1 {
        font-size: 30px;
    }

    .academy-page-head-row,
    .subpage-shell:has(.academy-page-head-row) .academy-page-head-row {
        width: 100%;
    }

    .academy-page-head-row .academy-bookmark-link {
        position: static;
        transform: none;
    }

    .academy-sort-form label {
        align-items: stretch;
        flex-direction: column;
    }

    .academy-modern-card {
        grid-template-columns: 44px minmax(0, 1fr);
        gap: 12px;
        padding: 18px 14px;
    }

    .academy-initial {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .academy-modern-main dl {
        grid-template-columns: 1fr;
    }

    .academy-detail-container {
        width: min(100% - 28px, 1160px);
    }

    .academy-breadcrumb {
        overflow-x: auto;
        white-space: nowrap;
    }

    .academy-detail-hero {
        grid-template-columns: 54px minmax(0, 1fr);
        gap: 14px;
        padding-top: 26px;
    }

    .academy-detail-initial {
        width: 54px;
        height: 54px;
        font-size: 24px;
    }

    .academy-detail-hero h1 {
        font-size: 28px;
    }

    .academy-detail-stats {
        grid-template-columns: 1fr;
    }

    .academy-detail-stats div {
        min-height: 96px;
        border-right: 0;
    }

    .academy-detail-tabs {
        gap: 18px;
        overflow-x: auto;
        white-space: nowrap;
    }

    .academy-detail-table div {
        grid-template-columns: 1fr;
        gap: 6px;
        align-items: start;
        padding: 13px 0;
    }

    .academy-capacity-box > div:first-child {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

    .academy-bookmark-container {
        width: min(100% - 28px, 1060px);
    }

    .academy-bookmark-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .meal-landing-shell .page-heading,
    .meal-shell .school-rank-heading {
        padding-top: 22px;
    }

    .meal-landing-shell .page-heading h1,
    .meal-shell .school-rank-heading h1 {
        font-size: 30px;
    }

    .meal-home-search-form,
    .meal-search-form {
        width: 100%;
        margin: 18px auto 24px;
        padding: 8px;
    }

    .meal-home-search-form .school-search-box,
    .meal-search-form .school-search-box {
        gap: 8px;
    }

    .meal-home-search-form .school-search-button,
    .meal-search-form .school-search-button {
        width: 78px;
        flex-basis: 78px;
    }

    .meal-calendar-shell {
        padding: 18px 0 48px;
    }

    .meal-calendar-actions {
        gap: 12px;
    }

    .meal-action-controls {
        display: grid;
        grid-template-columns: 1fr;
    }

    .meal-month-form {
        width: 100%;
        grid-template-columns: minmax(0, 1fr) 82px;
    }

    .meal-print-button {
        width: 100%;
        min-height: 48px;
    }

    .meal-calendar-board {
        border-radius: 15px;
    }

    .meal-calendar-title {
        grid-template-columns: 52px 1fr 52px;
        min-height: 104px;
    }

    .meal-calendar-title > div:nth-child(2) {
        padding: 18px 10px;
        border-left: 0;
        border-right: 0;
    }

    .meal-calendar-title h1 {
        font-size: 24px;
        letter-spacing: 0;
    }

    .meal-title-figure::before,
    .meal-title-figure-alt::before {
        width: 42px;
        height: 42px;
        border-radius: 15px;
        box-shadow: inset 0 -6px 0 rgba(183, 126, 23, 0.18), 0 9px 18px rgba(174, 126, 32, 0.14);
    }

    .meal-calendar-grid {
        gap: 9px;
        padding: 10px;
        background: #ffffff;
    }

    .meal-day,
    .meal-day:nth-child(5n) {
        padding: 12px;
        border: 1px solid #eee7dc;
        border-radius: 13px;
        background: #fffdf8;
        box-shadow: none;
    }

    .meal-day strong {
        min-height: 26px;
        font-size: 14px;
    }

    .meal-day-item {
        border-color: #f0eadf;
        border-radius: 11px;
        background: #ffffff;
    }
}

@media print {
    @page {
        size: A4 landscape;
        margin: 7mm;
    }

    html,
    body {
        width: auto;
        min-height: 0;
        color: #2b201c;
        background: #ffffff;
    }

    body {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .site-header,
    .site-footer,
    .meal-calendar-actions {
        display: none !important;
    }

    .page-wrap {
        min-height: 0;
    }

    .container {
        width: 100%;
        max-width: none;
        margin: 0;
    }

    .meal-calendar-shell {
        padding: 0;
        background: #fffaf0;
    }

    .meal-calendar-container {
        display: block;
    }

    .meal-calendar-board {
        overflow: hidden;
        border: 1.5px solid #9d9486;
        border-radius: 0;
        box-shadow: none;
        background: #ffffff;
    }

    .meal-calendar-board.no-dinner {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .meal-calendar-board.has-dinner {
        overflow: visible;
    }

    .meal-calendar-title {
        grid-template-columns: 84px 1fr 84px;
        min-height: 58px;
        border-bottom: 1.5px solid #9d9486;
        background: #ffffff;
    }

    .meal-calendar-title > div:nth-child(2) {
        padding: 7px 12px;
        border-left: 1.5px solid #9d9486;
        border-right: 1.5px solid #9d9486;
    }

    .meal-calendar-title span {
        min-height: 0;
        padding: 0;
        color: #7b5800;
        background: transparent;
        font-size: 9px;
    }

    .meal-calendar-title h1 {
        margin: 0;
        color: #171717;
        font-size: 25px;
        line-height: 1.1;
        letter-spacing: 0.18em;
    }

    .meal-calendar-title p {
        color: #756d62;
        font-size: 8px;
    }

    .meal-title-figure::before,
    .meal-title-figure-alt::before {
        width: 44px;
        height: 44px;
        border: 1px solid #f0d58f;
        border-radius: 16px;
        background:
            radial-gradient(circle at 36% 34%, #2b251d 0 4%, transparent 5%),
            radial-gradient(circle at 62% 34%, #2b251d 0 4%, transparent 5%),
            radial-gradient(circle at 50% 48%, #ffe7a6 0 28%, transparent 29%),
            linear-gradient(135deg, #f8c83d, #ffdf74);
        box-shadow: inset 0 -6px 0 rgba(183, 126, 23, 0.18);
        transform: rotate(-8deg);
    }

    .meal-title-figure-alt::before {
        background:
            radial-gradient(circle at 36% 34%, #2b251d 0 4%, transparent 5%),
            radial-gradient(circle at 62% 34%, #2b251d 0 4%, transparent 5%),
            radial-gradient(circle at 50% 48%, #e9f8fa 0 28%, transparent 29%),
            linear-gradient(135deg, #64c9d3, #b8eef3);
        transform: rotate(8deg);
    }

    .meal-calendar-weekdays,
    .meal-calendar-grid {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 0;
        padding: 0;
        background: #ffffff;
    }

    .meal-calendar-weekdays {
        border-bottom: 1.5px solid #9d9486;
    }

    .meal-calendar-grid {
        align-items: stretch;
    }

    .meal-calendar-weekdays div {
        min-height: 22px;
        border-right: 1px solid #bcb3a5;
        border-radius: 0;
        color: #2b251d;
        background: #fff6dc;
        font-size: 9px;
        font-weight: 900;
    }

    .meal-calendar-weekdays div:last-child {
        border-right: 0;
    }

    .meal-day,
    .meal-day:nth-child(5n) {
        min-height: 99px;
        padding: 3px 4px 4px;
        border: 0;
        border-right: 1px solid #bcb3a5;
        border-bottom: 1px solid #bcb3a5;
        border-radius: 0;
        background: #fffdf8;
        box-shadow: none;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .meal-calendar-board.has-dinner .meal-day,
    .meal-calendar-board.has-dinner .meal-day:nth-child(5n) {
        min-height: 138px;
    }

    .meal-day:nth-child(5n) {
        border-right: 0;
    }

    .meal-day strong {
        min-height: 0;
        display: block;
        width: auto;
        margin: 0 0 2px;
        padding: 0;
        border-radius: 0;
        color: #7b5800;
        background: transparent;
        text-align: center;
        font-size: 7.8px;
        line-height: 1.15;
    }

    .meal-day.outside-month {
        opacity: 0.55;
        background: #fbf8ef;
    }

    .meal-day-item {
        gap: 1px;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        text-align: center;
    }

    .meal-day-item + .meal-day-item {
        margin-top: 2px;
        padding-top: 2px;
        border-top: 1px dashed #dfd4c2;
    }

    .meal-day-item b {
        min-height: 0;
        display: block;
        width: auto;
        padding: 0;
        border-radius: 0;
        color: #1e7242;
        background: transparent;
        font-size: 7px;
        line-height: 1.15;
    }

    .meal-day-item p {
        color: #2b251d;
        font-size: 7.1px;
        line-height: 1.22;
        font-weight: 700;
    }

    .meal-calendar-board.no-dinner .meal-day-item p {
        font-size: 7.4px;
        line-height: 1.24;
    }

    .meal-calendar-board.has-dinner .meal-day-item p {
        font-size: 6.8px;
        line-height: 1.18;
    }

    .meal-day-item small,
    .meal-day-item summary,
    .meal-day-item details {
        display: none;
    }

    .meal-empty-day {
        margin-top: 6px;
        padding: 6px 4px;
        border: 0;
        border-radius: 0;
        background: transparent;
        color: #b0a699;
        font-size: 7px;
        text-align: center;
    }
}
