:root{
  --brand:#005BAC; --brand2:#003E7E;
  --success:#28a745; --success2:#1e7e34;
  --danger:#B22222; --danger2:#800000;
  --line:#e9e9e9; --muted:#6b7280; --paper:#fff;
  --shadow:0 10px 25px rgba(0,0,0,.08);
  --radius:16px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:system-ui,-apple-system,"Segoe UI",Roboto,"Noto Sans JP","Hiragino Kaku Gothic ProN","Yu Gothic",sans-serif;
  line-height:1.75;
  color:#111;
  background:var(--paper);
}

a{color:var(--brand);text-decoration:none}
a:hover{text-decoration:underline}

.container{max-width:1080px;margin:0 auto;padding:16px}

/* Header */
.site-header{
  position:sticky; top:0; z-index:20;
  background:#fff;
  border-bottom:1px solid var(--line);
}
.header-row{
  display:flex; align-items:center; justify-content:space-between;
  gap:12px; flex-wrap:wrap;
}
.brand{
  font-weight:900;
  letter-spacing:.02em;
  font-size:1.1rem;
  color:#111;
}
.lang-nav{display:flex;gap:10px;align-items:center}
.lang-current{font-weight:800;color:#111}
.lang-link{
  display:inline-flex;align-items:center;
  padding:8px 12px;border-radius:999px;
  border:1px solid var(--line);
  background:#fff;
  font-weight:700;
}

/* Main */
.hero{
  text-align:center;
  padding:18px 0 6px;
}
.castle-h1{
  margin:0;
  font-size:2rem;
  line-height:1.2;
  font-weight:900;
}
.subtitle{
  margin:10px 0 14px;
  color:var(--muted);
  font-weight:700;
}
.lead{
  margin:0 0 16px;
  color:#333;
  font-weight:700;
}

/* Buttons row */
.buttons{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:14px;
  margin:10px 0 12px;
}
.btn{
  appearance:none;
  border:0;
  border-radius:18px;
  padding:16px 22px;
  min-width:180px;
  font-size:1.05rem;
  font-weight:900;
  color:#fff;
  background:linear-gradient(180deg,var(--brand),var(--brand2));
  box-shadow:0 8px 18px rgba(0,0,0,.10);
  cursor:pointer;
}
.btn:focus{outline:3px solid rgba(0,91,172,.25); outline-offset:2px}
.btn:hover{filter:brightness(1.03)}
.btn:active{transform:translateY(1px)}

.btn-playall{
  background:linear-gradient(180deg,var(--success),var(--success2));
}
.btn-stop{
  background:linear-gradient(180deg,var(--danger),var(--danger2));
}

@media (max-width:720px){
  .btn{min-width:46%; padding:14px 18px}
}

/* Panels
   - The browser hides <details> body when closed and shows <summary>.
   - We hide <summary> because the “buttons” control open/close.
   - If a closed <details> still has border/padding, it becomes an “empty box”.
   - Therefore: only the OPEN panel is displayed.
*/
.panels{max-width:920px;margin:12px auto 0}
.panel{display:none}
.panel[open]{display:block}
.panel > summary{display:none}

/* Make the open panel look like 00001 (no card box, just text) */
.panel[open] h2{
  margin:14px 0 8px;
  font-size:1.35rem;
  font-weight:900;
}
.panel[open] p{
  margin:0 0 12px;
  font-size:1.05rem;
}

/* Figure (image) */
.figure{
  max-width:980px;
  margin:18px auto 0;
  padding:0;
}
.hero-img{
  width:100%;
  height:auto;
  display:block;
  border-radius:18px;
  box-shadow:var(--shadow);
}
.figure figcaption{
  margin-top:8px;
  color:var(--muted);
  font-size:.95rem;
}

/* Ad */
.ad-label{
  font-size:.85rem;
  color:var(--muted);
  text-align:left;
  margin:0 0 6px;
}
.ad-block{
  max-width:980px;
  margin:18px auto 0;
  min-height:140px; /* reserve space to reduce CLS */
}
@media (min-width:860px){
  .ad-block{min-height:250px}
}

/* Footer */
.site-footer{border-top:1px solid var(--line);margin-top:28px;padding-top:16px}
.footer-grid{display:grid;grid-template-columns:1fr;gap:12px}
@media (min-width:860px){
  .footer-grid{grid-template-columns:1.2fr 1fr 1fr}
}
.footer-title{font-weight:900;margin:0 0 6px}
.footer-muted{opacity:.85}
.site-footer ul{list-style:none;padding:0;margin:0}
.site-footer li{margin:6px 0}

/* Utility */
.sep{height:1px;background:var(--line);margin:16px 0}
.noscript{
  max-width:920px;
  margin:10px auto 0;
  padding:0 16px;
  color:var(--muted);
  font-size:.95rem;
}
