/* ==========================================================================
   講師AIラボ 会員サイト
   背景は白。本文・小さい文字はコントラスト4.5:1以上の色だけを使う。
   6色のスペクトル（個性発見大学のパズルの色）は、光・線・面の飾りにだけ使う。
   ========================================================================== */

@property --acc      { syntax: "<color>"; inherits: true; initial-value: #2F5BEA; }
@property --acc-ink  { syntax: "<color>"; inherits: true; initial-value: #2446C9; }
@property --acc-soft { syntax: "<color>"; inherits: true; initial-value: #EEF2FF; }

:root {
  --bg: #ffffff;
  --panel: #f7f8fc;
  --ink: #12141c;
  --ink-2: #3a4052;
  --ink-3: #555b6e;
  --line: #e6e8f0;
  --line-2: #d6d9e5;

  --c-blue: #3b6bff;
  --c-violet: #8b5cf6;
  --c-pink: #ec4899;
  --c-orange: #f97316;
  --c-yellow: #facc15;
  --c-green: #10b981;
  --aurora: linear-gradient(100deg, #3b6bff 0%, #8b5cf6 22%, #ec4899 44%, #f97316 64%, #facc15 82%, #10b981 100%);
  --aurora-conic: conic-gradient(#3b6bff, #8b5cf6, #ec4899, #f97316, #facc15, #10b981, #3b6bff);
  --ink-gradient: linear-gradient(95deg, #2a4fe0 0%, #6d3be0 38%, #c0267a 72%, #c2410c 100%);

  --acc: #2F5BEA; --acc-ink: #2446C9; --acc-soft: #EEF2FF;

  --r-s: 10px; --r-m: 16px; --r-l: 24px; --r-xl: 32px;
  --shadow-1: 0 1px 2px rgba(18, 20, 28, .05), 0 4px 16px rgba(18, 20, 28, .05);
  --shadow-2: 0 2px 6px rgba(18, 20, 28, .06), 0 16px 48px rgba(40, 50, 120, .10);
  --shadow-glow: 0 10px 40px -10px color-mix(in srgb, var(--acc) 45%, transparent);

  --f-ja: "Zen Kaku Gothic New", "Hiragino Sans", "Noto Sans JP", "Yu Gothic UI", "Meiryo", sans-serif;
  --f-en: "Space Grotesk", "Zen Kaku Gothic New", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --wrap: 1180px;
  --top-h: 68px;
  color-scheme: light;
}

body[data-frame="shigoto"] { --acc: #2F5BEA; --acc-ink: #2446C9; --acc-soft: #EEF2FF; }
body[data-frame="koshi"]   { --acc: #7C3AED; --acc-ink: #6428D9; --acc-soft: #F4EEFF; }
body[data-frame="kurashi"] { --acc: #0E9F6E; --acc-ink: #0A7250; --acc-soft: #E8F7F0; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-ja);
  font-size: 16px;
  line-height: 1.8;
  letter-spacing: .02em;
  -webkit-font-smoothing: antialiased;
  transition: --acc .7s ease, --acc-ink .7s ease, --acc-soft .7s ease;
  overflow-x: hidden;
  word-break: auto-phrase; /* 日本語を文節で折り返す（対応ブラウザのみ） */
}
h1, h2, h3, h4, .lead, .one-title { text-wrap: balance; }
p, blockquote { text-wrap: pretty; }
img { max-width: 100%; height: auto; display: block; } /* 幅を縮めても縦横比を保つ（width/height属性の高さが残ると縦長につぶれる） */
a { color: var(--acc-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--acc) 55%, white); outline-offset: 2px; border-radius: 6px; }
::selection { background: color-mix(in srgb, var(--acc) 22%, white); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.en { font-family: var(--f-en); letter-spacing: .04em; }
.wrap { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }
[hidden] { display: none !important; }

/* ---------- 共通パーツ ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: .55em;
  font-size: .8rem; font-weight: 700; color: var(--ink-2);
  padding: .35em .9em .35em .7em; border-radius: 999px;
  background: #fff; border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--aurora); box-shadow: 0 0 0 3px color-mix(in srgb, var(--acc) 15%, transparent); animation: pulse 2.4s ease-in-out infinite; }
.kicker { font-family: var(--f-en); font-size: .74rem; font-weight: 700; letter-spacing: .22em; color: var(--acc-ink); text-transform: uppercase; }
.grad-text { background: var(--ink-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.h-sec { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.2rem); line-height: 1.4; margin: .2em 0 .5em; font-weight: 900; letter-spacing: .01em; }
.lead { color: var(--ink-2); font-size: 1.02rem; max-width: 46em; }
.muted { color: var(--ink-3); }
.small { font-size: .86rem; }
.chip {
  display: inline-flex; align-items: center; gap: .35em;
  font-size: .76rem; font-weight: 700; line-height: 1;
  padding: .5em .8em; border-radius: 999px;
  background: var(--panel); color: var(--ink-2); border: 1px solid var(--line);
  white-space: nowrap;
}
.chip.acc { background: var(--acc-soft); color: var(--acc-ink); border-color: color-mix(in srgb, var(--acc) 25%, white); }
.chip.tent { background: #fff7e6; color: #8a4b00; border-color: #f6d7a0; }
.chip.lvl-入門 { background: #ecfdf5; color: #0a6b4a; border-color: #b9ecd6; }
.chip.lvl-初級 { background: #eff6ff; color: #1d4ed8; border-color: #c7dcff; }
.chip.lvl-実践 { background: #eff6ff; color: #1d4ed8; border-color: #c7dcff; }
.chip.lvl-研究 { background: #faf5ff; color: #6b21a8; border-color: #e3d0fb; }

.btn {
  --b: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 46px; padding: .7em 1.35em; border-radius: 999px;
  font-weight: 700; font-size: .95rem; letter-spacing: .03em;
  border: 1px solid transparent; background: var(--b); color: #fff;
  transition: transform .2s ease, box-shadow .25s ease, background .25s ease;
  text-decoration: none !important; position: relative; isolation: isolate;
  white-space: nowrap; /* ボタンの中で文字を折り返さない（折れるとつぶれた形になる） */
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 30px -10px rgba(18, 20, 28, .45); }
.btn:active { transform: translateY(0) scale(.98); }
.btn .arrow { transition: transform .25s ease; }
.btn:hover .arrow { transform: translateX(3px); }
.btn.acc { --b: var(--acc-ink); }
.btn.acc:hover { box-shadow: var(--shadow-glow); }
.btn.ghost { background: #fff; color: var(--ink); border-color: var(--line-2); }
.btn.ghost:hover { border-color: color-mix(in srgb, var(--acc) 45%, var(--line-2)); box-shadow: var(--shadow-1); }
.btn.sm { min-height: 36px; padding: .45em 1em; font-size: .84rem; }

.card {
  position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--r-l);
  box-shadow: var(--shadow-1);
}
/* カーソルを追う光 */
.spot { position: relative; overflow: hidden; }
.spot::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: radial-gradient(420px circle at var(--mx, -500px) var(--my, -500px), color-mix(in srgb, var(--acc) 12%, transparent), transparent 60%);
  opacity: 0; transition: opacity .3s ease;
}
.spot:hover::after { opacity: 1; }

/* 回る虹の縁 */
.aura-border {
  position: relative; border-radius: var(--r-xl); padding: 2px; --sc: 16;
  box-shadow: 0 26px 60px -30px rgba(139, 92, 246, .6), 0 14px 44px -26px rgba(59, 107, 255, .5), 0 10px 40px -30px rgba(249, 115, 22, .45);
}
.aura-border > .inner { position: relative; border-radius: calc(var(--r-xl) - 2px); background: #fff; height: 100%; }

/* 回る虹：小さな円錐を scale で広げ、rotate だけを動かす（毎フレームの描き直しをしない） */
.aura-border, .brand-mark, .me-btn, .ai-av, .toast .t i, .pal { overflow: hidden; isolation: isolate; }
.aura-border::before, .brand-mark::before, .me-btn::before, .ai-av::before, .toast .t i::before, .pal::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 100px; height: 100px; margin: -50px 0 0 -50px; z-index: -1;
  background: var(--aurora-conic); scale: var(--sc, 1); animation: rotp var(--spd, 6s) linear infinite; will-change: rotate;
}

/* 出てくるとき */
.rv { opacity: 0; transform: translateY(18px); filter: blur(6px); transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1), filter .8s ease; }
.rv.in { opacity: 1; transform: none; filter: none; }
.rv.d1 { transition-delay: .08s; } .rv.d2 { transition-delay: .16s; } .rv.d3 { transition-delay: .24s; } .rv.d4 { transition-delay: .32s; }

@keyframes rotp { to { rotate: 1turn; } }
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(.75); opacity: .6; } }
@keyframes float { 0%, 100% { transform: translate(0, 0) scale(1); } 33% { transform: translate(30px, -24px) scale(1.06); } 66% { transform: translate(-22px, 18px) scale(.96); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes shimmer { from { background-position: -200% 0; } to { background-position: 200% 0; } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 60% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1); } }

/* ---------- 背景のオーロラ ---------- */
.aurora-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; -webkit-mask-image: linear-gradient(#000 55%, transparent); mask-image: linear-gradient(#000 55%, transparent); }
.gate .aurora-bg { -webkit-mask-image: none; mask-image: none; }
.aurora-bg .blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .32; animation: float 18s ease-in-out infinite; will-change: transform; }
.aurora-bg .b1 { width: 520px; height: 520px; left: -140px; top: -160px; background: #93b4ff; }
.aurora-bg .b2 { width: 460px; height: 460px; right: -120px; top: -80px; background: #e3b6ff; animation-delay: -6s; }
.aurora-bg .b3 { width: 420px; height: 420px; left: 38%; bottom: -220px; background: #ffc9a8; animation-delay: -11s; opacity: .26; }
.aurora-bg .b4 { width: 300px; height: 300px; right: 18%; bottom: -120px; background: #a8f0d4; animation-delay: -3s; opacity: .24; }
.grid-bg {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image: linear-gradient(to right, rgba(18, 20, 60, .045) 1px, transparent 1px), linear-gradient(to bottom, rgba(18, 20, 60, .045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 75%);
}

/* ==========================================================================
   ログイン
   ========================================================================== */
.gate { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: #fff; overflow: auto; padding: 32px 16px; }
.gate-inner { position: relative; z-index: 1; width: min(440px, 100%); text-align: center; }
.orb-wrap { position: relative; width: 148px; height: 148px; margin: 0 auto 18px; }
.orb-canvas { position: absolute; inset: -60px; width: calc(100% + 120px); height: calc(100% + 120px); pointer-events: none; }
.orb-glow { position: absolute; inset: 4px; border-radius: 50%; background: var(--aurora); filter: blur(26px); opacity: .5; transition: transform .35s cubic-bezier(.2,.8,.2,1.4), opacity .35s; will-change: transform; }
.orb {
  position: absolute; inset: 14px; border-radius: 50%;
  background: var(--aurora-conic); animation: rotp 7s linear infinite; will-change: rotate;
  transition: scale .35s cubic-bezier(.2,.8,.2,1.4);
}
.orb::after {
  content: ""; position: absolute; inset: 9px; border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, #fff 52%, rgba(255,255,255,.85) 74%, rgba(255,255,255,.6) 100%);
  box-shadow: inset 0 0 22px rgba(139, 92, 246, .25);
}
.orb-core { position: absolute; inset: 0; display: grid; place-items: center; z-index: 2; font-family: var(--f-en); font-weight: 700; font-size: 1.05rem; letter-spacing: .12em; color: var(--ink); }
.orb-core i { display: block; width: 10px; height: 10px; margin: 0 auto 4px; border-radius: 50%; background: var(--aurora); animation: pulse 1.8s infinite; }
.gate.typing .orb { scale: 1.07; }
.gate.typing .orb-glow { transform: scale(1.18); opacity: .8; }
.gate-org { font-size: .84rem; font-weight: 700; color: var(--ink-3); letter-spacing: .12em; }
.gate-title { font-size: clamp(1.9rem, 1.4rem + 2vw, 2.4rem); font-weight: 900; margin: .1em 0 .1em; letter-spacing: .02em; line-height: 1.35; }
.gate-sub { color: var(--ink-2); margin: 0 0 22px; font-size: .96rem; }
.gate-form {
  text-align: left; padding: 24px; border-radius: var(--r-l);
  background: rgba(255, 255, 255, .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line); box-shadow: var(--shadow-2);
}
.field { display: block; margin-bottom: 14px; }
.field span { display: block; font-size: .84rem; font-weight: 700; color: var(--ink-2); margin-bottom: 6px; }
.field .ctl { position: relative; }
.field input {
  width: 100%; height: 50px; padding: 0 16px; border-radius: 14px; font: inherit; font-size: 1rem;
  border: 1.5px solid var(--line-2); background: #fff; color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus { outline: none; border-color: #8b5cf6; box-shadow: 0 0 0 4px rgba(139, 92, 246, .15); }
.field .eye { position: absolute; right: 6px; top: 6px; height: 38px; padding: 0 12px; border-radius: 10px; border: 0; background: transparent; color: var(--ink-3); font-size: .8rem; font-weight: 700; }
.field .eye:hover { background: var(--panel); }
.gate-form .btn { width: 100%; min-height: 52px; font-size: 1rem; margin-top: 6px; }
.gate-err { color: #b42318; font-size: .86rem; min-height: 1.4em; margin: 2px 0 0; }
.gate-help { font-size: .84rem; color: var(--ink-3); margin: 16px 0 0; text-align: center; }
.gate-preview { display: inline-block; margin-top: 12px; font-size: .78rem; font-weight: 700; color: #8a4b00; background: #fff7e6; border: 1px solid #f6d7a0; border-radius: 999px; padding: .3em .9em; }

/* 入る演出 */
.entry { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; background: #fff; pointer-events: none; opacity: 0; transition: opacity .35s ease; }
.entry.on { opacity: 1; pointer-events: auto; }
.entry-ring { position: absolute; width: 140px; height: 140px; border-radius: 50%; background: var(--aurora-conic); transform: scale(.4); opacity: 0; -webkit-mask: radial-gradient(circle, transparent 60%, #000 62%, #000 70%, transparent 72%); mask: radial-gradient(circle, transparent 60%, #000 62%, #000 70%, transparent 72%); }
.entry-glow { position: absolute; width: 180px; height: 180px; border-radius: 50%; background: var(--aurora); filter: blur(40px); opacity: 0; transform: scale(.5); }
.entry.on .entry-glow { animation: glow 1.6s cubic-bezier(.7,0,.2,1) forwards; }
@keyframes glow { 0% { opacity: 0; transform: scale(.5); } 40% { opacity: .55; transform: scale(1); } 100% { opacity: 0; transform: scale(9); } }
.entry.on .entry-ring { animation: rotp 1.2s linear infinite, grow 1.6s cubic-bezier(.7,0,.2,1) forwards; }
@keyframes grow { 0% { transform: scale(.4); opacity: 0; } 25% { opacity: 1; } 70% { transform: scale(1.4); opacity: .9; } 100% { transform: scale(22); opacity: 0; } }
.entry-log { position: relative; z-index: 2; font-family: var(--f-mono); font-size: .9rem; color: var(--ink-2); list-style: none; padding: 0; margin: 300px 0 0; min-height: 5.6em; text-align: left; }
.entry-log li { opacity: 0; transform: translateY(6px); transition: all .3s ease; }
.entry-log li.in { opacity: 1; transform: none; }
.entry-log li b { color: #0a7250; margin-right: .5em; }

/* ==========================================================================
   上部バー
   ========================================================================== */
.topbar {
  position: sticky; top: 0; z-index: 50; height: var(--top-h);
  background: rgba(255, 255, 255, .78); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .3s, box-shadow .3s;
}
.topbar.scrolled { border-color: var(--line); box-shadow: 0 6px 24px -18px rgba(18, 20, 28, .35); }
.topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--aurora); opacity: .0; transition: opacity .3s; }
.topbar.scrolled::after { opacity: .55; }
.topbar .wrap { height: 100%; display: flex; align-items: center; gap: 18px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none !important; flex-shrink: 0; }
.brand-mark { width: 34px; height: 34px; border-radius: 11px; position: relative; flex-shrink: 0; --spd: 10s; box-shadow: 0 4px 14px -4px rgba(139, 92, 246, .5); }
.brand-mark::after { content: ""; position: absolute; inset: 6px; border-radius: 7px; background: #fff; }
.brand-mark i { position: absolute; inset: 0; display: grid; place-items: center; z-index: 1; font-family: var(--f-en); font-style: normal; font-weight: 700; font-size: .72rem; letter-spacing: .02em; color: var(--ink); }
.brand-txt { line-height: 1.2; }
.brand-txt small { display: block; font-size: .68rem; font-weight: 700; color: var(--ink-3); letter-spacing: .12em; }
.brand-txt strong { font-size: 1.02rem; font-weight: 900; letter-spacing: .04em; }

.nav { display: flex; gap: 2px; margin-left: 8px; }
.nav a {
  position: relative; padding: 8px 12px; border-radius: 10px; color: var(--ink-2); font-weight: 700; font-size: .9rem; text-decoration: none;
  transition: color .2s, background .2s;
}
.nav a:hover { background: var(--panel); color: var(--ink); }
.nav a.on { color: var(--ink); }
.nav a.on::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2.5px; border-radius: 2px; background: var(--aurora); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.seg { position: relative; display: inline-flex; padding: 4px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); }
.seg button { position: relative; z-index: 1; border: 0; background: transparent; padding: 6px 14px; border-radius: 999px; font-size: .84rem; font-weight: 700; color: var(--ink-3); transition: color .3s; min-height: 32px; }
.seg button[aria-pressed="true"] { color: #fff; }
.seg .thumb { position: absolute; top: 4px; bottom: 4px; left: 4px; border-radius: 999px; background: var(--acc-ink); box-shadow: 0 6px 18px -6px var(--acc); transition: left .45s cubic-bezier(.3,1.4,.4,1), width .45s cubic-bezier(.3,1.4,.4,1); }

.search-btn {
  display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px 0 14px; border-radius: 999px;
  border: 1px solid var(--line-2); background: #fff; color: var(--ink-3); font-size: .86rem; font-weight: 700;
  transition: border-color .2s, box-shadow .2s;
}
.search-btn:hover { border-color: color-mix(in srgb, var(--acc) 40%, var(--line-2)); box-shadow: var(--shadow-1); color: var(--ink-2); }
.search-btn kbd { font-family: var(--f-en); font-size: .72rem; padding: 2px 7px; border-radius: 6px; background: var(--panel); border: 1px solid var(--line); color: var(--ink-3); }
.icon-btn { width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 12px; border: 1px solid var(--line-2); background: #fff; color: var(--ink-2); }
.icon-btn:hover { background: var(--panel); }
.me { position: relative; }
.me-btn { position: relative; width: 40px; height: 40px; border-radius: 50%; border: 0; padding: 2px; background: none; --spd: 8s; }
.me-btn span { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; background: #fff; font-family: var(--f-en); font-weight: 700; font-size: .8rem; color: var(--ink); }
.me-menu { position: absolute; right: 0; top: 50px; width: 220px; padding: 8px; border-radius: 16px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-2); }
.me-menu a, .me-menu button { display: block; width: 100%; text-align: left; padding: 10px 12px; border-radius: 10px; border: 0; background: transparent; color: var(--ink-2); font-weight: 700; font-size: .88rem; text-decoration: none; }
.me-menu a:hover, .me-menu button:hover { background: var(--panel); color: var(--ink); }
.me-menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 4px; }
.menu-btn { display: none; }

/* スマホ用メニュー */
.drawer { position: fixed; inset: 0; z-index: 80; background: rgba(18, 20, 28, .25); backdrop-filter: blur(6px); opacity: 0; pointer-events: none; transition: opacity .3s; }
.drawer.open { opacity: 1; pointer-events: auto; }
.drawer-panel { position: absolute; right: 0; top: 0; bottom: 0; width: min(360px, 88vw); background: #fff; padding: 20px 20px 32px; box-shadow: var(--shadow-2); transform: translateX(100%); transition: transform .4s cubic-bezier(.2,.8,.2,1); overflow-y: auto; }
.drawer.open .drawer-panel { transform: none; }
.drawer-panel nav a { display: flex; align-items: center; justify-content: space-between; padding: 14px 6px; border-bottom: 1px solid var(--line); color: var(--ink); font-weight: 700; text-decoration: none; }
.drawer-panel nav a.on { color: var(--acc-ink); }
.drawer-panel .seg { width: 100%; margin: 12px 0 8px; }
.drawer-panel .seg button { flex: 1; }

/* ==========================================================================
   ページ
   ========================================================================== */
main { position: relative; min-height: calc(100vh - var(--top-h)); }
.view { animation: viewIn .55s cubic-bezier(.2,.7,.2,1) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.section { padding: 72px 0; position: relative; }
.section.tight { padding: 44px 0; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; }
.sec-head .lead { margin: 0; }
.page-hero { position: relative; padding: 64px 0 40px; overflow: hidden; }
.page-hero .wrap { position: relative; z-index: 1; }
.page-hero h1 { font-size: clamp(1.9rem, 1.3rem + 2.6vw, 3rem); line-height: 1.3; margin: .35em 0 .35em; font-weight: 900; letter-spacing: .01em; }

/* ---------- ホーム：ヒーロー ---------- */
.hero { position: relative; overflow: hidden; padding: 56px 0 64px; }
.hero canvas.constellation { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 36px; align-items: start; }
.hero h1 { font-size: clamp(2rem, 1.2rem + 3.4vw, 3.4rem); line-height: 1.32; font-weight: 900; margin: 22px 0 26px; letter-spacing: .005em; min-height: 3.96em; }
.hero h1 .caret { display: inline-block; width: .08em; height: .95em; margin-left: .06em; vertical-align: -.08em; background: var(--acc); animation: blink 1s steps(1) infinite; border-radius: 2px; }
.hero h1 .hl { background: var(--ink-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }

.one { margin-top: 4px; }
.one .inner { padding: 26px 28px 24px; }
.one-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.one-label { display: inline-flex; align-items: center; gap: .5em; font-weight: 700; font-size: .86rem; color: var(--acc-ink); }
.one-label .ic { min-width: 26px; padding: 0 8px; height: 26px; border-radius: 8px; letter-spacing: .12em; display: grid; place-items: center; background: var(--acc-soft); color: var(--acc-ink); font-family: var(--f-en); font-size: .7rem; font-weight: 700; }
.one-title { font-size: clamp(1.25rem, 1rem + 1vw, 1.6rem); font-weight: 900; line-height: 1.5; margin: 14px 0 12px; }
.one-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.one-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.kata-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .82rem; color: var(--ink-3); font-weight: 700; }
.kata-row b { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); color: var(--ink); font-weight: 700; }
.kata-row .plus { color: var(--line-2); font-weight: 400; }

.side-stack { display: grid; gap: 16px; }
.event-card { padding: 22px 22px 20px; }
.event-card .top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.event-date { display: flex; align-items: flex-end; gap: 14px; margin: 14px 0 8px; }
.event-date .md { font-family: var(--f-en); font-weight: 700; font-size: 2.6rem; line-height: 1; letter-spacing: -.01em; }
.event-date .md small { font-size: 1.1rem; color: var(--ink-3); margin: 0 .1em; }
.event-date .wd { font-family: var(--f-en); font-weight: 700; font-size: .8rem; color: var(--ink-3); letter-spacing: .14em; line-height: 1.5; }
.event-card h3 { font-size: 1.05rem; margin: 0 0 6px; line-height: 1.5; }
.countdown { display: flex; align-items: baseline; gap: 6px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line-2); font-size: .86rem; color: var(--ink-2); }
.countdown b { font-family: var(--f-en); font-size: 1.5rem; color: var(--acc-ink); line-height: 1; }
.url-slot { margin-top: 12px; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--panel); border: 1px dashed var(--line-2); font-size: .84rem; color: var(--ink-3); }
.url-slot .dot { width: 8px; height: 8px; border-radius: 50%; background: #c7ccd9; flex-shrink: 0; }
.url-slot.live { background: #ecfdf5; border: 1px solid #b9ecd6; color: #0a6b4a; }
.url-slot.live .dot { background: #10b981; animation: pulse 1.4s infinite; }

.hint {
  display: flex; gap: 12px; align-items: flex-start; padding: 16px 16px 16px 18px; border-radius: var(--r-m);
  background: var(--acc-soft); border: 1px solid color-mix(in srgb, var(--acc) 22%, white); font-size: .9rem; color: var(--ink-2);
}
.hint strong { color: var(--ink); }
.hint .x { margin-left: auto; border: 0; background: transparent; color: var(--ink-3); font-size: 1.1rem; line-height: 1; padding: 2px 6px; border-radius: 8px; }
.hint .x:hover { background: rgba(255,255,255,.7); }

/* ---------- 頼み方の見本 ---------- */
.demo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0; overflow: hidden; border-radius: var(--r-xl); }
.demo-l { padding: 26px; border-right: 1px solid var(--line); background: linear-gradient(180deg, #fff, #fbfbfe); }
.demo-r { padding: 26px; position: relative; background: #fff; }
.tabs { display: inline-flex; padding: 4px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); gap: 2px; }
.tabs button { border: 0; background: transparent; padding: 8px 14px; border-radius: 10px; font-size: .86rem; font-weight: 700; color: var(--ink-3); min-height: 36px; }
.tabs button[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: var(--shadow-1); }
.prompt-box {
  position: relative; margin-top: 16px; border-radius: 18px; padding: 16px 16px 60px; min-height: 220px;
  background: #fff; border: 1.5px solid var(--line-2);
  font-size: .92rem; line-height: 1.85; color: var(--ink);
  transition: border-color .3s, box-shadow .3s;
}
#ptext { white-space: pre-wrap; }
.prompt-box.kata { border-color: color-mix(in srgb, var(--acc) 45%, white); box-shadow: 0 0 0 4px color-mix(in srgb, var(--acc) 10%, transparent); }
.ph { color: var(--acc-ink); background: var(--acc-soft); border-radius: 5px; padding: 0 .2em; font-weight: 700; }
.send-row { position: absolute; left: 12px; right: 12px; bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.send-row .muted { font-size: .78rem; }
.ai-head { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: .86rem; color: var(--ink-2); }
.ai-av { width: 30px; height: 30px; border-radius: 10px; position: relative; flex-shrink: 0; --spd: 5s; }
.ai-av::after { content: ""; position: absolute; inset: 5px; border-radius: 6px; background: #fff; }
.ai-av.busy::before { animation-duration: 1s; }
.ai-out { margin-top: 16px; min-height: 220px; font-size: .92rem; line-height: 1.85; white-space: pre-wrap; color: var(--ink); }
.ai-out .caret { display: inline-block; width: 8px; height: 1.1em; vertical-align: -.2em; background: var(--acc); animation: blink 1s steps(1) infinite; border-radius: 2px; margin-left: 2px; }
.ai-idle { color: var(--ink-3); font-size: .9rem; }
.thinking { display: inline-block; height: 14px; width: 180px; border-radius: 7px; background: linear-gradient(90deg, var(--panel) 0%, color-mix(in srgb, var(--acc) 18%, white) 50%, var(--panel) 100%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
.notes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.note { font-size: .82rem; font-weight: 700; padding: .45em .8em; border-radius: 10px; animation: pop .45s cubic-bezier(.2,.8,.2,1.3) both; }
.note.bad { background: #fff1f0; color: #9f1f14; border: 1px solid #fdd1cc; }
.note.good { background: #ecfdf5; color: #0a6b4a; border: 1px solid #b9ecd6; }
.note:nth-child(2) { animation-delay: .12s; }
.demo-foot { font-size: .78rem; color: var(--ink-3); margin-top: 14px; }

/* ---------- 4週の流れ ---------- */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; position: relative; }
.steps::before { content: ""; position: absolute; left: 24px; right: 24px; top: 23px; height: 2px; background: var(--line); z-index: 0; }
.step { position: relative; z-index: 1; }
.step .num { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 2px solid var(--line-2); font-family: var(--f-en); font-weight: 700; color: var(--ink-3); margin-bottom: 14px; transition: all .4s; }
.step.now .num { border-color: transparent; background: var(--acc-ink); color: #fff; box-shadow: 0 0 0 6px color-mix(in srgb, var(--acc) 16%, transparent), var(--shadow-glow); }
.step.done .num { border-color: color-mix(in srgb, var(--acc) 40%, white); color: var(--acc-ink); }
.step .box { padding: 18px 18px 16px; height: calc(100% - 62px); }
.step.now .box { border-color: color-mix(in srgb, var(--acc) 40%, white); box-shadow: var(--shadow-2); }
.step .when { font-family: var(--f-en); font-size: .76rem; font-weight: 700; color: var(--ink-3); letter-spacing: .08em; }
.step h3 { font-size: 1rem; line-height: 1.55; margin: 6px 0 8px; }
.step p { font-size: .86rem; color: var(--ink-2); margin: 0 0 10px; line-height: 1.75; }
.step .ex { font-size: .82rem; padding: 10px 12px; border-radius: 12px; background: var(--acc-soft); color: var(--ink-2); line-height: 1.7; }
.step .ex b { color: var(--acc-ink); display: block; font-size: .72rem; letter-spacing: .08em; }
.step .tag-now { position: absolute; top: 10px; left: 58px; font-size: .72rem; font-weight: 700; color: var(--acc-ink); background: var(--acc-soft); padding: 2px 10px; border-radius: 999px; }

/* ---------- 研究ノート ---------- */
.lab-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.lab-card { display: flex; flex-direction: column; overflow: hidden; color: var(--ink); text-decoration: none !important; transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s; }
.lab-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); }
.cover { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #fafbff; border-bottom: 1px solid var(--line); }
.cover canvas { width: 100%; height: 100%; display: block; transition: transform 1.2s cubic-bezier(.2,.7,.2,1); }
.lab-card:hover .cover canvas { transform: scale(1.06); }
.cover .stat { position: absolute; left: 18px; bottom: 14px; right: 18px; }
.cover .stat .v { font-family: var(--f-en); font-weight: 700; font-size: 2.6rem; line-height: 1; color: var(--ink); letter-spacing: -.02em; text-shadow: 0 2px 18px #fff, 0 0 2px #fff; }
.cover .stat .v small { font-family: var(--f-ja); font-size: 1rem; font-weight: 900; margin-left: .15em; }
.cover .stat .l { font-size: .78rem; font-weight: 700; color: var(--ink-2); background: rgba(255,255,255,.86); display: inline-block; padding: 1px 8px; border-radius: 6px; margin-top: 6px; }
.cover .chips { position: absolute; left: 14px; top: 12px; display: flex; gap: 6px; }
.lab-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.lab-body h3 { font-size: 1.02rem; line-height: 1.55; margin: 0; }
.lab-body p { margin: 0; font-size: .88rem; color: var(--ink-2); line-height: 1.75; }
.baseline { margin-top: auto !important; font-size: .78rem !important; color: var(--ink-3) !important; padding-top: 10px; border-top: 1px dashed var(--line); }
.baseline::before { content: "基準 "; font-weight: 700; color: var(--ink-2); }
.date { font-family: var(--f-en); font-size: .76rem; color: var(--ink-3); letter-spacing: .06em; }

/* ---------- つくったもの ---------- */
.marquee { position: relative; overflow: hidden; padding: 6px 0 12px; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; gap: 16px; width: max-content; animation: marquee 60s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.m-item { width: 260px; flex-shrink: 0; border-radius: 18px; overflow: hidden; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-1); color: var(--ink); text-decoration: none !important; transition: transform .3s, box-shadow .3s; }
.m-item:hover { transform: translateY(-4px) rotate(-.4deg); box-shadow: var(--shadow-2); }
.m-item .th { aspect-ratio: 16 / 9; background: #f1f2f7 center / cover no-repeat; }
.m-item .tx { padding: 10px 14px 12px; }
.m-item .tx b { display: block; font-size: .92rem; }
.m-item .tx span { font-size: .78rem; color: var(--ink-3); }

.works-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.work { overflow: hidden; color: var(--ink); text-decoration: none !important; transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s; }
.work:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); }
.work .th { aspect-ratio: 16 / 9; background: #f1f2f7 center / cover no-repeat; position: relative; overflow: hidden; }
.work .th::after { content: "遊んでみる →"; position: absolute; right: 12px; bottom: 12px; font-size: .78rem; font-weight: 700; color: #fff; background: rgba(18, 20, 28, .72); padding: 4px 10px; border-radius: 999px; opacity: 0; transform: translateY(6px); transition: all .3s; }
.work:hover .th::after { opacity: 1; transform: none; }
.work .tx { padding: 14px 16px 16px; }
.work .tx b { display: block; font-size: 1rem; }
.work .tx span { font-size: .84rem; color: var(--ink-3); }
.more-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.more-list a { display: flex; align-items: center; gap: 14px; padding: 14px 16px; color: var(--ink); text-decoration: none !important; }
.more-list a canvas { width: 54px; height: 54px; border-radius: 12px; flex-shrink: 0; }
.more-list a b { display: block; font-size: .94rem; }
.more-list a span { font-size: .8rem; color: var(--ink-3); line-height: 1.5; display: block; }

/* ---------- 道具 ---------- */
.tool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tool { display: flex; flex-direction: column; gap: 10px; padding: 20px; color: var(--ink); text-decoration: none !important; transition: transform .3s, box-shadow .3s, border-color .3s; }
.tool:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: color-mix(in srgb, var(--acc) 30%, var(--line)); }
.tool .ic { width: 44px; height: 44px; border-radius: 14px; }
.tool h3 { margin: 0; font-size: 1.02rem; line-height: 1.5; }
.tool p { margin: 0; font-size: .87rem; color: var(--ink-2); line-height: 1.75; }
.tool .row { display: flex; flex-wrap: wrap; gap: 6px; }
.tool .go { margin-top: auto; font-size: .84rem; font-weight: 700; color: var(--acc-ink); }

/* ---------- 棚 ---------- */
.shelf-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 0; }
.shelf-tabs a {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 14px; font-weight: 700; font-size: .92rem;
  color: var(--ink-2); background: #fff; border: 1px solid var(--line); text-decoration: none !important; transition: all .25s;
}
.shelf-tabs a:hover { border-color: var(--line-2); color: var(--ink); }
.shelf-tabs a.on { color: #fff; background: var(--ink); border-color: var(--ink); }
.shelf-tabs a .n { font-family: var(--f-en); font-size: .74rem; padding: 1px 7px; border-radius: 999px; background: var(--panel); color: var(--ink-3); }
.shelf-tabs a.on .n { background: rgba(255,255,255,.18); color: #fff; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 22px 0 22px; }
.filters .lbl { font-size: .8rem; font-weight: 700; color: var(--ink-3); margin-right: 4px; }
.fchip { border: 1px solid var(--line-2); background: #fff; color: var(--ink-2); font-size: .84rem; font-weight: 700; border-radius: 999px; padding: 6px 14px; min-height: 36px; transition: all .2s; }
.fchip:hover { border-color: color-mix(in srgb, var(--acc) 40%, var(--line-2)); }
.fchip[aria-pressed="true"] { background: var(--acc-ink); border-color: var(--acc-ink); color: #fff; }

.prompt-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.pcard { padding: 20px 20px 18px; display: flex; flex-direction: column; gap: 10px; }
.pcard .row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pcard h3 { font-size: 1.04rem; margin: 2px 0 0; line-height: 1.5; }
.pcard .scene { font-size: .86rem; color: var(--ink-2); margin: 0; }
.pcard pre {
  margin: 4px 0 0; padding: 14px 16px; border-radius: 14px; background: #fbfbfe; border: 1px solid var(--line);
  font-family: var(--f-ja); font-size: .86rem; line-height: 1.85; white-space: pre-wrap; word-break: break-word; color: var(--ink);
  max-height: 150px; overflow: hidden; position: relative; transition: max-height .5s ease;
}
.pcard pre::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 60px; background: linear-gradient(transparent, #fbfbfe); transition: opacity .3s; }
.pcard.open pre { max-height: 1200px; }
.pcard.open pre::after { opacity: 0; }
.pcard .acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.copy-btn { position: relative; }
.copy-btn.ok { background: #0a7250 !important; border-color: #0a7250 !important; color: #fff !important; }
.frame-tag { font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: 7px; }
.frame-tag.common { background: var(--panel); color: var(--ink-2); border: 1px solid var(--line); }
.frame-tag.shigoto { background: #eef2ff; color: #2446c9; }
.frame-tag.koshi { background: #f4eeff; color: #6428d9; }
.frame-tag.kurashi { background: #e8f7f0; color: #0a7250; }
.empty { padding: 36px; text-align: center; color: var(--ink-3); border: 1px dashed var(--line-2); border-radius: var(--r-l); }

/* ---------- 今月 ---------- */
.month-hero .theme { font-size: clamp(1.7rem, 1.1rem + 2.6vw, 2.8rem); line-height: 1.35; font-weight: 900; margin: .3em 0 .4em; }
.kata-board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.kata-cell { padding: 18px; border-radius: 18px; background: #fff; border: 1px solid var(--line); position: relative; overflow: hidden; }
.kata-cell .k { font-size: 1.4rem; font-weight: 900; }
.kata-cell .t { font-size: .84rem; color: var(--ink-2); }
.kata-cell::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }
.kata-cell:nth-child(1)::before { background: var(--c-blue); }
.kata-cell:nth-child(2)::before { background: var(--c-violet); }
.kata-cell:nth-child(3)::before { background: var(--c-pink); }
.kata-cell:nth-child(4)::before { background: var(--c-orange); }
.kata-tail { margin-top: 12px; font-size: .9rem; color: var(--ink-2); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.kata-tail code { font-family: var(--f-ja); background: var(--panel); border: 1px solid var(--line); padding: 4px 10px; border-radius: 8px; color: var(--ink); }
.other-frames { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.other-frames .card { padding: 16px 18px; }
.other-frames h4 { margin: 0 0 4px; font-size: .95rem; }
.other-frames p { margin: 0 0 10px; font-size: .86rem; color: var(--ink-2); }

/* ---------- 開催予定 ---------- */
.ev-list { display: grid; gap: 14px; }
.ev { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: 22px; align-items: center; padding: 20px 22px; }
.ev .d { text-align: center; padding: 12px 8px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); }
.ev .d .m { font-family: var(--f-en); font-size: .76rem; font-weight: 700; letter-spacing: .14em; color: var(--ink-3); }
.ev .d .n { font-family: var(--f-en); font-size: 2.2rem; font-weight: 700; line-height: 1.05; }
.ev .d .w { font-size: .8rem; font-weight: 700; color: var(--ink-2); }
.ev.next .d { background: var(--acc-ink); border-color: var(--acc-ink); color: #fff; box-shadow: var(--shadow-glow); }
.ev.next .d .m, .ev.next .d .w { color: rgba(255,255,255,.88); }
.ev h3 { margin: 6px 0 4px; font-size: 1.08rem; line-height: 1.5; }
.ev p { margin: 0; font-size: .88rem; color: var(--ink-2); }
.ev .meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ev .side { text-align: right; min-width: 200px; }
.ev .side .url-slot { margin-top: 0; }

/* ---------- はじめに ---------- */
.welcome { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 36px; align-items: center; padding: 32px 36px; }
.welcome img { width: 100%; max-width: 260px; margin-inline: auto; filter: drop-shadow(0 18px 28px rgba(40, 50, 120, .12)); }
.welcome .msg p { margin: 0 0 1em; color: var(--ink-2); }
.welcome .msg p:last-child { margin: 0; }
.welcome .sign { font-weight: 900; color: var(--ink); margin-top: 1em; }
.frame-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.fp {
  text-align: left; padding: 22px; border-radius: var(--r-l); border: 1.5px solid var(--line); background: #fff; position: relative; overflow: hidden;
  transition: transform .3s, border-color .3s, box-shadow .3s;
}
.fp:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.fp .en { font-size: .74rem; font-weight: 700; letter-spacing: .2em; color: var(--ink-3); }
.fp h3 { margin: 4px 0 6px; font-size: 1.4rem; font-weight: 900; }
.fp p { margin: 0 0 12px; font-size: .88rem; color: var(--ink-2); }
.fp .topics { display: flex; flex-wrap: wrap; gap: 6px; }
.fp .state { position: absolute; top: 16px; right: 16px; font-size: .74rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--panel); color: var(--ink-3); }
.fp.sel { border-color: var(--acc); box-shadow: 0 0 0 4px color-mix(in srgb, var(--acc) 14%, transparent), var(--shadow-2); }
.fp.sel .state { background: var(--acc-ink); color: #fff; }
.fp[data-f="shigoto"] .bar { background: #2f5bea; } .fp[data-f="koshi"] .bar { background: #7c3aed; } .fp[data-f="kurashi"] .bar { background: #0e9f6e; }
.fp .bar { position: absolute; left: 0; top: 0; right: 0; height: 4px; }
.first-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; counter-reset: fs; }
.fs { padding: 22px; }
.fs::before { counter-increment: fs; content: "0" counter(fs); font-family: var(--f-en); font-weight: 700; font-size: 2.2rem; line-height: 1; background: var(--ink-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; display: block; margin-bottom: 10px; }
.fs h3 { margin: 0 0 6px; font-size: 1.04rem; }
.fs p { margin: 0; font-size: .88rem; color: var(--ink-2); }
.map { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.map .card { padding: 22px; }
.map h3 { margin: 0 0 6px; font-size: 1.05rem; display: flex; align-items: center; gap: 8px; }
.map p { margin: 0; font-size: .9rem; color: var(--ink-2); }
.map ul { margin: 10px 0 0; padding-left: 1.2em; font-size: .88rem; color: var(--ink-2); }

/* ---------- 特典・お願い ---------- */
.perks { display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; }
.perk { padding: 26px; }
.perk h3 { margin: 0 0 10px; font-size: 1.2rem; }
.price { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 8px 0 14px; }
.price .was { font-family: var(--f-en); font-size: 1.1rem; color: var(--ink-3); text-decoration: line-through; text-decoration-thickness: 2px; }
.price .now { font-family: var(--f-en); font-weight: 700; font-size: 2.6rem; line-height: 1; }
.price .now small { font-family: var(--f-ja); font-size: .9rem; color: var(--ink-2); font-weight: 700; margin-left: .3em; }
.price .arrow { color: var(--ink-3); }
.perk ul { margin: 0 0 12px; padding-left: 1.2em; color: var(--ink-2); font-size: .9rem; }
.perk .how { padding: 12px 14px; border-radius: 12px; background: var(--panel); font-size: .88rem; color: var(--ink-2); }
.rules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.rule { padding: 18px 20px; display: flex; gap: 14px; }
.rule .n { font-family: var(--f-en); font-weight: 700; color: var(--acc-ink); font-size: .9rem; padding-top: 2px; }
.rule h4 { margin: 0 0 4px; font-size: 1rem; }
.rule p { margin: 0; font-size: .88rem; color: var(--ink-2); }
.faq { display: grid; gap: 10px; }
.faq details { border: 1px solid var(--line); border-radius: 16px; background: #fff; overflow: hidden; transition: box-shadow .3s; }
.faq details[open] { box-shadow: var(--shadow-1); }
.faq summary { list-style: none; cursor: pointer; padding: 16px 52px 16px 20px; font-weight: 700; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 20px; top: 50%; width: 10px; height: 10px; border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: translateY(-70%) rotate(45deg); transition: transform .3s; }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq .a { padding: 0 20px 18px; color: var(--ink-2); font-size: .92rem; }
.contact { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 28px; align-items: center; padding: 28px 32px; }
.contact img { width: 100%; max-width: 180px; }
.contact h3 { margin: 0 0 6px; font-size: 1.2rem; }
.contact p { margin: 0 0 8px; color: var(--ink-2); }

/* ---------- ヨンサンから ---------- */
.from { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 28px; align-items: center; padding: 26px 32px; }
.from img { width: 100%; max-width: 200px; margin-inline: auto; }
.from blockquote { margin: 0; font-size: 1.02rem; color: var(--ink-2); line-height: 1.95; }
.from cite { display: block; margin-top: 10px; font-style: normal; font-weight: 900; color: var(--ink); }

/* ---------- フッター ---------- */
footer { border-top: 1px solid var(--line); padding: 40px 0 56px; margin-top: 40px; position: relative; }
footer::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 2px; background: var(--aurora); opacity: .5; }
.foot { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 28px; }
.foot h4 { margin: 0 0 8px; font-size: .9rem; }
.foot p, .foot li { font-size: .86rem; color: var(--ink-3); margin: 0; }
.foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.foot a { color: var(--ink-2); }
.copyright { margin-top: 26px; font-size: .78rem; color: var(--ink-3); }

/* ---------- 検索（⌘K） ---------- */
.palette { position: fixed; inset: 0; z-index: 90; display: grid; justify-items: center; align-items: start; padding: 12vh 16px 16px; background: rgba(18, 20, 28, .22); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); opacity: 0; pointer-events: none; transition: opacity .25s; }
.palette.open { opacity: 1; pointer-events: auto; }
.pal { position: relative; width: min(640px, 100%); border-radius: 22px; padding: 2px; --sc: 12; --spd: 5s; box-shadow: 0 30px 80px -20px rgba(60, 40, 140, .45); transform: translateY(-8px) scale(.98); transition: transform .3s cubic-bezier(.2,.8,.2,1.2); }
.palette.open .pal { transform: none; }
.pal-in { border-radius: 20px; background: #fff; overflow: hidden; }
.pal-q { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.pal-q input { flex: 1; border: 0; outline: none; font: inherit; font-size: 1.06rem; color: var(--ink); background: transparent; min-width: 0; }
.pal-q input::placeholder { color: #666c80; }
.pal-q kbd { font-family: var(--f-en); font-size: .72rem; padding: 2px 7px; border-radius: 6px; background: var(--panel); border: 1px solid var(--line); color: var(--ink-3); }
.pal-list { max-height: min(56vh, 460px); overflow-y: auto; padding: 8px; }
.pal-group { font-size: .72rem; font-weight: 700; letter-spacing: .12em; color: var(--ink-3); padding: 10px 10px 4px; }
.pal-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--ink); text-decoration: none !important; cursor: pointer; }
.pal-item .ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--panel); color: var(--ink-2); font-size: .72rem; font-weight: 700; flex-shrink: 0; font-family: var(--f-en); }
.pal-item b { display: block; font-size: .92rem; font-weight: 700; line-height: 1.4; }
.pal-item span { display: block; font-size: .78rem; color: var(--ink-3); line-height: 1.5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 460px; }
.pal-item.act { background: var(--acc-soft); }
.pal-item.act .ic { background: var(--acc-ink); color: #fff; }
.pal-item mark { background: color-mix(in srgb, var(--c-yellow) 45%, white); color: inherit; border-radius: 3px; padding: 0 1px; }
.pal-foot { display: flex; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--line); font-size: .76rem; color: var(--ink-3); }
.pal-empty { padding: 28px; text-align: center; color: var(--ink-3); font-size: .9rem; }

/* ---------- 通知 ---------- */
.toast { position: fixed; left: 16px; right: 16px; bottom: 88px; z-index: 110; display: flex; justify-content: center; transform: translateY(30px); opacity: 0; pointer-events: none; transition: all .45s cubic-bezier(.2,.8,.2,1.2); }
.toast.on { transform: none; opacity: 1; }
.toast .t { max-width: 640px; }
.toast .t { display: flex; align-items: center; gap: 12px; padding: 12px 18px 12px 14px; border-radius: 16px; background: var(--ink); color: #fff; font-size: .9rem; font-weight: 700; box-shadow: 0 20px 50px -20px rgba(18, 20, 28, .6); }
.toast .t i { position: relative; width: 26px; height: 26px; border-radius: 8px; flex-shrink: 0; --spd: 3s; }

/* 飛び散る光 */
.spark { position: fixed; z-index: 130; width: 7px; height: 7px; border-radius: 50%; pointer-events: none; }

/* ==========================================================================
   画面幅
   ========================================================================== */
@media (max-width: 1080px) {
  .nav { display: none; }
  .menu-btn { display: inline-grid; }
  .top-right .seg { display: none; }
  .hero .wrap { grid-template-columns: 1fr; }
  .lab-grid, .works-grid, .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps::before { display: none; }
  .perks { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .demo { grid-template-columns: 1fr; }
  .demo-l { border-right: 0; border-bottom: 1px solid var(--line); }
  .prompt-list, .rules, .map, .other-frames, .more-list { grid-template-columns: 1fr; }
  .frame-pick, .first-steps { grid-template-columns: 1fr; }
  .kata-board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .welcome, .from, .contact { grid-template-columns: 1fr; text-align: left; padding: 24px; }
  .welcome img { max-width: 200px; }
  .from img, .contact img { max-width: 150px; margin: 0; }
  .ev { grid-template-columns: 84px minmax(0, 1fr); gap: 16px; padding: 18px; }
  .ev .side { grid-column: 1 / -1; text-align: left; min-width: 0; }
  .ev .d .n { font-size: 1.8rem; }
  .foot { grid-template-columns: 1fr; }
  .search-btn .lbl, .search-btn kbd { display: none; }
  .search-btn { width: 40px; padding: 0; justify-content: center; }
}
@media (max-width: 560px) {
  .wrap { width: calc(100% - 32px); }
  .eyebrow { border-radius: 14px; align-items: flex-start; }
  .eyebrow .dot { margin-top: .55em; flex-shrink: 0; }
  .section { padding: 52px 0; }
  .hero { padding: 36px 0 44px; }
  .hero h1 { min-height: 4.2em; }
  .lab-grid, .works-grid, .tool-grid, .steps { grid-template-columns: 1fr; }
  .one .inner { padding: 22px 20px; }
  .brand-txt small { display: none; }
  .demo-l, .demo-r { padding: 20px; }
  .tabs button { padding: 8px 10px; font-size: .8rem; }
  .gate-form { padding: 20px; }
  .event-date .md { font-size: 2.2rem; }
  .price .now { font-size: 2.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .rv { opacity: 1; transform: none; filter: none; }
  .marquee-track { animation: none; }
  .marquee { overflow-x: auto; }
}

/* ==========================================================================
   ログイン・会員まわり（2026-09-25 追加）
   ========================================================================== */
.gate-join { margin: 10px 0 0; font-size: .86rem; font-weight: 700; }
.gate.setup .gate-form { border-color: color-mix(in srgb, #8b5cf6 35%, var(--line)); }
.btn:disabled { opacity: .6; cursor: default; transform: none; box-shadow: none; }
.btn.busy .arrow { display: inline-block; animation: rotp .9s linear infinite; }
.btn.danger { color: #9f1f14; }
.btn.danger:hover { border-color: #f3b4ad; background: #fff5f4; }

.me-head { padding: 8px 12px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; line-height: 1.4; }
.me-head b { display: block; font-size: .92rem; }
.me-head span { font-size: .78rem; color: var(--ink-3); font-family: var(--f-en); }

.must-change { background: #fff7e6; border-bottom: 1px solid #f6d7a0; }
.must-change .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 0; font-size: .9rem; font-weight: 700; color: #6b3a00; }

.dlg { border: 0; padding: 0; border-radius: var(--r-l); width: min(440px, calc(100% - 32px)); box-shadow: 0 30px 80px -20px rgba(40, 30, 120, .45); color: var(--ink); }
.dlg::backdrop { background: rgba(18, 20, 28, .3); backdrop-filter: blur(6px); }
.dlg form { padding: 26px 24px 22px; }
.dlg h2 { margin: 0 0 6px; font-size: 1.2rem; }
.dlg-acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }

.share-row { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }
.share-url { flex: 1; min-width: 0; font-size: .8rem; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--f-en); }

.admin { display: grid; gap: 18px; }
.h-sub { font-size: 1.15rem; margin: 0 0 4px; }
.admin-add { padding: 24px; }
.add-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 12px; align-items: end; }
.add-row .field { margin: 0; }
.add-row .btn { min-height: 50px; }
.issued { margin-top: 18px; padding: 18px; border-radius: 18px; background: #fbfbfe; border: 1.5px solid color-mix(in srgb, var(--acc) 35%, white); animation: pop .4s cubic-bezier(.2,.8,.2,1.2) both; }
.issued-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.cred { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0 0 12px; }
.cred dt { font-size: .82rem; color: var(--ink-3); font-weight: 700; }
.cred dd { margin: 0; font-family: var(--f-mono); font-size: 1rem; }
.cred dd.pw { font-size: 1.2rem; letter-spacing: .08em; color: var(--acc-ink); }
.invite { margin: 0 0 12px; padding: 14px 16px; border-radius: 12px; background: #fff; border: 1px solid var(--line); font-family: var(--f-ja); font-size: .86rem; line-height: 1.8; white-space: pre-wrap; }
.issued .acts { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-list { padding: 0; overflow: hidden; }
.admin-list-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px 12px; }
.m-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1.6fr) 96px 112px 236px; gap: 12px; align-items: center; padding: 12px 22px; border-top: 1px solid var(--line); font-size: .9rem; }
.m-th { font-size: .76rem; font-weight: 700; color: var(--ink-3); background: var(--panel); }
.m-name { font-weight: 700; }
.m-id { font-family: var(--f-en); color: var(--ink-2); }
.m-date { font-family: var(--f-en); font-size: .84rem; color: var(--ink-2); }
.m-date i { display: none; font-style: normal; }
.m-row .chip + .chip { margin-left: 4px; }
.m-acts { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }

@media (max-width: 820px) {
  .add-row { grid-template-columns: 1fr; }
  .m-th { display: none; }
  .m-row { grid-template-columns: 1fr auto; gap: 4px 12px; padding: 14px 18px; }
  .m-row > span:nth-child(3) { grid-column: 1 / -1; }
  .m-date { grid-column: 1 / -1; }
  .m-date i { display: inline; margin-right: .6em; color: var(--ink-3); font-family: var(--f-ja); }
  .m-acts { grid-column: 1 / -1; justify-content: flex-start; margin-top: 6px; }
}

/* ==========================================================================
   生成AIを開く（コピーして開く／右下の入口）
   ========================================================================== */
.ai-chatgpt { --dot: #10a37f; }
.ai-claude  { --dot: #d97757; }
.ai-gemini  { --dot: linear-gradient(135deg, #4285f4, #9b72cb 55%, #d96570); }

.ai-open { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; }
.ai-open .lbl { font-size: .76rem; font-weight: 700; color: var(--ink-3); margin-right: 2px; }
.ai-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 11px 0 10px; border-radius: 999px;
  border: 1px solid var(--line-2); background: #fff; color: var(--ink) !important; font-size: .8rem; font-weight: 700;
  text-decoration: none !important; transition: transform .2s, box-shadow .2s, border-color .2s;
}
.ai-btn::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--dot); flex-shrink: 0; }
.ai-btn::after { content: "↗"; font-size: .72rem; color: var(--ink-3); }
.ai-btn:hover { transform: translateY(-1px); border-color: #b9bdcc; box-shadow: var(--shadow-1); }
.demo-l .ai-open { margin-top: 14px; }
.one .ai-open { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line-2); }

.ai-dock { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; transition: transform .35s cubic-bezier(.2,.8,.2,1), opacity .35s; }
/* 下へ読み進めている間は引っ込め、上へ戻ると出す（本文に重ならないように） */
.ai-dock.tucked:not(.open) { transform: translateY(calc(100% + 30px)); opacity: 0; pointer-events: none; }
.ai-dock-btn {
  display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 18px 0 6px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 12px 34px -12px rgba(60, 40, 140, .45); font-weight: 900; font-size: .9rem; color: var(--ink);
  transition: transform .2s, box-shadow .2s;
}
.ai-dock-btn:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -14px rgba(60, 40, 140, .55); }
.ai-dock-btn .ring { position: relative; width: 40px; height: 40px; border-radius: 50%; overflow: hidden; isolation: isolate; display: grid; place-items: center; flex-shrink: 0; }
.ai-dock-btn .ring::before { content: ""; position: absolute; left: 50%; top: 50%; width: 60px; height: 60px; margin: -30px 0 0 -30px; z-index: -1; background: var(--aurora-conic); animation: rotp 6s linear infinite; }
.ai-dock-btn .ring i { width: 32px; height: 32px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-style: normal; font-family: var(--f-en); font-size: .78rem; font-weight: 700; }
.ai-dock.open .ai-dock-btn .ring::before { animation-duration: 1.4s; }
.ai-dock-panel {
  width: 280px; padding: 14px; border-radius: 20px; background: #fff; border: 1px solid var(--line);
  box-shadow: 0 30px 70px -24px rgba(40, 30, 120, .45); animation: pop .3s cubic-bezier(.2,.8,.2,1.2) both; transform-origin: bottom right;
}
.ai-dock-head { margin: 2px 4px 10px; font-size: .78rem; font-weight: 700; color: var(--ink-3); }
.ai-dock-link { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; color: var(--ink) !important; text-decoration: none !important; transition: background .2s; }
.ai-dock-link:hover { background: var(--panel); }
.ai-dock-link .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--dot); flex-shrink: 0; }
.ai-dock-link b { display: block; font-size: .96rem; line-height: 1.3; }
.ai-dock-link small { display: block; font-size: .74rem; color: var(--ink-3); font-family: var(--f-en); }
.ai-dock-link .go { margin-left: auto; color: var(--ink-3); }
.ai-dock-foot { margin: 8px 4px 2px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: .76rem; color: var(--ink-3); line-height: 1.7; }
footer { padding-bottom: 110px; }

@media (max-width: 560px) {
  .ai-dock { right: 14px; bottom: 14px; }
  .ai-dock-btn { height: 48px; padding: 0 4px; }
  .ai-dock-btn .txt { display: none; }
  .ai-dock-panel { width: min(300px, calc(100vw - 28px)); }
}
