:root {
  --paper: #f4eee3;
  --paper-dark: #e7dfd0;
  --paper-line: #d8cdb9;
  --ink: #1b1714;
  --ink-sub: #5b524a;
  --plum: #2a1236;
  --plum-deep: #1a0b22;
  --plum-soft: #3a1c4a;
  --wine: #b0245e;
  --wine-dark: #861a47;
  --gold: #e3b766;
  --gold-light: #f0c96e;
  --gold-dark: #8a6a2c;
  --neon: #ff4fa8;
  --on-plum: #f3e9f2;
  --on-plum-sub: #bba6c0;
  --font-body: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Meiryo", sans-serif;
  --font-display: "Dela Gothic One", "Zen Kaku Gothic New", "Hiragino Sans", sans-serif;
  --font-serif: "Zen Old Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --font-script: "Dela Gothic One", sans-serif;
}

.theme-en {
  --font-body: "DM Sans", "Helvetica Neue", Arial, sans-serif;
  --font-display: "Playfair Display", Georgia, serif;
  --font-serif: "Playfair Display", Georgia, serif;
  --font-script: "Pacifico", cursive;
}

.site-header {
  background: var(--plum-deep);
  border-bottom: 3px solid var(--gold);
  font-family: var(--font-body);
}

.site-header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--on-plum);
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
}

.site-brand img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  object-fit: cover;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 4px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  font-weight: 700;
}

.site-nav a {
  color: var(--on-plum-sub);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--gold-light);
}

.site-nav .lang-link {
  border: 1px solid rgba(227, 183, 102, 0.5);
  border-radius: 999px;
  padding: 0 10px;
  color: var(--gold-light);
}

.site-footer {
  background: var(--plum-deep);
  color: var(--on-plum-sub);
  border-top: 3px solid var(--gold);
  font-family: var(--font-body);
  font-size: 14px;
  padding: 28px 0 32px;
}

.site-footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}

.site-footer a {
  color: var(--on-plum);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--gold-light);
}

.site-footer small {
  display: block;
  font-size: 12px;
  line-height: 1.7;
}

.site-btn {
  display: inline-block;
  background: var(--wine);
  color: #fff;
  font-family: var(--font-body);
  font-weight: 900;
  font-size: 17px;
  text-decoration: none;
  padding: 13px 28px;
  border: 3px solid #fff;
  box-shadow: 5px 5px 0 var(--ink);
  transition: transform 0.1s, box-shadow 0.1s;
}

.site-btn:hover {
  background: var(--wine-dark);
  transform: translate(2px, 2px);
  box-shadow: 3px 3px 0 var(--ink);
}

.site-btn-gold {
  background: linear-gradient(180deg, var(--gold-light), #c9a35c);
  color: var(--plum);
  border: none;
  border-radius: 999px;
  box-shadow: 0 6px 24px rgba(227, 183, 102, 0.25);
}

.site-btn-gold:hover {
  background: linear-gradient(180deg, var(--gold-light), #c9a35c);
  filter: brightness(1.08);
  transform: none;
  box-shadow: 0 6px 24px rgba(227, 183, 102, 0.35);
}

a:focus-visible,
summary:focus-visible,
.site-btn:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

body.doc-page {
  --primary-accent: var(--wine);
  --text-main: var(--ink);
  --text-muted: var(--ink-sub);
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.9;
}

.doc-page * {
  box-sizing: border-box;
}

.doc-page > .container {
  max-width: 880px;
  margin: 0 auto;
  padding: 48px 20px 72px;
}

.doc-page > .container > header {
  margin: 0 0 32px;
  padding: 0 0 22px;
  border-bottom: 4px double var(--ink);
}

.doc-page > .container > header .badge {
  display: inline-block;
  background: var(--ink);
  color: var(--paper);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  padding: 2px 12px;
  margin: 0 0 12px;
}

.doc-page > .container > header h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(28px, 4.6vw, 40px);
  line-height: 1.35;
  margin: 0 0 10px;
  color: var(--ink);
}

.doc-page > .container > header p {
  margin: 0;
  color: var(--ink-sub);
  font-size: 14px;
}

.doc-page .card {
  background: #fffdf8;
  border: 1px solid var(--paper-line);
  box-shadow: 6px 6px 0 var(--paper-dark);
  padding: 40px 44px;
}

.doc-page .terms-intro,
.doc-page .policy-intro {
  font-family: var(--font-serif);
  margin: 0 0 32px;
  padding: 0 0 24px;
  border-bottom: 1px solid var(--paper-line);
}

.doc-page .terms-section,
.doc-page .policy-section {
  margin: 0 0 34px;
}

.doc-page .terms-section:last-child,
.doc-page .policy-section:last-child {
  margin-bottom: 0;
}

.doc-page .terms-section h2,
.doc-page .policy-section h2 {
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: 19px;
  line-height: 1.5;
  margin: 0 0 12px;
  padding: 0 0 6px 14px;
  border-left: 5px solid var(--wine);
  border-bottom: 1px solid var(--paper-line);
}

.doc-page .terms-section p,
.doc-page .policy-section p {
  margin: 0 0 10px;
}

.doc-page .terms-section ul,
.doc-page .terms-section ol,
.doc-page .policy-section ul,
.doc-page .policy-section ol {
  margin: 0 0 12px;
  padding-left: 1.6em;
}

.doc-page .terms-section li,
.doc-page .policy-section li {
  margin-bottom: 6px;
}

.doc-page .terms-section li::marker,
.doc-page .policy-section li::marker {
  color: var(--wine);
  font-weight: 700;
}

.doc-page ol.items {
  list-style: none;
  padding-left: 0.4em;
  margin-top: 8px;
}

.doc-page .highlight-box {
  background: var(--paper);
  border-left: 4px solid var(--gold);
  padding: 14px 18px;
  margin: 16px 0;
  font-size: 15px;
}

.doc-page .command-tag,
.doc-page .copyable-badge {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.92em;
  color: var(--plum);
  background: var(--paper-dark);
  border: 1px dashed #bfb39a;
  border-radius: 4px;
  padding: 0 8px;
  white-space: nowrap;
}

.doc-page .copyable-badge {
  cursor: pointer;
}

.doc-page .copyable-badge:hover {
  background: #e3d8c0;
}

.doc-page > .container a {
  color: var(--wine);
  text-underline-offset: 3px;
}

.doc-page > .container > footer {
  margin: 40px 0 0;
  padding: 18px 0 0;
  border-top: 1px solid var(--paper-line);
  color: var(--ink-sub);
  font-size: 13px;
  text-align: center;
}

.doc-page > .container > footer p {
  margin: 0;
}

.doc-page > .container > footer a {
  color: var(--wine);
  text-decoration: none;
}

.doc-page > .container > footer a:hover {
  text-decoration: underline;
}

.doc-page .law-table {
  width: 100%;
  border-collapse: collapse;
}

.doc-page .law-table th,
.doc-page .law-table td {
  padding: 16px 18px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--paper-line);
  font-size: 15px;
}

