:root {
  --ytg-rail: 17.5rem;
  --ytg-bg: #f4efe6;
  --ytg-ink: #1a1420;
  --ytg-muted: #5c5468;
  --ytg-plum: #2a1830;
  --ytg-gold: #c9a227;
  --ytg-gold-d: #8b6914;
  --ytg-cream: #faf6ef;
  --ytg-blue: #3a6a9a;
  --ytg-font-serif: "Libre Baskerville", "Hiragino Mincho ProN", serif;
  --ytg-font-sans: "Zen Kaku Gothic New", "Hiragino Sans", sans-serif;
  --ytg-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html.ytg-greet-open { overflow: hidden; }
body {
  margin: 0;
  font-family: var(--ytg-font-sans);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--ytg-ink);
  background: var(--ytg-bg);
}

.ytg-skip {
  position: absolute;
  left: -999px;
  top: 0;
  padding: 0.5rem 1rem;
  background: var(--ytg-gold);
  z-index: 100;
}
.ytg-skip:focus { left: 0; }

#ytg-splash {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 2rem;
  text-align: center;
}
html.ytg-splash-active #ytg-splash { display: flex; }
#ytg-splash .ytg-splash__en {
  font-family: var(--ytg-font-serif);
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ytg-gold);
  margin: 0;
}
#ytg-splash .ytg-splash__jp {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0;
  color: var(--ytg-cream);
}

.ytg-greet[hidden] { display: none !important; }
.ytg-greet {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 1rem;
}
.ytg-greet__scrim {
  position: absolute;
  inset: 0;
  background: rgba(12, 8, 18, 0.55);
  backdrop-filter: blur(8px);
}
.ytg-greet__card {
  position: relative;
  max-width: 26rem;
  width: 100%;
  padding: 2rem 1.75rem 1.75rem;
  background: var(--ytg-cream);
  border-radius: 1rem;
  border: 1px solid rgba(201, 162, 39, 0.35);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
}
.ytg-greet__x {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--ytg-muted);
}
.ytg-greet__x:hover { color: var(--ytg-ink); }

.ytg-app {
  display: grid;
  min-height: 100vh;
}
@media (min-width: 960px) {
  .ytg-app {
    grid-template-columns: var(--ytg-rail) 1fr;
  }
}

.ytg-rail {
  background: var(--ytg-plum);
  color: var(--ytg-cream);
  padding: 1.5rem 1.25rem 2rem;
  position: relative;
  z-index: 40;
}
@media (min-width: 960px) {
  .ytg-rail {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    border-right: 3px solid var(--ytg-gold);
  }
}

.ytg-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: inherit;
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1.35;
  margin-bottom: 1.5rem;
}
.ytg-brand img { flex-shrink: 0; }

.ytg-rail nav {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 1;
}
.ytg-rail nav a {
  color: rgba(250, 246, 239, 0.85);
  text-decoration: none;
  padding: 0.55rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.95rem;
  transition: background 0.2s var(--ytg-ease), color 0.2s;
}
.ytg-rail nav a:hover,
.ytg-rail nav a[aria-current="page"] {
  background: rgba(201, 162, 39, 0.18);
  color: #fff;
}
.ytg-rail nav a.ytg-nav-cta {
  margin-top: 0.5rem;
  background: var(--ytg-gold);
  color: var(--ytg-plum);
  font-weight: 700;
  text-align: center;
}
.ytg-rail nav a.ytg-nav-cta:hover { background: #e0bc4a; }

.ytg-rail__foot {
  margin-top: auto;
  padding-top: 1.5rem;
  font-size: 0.78rem;
  color: rgba(250, 246, 239, 0.55);
  line-height: 1.5;
}

.ytg-burger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 50;
  width: 2.75rem;
  height: 2.75rem;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--ytg-gold);
  border-radius: 0.5rem;
  background: var(--ytg-plum);
  cursor: pointer;
}
.ytg-burger span {
  display: block;
  width: 1.1rem;
  height: 2px;
  background: var(--ytg-cream);
}
@media (min-width: 960px) {
  .ytg-burger { display: none; }
}
html.ytg-nav-open .ytg-rail {
  position: fixed;
  inset: 0;
  max-width: 18rem;
  transform: translateX(0);
  box-shadow: 8px 0 40px rgba(0, 0, 0, 0.35);
}
@media (max-width: 959px) {
  .ytg-rail {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(18rem, 88vw);
    transform: translateX(-105%);
    transition: transform 0.35s var(--ytg-ease);
    overflow-y: auto;
  }
  html.ytg-nav-open .ytg-rail { transform: translateX(0); }
  html.ytg-nav-open::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 35;
  }
}

