:root {
  --blue: #1976a8;
  --dark-blue: #155f89;
  --light-blue: #eef7fb;
  --text: #333;
  --muted: #68747a;
  --line: #d7e0e4;
  --width: 1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--text); background: #fff; font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif; line-height: 1.7; }
a { color: var(--blue); }
img { display: block; max-width: 100%; }
.content-width { width: min(calc(100% - 40px), var(--width)); margin-inline: auto; }

.site-header { background: #fff; border-bottom: 1px solid var(--line); }
.header-inner { width: min(calc(100% - 40px), var(--width)); min-height: 82px; margin-inline: auto; display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.brand { display: flex; align-items: center; gap: 14px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 15px; }

.page-title { background: var(--blue); color: #fff; padding: 42px 0 46px; }
.page-title p { margin: 0 0 3px; font: 700 11px Arial, sans-serif; letter-spacing: .16em; opacity: .8; }
.page-title h1 { margin: 0; font-size: 48px; line-height: 1.3; }
.page-title .page-description { margin: 12px 0 0; font-family: inherit; font-size: 15px; font-weight: 400; letter-spacing: 0; opacity: 1; }
.page-title .hero-mobile-break { display: inline; margin-top: 0; font-size: inherit; }
.page-content { padding: 42px 0 80px; }

.utility-box { margin-bottom: 45px; padding: 20px 24px; background: var(--light-blue); border: 1px solid #cfe5ef; }
.utility-box a { font-size: 14px; font-weight: 700; }
.category-nav { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 0 0 46px; }
.category-nav a { min-height: 58px; padding: 12px 16px; display: flex; align-items: center; justify-content: center; gap: 12px; border: 1px solid var(--blue); background: #fff; color: var(--blue); text-align: center; text-decoration: none; font-size: 14px; font-weight: 700; }
.category-nav a:hover { background: var(--light-blue); }
.category-nav span { font-size: 10px; }
.section-title { margin: 0 0 26px; padding: 0 0 12px; border-bottom: 3px solid var(--blue); font-size: 25px; }

.dorm-section { scroll-margin-top: 18px; }
.dorm-section + .dorm-section { margin-top: 68px; }
.category-title { margin: 0 0 28px; padding: 13px 18px; border-left: 7px solid var(--dark-blue); background: var(--light-blue); color: #1d536e; font-size: 22px; }
.dorm-list { display: grid; gap: 54px; }
.dorm-entry { scroll-margin-top: 18px; padding-bottom: 50px; border-bottom: 1px solid var(--line); }
.dorm-entry h3 { margin: 0 0 20px; padding: 12px 18px; background: var(--blue); color: #fff; font-size: 22px; }

.photo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.photo-grid.single { display: block; }
.photo-grid img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: #f1f1f1; }
.photo-grid.single img { width: calc((100% - 16px) / 2); }
.address { margin: 14px 0; color: var(--muted); font-size: 13px; }
.feature-list { margin: 0 0 20px; padding: 15px 20px 15px 40px; background: #f6f8f9; font-size: 14px; }
.feature-list li + li { margin-top: 3px; }

.detail-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr); gap: 24px; align-items: start; }
table { width: 100%; border-collapse: collapse; border-top: 1px solid var(--line); font-size: 13px; }
th, td { border-bottom: 1px solid var(--line); padding: 12px 14px; text-align: left; vertical-align: top; }
th { width: 125px; background: var(--light-blue); color: #24536a; font-weight: 700; }
.floor-plan { border: 1px solid var(--line); }
.floor-plan p { margin: 0; padding: 9px 12px; background: #f4f6f7; border-bottom: 1px solid var(--line); font-size: 13px; font-weight: 700; }
.floor-plan img { width: 100%; background: #fff; }
.entry-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.entry-actions a { display: inline-block; padding: 9px 16px; border: 1px solid var(--blue); text-decoration: none; font-size: 13px; font-weight: 700; }
.entry-actions a:first-child { background: var(--blue); color: #fff; }
.entry-actions a:hover { opacity: .8; }
.back-top { display: block; width: max-content; margin: 18px 0 0 auto; font-size: 12px; }

.school-links { margin-top: 64px; padding-top: 32px; border-top: 3px solid var(--blue); }
.school-links h2 { margin: 0 0 20px; font-size: 21px; }
.school-links h2 .mobile-break { display: inline; }
.school-links ul { margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); list-style: none; }
.school-links li { border-bottom: 1px solid var(--line); }
.school-links li:nth-child(odd) { border-right: 1px solid var(--line); }
.school-links a { min-height: 58px; padding: 13px 16px; display: flex; align-items: center; justify-content: space-between; gap: 14px; color: var(--text); text-decoration: none; font-size: 13px; }
.school-links a:hover { background: var(--light-blue); color: var(--blue); }
.school-links a span { flex: 0 0 auto; color: var(--blue); }
footer { background: #44535a; color: #fff; }
.footer-inner { min-height: 150px; display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.footer-inner p { margin: 0; font-size: 12px; }
.footer-inner p b { font-size: 15px; }
.footer-inner a { color: #fff; font-size: 12px; }

@media (max-width: 780px) {
  .header-inner { min-height: 70px; }
  .site-header nav { display: none; }
  .page-title { padding: 32px 0 35px; }
  .page-title h1 { font-size: 36px; }
  .page-title .page-description { font-size: 13px; }
  .page-title .hero-mobile-break { display: block; }
  .page-content { padding-top: 30px; }
  .category-nav { grid-template-columns: 1fr; gap: 8px; }
  .category-nav a { min-height: 50px; }
  .photo-grid { grid-template-columns: 1fr; }
  .photo-grid.single img { width: 100%; }
  .detail-layout { grid-template-columns: 1fr; }
  .floor-plan { max-width: 560px; }
  .school-links ul { grid-template-columns: 1fr; }
  .school-links li:nth-child(odd) { border-right: 0; }
  .school-links h2 .mobile-break { display: block; }
}

@media (max-width: 520px) {
  .content-width, .header-inner { width: min(calc(100% - 28px), var(--width)); }
  .brand { font-size: 13px; }
  .brand-mark { min-width: 54px; height: 34px; font-size: 16px; }
  .dorm-list { gap: 44px; }
  .dorm-entry { padding-bottom: 42px; }
  .dorm-entry h3 { font-size: 18px; }
  th, td { display: block; width: 100%; }
  th { padding-block: 8px; }
  td { padding-block: 10px 14px; }
  .entry-actions { flex-direction: column; }
  .entry-actions a { text-align: center; }
  .footer-inner { min-height: 130px; align-items: flex-start; flex-direction: column; justify-content: center; gap: 12px; }
}
