/* ============================================================
   こもれびアプリ 共通スタイル
   考え方：黒板の緑に、窓からの木漏れ日（丸い光）が落ちている。
   色はマスコット「アルビー」の毛色とパーカーから取っている。
   ============================================================ */

:root{
  --board:#1E5444;      /* 黒板 */
  --chalk:#F7F5EC;      /* チョークの白 */
  --sun:#FFD86B;        /* ひだまり（黄色いチョーク） */
  --sun-soft:#FFF6D8;   /* うすいひだまり */
  --mint:#DDF4E8;       /* アルビーの毛色をうすめた色 */
  --hoodie:#F27A1A;     /* パーカーのオレンジ */
  --ink:#1F2A4A;        /* パーカーの紺 */
  --ink-sub:#57617A;
  --paper:#FFFFFF;
  --rule:#D5DAE3;
  --font-hand:"Klee One","UD デジタル 教科書体 NK-B","UD Digi Kyokasho NK-B","Hiragino Maru Gothic ProN","Yu Gothic UI",sans-serif;
  --font-body:"BIZ UDPGothic","BIZ UDPゴシック","Hiragino Kaku Gothic ProN","Yu Gothic UI","Meiryo",system-ui,sans-serif;
}
@media (prefers-color-scheme:dark){
  :root{
    --paper:#111A16;
    --ink:#E9EFEA;
    --ink-sub:#A4B2A9;
    --rule:#2B3A33;
    --mint:#1F3B30;
    --sun-soft:#2B2915;
  }
}

*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{
  margin:0;
  background:var(--paper);
  color:var(--ink);
  font-family:var(--font-body);
  font-size:16px;
  line-height:1.75;
}
img{max-width:100%;height:auto}
.lead,.app-desc,.bubble,.notes p,.movie-points li,.for-teachers span,.movie-title,.app-name a{word-break:auto-phrase;text-wrap:pretty}
.inner{max-width:1040px;margin:0 auto;padding-left:24px;padding-right:24px}

/* ---------- 黒板（ページの上の部分） ---------- */
.board{position:relative;background:var(--board);color:var(--chalk)}

/* 木漏れ日：黒板に落ちる丸い光 */
.light{position:absolute;inset:0;overflow:hidden;pointer-events:none}
.light i{
  position:absolute;border-radius:50%;
  background:radial-gradient(circle,rgba(255,236,160,.32) 0%,rgba(255,236,160,.18) 44%,rgba(255,236,160,0) 70%);
  animation:sway 9s ease-in-out infinite alternate;
}
.light i:nth-child(1){width:230px;height:230px;left:44%;top:-70px}
.light i:nth-child(2){width:140px;height:140px;left:58%;top:76px;animation-duration:7s;animation-delay:-2s}
.light i:nth-child(3){width:86px;height:86px;left:51%;top:168px;animation-duration:11s;animation-delay:-5s}
.light i:nth-child(4){width:320px;height:320px;left:66%;top:36px;animation-duration:13s;animation-delay:-3s}
.light i:nth-child(5){width:120px;height:120px;left:34%;top:40px;animation-duration:8s;animation-delay:-6s}
.light i:nth-child(6){width:64px;height:64px;left:27%;top:132px;animation-duration:10s;animation-delay:-1s}
.light i:nth-child(7){width:170px;height:170px;left:86%;top:-40px;animation-duration:12s;animation-delay:-7s}
@keyframes sway{
  from{transform:translate(0,0) scale(1);opacity:.75}
  to{transform:translate(12px,-7px) scale(1.07);opacity:1}
}
@media (prefers-reduced-motion:reduce){
  .light i{animation:none}
}

