:root {
  --bg: #ffffff;
  --surface: #f8fafc;
  --border: #e5e7eb;
  --text: #111827;
  --muted: #4b5563;
  --accent: #cf2b2d;
  --accent-ink: #ffffff;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 10px 20px rgba(0, 0, 0, .04);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font: 16px/1.6 ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

.container {
  max-width: 1200px;
  margin-inline: auto;
  padding: 24px;
}

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

header {
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #fff, #fafafa);
}

.brand {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: flex-start;
  padding: 20px 24px;
}

.site-logo {
  width: 220px;
  height: auto;
}

.brand h1 {
  margin: 0;
  font-size: clamp(20px, 3vw, 28px);
}

.tagline {
  margin: 2px 0 0;
  color: var(--muted);
}

.sidebar {
  position: sticky;
  top: 16px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

nav h2 {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--muted);
  letter-spacing: .06em;
  text-transform: uppercase;
}

.nav {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav a {
  display: block;
  padding: 4px 12px;
  color: var(--text);
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 10px;
}

.nav a:hover {
  background: #fff;
  border-color: var(--border);
}

.nav a[aria-current="page"] {
  color: var(--accent-ink);
  background: var(--accent);
}

.stack {
  display: grid;
  gap: 20px;
  min-width: 0;
}

.card {
  padding: 20px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.page-title {
  margin-top: 0;
}

.grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 20px;
}

.meta {
  color: var(--muted);
  font-size: 14px;
}

.meta-spaced {
  margin-top: 12px;
}

.announcement {
  border-left: 6px solid var(--accent);
  background: linear-gradient(180deg, #fff, #fdf3f3);
}

.cta {
  display: inline-block;
  margin-top: 8px;
  padding: 10px 14px;
  color: var(--accent-ink);
  font-weight: 600;
  background: var(--accent);
  border: 1px solid transparent;
  border-radius: 12px;
}

.cta:hover {
  text-decoration: none;
  opacity: .92;
}

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

.legacy {
  overflow-x: auto;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.legacy table {
  max-width: 100%;
  border-collapse: collapse;
}

.legacy td {
  vertical-align: top;
}

.legacy img {
  max-width: 100%;
  height: auto;
}

.legacy font[color="#FFFFFF" i] {
  color: var(--text) !important;
}

.legacy b font[color="#CCFFFF" i] {
  display: inline-block;
  color: var(--text) !important;
  font: inherit;
  font-size: 1.17em;
  font-weight: 700;
  line-height: 1.3;
}

.legacy p {
  color: inherit;
}

.product-title {
  margin-top: 0;
}

.product-title a {
  color: var(--text);
  text-decoration: none;
}

.product-title a:hover {
  text-decoration: underline;
}

.tour-list {
  display: grid;
  gap: 20px;
}

.tour-card {
  display: block;
}

.tour-card img {
  margin-bottom: 12px;
  border-radius: 10px;
}

.tour-card p {
  margin-bottom: 0;
}

.thumb-button {
  display: inline-block;
  padding: 0;
  background: transparent;
  border: 0;
  cursor: zoom-in;
}

.thumb-button img {
  border-radius: 10px;
}

.preview-hint {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.image-dialog {
  max-width: min(95vw, 1200px);
  max-height: 95vh;
  padding: 0;
  background: transparent;
  border: 0;
}

.image-dialog::backdrop {
  background: rgba(0, 0, 0, .82);
}

.image-dialog-shell {
  position: relative;
}

.image-dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 42px;
  height: 42px;
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  background: rgba(17, 24, 39, .82);
  border: 0;
  border-radius: 999px;
}

.image-dialog-image {
  display: block;
  width: auto;
  max-width: 95vw;
  height: auto;
  max-height: 90vh;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .4);
}

.image-dialog-caption {
  margin: 10px 0 0;
  color: #fff;
  font-size: 14px;
  text-align: center;
}

footer {
  margin-top: 40px;
  background: #fff;
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
  color: var(--muted);
  font-size: 14px;
}

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

:focus-visible {
  border-radius: 8px;
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

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

  .sidebar {
    position: static;
  }
}

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

@media (max-width: 560px) {
  .container {
    padding: 16px;
  }

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

  .site-logo {
    width: 150px;
  }
}
