:root {
  /* paper / ink, drawn from the building itself: dark charcoal facade, warm tatami interior */
  --background: #f5f0e4;
  --background-soft: #e9dfc8;
  --foreground: #23262a;
  --foreground-muted: #5c564a;
  --accent: #9c3a29;
  --accent-dark: #7c2e20;
  --accent-soft: #ddc9a0;
  --wood: #7c5a3c;
  --tatami: #c8b384;
  --line: #d9cca8;
  --card: #faf6ea;
  --font-sans: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", sans-serif;
  --font-serif: "Shippori Mincho", "Hiragino Mincho ProN", serif;
}

/* 日本語フォントにはハングルが含まれないため、韓国語ページは韓国語フォントに切り替える */
:root:lang(ko) {
  --font-sans: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --font-serif: "Noto Serif KR", "AppleMyungjo", serif;
}

:lang(ko) {
  word-break: keep-all;
}

* {
  box-sizing: border-box;
}

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

body {
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
.font-heading {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.45;
  margin: 0;
  letter-spacing: 0.01em;
}

p {
  margin: 0;
}

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

img {
  max-width: 100%;
  display: block;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header — a dark band, echoing the building's own charcoal facade */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--foreground);
  border-bottom: 1px solid var(--wood);
}

.header-inner {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
}

.brand {
  display: flex;
  flex-shrink: 0;
  align-items: baseline;
  gap: 10px;
  white-space: nowrap;
}

.brand-cross {
  flex-shrink: 0;
  color: var(--background);
  margin-right: -4px;
}

.brand-ja {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--background);
  letter-spacing: 0.03em;
}

.brand-en {
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--tatami);
}

.main-nav {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px 18px;
  white-space: nowrap;
  font-size: 0.85rem;
}

.main-nav a {
  color: rgba(245, 240, 228, 0.72);
  transition: color 0.15s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--tatami);
}

/* 施設案内：マウスを重ねると各セクションへのリンクを表示 */
.nav-item {
  position: relative;
}

.sub-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: -18px;
  padding-top: 19px; /* ヘッダー下端まで隙間なくつなぎ、移動中に閉じないようにする */
  z-index: 50;
}

.nav-item:hover .sub-nav,
.nav-item:focus-within .sub-nav {
  display: block;
}

.sub-nav-list {
  display: flex;
  flex-direction: column;
  min-width: 180px;
  padding: 8px 0;
  background: var(--foreground);
  border: 1px solid var(--wood);
  border-top: 0;
}

.main-nav .sub-nav-list a {
  padding: 9px 18px;
}

/* 言語によって幅が変わらないよう、言語コード（JA/KO/EN）で表示する */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-left: 4px;
  padding-left: 18px;
  border-left: 1px solid rgba(124, 90, 60, 0.7);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
}

.lang-switch .current {
  color: var(--background);
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border: 1px solid var(--wood);
  border-radius: 2px;
  background: transparent;
  color: var(--background);
  cursor: pointer;
}

/* 日本語のメニューが一行に収まらない幅では、どの言語でも同じ幅でメニューボタンに切り替える */
@media (max-width: 1100px) {
  .header-inner {
    flex-wrap: wrap;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .main-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(124, 90, 60, 0.5);
  }

  .main-nav.is-open {
    display: flex;
  }

  .main-nav a {
    padding: 9px 0;
    width: 100%;
  }

  .lang-switch {
    gap: 18px;
    margin-top: 8px;
    padding: 12px 0 0;
    border-left: 0;
    border-top: 1px solid rgba(124, 90, 60, 0.5);
    width: 100%;
  }

  .main-nav .lang-switch a {
    width: auto;
  }

  .nav-item {
    width: 100%;
  }

  .nav-item > a {
    display: block;
  }

  .sub-nav {
    display: block;
    position: static;
    padding: 0 0 4px 14px;
  }

  .sub-nav-list {
    min-width: 0;
    padding: 0;
    background: none;
    border: 0;
    border-left: 1px solid rgba(124, 90, 60, 0.5);
  }

  .main-nav .sub-nav-list a {
    padding: 6px 0 6px 14px;
    font-size: 0.8rem;
  }
}

/* Footer — the same dark band, bookending the paper body between */
.site-footer {
  margin-top: 80px;
  background: var(--foreground);
  color: rgba(245, 240, 228, 0.7);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px;
  padding: 48px 20px 32px;
  font-size: 0.875rem;
}

.footer-info .brand-ja {
  font-size: 1.15rem;
  color: var(--background);
}

