:root {
  color-scheme: light;
  --bg: #f7f3ec;
  --surface: #ffffff;
  --surface-soft: #efe8dc;
  --ink: #18211f;
  --muted: #66706d;
  --line: #ddd4c6;
  --accent: #11675e;
  --accent-strong: #0c4e48;
  --gold: #bf8a35;
  --danger: #a13525;
  --shadow: 0 22px 60px rgba(30, 37, 34, 0.11);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
}

a {
  color: inherit;
}

button,
input,
textarea,
select {
  font: inherit;
}

.site-header,
.site-footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  display: grid;
  grid-template-columns: minmax(260px, auto) minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  padding: 18px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-logo {
  width: 148px;
  max-width: 42vw;
  height: auto;
  border-radius: 6px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand-text {
  min-width: 0;
}

.brand small {
  color: var(--muted);
  margin-top: 2px;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 10px;
  min-width: 0;
  overflow: visible;
  white-space: nowrap;
}

.header-actions {
  display: grid;
  justify-items: end;
  gap: 6px;
  min-width: 0;
}

.language-switcher {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 4px;
}

.language-switcher a {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  text-decoration: none;
  font-size: 1.05rem;
}

.language-switcher a:hover,
.language-switcher a:focus-visible,
.language-switcher a.is-active {
  border-color: var(--line);
  background: var(--surface);
  outline: none;
}

.top-nav a {
  min-height: 40px;
  padding: 9px 10px;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  flex: 0 0 auto;
}

.top-nav a:hover,
.top-nav a:focus-visible {
  background: var(--surface-soft);
  color: var(--ink);
  outline: none;
}

.nav-link-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.nav-link-with-icon img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex: 0 0 auto;
}

.top-nav .nav-link-with-icon:first-of-type img {
  width: 26px;
  height: 20px;
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.74fr);
  gap: 38px;
  align-items: center;
  min-height: 390px;
  padding: 8px 0 12px;
}

.hero-copy,
.internal-hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 10px;
  font-size: clamp(2.4rem, 3.95vw, 3.95rem);
  line-height: 1.04;
  letter-spacing: 0;
}

.hero-title-line {
  display: block;
  white-space: nowrap;
}

h2 {
  margin-bottom: 12px;
  font-size: clamp(1.65rem, 2.4vw, 2.5rem);
  line-height: 1.08;
}

.hero-copy > p:not(.eyebrow),
.internal-hero p,
.contact-band p {
  max-width: 680px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.65;
}

.hero-media {
  position: relative;
  display: grid;
  align-items: end;
  margin: 0;
  overflow: hidden;
  height: clamp(280px, 31vw, 420px);
  border-radius: 8px;
  background: #d8e6de;
  box-shadow: var(--shadow);
}

.hero-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-media::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(12, 42, 37, 0.46));
}

.hero-media figcaption {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 22px;
  color: white;
}

.hero-media figcaption span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.9rem;
  font-weight: 700;
}

.hero-media figcaption strong {
  font-size: 1.22rem;
}

.search-panel {
  width: min(100%, 640px);
  margin-top: 28px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 12px 34px rgba(30, 37, 34, 0.08);
}

.search-panel-abc {
  width: 100%;
  margin: 0 0 34px;
}

.search-panel label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.search-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-row input {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  background: white;
  color: var(--ink);
}

.search-row input:focus {
  border-color: var(--accent);
  outline: 3px solid rgba(17, 103, 94, 0.16);
}

.search-row button {
  display: grid;
  width: 50px;
  min-width: 50px;
  height: 50px;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  cursor: pointer;
  font-size: 1.4rem;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 10px 0 18px;
}

.quick-action {
  display: flex;
  min-width: 0;
  min-height: 104px;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: var(--surface);
  text-decoration: none;
}

.quick-action span {
  color: var(--muted);
  font-size: 0.88rem;
}

.quick-action strong {
  overflow-wrap: anywhere;
}

.section {
  padding: 24px 0 64px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.filters,
.letter-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filters {
  margin-bottom: 22px;
}

.filter-button,
.letter-nav button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 12px;
  background: white;
  color: var(--muted);
  cursor: pointer;
}

