/* 15.10.26 - Webbax | staross.ch - Client portal styles (same palette as the public site) */
@font-face { font-family: "Poppins"; font-weight: 700; font-display: swap; src: url(/fonts/poppins-700.woff2) format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 800; font-display: swap; src: url(/fonts/poppins-800.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 100 900; font-display: swap; src: url(/fonts/inter.woff2) format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 100 800; font-display: swap; src: url(/fonts/jetbrains-mono.woff2) format("woff2"); }

:root {
  --night: #0e0b1e;
  --night-2: #161230;
  --card: #1a1535;
  --line: rgba(196, 160, 255, .16);
  --violet: #8b5cf6;
  --violet-light: #c4a0ff;
  --gold: #e8c58c;
  --text: #e7e3f3;
  --soft: #a9a3c2;
  --green: #5fd39a;
  --red: #f08a8a;
  --title: "Poppins", "Segoe UI", system-ui, sans-serif;
  --body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; background: var(--night); color: var(--text); font: 15px/1.6 var(--body); }
a { color: var(--violet-light); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--title); text-wrap: balance; margin: 0; }
h1 { font-size: clamp(26px, 4vw, 34px); font-weight: 800; }
h2 { font-size: 20px; font-weight: 700; }
h3 { font-size: 16px; font-weight: 700; }
p { margin: 0; }
.muted { color: var(--soft); }
.small { font-size: 13px; }
.mono { font-family: var(--mono); font-size: 13px; }
.error { color: var(--red); font-size: 14px; }
.done { color: var(--gold); font-weight: 600; }
.badge { color: var(--gold); font-weight: 600; }

/* Layout */
.app { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 100vh; }
.menu { background: var(--night-2); border-right: 1px solid var(--line); padding: 20px 14px; display: flex; flex-direction: column; gap: 22px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; color: var(--text); text-decoration: none; }
.brand b { display: block; font: 800 18px/1 var(--title); }
.brand small { display: block; font-size: 12px; color: var(--soft); margin-top: 3px; overflow-wrap: anywhere; }
.group { display: grid; gap: 2px; }
.group-title { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--soft); padding: 0 10px 6px; }
.link { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 8px; background: none; color: var(--text); font: 500 14px var(--body); text-align: left; text-decoration: none; cursor: pointer; }
.link:hover { background: rgba(196, 160, 255, .07); }
.link.active { background: rgba(139, 92, 246, .18); color: #fff; }
.link svg { flex: none; color: var(--violet-light); }
.link.locked { color: var(--soft); }
.account { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); display: grid; gap: 2px; }
.account .who { font-size: 12px; color: var(--soft); padding: 0 10px 4px; overflow-wrap: anywhere; }
.account form { margin: 0; }
.link.logout svg { color: var(--soft); }
.main { padding: 48px max(16px, env(safe-area-inset-right, 0px)) 64px max(16px, env(safe-area-inset-left, 0px)); min-width: 0; }
.page { max-width: 760px; margin: 0 auto; display: grid; gap: 20px; }

