:root {
  --washi: #fbf8f3;
  --card: #ffffff;
  --surface: #f3ede2;
  --sumi: #2a2623;
  --muted: #5d554d;
  --shu: #b85d3b;
  --shu-hover: #9f4d2f;
  --kin: #b58938;
  --border: #e4ddd0;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", "Hiragino Kaku Gothic ProN", sans-serif;
  background: var(--washi);
  color: var(--sumi);
  line-height: 1.7;
  font-size: 16px;
}

/* Language visibility */
body.lang-en .t-ja { display: none !important; }
body.lang-ja .t-en { display: none !important; }

.container {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Sticky Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(251, 248, 243, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: Georgia, "Shippori Mincho", "Yu Mincho", serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--sumi);
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--shu);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 6px 8px;
  border-radius: 8px;
}

.nav-link:hover {
  color: var(--sumi);
  background: var(--surface);
}

.lang-switcher {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  padding: 2px;
}

.lang-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
}

.lang-btn.active {
  background: var(--shu);
  color: #fff;
}

/* Main Content */
.page-main {
  padding-top: 28px;
}

.hero {
  padding: 16px 0 36px;
}

.hero-card {
  background: linear-gradient(135deg, #ffffff 0%, #f7ede0 100%);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 36px 28px;
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 28px;
  align-items: center;
}

.badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(184, 93, 59, 0.12);
  color: var(--shu);
  font-size: 13px;
  font-weight: 700;
}

h1 {
  font-family: Georgia, "Shippori Mincho", "Yu Mincho", serif;
  font-size: clamp(28px, 4vw, 42px);
  margin: 14px 0 12px;
  line-height: 1.25;
}

.lead {
  font-size: 16px;
  color: var(--muted);
  margin: 0 0 20px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 26px;
  border-radius: 14px;
  background: var(--shu);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
}

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

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 22px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--sumi);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
}

/* Visual Tanzaku Preview inside Hero */
.tanzaku-visual {
  background: linear-gradient(160deg, #fcefe8 0%, #f5c6c0 55%, #e89ca0 100%);
  border: 1px solid rgba(184, 93, 59, 0.25);
  border-radius: 20px;
  padding: 28px 20px;
  min-height: 290px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  box-shadow: 0 12px 28px rgba(42, 38, 35, 0.08);
}

.tanzaku-jp {
  writing-mode: vertical-rl;
  font-family: "Shippori Mincho", "Yu Mincho", Georgia, serif;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.75;
  letter-spacing: 0.12em;
  color: #2a2623;
  margin: 4px auto;
}

.tanzaku-en {
  font-family: Georgia, serif;
  font-size: 13px;
  font-style: italic;
  color: #4b3e39;
  border-top: 1px solid rgba(42, 38, 35, 0.2);
  padding-top: 10px;
  margin-top: 10px;
}

.section-title {
  font-family: Georgia, "Shippori Mincho", "Yu Mincho", serif;
  font-size: 26px;
  margin: 40px 0 16px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin: 16px 0 40px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px;
}

.card h2, .card h3 {
  font-family: Georgia, "Shippori Mincho", "Yu Mincho", serif;
  font-size: 19px;
  margin: 0 0 8px;
}

.card p {
  font-size: 15px;
  margin: 0;
  color: var(--muted);
}

/* Legal Tables & Articles */
article h2 {
  font-family: Georgia, "Shippori Mincho", "Yu Mincho", serif;
  font-size: 21px;
  margin: 28px 0 10px;
}

article p, article li {
  font-size: 15.5px;
}

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

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: var(--shu);
  margin-bottom: 6px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

th, td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 14.5px;
  vertical-align: top;
}

th {
  background: var(--surface);
  font-weight: 700;
}

.related-nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 32px 0;
}

.related-nav-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--sumi);
  text-decoration: none;
  font-weight: 600;
  font-size: 14.5px;
}

.related-nav-card:hover {
  border-color: var(--shu);
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  color: var(--muted);
  font-size: 14px;
  margin-top: 40px;
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}

.footer-links a:hover {
  color: var(--shu);
}

@media (max-width: 720px) {
  .hero-card {
    grid-template-columns: 1fr;
    padding: 24px 18px;
  }
  .nav-link.hide-mobile {
    display: none;
  }
}