.ytg-main {
  min-width: 0;
  padding: 1rem 1.25rem 3rem;
}
@media (min-width: 960px) {
  .ytg-main { padding: 2rem 2.5rem 4rem; }
}

.ytg-kicker {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ytg-gold-d);
  font-weight: 700;
  margin: 0 0 0.5rem;
}
.ytg-title {
  font-family: var(--ytg-font-serif);
  font-size: clamp(1.75rem, 4vw, 2.65rem);
  line-height: 1.25;
  margin: 0 0 1rem;
  font-weight: 700;
}
.ytg-lead {
  font-size: 1.05rem;
  color: var(--ytg-muted);
  max-width: 38rem;
  margin: 0 0 1.25rem;
}

.ytg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.7rem 1.35rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.15s, background 0.2s;
}
.ytg-btn:active { transform: scale(0.98); }
.ytg-btn--gold {
  background: var(--ytg-gold);
  color: var(--ytg-plum);
}
.ytg-btn--gold:hover { background: #ddb84a; }
.ytg-btn--line {
  background: transparent;
  border-color: var(--ytg-plum);
  color: var(--ytg-plum);
}
.ytg-btn--line:hover { background: rgba(42, 24, 48, 0.06); }
.ytg-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.ytg-home {
  max-width: 42rem;
}
.ytg-home__banner {
  width: 100%;
  height: auto;
  border-radius: 1rem;
  margin: 0 0 1.75rem;
  box-shadow: 0 12px 40px rgba(26, 20, 32, 0.12);
}
.ytg-home__tiles {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}
@media (min-width: 640px) {
  .ytg-home__tiles { grid-template-columns: repeat(3, 1fr); }
}
.ytg-tile {
  background: var(--ytg-cream);
  border: 1px solid rgba(42, 24, 48, 0.08);
  border-radius: 0.85rem;
  padding: 1.25rem;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.ytg-tile:hover {
  border-color: var(--ytg-gold);
  box-shadow: 0 8px 24px rgba(201, 162, 39, 0.15);
}
.ytg-tile h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-family: var(--ytg-font-serif);
}
.ytg-tile p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--ytg-muted);
}

.ytg-plan-strip {
  margin-top: 2.5rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, var(--ytg-plum), #1f2838);
  color: var(--ytg-cream);
  border-radius: 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
}
.ytg-plan-strip .ytg-yen {
  font-family: var(--ytg-font-serif);
  font-size: 1.85rem;
  color: var(--ytg-gold);
  margin: 0;
}
.ytg-plan-strip p { margin: 0; flex: 1; min-width: 12rem; font-size: 0.92rem; opacity: 0.92; }

.ytg-contact-mini {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px dashed rgba(42, 24, 48, 0.15);
  font-size: 0.92rem;
}
.ytg-contact-mini a { color: var(--ytg-blue); }

.site-notice {
  max-width: 42rem;
  margin: 2.5rem 0 0;
  padding: 1rem 1.15rem;
  background: #fff8e8;
  border-left: 4px solid var(--ytg-gold);
  font-size: 0.88rem;
  color: var(--ytg-muted);
}
.site-notice strong { color: var(--ytg-ink); }

.ytg-foot {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(42, 24, 48, 0.1);
  font-size: 0.82rem;
  color: var(--ytg-muted);
}
.legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-bottom: 0.75rem;
}
.legal-links a { color: var(--ytg-blue); }

/* Classes page — editorial */
.ytg-classes-head {
  margin-bottom: 2rem;
}
.ytg-classes-head img {
  width: 100%;
  height: auto;
  border-radius: 1rem;
  margin-top: 1rem;
}