.viewas { display: flex; justify-content: center; align-items: center; gap: 14px; flex-wrap: wrap; padding: 8px 16px; background: var(--gold); color: #2a1d05; font-size: 14px; }
.viewas form { margin: 0; }
.viewas button { font: 600 13px var(--body); border: 1px solid #2a1d05; background: transparent; color: #2a1d05; border-radius: 6px; padding: 4px 10px; cursor: pointer; }

/* Components */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 22px; display: grid; gap: 14px; min-width: 0; }
.button { display: inline-flex; align-items: center; justify-self: start; gap: 8px; font: 600 14px var(--body); border-radius: 10px; padding: 10px 16px; border: 1px solid transparent; cursor: pointer; background: var(--violet); color: #fff; text-decoration: none; }
.button:hover { background: #7a48ee; }
.button.ghost { background: transparent; border-color: var(--line); color: var(--text); }
.button.ghost:hover { border-color: var(--violet-light); }
.button.small { padding: 6px 10px; font-size: 13px; }
.flash { border-radius: 10px; padding: 12px 16px; background: rgba(95, 211, 154, .12); color: var(--green); overflow-wrap: anywhere; }
.flash-error { background: rgba(240, 138, 138, .12); color: var(--red); }
.lead-text { font-size: 17px; color: var(--text); }
.signature { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--soft); }
.lock-big { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: rgba(232, 197, 140, .1); color: var(--gold); }

.form { display: grid; gap: 8px; }
.form label { font-size: 14px; font-weight: 500; margin-top: 6px; }
.form input, .form textarea { width: 100%; font: 15px var(--body); color: var(--text); background: var(--night-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.form input:focus, .form textarea:focus { border-color: var(--violet-light); outline: none; }
.form .button { margin-top: 10px; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 400 !important; }
.check input { width: auto; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.history { list-style: none; margin: 0; padding: 0; }
.history li { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid var(--line); }
.history li:last-child { border-bottom: 0; }
.history li.current a { color: var(--gold); }
.history form { margin: 0; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-weight: 500; color: var(--soft); font-size: 12px; text-transform: uppercase; letter-spacing: .5px; padding: 8px; border-bottom: 1px solid var(--line); }
.table td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table form { margin: 0; }
details.add summary, details.lead summary { cursor: pointer; color: var(--violet-light); font-weight: 600; }
details.add[open] summary { margin-bottom: 8px; }
.fields { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; margin: 0; }
.fields dt { color: var(--soft); }
.fields dd { margin: 0; overflow-wrap: anywhere; }

/* Entry (generic report rendering) */
.entry-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.period { font-family: var(--mono); font-size: 13px; color: var(--violet-light); }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.metric { background: var(--night-2); border-radius: 10px; padding: 14px; display: grid; gap: 2px; font-variant-numeric: tabular-nums; }
.metric b { font: 700 20px/1.2 var(--title); }
.metric span { font-size: 12px; color: var(--soft); }
.metric em { font-style: normal; font-size: 13px; font-weight: 600; }
.metric em.up { color: var(--green); }
.metric em.down { color: var(--red); }
.block { display: grid; gap: 4px; padding-left: 14px; border-left: 3px solid var(--violet); }
.block p { color: var(--text); }
.watch { background: rgba(232, 197, 140, .07); border-radius: 10px; padding: 14px 16px; }
.watch .label { font-size: 12px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--gold); }
.watch ul { margin: 6px 0 0; padding-left: 18px; }
.conclusion { color: var(--soft); }
.metric em span { font-weight: 400; color: var(--soft); }
.data-table { display: grid; gap: 8px; }
.data-table .table td:not(:first-child), .data-table .table th:not(:first-child) { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.data-table .table td.up { color: var(--green); font-weight: 600; }
.data-table .table td.down { color: var(--red); font-weight: 600; }
.data-table .table-wrap { border: 1px solid var(--line); border-radius: 12px; background: var(--night-2); }
.data-table .table { min-width: 460px; }
.data-table .table th { background: rgba(139, 92, 246, .1); font-size: 11px; padding: 10px; }
.data-table .table td { padding: 9px 10px; border-bottom: 1px solid rgba(196, 160, 255, .08); }
.data-table .table tbody tr:nth-child(even) td { background: rgba(255, 255, 255, .025); }
.data-table .table tbody tr:hover td { background: rgba(139, 92, 246, .08); }
.data-table .table tbody tr:last-child td { border-bottom: 0; }
.data-table td.has-bar { position: relative; min-width: 120px; }
.data-table .bar { position: absolute; right: 6px; top: 50%; height: 64%; transform: translateY(-50%); border-radius: 4px; background: linear-gradient(90deg, rgba(232, 197, 140, .08), rgba(232, 197, 140, .38)); }
.data-table .val { position: relative; font-weight: 600; }
.bar.b0 { width: 0%; } .bar.b5 { width: 5%; } .bar.b10 { width: 10%; } .bar.b15 { width: 15%; } .bar.b20 { width: 20%; } .bar.b25 { width: 25%; } .bar.b30 { width: 30%; } .bar.b35 { width: 35%; } .bar.b40 { width: 40%; } .bar.b45 { width: 45%; } .bar.b50 { width: 50%; } .bar.b55 { width: 55%; } .bar.b60 { width: 60%; } .bar.b65 { width: 65%; } .bar.b70 { width: 70%; } .bar.b75 { width: 75%; } .bar.b80 { width: 80%; } .bar.b85 { width: 85%; } .bar.b90 { width: 90%; } .bar.b95 { width: 95%; } .bar.b100 { width: 100%; }

/* Public pages (login) */
.public-main { max-width: 440px; margin: 0 auto; padding: 48px max(16px, env(safe-area-inset-right, 0px)) 64px max(16px, env(safe-area-inset-left, 0px)); display: grid; gap: 18px; }
.brand-center { justify-content: center; margin-bottom: 8px; }
.card.center { text-align: center; }
details.lead { gap: 0; }
details.lead[open] { gap: 12px; }

/* Home: Staross greets and dances */
.staross-says { display: flex; align-items: center; gap: 18px; }
.dancer { flex: none; padding: 0; border: 0; background: none; cursor: pointer; filter: drop-shadow(0 0 14px rgba(196, 160, 255, .35)); }
.dancer img { display: block; }
.bubble { position: relative; min-width: 0; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; display: grid; gap: 6px; }
.bubble::before { content: ""; position: absolute; left: -7px; top: 50%; width: 12px; height: 12px; background: var(--card); border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); transform: translateY(-50%) rotate(45deg); }
.bubble p { font-size: 16px; }
.bubble-sign { font-size: 12px; color: var(--gold); }
.dance-jump { animation: dance-jump 1.1s ease-out 2; }
.dance-spin { animation: dance-spin 1.2s cubic-bezier(.5, 0, .3, 1.3); }
.dance-sway { animation: dance-sway 1.6s ease-in-out; }
.dance-pulse { animation: dance-pulse .9s ease-in-out 3; }
.dance-flip { animation: dance-flip 1.3s ease-in-out; }
.dance-shimmy { animation: dance-shimmy .6s linear 3; }
@keyframes dance-jump { 0%, 100% { transform: translateY(0) scale(1); } 15% { transform: translateY(0) scale(1.1, .88); } 45% { transform: translateY(-26px) scale(.95, 1.06); } 75% { transform: translateY(0) scale(1.08, .92); } }
@keyframes dance-spin { from { transform: rotate(0); } to { transform: rotate(360deg); } }
@keyframes dance-sway { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-16deg) translateX(-6px); } 40% { transform: rotate(14deg) translateX(6px); } 60% { transform: rotate(-10deg) translateX(-4px); } 80% { transform: rotate(6deg) translateX(2px); } }
@keyframes dance-pulse { 0%, 100% { transform: scale(1); filter: none; } 30% { transform: scale(1.14); filter: brightness(1.25) drop-shadow(0 0 18px rgba(232, 197, 140, .7)); } 60% { transform: scale(.97); } }
@keyframes dance-flip { 0%, 100% { transform: translateY(0) rotateY(0); } 40% { transform: translateY(-20px) rotateY(180deg); } 80% { transform: translateY(0) rotateY(360deg); } }
@keyframes dance-shimmy { 0%, 100% { transform: translateX(0) rotate(0); } 25% { transform: translateX(-5px) rotate(-6deg); } 75% { transform: translateX(5px) rotate(6deg); } }
.bubble p.say { animation: say .45s ease-out; }
@keyframes say { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Menu: "Déjà en place" (green icon + Actif) and "Prévu ces prochaines semaines" (gold icon + pulsing dot) */
.group-title.ok { color: var(--green); }
.link .label { flex: 1; min-width: 0; }
.mi { flex: none; position: relative; width: 20px; height: 20px; display: grid; place-items: center; }
.link .mi svg { color: var(--violet-light); }
.link.live-row .mi svg { color: var(--green); }
.link.live-row:hover { background: rgba(95, 211, 154, .08); }
.link.live-row.active { background: rgba(95, 211, 154, .14); color: #fff; }
.live { flex: none; padding: 1px 8px; border-radius: 999px; font: 700 10.5px var(--body); letter-spacing: .4px; text-transform: uppercase; color: #06301b; background: var(--green); animation: live 2.4s ease-in-out infinite; }
@keyframes live { 0%, 100% { box-shadow: 0 0 0 0 rgba(95, 211, 154, .55); } 50% { box-shadow: 0 0 0 5px rgba(95, 211, 154, 0); } }
.link.locked { color: var(--text); }
.link.locked .mi svg { color: var(--gold); }
.link.locked .mi::after { content: ""; position: absolute; right: -3px; top: -2px; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); animation: mping 2.6s ease-out infinite; }
.group-locked .link:nth-of-type(2) .mi::after { animation-delay: .4s; }
.group-locked .link:nth-of-type(3) .mi::after { animation-delay: .8s; }
.group-locked .link:nth-of-type(4) .mi::after { animation-delay: 1.2s; }
.group-locked .link:nth-of-type(5) .mi::after { animation-delay: 1.6s; }
.group-locked .link:nth-of-type(6) .mi::after { animation-delay: 2s; }
@keyframes mping { 0% { box-shadow: 0 0 0 0 rgba(232, 197, 140, .6); } 70%, 100% { box-shadow: 0 0 0 6px rgba(232, 197, 140, 0); } }
.dot { flex: none; position: relative; width: 18px; height: 18px; display: grid; place-items: center; }
.dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.dot::after { content: ""; position: absolute; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); animation: ping 2.6s ease-out infinite; }
@keyframes ping { 0% { transform: scale(1); opacity: .7; } 70%, 100% { transform: scale(3); opacity: 0; } }

/* Upcoming section page */
.head-stack { display: grid; gap: 8px; }
.kicker-soon { display: inline-flex; align-items: center; gap: 8px; justify-self: start; padding: 4px 12px 4px 8px; border-radius: 999px; background: rgba(232, 197, 140, .14); color: var(--gold); font: 600 12px var(--body); letter-spacing: .3px; }
.kicker-soon .dot { width: 12px; height: 12px; }
.scene { border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: radial-gradient(120% 100% at 50% 100%, rgba(139, 92, 246, .16), transparent 60%), #120f27; }
.scene .caption { padding: 12px 16px; border-top: 1px solid var(--line); background: rgba(22, 18, 48, .7); font: 600 15px/1.4 var(--title); }
.note-from { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: start; padding: 6px 4px; }
.note-from img { filter: drop-shadow(0 0 10px rgba(196, 160, 255, .35)); }
.note-text { display: grid; gap: 12px; max-width: 62ch; }
.note-text p { font-size: 16.5px; line-height: 1.7; }
.note-text strong { color: var(--gold); font-weight: 600; }
.note-sign { font-size: 13px; color: var(--soft); }
.note-sign b { color: var(--gold); font-weight: 600; }

/* Scenes (Views/portal/scenes.php) */
.stage { position: relative; height: 220px; overflow: hidden; }
.stage .ab { position: absolute; }
.stage .star { position: absolute; width: 52px; height: 52px; filter: drop-shadow(0 0 10px rgba(196, 160, 255, .45)); }
@keyframes hop { 0%, 100% { transform: translateY(0) scale(1.05, .95); } 45% { transform: translateY(-26px) scale(.95, 1.05); } }
.s-default .guard { left: 50%; top: 50%; margin: -26px 0 0 -26px; width: 52px; height: 52px; }

.s-seo .bar { left: 50%; top: 16px; width: min(330px, 80%); height: 32px; transform: translateX(-50%); border-radius: 16px; background: #fff; display: flex; align-items: center; gap: 8px; padding: 0 14px; color: #3c3a48; font-size: 13px; white-space: nowrap; overflow: hidden; }
.s-seo .bar svg { flex: none; color: #8a879a; }
.s-seo .res { left: calc(50% - 90px); width: 210px; height: 22px; border-radius: 6px; background: rgba(231, 227, 243, .14); }
.s-seo .res::before { content: ""; position: absolute; left: 10px; top: 8px; width: 60%; height: 6px; border-radius: 3px; background: rgba(231, 227, 243, .3); }
.s-seo .mine { top: 168px; background: linear-gradient(90deg, rgba(232, 197, 140, .5), rgba(232, 197, 140, .2)); box-shadow: 0 0 14px rgba(232, 197, 140, .35); animation: climb 5s ease-in-out infinite; }
.s-seo .mine::before { background: var(--gold); }
.s-seo .r1 { top: 66px; animation: down1 5s ease-in-out infinite; }
.s-seo .r2 { top: 100px; animation: down2 5s ease-in-out infinite; }
.s-seo .r3 { top: 134px; animation: down3 5s ease-in-out infinite; }
.s-seo .hopper { left: calc(50% - 142px); top: 152px; animation: climb 5s ease-in-out infinite; }
.s-seo .hopper .star { position: relative; display: block; width: 44px; height: 44px; animation: hop 1.25s ease-in-out infinite; }
@keyframes climb { 0%, 12% { transform: translateY(0); } 25%, 37% { transform: translateY(-34px); } 50%, 62% { transform: translateY(-68px); } 75%, 92% { transform: translateY(-102px); } 100% { transform: translateY(0); } }
@keyframes down3 { 0%, 12% { transform: none; } 25%, 92% { transform: translateY(34px); } 100% { transform: none; } }
@keyframes down2 { 0%, 37% { transform: none; } 50%, 92% { transform: translateY(34px); } 100% { transform: none; } }
@keyframes down1 { 0%, 62% { transform: none; } 75%, 92% { transform: translateY(34px); } 100% { transform: none; } }

.s-ui .phone { left: 50%; top: 14px; width: 112px; height: 196px; margin-left: -56px; border-radius: 18px; border: 2px solid rgba(196, 160, 255, .45); background: #0b0918; overflow: hidden; }
.s-ui .screen { position: absolute; left: 8px; right: 8px; top: 12px; display: grid; gap: 8px; animation: scroll 5s ease-in-out infinite; }
.s-ui .screen i { display: block; height: 30px; border-radius: 6px; background: rgba(231, 227, 243, .12); }
.s-ui .screen i.img { height: 54px; background: rgba(139, 92, 246, .3); }
.s-ui .tiny { justify-self: end; width: 26px; height: 10px; border-radius: 3px; background: var(--gold); position: relative; }
.s-ui .tiny::after { content: ""; position: absolute; left: 50%; top: 50%; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; border: 2px solid var(--red); opacity: 0; animation: alert 5s ease-out infinite; }
.s-ui .visitor { left: calc(50% + 40px); top: 40px; animation: visit 5s ease-in-out infinite; }
.s-ui .visitor .star { position: relative; display: block; width: 40px; height: 40px; }
.s-ui .oops { left: calc(50% + 74px); top: 92px; padding: 4px 9px; border-radius: 10px; background: var(--red); color: #2a0b0b; font: 700 12px var(--body); opacity: 0; animation: oops 5s ease-out infinite; }
@keyframes scroll { 0%, 10% { transform: none; } 45%, 90% { transform: translateY(-70px); } 100% { transform: none; } }
@keyframes visit { 0%, 10% { transform: none; } 45% { transform: translateY(50px); } 50%, 56%, 62% { transform: translateY(50px) rotate(-10deg); } 53%, 59% { transform: translateY(50px) rotate(10deg); } 66%, 90% { transform: translateY(50px); } 100% { transform: none; } }
@keyframes alert { 0%, 46% { opacity: 0; transform: scale(.6); } 52% { opacity: 1; transform: scale(1); } 80% { opacity: 1; } 90%, 100% { opacity: 0; } }
@keyframes oops { 0%, 48% { opacity: 0; transform: translateY(6px); } 54%, 86% { opacity: 1; transform: none; } 92%, 100% { opacity: 0; } }

.s-sheets .cards { left: 50%; top: 70px; transform: translateX(-50%); display: flex; gap: 14px; }
.s-sheets .sheet { width: 92px; height: 120px; border-radius: 10px; background: var(--night-2); border: 1px solid var(--line); padding: 8px; display: grid; gap: 6px; align-content: start; }
.s-sheets .pic { height: 40px; border-radius: 6px; background: rgba(139, 92, 246, .28); }
.s-sheets .sheet i { display: block; height: 6px; border-radius: 3px; background: var(--gold); transform-origin: left; transform: scaleX(0); }
.s-sheets .c1 i { animation: write1 6s ease-out infinite; }
.s-sheets .c2 i { animation: write2 6s ease-out infinite; }
.s-sheets .c3 i { animation: write3 6s ease-out infinite; }
.s-sheets .sheet i:nth-of-type(2) { width: 80%; }
.s-sheets .sheet i:nth-of-type(3) { width: 60%; }
.s-sheets .writer { left: calc(50% - 130px); top: 20px; animation: across 6s ease-in-out infinite; }
.s-sheets .writer .star { position: relative; display: block; width: 44px; height: 44px; animation: hop 1s ease-in-out infinite; }
@keyframes across { 0%, 8% { transform: translateX(0); } 30%, 38% { transform: translateX(106px); } 60%, 90% { transform: translateX(212px); } 100% { transform: translateX(0); } }
@keyframes write1 { 0%, 6% { transform: scaleX(0); } 18%, 92% { transform: scaleX(1); } 100% { transform: scaleX(0); } }
@keyframes write2 { 0%, 34% { transform: scaleX(0); } 46%, 92% { transform: scaleX(1); } 100% { transform: scaleX(0); } }
@keyframes write3 { 0%, 62% { transform: scaleX(0); } 74%, 92% { transform: scaleX(1); } 100% { transform: scaleX(0); } }

.s-build .brick { left: 50%; width: 70px; height: 34px; margin-left: -35px; border-radius: 6px; }
.s-build .k1 { bottom: 16px; background: rgba(139, 92, 246, .55); animation: drop1 5s cubic-bezier(.5, 0, .5, 1.4) infinite; }
.s-build .k2 { bottom: 52px; background: rgba(196, 160, 255, .5); width: 58px; margin-left: -29px; animation: drop2 5s cubic-bezier(.5, 0, .5, 1.4) infinite; }
.s-build .k3 { bottom: 88px; background: rgba(232, 197, 140, .6); width: 46px; margin-left: -23px; animation: drop3 5s cubic-bezier(.5, 0, .5, 1.4) infinite; }
.s-build .lander { left: 50%; bottom: 124px; margin-left: -26px; animation: land 5s ease-out infinite; }
.s-build .lander .star { position: relative; display: block; }
.s-build .spark { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 10px var(--gold); opacity: 0; animation: spark 5s ease-out infinite; }
.s-build .p1 { left: calc(50% - 60px); bottom: 150px; }
.s-build .p2 { left: calc(50% + 56px); bottom: 160px; animation-delay: .1s; }
.s-build .p3 { left: calc(50% - 40px); bottom: 190px; animation-delay: .2s; }
.s-build .p4 { left: calc(50% + 34px); bottom: 196px; animation-delay: .15s; }
@keyframes drop1 { 0%, 4% { transform: translateY(-260px); } 16%, 92% { transform: none; } 100% { transform: translateY(-260px); } }
@keyframes drop2 { 0%, 18% { transform: translateY(-260px); } 30%, 92% { transform: none; } 100% { transform: translateY(-260px); } }
@keyframes drop3 { 0%, 32% { transform: translateY(-260px); } 44%, 92% { transform: none; } 100% { transform: translateY(-260px); } }
@keyframes land { 0%, 46% { transform: translateY(-260px); opacity: 0; } 47% { opacity: 1; } 58% { transform: translateY(0) scale(1.15, .85); } 64%, 92% { transform: none; opacity: 1; } 100% { transform: translateY(-260px); opacity: 0; } }
@keyframes spark { 0%, 60% { opacity: 0; transform: scale(.2); } 66% { opacity: 1; transform: scale(1.4); } 85%, 100% { opacity: 0; transform: scale(.6) translateY(-14px); } }

.s-mkt .shop { left: calc(50% + 40px); top: 70px; width: 120px; height: 110px; color: var(--violet-light); }
.s-mkt .shop .glow { fill: rgba(232, 197, 140, .18); animation: shopglow 6s ease-in-out infinite; }
.s-mkt .cheer { left: calc(50% + 74px); top: 14px; }
.s-mkt .cheer .star { position: relative; display: block; width: 48px; height: 48px; animation: hop 1.5s ease-in-out infinite; }
.s-mkt .who { left: calc(50% - 190px); top: 140px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: #2a1d05; box-shadow: 0 0 12px rgba(232, 197, 140, .5); opacity: 0; animation: walk 6s ease-in-out infinite; }
.s-mkt .who svg { width: 17px; height: 17px; }
.s-mkt .h2 { animation-delay: 2s; }
.s-mkt .h3 { animation-delay: 4s; }
.s-mkt .plus { left: calc(50% + 92px); top: 64px; font: 800 18px var(--title); color: var(--gold); text-shadow: 0 0 10px rgba(232, 197, 140, .6); opacity: 0; animation: plus 6s ease-out infinite; }
.s-mkt .q2 { animation-delay: 2s; }
.s-mkt .q3 { animation-delay: 4s; }
.s-mkt .road { left: calc(50% - 200px); top: 172px; width: 260px; height: 2px; background: linear-gradient(90deg, transparent, rgba(196, 160, 255, .35)); }
@keyframes walk { 0% { opacity: 0; transform: translateX(0) translateY(0); } 6% { opacity: 1; } 12% { transform: translateX(50px) translateY(-6px); } 18% { transform: translateX(100px) translateY(0); } 24% { transform: translateX(150px) translateY(-6px); } 30% { transform: translateX(200px) translateY(0) scale(1); opacity: 1; } 36%, 100% { transform: translateX(262px) translateY(-6px) scale(.3); opacity: 0; } }
@keyframes plus { 0%, 32% { opacity: 0; transform: translateY(8px) scale(.7); } 38% { opacity: 1; transform: translateY(0) scale(1.15); } 50% { opacity: 1; transform: translateY(-8px) scale(1); } 60%, 100% { opacity: 0; transform: translateY(-18px); } }
@keyframes shopglow { 0%, 30%, 100% { fill: rgba(232, 197, 140, .12); } 36% { fill: rgba(232, 197, 140, .55); } 48% { fill: rgba(232, 197, 140, .2); } }

.s-sec .guard { left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; }
.s-sec .guard .star { left: 0; top: 0; }
.s-sec .shield { left: 50%; top: 50%; width: 120px; height: 120px; margin: -60px 0 0 -60px; border-radius: 50%; border: 2px solid rgba(232, 197, 140, .55); box-shadow: 0 0 24px rgba(232, 197, 140, .2), inset 0 0 24px rgba(232, 197, 140, .12); animation: shield 3s ease-in-out infinite; }
.s-sec .bug { display: block; width: 26px; height: 22px; color: var(--red); }
.s-sec .bL { left: calc(50% - 150px); top: calc(50% - 11px); animation: bugL 3s ease-in-out infinite; }
.s-sec .bR { left: calc(50% + 124px); top: calc(50% - 30px); animation: bugR 3s ease-in-out infinite 1.5s; }
@keyframes bugL { 0% { transform: translateX(-30px); opacity: 0; } 10% { opacity: 1; } 42% { transform: translateX(80px); } 55% { transform: translateX(20px) rotate(-200deg); opacity: 1; } 80%, 100% { transform: translateX(-50px) translateY(-60px) rotate(-420deg); opacity: 0; } }
@keyframes bugR { 0% { transform: translateX(30px); opacity: 0; } 10% { opacity: 1; } 42% { transform: translateX(-80px); } 55% { transform: translateX(-20px) rotate(200deg); opacity: 1; } 80%, 100% { transform: translateX(50px) translateY(60px) rotate(420deg); opacity: 0; } }
@keyframes shield { 0%, 38%, 100% { transform: scale(1); } 44% { transform: scale(1.08); border-color: var(--gold); } 52% { transform: scale(1); } }

@media (prefers-reduced-motion: reduce) { .dancer, .live, .dot::after, .mi::after, .stage * { animation: none !important; } }

@media (max-width: 760px) {
  .app { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .menu { border-right: 0; border-bottom: 1px solid var(--line); padding-left: max(14px, env(safe-area-inset-left, 0px)); padding-right: max(14px, env(safe-area-inset-right, 0px)); }
  .group-locked { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .group-locked .group-title { grid-column: 1 / -1; }
  .main { padding-top: 28px; }
  .staross-says { gap: 14px; }
  .dancer img { width: 64px; height: 64px; }
  .bubble p { font-size: 15px; }
  .s-sheets .sheet { width: 76px; }
  .s-sheets .writer { left: calc(50% - 118px); }
  .s-mkt .shop { left: calc(50% + 20px); }
  .s-mkt .cheer { left: calc(50% + 54px); }
  .s-mkt .plus { left: calc(50% + 72px); }
  .s-mkt .who { left: calc(50% - 160px); }
  .s-mkt .road { left: calc(50% - 170px); width: 220px; }
  .note-from { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .data-table .table tbody tr td:first-child, .data-table .table thead tr th:first-child { position: sticky; left: 0; z-index: 1; background: var(--night-2); max-width: 150px; white-space: normal; }
  .note-text p { font-size: 15.5px; }
}

.entry-head .print-btn { margin-left: auto; }

@media print {
  @page { size: A4; margin: 14mm 12mm; }
  :root { --night: #fff; --night-2: #f6f4fb; --card: #fff; --line: #ddd8ea; --text: #1a1535; --soft: #5d5775; --violet-light: #6d3fd8; --gold: #9a6a1c; --green: #1c8a55; --red: #c23b3b; color-scheme: light; }
  body { background: #fff; font-size: 12.5px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .menu, .viewas, .flash, .print-btn, .history, .page > h2 { display: none !important; }
  .app { display: block; min-height: 0; }
  .main { padding: 0; }
  .page { max-width: none; gap: 12px; }
  .card { border: 0; padding: 0; }
  .metric, .block, .watch, .table tr { break-inside: avoid; }
  .data-table h3 { break-after: avoid; }
  .table-wrap { overflow: visible; }
  .data-table .table { min-width: 0; }
  .data-table .table th { background: #efeaf9; }
  .data-table .table td { padding: 5px 10px; }
  .data-table .table tbody tr:nth-child(even) td { background: #faf9fd; }
  .data-table .bar { background: linear-gradient(90deg, rgba(196, 140, 50, .12), rgba(196, 140, 50, .4)); }
  .watch { background: #fbf5ea; }
}
