/* アプリ画面を HTML で再現したモックアップ（スクショの代わり。拡大してもくっきり・動かせる） */
.phone {
  --pw: 300px;
  width: var(--pw);
  aspect-ratio: 9 / 18.6;
  border-radius: 42px;
  padding: 10px;
  background: #0f1116;
  box-shadow: 0 30px 60px -20px rgba(20, 24, 40, .45), 0 0 0 1px rgba(255, 255, 255, .06) inset;
  flex: none;
  position: relative;
}
.phone::before { /* カメラ穴 */
  content: ""; position: absolute; top: 18px; left: 50%; width: 9px; height: 9px; margin-left: -4.5px;
  border-radius: 50%; background: #23262e; z-index: 2;
}
.screen {
  width: 100%; height: 100%; border-radius: 33px; overflow: hidden;
  background: #fff; color: #1b2230; position: relative;
  font-family: system-ui, -apple-system, "Hiragino Sans", "Noto Sans JP", sans-serif;
  display: flex; flex-direction: column;
}
.scr-head { padding: 34px 16px 8px; }
.scr-eyebrow { font-family: var(--mono); font-size: 8.5px; letter-spacing: .18em; color: #8a91a0; }
.scr-title { font-family: var(--heading); font-weight: 700; font-size: 24px; line-height: 1.2; margin-top: 2px; display: flex; align-items: center; justify-content: space-between; }
.scr-chip { font-family: system-ui, sans-serif; font-size: 10px; font-weight: 600; border: 1px solid #e4e7ee; background: #f2f4f8; border-radius: 999px; padding: 3px 9px; }
.scr-sub { font-size: 10px; color: #5c6473; margin-top: 2px; }
.scr-body { flex: 1; padding: 0 12px; overflow: hidden; }
.tabbar {
  height: 50px; background: #1b2230; display: flex; justify-content: space-around; align-items: center;
  border-radius: 0 0 33px 33px;
}
.tabbar i { width: 16px; height: 16px; border: 1.6px solid #8a91a0; border-radius: 4px; display: block; }
.tabbar i.on { border-color: #909fe6; background: rgba(144, 159, 230, .25); }

/* 時間割グリッド（アプリの「誌面風」：英字曜日・大きな時限番号・横罫・色づいたカード） */
.tt { display: grid; grid-template-columns: 22px repeat(5, 1fr); column-gap: 2px; font-size: 8.5px; }
.tt .dh { text-align: center; padding: 6px 0 4px; border-bottom: 1px solid #e4e7ee; }
.tt .dh b { display: block; font-family: var(--mono); font-size: 7.5px; letter-spacing: .08em; color: #8a91a0; font-weight: 600; }
.tt .dh span { font-size: 9px; font-weight: 700; }
.tt .dh.today b, .tt .dh.today span { color: #5865d6; }
.tt .pn { height: 64px; border-bottom: 1px solid #eef0f4; padding-top: 4px; }
.tt .pn b { font-family: var(--heading); font-size: 15px; display: block; line-height: 1; }
.tt .pn small { font-family: var(--mono); font-size: 6.5px; color: #8a91a0; }
.tt .cell { height: 64px; border-bottom: 1px solid #eef0f4; padding: 2px 0; position: relative; }
.tt .col-today { background: rgba(88, 101, 214, .06); }
.tt .card {
  height: 100%; border-radius: 5px; padding: 4px; display: flex; flex-direction: column; justify-content: space-between;
  font-size: 8px; font-weight: 600; line-height: 1.25; overflow: hidden;
}
.tt .card.span2 { height: calc(200% + 2px); position: relative; z-index: 1; }
.tt .card em { font-style: normal; font-weight: 500; font-size: 7px; color: #5c6473; display: flex; align-items: center; gap: 3px; }
.tt .card em::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--dot, #5865d6); }
.tt .now { position: absolute; left: 0; right: 0; height: 2px; background: #e0524a; z-index: 3; border-radius: 2px; }
.tt .now::before { content: ""; position: absolute; left: -3px; top: -2px; width: 6px; height: 6px; border-radius: 50%; background: #e0524a; }

/* 今日の画面 */
.next-banner { background: #5865d6; color: #fff; border-radius: 14px; padding: 12px 14px; margin: 4px 0 10px; }
.next-banner small { font-size: 9px; opacity: .85; display: block; }
.next-banner b { font-family: var(--heading); font-size: 20px; }
.next-banner b span { font-family: var(--mono); }
.tl-item { display: flex; gap: 10px; padding: 9px 10px; border-radius: 12px; background: #f2f4f8; margin-bottom: 7px; align-items: center; }
.tl-item .pno { font-family: var(--heading); font-size: 17px; width: 18px; text-align: center; }
.tl-item .meta { flex: 1; min-width: 0; }
.tl-item .meta b { font-size: 10.5px; display: block; }
.tl-item .meta span { font-size: 8.5px; color: #5c6473; }
.attend { display: flex; gap: 4px; margin-top: 5px; }
.attend button {
  font: inherit; font-size: 8.5px; font-weight: 700; border: 1px solid #d8dce5; background: #fff; color: #5c6473;
  border-radius: 999px; padding: 2px 8px; cursor: pointer;
}
.attend button.on[data-v="出席"] { background: #0d9488; border-color: #0d9488; color: #fff; }
.attend button.on[data-v="遅刻"] { background: #ea580c; border-color: #ea580c; color: #fff; }
.attend button.on[data-v="欠席"] { background: #dc2626; border-color: #dc2626; color: #fff; }
.tag-cancel { font-size: 8px; font-weight: 800; color: #dc2626; border: 1px solid #fca5a5; border-radius: 999px; padding: 1px 6px; }

/* 友だちの画面 */
.friends { display: flex; gap: 10px; padding: 4px 2px 12px; }
.friend { text-align: center; width: 54px; }
.friend .av { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-size: 19px; margin: 0 auto 4px; outline: 2.5px solid var(--ring); outline-offset: 2px; }
.friend b { font-size: 9px; display: block; }
.friend span { font-size: 8px; font-weight: 800; color: var(--ring); }
.line-btn { background: #06c755; color: #fff; border-radius: 12px; padding: 10px 12px; font-size: 10.5px; font-weight: 800; display: flex; justify-content: space-between; margin-bottom: 10px; }
.line-btn small { font-weight: 600; opacity: .9; }
.notice { border: 1.5px solid #f3b4b0; background: #fdf1f0; border-radius: 12px; padding: 9px 10px; font-size: 9px; line-height: 1.5; margin-bottom: 8px; }
.notice b { color: #e0524a; }

/* AI 読み取りのデモ（スクショ → 読み取り → 登録） */
.ai-demo { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: center; }
.ai-src {
  position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 14px;
  font-size: 11px; overflow: hidden;
}
.ai-src table { width: 100%; border-collapse: collapse; }
.ai-src td, .ai-src th { border: 1px solid var(--line); padding: 5px 4px; text-align: center; color: var(--sub); }
.ai-src th { font-weight: 700; color: var(--ink); }
.ai-beam {
  position: absolute; left: 0; right: 0; height: 46px; top: -46px;
  background: linear-gradient(180deg, transparent, rgba(88, 101, 214, .28), transparent);
  border-bottom: 2px solid rgba(88, 101, 214, .8);
  animation: beam 5.5s ease-in-out infinite;
}
@keyframes beam { 0% { top: -46px; } 45% { top: 100%; } 100% { top: 100%; } }
.ai-out { display: flex; flex-direction: column; gap: 8px; }
.ai-row {
  display: flex; align-items: center; gap: 10px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px;
  font-size: .9rem; opacity: 0; transform: translateX(-10px); animation: pop 5.5s ease infinite;
}
.ai-row i { font-style: normal; font-family: var(--mono); font-size: .75rem; color: var(--accent); min-width: 56px; }
.ai-row:nth-child(2) { animation-delay: .25s; }
.ai-row:nth-child(3) { animation-delay: .5s; }
.ai-row:nth-child(4) { animation-delay: .75s; }
@keyframes pop {
  0%, 38% { opacity: 0; transform: translateX(-10px); }
  48%, 92% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: none; }
}

/* 画面を並べる帯（スマホでは横スクロール） */
.phones { display: flex; gap: 28px; justify-content: center; padding: 10px 0 24px; }
.phone-cap { text-align: center; margin-top: 14px; }
.phone-cap b { font-family: var(--heading); display: block; font-size: 1.05rem; }
.phone-cap span { color: var(--sub); font-size: .88rem; }

/* ヒーロー（文字＋浮かぶスマホ） */
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 28px; align-items: center; }
.float { animation: float 6s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-10px) rotate(-1deg); } }
.hero-phone { display: flex; justify-content: center; position: relative; }
.hero-phone::after { /* 背景の色だまり */
  content: ""; position: absolute; inset: 10% 0 0; z-index: -1; filter: blur(40px);
  background: radial-gradient(circle at 30% 30%, #bfd6f6, transparent 60%), radial-gradient(circle at 70% 60%, #fbc8db, transparent 60%), radial-gradient(circle at 40% 80%, #93e3c6, transparent 60%);
  opacity: .8;
}

/* 流れる帯（機能のティッカー） */
.ticker { overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 12px 0; margin: 8px 0 0; }
.ticker div { display: flex; gap: 36px; width: max-content; animation: tick 30s linear infinite; font-family: var(--heading); font-size: 1.05rem; }
.ticker span::before { content: "✦"; color: var(--accent); margin-right: 12px; }
@keyframes tick { to { transform: translateX(-50%); } }

/* スクロールで出てくる */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; }
  .phones { justify-content: flex-start; overflow-x: auto; scroll-snap-type: x mandatory; padding: 10px 20px 24px; margin: 0 -20px; }
  .phones > div { scroll-snap-align: center; }
  .ai-demo { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .float, .ticker div, .ai-beam, .ai-row { animation: none !important; }
  .ai-row { opacity: 1; transform: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