.doc-page .law-table tr:last-child th,
.doc-page .law-table tr:last-child td {
  border-bottom: none;
}

.doc-page .law-table th {
  width: 28%;
  background: var(--paper);
  font-family: var(--font-serif);
  font-weight: 900;
  white-space: nowrap;
}

.doc-page .price-group {
  margin-bottom: 16px;
}

.doc-page .price-group:last-child {
  margin-bottom: 0;
}

.doc-page .price-group-title {
  font-weight: 700;
  margin-bottom: 6px;
}

.doc-page .price-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.doc-page .price-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
  font-size: 14px;
  border-bottom: 1px dashed var(--paper-line);
}

.doc-page .price-list li:last-child {
  border-bottom: none;
}

.doc-page .price-list .item-val {
  color: var(--wine);
  font-weight: 700;
  white-space: nowrap;
}

.doc-page .note-list {
  padding-left: 20px;
  margin: 6px 0 0;
}

.doc-page .note-list li {
  margin-bottom: 6px;
  font-size: 14px;
  color: var(--ink-sub);
}

.doc-page .important-box {
  background: var(--paper);
  border-left: 4px solid var(--wine);
  padding: 12px 16px;
  margin-top: 8px;
  font-size: 14px;
}

.doc-page .copy-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--plum);
  color: var(--gold-light);
  border: 1.5px solid var(--gold);
  padding: 10px 22px;
  border-radius: 30px;
  font-size: 15px;
  font-weight: 700;
  pointer-events: none;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 9999;
}

.doc-page .copy-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.doc-page .release-item {
  border-bottom: 1px solid var(--paper-line);
  padding-bottom: 28px;
  margin-bottom: 28px;
}

.doc-page .release-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.doc-page .release-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 10px;
}

.doc-page .release-date {
  font-size: 14px;
  color: var(--ink-sub);
  font-weight: 700;
}

.doc-page .release-version {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--wine);
}

.doc-page .tag {
  display: inline-block;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--plum);
  background: var(--gold-light);
}

.doc-page .release-title {
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: 20px;
  line-height: 1.5;
  margin-bottom: 10px;
}

.doc-page .release-body {
  color: var(--ink-sub);
}

.doc-page .release-body ul {
  padding-left: 20px;
  margin-top: 8px;
}

@media (max-width: 760px) {
  .site-header-inner {
    flex-wrap: wrap;
    padding: 8px 16px;
  }

  .site-nav {
    gap: 2px 14px;
    font-size: 13px;
  }

  .doc-page > .container {
    padding: 32px 16px 56px;
  }

  .doc-page .card {
    padding: 24px 18px;
  }

  .doc-page .law-table,
  .doc-page .law-table tbody,
  .doc-page .law-table tr,
  .doc-page .law-table th,
  .doc-page .law-table td {
    display: block;
    width: 100%;
  }

  .doc-page .law-table th {
    border-bottom: none;
    padding-bottom: 4px;
    background: transparent;
  }

  .doc-page .law-table td {
    padding-top: 2px;
    padding-bottom: 18px;
  }

  .doc-page .law-table tr {
    border-bottom: 1px solid var(--paper-line);
  }

  .doc-page .price-list li {
    flex-direction: column;
    gap: 0;
  }
}
