/* Q ― Soft Futuristic Garden（すりガラスと光） */

/* 游ゴシック：Windows は Medium／Bold を名前で指定しないと細くなるので、別名で束ねる */
@font-face { font-family: 'QGothic'; src: local('Yu Gothic Medium'), local('YuGothic-Medium'), local('YuGothic Medium'); font-weight: 400 500; }
@font-face { font-family: 'QGothic'; src: local('Yu Gothic Bold'), local('YuGothic-Bold'), local('YuGothic Bold'); font-weight: 600 800; }

:root {
  --bg: #F4F3FA;
  --ink: #26233A;
  --ink-2: #57526F;
  --ink-3: #807B98;
  --line: rgba(110, 96, 180, .14);
  --edge: rgba(255, 255, 255, .85);
  --shadow: 0 14px 36px rgba(82, 66, 160, .10), 0 2px 6px rgba(82, 66, 160, .05);
  --lav: #B9A4FF;
  --lav-deep: #5E45D6;
  --blue: #8EC1FF;
  --pink: #FFB7D5;
  --mint: #93E3C6;
  --cw: #4F8EE8;   --fdq: #C273D2;   --lcl: #35AE88;
  --guess: #7059E0;
  --radius: 26px;
  --pad: 18px;
  --font: 'QGothic', YuGothic, 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', 'Meiryo', sans-serif;
  --num: 'Manrope', 'QGothic', sans-serif;
  --tab-h: 74px;
  /* すりガラスのざらつき（細かいノイズ） */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .42 0 0 0 0 .38 0 0 0 0 .55 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-weight: 500; font-size: 16px; line-height: 1.75; letter-spacing: .03em;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; }
a { color: var(--lav-deep); }
b, strong { font-weight: 700; }

