/* =========================================================
   Affect.HD Portal — トップページ（デモ）
   _04：白ベース／Outfit＋Noto Sans JP／常に動く演出
   ========================================================= */
:root {
  --bg: #f7f6f3;
  --surface: #ffffff;
  --panel: rgba(255, 255, 255, .78);
  --line: rgba(22, 20, 16, .08);
  --line-hi: rgba(22, 20, 16, .16);
  --text: #16140f;
  --sub: #3d3a34;
  --muted: #77726a;
  --accent: #8a7556;
  --accent-2: #b9a17b;
  --high: #d2603f;
  --mid: #c08a24;
  --low: #2f8a64;
  --legacy: #7457b0;
  --radius: 18px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --en: "Outfit", "Noto Sans JP", system-ui, sans-serif;
  --ja: "Noto Sans JP", "Outfit", system-ui, sans-serif;
  --metal: linear-gradient(100deg, #4f4537 0%, #8e8270 30%, #c9bfae 50%, #857862 70%, #3f382e 100%);
  --shadow: 0 1px 2px rgba(22, 20, 16, .04), 0 10px 30px -14px rgba(22, 20, 16, .18);
  --shadow-hi: 0 2px 4px rgba(22, 20, 16, .05), 0 24px 50px -18px rgba(70, 55, 30, .28);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--ja);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.is-loading { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
svg { display: block; }

/* ---------- 背景（常に動く） ---------- */
.bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
#bg-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.bg__grid {
  position: absolute; inset: -40px;
  background-image: radial-gradient(rgba(22, 20, 16, .09) 1px, transparent 1.2px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(70% 60% at 50% 40%, #000 30%, transparent 85%);
  mask-image: radial-gradient(70% 60% at 50% 40%, #000 30%, transparent 85%);
  animation: gridMove 30s linear infinite;
}
@keyframes gridMove { to { transform: translate(28px, 28px); } }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .75; will-change: transform; }
.blob--1 { width: 46vmax; height: 46vmax; left: 52%; top: -14vmax; background: radial-gradient(circle, #ecdcc0 0%, transparent 65%); animation: drift1 22s ease-in-out infinite alternate; }
.blob--2 { width: 40vmax; height: 40vmax; left: -12vmax; top: 30%; background: radial-gradient(circle, #dbe3ea 0%, transparent 65%); animation: drift2 26s ease-in-out infinite alternate; }
.blob--3 { width: 34vmax; height: 34vmax; left: 40%; top: 55%; background: radial-gradient(circle, #f1e3d6 0%, transparent 65%); animation: drift3 30s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate(-18vmax, 14vmax) scale(1.15); } }
@keyframes drift2 { to { transform: translate(22vmax, -10vmax) scale(.9); } }
@keyframes drift3 { to { transform: translate(-16vmax, -18vmax) scale(1.2); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- オープニング ---------- */
.intro {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  background: radial-gradient(60% 60% at 50% 45%, #ffffff, #f1efea);
  transition: opacity .9s var(--ease), visibility .9s;
}
.intro.is-leaving { opacity: 0; visibility: hidden; }
.intro.is-leaving .intro__stage { transform: scale(.85) translateY(-4%); filter: blur(6px); }
.intro__stage {
  display: flex; flex-direction: column; align-items: center; gap: 2.4vh;
  transition: transform .9s var(--ease), filter .9s var(--ease);
}
.intro__mark { width: min(32vw, 280px); height: auto; overflow: visible; }
.intro__mark path, .intro__mark rect { transform-box: fill-box; transform-origin: center; }

.m-line { fill: none; stroke: #3d3a34; stroke-width: 3; stroke-dasharray: 1; stroke-dashoffset: 1; }
.m-outer, .m-l, .m-p { opacity: 0; }
.m-sheen { transform-box: fill-box; transform: translateX(-120%); }

.intro.play .m-line { animation: draw 1.3s var(--ease) .15s forwards, fadeOut .6s ease 1.5s forwards; }
.intro.play .m-outer { animation: fadeIn .7s ease 1.05s forwards; }
.intro.play .m-l { animation: lIn .9s var(--ease) 1.35s forwards; }
.intro.play .m-p1 { animation: pieceIn .7s var(--ease) 1.85s forwards; }
.intro.play .m-p2 { animation: pieceIn .7s var(--ease) 2.0s forwards; }
.intro.play .m-p3 { animation: pieceIn .7s var(--ease) 2.15s forwards; }
.intro.play .m-sheen { animation: sheen 1.1s ease-in-out 2.7s forwards; }

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadeIn { to { opacity: 1; } }
@keyframes fadeOut { to { opacity: 0; } }
@keyframes lIn { from { opacity: 0; transform: translate(-6%, 6%); } to { opacity: 1; transform: none; } }
@keyframes pieceIn { from { opacity: 0; transform: translateY(-60%) scale(.6) rotate(-12deg); } to { opacity: 1; transform: none; } }
@keyframes sheen { from { transform: translateX(-120%); } to { transform: translateX(340%); } }

.intro__word {
  font-family: var(--en); font-weight: 600;
  font-size: clamp(40px, 6.4vw, 84px); line-height: 1; letter-spacing: -.02em;
  display: flex; overflow: hidden; padding-bottom: .08em;
}
.intro__word span { display: inline-block; transform: translateY(110%); color: var(--text); }
.intro.play .intro__word span { animation: charUp .9s var(--ease) forwards; animation-delay: calc(2.25s + var(--i) * .05s); }
@keyframes charUp { to { transform: none; } }

.intro__since { display: flex; align-items: center; gap: 18px; color: var(--muted); }
.intro__since-text { font-family: var(--en); font-weight: 400; letter-spacing: .55em; font-size: clamp(11px, 1.2vw, 14px); padding-left: .55em; opacity: 0; }
.intro__rule { width: clamp(40px, 9vw, 120px); height: 1px; background: linear-gradient(90deg, transparent, #8a8478); transform: scaleX(0); }
.intro__rule:first-child { transform-origin: right; }
.intro__rule:last-child { transform-origin: left; background: linear-gradient(90deg, #8a8478, transparent); }
.intro.play .intro__since-text { animation: fadeIn .8s ease 2.9s forwards; }
.intro.play .intro__rule { animation: ruleIn 1s var(--ease) 2.8s forwards; }
@keyframes ruleIn { to { transform: scaleX(1); } }

.intro__skip {
  position: absolute; right: 32px; bottom: 28px;
  font-family: var(--en); letter-spacing: .25em; font-size: 12px; color: var(--muted);
  padding: 8px 16px; border: 1px solid var(--line-hi); border-radius: 99px; background: #fff;
  transition: color .3s, border-color .3s;
}
.intro__skip:hover { color: var(--text); border-color: var(--text); }

/* ---------- ヘッダー ---------- */
.topbar {
  position: fixed; inset: 0 0 auto; z-index: 50;
  display: flex; align-items: center; gap: 32px;
  padding: 16px clamp(20px, 4vw, 56px);
  transition: background .4s, backdrop-filter .4s, padding .4s, border-color .4s, transform .9s var(--ease), opacity .9s;
  border-bottom: 1px solid transparent;
}
body.is-loading .topbar { transform: translateY(-100%); opacity: 0; }
.topbar.is-scrolled { background: rgba(247, 246, 243, .78); backdrop-filter: blur(16px) saturate(1.4); border-color: var(--line); padding-block: 10px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand__mark { width: 32px; height: 28px; transition: transform .6s var(--ease); }
.brand:hover .brand__mark { transform: rotate(-8deg) scale(1.08); }
.brand__name { font-family: var(--en); font-weight: 600; font-size: 20px; letter-spacing: -.01em; }
.brand__name em { font-style: normal; font-weight: 300; color: var(--muted); margin-left: 8px; font-size: 14px; letter-spacing: .2em; text-transform: uppercase; }
.topbar__nav { display: flex; gap: 28px; margin-left: 12px; }
.topbar__nav a { position: relative; font-size: 13px; font-weight: 500; color: var(--muted); transition: color .3s; }
.topbar__nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1.5px; background: var(--text); transform: scaleX(0); transform-origin: right; transition: transform .4s var(--ease); }
.topbar__nav a:hover { color: var(--text); }
.topbar__nav a:hover::after { transform: scaleX(1); transform-origin: left; }
.topbar__right { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.demo-pill {
  font-family: var(--en); font-weight: 600; font-size: 10.5px; letter-spacing: .22em;
  padding: 4px 10px 4px 12px; border-radius: 99px; color: #fff;
  background: linear-gradient(100deg, #16140f, #6e5f48, #16140f); background-size: 200% 100%; animation: metalMove 4s linear infinite;
}
@keyframes metalMove { to { background-position: -200% 0; } }
.clock { font-family: var(--en); font-weight: 500; font-size: 18px; font-variant-numeric: tabular-nums; color: var(--sub); }
.clock .colon { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: .15; } }
.icon-btn {
  position: relative; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  transition: border-color .3s, transform .3s;
}
.icon-btn:hover { border-color: var(--line-hi); transform: translateY(-1px); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: var(--text); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transform-origin: 50% 10%; animation: ring 6s ease-in-out infinite; }
@keyframes ring { 0%, 86%, 100% { transform: rotate(0); } 88% { transform: rotate(14deg); } 90% { transform: rotate(-12deg); } 92% { transform: rotate(8deg); } 94% { transform: rotate(-4deg); } }
.icon-btn__dot { position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--high); border: 2px solid #fff; animation: ping 2s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(210, 96, 63, .5); } 70% { box-shadow: 0 0 0 8px rgba(210, 96, 63, 0); } 100% { box-shadow: 0 0 0 0 rgba(210, 96, 63, 0); } }
.user { display: flex; align-items: center; gap: 10px; }
.user__avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-family: var(--en); font-weight: 600; color: #fff; background: var(--metal); background-size: 200% 100%; animation: metalMove 6s linear infinite; }
.user__meta b { font-weight: 500; font-size: 13px; }
.logout {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 99px; font-size: 12px; font-weight: 500; color: var(--sub);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); transition: color .3s, border-color .3s;
}
.logout svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.logout:hover { color: var(--high); border-color: rgba(210, 96, 63, .4); }

/* ---------- ヒーロー ---------- */
main { position: relative; z-index: 1; }
.hero {
  position: relative; min-height: 100svh;
  display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 4vw;
  padding: 120px clamp(20px, 6vw, 96px) 90px;
}
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-family: var(--en); font-weight: 500; letter-spacing: .28em; font-size: 11.5px; color: var(--accent); margin-bottom: 24px; }
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--low); animation: ping-g 2s infinite; }
@keyframes ping-g { 0% { box-shadow: 0 0 0 0 rgba(47, 138, 100, .45); } 70% { box-shadow: 0 0 0 8px rgba(47, 138, 100, 0); } 100% { box-shadow: 0 0 0 0 rgba(47, 138, 100, 0); } }
.hero__title { font-family: var(--ja); font-weight: 700; font-size: clamp(28px, 4.2vw, 60px); line-height: 1.3; letter-spacing: -.01em; }
.hero__title .js-split { white-space: nowrap; }
.hero__title .ch { display: inline-block; opacity: 0; transform: translateY(.6em); filter: blur(8px); }
body.is-ready .hero__title .ch { animation: chIn .9s var(--ease) forwards; animation-delay: calc(.15s + var(--i) * .03s); }
@keyframes chIn { to { opacity: 1; transform: none; filter: none; } }
/* 名前：光が1文字ずつ流れ続ける */
.hero__name .ch {
  color: transparent; -webkit-background-clip: text; background-clip: text;
  background-image: linear-gradient(100deg, #16140f 0%, #16140f 38%, #b08f5c 50%, #16140f 62%, #16140f 100%);
  background-size: 300% 100%; background-position: 100% 0;
}
body.is-ready .hero__title .hero__name .ch {
  animation: chIn .9s var(--ease) forwards, nameWave 4.5s linear infinite;
  animation-delay: calc(.15s + var(--i) * .03s), calc(var(--i) * .09s);
}
@keyframes nameWave { from { background-position: 100% 0; } to { background-position: -50% 0; } }
.hero__date { margin-top: 18px; color: var(--muted); font-size: 14px; letter-spacing: .04em; }

.fx { opacity: 0; transform: translateY(18px); }
body.is-ready .fx { animation: fxIn 1s var(--ease) forwards; }
body.is-ready .eyebrow.fx { animation-delay: .05s; }
body.is-ready .hero__date.fx { animation-delay: .7s; }
body.is-ready .search.fx { animation-delay: .85s; }
body.is-ready .hero__stats.fx { animation-delay: 1s; }
@keyframes fxIn { to { opacity: 1; transform: none; } }

.search {
  position: relative; margin-top: 40px; max-width: 560px;
  display: flex; align-items: center; gap: 12px;
  padding: 15px 18px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  transition: border-color .3s, box-shadow .3s;
}
.search:focus-within { border-color: rgba(138, 117, 86, .55); box-shadow: 0 0 0 4px rgba(138, 117, 86, .12), var(--shadow-hi); }
.search svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; flex: none; }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--text); font: inherit; font-size: 15px; }
.search input::placeholder { color: #a39e95; }
.search kbd { font-family: var(--en); font-size: 12px; color: var(--muted); border: 1px solid var(--line-hi); border-radius: 6px; padding: 0 8px; background: var(--bg); }

.hero__stats { display: flex; gap: 44px; margin-top: 44px; }
.hero__stats div { display: flex; flex-direction: column; }
.hero__stats b { font-family: var(--en); font-weight: 500; font-size: 46px; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.hero__stats span { font-size: 12px; color: var(--muted); margin-top: 8px; }

.hero__visual {
  position: relative; aspect-ratio: 1; width: 100%; max-width: 540px; justify-self: center;
  display: grid; place-items: center; perspective: 1000px;
  opacity: 0; transform: scale(.9);
  transition: opacity 1.4s var(--ease) .2s, transform 1.4s var(--ease) .2s;
}
body.is-ready .hero__visual { opacity: 1; transform: none; }
.orbits { position: absolute; inset: -6%; width: 112%; height: 112%; overflow: visible; }
.orbit { fill: none; stroke-width: .25; transform-origin: 0 0; }
.orbit--1 { stroke: rgba(22, 20, 16, .28); animation: spin 40s linear infinite; }
.orbit--2 { stroke: rgba(138, 117, 86, .5); stroke-dasharray: 1.2 1.6; animation: spin 26s linear infinite reverse; }
.orbit--3 { stroke: rgba(22, 20, 16, .12); animation: spin 70s linear infinite; }
.orbit-dot { fill: var(--accent); transform-origin: 0 0; }
.orbit-dot--1 { animation: spin 40s linear infinite; }
.orbit-dot--2 { fill: var(--text); animation: spin 70s linear infinite; }
.hero__halo {
  position: absolute; width: 62%; aspect-ratio: 1; border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(185, 161, 123, 0), rgba(185, 161, 123, .45), rgba(219, 227, 234, .6), rgba(185, 161, 123, 0));
  filter: blur(30px); animation: spin 12s linear infinite; opacity: .9;
}
.hero__mark-wrap {
  position: relative; width: 54%; aspect-ratio: 860 / 750;
  transform-style: preserve-3d; transition: transform .8s var(--ease);
  animation: float 6s ease-in-out infinite;
  filter: drop-shadow(0 26px 30px rgba(60, 45, 20, .22));
}
.hero__mark, .hero__mark-sheen { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__mark-sheen .m-sheen--loop { animation: sheenLoop 5s ease-in-out infinite; }
@keyframes sheenLoop { 0%, 50% { transform: translateX(-120%); } 85%, 100% { transform: translateX(340%); } }
@keyframes float { 50% { translate: 0 -16px; } }
.hero__shadow { position: absolute; bottom: 15%; width: 40%; height: 16px; border-radius: 50%; background: radial-gradient(closest-side, rgba(60, 45, 20, .22), transparent); animation: shadowPulse 6s ease-in-out infinite; }
@keyframes shadowPulse { 50% { transform: scaleX(.82); opacity: .6; } }

.scroll-cue { position: absolute; left: 50%; bottom: 26px; width: 22px; height: 36px; border: 1.5px solid var(--line-hi); border-radius: 12px; transform: translateX(-50%); }
.scroll-cue span { position: absolute; left: 50%; top: 7px; width: 2px; height: 7px; margin-left: -1px; background: var(--text); border-radius: 2px; animation: cue 1.8s var(--ease) infinite; }
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }

/* ---------- 流れる帯 ---------- */
.marquee { position: relative; overflow: hidden; padding: 22px 0; border-block: 1px solid var(--line); background: rgba(255, 255, 255, .5); backdrop-filter: blur(6px); }
.marquee__track { display: flex; align-items: center; gap: 36px; width: max-content; animation: marquee 40s linear infinite; }
.marquee span { font-family: var(--en); font-weight: 600; font-size: clamp(22px, 3vw, 40px); letter-spacing: -.02em; white-space: nowrap; color: transparent; -webkit-text-stroke: 1px rgba(22, 20, 16, .35); }
.marquee span:nth-of-type(2n) { color: var(--text); -webkit-text-stroke: 0; }
.marquee i { width: 14px; height: 12px; flex: none; background: var(--accent); clip-path: polygon(50% 0, 100% 100%, 0 100%); animation: spin 6s linear infinite; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- セクション共通 ---------- */
.section { padding: 90px clamp(20px, 6vw, 96px); max-width: 1440px; margin: 0 auto; }
.section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 32px; padding-bottom: 18px; border-bottom: 1px solid var(--line); position: relative; }
.section__head::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 80px; height: 2px; background: var(--text); transform: scaleX(0); transform-origin: left; transition: transform 1.2s var(--ease) .2s; }
.section__head.is-in::after { transform: scaleX(1); }
.section__head h2 { font-family: var(--ja); font-weight: 700; font-size: clamp(24px, 2.4vw, 32px); letter-spacing: -.01em; display: flex; align-items: baseline; gap: 14px; }
.section__num { font-family: var(--en); font-weight: 500; font-size: 14px; color: var(--accent); }
.link-more { font-size: 13px; font-weight: 500; color: var(--muted); display: inline-flex; gap: 8px; transition: color .3s; }
.link-more i { font-style: normal; transition: transform .4s var(--ease); }
.link-more:hover { color: var(--text); }
.link-more:hover i { transform: translateX(4px); }

.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1s var(--ease); transition-delay: calc(var(--i, 0) * 80ms); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- アプリ ---------- */
.tabs { position: relative; display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.tabs__btn { position: relative; z-index: 1; padding: 7px 16px; border-radius: 99px; font-size: 13px; font-weight: 500; color: var(--muted); transition: color .3s; white-space: nowrap; }
.tabs__btn:hover { color: var(--text); }
.tabs__btn.is-active { color: #fff; }
.tabs__ink { position: absolute; z-index: 0; top: 4px; height: calc(100% - 8px); border-radius: 99px; background: var(--text); transition: left .5s var(--ease), width .5s var(--ease), top .5s var(--ease); }

.legend { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: -14px 0 28px; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { font-style: normal; }

.group + .group { margin-top: 48px; }
.group.is-hidden { display: none; }
.group__title { display: flex; align-items: baseline; gap: 10px; margin-bottom: 16px; font-weight: 700; font-size: 15px; color: var(--sub); }
.group__title small { font-family: var(--en); font-weight: 500; font-size: 13px; color: var(--muted); }

.apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.app {
  position: relative; display: flex; flex-direction: column; gap: 10px; min-height: 200px;
  padding: 24px; border-radius: var(--radius); overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  transform: perspective(900px) rotateX(var(--rx, 0)) rotateY(var(--ry, 0)) translateY(var(--ty, 0));
  transition: transform .5s var(--ease), box-shadow .5s var(--ease), border-color .4s, opacity .5s var(--ease);
  --mx: 50%; --my: 50%;
}
.app::before { content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .4s; background: radial-gradient(280px circle at var(--mx) var(--my), rgba(185, 161, 123, .16), transparent 60%); }
.app::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; opacity: 0; transition: opacity .4s;
  background: radial-gradient(220px circle at var(--mx) var(--my), rgba(138, 117, 86, .9), transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
.app:hover { --ty: -5px; box-shadow: var(--shadow-hi); border-color: transparent; }
.app:hover::before, .app:hover::after { opacity: 1; }
.app.is-hidden { display: none; }
.app.is-enter { animation: appIn .6s var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms); }
@keyframes appIn { from { opacity: 0; transform: translateY(16px) scale(.97); } }
.app__top { position: relative; display: flex; align-items: center; justify-content: space-between; }
.app__icon { position: relative; width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: linear-gradient(145deg, #f6f3ee, #ebe6dd); border: 1px solid var(--line); overflow: visible; }
.app__icon::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .95) 50%, transparent 70%); background-size: 250% 100%; animation: iconSheen 7s ease-in-out infinite; animation-delay: calc(var(--i, 0) * .6s); pointer-events: none; }
@keyframes iconSheen { 0%, 70% { background-position: 150% 0; } 100% { background-position: -100% 0; } }
.app__icon svg { position: relative; z-index: 1; width: 22px; height: 22px; fill: none; stroke: var(--text); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; transition: transform .5s var(--ease); }
.app:hover .app__icon svg { transform: scale(1.12) rotate(-6deg); }

.status { font-size: 11px; font-weight: 500; padding: 3px 10px; border-radius: 99px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-hi); color: var(--muted); background: var(--surface); }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status--live { color: var(--low); border-color: rgba(47, 138, 100, .3); background: rgba(47, 138, 100, .06); }
.status--live::before { animation: ping-g 2s infinite; }
.status--legacy { color: var(--legacy); border-color: rgba(116, 87, 176, .3); background: rgba(116, 87, 176, .06); }
.status--plan { color: var(--muted); }
.status--stop { color: #a29d94; }
.status--ext { color: var(--sub); }
.status--admin { color: var(--accent); border-color: rgba(138, 117, 86, .35); background: rgba(138, 117, 86, .07); }

.badge-num {
  font-style: normal; font-family: var(--en); font-weight: 600; font-size: 11.5px; line-height: 1;
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px;
  display: inline-grid; place-items: center; color: #fff; background: var(--high);
  box-shadow: 0 0 0 2px #fff; animation: badgeBeat 2.4s ease-in-out infinite;
}
@keyframes badgeBeat { 0%, 100% { transform: scale(1); } 8% { transform: scale(1.18); } 16% { transform: scale(1); } }
.app__icon .badge-num { position: absolute; z-index: 2; top: -8px; right: -10px; }

.app__name { position: relative; margin-top: 6px; font-weight: 700; font-size: 17px; letter-spacing: -.01em; }
.app__desc { position: relative; font-size: 13px; color: var(--muted); line-height: 1.65; flex: 1; }
.app__foot { position: relative; display: flex; align-items: center; justify-content: space-between; padding-top: 12px; border-top: 1px solid var(--line); }
.app__cat { font-family: var(--en); font-size: 12px; font-weight: 500; color: var(--accent); }
.app__arrow { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-hi); transition: background .4s, border-color .4s, transform .5s var(--ease); }
.app__arrow svg { width: 13px; height: 13px; fill: none; stroke: var(--text); stroke-width: 2; stroke-linecap: round; transition: stroke .4s; }
.app:hover .app__arrow { background: var(--text); border-color: var(--text); transform: rotate(-45deg); }
.app--ext:hover .app__arrow { transform: none; }
.app:hover .app__arrow svg { stroke: #fff; }
.app--ext { min-height: 160px; }
.empty { color: var(--muted); padding: 40px 0; text-align: center; }

/* ---------- 第2段階イメージ ---------- */
.phase { align-self: center; font-family: var(--ja); font-weight: 500; font-size: 11px; padding: 3px 10px; border-radius: 99px; color: var(--mid); border: 1px dashed rgba(192, 138, 36, .7); background: rgba(192, 138, 36, .06); }

/* ---------- やること通知 ---------- */
.alerts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.alert-card {
  position: relative; overflow: hidden;
  padding: 22px 22px 26px; border-radius: var(--radius);
  background: var(--surface); border: 1px dashed var(--line-hi); box-shadow: var(--shadow);
  --c: var(--low);
}
.alert-card[data-level="high"] { --c: var(--high); }
.alert-card[data-level="mid"] { --c: var(--mid); }
.alert-card::before { content: ""; position: absolute; inset: 0; background: radial-gradient(80% 60% at 100% 0%, color-mix(in srgb, var(--c) 10%, transparent), transparent 70%); }
.alert-card__label { position: relative; font-size: 13px; font-weight: 500; color: var(--sub); display: flex; align-items: center; gap: 8px; }
.alert-card__label::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); animation: dotPulse 2s ease-in-out infinite; }
@keyframes dotPulse { 50% { transform: scale(1.6); opacity: .5; } }
.alert-card__count { position: relative; margin: 10px 0 4px; display: flex; align-items: baseline; gap: 6px; }
.alert-card__count b { font-family: var(--en); font-weight: 500; font-size: 54px; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.alert-card__count small { color: var(--muted); font-size: 13px; }
.alert-card__desc { position: relative; font-size: 13px; color: var(--muted); }
.alert-card__bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: linear-gradient(90deg, var(--c), transparent 50%, var(--c)); background-size: 200% 100%; transform: scaleX(0); transform-origin: left; transition: transform 1.4s var(--ease) .4s; animation: barFlow 3s linear infinite; }
.alert-card.is-in .alert-card__bar { transform: scaleX(1); }
@keyframes barFlow { to { background-position: -200% 0; } }

.feed { list-style: none; margin-top: 18px; border-radius: var(--radius); background: var(--surface); border: 1px dashed var(--line-hi); box-shadow: var(--shadow); overflow: hidden; }
.feed__item { display: grid; grid-template-columns: 96px 64px 1fr; gap: 16px; align-items: center; padding: 15px 22px; border-top: 1px solid var(--line); transition: background .3s, opacity 1s var(--ease), transform 1s var(--ease); }
.feed__item:first-child { border-top: 0; }
.feed__item:hover { background: #faf9f6; }
.feed__item time { font-family: var(--en); font-size: 12px; color: var(--muted); }
.feed__item p { font-size: 14px; }
.tag { font-size: 11px; font-weight: 500; text-align: center; padding: 2px 0; border-radius: 6px; border: 1px solid currentColor; }
.tag--high { color: var(--high); }
.tag--mid { color: var(--mid); }
.tag--low { color: var(--low); }
.feed__item.is-hidden { display: none; }

/* ---------- お知らせ ---------- */
.news { list-style: none; }
.news__item { border-bottom: 1px solid var(--line); }
.news__item a { position: relative; display: grid; grid-template-columns: 110px 88px 1fr 24px; gap: 18px; align-items: center; padding: 20px 8px; overflow: hidden; }
.news__item a::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(185, 161, 123, .14), transparent 70%); transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease); }
.news__item a:hover::before { transform: scaleX(1); }
.news__item time { position: relative; font-family: var(--en); font-weight: 500; font-size: 15px; color: var(--muted); }
.chip { position: relative; font-size: 11px; font-weight: 500; text-align: center; padding: 3px 0; border-radius: 99px; border: 1px solid var(--line-hi); color: var(--sub); background: var(--surface); }
.news__title { position: relative; font-size: 14.5px; transition: transform .5s var(--ease); }
.news__item a:hover .news__title { transform: translateX(6px); }
.news__item i { position: relative; font-style: normal; color: var(--muted); transition: transform .5s var(--ease), color .3s; }
.news__item a:hover i { transform: translateX(4px); color: var(--text); }
.new { font-style: normal; font-family: var(--en); font-weight: 600; font-size: 10.5px; letter-spacing: .12em; color: var(--high); margin-left: 10px; animation: blink 1.6s steps(1) infinite; }
.news__item.is-hidden { display: none; }

/* ---------- フッター ---------- */
.footer { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 80px 20px 60px; color: var(--muted); font-size: 12px; text-align: center; }
.footer__mark { width: 38px; height: 33px; margin-bottom: 10px; animation: float 6s ease-in-out infinite; }
.footer__note { color: #a39e95; }
.footer__replay { margin-top: 14px; font-size: 12px; font-weight: 500; color: var(--sub); background: var(--surface); border: 1px solid var(--line); padding: 7px 16px; border-radius: 99px; transition: border-color .3s; }
.footer__replay:hover { border-color: var(--text); }

/* ---------- トースト ---------- */
.toast {
  position: fixed; left: 50%; bottom: 32px; z-index: 120;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  padding: 12px 20px; border-radius: 12px; font-size: 13px; color: #fff;
  background: rgba(22, 20, 16, .92); box-shadow: var(--shadow-hi);
  transition: opacity .4s var(--ease), transform .4s var(--ease);
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- レスポンシブ ---------- */
@media (max-width: 1100px) {
  .alerts { grid-template-columns: repeat(2, 1fr); }
  .topbar__nav { display: none; }
}
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 110px; }
  .hero__visual { order: -1; max-width: 300px; }
  .user__meta, .clock { display: none; }
  .topbar { gap: 12px; }
  .topbar__right { gap: 10px; }
  .logout span { display: none; }
  .logout { padding: 8px; }
  .feed__item { grid-template-columns: 1fr; gap: 6px; }
  .feed__item .tag { width: 56px; }
  .news__item a { grid-template-columns: 1fr; gap: 6px; }
  .news__item .chip { width: 80px; }
  .news__item i { display: none; }
  .hero__stats { gap: 28px; }
}
@media (max-width: 520px) {
  .alerts { grid-template-columns: 1fr; }
  .brand__name em { display: none; }
}

/* 動きを減らす設定の端末では演出を止める */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
