/* =========================================================================
   楽しく学ぼう著作権 (kidscric.com) — kids' copyright learning site
   Self-sufficient stylesheet: full layout does NOT depend on the CDN framework.
   Palette: teal + sunny yellow + warm coral on cream. Rounded, playful, legible.
   ========================================================================= */

/* ---- Safeguard: content is NEVER hidden waiting on JS. Any scroll-reveal
   markup is progressive enhancement only. (Designer AOS-trap rule.) ---- */
[data-aos]{opacity:1 !important;transform:none !important;}

:root{
  --teal:#1aa0c8; --teal-dark:#0f7fa3; --teal-deep:#0b5f7c; --teal-light:#5cc4e0; --teal-wash:#e6f6fb;
  --yellow:#ffcf33; --yellow-soft:#ffe58a;
  --coral:#ff6f61; --coral-dark:#e8503f;
  --cream:#fff9ee; --card:#ffffff; --line:#ffe9c9;
  --ink:#2f3a45; --muted:#61707d;
  --r:20px; --r-sm:12px;
  --shadow:0 10px 26px rgba(15,95,124,.10);
  --shadow-sm:0 4px 12px rgba(15,95,124,.09);
  --head:'Zen Maru Gothic','M PLUS Rounded 1c',system-ui,sans-serif;
  --body:'M PLUS Rounded 1c',system-ui,-apple-system,'Hiragino Kaku Gothic ProN',Meiryo,sans-serif;
}

*{box-sizing:border-box;}
html{scroll-behavior:smooth;}
body{
  margin:0; font-family:var(--body); color:var(--ink);
  background:var(--cream);
  background-image:radial-gradient(var(--line) 1.3px, transparent 1.3px);
  background-size:26px 26px;
  line-height:1.95; font-weight:400; -webkit-font-smoothing:antialiased;
}
img{max-width:100%;height:auto;display:block;}
a{color:var(--teal-dark);text-decoration:none;}
a:hover{color:var(--coral-dark);text-decoration:underline;text-underline-offset:3px;}