/* ---------- 背景：にじむ光＋すりガラスの粒子 ---------- */
.aurora { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.aurora i { position: absolute; filter: blur(48px); opacity: .7; animation: drift 30s ease-in-out infinite alternate; }
.aurora i:nth-child(1) { width: 78vmax; height: 62vmax; left: -34vmax; top: -30vmax; border-radius: 46% 54% 60% 40% / 52% 40% 60% 48%;
  background: radial-gradient(closest-side, #C9B8FF, rgba(201,184,255,.35) 55%, transparent); }
.aurora i:nth-child(2) { width: 62vmax; height: 70vmax; right: -30vmax; top: -12vmax; border-radius: 60% 40% 45% 55% / 40% 55% 45% 60%;
  background: radial-gradient(closest-side, #B6D6FF, rgba(182,214,255,.3) 55%, transparent); animation-delay: -9s; }
.aurora i:nth-child(3) { width: 60vmax; height: 52vmax; left: -22vmax; bottom: -24vmax; border-radius: 55% 45% 40% 60% / 50% 60% 40% 50%;
  background: radial-gradient(closest-side, #FFC8DF, rgba(255,200,223,.3) 55%, transparent); animation-delay: -16s; }
.aurora i:nth-child(4) { width: 52vmax; height: 56vmax; right: -24vmax; bottom: -22vmax; border-radius: 42% 58% 55% 45% / 58% 42% 58% 42%;
  background: radial-gradient(closest-side, #BDF0DC, rgba(189,240,220,.3) 55%, transparent); animation-delay: -4s; }
/* 左上から差しこむ光 */
.aurora b { position: absolute; left: -10vmax; top: -16vmax; width: 70vmax; height: 50vmax; transform: rotate(-18deg);
  background: radial-gradient(closest-side, rgba(255,255,255,.95), rgba(255,255,255,0)); filter: blur(30px); }
@keyframes drift { to { transform: translate3d(5vmax, 3vmax, 0) rotate(8deg) scale(1.06); } }
.grain { position: fixed; inset: 0; z-index: 0; pointer-events: none; background-image: var(--grain); opacity: .16; mix-blend-mode: multiply; }

/* ---------- レイアウト ---------- */
.app { position: relative; z-index: 1; max-width: 560px; margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 18px) var(--pad) calc(var(--tab-h) + env(safe-area-inset-bottom) + 32px); }
.loading { min-height: 70vh; display: grid; place-content: center; text-align: center; color: var(--ink-2); }
.q-loading { width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 50%;
  background: radial-gradient(circle at 32% 26%, rgba(255,255,255,.9), transparent 45%), linear-gradient(160deg, #D2C0FF, #A98CFF);
  animation: breathe 2.6s ease-in-out infinite; }

.topline { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--ink-3); margin-bottom: 8px; }
.icon-btn { border: 1px solid var(--edge); background: rgba(255,255,255,.6); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow); }
.icon-btn svg { width: 19px; height: 19px; }
.sample-banner { font-size: 13px; text-align: center; color: var(--lav-deep); background: rgba(185,164,255,.18);
  border-radius: 999px; padding: 6px 14px; margin: 0 0 14px; }

/* 見出しの強弱：ページ見出し＞セクション見出し＞カードの名前＞本文＞補足 */
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: .04em; }
.page-title { font-size: 26px; line-height: 1.4; margin: 10px 2px 6px; }
.page-lead { font-size: 14px; color: var(--ink-2); margin: 0 2px 16px; }
h2.section { font-size: 19px; margin: 36px 2px 14px; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
h2.section small { font-size: 12px; font-weight: 500; color: var(--ink-3); letter-spacing: .06em; }

/* ---------- すりガラスのカード ---------- */
.card { position: relative; isolation: isolate; border-radius: var(--radius); padding: 20px;
  background: linear-gradient(155deg, rgba(255,255,255,.80) 0%, rgba(255,255,255,.56) 60%, rgba(255,255,255,.66) 100%);
  border: 1px solid var(--edge);
  backdrop-filter: blur(22px) saturate(135%); -webkit-backdrop-filter: blur(22px) saturate(135%);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.95), inset 0 -1px 0 rgba(140,120,220,.06); }
.card::before { content: ''; position: absolute; inset: 0; border-radius: inherit; z-index: -1; pointer-events: none;
  background-image: var(--grain); opacity: .10; mix-blend-mode: multiply; }
.card + .card { margin-top: 14px; }
.muted { color: var(--ink-2); }
.small { font-size: 13px; }
.num { font-family: var(--num); font-variant-numeric: tabular-nums; letter-spacing: 0; }

/* ---------- Q（すりガラスの●） ---------- */
.q-hero { display: grid; grid-template-columns: 116px 1fr; gap: 10px; align-items: center; margin: 4px 0 4px; }
.q-hero.compact { grid-template-columns: 84px 1fr; }
.bubble { position: relative; background: rgba(255,255,255,.78); border: 1px solid var(--edge); border-radius: 24px 24px 24px 8px;
  padding: 14px 18px; box-shadow: var(--shadow); font-size: 17px; line-height: 1.75; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.bubble .who { display: block; font-size: 12px; color: var(--ink-3); margin-bottom: 2px; letter-spacing: .12em; }

.q { position: relative; width: 100%; aspect-ratio: 1; }
.q.sm { width: 92px; margin: 0 auto 6px; }
.q-shadow { position: absolute; left: 22%; right: 22%; bottom: 0; height: 7%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(96,80,180,.22), transparent); }
/* ふだんの動き：ふわふわ浮いて、ときどき体をかしげる */
.q-hop { position: absolute; inset: 0; animation: bob 5.5s cubic-bezier(.45,0,.55,1) infinite; }
.q-ball { position: absolute; left: 10%; right: 10%; top: 16%; aspect-ratio: 1; border-radius: 50%; overflow: hidden;
  background:
    radial-gradient(110% 85% at 30% 14%, rgba(255,255,255,.85) 0%, rgba(255,255,255,0) 46%),
    radial-gradient(80% 70% at 84% 88%, rgba(150,160,255,.85) 0%, rgba(150,160,255,0) 62%),
    radial-gradient(70% 70% at 12% 84%, rgba(236,170,240,.65) 0%, rgba(236,170,240,0) 62%),
    linear-gradient(165deg, #D2C0FF 0%, #A98CFF 55%, #9C93FF 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.5), inset 0 -10px 20px rgba(92,62,206,.30), inset 0 8px 18px rgba(255,255,255,.5),
              0 16px 30px rgba(110,80,210,.24);
  transform-origin: 50% 90%; animation: breathe 5.5s cubic-bezier(.45,0,.55,1) infinite, tilt 14s cubic-bezier(.45,0,.55,1) infinite; }
/* すりガラスの粒子と、内側のにじむ光 */
.q-ball::before { content: ''; position: absolute; inset: 0; background-image: var(--grain); opacity: .32; mix-blend-mode: overlay; }
.q-ball::after { content: ''; position: absolute; left: 12%; right: 30%; top: 6%; height: 40%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255,255,255,.75), rgba(255,255,255,0)); filter: blur(6px); }
/* 目は寄せぎみ（間は目の幅の1/5ほど） */
.q-eyes { position: absolute; z-index: 1; left: 0; right: 0; top: 41%; display: flex; justify-content: center; gap: 4.5%; }
.q-eye { position: relative; width: 27%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 50% 30%, #FFFFFF 56%, #E6E4FA 100%);
  box-shadow: 0 2px 4px rgba(64,50,140,.22), inset 0 -2px 3px rgba(150,140,220,.35);
  transform-origin: center; animation: blink 6s ease-in-out infinite; transition: transform .6s ease, clip-path .6s ease; }
/* 黒目：ときどき左右を見回す */
.q-eye i { position: absolute; width: 60%; aspect-ratio: 1; border-radius: 50%; background: #15131F; left: 22%; top: 24%;
  animation: look 12s cubic-bezier(.45,0,.55,1) infinite; transition: top .6s ease; }
/* 頭の上の光の粒 */
.q-particle { position: absolute; left: 50%; top: 3%; width: 8%; aspect-ratio: 1; margin-left: -4%; border-radius: 50%;
  background: radial-gradient(circle, #FFFFFF 0 35%, rgba(255,246,214,.9) 55%, rgba(255,240,205,0) 75%);
  box-shadow: 0 0 10px 4px rgba(255,244,210,.75), 0 0 24px 8px rgba(214,200,255,.45);
  animation: particle 4s ease-in-out infinite; }
@keyframes particle { 0%, 100% { transform: translateY(0); opacity: .85; } 50% { transform: translateY(-5px); opacity: 1; } }
@keyframes breathe { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.03, .97); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes tilt { 0%, 55%, 100% { rotate: 0deg; } 70% { rotate: -4deg; } 85% { rotate: 3deg; } }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.12); } }
@keyframes look { 0%, 25%, 100% { translate: 0 0; } 35%, 50% { translate: -26% 4%; } 62%, 76% { translate: 22% -3%; } 88% { translate: 0 0; } }
/* 発見：目が少し大きくなり、ふわっと浮き上がる。光の粒も明るく */
.q.mood-discovery .q-eye { transform: scale(1.1); animation: none; }
.q.mood-discovery .q-hop { animation: pop 4.5s cubic-bezier(.45,0,.55,1) infinite; }
.q.mood-discovery .q-particle { box-shadow: 0 0 14px 6px rgba(255,244,210,.95), 0 0 36px 14px rgba(214,200,255,.65); animation-duration: 2s; }
@keyframes pop { 0%, 100% { transform: translateY(0) scale(1); } 45% { transform: translateY(-10px) scale(1.03); } }
/* 育った：ふわっと高く浮かび上がる */
.q.mood-grew .q-hop { animation: hop 4.5s cubic-bezier(.45,0,.55,1) infinite; }
@keyframes hop { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-15px); } 55% { transform: translateY(-13px); } }
/* 静かな週：上まぶたが下りて、ゆらゆらと見守る */
.q.mood-quiet .q-eye { clip-path: inset(38% 0 0 0); animation: none; }
.q.mood-quiet .q-eye i { top: 36%; animation: none; }
.q.mood-quiet .q-hop { animation: sway 9s cubic-bezier(.45,0,.55,1) infinite; transform-origin: 50% 95%; }
.q.mood-quiet .q-ball { animation: breathe 8s cubic-bezier(.45,0,.55,1) infinite; filter: saturate(.85) brightness(.96); }
@keyframes sway { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }

/* ---------- サイトの球（Qと同じすりガラス） ---------- */
.orb { position: relative; width: 58px; height: 58px; border-radius: 50%; flex: none; overflow: hidden; animation: float 7s ease-in-out infinite;
  --c1: #DCD0FF; --c2: #B9A4FF; --c3: #A5C6FF;
  background:
    radial-gradient(110% 85% at 30% 14%, rgba(255,255,255,.92) 0%, rgba(255,255,255,0) 50%),
    radial-gradient(80% 70% at 82% 86%, var(--c3) 0%, transparent 65%),
    linear-gradient(165deg, var(--c1) 0%, var(--c2) 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.55), inset 0 -6px 12px rgba(80,70,170,.18), inset 0 5px 10px rgba(255,255,255,.5), 0 10px 22px var(--glow, rgba(104,90,200,.2)); }
.orb::before { content: ''; position: absolute; inset: 0; background-image: var(--grain); opacity: .3; mix-blend-mode: overlay; }
.orb.cw  { --c1: #D8E9FF; --c2: #8DBEFF; --c3: #B7AEFF; --glow: rgba(79,142,232,.28); }
.orb.fdq { --c1: #FFE1F0; --c2: #F0A6D2; --c3: #BCA5FF; --glow: rgba(194,115,210,.26); }
.orb.lcl { --c1: #DDF8EC; --c2: #8EDFC1; --c3: #A6CCFF; --glow: rgba(53,174,136,.24); }
.orb.big { width: 92px; height: 92px; }
.orb.lively { animation: float 7s ease-in-out infinite, shine 3s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-4px); } }
@keyframes shine { 50% { filter: brightness(1.07) saturate(1.12); } }

/* ---------- サイト名の色の● ---------- */
.site-tag { display: inline-flex; align-items: center; gap: 7px; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: none; }
.dot.cw { background: var(--cw); } .dot.fdq { background: var(--fdq); } .dot.lcl { background: var(--lcl); }

/* ---------- サイトカード ---------- */
.site-card { display: block; text-decoration: none; color: inherit; cursor: pointer; transition: transform .2s ease; }
.site-card:active { transform: scale(.985); }
.site-head { display: flex; gap: 14px; align-items: center; }
.site-head .name { font-weight: 700; font-size: 19px; line-height: 1.35; }
.site-head .goal { font-size: 13px; color: var(--ink-2); line-height: 1.55; }
.site-body { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: end; margin-top: 16px; }
.big-num { font-family: var(--num); font-weight: 600; font-size: 50px; line-height: 1; letter-spacing: -.02em; }
.big-num small { font-family: var(--font); font-size: 15px; font-weight: 500; margin-left: 4px; color: var(--ink-2); letter-spacing: 0; }
.metric-label { font-size: 13px; color: var(--ink-2); margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.chip { font-size: 13px; padding: 4px 11px; border-radius: 999px; background: rgba(255,255,255,.72); border: 1px solid var(--line); color: var(--ink-2); white-space: nowrap; }
.chip.up { color: #236E56; background: rgba(147,227,198,.32); border-color: transparent; }
.chip.mood { color: var(--lav-deep); background: rgba(185,164,255,.22); border-color: transparent; font-weight: 700; }
.spark { width: 100%; height: 56px; display: block; }

/* ---------- 芽 ---------- */
.moments { display: grid; gap: 10px; }
.moment { padding: 14px 18px; }
.moment .site-tag { font-size: 12px; color: var(--ink-3); }
.moment p { margin: 2px 0 0; font-size: 16px; line-height: 1.65; }

/* ---------- サイト詳細 ---------- */
.back { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; color: var(--ink-2); font-size: 14px; padding: 6px 0; cursor: pointer; }
.site-hero { display: flex; gap: 16px; align-items: center; margin: 8px 0 20px; }
.site-hero h1 { font-size: 26px; line-height: 1.3; }
.site-hero .small { line-height: 1.6; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile { padding: 16px 16px 14px; }
.tile .v { font-family: var(--num); font-weight: 600; font-size: 32px; line-height: 1.15; margin-top: 2px; }
.tile .v small { font-family: var(--font); font-size: 13px; color: var(--ink-2); margin-left: 3px; font-weight: 500; }
.tile .l { font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.tile .c { font-size: 12px; color: var(--ink-3); margin-top: 6px; line-height: 1.55; }
.tile.focus { grid-column: 1 / -1; }
.tile.focus .v { font-size: 44px; }
.term { border-bottom: 1px dashed var(--ink-3); cursor: help; }

.chart { width: 100%; height: 180px; display: block; }
.chart-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--ink-3); margin-top: 8px; }

.list { list-style: none; margin: 0; padding: 0; }
.list li { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); align-items: center; }
.list li:first-child { border-top: 0; padding-top: 2px; }
.list .t { font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
.list .p { font-size: 12px; color: var(--ink-3); overflow-wrap: anywhere; }
.list .n { font-family: var(--num); font-weight: 600; font-size: 17px; }
.tag { display: inline-block; font-size: 11px; padding: 1px 8px; border-radius: 999px; margin-left: 6px; vertical-align: 1px; color: var(--lav-deep); background: rgba(185,164,255,.2); font-weight: 700; }

.bars { display: grid; gap: 12px; }
.bar-row .top { display: flex; justify-content: space-between; font-size: 14px; }
.bar { height: 8px; border-radius: 999px; background: rgba(110,96,180,.1); overflow: hidden; margin-top: 6px; }
.bar i { display: block; height: 100%; border-radius: inherit; }
.split { display: flex; height: 10px; border-radius: 999px; overflow: hidden; margin: 8px 0 6px; }
.split i { display: block; height: 100%; }
.split-legend { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-2); }
.sub-label { font-size: 13px; color: var(--ink-2); font-weight: 700; }

/* ---------- レポート ---------- */
.report-link { display: block; text-decoration: none; color: inherit; }
.report-link .meta { font-size: 13px; color: var(--ink-3); }
.report-link .h { font-weight: 700; font-size: 18px; line-height: 1.6; margin-top: 6px; }
.report-link .go { font-size: 14px; color: var(--lav-deep); margin-top: 10px; display: inline-block; font-weight: 700; }
.unread { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #FF8FB8; margin-left: 8px; vertical-align: 1px; }
.report-meta { font-size: 13px; color: var(--ink-3); margin-top: 8px; }
.report-title { font-size: 24px; line-height: 1.5; margin: 6px 0 16px; }
.rsec + .rsec { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.rsec h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.rsec h3 .ico { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; }
.rsec ul { margin: 0; padding-left: 1.1em; }
.rsec li { margin: 5px 0; }
.label-fact { font-size: 11px; padding: 1px 9px; border-radius: 999px; background: rgba(38,35,58,.07); color: var(--ink-2); font-weight: 500; }
.guess { border: 1.5px dashed rgba(112,89,224,.45); background: rgba(185,164,255,.08); border-radius: 18px; padding: 12px 14px; }
.guess + .guess { margin-top: 10px; }
.guess .lab { font-size: 12px; color: var(--guess); font-weight: 700; letter-spacing: .08em; }
.conf { font-size: 11px; padding: 1px 9px; border-radius: 999px; margin-left: 6px; }
.conf.low { background: rgba(128,123,152,.15); color: var(--ink-2); }
.conf.medium { background: rgba(142,193,255,.3); color: #2A5A9E; }
.conf.high { background: rgba(147,227,198,.35); color: #20634B; }
.idea { padding: 14px 16px; border-radius: 18px; background: rgba(255,255,255,.66); border: 1px solid var(--line); }
.idea + .idea { margin-top: 10px; }
.idea .a { font-weight: 700; font-size: 17px; line-height: 1.6; }
.idea dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 10px 0 0; font-size: 14px; }
.idea dt { color: var(--ink-3); }
.idea dd { margin: 0; }
.learn-card { background: linear-gradient(140deg, rgba(222,212,255,.72), rgba(255,255,255,.55) 55%, rgba(207,243,230,.62)); }
.term-name { font-size: 21px; font-weight: 700; margin: 2px 0 8px; line-height: 1.45; }
.focus-card dl { margin: 0; display: grid; gap: 10px; }
.focus-card dt { font-size: 12px; color: var(--ink-3); letter-spacing: .06em; font-weight: 700; }
.focus-card dd { margin: 0; }

/* ---------- 記録 ---------- */
.add-btn { width: 100%; border: 1px solid var(--edge); border-radius: 999px; padding: 15px; font-weight: 700; font-size: 16px; cursor: pointer;
  background: linear-gradient(120deg, rgba(205,190,255,.9), rgba(255,201,223,.9) 55%, rgba(191,240,221,.9)); color: var(--ink); box-shadow: var(--shadow); }
.form { display: grid; gap: 14px; }
.form label { font-size: 13px; color: var(--ink-2); display: grid; gap: 5px; font-weight: 700; }
.form input, .form select, .form textarea { font: inherit; font-size: 16px; color: var(--ink); border: 1px solid var(--line);
  background: rgba(255,255,255,.85); border-radius: 14px; padding: 11px 13px; width: 100%; font-weight: 500; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { border: 1px solid var(--line); background: rgba(255,255,255,.8); border-radius: 999px; padding: 7px 13px; font-size: 14px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { display: grid; grid-template-columns: 54px 1fr; gap: 10px; padding: 13px 0; border-top: 1px solid var(--line); }
.timeline li:first-child { border-top: 0; padding-top: 2px; }
.timeline .d { font-family: var(--num); font-size: 14px; color: var(--ink-3); font-weight: 600; }

/* ---------- まなぶ ---------- */
details.gloss { padding: 15px 18px; }
details.gloss summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
details.gloss summary::-webkit-details-marker { display: none; }
details.gloss summary::after { content: '＋'; color: var(--ink-3); }
details.gloss[open] summary::after { content: '－'; }
details.gloss p { margin: 8px 0 0; color: var(--ink-2); }

/* ---------- 下のメニュー ---------- */
.tabbar { position: fixed; z-index: 5; left: 50%; transform: translateX(-50%); bottom: calc(env(safe-area-inset-bottom) + 12px);
  width: min(calc(100% - 28px), 520px); height: 66px; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  background: rgba(255,255,255,.70); border: 1px solid var(--edge); border-radius: 999px;
  box-shadow: 0 14px 38px rgba(82,66,160,.16), inset 0 1px 0 rgba(255,255,255,.95);
  backdrop-filter: blur(22px) saturate(150%); -webkit-backdrop-filter: blur(22px) saturate(150%); padding: 6px; }
.tabbar a { display: grid; place-items: center; align-content: center; gap: 1px; text-decoration: none; color: var(--ink-3); font-size: 11px; border-radius: 999px; letter-spacing: .06em; font-weight: 700; }
.tabbar a svg { width: 23px; height: 23px; }
.tabbar a[aria-current="page"] { color: var(--ink); background: linear-gradient(120deg, rgba(205,190,255,.55), rgba(255,201,223,.45)); }

.empty { text-align: center; color: var(--ink-2); padding: 26px 10px; }
.toast { position: fixed; z-index: 9; left: 50%; bottom: calc(var(--tab-h) + 30px); transform: translateX(-50%); background: var(--ink); color: #fff;
  padding: 10px 18px; border-radius: 999px; font-size: 14px; box-shadow: var(--shadow); }

@media (min-width: 900px) {
  .app { max-width: 980px; padding-left: 40px; padding-right: 40px; }
  .home-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 28px; align-items: start; }
  .site-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
  .site-grid .card + .card { margin-top: 0; }
  .site-grid .full { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