.footer-info p {
  margin-top: 5px;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-nav a:hover {
  color: var(--tatami);
}

.admin-link {
  margin-top: 10px;
  font-size: 0.75rem;
  color: rgba(245, 240, 228, 0.4);
}

.copyright {
  padding: 16px 20px 32px;
  font-size: 0.75rem;
  color: rgba(245, 240, 228, 0.4);
  border-top: 1px solid rgba(124, 90, 60, 0.4);
  margin-top: 8px;
}

/* Hero (home) — full-bleed photography, the thesis of the page */
.home-hero {
  max-width: 1120px;
  margin: 0 auto;
  padding: 56px 20px 40px;
}

.home-hero .eyebrow {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--accent-dark);
  text-transform: uppercase;
}

.home-hero h1 {
  margin-top: 14px;
  max-width: 640px;
  font-size: clamp(2rem, 4.5vw, 2.75rem);
}

.home-hero .lead {
  margin-top: 24px;
  max-width: 560px;
  color: var(--foreground-muted);
}

.button-row {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.btn {
  display: inline-block;
  border-radius: 2px;
  padding: 13px 30px;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: var(--background);
}

.btn-primary:hover {
  background: var(--accent-dark);
}

.btn-outline {
  border-color: var(--wood);
  color: var(--foreground);
  background: transparent;
}

.btn-outline:hover {
  border-color: var(--accent-dark);
  color: var(--accent-dark);
}

.hero-photo-band {
  width: 100%;
  margin-top: 8px;
}

.hero-photo {
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
  display: block;
}

@media (max-width: 640px) {
  .hero-photo {
    aspect-ratio: 4 / 3;
  }
}

/* Page hero (inner pages) */
.page-hero {
  border-bottom: 1px solid var(--line);
  background: var(--background-soft);
}

.page-hero .wrap {
  padding: 52px 20px 48px;
}

.page-hero .eyebrow {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-dark);
}

.page-hero h1 {
  margin-top: 10px;
  font-size: clamp(1.6rem, 3.6vw, 2.1rem);
}

.hero-description {
  margin-top: 16px;
  color: var(--foreground-muted);
}

/* Generic sections */
.section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 64px 20px;
}

.section-narrow {
  max-width: 760px;
  margin: 0 auto;
  padding: 64px 20px;
}

.section-title {
  font-size: 1.6rem;
}

/* Quick link cards (home) */
.card-grid {
  margin-top: 36px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

@media (max-width: 640px) {
  .card-grid {
    grid-template-columns: 1fr;
  }
}

.card-link {
  display: block;
  background: var(--card);
  padding: 28px;
  transition: background-color 0.15s ease;
}

.card-link:hover {
  background: var(--background);
}

.card-link h3 {
  font-size: 1.15rem;
  color: var(--accent-dark);
}

.card-link p {
  margin-top: 10px;
  font-size: 0.875rem;
  color: var(--foreground-muted);
}

/* Facility page: target of the header dropdown links */
.section[id] {
  scroll-margin-top: 72px;
}

.amenity-card {
  background: var(--card);
  padding: 28px;
}

.amenity-card h3 {
  font-size: 1.15rem;
  color: var(--accent-dark);
}

.amenity-card ul {
  margin: 12px 0 0;
  padding-left: 20px;
  font-size: 0.875rem;
  color: var(--foreground-muted);
}

.amenity-card li {
  margin-bottom: 6px;
}

.amenities-note {
  margin-top: 16px;
  font-size: 0.875rem;
  color: var(--foreground-muted);
}

.amenities-link {
  margin-bottom: 20px;
  font-size: 0.875rem;
  color: var(--foreground-muted);
}

.amenities-link a {
  color: var(--accent-dark);
  text-decoration: underline;
}

.info-strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--card);
}

.info-strip .wrap {
  padding: 26px 20px;
  font-size: 0.9rem;
  color: var(--foreground-muted);
}

/* Placeholder image */
.placeholder-image-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px dashed var(--wood);
  background: var(--background-soft);
  padding: 16px;
  text-align: center;
  color: var(--wood);
  width: 100%;
  height: 100%;
}

.placeholder-image {
  margin: 0;
}

.placeholder-image.aspect-video .placeholder-image-box {
  aspect-ratio: 16 / 9;
}

.placeholder-image.aspect-square .placeholder-image-box {
  aspect-ratio: 1 / 1;
}

.placeholder-image.aspect-wide .placeholder-image-box {
  aspect-ratio: 16 / 6;
}