.board-inner{
  position:relative;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto auto;
  grid-template-rows:1fr auto;
  column-gap:28px;
  min-height:330px;
  padding-top:52px;
  padding-bottom:44px;
}
.board h1{
  grid-column:1;grid-row:1;align-self:end;
  margin:0;
  font-family:var(--font-hand);font-weight:600;
  font-size:clamp(2.5rem,6.6vw,4.75rem);
  line-height:1.15;letter-spacing:.04em;
}
.chalkline{display:block;width:7.25em;max-width:100%;height:.17em;margin-top:.1em;overflow:visible}
.chalkline path{fill:none;stroke:var(--sun);stroke-width:3.5;stroke-linecap:round}
.board .lead{
  grid-column:1;grid-row:2;
  margin:20px 0 0;
  font-size:1.0625rem;line-height:1.9;
}
.board .lead span{display:block}
.board .alby{
  grid-column:2;grid-row:1 / 3;align-self:end;
  height:256px;width:auto;max-width:none;
  margin-bottom:-68px;   /* 黒板の下の線から少しはみ出して立たせる */
}
/* 黒板の右はしの「日付・日直」 */
.hizuke{
  grid-column:3;grid-row:1 / 3;
  writing-mode:vertical-rl;
  margin:0;padding-left:18px;
  border-left:1px solid rgba(247,245,236,.4);
  font-family:var(--font-hand);font-weight:600;
  font-size:1.125rem;line-height:1.95;letter-spacing:.2em;
  white-space:nowrap;
}
.hizuke span{display:block}

/* ---------- アプリの一覧 ---------- */
main{padding-top:72px}
.shelf + .shelf{margin-top:60px}
.shelf-head{
  display:flex;align-items:flex-end;justify-content:space-between;gap:16px;
  border-bottom:2px solid var(--ink);
}
.shelf-head h2{
  margin:0;padding-bottom:10px;
  font-family:var(--font-hand);font-weight:600;
  font-size:1.5rem;line-height:1.3;letter-spacing:.06em;
}
.sitter{flex:none;height:96px;width:auto;margin-bottom:-4px} /* 線の上にすわらせる */

.apps{
  list-style:none;margin:0;padding:0;
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:48px;
}
.app{
  position:relative;
  display:grid;grid-template-columns:60px minmax(0,1fr);column-gap:18px;align-items:start;
  padding:22px 14px 22px 10px;
  border-bottom:1px solid var(--rule);
  transition:background-color .18s ease;
}
.app:hover,.app:focus-within{background:var(--sun-soft)}
.disc{
  width:60px;height:60px;border-radius:50%;
  background:var(--mint);
  display:grid;place-items:center;
  font-size:30px;line-height:1;
  transition:background-color .18s ease;
}
.app:hover .disc,.app:focus-within .disc{background:var(--sun)}
.app-name{
  margin:3px 0 0;
  font-size:1.1875rem;font-weight:700;line-height:1.45;
  display:flex;flex-wrap:wrap;align-items:center;column-gap:10px;
}
.app-name a{color:inherit;text-decoration:none}
.app-name a::after{content:"";position:absolute;inset:0}   /* 行のどこを押しても開く */
.app-name a:focus-visible{outline:none}
.app-name a:focus-visible::after{outline:3px solid var(--ink);outline-offset:-3px}
.newwin{
  display:inline-flex;align-items:center;gap:4px;
  font-size:.75rem;font-weight:400;color:var(--ink-sub);white-space:nowrap;
}
.newwin svg{width:12px;height:12px;flex:none}
.app-desc{margin:6px 0 0;font-size:.9375rem;line-height:1.75;color:var(--ink-sub)}
.for-teachers{
  position:relative;z-index:1;
  display:flex;width:fit-content;max-width:100%;align-items:center;gap:8px;
  margin-top:12px;
  font-size:.8125rem;font-weight:700;line-height:1.5;
  color:var(--ink);text-decoration:none;
}
.for-teachers svg{width:22px;height:22px;flex:none}
.for-teachers + .for-teachers{margin-top:8px}
.for-teachers:hover span,.for-teachers:focus-visible span{text-decoration:underline;text-underline-offset:4px}
.for-teachers:focus-visible{outline:3px solid var(--ink);outline-offset:3px;border-radius:4px}

