:root {
  --bg: #08111f;
  --panel: rgba(10, 21, 40, 0.82);
  --panel-border: rgba(210, 184, 120, 0.24);
  --text: #edf2f7;
  --muted: #b7c2d0;
  --gold-soft: #f2deae;
  --line: rgba(255,255,255,0.08);
  --shadow: 0 20px 50px rgba(0,0,0,0.34);
  --success: #61d39d;
  --danger: #ff8e8e;
}
* { box-sizing: border-box; }
html { height: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: radial-gradient(circle at top, #102345 0%, #08111f 45%, #050b14 100%);
  color: var(--text); font-family: Inter, system-ui, sans-serif; line-height: 1.65;
}
main { flex: 1 0 auto; }
a { color: inherit; text-decoration: none; }
.link-inline { color: var(--gold-soft); }
img { max-width: 100%; display: block; }
.container { width: min(1180px, calc(100% - 2rem)); margin: 0 auto; }
.narrow { width: min(760px, calc(100% - 2rem)); }

.site-header { position: sticky; top: 0; z-index: 10; backdrop-filter: blur(18px); background: rgba(6, 13, 26, 0.76); border-bottom: 1px solid var(--line); }
.site-header__inner { display: flex; align-items: center; gap: 1rem; min-height: 82px; }
.brand { display: flex; align-items: center; gap: .85rem; min-width: 280px; }
.brand__mark { width: 3rem; height: 3rem; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--panel-border); background: radial-gradient(circle at 30% 30%, #1d315e, #0b1426 70%); overflow: hidden; flex-shrink: 0; }
.brand__mark--logo { padding: .2rem; }
.brand__logo { width: 100%; height: 100%; object-fit: contain; }
.brand strong { display: block; font-size: .98rem; }
.brand small { color: var(--muted); display: block; font-size: .78rem; font-family: 'Noto Serif JP', serif; }
.site-nav { display: flex; align-items: center; gap: .4rem; margin-left: auto; }
.site-nav a { padding: .75rem .95rem; border-radius: .85rem; color: var(--muted); font-size: .92rem; display: flex; flex-direction: column; line-height: 1.15; }
.site-nav a span { font-size: .69rem; color: #8e9db1; font-family: 'Noto Serif JP', serif; margin-top: .25rem; }
.site-nav a:hover, .site-nav a.is-active { color: var(--text); background: rgba(255,255,255,.05); }
.site-header__actions { display:flex; align-items:center; gap:.8rem; }
.header-user { color: var(--muted); font-size:.88rem; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; border-radius: 999px; padding: .9rem 1.15rem; font-weight: 600; border: 1px solid transparent; }
.btn--primary { background: linear-gradient(135deg, #d8b36a, #a88143); color: #0b1220; }
.btn--secondary { background: rgba(255,255,255,.06); border-color: var(--panel-border); color:var(--text); }
.btn--ghost { background: transparent; border-color: var(--line); color: var(--text); }

.hero { padding: 5rem 0 3rem; }
.hero__grid { display: grid; grid-template-columns: 1.35fr .95fr; gap: 1.4rem; align-items: stretch; }
.panel, .card, .form-card { background: var(--panel); border: 1px solid var(--panel-border); border-radius: 1.4rem; box-shadow: var(--shadow); }
.hero__content, .hero__crest { padding: 2rem; }
.kicker { display: inline-flex; gap: .6rem; align-items: center; padding: .45rem .8rem; border-radius: 999px; color: var(--gold-soft); background: rgba(217,180,106,.12); border: 1px solid rgba(217,180,106,.18); font-size: .82rem; letter-spacing: .04em; text-transform: uppercase; }
.hero h1, .page-title h1 { font-size: clamp(2.4rem, 4vw, 4.4rem); line-height: 1.04; margin: 1rem 0; }
.hero p.lead, .page-title p, .muted { color: var(--muted); max-width: 58ch; font-size: 1.04rem; }
.hero__actions, .cta-row { display: flex; gap: .9rem; flex-wrap: wrap; margin-top: 1.5rem; }

.stat-grid, .card-grid, .info-grid, .dashboard-grid { display: grid; gap: 1rem; }
.stat-grid { grid-template-columns: repeat(3, 1fr); margin-top: 1.75rem; }
.stat { padding: 1rem 1.1rem; border-radius: 1rem; background: rgba(255,255,255,.03); border: 1px solid var(--line); }
.stat strong { display: block; font-size: 1.5rem; color: var(--gold-soft); }

.hero__crest { position: relative; display: flex; align-items: center; justify-content: center; min-height: 440px; background: radial-gradient(circle at 50% 25%, rgba(217,180,106,.14), transparent 32%), rgba(8,16,31,.68); }
.crest-circle { width: min(22rem, 92%); aspect-ratio: 1; border-radius: 50%; border: 1px solid rgba(217,180,106,.28); display: grid; place-items: center; position: relative; box-shadow: inset 0 0 0 1rem rgba(217,180,106,.03), inset 0 0 5rem rgba(0,0,0,.32); }
.crest-circle::before, .crest-circle::after { content: ''; position: absolute; inset: 1rem; border-radius: 50%; border: 1px solid rgba(255,255,255,.06); }
.crest-circle::after { inset: 4rem; }
.crest-core { width: 9rem; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 30% 30%, #f6e4b2, #c69852 50%, #6a4a20 100%); box-shadow: 0 0 2rem rgba(217,180,106,.25); }
.hero-logo { width: min(14rem, 62%); height: auto; object-fit: contain; filter: drop-shadow(0 0 2rem rgba(217,180,106,.18)); }
.logo-fallback { display: inline-grid; place-items: center; width: 100%; height: 100%; font-weight: 800; letter-spacing: .04em; }

.section { padding: 1.1rem 0 4rem; }
.card-grid { grid-template-columns: repeat(3, 1fr); }
.info-grid, .dashboard-grid { grid-template-columns: 1.2fr .8fr; }
.course-card, .card, .form-card { padding: 1.3rem; }
.label { display: inline-block; font-size: .72rem; letter-spacing: .05em; text-transform: uppercase; padding: .3rem .55rem; border-radius: 999px; background: rgba(255,255,255,.06); color: var(--gold-soft); }
.page-title { padding: 3.7rem 0 1.2rem; }
.list-clean { list-style: none; padding: 0; margin: 0; }
.list-clean li { padding: .7rem 0; border-bottom: 1px solid var(--line); }
.list-clean li:last-child { border-bottom: 0; }
.person-meta { display:flex; flex-wrap:wrap; gap:.5rem; margin:.8rem 0 1rem; }
.badge { display:inline-flex; align-items:center; gap:.35rem; padding:.35rem .65rem; border-radius:999px; background:rgba(255,255,255,.05); border:1px solid var(--line); color:var(--muted); font-size:.78rem; }
label { display: block; font-weight: 600; margin-bottom: .4rem; color: var(--text); }
input, textarea, select { width: 100%; padding: .95rem 1rem; border-radius: .95rem; border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.04); color: var(--text); font: inherit; }
textarea { min-height: 180px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: 1px solid rgba(217,180,106,.5); }
input[type=radio], input[type=checkbox] { width: auto; margin-right: .55rem; }
.form-row { display:grid; gap:1rem; grid-template-columns:repeat(2,1fr); }
.question-block { border: 1px solid var(--line); border-radius: 1rem; padding: 1rem; margin: 1rem 0; background: rgba(255,255,255,.02); }
.question-block label { display:block; font-weight:500; margin:.65rem 0; color:var(--muted); }
.alert { margin: 1rem 0; padding: .9rem 1rem; border-radius: 1rem; }
.alert--success { background: rgba(97,211,157,.12); border: 1px solid rgba(97,211,157,.24); color: #bff1d6; }
.alert--danger { background: rgba(255,142,142,.12); border: 1px solid rgba(255,142,142,.24); color: #ffd2d2; }
.table { width:100%; border-collapse:collapse; }
.table th, .table td { text-align:left; padding:.95rem 1rem; border-bottom:1px solid var(--line); }
.table th { color:var(--gold-soft); font-size:.82rem; text-transform:uppercase; letter-spacing:.04em; }
.document-body p:first-child { margin-top: 0; }
.site-footer { margin-top: auto; padding: 1rem 0 2rem; border-top: 1px solid var(--line); background: rgba(4, 8, 15, .45); }
.site-footer__grid { display: grid; grid-template-columns: 1.2fr .7fr .7fr; gap: 1rem; padding: 2rem 0; }
.site-footer__bottom { display: flex; justify-content: space-between; gap: 1rem; color: #93a1b4; font-size: .9rem; border-top: 1px solid var(--line); padding-top: 1rem; }

@media (max-width: 1024px) {
  .hero__grid, .info-grid, .dashboard-grid, .site-footer__grid, .card-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr; }
  .site-header__inner { flex-wrap: wrap; padding: .8rem 0; }
  .site-nav { width: 100%; flex-wrap: wrap; margin-left: 0; }
}
@media (max-width: 680px) {
  .form-row { grid-template-columns:1fr; }
  .hero { padding-top: 3rem; }
  .hero__content, .hero__crest, .card, .form-card { padding: 1.1rem; }
  .site-footer__bottom { flex-direction: column; }
}
