/* =====================================================
   乾杯はピース ― さわやかな空と海のポップなテーマ
   （企業PR・子どもにも使える明るい配色）
   ===================================================== */
:root {
  --bg: #eaf7ff;
  --bg-2: #d6f0ff;
  --card: rgba(255, 255, 255, 0.93);
  --card-strong: #ffffff;
  --line: rgba(27, 60, 104, 0.16);
  --fill: rgba(46, 150, 230, 0.1);
  --fill-2: rgba(46, 150, 230, 0.18);
  --text: #1b3358;
  --muted: #43597a;
  --on-accent: #0f2b4c;
  --pink: #ff7a90;
  --magenta: #ff8fb1;
  --yellow: #ffc83d;
  --cyan: #39c4ff;
  --green: #35d49a;
  --orange: #ffa552;
  --purple: #8c7bff;
  --pink-ink: #e0486e;
  --yellow-ink: #c47d00;
  --cyan-ink: #0b86c9;
  --green-ink: #0e9a68;
  --grad-main: linear-gradient(135deg, #3db8ff 0%, #44d7a8 100%);
  --grad-cool: linear-gradient(135deg, #ffd34f 0%, #ffa061 100%);
  --grad-purple: linear-gradient(135deg, #8c7bff 0%, #ff8fb1 100%);
  --radius: 22px;
  --shadow: 0 10px 30px rgba(40, 110, 190, 0.14);
  --bounce: cubic-bezier(0.2, 1.4, 0.4, 1);
  --font-display: "Dela Gothic One", "M PLUS Rounded 1c", sans-serif;
  --font-body: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", "Yu Gothic", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  -webkit-font-smoothing: antialiased;
  margin: 0;
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--text);
  background: linear-gradient(180deg, #cfeeff 0%, #ecf8ff 45%, #e6fbf3 100%) fixed;
  min-height: 100vh;
  padding-bottom: 92px;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; letter-spacing: 0.02em; margin: 0 0 0.4em; line-height: 1.25; }
h1 { font-size: clamp(1.7rem, 5vw, 2.6rem); }
h2 { font-size: clamp(1.25rem, 3.6vw, 1.7rem); }
h3 { font-size: 1.05rem; }
p { line-height: 1.7; margin: 0 0 0.8em; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.tiny { font-size: 0.78rem; }
.center { text-align: center; }
.grad-text { background: var(--grad-main); -webkit-background-clip: text; background-clip: text; color: transparent; }
.grad-text-cool { background: var(--grad-cool); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- animated sky background (game-like) ---------- */
.sky { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.sun { position: absolute; top: -90px; right: -70px; width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, #fff6c8 0%, #ffe38a 35%, rgba(255, 220, 120, 0) 70%);
  animation: sunGlow 6s ease-in-out infinite alternate; }
@keyframes sunGlow { from { transform: scale(1); opacity: 0.8; } to { transform: scale(1.12); opacity: 1; } }
.sun-rays { position: absolute; top: -210px; right: -190px; width: 560px; height: 560px; border-radius: 50%; opacity: 0.35;
  background: repeating-conic-gradient(from 0deg, rgba(255, 236, 160, 0.55) 0deg 7deg, transparent 7deg 22deg);
  -webkit-mask: radial-gradient(circle, #000 0%, transparent 62%); mask: radial-gradient(circle, #000 0%, transparent 62%);
  animation: spin 70s linear infinite; }

.cloud { position: absolute; background: #fff; border-radius: 999px; opacity: 0.9; filter: drop-shadow(0 8px 14px rgba(70, 140, 220, 0.12));
  animation: cloudMove linear infinite; }
.cloud::before, .cloud::after { content: ""; position: absolute; background: #fff; border-radius: 50%; }
.cloud::before { width: 55%; height: 170%; left: 12%; bottom: 25%; }
.cloud::after { width: 42%; height: 130%; right: 12%; bottom: 25%; }
.cloud-1 { width: 200px; height: 56px; top: 9%; animation-duration: 95s; }
.cloud-2 { width: 130px; height: 38px; top: 22%; animation-duration: 70s; animation-delay: -30s; opacity: 0.75; }
.cloud-3 { width: 260px; height: 70px; top: 38%; animation-duration: 130s; animation-delay: -80s; opacity: 0.55; }
.cloud-4 { width: 110px; height: 32px; top: 58%; animation-duration: 80s; animation-delay: -55s; opacity: 0.6; }
@keyframes cloudMove { from { transform: translateX(-320px); } to { transform: translateX(calc(100vw + 320px)); } }

.sea { position: absolute; left: 0; right: 0; bottom: 0; height: 240px; }
.wave { position: absolute; left: 0; bottom: 0; width: 200%; height: 100%; display: block; animation: waveMove linear infinite; }
.wave-1 { fill: rgba(57, 196, 255, 0.22); animation-duration: 16s; }
.wave-2 { fill: rgba(53, 212, 154, 0.2); animation-duration: 23s; animation-direction: reverse; bottom: -18px; }
.wave-3 { fill: rgba(61, 184, 255, 0.28); animation-duration: 11s; bottom: -40px; }
@keyframes waveMove { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.bubble { position: absolute; bottom: -40px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.9);
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.9), rgba(120, 210, 255, 0.25));
  animation: bubbleUp linear infinite; opacity: 0; }
@keyframes bubbleUp {
  0% { transform: translateY(0) translateX(0); opacity: 0; }
  10% { opacity: 0.7; }
  50% { transform: translateY(-50vh) translateX(16px); }
  100% { transform: translateY(-105vh) translateX(-10px); opacity: 0; }
}

.floaters { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.floater { position: absolute; bottom: -60px; font-size: 1.6rem; opacity: 0; animation: floatUp linear infinite; }
@keyframes floatUp {
  0% { transform: translateY(0) rotate(0deg); opacity: 0; }
  10% { opacity: 0.5; }
  90% { opacity: 0.3; }
  100% { transform: translateY(-110vh) rotate(25deg); opacity: 0; }
}

/* ---------- header / nav ---------- */
.peace-day-ribbon {
  position: relative; z-index: 2;
  background: var(--grad-main); color: var(--on-accent); font-weight: 800; font-size: 0.9rem;
  display: flex; gap: 1.5rem; justify-content: center; flex-wrap: wrap; padding: 0.5rem 1rem;
  animation: shine 3s linear infinite; background-size: 200% 100%;
}
@keyframes shine { from { background-position: 0% 50%; } to { background-position: 200% 50%; } }

.site-header {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.75rem 1.25rem;
  background: rgba(255, 255, 255, 0.78); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line);
}
.logo { display: flex; align-items: center; gap: 0.5rem; font-family: var(--font-display); font-size: 1.3rem; white-space: nowrap; }
@media (max-width: 400px) { .logo { font-size: 1.1rem; } }
.logo-mark { font-size: 1.6rem; display: inline-block; animation: wiggle 2.6s ease-in-out infinite; }
@keyframes wiggle { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(12deg); } }
.logo-accent { background: var(--grad-main); -webkit-background-clip: text; background-clip: text; color: transparent; }
.site-nav { display: flex; gap: 0.35rem; align-items: center; }
.nav-link { padding: 0.45rem 0.8rem; border-radius: 999px; font-weight: 700; font-size: 0.9rem; transition: background 0.2s, transform 0.25s var(--bounce); white-space: nowrap; position: relative; overflow: hidden; }
.nav-link:hover { background: var(--fill-2); transform: translateY(-2px); }
.nav-cta { background: var(--grad-main); color: var(--on-accent); box-shadow: 0 6px 20px rgba(61, 184, 255, 0.42); }
.nav-join { border: 1px solid var(--cyan); color: var(--cyan-ink); }
.nav-me { display: flex; align-items: center; gap: 0.4rem; }
@media (max-width: 760px) { .site-nav .nav-link:not(.nav-me):not(.nav-join) { display: none; } }

.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 10;
  display: none; justify-content: space-around; align-items: flex-end;
  background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(14px); border-top: 1px solid var(--line);
  padding: 0.4rem 0.4rem calc(0.5rem + env(safe-area-inset-bottom));
}
.tab { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 0.7rem; font-weight: 700; color: var(--muted); min-width: 56px; position: relative; overflow: hidden; border-radius: 14px; }
.tab span { font-size: 1.35rem; transition: transform 0.25s var(--bounce); }
.tab:active span { transform: scale(0.85); }
.tab-main { color: var(--cyan-ink); overflow: visible; }
.tab-main span { background: var(--grad-main); border-radius: 50%; width: 56px; height: 56px; display: grid; place-items: center; font-size: 1.7rem; margin-top: -26px; box-shadow: 0 8px 24px rgba(61, 184, 255, 0.5); border: 4px solid #fff; }
@media (max-width: 760px) { .tabbar { display: flex; } body { padding-bottom: 96px; } }

/* ---------- layout ---------- */
.container { position: relative; z-index: 1; max-width: 1040px; margin: 0 auto; padding: 1.25rem 1rem 3rem; }
.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.stack > * + * { margin-top: 1rem; }
.row { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }
.space-between { justify-content: space-between; }
.section { margin-top: 2rem; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 0.2rem 1rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.section-title h2 { white-space: nowrap; }
.section-title > :last-child:not(h2) { white-space: nowrap; }
.section-title h2 { margin: 0; }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.25rem; box-shadow: var(--shadow); backdrop-filter: blur(10px);
  position: relative; overflow: hidden;
}
.card-glow::before {
  content: ""; position: absolute; inset: -40%; background: conic-gradient(from 0deg, transparent 0 70%, rgba(61, 184, 255, 0.22) 80%, transparent 90%);
  animation: spin 7s linear infinite; pointer-events: none;
}
@keyframes spin { to { transform: rotate(360deg); } }
.card-hot { border-color: rgba(255, 200, 61, 0.5); box-shadow: 0 0 0 1px rgba(255, 200, 61, 0.2), 0 12px 40px rgba(255, 122, 144, 0.25); }
.card-link { transition: transform 0.3s var(--bounce), border-color 0.15s, box-shadow 0.3s; display: block; }
.card-link:hover { transform: translateY(-4px) scale(1.01); border-color: var(--cyan); box-shadow: 0 16px 36px rgba(40, 110, 190, 0.2); }
.card-link:active { transform: scale(0.98); }

.flash { position: relative; z-index: 5; max-width: 1040px; margin: 0.75rem auto 0; padding: 0.7rem 1rem; border-radius: 14px; font-weight: 700; text-align: center; animation: pop 0.4s ease; }
.flash-notice { background: rgba(53, 212, 154, 0.18); border: 1px solid var(--green); }
.flash-alert { background: rgba(255, 122, 144, 0.18); border: 1px solid var(--pink); }
@keyframes pop { from { transform: scale(0.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ---------- buttons / forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  padding: 0.75rem 1.4rem; border-radius: 999px; border: 0; cursor: pointer;
  font-family: var(--font-body); font-weight: 800; font-size: 1rem; color: var(--text);
  background: var(--card-strong); box-shadow: 0 4px 14px rgba(40, 110, 190, 0.12);
  transition: transform 0.25s var(--bounce), box-shadow 0.25s, filter 0.2s; text-align: center;
  position: relative; overflow: hidden; -webkit-tap-highlight-color: transparent;
}
.btn:hover { transform: translateY(-3px) scale(1.03); filter: brightness(1.05); box-shadow: 0 10px 24px rgba(40, 110, 190, 0.22); }
.btn:active { transform: translateY(1px) scale(0.95); transition-duration: 0.08s; }
.btn-primary { background: var(--grad-main); color: var(--on-accent); box-shadow: 0 8px 26px rgba(61, 184, 255, 0.42); }
.btn-cool { background: var(--grad-cool); color: var(--on-accent); box-shadow: 0 8px 26px rgba(255, 165, 82, 0.4); }
.btn-purple { background: var(--grad-purple); color: #fff; box-shadow: 0 8px 26px rgba(140, 123, 255, 0.45); }
.btn-ghost { background: rgba(255, 255, 255, 0.6); border: 2px solid var(--line); box-shadow: none; }
.btn-primary::before, .btn-cool::before, .btn-purple::before {
  content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  animation: btnShine 3.2s ease-in-out infinite;
}
@keyframes btnShine { 0%, 60% { left: -60%; } 100% { left: 130%; } }
.btn > * { position: relative; }
.btn-lg { font-size: 1.2rem; padding: 1rem 2rem; }
.btn-xl { font-size: 1.6rem; padding: 1.3rem 2.6rem; font-family: var(--font-display); letter-spacing: 0.05em; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; transform: none; filter: grayscale(0.4); }
.btn-pulse { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 200, 61, 0.6), 0 8px 26px rgba(61, 184, 255, 0.42); } 50% { box-shadow: 0 0 0 18px rgba(255, 200, 61, 0), 0 8px 26px rgba(61, 184, 255, 0.42); } }
.btn-row { display: flex; gap: 0.6rem; flex-wrap: wrap; justify-content: center; }

label { display: block; font-weight: 800; margin-bottom: 0.35rem; font-size: 0.95rem; }
.field { margin-bottom: 1.1rem; }
input[type="text"], select, textarea {
  width: 100%; padding: 0.85rem 1rem; border-radius: 14px; border: 1px solid var(--line);
  background: var(--fill); color: var(--text); font-family: var(--font-body); font-size: 1.05rem; font-weight: 700;
}
input[type="text"]:focus, select:focus { outline: 2px solid var(--cyan); border-color: transparent; }
select option { color: #111; }
.input-code { text-align: center; font-size: 1.8rem; letter-spacing: 0.35em; text-transform: uppercase; font-family: var(--font-display); }
.errors { background: rgba(255, 122, 144, 0.18); border: 1px solid var(--pink); border-radius: 12px; padding: 0.6rem 1rem; margin-bottom: 1rem; }
.errors ul { margin: 0; padding-left: 1.2rem; }

.avatar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 0.4rem; }
.avatar-option { font-size: 1.7rem; background: var(--card); border: 2px solid transparent; border-radius: 14px; padding: 0.35rem; cursor: pointer; text-align: center; transition: transform 0.12s; }
.avatar-option:hover { transform: scale(1.12); }
.avatar-option.is-selected { border-color: var(--yellow-ink); background: rgba(255, 200, 61, 0.18); box-shadow: 0 0 16px rgba(255, 200, 61, 0.4); }
.avatar-preview { font-size: 4rem; text-align: center; line-height: 1; margin-bottom: 0.5rem; animation: bounce 1.6s ease-in-out infinite; }

/* ---------- avatars / chips / ranks ---------- */
.avatar { display: inline-grid; place-items: center; border-radius: 50%; background: var(--card-strong); border: 2px solid var(--line); line-height: 1; }
.avatar-xs { width: 24px; height: 24px; font-size: 0.85rem; }
.avatar-sm { width: 36px; height: 36px; font-size: 1.2rem; }
.avatar-md { width: 52px; height: 52px; font-size: 1.7rem; }
.avatar-lg { width: 84px; height: 84px; font-size: 2.8rem; border-width: 3px; }
.avatar-xl { width: 120px; height: 120px; font-size: 4rem; border-width: 4px; }
.avatar-stack { display: flex; }
.avatar-stack .avatar { margin-left: -10px; border-color: var(--bg-2); }
.avatar-stack .avatar:first-child { margin-left: 0; }

.rank-tag { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.2rem 0.7rem; border-radius: 999px; font-weight: 800; font-size: 0.8rem; background: color-mix(in srgb, var(--rank) 20%, transparent); border: 1px solid var(--rank); color: var(--rank); }
.chip { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.3rem 0.75rem; border-radius: 999px; background: var(--fill-2); border: 1px solid rgba(27, 60, 104, 0.14); font-size: 0.82rem; font-weight: 800; color: var(--text); }
.chip-hot { background: rgba(255, 200, 61, 0.3); border-color: rgba(196, 125, 0, 0.3); color: var(--yellow-ink); }
.chip-cool { background: rgba(57, 196, 255, 0.22); border-color: rgba(11, 134, 201, 0.3); color: var(--cyan-ink); }
.chip-green { background: rgba(53, 212, 154, 0.22); border-color: rgba(14, 154, 104, 0.3); color: var(--green-ink); }

/* ---------- hero ---------- */
.hero { text-align: center; padding: 2rem 0 1rem; }
.hero-mark { font-size: clamp(4rem, 14vw, 7rem); line-height: 1; animation: bounce 2.4s ease-in-out infinite; display: inline-block; filter: drop-shadow(0 10px 30px rgba(255, 200, 61, 0.35)); }
@keyframes bounce { 0%, 100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-14px) rotate(6deg); } }
.hero h1 { font-size: clamp(2rem, 7vw, 3.6rem); }
.hero-tagline { font-size: clamp(1rem, 2.6vw, 1.25rem); color: var(--muted); font-weight: 700; }

/* ---------- world peace meter ---------- */
.meter-card { text-align: center; }
.meter-level { font-family: var(--font-display); font-size: clamp(1.2rem, 3.5vw, 1.6rem); }
.meter-big { font-family: var(--font-display); font-size: clamp(2.6rem, 9vw, 4.4rem); line-height: 1.1; background: var(--grad-main); -webkit-background-clip: text; background-clip: text; color: transparent; }
.bar { height: 18px; border-radius: 999px; background: var(--fill-2); overflow: hidden; border: 1px solid var(--line); position: relative; }
.bar-fill { height: 100%; border-radius: 999px; background: var(--grad-main); background-size: 200% 100%; animation: shine 2.5s linear infinite; transition: width 1s ease; min-width: 6px; position: relative; }
.bar-fill.cool { background: var(--grad-cool); }
.bar-fill.purple { background: var(--grad-purple); }
.bar-fill::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent); animation: sweep 1.8s linear infinite; }
@keyframes sweep { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.bar-sm { height: 10px; }
.bar-labels { display: flex; justify-content: space-between; gap: 0.6rem; font-size: 0.8rem; color: var(--muted); font-weight: 700; margin-top: 0.35rem; }
.bar-labels > span:first-child { white-space: nowrap; }
.bar-labels > span:last-child { text-align: right; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; margin-top: 1rem; }
.stat { background: var(--fill); border-radius: 16px; padding: 0.8rem 0.3rem; min-width: 0; text-align: center; }
.stat-num { font-family: var(--font-display); font-size: clamp(1.2rem, 4vw, 1.9rem); line-height: 1.1; white-space: nowrap; }
.stat-label { font-size: 0.72rem; color: var(--muted); font-weight: 800; margin-top: 0.25rem; white-space: nowrap; letter-spacing: -0.01em; }
.stat-sub { font-size: 0.66rem; color: var(--muted); font-weight: 700; margin-top: 0.1rem; white-space: nowrap; }
@media (max-width: 400px) { .stat-label { font-size: 0.66rem; } .stat-num { font-size: 1.15rem; } }
.levels { display: flex; gap: 0.3rem; justify-content: center; flex-wrap: wrap; margin-top: 1rem; }
.level-dot { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--fill); border: 1px solid var(--line); font-size: 1rem; opacity: 0.5; }
.level-dot.done { opacity: 1; background: rgba(53, 212, 154, 0.25); border-color: var(--green-ink); }
.level-dot.current { opacity: 1; background: rgba(255, 200, 61, 0.25); border-color: var(--yellow-ink); box-shadow: 0 0 14px rgba(255, 200, 61, 0.5); transform: scale(1.15); }

/* ---------- peace day ---------- */
.peace-day-card { background: linear-gradient(135deg, rgba(255, 122, 144, 0.25), rgba(255, 200, 61, 0.18)); border-color: rgba(255, 200, 61, 0.4); }
.countdown { font-family: var(--font-display); font-size: 2.2rem; line-height: 1; }

/* ---------- toast feed ---------- */
.feed { display: grid; gap: 0.6rem; }
.feed-item { display: flex; align-items: center; gap: 0.8rem; padding: 0.7rem 0.9rem; background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.feed-region { font-size: 1.6rem; }
.feed-body { flex: 1; min-width: 0; }
.feed-title { font-weight: 800; }
.feed-meta { font-size: 0.78rem; color: var(--muted); }

/* ---------- lobby ---------- */
.code-display { font-family: var(--font-display); font-size: clamp(2.2rem, 10vw, 3.6rem); letter-spacing: 0.25em; text-align: center; background: var(--grad-cool); -webkit-background-clip: text; background-clip: text; color: transparent; margin: 0.2rem 0; }
.qr-box { background: #fff; border-radius: 18px; padding: 0.6rem; display: inline-block; box-shadow: 0 10px 30px rgba(40, 110, 190, 0.2); }
.qr-box img, .qr-box svg { width: 180px; height: 180px; display: block; }
.participants { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; margin: 1rem 0; }
.participant { display: flex; flex-direction: column; align-items: center; gap: 0.3rem; width: 84px; animation: popIn 0.5s cubic-bezier(0.2, 1.4, 0.4, 1); }
.participant .avatar { animation: bounce 2s ease-in-out infinite; }
.participant:nth-child(2n) .avatar { animation-delay: -0.5s; }
.participant:nth-child(3n) .avatar { animation-delay: -1s; }
.participant-name { font-size: 0.8rem; font-weight: 800; text-align: center; max-width: 84px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.participant.host .avatar { border-color: var(--yellow-ink); box-shadow: 0 0 18px rgba(255, 200, 61, 0.5); }
.participant.empty .avatar { border-style: dashed; opacity: 0.5; animation: none; }
@keyframes popIn { from { transform: scale(0.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.waiting-dots::after { content: "…"; animation: dots 1.5s steps(4) infinite; }
@keyframes dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }

/* ---------- result ---------- */
.result-hero { text-align: center; padding: 1rem 0; }
.result-hero .big { font-size: clamp(4rem, 18vw, 8rem); line-height: 1; animation: cheers 1s cubic-bezier(0.2, 1.4, 0.4, 1); display: inline-block; }
@keyframes cheers { 0% { transform: scale(0.2) rotate(-30deg); } 60% { transform: scale(1.2) rotate(8deg); } 100% { transform: scale(1) rotate(0); } }
.points-pop { font-family: var(--font-display); font-size: clamp(2.6rem, 10vw, 4.6rem); line-height: 1; background: var(--grad-main); -webkit-background-clip: text; background-clip: text; color: transparent; animation: pop 0.6s ease 0.3s both; }
.reward-list { display: grid; gap: 0.6rem; }
.reward { display: flex; align-items: center; gap: 0.8rem; padding: 0.7rem 0.9rem; background: var(--fill); border-radius: 14px; animation: slideIn 0.5s ease both; }
.reward:nth-child(2) { animation-delay: 0.15s; } .reward:nth-child(3) { animation-delay: 0.3s; } .reward:nth-child(4) { animation-delay: 0.45s; } .reward:nth-child(5) { animation-delay: 0.6s; }
@keyframes slideIn { from { transform: translateX(-20px); opacity: 0; } to { transform: none; opacity: 1; } }
.reward-icon { font-size: 1.7rem; }
.reward-text { flex: 1; font-weight: 800; }
.reward-pts { font-family: var(--font-display); color: var(--yellow-ink); }
.confetti-canvas { position: fixed; inset: 0; pointer-events: none; z-index: 50; }

/* ---------- missions ---------- */
.mission-card { position: relative; display: flex; flex-direction: column; height: 100%; }
.mission-head { display: flex; align-items: center; gap: 0.75rem; flex: 1; }
.mission-text { flex: 1; min-width: 0; }
.mission-text h3 { line-height: 1.25; }
.mission-bar { margin-top: 0.8rem; }
.mission-emoji { font-size: 2.6rem; line-height: 1; flex: 0 0 auto; }
.mission-cleared { position: absolute; top: 12px; right: 12px; transform: rotate(12deg); background: var(--yellow); color: var(--on-accent); font-family: var(--font-display); padding: 0.2rem 0.7rem; border-radius: 8px; font-size: 0.85rem; box-shadow: 0 4px 14px rgba(255, 200, 61, 0.5); }
.stamp { display: inline-grid; place-items: center; width: 74px; height: 74px; border-radius: 50%; border: 3px dashed var(--line); font-size: 2rem; opacity: 0.35; }
.stamp.got { opacity: 1; border: 3px solid var(--pink); background: rgba(255, 122, 144, 0.2); box-shadow: 0 0 18px rgba(255, 122, 144, 0.5); transform: rotate(-8deg); }
.stamp-grid { display: flex; gap: 0.7rem; flex-wrap: wrap; }
.stamp-item { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; font-size: 0.75rem; font-weight: 800; width: 80px; text-align: center; }

/* ---------- badges ---------- */
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.75rem; }
.badge { text-align: center; padding: 1rem 0.6rem; border-radius: 18px; background: var(--card); border: 1px solid var(--line); position: relative; }
.badge-emoji { font-size: 2.6rem; line-height: 1; }
.badge-name { font-weight: 800; margin-top: 0.4rem; font-size: 0.95rem; }
.badge-desc { font-size: 0.72rem; color: var(--muted); margin-top: 0.2rem; line-height: 1.4; }
.badge.locked { opacity: 0.45; filter: grayscale(1); }
.badge.locked .badge-emoji::after { content: "🔒"; position: absolute; font-size: 1rem; margin-left: -0.6rem; margin-top: 1.4rem; }
.badge.earned { background: var(--card-strong); }
.badge.earned.rarity-rare { border-color: var(--cyan-ink); box-shadow: 0 0 16px rgba(57, 196, 255, 0.3); }
.badge.earned.rarity-epic { border-color: var(--pink-ink); box-shadow: 0 0 18px rgba(255, 143, 177, 0.4); }
.badge.earned.rarity-legend { border-color: var(--yellow-ink); box-shadow: 0 0 22px rgba(255, 200, 61, 0.5); animation: glow 2s ease-in-out infinite alternate; }
@keyframes glow { from { box-shadow: 0 0 12px rgba(255, 200, 61, 0.3); } to { box-shadow: 0 0 28px rgba(255, 200, 61, 0.7); } }
.badge-rarity { position: absolute; top: 8px; left: 10px; font-size: 0.6rem; font-weight: 800; letter-spacing: 0.1em; color: var(--muted); }
.badge-holders { font-size: 0.65rem; color: var(--muted); margin-top: 0.3rem; }

/* ---------- ranking ---------- */
.ranking-list { display: grid; gap: 0.5rem; }
.ranking-row { display: flex; align-items: center; gap: 0.8rem; padding: 0.7rem 0.9rem; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.ranking-pos { font-family: var(--font-display); width: 2.4rem; text-align: center; font-size: 1.2rem; color: var(--muted); }
.ranking-row.top1 { background: linear-gradient(90deg, rgba(255, 200, 61, 0.25), transparent); border-color: var(--yellow-ink); }
.ranking-row.top2 { background: linear-gradient(90deg, rgba(170, 182, 204, 0.3), transparent); border-color: #aab6cc; }
.ranking-row.top3 { background: linear-gradient(90deg, rgba(255, 165, 82, 0.2), transparent); border-color: var(--orange); }
.ranking-name { flex: 1; font-weight: 800; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ranking-pts { font-family: var(--font-display); color: var(--yellow-ink); white-space: nowrap; }
.ranking-sub { font-size: 0.72rem; color: var(--muted); }
.podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; align-items: end; }
.podium-item { text-align: center; padding: 1rem 0.4rem; border-radius: 18px; background: var(--card); border: 1px solid var(--line); }
.podium-item.p1 { order: 2; padding-top: 1.6rem; border-color: var(--yellow-ink); background: rgba(255, 200, 61, 0.12); }
.podium-item.p2 { order: 1; }
.podium-item.p3 { order: 3; }
.podium-crown { font-size: 1.5rem; }

/* ---------- profile ---------- */
.profile-head { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.profile-name { font-family: var(--font-display); font-size: 1.8rem; }
.login-code { font-family: var(--font-display); letter-spacing: 0.2em; font-size: 1.3rem; background: var(--fill); padding: 0.4rem 0.8rem; border-radius: 10px; display: inline-block; }
.connection-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.connection { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.3rem 0.7rem 0.3rem 0.3rem; border-radius: 999px; background: var(--card-strong); font-size: 0.85rem; font-weight: 800; }
.connection small { color: var(--muted); }

/* ---------- misc ---------- */
.site-footer { position: relative; z-index: 1; text-align: center; padding: 2rem 1rem 3rem; border-top: 1px solid var(--line); margin-top: 2rem; font-size: 0.9rem; }
.marquee { overflow: hidden; white-space: nowrap; }
.marquee span { display: inline-block; padding-left: 100%; animation: marquee 22s linear infinite; }
@keyframes marquee { to { transform: translateX(-100%); } }
.divider { height: 1px; background: var(--line); margin: 1rem 0; }
.about-list li { margin-bottom: 0.4rem; }
.emoji-big { font-size: 2.4rem; line-height: 1; }

/* ---------- daily quests / streak / combo ---------- */
.quest-card { border-color: rgba(140, 123, 255, 0.5); }
.quest-list { display: grid; gap: 0.5rem; }
.quest { display: flex; align-items: center; gap: 0.7rem; padding: 0.6rem 0.8rem; border-radius: 14px; background: var(--fill); border: 1px solid transparent; }
.quest.done { border-color: var(--green-ink); background: rgba(53, 212, 154, 0.1); }
.quest-emoji { font-size: 1.7rem; }
.quest-body { flex: 1; min-width: 0; }
.quest-name { font-weight: 800; font-size: 0.95rem; }
.quest-reward { text-align: right; min-width: 48px; }
.reward-quest { background: rgba(140, 123, 255, 0.2); border: 1px solid rgba(140, 123, 255, 0.5); }
.stat-fire { background: linear-gradient(135deg, rgba(255, 122, 144, 0.3), rgba(255, 165, 82, 0.25)); animation: glow 2s ease-in-out infinite alternate; }

/* ---------- peace drop (gacha) / collection / titles ---------- */
.drop-card { text-align: center; overflow: hidden; }
.drop-stage { position: relative; min-height: 230px; display: grid; place-items: center; }
.drop-shake { font-size: 6rem; line-height: 1; animation: shakeBottle 1.4s ease-in-out both, fadeOut 0.3s ease 1.4s both; position: absolute; }
@keyframes shakeBottle { 0%, 100% { transform: rotate(0); } 10% { transform: rotate(-12deg) translateY(-6px); } 20% { transform: rotate(12deg); } 30% { transform: rotate(-16deg) translateY(-10px); } 40% { transform: rotate(16deg); } 50% { transform: rotate(-20deg) translateY(-16px); } 60% { transform: rotate(20deg); } 70% { transform: rotate(-24deg) translateY(-22px) scale(1.1); } 80% { transform: rotate(24deg) scale(1.15); } 90% { transform: rotate(0) scale(1.3); } }
@keyframes fadeOut { to { opacity: 0; transform: scale(0.3); } }
.drop-reveal { animation: revealCard 0.7s cubic-bezier(0.2, 1.4, 0.4, 1) 1.6s both; }
@keyframes revealCard { from { transform: scale(0.2) rotate(-20deg); opacity: 0; } to { transform: scale(1) rotate(0); opacity: 1; } }
.drop-rarity { font-family: var(--font-display); letter-spacing: 0.15em; font-size: 1.1rem; }
.drop-emoji { font-size: 5rem; line-height: 1.1; filter: drop-shadow(0 10px 30px rgba(61, 184, 255, 0.35)); }
.drop-name { font-family: var(--font-display); font-size: 1.5rem; margin: 0.2rem 0; }
.drop-card.rarity-r { border-color: var(--cyan-ink); }
.drop-card.rarity-sr { border-color: var(--pink-ink); box-shadow: 0 0 30px rgba(255, 143, 177, 0.4); }
.drop-card.rarity-ssr { border-color: var(--yellow-ink); box-shadow: 0 0 40px rgba(255, 200, 61, 0.6); animation: glow 1.5s ease-in-out infinite alternate; background: linear-gradient(135deg, rgba(255, 200, 61, 0.18), rgba(255, 122, 144, 0.18)); }
.drop-card.rarity-ssr .drop-emoji { animation: bounce 1.6s ease-in-out infinite; }

.drink-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.75rem; }
.drink { text-align: center; padding: 0.9rem 0.6rem; border-radius: 18px; background: var(--card); border: 1px solid var(--line); }
.drink.locked { opacity: 0.5; }
.drink-stars { font-size: 0.75rem; letter-spacing: 0.1em; }
.drink-emoji { font-size: 2.6rem; line-height: 1.1; }
.drink-name { font-weight: 800; font-size: 0.9rem; margin-top: 0.3rem; }
.drink-count { font-family: var(--font-display); font-size: 0.9rem; margin-top: 0.3rem; color: var(--yellow-ink); }
.drink.owned.rarity-r { border-color: var(--cyan-ink); }
.drink.owned.rarity-sr { border-color: var(--pink-ink); box-shadow: 0 0 14px rgba(255, 143, 177, 0.35); }
.drink.owned.rarity-ssr { border-color: var(--yellow-ink); box-shadow: 0 0 18px rgba(255, 200, 61, 0.5); background: rgba(255, 200, 61, 0.08); }

.title-tag { display: inline-block; padding: 0.1rem 0.55rem; border-radius: 999px; font-size: 0.7rem; font-weight: 800; background: var(--card-strong); border: 1px solid var(--line); white-space: nowrap; }
.title-tag.rarity-rare { border-color: var(--cyan-ink); color: var(--cyan-ink); }
.title-tag.rarity-epic { border-color: var(--pink-ink); color: var(--pink-ink); }
.title-tag.rarity-legend { border-color: var(--yellow-ink); color: var(--yellow-ink); }

/* ---------- peace wave / weekly battle ---------- */
.wave-banner { text-align: center; padding: 0.9rem 1rem; border-radius: var(--radius); margin-bottom: 1rem;
  background: linear-gradient(135deg, rgba(57, 196, 255, 0.25), rgba(140, 123, 255, 0.25)); border: 1px solid var(--cyan);
  box-shadow: 0 0 30px rgba(57, 196, 255, 0.3); animation: waveGlow 2s ease-in-out infinite alternate; position: relative; overflow: hidden; }
.wave-banner::before { content: "🌊"; position: absolute; font-size: 6rem; opacity: 0.12; left: -10px; top: -20px; animation: bounce 3s ease-in-out infinite; }
@keyframes waveGlow { from { box-shadow: 0 0 16px rgba(57, 196, 255, 0.2); } to { box-shadow: 0 0 36px rgba(57, 196, 255, 0.55); } }
.wave-title { font-family: var(--font-display); font-size: 1.2rem; margin-bottom: 0.4rem; color: var(--cyan-ink); }
.wave-chip { animation: pulse 1.6s ease-in-out infinite; }
.reward-wave { background: rgba(57, 196, 255, 0.18); border: 1px solid rgba(57, 196, 255, 0.5); }

.battle-card { border-color: rgba(255, 165, 82, 0.5); }
.battle-list { display: grid; gap: 0.45rem; }
.battle-row { display: flex; align-items: center; gap: 0.6rem; padding: 0.5rem 0.7rem; border-radius: 14px; background: var(--fill); border: 1px solid transparent; }
.battle-row.leader { background: linear-gradient(90deg, rgba(255, 200, 61, 0.22), var(--fill)); border-color: var(--yellow-ink); }
.battle-row.mine { border-color: var(--pink-ink); }
.battle-rank { font-family: var(--font-display); width: 1.8rem; text-align: center; color: var(--muted); }
.battle-emoji { font-size: 1.6rem; }
.battle-body { flex: 1; min-width: 0; }
.battle-name { font-weight: 800; }
.battle-score { font-family: var(--font-display); color: var(--yellow-ink); font-size: 0.9rem; }

/* ---------- toast guard (対象外表示) ---------- */
.guard-notice { display: inline-block; margin-top: 0.6rem; padding: 0.4rem 0.9rem; border-radius: 999px; background: rgba(255, 107, 107, 0.18); border: 1px solid rgba(255, 107, 107, 0.5); color: #d8383f; font-weight: 800; }
.participant.uncounted { opacity: 0.55; }
.reward-capped { background: rgba(255, 107, 107, 0.12); border: 1px dashed rgba(255, 107, 107, 0.5); }

/* ===== bump (tap phones together) ===== */
.bump-card { padding-top: 1.6rem; }
.bump-stage { position: relative; width: 220px; height: 220px; margin: 0 auto; display: grid; place-items: center; }
.bump-ring { position: absolute; inset: 0; border-radius: 50%; border: 3px solid rgba(61, 184, 255, 0.5); animation: bump-ring 2.4s ease-out infinite; }
.bump-ring-2 { animation-delay: 1.2s; }
@keyframes bump-ring { 0% { transform: scale(0.72); opacity: 0.9; } 100% { transform: scale(1.25); opacity: 0; } }
.bump-button { position: relative; width: 170px; height: 170px; border-radius: 50%; border: none; cursor: pointer; color: var(--on-accent);
  background: var(--grad-main); box-shadow: 0 14px 40px rgba(255, 122, 144, 0.45), inset 0 -6px 0 rgba(0, 0, 0, 0.15);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.1rem; font-family: var(--font-display);
  transition: transform 0.12s ease, box-shadow 0.12s ease; -webkit-tap-highlight-color: transparent; }
.bump-button:active { transform: scale(0.94); }
.bump-emoji { font-size: 3.4rem; line-height: 1; }
.bump-label { font-size: 1.15rem; letter-spacing: 0.05em; }
.bump-searching .bump-button { background: var(--grad-purple); animation: bump-wobble 0.7s ease-in-out infinite; }
.bump-matched .bump-button { background: var(--grad-purple); animation: none; transform: scale(1.04); }
.bump-searching .bump-ring { animation-duration: 0.9s; border-color: rgba(57, 196, 255, 0.6); }
@keyframes bump-wobble { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }
.bump-status { margin-top: 0.9rem; font-weight: 800; font-size: 1.05rem; min-height: 1.6em; }
.bump-members { justify-content: center; margin-top: 0.6rem; }
.bump-members:empty { display: none; }
.region-chips { flex-wrap: wrap; gap: 0.4rem; }
.region-chips .chip { cursor: pointer; }

/* ---------- admin dashboard ---------- */
.admin-body { padding-bottom: 2rem; }
.admin-container { max-width: 1160px; }
.admin-badge { font-size: 0.6em; vertical-align: middle; padding: 0.1em 0.5em; border-radius: 999px; background: rgba(57, 196, 255, 0.2); color: var(--cyan-ink); font-family: var(--font-body); font-weight: 800; }
.admin-title { align-items: flex-end; flex-wrap: wrap; margin-bottom: 1rem; }
.admin-title h1 { margin-bottom: 0.2em; }
.admin-csv { justify-content: flex-end; }
.admin-filter { padding: 1rem 1.25rem; margin-bottom: 1rem; }
.admin-filter-row { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: flex-end; }
.admin-filter-group { display: flex; flex-direction: column; gap: 0.35rem; }
.admin-filter-label { font-size: 0.75rem; font-weight: 800; color: var(--muted); }
.admin-filter-actions { flex-direction: row; gap: 0.5rem; margin-left: auto; }
.admin-filter select { min-width: 180px; }
.admin-filter input[type="date"] {
  font: inherit; font-weight: 700; color: var(--text); background: var(--fill); border: 1px solid var(--line);
  border-radius: 12px; padding: 0.55rem 0.7rem; color-scheme: light;
}
.admin-filter input[type="date"]:focus { outline: 2px solid var(--cyan); border-color: transparent; }
.admin-dates-inputs { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.admin-dates-inputs input[type="date"] { flex: 1 1 140px; min-width: 0; max-width: 100%; }
.seg { display: inline-flex; background: var(--fill); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.seg-item { position: relative; cursor: pointer; }
.seg-item input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg-item span { display: block; padding: 0.4rem 0.9rem; border-radius: 999px; font-size: 0.85rem; font-weight: 800; color: var(--muted); transition: background 0.15s, color 0.15s; }
.seg-item:hover span { color: var(--text); }
.seg-item.is-active span, .seg-item input:checked + span { background: var(--grad-cool); color: var(--on-accent); }

.admin-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0.75rem; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 0.9rem 1rem; backdrop-filter: blur(6px); }
.kpi-num { font-family: var(--font-display); font-size: clamp(1.6rem, 3.6vw, 2.3rem); line-height: 1.1; }
.kpi-label { font-size: 0.8rem; font-weight: 800; color: var(--muted); margin-top: 0.25rem; }
.kpi-sub { font-size: 0.72rem; color: var(--muted); margin-top: 0.3rem; opacity: 0.85; }
.kpi-hot { border-color: rgba(255, 200, 61, 0.5); background: linear-gradient(135deg, rgba(255, 122, 144, 0.22), rgba(255, 165, 82, 0.16)); }
.kpi-hot .kpi-num { background: var(--grad-main); -webkit-background-clip: text; background-clip: text; color: transparent; }
.kpi-peace { border-color: rgba(57, 196, 255, 0.45); }
.kpi-peace .kpi-num { color: var(--cyan-ink); }

.chart-svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart-grid { stroke: rgba(27, 60, 104, 0.08); stroke-width: 1; }
.chart-axis { stroke: rgba(27, 60, 104, 0.3); stroke-width: 1; }
.chart-tick { fill: var(--muted); font-size: 11px; font-family: var(--font-body); font-weight: 700; }
.chart-tick.is-peace { fill: var(--yellow); }
.chart-value { fill: var(--text); font-size: 11px; font-family: var(--font-body); font-weight: 800; }
.chart-bar { fill: url(#g-main); opacity: 0.9; }
.chart-bar.is-peace { fill: var(--yellow); }
.chart-bar:hover { opacity: 1; filter: brightness(1.15); }

.hbars { display: flex; align-items: flex-end; gap: 3px; height: 170px; padding-top: 1rem; }
.hbar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.hbar { width: 100%; border-radius: 4px 4px 0 0; min-height: 2px; background: var(--cyan); opacity: 0.9; transition: height 0.6s ease; }
.hbar-col.is-late .hbar { background: var(--pink); }
.hbar-col:hover .hbar { filter: brightness(1.2); }
.hbar-val { font-size: 0.65rem; font-weight: 800; color: var(--muted); height: 1em; line-height: 1; margin-bottom: 2px; }
.hbar-hr { font-size: 0.65rem; color: var(--muted); font-weight: 700; height: 1.2em; line-height: 1.2em; margin-top: 3px; }
.legend-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin: 0 0.3rem 0 0.8rem; vertical-align: middle; }
.legend-dot.early { background: var(--cyan); margin-left: 0; }
.legend-dot.late { background: var(--pink); }

.region-bars { display: grid; gap: 0.55rem; }
.region-row { display: grid; grid-template-columns: 8.5em 1fr 7em; align-items: center; gap: 0.6rem; font-size: 0.9rem; }
.region-row.is-zero { opacity: 0.5; }
.region-name { font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.region-num { text-align: right; white-space: nowrap; }

.table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.admin-table th, .admin-table td { padding: 0.6rem 0.7rem; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
.admin-table thead th { font-size: 0.75rem; color: var(--muted); font-weight: 800; }
.admin-table tbody th { text-align: left; font-weight: 800; }
.admin-table .num-big { font-family: var(--font-display); font-size: 1.15rem; color: var(--yellow-ink); }
.admin-table-foot th, .admin-table-foot td { border-bottom: none; color: var(--muted); }
.admin-table-foot .num-big { color: var(--cyan-ink); }
@media (max-width: 640px) {
  .admin-filter-actions { margin-left: 0; }
  .region-row { grid-template-columns: 6em 1fr 6.5em; }
}

/* ---------- motion: page transitions / ripple / entrance ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0s; }
.container { view-transition-name: page-main; }
::view-transition-old(page-main) { animation: pageOut 0.18s ease-in both; }
::view-transition-new(page-main) { animation: pageIn 0.42s var(--bounce) both; }
@keyframes pageOut { to { opacity: 0; transform: translateY(-14px) scale(0.985); } }
@keyframes pageIn { from { opacity: 0; transform: translateY(26px) scale(0.985); } to { opacity: 1; transform: none; } }
@supports not (view-transition-name: x) {
  .container { animation: pageIn 0.42s var(--bounce) both; }
}
.turbo-progress-bar { height: 4px; background: var(--grad-main); box-shadow: 0 0 10px rgba(61, 184, 255, 0.6); }

.card { animation: riseIn 0.55s var(--bounce) both; }
.stack > .card:nth-child(2), .grid > .card:nth-child(2), .grid > :nth-child(2) .card { animation-delay: 0.07s; }
.stack > .card:nth-child(3), .grid > .card:nth-child(3), .grid > :nth-child(3) .card { animation-delay: 0.14s; }
.stack > .card:nth-child(4), .grid > .card:nth-child(4), .grid > :nth-child(4) .card { animation-delay: 0.21s; }
.stack > .card:nth-child(n+5), .grid > .card:nth-child(n+5) { animation-delay: 0.28s; }
@keyframes riseIn { from { opacity: 0; transform: translateY(18px) scale(0.97); } to { opacity: 1; transform: none; } }
.card:hover { box-shadow: 0 14px 36px rgba(40, 110, 190, 0.18); }
.card { transition: box-shadow 0.3s; }

.ripple { position: absolute; border-radius: 50%; pointer-events: none; transform: translate(-50%, -50%) scale(0);
  background: rgba(255, 255, 255, 0.55); mix-blend-mode: screen; animation: ripple 0.6s ease-out forwards; }
@keyframes ripple { to { transform: translate(-50%, -50%) scale(1); opacity: 0; } }
.btn-ghost .ripple, .nav-link .ripple, .tab .ripple, .chip .ripple { background: rgba(61, 184, 255, 0.35); mix-blend-mode: normal; }
.chip { position: relative; overflow: hidden; transition: transform 0.25s var(--bounce); }
a.chip:hover { transform: translateY(-2px) scale(1.04); }
.avatar-option { transition: transform 0.25s var(--bounce), box-shadow 0.2s; }
.avatar-option:hover { transform: scale(1.15) rotate(-4deg); }
.avatar-option:active { transform: scale(0.9); }
input[type="text"]:focus, select:focus, textarea:focus { box-shadow: 0 0 0 4px rgba(61, 184, 255, 0.2); transition: box-shadow 0.2s; }
.seg-item span { transition: background 0.2s, color 0.2s, transform 0.25s var(--bounce); }
.seg-item:active span { transform: scale(0.93); }

@media (prefers-reduced-motion: reduce) {
  .sky *, .floater, .card, .container, .btn::before, .logo-mark, .hero-mark, .btn-pulse, .bar-fill, .bar-fill::after, .marquee span, .card-glow::before { animation: none !important; }
  ::view-transition-old(page-main), ::view-transition-new(page-main) { animation: none; }
  .btn, .card-link, .nav-link, .tab span, .chip, .avatar-option { transition: none; }
}

/* ---------- tab bar: active state ---------- */
.tab { transition: color 0.2s; }
.tab::before { content: ""; position: absolute; top: 0; left: 50%; width: 0; height: 3px; border-radius: 0 0 4px 4px; background: var(--grad-main); transform: translateX(-50%); transition: width 0.3s var(--bounce); }
.tab.is-active { color: var(--cyan-ink); }
.tab.is-active::before { width: 28px; }
.tab.is-active:not(.tab-main) span { transform: translateY(-2px) scale(1.15); }
.tab-main::before { display: none; }
.tab-main.is-active span { box-shadow: 0 0 0 4px rgba(61, 184, 255, 0.35), 0 8px 24px rgba(61, 184, 255, 0.5); transform: scale(1.08); }
.nav-link.is-active { background: var(--fill-2); color: var(--cyan-ink); }

/* world meter: next-level line */
.meter-next { margin-top: 0.5rem; font-size: 0.9rem; font-weight: 700; color: var(--muted); text-align: center; }
.meter-next-num { font-family: var(--font-display); font-size: 1.15rem; color: var(--cyan-ink); }