.gallery-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.placeholder-image.aspect-video .gallery-photo {
  aspect-ratio: 16 / 9;
}

.placeholder-image.aspect-square .gallery-photo {
  aspect-ratio: 1 / 1;
}

.placeholder-image.aspect-wide .gallery-photo {
  aspect-ratio: 16 / 6;
}

/* landscape: a gentler crop than 16:9, so portrait photos keep most of their frame */
.placeholder-image.aspect-landscape .gallery-photo {
  aspect-ratio: 4 / 3;
}

/* natural: show the full photo, uncropped, at its own aspect ratio */
.placeholder-image.aspect-natural .gallery-photo {
  aspect-ratio: auto;
  height: auto;
  object-fit: contain;
  background: var(--background-soft);
}

.placeholder-image svg {
  opacity: 0.7;
}

.placeholder-image p {
  font-size: 0.75rem;
  line-height: 1.6;
}

.placeholder-image figcaption {
  margin-top: 10px;
  font-size: 0.8rem;
  color: var(--foreground-muted);
}

/* Grids for gallery */
.photo-grid {
  margin-top: 32px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.photo-grid.cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 900px) {
  .photo-grid,
  .photo-grid.cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .photo-grid,
  .photo-grid.cols-4 {
    grid-template-columns: 1fr;
  }
}

/* History timeline — full-width text, then a large photo band */
.timeline-item {
  margin-bottom: 72px;
}

.timeline-item .step {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-dark);
}

.timeline-item h2 {
  margin-top: 10px;
  font-size: 1.4rem;
}

.timeline-item .body {
  margin-top: 14px;
  max-width: 640px;
  color: var(--foreground-muted);
}

.timeline-item .timeline-media {
  margin-top: 28px;
}

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

@media (max-width: 640px) {
  .timeline-photo-grid {
    grid-template-columns: 1fr;
  }
}

.callout {
  margin-top: 56px;
  border: 1px solid var(--wood);
  background: var(--card);
  padding: 36px;
}

.callout h2 {
  font-size: 1.3rem;
  color: var(--accent-dark);
}

.callout p {
  margin-top: 14px;
  color: var(--foreground-muted);
}

/* About reasons */
.reason-list {
  margin-top: 8px;
}

.reason {
  margin-bottom: 44px;
  padding-bottom: 44px;
  border-bottom: 1px solid var(--line);
}

.reason:last-child {
  border-bottom: none;
}

.reason h2 {
  font-size: 1.3rem;
  color: var(--accent-dark);
}

.reason p {
  margin-top: 14px;
  color: var(--foreground-muted);
}

.note-box {
  margin-top: 56px;
  border: 1px solid var(--wood);
  background: var(--card);
  padding: 32px;
}

/* Forms */
.field {
  display: block;
  font-size: 0.875rem;
  margin-bottom: 20px;
}

.field .label {
  font-weight: 500;
  color: var(--foreground);
}

.field .required {
  color: var(--accent-dark);
}

.field .hint {
  display: block;
  margin-top: 4px;
  font-size: 0.75rem;
  color: var(--foreground-muted);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="password"],
textarea,
select {
  width: 100%;
  margin-top: 4px;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 2px;
  padding: 9px 12px;
  font-size: 0.875rem;
  font-family: inherit;
  color: var(--foreground);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
}

fieldset {
  border: none;
  padding: 0;
  margin: 0 0 44px;
}

legend {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.15rem;
  padding: 0;
  margin-bottom: 14px;
}

.rules-box {
  border: 1px solid var(--wood);
  background: var(--background-soft);
  padding: 26px;
}

.rules-box ul {
  margin: 0;
  padding-left: 20px;
  color: var(--foreground-muted);
  font-size: 0.875rem;
}

.rules-box li {
  margin-bottom: 8px;
}

.agree-row {
  margin-top: 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.875rem;
}

.agree-row input {
  width: auto;
  margin-top: 3px;
}

.room-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--line);
  font-size: 0.875rem;
}

.room-table th,
.room-table td {
  padding: 12px 16px;
  text-align: left;
  border-top: 1px solid var(--line);
}

.room-table thead th {
  background: var(--background-soft);
  color: var(--foreground-muted);
  border-top: none;
  font-weight: 500;
}

.room-table input[type="number"] {
  width: 90px;
  margin-top: 0;
}

.room-table-floor td {
  background: var(--background-soft);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--wood);
  padding-top: 8px;
  padding-bottom: 8px;
}