.filter-button.is-active,
.letter-nav button.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
}

.abc-layout {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.letter-nav {
  position: sticky;
  top: 16px;
  align-content: start;
}

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

.entry-card,
.staff-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  background: var(--surface);
  box-shadow: 0 10px 30px rgba(30, 37, 34, 0.06);
}

.entry-meta {
  margin-bottom: 12px;
}

.entry-meta span {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  background: #e3efe7;
  color: var(--accent-strong);
  font-size: 0.8rem;
  font-weight: 800;
}

.entry-card h3,
.staff-card h3 {
  margin-bottom: 8px;
  font-size: 1.16rem;
}

.entry-card p,
.staff-card p,
details p {
  color: var(--muted);
  line-height: 1.55;
}

details {
  margin-top: 16px;
}

summary {
  color: var(--accent);
  cursor: pointer;
  font-weight: 800;
}

.empty-state {
  grid-column: 1 / -1;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--muted);
}

.contact-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr);
  gap: 28px;
  align-items: center;
  margin: 12px 0 54px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 34px 0;
}

.contact-grid {
  display: grid;
  gap: 10px;
}

.contact-grid a,
.contact-grid span {
  min-width: 0;
  border-radius: 8px;
  padding: 14px 16px;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.restaurant-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  padding: 58px 0 34px;
  border-bottom: 1px solid var(--line);
}

.restaurant-hero h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 4.8rem);
}

.restaurant-hero p {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.65;
}

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

.restaurant-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  background: #fffaf2;
}

.restaurant-card-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
}

.restaurant-card h3 {
  margin: 8px 0;
  font-size: 1.4rem;
}

.restaurant-card p {
  color: var(--muted);
  line-height: 1.6;
}

.restaurant-facts {
  display: grid;
  gap: 10px;
  margin: 16px 0;
}

.restaurant-facts div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 10px;
}

.restaurant-facts dt {
  color: var(--muted);
}

.restaurant-facts dd {
  margin: 0;
  font-weight: 700;
}

.text-link {
  color: var(--accent);
  font-weight: 800;
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 22px;
  color: var(--muted);
  background: #fffaf2;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding: 24px 0 38px;
  color: var(--muted);
}

.site-footer a {
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
}

.internal-hero {
  min-height: 380px;
  border-bottom: 1px solid var(--line);
}

.login-shell {
  display: grid;
  min-height: calc(100vh - 110px);
  place-items: center;
  padding: 36px 0 80px;
}

.login-card,
.admin-section,
.notice {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 30px rgba(30, 37, 34, 0.06);
}

.login-card {
  width: min(100%, 520px);
  padding: 28px;
}

.login-card h1 {
  margin-bottom: 12px;
  font-size: clamp(2rem, 5vw, 3.2rem);
}

.login-card label,
.editor-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
}

.login-card input,
.editor-form input,
.editor-form textarea,
.editor-form select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: white;
  color: var(--ink);
}

.editor-form textarea {
  resize: vertical;
  line-height: 1.5;
}

.login-card input:focus,
.editor-form input:focus,
.editor-form textarea:focus,
.editor-form select:focus {
  border-color: var(--accent);
  outline: 3px solid rgba(17, 103, 94, 0.16);
}

.primary-button,
.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  padding: 10px 16px;
  color: white;
  cursor: pointer;
  font-weight: 900;
  text-decoration: none;
}

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

.danger-button {
  background: var(--danger);
}

.notice {
  width: min(1180px, 100%);
  margin: 14px 0;
  padding: 14px 16px;
  font-weight: 800;
}

.notice-success {
  border-color: #badfc8;
  background: #e5f5ea;
  color: #14562c;
}

.notice-error {
  border-color: #e2b8ad;
  background: #fff0eb;
  color: var(--danger);
}

.admin-main {
  padding-bottom: 72px;
}

.admin-hero {
  display: grid;
  min-height: 290px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.admin-hero p {
  max-width: 720px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.65;
}

.admin-section {
  margin: 24px 0;
  padding: 24px;
  scroll-margin-top: 92px;
}

.admin-jump-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 24px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(247, 243, 236, 0.96);
  box-shadow: 0 12px 28px rgba(27, 36, 32, 0.08);
}