.skip-link{position:absolute;left:-999px;top:0;background:var(--coral);color:#fff;padding:.5rem .9rem;border-radius:0 0 var(--r-sm) 0;z-index:100;}
.skip-link:focus{left:0;}

/* ---------------- Header + Nav ---------------- */
.site-header{position:sticky;top:0;z-index:40;background:rgba(255,249,238,.96);
  backdrop-filter:blur(6px);border-bottom:3px solid var(--yellow-soft);box-shadow:var(--shadow-sm);}
.header-inner{max-width:1180px;margin:0 auto;padding:.6rem 1rem;}
.brand{display:inline-flex;align-items:center;gap:.7rem;color:var(--ink);}
.brand:hover{text-decoration:none;}
.brand-mark{width:48px;height:48px;border-radius:50%;border:3px solid var(--teal-light);
  box-shadow:var(--shadow-sm);background:var(--card);object-fit:cover;}
.brand-text{display:flex;flex-direction:column;line-height:1.2;}
.brand-name{font-family:var(--head);font-weight:900;font-size:1.32rem;color:var(--teal-deep);letter-spacing:.02em;}
.brand-sub{font-size:.74rem;color:var(--muted);font-weight:500;}

.mainnav{background:linear-gradient(180deg,var(--teal),var(--teal-dark));}
.nav-inner{max-width:1180px;margin:0 auto;padding:.55rem 1rem;display:flex;flex-wrap:wrap;gap:.4rem;}
.navpill{display:inline-flex;align-items:center;gap:.35rem;padding:.32rem .78rem;border-radius:999px;
  background:rgba(255,255,255,.14);color:#fff;font-weight:700;font-size:.86rem;line-height:1.4;
  border:2px solid transparent;transition:transform .12s ease,background .12s ease;}
.navpill:hover{background:#fff;color:var(--teal-dark);text-decoration:none;transform:translateY(-2px);}
.navpill.is-active{background:var(--yellow);color:#4a3a00;border-color:#fff;}
.navpill i{font-size:.95rem;}

/* ---------------- Main / Article ---------------- */
.page{max-width:1180px;margin:0 auto;padding:1.6rem 1rem 2.4rem;}
.article{max-width:820px;margin:0 auto;background:var(--card);border-radius:var(--r);
  box-shadow:var(--shadow);padding:1.4rem clamp(1rem,4vw,2.6rem) 2rem;border:1px solid #fff;}
.hero-fig{margin:.2rem 0 1.4rem;}
.hero-fig img{width:100%;border-radius:var(--r);box-shadow:var(--shadow);aspect-ratio:16/9;object-fit:cover;
  border:4px solid #fff;outline:2px solid var(--teal-wash);}
.inline-fig{margin:1.6rem 0;}
.inline-fig img{width:100%;border-radius:var(--r);box-shadow:var(--shadow-sm);border:4px solid #fff;outline:2px solid var(--teal-wash);}

.article h1{font-family:var(--head);font-weight:900;color:var(--teal-deep);
  font-size:clamp(1.6rem,4.4vw,2.35rem);line-height:1.35;margin:.2rem 0 1rem;
  padding-bottom:.5rem;border-bottom:4px dotted var(--yellow);}
.article h2{font-family:var(--head);font-weight:700;color:var(--teal-dark);
  font-size:clamp(1.2rem,3vw,1.5rem);margin:2rem 0 .8rem;padding-left:.8rem;position:relative;}
.article h2::before{content:"";position:absolute;left:0;top:.18em;bottom:.18em;width:7px;border-radius:6px;
  background:linear-gradient(var(--coral),var(--yellow));}
.article h3{font-family:var(--head);font-weight:700;color:var(--coral-dark);font-size:1.1rem;margin:1.3rem 0 .5rem;}
.article p{margin:.7rem 0;}
.article strong{color:var(--teal-deep);font-weight:700;background:linear-gradient(transparent 62%, var(--yellow-soft) 62%);padding:0 .1em;}
.article em{font-style:normal;color:var(--muted);font-weight:500;}
.article ul,.article ol{margin:.7rem 0 1rem;padding-left:1.4rem;}
.article li{margin:.42rem 0;padding-left:.2rem;}
.article ul li::marker{color:var(--coral);content:"\25CF  ";}
.article ol li::marker{color:var(--teal);font-weight:700;}
.article a{font-weight:700;border-bottom:2px solid var(--teal-wash);}
.article a:hover{border-bottom-color:var(--coral);}

/* ---------------- Homepage portal ---------------- */
.portal{max-width:1060px;margin:2.2rem auto 0;}
.portal-h{font-family:var(--head);font-weight:900;color:var(--teal-deep);text-align:center;
  font-size:clamp(1.3rem,3.4vw,1.8rem);margin:.4rem 0 1.2rem;}
.portal-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:1rem;}
.portal-card{display:flex;gap:.9rem;align-items:flex-start;background:var(--card);border-radius:var(--r);
  padding:1rem 1.1rem;box-shadow:var(--shadow-sm);border:2px solid #fff;transition:transform .14s ease,box-shadow .14s ease,border-color .14s ease;}
.portal-card:hover{text-decoration:none;transform:translateY(-4px);box-shadow:var(--shadow);border-color:var(--yellow);}
.pc-ico{flex:0 0 auto;width:52px;height:52px;border-radius:16px;display:grid;place-items:center;
  background:linear-gradient(135deg,var(--teal-light),var(--teal));color:#fff;font-size:1.5rem;box-shadow:var(--shadow-sm);}
.portal-card:nth-child(3n+2) .pc-ico{background:linear-gradient(135deg,var(--yellow),var(--coral));}
.portal-card:nth-child(3n) .pc-ico{background:linear-gradient(135deg,var(--coral),var(--teal-dark));}
.pc-body{display:flex;flex-direction:column;}
.pc-title{font-family:var(--head);font-weight:700;color:var(--teal-deep);font-size:1.05rem;line-height:1.4;}
.pc-desc{color:var(--muted);font-size:.85rem;line-height:1.6;margin-top:.15rem;}

/* ---------------- Buttons ---------------- */
.btn-pill{display:inline-flex;align-items:center;gap:.45rem;background:linear-gradient(180deg,var(--coral),var(--coral-dark));
  color:#fff;font-family:var(--head);font-weight:700;padding:.6rem 1.3rem;border-radius:999px;
  box-shadow:var(--shadow-sm);transition:transform .12s ease,box-shadow .12s ease;margin:.25rem .3rem;}
.btn-pill:hover{color:#fff;text-decoration:none;transform:translateY(-3px);box-shadow:var(--shadow);}
.btn-pill.ghost{background:#fff;color:var(--teal-dark);border:2px solid var(--teal-light);}
.backhome{text-align:center;margin-top:2rem;}

/* ---------------- 404 ---------------- */
.notfound{max-width:640px;margin:2rem auto;background:var(--card);border-radius:var(--r);
  box-shadow:var(--shadow);padding:2.4rem 1.6rem;text-align:center;}
.nf-code{font-family:var(--head);font-weight:900;font-size:2.6rem;color:var(--coral);margin:0;}
.notfound h1{font-family:var(--head);color:var(--teal-deep);font-size:1.5rem;margin:.4rem 0 1rem;}

/* ---------------- Footer ---------------- */
.site-footer{margin-top:2.5rem;background:linear-gradient(180deg,var(--teal-dark),var(--teal-deep));color:#eaf7fb;}
.foot-grid{max-width:1180px;margin:0 auto;padding:2rem 1.2rem 1rem;display:grid;
  grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:1.4rem;}
.foot-col h3{font-family:var(--head);font-weight:700;color:var(--yellow);font-size:1rem;margin:0 0 .6rem;}
.foot-col ul{list-style:none;margin:0;padding:0;}
.foot-col li{margin:.34rem 0;}
.foot-col a{color:#eaf7fb;font-size:.9rem;font-weight:500;}
.foot-col a:hover{color:var(--yellow);text-decoration:none;}
.foot-note{max-width:1180px;margin:0 auto;padding:1rem 1.2rem 1.6rem;border-top:2px solid rgba(255,255,255,.16);text-align:center;}
.tagline{font-family:var(--head);font-weight:700;color:var(--yellow-soft);margin:.3rem 0;}
.tagline .bi-heart-fill{color:var(--coral);}
.copyline{font-size:.8rem;color:#cfe9f1;margin:.3rem 0 0;}

/* ---------------- Responsive ---------------- */
@media (max-width:640px){
  .brand-sub{display:none;}
  .navpill span{font-size:.8rem;}
  .article{padding:1.1rem 1.1rem 1.6rem;}
}
@media (prefers-reduced-motion:reduce){
  *{scroll-behavior:auto !important;transition:none !important;}
}