.form-message {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--accent-dark);
  margin-bottom: 16px;
}

.form-success {
  border: 1px solid var(--wood);
  background: var(--card);
  padding: 36px;
  text-align: center;
}

.form-success h2 {
  color: var(--accent-dark);
  font-size: 1.3rem;
}

.form-success p {
  margin-top: 14px;
  color: var(--foreground-muted);
}

/* Donate page */
.donate-body p {
  color: var(--foreground-muted);
  margin-bottom: 20px;
}

.bank-box {
  margin-top: 40px;
  border: 1px solid var(--wood);
  background: var(--card);
  padding: 32px;
}

.bank-box dl {
  margin-top: 16px;
  font-size: 0.875rem;
  color: var(--foreground-muted);
}

.bank-box .row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.bank-box dt {
  width: 96px;
  flex-shrink: 0;
  font-weight: 500;
  color: var(--foreground);
}

.bank-note {
  margin-top: 16px;
  font-size: 0.75rem;
  color: var(--foreground-muted);
}

/* Contact page */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px;
}

@media (max-width: 640px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

.contact-grid h2 {
  font-size: 1.15rem;
}

.contact-grid p {
  margin-top: 12px;
  color: var(--foreground-muted);
}

.contact-grid a.tel {
  color: var(--accent-dark);
  text-decoration: underline;
}

.map-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  min-height: 280px;
}

.map-frame iframe {
  width: 100%;
  height: 100%;
  min-height: 280px;
  border: 0;
}

.map-frame .map-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -135%);
  z-index: 1;
  background: #fff;
  padding: 4px 10px;
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  font-size: 13px;
  font-weight: 600;
  color: #1a1a1a;
  white-space: nowrap;
  pointer-events: none;
}

/* Admin */
.admin-shell {
  max-width: 420px;
  margin: 0 auto;
  padding: 80px 20px;
}

.admin-shell h1 {
  font-size: 1.5rem;
}

.admin-shell .lead {
  margin-top: 8px;
  font-size: 0.875rem;
  color: var(--foreground-muted);
}

.admin-shell form {
  margin-top: 32px;
}

.admin-dashboard {
  max-width: 1120px;
  margin: 0 auto;
  padding: 40px 20px;
}

.admin-dashboard-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.admin-dashboard-header h1 {
  font-size: 1.5rem;
}

.admin-dashboard-header .count {
  margin-top: 4px;
  font-size: 0.875rem;
  color: var(--foreground-muted);
}

.logout-btn {
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 2px;
  padding: 8px 16px;
  font-size: 0.875rem;
  font-family: inherit;
  cursor: pointer;
}

.logout-btn:hover {
  border-color: var(--accent-dark);
  color: var(--accent-dark);
}

.reservation-card {
  margin-top: 24px;
  border: 1px solid var(--line);
  background: var(--card);
  padding: 24px;
}

.reservation-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.reservation-card-head h2 {
  font-size: 1.1rem;
}

.reservation-card-head .contact {
  font-size: 0.875rem;
  color: var(--foreground-muted);
}

.badge {
  border-radius: 2px;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
}

.badge-pending {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.badge-confirmed {
  background: #dcf5e3;
  color: #1f7a3d;
}

.badge-declined {
  background: #fbdcdc;
  color: #b3261e;
}

.reservation-detail-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  font-size: 0.875rem;
}

@media (max-width: 560px) {
  .reservation-detail-grid {
    grid-template-columns: 1fr;
  }
}

.reservation-detail-grid dt {
  font-weight: 500;
}

.reservation-detail-grid dd {
  margin: 2px 0 0;
  color: var(--foreground-muted);
}

.guest-list-box {
  margin-top: 8px;
  white-space: pre-wrap;
  background: var(--background-soft);
  padding: 12px;
  font-size: 0.875rem;
  color: var(--foreground-muted);
}

.reservation-meta {
  margin-top: 16px;
  font-size: 0.75rem;
  color: var(--foreground-muted);
}

.status-form {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.status-form button {
  border-radius: 2px;
  padding: 6px 16px;
  font-size: 0.75rem;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--foreground);
}

.status-form button.approve {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--background);
}

.status-form button.approve:hover {
  background: var(--accent-dark);
}

.status-form button:hover {
  border-color: var(--accent-dark);
  color: var(--accent-dark);
}

.empty-state {
  margin-top: 24px;
  border: 1px solid var(--line);
  background: var(--card);
  padding: 24px;
  font-size: 0.875rem;
  color: var(--foreground-muted);
}