.ytg-toc {
  position: sticky;
  top: 1rem;
  background: var(--ytg-cream);
  border: 1px solid rgba(42, 24, 48, 0.1);
  border-radius: 0.75rem;
  padding: 1rem 1.15rem;
  margin-bottom: 2rem;
  font-size: 0.88rem;
}
@media (min-width: 1100px) {
  .ytg-classes-layout {
    display: grid;
    grid-template-columns: 14rem 1fr;
    gap: 2.5rem;
    align-items: start;
  }
  .ytg-toc { margin-bottom: 0; }
}
.ytg-toc ol {
  margin: 0;
  padding-left: 1.2rem;
}
.ytg-toc a { color: var(--ytg-plum); text-decoration: none; }
.ytg-toc a:hover { text-decoration: underline; }

.ytg-article section {
  margin-bottom: 3.5rem;
  scroll-margin-top: 1.5rem;
}
.ytg-article h2 {
  font-family: var(--ytg-font-serif);
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  margin: 0 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--ytg-gold);
}
.ytg-article h3 {
  font-size: 1.05rem;
  margin: 1.5rem 0 0.5rem;
}
.ytg-article ul, .ytg-article ol {
  padding-left: 1.25rem;
  color: var(--ytg-muted);
}
.ytg-article li { margin-bottom: 0.35rem; }

.ytg-fig {
  margin: 1.5rem 0;
  background: var(--ytg-cream);
  border-radius: 0.85rem;
  overflow: hidden;
  border: 1px solid rgba(42, 24, 48, 0.06);
}
.ytg-fig img {
  display: block;
  width: 100%;
  height: auto;
}
.ytg-fig figcaption {
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  color: var(--ytg-muted);
  border-top: 1px solid rgba(42, 24, 48, 0.06);
}

.ytg-split {
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 720px) {
  .ytg-split--rev { grid-template-columns: 1fr 1fr; align-items: center; }
  .ytg-split--rev .ytg-fig { order: 2; }
}

.ytg-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  margin: 1rem 0;
}
.ytg-table th, .ytg-table td {
  border: 1px solid rgba(42, 24, 48, 0.12);
  padding: 0.65rem 0.85rem;
  text-align: left;
}
.ytg-table th {
  background: var(--ytg-plum);
  color: var(--ytg-cream);
  font-weight: 600;
}

.ytg-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ytg-ease), transform 0.7s var(--ytg-ease);
}
.ytg-reveal.is-in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .ytg-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

.ytg-form {
  max-width: 28rem;
  display: grid;
  gap: 1rem;
}
.ytg-fld label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}
.ytg-fld input,
.ytg-fld textarea,
.ytg-fld select {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(42, 24, 48, 0.2);
  border-radius: 0.5rem;
  font: inherit;
  background: #fff;
}
.ytg-fld input:focus,
.ytg-fld textarea:focus,
.ytg-fld select:focus {
  outline: 2px solid var(--ytg-gold);
  outline-offset: 1px;
}
.ytg-fld input[aria-invalid="true"],
.ytg-fld textarea[aria-invalid="true"] {
  border-color: #c44;
}
.ytg-check {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  font-size: 0.88rem;
}
.ytg-ok {
  padding: 0.75rem;
  background: #e8f4e8;
  border-radius: 0.5rem;
  color: #2a5a2a;
}
.ytg-fail {
  padding: 0.75rem;
  background: #fce8e8;
  border-radius: 0.5rem;
  color: #8a2a2a;
}

.legal-doc {
  max-width: 42rem;
  margin: 0 auto;
  padding: 2rem 0 3rem;
}
.legal-doc h1 {
  font-family: var(--ytg-font-serif);
  font-size: 1.75rem;
}
.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.legal-table th, .legal-table td {
  border: 1px solid rgba(42, 24, 48, 0.15);
  padding: 0.6rem 0.75rem;
  vertical-align: top;
}
.legal-table th {
  width: 32%;
  background: #eee8dc;
  text-align: left;
}
.legal-updated { font-size: 0.88rem; color: var(--ytg-muted); }

.ytg-pay-card {
  max-width: 32rem;
  background: var(--ytg-cream);
  border: 2px solid var(--ytg-gold);
  border-radius: 1rem;
  padding: 1.75rem;
  margin: 1.5rem 0;
}
.ytg-pay-card .ytg-yen {
  font-family: var(--ytg-font-serif);
  font-size: 2.25rem;
  color: var(--ytg-plum);
  margin: 0.25rem 0 1rem;
}