/* ---------- 下のひとこと ---------- */
.outro{display:flex;align-items:flex-end;gap:10px;margin-top:68px}
.outro img{flex:none;height:116px;width:auto}
.bubble{
  position:relative;
  margin:0 0 38px;padding:12px 18px;max-width:31em;
  border:2px solid var(--ink);border-radius:16px;
  background:var(--paper);
  font-size:.9375rem;line-height:1.7;
}
.bubble::before{
  content:"";position:absolute;left:-9px;bottom:16px;width:14px;height:14px;
  background:var(--paper);
  border-left:2px solid var(--ink);border-bottom:2px solid var(--ink);
  transform:rotate(45deg);
}
.notes{
  margin-top:44px;padding:20px 0 60px;
  border-top:1px solid var(--rule);
  font-size:.8125rem;line-height:1.8;color:var(--ink-sub);
}
.notes p{margin:4px 0;max-width:60em}

/* ---------- 「先生方へ」のページ ---------- */
.board-small .board-inner{
  display:block;min-height:0;padding-top:26px;padding-bottom:34px;
}
.back{color:var(--chalk);font-size:.875rem;text-decoration:underline;text-underline-offset:5px;text-decoration-color:rgba(247,245,236,.5)}
.back:hover,.back:focus-visible{text-decoration-color:var(--sun)}
.board-small h1{font-size:clamp(2rem,5vw,3rem);margin-top:18px}
.board-small .lead{margin-top:14px}
.toc{
  list-style:none;margin:16px 0 0;padding:0;
  display:flex;flex-wrap:wrap;gap:6px 26px;
  font-size:.9375rem;
}
.toc a{color:var(--chalk);text-underline-offset:5px}
.movie{scroll-margin-top:20px}
.movie + .movie{margin-top:68px}
.movie h2{
  margin:0 0 24px;padding-bottom:10px;
  border-bottom:2px solid var(--ink);
  font-family:var(--font-hand);font-weight:600;
  font-size:1.5rem;line-height:1.3;letter-spacing:.06em;
}
.movie-body{display:grid;grid-template-columns:minmax(0,3fr) minmax(0,2fr);column-gap:36px;align-items:start}
.movie video{display:block;width:100%;height:auto;background:#000;border-radius:6px}
.movie-title{margin:0;font-size:1.125rem;font-weight:700;line-height:1.5}
.movie-points{margin:12px 0 0;padding-left:1.25em;font-size:.9375rem;line-height:1.8;color:var(--ink-sub)}
.movie-points li + li{margin-top:6px}
.movie .apps{grid-template-columns:minmax(0,1fr);margin-top:20px;border-top:1px solid var(--rule)}

/* ---------- せまい画面（スマホ・たて向きタブレット） ---------- */
@media (max-width:800px){
  .apps{grid-template-columns:minmax(0,1fr)}
  .movie-body{grid-template-columns:minmax(0,1fr);row-gap:18px}
}
@media (max-width:640px){
  .inner{padding-left:18px;padding-right:18px}
  .board-inner{grid-template-rows:auto auto auto;column-gap:12px;min-height:0;padding-top:34px;padding-bottom:30px}
  .board h1{grid-column:1 / 3;font-size:clamp(1.6rem,8.4vw,2.75rem);white-space:nowrap}
  .board .lead{grid-column:1 / 3;font-size:.9375rem;line-height:1.8;margin-top:14px}
  .board .lead span{display:inline}
  .board .alby{grid-column:1 / 3;grid-row:3;justify-self:end;height:118px;margin-top:2px;margin-bottom:-48px}
  .hizuke{grid-row:1 / 4}
  .hizuke{font-size:.9375rem;padding-left:10px;letter-spacing:.14em}
  .light i:nth-child(4){width:220px;height:220px;left:48%;top:70px}
  main{padding-top:56px}
  .app{grid-template-columns:52px minmax(0,1fr);column-gap:14px;padding:18px 8px 18px 4px}
  .disc{width:52px;height:52px;font-size:26px}
  .app-name{font-size:1.0625rem}
  .sitter{height:76px}
  .outro img{height:92px}
  .bubble{margin-bottom:28px}
}
