*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: var(--canvas); }
p, h1, h2, h3, h4, ol, ul, figure { margin: 0; padding: 0; }
ol, ul { list-style: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { border: 0; background: none; padding: 0; cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
.ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

.code { font-family: var(--mono); font-variant-numeric: tabular-nums; font-weight: 500; letter-spacing: .04em; white-space: nowrap; }

.link { color: var(--brand); text-decoration: none; border-radius: 6px; }
@media (hover: hover) { .link:hover { text-decoration: underline; text-underline-offset: 3px; } }
.link:focus-visible { outline: 0; box-shadow: var(--ring); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.flash { animation: jp-wash 1.1s var(--ease); }
@keyframes jp-wash { 0% { background-color: rgba(15, 207, 146, .18); } }

@keyframes jp-flash { 0% { box-shadow: 0 0 0 0 rgba(16, 214, 155, .55); } 100% { box-shadow: 0 0 0 14px rgba(16, 214, 155, 0); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-delay: 0s !important; }
}

.loading { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--ink-3); font-size: var(--fs-body); font-weight: 300; z-index: 50; background: var(--canvas); }
.spin { width: 16px; height: 16px; flex: none; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--brand); animation: jp-spin .8s linear infinite; }
@keyframes jp-spin { to { transform: rotate(360deg); } }

.jp-toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 60; transform: translate(-50%, -8px); opacity: 0; pointer-events: none;
  display: inline-flex; align-items: center; gap: 8px; width: max-content; max-width: min(560px, calc(100vw - 32px)); padding: 10px 16px; border-radius: 12px;
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow-pop); font-size: 14px; line-height: 1.5;
  transition: opacity .3s var(--ease), transform .3s var(--ease); }
.jp-toast::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--grad); }
.jp-toast.danger::before { background: var(--danger); }
.jp-toast.z-toast { animation: none; }
.jp-toast.show { opacity: 1; transform: translate(-50%, 0); }
.jp-toast:empty { display: none; }

.demo-corner { position: fixed; left: 6px; bottom: calc(6px + env(safe-area-inset-bottom)); z-index: 40; opacity: .5; transition: opacity var(--t-micro) var(--ease); }
.demo-corner:focus-within { opacity: 1; }
.demo-corner button { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: rgba(255, 255, 255, .9); color: var(--ink-3); font: 400 11px/1 var(--sans);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); transition: color var(--t-micro) var(--ease), border-color var(--t-micro) var(--ease), background var(--t-micro) var(--ease), transform .08s var(--ease); }
@media (hover: hover) { .demo-corner:hover { opacity: 1; } .demo-corner button:hover { color: var(--ink); border-color: var(--line-3); } }
.demo-corner button:active { background: var(--sunken); transform: scale(.96); }
.demo-corner button:focus-visible { outline: 0; box-shadow: var(--ring); }

@media (min-width: 1024px) {
  body:has(#p-admin:not([hidden])) .demo-corner { top: 20px; bottom: auto !important; left: 288px; }
  body:has(#p-peer:not([hidden])) .demo-corner, body:has(#p-staff:not([hidden])) .demo-corner { top: 24px; bottom: auto !important; left: 244px; }

  body:has(#p-staff:not([hidden])) .demo-corner { left: 316px; }
}

@media (max-width: 760px) {
  body:has(#p-peer:not([hidden])) .demo-corner { position: absolute; top: calc(18px + env(safe-area-inset-top)); bottom: auto !important; left: 72px; }
}

.z-btn.is-busy { pointer-events: none; }
.z-btn.is-busy::before { content: ""; flex: none; width: 13px; height: 13px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--brand); animation: z-spin .8s linear infinite; }
.z-btn.is-done::before { content: ""; flex: none; width: 11px; height: 6px; border-left: 2px solid var(--brand); border-bottom: 2px solid var(--brand); transform: rotate(-45deg) translateY(-1px); animation: z-pop .35s var(--spring); }
.z-btn-main.is-busy::before, .z-btn-main.is-done::before { flex: none; }
.is-busy, .is-done { white-space: nowrap; overflow: hidden; }

.z-aura-host { position: relative; isolation: isolate; }
.z-aura-host > .z-aura { z-index: -1; }

[role="dialog"] .z-aura, dialog .z-aura { display: none; }

#p-home { min-height: 100vh; position: relative; overflow: hidden; }
.home-in { position: relative; z-index: 1; max-width: 1040px; margin: 0 auto; padding: 40px var(--gx) 64px; }
.home-top { display: flex; align-items: center; gap: 12px; margin-bottom: 56px; }
.home-logo { height: 30px; width: auto; }

.logo-txt { display: inline-flex; align-items: center; flex: none; width: auto; font-size: 20px; font-weight: 800; line-height: 1; letter-spacing: .02em; color: var(--ink); white-space: nowrap; }
.home-logo.logo-txt { font-size: 24px; }
.home-h { max-width: 15.5em; }
.home-sub { margin-top: 14px; max-width: 680px; }
.home-grid { margin-top: 40px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }

.home-card { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left; padding: 22px 20px 18px; color: var(--ink);
  animation: home-up var(--t-reveal) var(--ease) backwards; animation-delay: calc(var(--i) * 60ms); }
.hc-ico { margin-bottom: 8px; }
.hc-t { display: flex; align-items: center; gap: 10px; font-size: var(--fs-card); font-weight: 500; }

.hc-n { display: inline-flex; align-items: center; gap: 5px; font: 500 13px/1 var(--num); font-variant-numeric: tabular-nums; color: var(--ink); }
.hc-n::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--grad); }
.hc-who { font-size: var(--fs-cap); color: var(--ink-3); }
.hc-d { flex: 1; margin-top: 4px; font-size: var(--fs-note); color: var(--ink-2); line-height: 1.7; }
.hc-go { margin-top: 14px; display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-note); font-weight: 500; color: var(--brand); }
.hc-go .ico { width: 14px; height: 14px; transition: transform var(--t-micro) var(--ease); }
@media (hover: hover) { .home-card:hover .hc-go .ico { transform: translateX(2px); } }
.home-foot { margin-top: 28px; font-size: var(--fs-note); color: var(--ink-3); }
@keyframes home-up { from { opacity: 0; transform: translateY(10px); } }
@media (max-width: 900px) { .home-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .home-grid { grid-template-columns: 1fr; } .home-top { margin-bottom: 32px; } }

.jp-cn-simple { padding: 16px 18px; }
.jp-cn-h { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; margin-bottom: 4px; }
.jp-cn-h > b { font-size: var(--fs-card); font-weight: 500; color: var(--ink); }
.jp-cn-foot { margin: 6px 0 0; font-size: var(--fs-note); font-weight: 300; color: var(--ink-3); line-height: 1.6; }