.admin-jump-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf2;
  color: var(--ink);
  font-weight: 700;
  font-size: 0.9rem;
}

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

.compact-form {
  margin-top: 12px;
}

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

.form-help {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.translation-status {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fffaf2;
}

.translation-status p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.translation-status strong {
  color: var(--ink);
}

.translation-detail-box {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fffaf2;
}

.translation-detail-box h3 {
  margin: 0;
  font-size: 1rem;
}

.translation-detail-box ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.compact-notice {
  width: 100%;
  margin: 0;
  box-shadow: none;
}

.link-editor-row {
  display: grid;
  grid-template-columns: 1fr 1.5fr 1.2fr 1.1fr auto;
  gap: 12px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fffaf2;
}

.category-editor-row {
  grid-template-columns: 1.4fr 0.7fr auto auto auto;
}

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

.restaurant-editor-row {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fffaf2;
}

.restaurant-image-editor {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
}

.restaurant-image-editor img {
  width: 120px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.audit-log-table-wrap {
  overflow-x: auto;
}

.audit-log-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.audit-log-table th,
.audit-log-table td {
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
}

.audit-log-table th {
  color: var(--muted);
}

.audit-log-table small {
  display: block;
  color: var(--muted);
}

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

.checkbox-line {
  display: flex !important;
  align-items: center;
  gap: 10px;
  color: var(--ink) !important;
}

.checkbox-line input {
  width: 18px;
  min-height: 18px;
}

.editor-list {
  display: grid;
  gap: 12px;
}

.editor-entry {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
  background: #fffaf2;
}

.editor-entry summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  color: var(--ink);
}

.editor-entry summary span {
  font-weight: 900;
}

.editor-entry summary small {
  color: var(--muted);
  font-weight: 800;
}

.editor-entry .editor-form {
  padding: 0 18px 18px;
}

.delete-form {
  padding: 0 18px 18px;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

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

.status-dot {
  display: block;
  width: 12px;
  height: 12px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: var(--gold);
}

code {
  border-radius: 6px;
  padding: 2px 6px;
  background: var(--surface-soft);
  color: var(--accent-strong);
}

@media (max-width: 1040px) {
  .site-header,
  .site-footer {
    width: min(100% - 24px, 1180px);
  }

  .site-header,
  .site-footer,
  .contact-band {
    align-items: stretch;
    flex-direction: column;
  }

  .site-header {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .top-nav {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    overflow: visible;
  }

  .header-actions {
    justify-items: start;
  }

  .language-switcher {
    justify-content: flex-start;
  }

  .brand {
    align-items: flex-start;
  }

  main {
    width: min(100% - 24px, 1180px);
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    padding-top: 20px;
    gap: 20px;
  }

  .hero-title-line {
    white-space: normal;
  }

  .search-panel-abc {
    margin-top: -8px;
  }

  .hero-media {
    height: auto;
    min-height: 280px;
    aspect-ratio: 16 / 10;
  }

  .quick-actions,
  .entry-list,
  .contact-band,
  .restaurant-hero,
  .restaurant-grid,
  .staff-grid,
  .form-grid,
  .language-checkbox-grid,
  .link-editor-row,
  .category-editor-row,
  .restaurant-image-editor {
    grid-template-columns: 1fr;
  }

  .restaurant-hero {
    align-items: stretch;
    padding-top: 28px;
  }

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

  .letter-nav {
    position: static;
  }
}

@media (max-width: 520px) {
  .brand-logo {
    width: 126px;
  }

  .brand-text {
    flex-basis: 100%;
  }

  h1 {
    font-size: 2.1rem;
    line-height: 1.04;
  }

  .top-nav a {
    min-height: 36px;
    padding: 8px;
    font-size: 0.94rem;
  }

  .hero-copy > p:not(.eyebrow),
  .internal-hero p,
  .contact-band p,
  .restaurant-hero p {
    font-size: 1rem;
  }

  .restaurant-facts div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .quick-action {
    min-height: 88px;
  }
}
