/* Level UP! styles. Tokens come from the Figma hi-fi. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/inter-var.woff2') format('woff2');
}

:root {
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  /* brand */
  --brand: #34d399;
  --brand-press: #29bb86;
  --accent: #3cbea0;

  /* app surfaces (Level UP! is a light app by design) */
  --ink: #000;
  --gray: #737373;
  --hint: #8a8a8a;
  --fill: #f0f0f0;
  --row: #f7f7f7;
  --line: #e0e0e0;
  --surface: #fff;

  /* the page around the phone follows the system theme */
  --page-bg: #e8ebee;
  --page-ink: #14161a;
  --page-muted: #596070;
  --page-line: #d2d7dd;
  --bezel: #17181c;
  --bezel-edge: #3b3d44;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page-bg: #0f1013; --page-ink: #eceef2; --page-muted: #9aa1ac; --page-line: #2b2e35; --bezel: #26272d; --bezel-edge: #4a4c55;
  }
}
:root[data-theme="dark"] {
  --page-bg: #0f1013; --page-ink: #eceef2; --page-muted: #9aa1ac; --page-line: #2b2e35; --bezel: #26272d; --bezel-edge: #4a4c55;
}

*, *::before, *::after { box-sizing: inherit; }
[hidden] { display: none !important; }
html { height: 100%; background: var(--page-bg); scroll-padding-top: env(safe-area-inset-top, 0px); -webkit-text-size-adjust: 100%; }
body { height: 100%; margin: 0; overflow: hidden; font-family: var(--font); color: var(--page-ink); background: var(--page-bg); -webkit-font-smoothing: antialiased; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: default; }
img { display: block; max-width: 100%; }
h1, h2, p { margin: 0; }
.sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 2px solid #1f6feb; outline-offset: 2px; }

/* ---------------- stage: phone on desktop, full screen on mobile ---------------- */
.stage { height: 100%; display: flex; align-items: center; justify-content: center; gap: 64px; padding: 20px; }
.device { position: relative; flex: none; width: calc(426px * var(--s, 1)); height: calc(898px * var(--s, 1)); }
.phone {
  position: absolute; left: calc(12px * var(--s, 1)); top: calc(12px * var(--s, 1));
  width: 402px; height: 874px; transform: scale(var(--s, 1)); transform-origin: 0 0;
  overflow: hidden; isolation: isolate; container-type: size;
  border-radius: 46px; background: var(--surface); color: var(--ink);
  box-shadow: 0 0 0 10px var(--bezel), 0 0 0 12px var(--bezel-edge), 0 30px 80px rgba(0, 0, 0, .3);
}
@media (max-width: 959px) { .side { display: none; } }
@media (max-width: 560px) {
  html, body { background: var(--surface); }
  html[data-screen="intro"], html[data-screen="intro"] body { background: var(--brand); }
  .stage { display: block; padding: 0; }
  .device { width: 100%; height: 100%; }
  .phone { position: relative; left: 0; top: 0; width: 100%; height: 100%; transform: none; border-radius: 0; box-shadow: none; }
}

.screen { position: absolute; inset: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; background: var(--surface); }
.screen::-webkit-scrollbar { display: none; }
.screen:focus { outline: none; }
.spacer { height: 110px; }
.spacer.tall { height: 200px; }

/* ---------------- shared bits ---------------- */
.ic { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.ic .fill { fill: currentColor; stroke: none; }

.av { position: relative; flex: none; display: block; width: var(--sz); height: var(--sz); overflow: hidden; }
.av svg, .av img { display: block; width: 100%; height: 100%; image-rendering: pixelated; object-fit: cover; }
.av-round { border-radius: 50%; background: var(--tint); }
.av-body { height: calc(var(--sz) * 1.3125); }
.av-body img { object-fit: contain; }

.nav {
  position: absolute; z-index: 30; left: 10px; right: 10px; bottom: 19px; height: 55px;
  display: flex; align-items: center; justify-content: space-around; padding: 0 12px;
  border-radius: 34px; background: rgba(247, 247, 247, .78);
  -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 8px 32px rgba(0, 0, 0, .12), inset 0 0 0 .5px rgba(255, 255, 255, .8);
}
.nav-btn { position: relative; width: 48px; height: 48px; padding: 0; border: 0; border-radius: 16px; background: none; display: grid; place-items: center; color: #000; }
.nav-btn .ic { width: 35px; height: 35px; stroke-width: 1.75; }
.nav-btn .dot { position: absolute; left: 50%; bottom: -1px; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: #000; opacity: 0; }
.nav-btn.on .dot { opacity: 1; }

.actionbar { position: absolute; z-index: 31; left: 10px; right: 10px; border: 0; display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; color: #000; transition: background .2s, color .2s, transform .12s; }
.actionbar.is-confirm { bottom: 19px; height: 55px; border-radius: 28px; font-size: 20px; background: var(--brand); box-shadow: 0 10px 30px rgba(52, 211, 153, .35); }
.actionbar.is-confirm:disabled { background: #e4e4e4; color: #8f8f8f; box-shadow: none; font-size: 17px; }
.actionbar.is-submit { left: 8px; right: 8px; bottom: 95px; height: 36px; border-radius: 18px; font-size: 16px; background: #e4e4e4; color: #737373; }
.actionbar.is-submit.is-dark { background: #000; color: #fff; }
.actionbar.is-submit.is-ready { background: var(--brand); color: #000; font-size: 20px; box-shadow: 0 10px 30px rgba(52, 211, 153, .35); }
.actionbar:not(:disabled):active { transform: scale(.98); }
.wait-dots { display: inline-flex; gap: 3px; }
.wait-dots i { width: 4px; height: 4px; border-radius: 50%; background: currentColor; animation: blink 1.2s infinite; }
.wait-dots i:nth-child(2) { animation-delay: .2s; }
.wait-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

.toast {
  position: absolute; z-index: 60; left: 50%; top: 92px; max-width: calc(100% - 40px);
  padding: 10px 16px; border-radius: 22px; background: rgba(17, 17, 17, .92); color: #fff;
  font-size: 13px; line-height: 1.35; text-align: center; opacity: 0; pointer-events: none;
  transform: translate(-50%, -8px); transition: opacity .25s, transform .25s;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.toast b { font-weight: 700; }

.icon-btn { position: relative; flex: none; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 12px; background: none; display: grid; place-items: center; color: #000; }
.icon-btn .ic { width: 28px; height: 28px; }
.icon-btn.sm .ic { width: 26px; height: 26px; stroke-width: 1.8; }
.badge { position: absolute; top: 6px; right: 7px; width: 10px; height: 10px; border-radius: 50%; background: #e5484d; box-shadow: 0 0 0 2px #fff; }
.hdr { position: sticky; top: 0; z-index: 10; height: 60px; display: flex; align-items: center; gap: 6px; padding: 0 20px; background: var(--surface); border-bottom: 1px solid var(--line); }
.hdr h1 { flex: 1; font-size: 24px; font-weight: 700; letter-spacing: -.01em; }

.bar { height: 3px; margin: 8px 0 10px; overflow: hidden; border-radius: 2px; background: var(--line); }
.bar i { display: block; height: 100%; border-radius: inherit; background: var(--bar, var(--accent)); transition: width .8s cubic-bezier(.3, 0, .2, 1); }
.bar.thick { height: 4px; }

.tag { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 88px; height: 20px; border-radius: 10px; font-size: 9px; font-weight: 700; white-space: nowrap; }
.tag-best { background: #e3f4e0; color: #276e11; }
.tag-close { background: #e0dafb; color: #5238b0; }
.tag-new { background: var(--fill); color: var(--gray); }

.btn-cta { display: inline-flex; align-items: center; justify-content: center; min-width: 216px; height: 38px; padding: 0 18px; border: 0; border-radius: 19px; background: var(--brand); color: #000; font-size: 15px; font-weight: 700; text-decoration: none; transition: transform .12s, background .15s; }
.btn-cta:not(:disabled):active { transform: scale(.97); background: var(--brand-press); }
.btn-cta:disabled { background: #e6e6e6; color: #9b9b9b; }
.btn-cta.wide { width: 100%; height: 48px; margin-top: 20px; border-radius: 14px; font-size: 16px; }
.btn-brand { height: 52px; border: 0; border-radius: 26px; background: var(--brand); color: #000; font-size: 17px; font-weight: 700; }
.linkish { padding: 6px 8px; border: 0; background: none; color: #000; font-size: 13px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.linkish.small { font-size: 12px; font-weight: 500; color: var(--gray); }
.empty { padding: 40px 30px; text-align: center; font-size: 14px; line-height: 1.45; color: var(--gray); }
.empty.slim { padding: 24px 10px; }

/* photos and placeholders */
.ph { display: block; width: 100%; height: 100%; object-fit: cover; }
.ph-mesh { position: relative; }
.ph-mesh::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 42%, transparent 52%, rgba(0, 0, 0, .18)); pointer-events: none; }
.ph-mesh::after {
  content: ''; position: absolute; inset: 0; opacity: .35; mix-blend-mode: overlay; pointer-events: none; background-size: 160px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 .55'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* tier colors */
.tier-daily { --tc: #1a7daf; --icon: #318ab7; --pill: #e3f4fd; }
.tier-weekly { --tc: #a86e0a; --icon: #b17c22; --pill: #fef4e3; }
.tier-monthly { --tc: #b03a20; --icon: #b84e36; --pill: #fde8e3; }
.tier-custom { --tc: #5238b0; --icon: #634cb8; --pill: #f0ecfd; }

/* ---------------- intro + onboarding ---------------- */
.intro { position: relative; min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 0 70px; background: var(--brand); text-align: center; }
.intro-word { font-size: 40px; font-weight: 700; line-height: 48px; }
.intro-logo { width: 100%; height: min(402px, 46vh); height: min(402px, 46cqh); display: grid; place-items: center; }
.intro-logo .logo, .intro-logo .logo-img { width: auto; height: 100%; max-width: 100%; }
.intro-tag { font-size: 24px; font-weight: 400; line-height: 29px; }
.intro-cta { position: absolute; left: 24px; right: 24px; bottom: 30px; height: 54px; border: 0; border-radius: 27px; background: #000; color: #fff; font-size: 17px; font-weight: 700; }
.intro-cta:active { transform: scale(.98); }

.onb { position: relative; min-height: 100%; display: flex; flex-direction: column; align-items: center; padding: 64px 26px 34px; text-align: center; }
.onb-skip { position: absolute; top: 14px; right: 12px; padding: 8px 10px; border: 0; background: none; color: var(--gray); font-size: 14px; font-weight: 600; }
.onb-art { flex: 1; width: 100%; min-height: 300px; display: grid; place-items: center; }
.onb-dots { display: flex; gap: 6px; margin: 18px 0 20px; }
.onb-dots i { width: 6px; height: 6px; border-radius: 3px; background: #d6d6d6; transition: width .25s; }
.onb-dots i.on { width: 18px; background: #000; }
.onb-title { font-size: 26px; font-weight: 800; letter-spacing: -.015em; }
.onb-body { max-width: 300px; margin: 10px 0 28px; font-size: 15px; line-height: 22px; color: var(--gray); }
.onb-next { width: 100%; }
.art-missions { width: 100%; max-width: 330px; overflow: hidden; border-radius: 16px; box-shadow: 0 12px 40px rgba(0, 0, 0, .1); text-align: left; }
.art-missions .m-row { cursor: default; }
.art-crew { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.art-photo { position: relative; width: 250px; height: 300px; overflow: hidden; border-radius: 22px; box-shadow: 0 12px 40px rgba(0, 0, 0, .14); }
.art-photo .crew .av { margin-left: -20px; }
.art-photo .crew-wait { margin-left: -10px; }
.art-photo .crew > :first-child { margin-left: 0; }
.art-photo .crew-wait { width: 46px; height: 46px; }
.art-chip { padding: 7px 14px; border-radius: 16px; background: var(--fill); color: var(--gray); font-size: 12px; font-weight: 600; }
.art-level { position: relative; width: 100%; max-width: 330px; }
.art-level .fship { margin: 0; text-align: left; cursor: default; }
.art-fill { width: 15%; animation: artfill 1.6s cubic-bezier(.4, 0, .2, 1) .3s both; }
@keyframes artfill { 0% { width: 86%; } 50% { width: 100%; } 51% { width: 0; } 100% { width: 15%; } }
.art-lock { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 14px; color: var(--gray); font-size: 12px; }
.art-lock .ic { width: 14px; height: 14px; stroke-width: 2; }

/* ---------------- home feed ---------------- */
.hdr-home { position: sticky; top: 0; z-index: 10; height: 80px; display: flex; align-items: center; justify-content: space-between; padding: 0 11px 0 20px; background: var(--surface); }
.wordmark { font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.post { padding-bottom: 24px; }
.post-photo { position: relative; height: 503px; overflow: hidden; background: #e8e6e1; }
.owner { position: absolute; top: 11px; right: 11px; height: 20px; padding: 0 13px; display: flex; align-items: center; border-radius: 19px; background: #000; color: #fff; font-size: 10px; font-weight: 700; }
.shots { position: absolute; left: 16px; top: 86px; display: flex; flex-direction: column; gap: 10px; }
.shot { position: relative; width: 100px; height: 126px; margin: 0; overflow: hidden; border: 2px solid #000; border-radius: 18px; background: #ddd; }
.shot figcaption { position: absolute; left: 0; right: 0; top: 0; height: 20px; display: grid; place-items: center; background: #000; color: #fff; font-size: 10px; font-weight: 700; }
.post-meta { display: flex; align-items: center; min-height: 50px; margin: 24px 16px 0 18px; }
.stack { display: flex; flex: none; }
.stack .av { margin-left: -25px; box-shadow: 0 0 0 2px #fff; }
.stack .av:first-child { margin-left: 0; }
.post-names { flex: 1; min-width: 0; margin-left: 9px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 14px; font-weight: 700; }
.pin-sm { width: 14px; height: 14px; vertical-align: -2px; stroke-width: 2.2; color: var(--gray); }
.pill { display: flex; align-items: center; gap: 7px; height: 30px; margin: 10px 16px 0 18px; padding: 0 15px; border-radius: 50px; background: var(--icon); color: #fff; font-size: 15px; font-weight: 700; }
.pill-xp { margin-left: auto; }
.cmts { margin: 7px 19px 0; font-size: 15px; line-height: 22px; }
.cmts b { font-weight: 700; }
.see-more { padding: 0; border: 0; background: none; color: #8a8a8a; font-size: 15px; font-style: italic; line-height: 22px; }

/* ---------------- missions ---------------- */
.tier-head { display: flex; align-items: center; justify-content: space-between; padding: 13px 12px 7px 14px; }
.tier-pill { display: inline-flex; align-items: center; height: 21px; padding: 0 10px; border-radius: 20px; background: var(--pill); color: var(--tc); font-size: 11px; font-weight: 700; }
.tier-count { color: var(--hint); font-size: 11px; }
.m-row { position: relative; display: flex; align-items: center; gap: 10px; height: 58px; padding: 0 5px 0 14px; background: var(--row); border-bottom: 1px solid var(--line); cursor: pointer; }
.m-row::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--tc); }
.m-row:active { background: #efefef; }
.m-icon { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 8px; background: var(--icon); font-size: 18px; }
.m-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.m-name { font-size: 13px; font-weight: 700; line-height: 16px; }
.m-desc { margin-top: 2px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--gray); font-size: 11px; line-height: 14px; }
.m-xp { flex: none; min-width: 50px; padding-right: 5px; text-align: right; white-space: nowrap; color: var(--tc); font-size: 12px; font-weight: 700; }
.m-xp em { font-style: normal; }
.m-xp small { display: block; color: var(--hint); font-size: 10.5px; font-weight: 400; }
.m-row.is-done { background: #fbfbfb; }
.m-row.is-done .m-icon, .m-row.is-done .m-text { opacity: .45; }
.custom-foot { display: flex; align-items: center; width: 100%; height: 48px; padding: 0 20px; border: 0; background: #f5f2ff; color: var(--tc); font-size: 12px; font-weight: 500; text-align: left; }
.custom-foot.is-off { background: var(--row); color: var(--hint); }

/* ---------------- modal + sheets ---------------- */
.layer { position: absolute; inset: 0; z-index: 50; background: rgba(0, 0, 0, 0); transition: background .2s; }
.layer.on { background: rgba(0, 0, 0, .36); }
.layer-card { position: absolute; background: var(--surface); color: var(--ink); opacity: 0; outline: none; transition: opacity .2s, transform .28s cubic-bezier(.2, .8, .2, 1); }
.layer.is-modal .layer-card { left: 50%; top: 50%; width: 315px; padding: 31px 20px 27px; border-radius: 38px; text-align: center; box-shadow: 0 4px 24px rgba(0, 0, 0, .25); transform: translate(-50%, -46%) scale(.96); }
.layer.is-modal.on .layer-card { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.layer.is-sheet .layer-card { left: 0; right: 0; bottom: 0; max-height: 88%; overflow-y: auto; padding: 10px 20px 32px; border-radius: 28px 28px 0 0; transform: translateY(30px); }
.layer.is-sheet.on .layer-card { opacity: 1; transform: none; }
.sheet-grab { width: 38px; height: 5px; margin: 0 auto 16px; border-radius: 3px; background: #d8d8d8; }
.sheet-title { font-size: 20px; font-weight: 700; }
.sheet-sub { margin-top: 4px; color: var(--gray); font-size: 13px; line-height: 18px; }
.sheet-foot { margin-top: 14px; color: var(--hint); font-size: 12px; text-align: center; }

.mm-icon { width: 90px; height: 90px; margin: 0 auto 12px; display: grid; place-items: center; border-radius: 18px; background: var(--icon); font-size: 46px; }
.mm h2 { font-size: 24px; font-weight: 700; letter-spacing: -.01em; }
.mm p { margin-top: 6px; color: var(--gray); font-size: 14px; }
.mm-xp { margin: 18px 0 22px; font-size: 32px; font-weight: 700; }
.mm-xp small { color: var(--gray); font-size: 14px; font-weight: 600; }
.mm .mm-note { margin-top: 10px; color: var(--hint); font-size: 12px; }

/* ---------------- friends ---------------- */
.fr-head { position: sticky; top: 0; z-index: 10; padding: 16px 20px 8px; background: var(--surface); border-bottom: 1px solid var(--line); }
.fr-top { display: flex; align-items: center; gap: 6px; height: 30px; margin-bottom: 8px; }
.fr-top h1 { flex: 1; font-size: 24px; font-weight: 700; letter-spacing: -.01em; }
.fr-top .back, .hdr .back { margin-left: -10px; }
.toggle { flex: none; display: flex; width: 90px; height: 30px; padding: 2px; border-radius: 15px; background: var(--fill); }
.tg { flex: 1; height: 26px; padding: 0; border: 0; border-radius: 13px; background: none; display: grid; place-items: center; }
.tg.on { background: var(--brand); }
.ic-grid { display: grid; grid-template-columns: 5px 5px; gap: 3px; }
.ic-list { display: grid; gap: 2px; }
.ic-grid i, .ic-list i { display: block; border-radius: 1px; background: var(--gray); }
.ic-grid i { width: 5px; height: 5px; }
.ic-list i { width: 14px; height: 3px; }
.tg.on i { background: #fff; }
.search { display: flex; align-items: center; height: 34px; padding: 0 16px; border-radius: 17px; background: var(--fill); }
.search:focus-within { box-shadow: 0 0 0 2px #1f6feb; }
.search input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: none; background: none; color: #000; font-size: 12px; }
.search input::placeholder { color: var(--gray); }
.note { margin: 11px 20px 0; color: var(--gray); font-size: 12px; text-align: center; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px 4px; padding: 11px 8px 0; }
.fcard { position: relative; height: 130px; padding-top: 12px; display: flex; flex-direction: column; align-items: center; border-radius: 10px; background: var(--fill); cursor: pointer; }
.fcard .av { margin-bottom: 4px; }
.fcard .fname { font-size: 11px; font-weight: 700; line-height: 14px; }
.fcard .flvl { color: var(--gray); font-size: 10px; line-height: 13px; }
.fcard .tag { position: absolute; left: 8px; right: 8px; bottom: 6px; width: auto; }
.tick { position: absolute; top: 6px; right: 6px; width: 20px; height: 20px; display: grid; place-items: center; border: 1.5px solid #7a7a7a; border-radius: 50%; background: transparent; }
.tick .ic { width: 12px; height: 12px; stroke-width: 3; color: #000; opacity: 0; }
.tick.on { border-color: var(--brand); background: var(--brand); }
.tick.on .ic { opacity: 1; }
.frow { position: relative; padding: 10px 14px 0; cursor: pointer; }
.frow::after { content: ''; position: absolute; left: 14px; right: 14px; bottom: 0; height: 1px; background: var(--line); }
.frow-main { display: flex; align-items: center; gap: 10px; height: 40px; }
.frow .tick { position: static; }
.frow-id { flex: none; width: 51px; min-width: 0; display: flex; flex-direction: column; }
.frow .fname { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 13px; font-weight: 700; line-height: 16px; }
.fsub { color: var(--gray); font-size: 10px; white-space: nowrap; }
.frow-lv { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; }
.frow-lv b { color: var(--accent); font-size: 14px; }
.frow-lv small { color: var(--gray); font-size: 9px; }
.frow .bar { margin: 8px 0 10px; }

.fs { display: flex; flex-direction: column; align-items: center; text-align: center; }
.fs-pair { display: flex; margin-bottom: 12px; }
.fs-pair .av { box-shadow: 0 0 0 3px #fff; }
.fs-pair .av + .av { margin-left: -14px; }
.fs h2 { margin-bottom: 8px; font-size: 20px; font-weight: 700; }
.fs-lv { display: flex; justify-content: space-between; align-items: baseline; width: 100%; margin-top: 18px; }
.fs-lv b { color: var(--accent); font-size: 16px; }
.fs-lv span { color: var(--gray); font-size: 12px; }
.fs .bar { width: 100%; margin: 8px 0 0; }
.fs-stats { display: flex; width: 100%; margin-top: 18px; border-radius: 12px; background: var(--fill); }
.fs-stats div { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 4px; }
.fs-stats b { font-size: 16px; }
.fs-stats span { color: var(--gray); font-size: 11px; }
.fs-private { display: flex; align-items: center; gap: 6px; margin-top: 14px; color: var(--gray); font-size: 12px; }
.fs-private .ic { width: 15px; height: 15px; stroke-width: 2; }

/* ---------------- post ---------------- */
.post-top { position: sticky; top: 0; z-index: 6; height: 100px; margin-bottom: -39px; display: flex; align-items: flex-start; justify-content: space-between; padding: 58px 20px 0; background: var(--surface); }
.pt-text { display: flex; flex-direction: column; font-size: 12px; line-height: 15px; }
.pt-xp { margin-top: 4px; font-size: 16px; }
.canvas { position: relative; height: 503px; overflow: hidden; background: #d9d9d9; }
.slides { display: flex; height: 100%; touch-action: pan-y; transition: transform .32s cubic-bezier(.3, .7, .3, 1); }
.slide { position: relative; flex: 0 0 100%; height: 100%; }
.who { position: absolute; top: 52px; right: 12px; height: 22px; padding: 0 11px; display: flex; align-items: center; border-radius: 11px; background: rgba(0, 0, 0, .6); color: #fff; font-size: 11px; font-weight: 700; }
.addphoto { position: absolute; inset: 39px 0 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding-bottom: 50px; }
.addphoto-btn { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 16px; border: 0; background: none; color: #2a2a2a; }
.addphoto-btn .ring { width: 78px; height: 78px; margin-bottom: 8px; display: grid; place-items: center; border: 2px dashed #9e9e9e; border-radius: 50%; color: #6b6b6b; }
.addphoto-btn .ring .ic { width: 32px; height: 32px; }
.addphoto-btn b { font-size: 16px; }
.addphoto-btn span { color: #6b6b6b; font-size: 12px; }
.crew { position: absolute; left: 14px; bottom: 8px; z-index: 2; display: flex; }
.crew .av { margin-left: -25px; }
.crew-wait { margin-left: -13px; }
.crew .av, .crew-wait { box-shadow: 0 0 0 2px #fff; }
.crew > :first-child { margin-left: 0; }
.crew-wait { flex: none; width: 50px; height: 50px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, .92); color: #8a8a8a; font-size: 30px; font-weight: 300; line-height: 1; }
.loc { position: absolute; right: 14px; bottom: 8px; z-index: 2; width: 50px; height: 50px; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center; background: #676767; color: #fff; transition: background .15s, color .15s; }
.loc .ic { width: 28px; height: 28px; }
.loc.on { background: var(--brand); color: #000; }
.under { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 26px; margin: 8px 8px 0; }
.under > :last-child { justify-self: end; }
.dots { display: flex; gap: 3px; }
.dots button { width: 10px; height: 10px; padding: 0; border: 0; border-radius: 50%; background: #767676; }
.dots button.on { background: var(--brand); }
.caption { display: block; margin: 4px 14px 0; }
.caption input { width: 100%; height: 34px; padding: 0; border: 0; outline: none; background: none; color: #000; font-size: 20px; font-weight: 700; }
.caption input::placeholder { color: #b8b8b8; }
.empty-post { display: flex; flex-direction: column; align-items: center; padding: 96px 36px 0; text-align: center; }
.ep-art { width: 84px; height: 84px; display: grid; place-items: center; border-radius: 24px; background: var(--fill); }
.ep-art .ic { width: 44px; height: 44px; }
.empty-post h2 { margin: 18px 0 6px; font-size: 20px; }
.empty-post p { margin-bottom: 22px; color: var(--gray); font-size: 14px; line-height: 1.45; }

/* ---------------- mission summary ---------------- */
.sum-hero { height: 472px; background: #d9d9d9; }
.sum-sheet { position: relative; margin-top: -38px; padding: 21px 20px 40px; border-radius: 30px 30px 0 0; background: var(--surface); }
.sum-badge { width: max-content; max-width: 100%; height: 28px; margin: 0 auto; padding: 0 16px 0 10px; display: flex; align-items: center; gap: 8px; border-radius: 14px; background: var(--pill); color: var(--tc); font-size: 12px; font-weight: 700; }
.sum-badge span { font-size: 14px; }
.sum-crew { display: flex; justify-content: center; gap: 4px; margin-top: 14px; }
.sum-with { margin-top: 9px; color: var(--gray); font-size: 12px; text-align: center; }
.sum-sheet hr { height: 1px; margin: 22px 0 16px; border: 0; background: #e6e6e6; }
.sum-top { display: flex; align-items: center; gap: 6px; }
.sum-id { display: flex; flex-direction: column; }
.sum-name { display: flex; align-items: center; gap: 6px; }
.sum-name b { font-size: 12px; }
.gain { color: var(--accent); font-size: 10px; font-weight: 700; }
.sum-lv { color: var(--gray); font-size: 10px; }
.sum-prog { margin-left: auto; color: var(--accent); font-size: 10px; font-weight: 700; }
.sum-row .bar { margin: 6px 0 14px; }
.lvlup { position: relative; display: inline-flex; align-items: center; height: 16px; padding: 0 6px; border-radius: 8px; background: #000; color: #ffd84d; font-size: 8.5px; font-weight: 800; letter-spacing: .08em; opacity: 0; transform: scale(.5); }
.is-leveled .lvlup, .lvlup.is-on { animation: pop .45s cubic-bezier(.3, 1.6, .5, 1) forwards; }
@keyframes pop { to { opacity: 1; transform: none; } }
.burst { position: absolute; left: 50%; top: 50%; pointer-events: none; }
.burst i { position: absolute; width: 4px; height: 4px; background: var(--c); opacity: 0; }
.is-leveled .burst i { animation: burst .7s ease-out .1s forwards; }
@keyframes burst { 0% { opacity: 1; transform: translate(0, 0); } 100% { opacity: 0; transform: translate(var(--x), var(--y)); } }
.art-level .lvlup { position: absolute; top: -30px; right: 6px; height: 20px; padding: 0 8px; font-size: 10px; animation-delay: 1.1s; }
.streak { height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 10px; background: #fef4e3; color: #a86e0a; font-size: 12px; font-weight: 700; }
.btn-big { position: sticky; bottom: 20px; z-index: 3; box-shadow: 0 10px 30px rgba(52, 211, 153, .35); display: block; width: 100%; height: 48px; margin-top: 28px; border: 0; border-radius: 14px; background: var(--brand); color: #000; font-size: 16px; font-weight: 700; }
.btn-big:active { transform: scale(.99); }

/* ---------------- profile ---------------- */
.pf-top { display: flex; justify-content: space-between; padding: 16px 16px 0; }
.sq-btn { width: 30px; height: 30px; padding: 0; border: 0; border-radius: 8px; display: grid; place-items: center; background: var(--fill); color: var(--gray); }
.sq-btn .ic { width: 18px; height: 18px; stroke-width: 2.2; }
.pf-hero { display: flex; flex-direction: column; align-items: center; margin-top: 18px; }
.pf-frame { position: relative; width: 80px; height: 96px; padding: 0; border: 0; border-radius: 16px; display: grid; place-items: center; background: #e3f4e0; }
.pf-edit { position: absolute; right: -4px; bottom: -4px; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: #fff; box-shadow: 0 0 4px rgba(0, 0, 0, .25); color: var(--accent); font-size: 10px; }
.pf-edit .ic { width: 12px; height: 12px; stroke-width: 2.4; }
.pf-name { margin-top: 10px; font-size: 16px; font-weight: 700; }
.pf-arch { height: 26px; margin-top: 5px; padding: 0 18px; display: inline-flex; align-items: center; border-radius: 13px; background: #e3f4e0; color: #276e11; font-size: 11px; font-weight: 700; }
.stats { display: flex; margin-top: 12px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats div { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; padding: 13px 0 11px; }
.stats div + div::before { content: ''; position: absolute; left: 0; top: 13px; width: 1px; height: 40px; background: var(--line); }
.stats b { font-size: 20px; line-height: 24px; }
.stats span { color: var(--gray); font-size: 10px; }
.sec { margin: 14px 20px 13px; color: var(--gray); font-size: 12px; font-weight: 700; }
.sec-row { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; border-top: 1px solid var(--line); }
.see-link { margin-right: 10px; padding: 6px; border: 0; background: none; color: var(--accent); font-size: 12px; }
.fship { margin: 0 10px 8px; padding: 8px 10px 6px; border-radius: 10px; background: var(--fill); cursor: pointer; }
.fship-top { display: flex; align-items: center; gap: 12px; }
.fship-id { min-width: 0; display: flex; flex-direction: column; }
.fship-id b { font-size: 13px; line-height: 16px; }
.fship-id span { color: var(--gray); font-size: 10px; }
.fship-lv { align-self: flex-start; margin-left: auto; color: var(--accent); font-size: 14px; }
.fship .bar { margin: 8px 0 1px; }
.fship-amt { display: block; color: var(--gray); font-size: 9px; }
.mems { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.mem { height: 165px; overflow: hidden; background: #e6e3de; }
.mems.all { margin-top: 14px; overflow: hidden; border-radius: 12px; }
.mems.all .mem { height: 150px; }

/* ---------------- activity ---------------- */
.hdr-activity { justify-content: space-between; padding-left: 10px; border-bottom: 0; }
.hdr-activity h1 { flex: none; letter-spacing: .01em; }
.hdr-activity .back { margin-left: 0; }
.act { display: flex; align-items: center; gap: 14px; min-height: 82px; padding: 5px 14px 5px 21px; }
.act-txt { flex: 1; min-width: 0; }
.act-txt p { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 15px; line-height: 19px; }
.act-txt .act-sub { color: var(--hint); font-size: 13px; }
.act-sub .xp { color: var(--accent); font-weight: 700; }
.act-th { flex: none; width: 57px; height: 71px; overflow: hidden; border-radius: 4px; background: #e6e3de; }
.act.is-new { background: #f1fbf6; }

/* ---------------- sheet contents ---------------- */
.cm-list { max-height: 46vh; max-height: 46cqh; margin: 14px -4px 0; padding: 0 4px; overflow-y: auto; }
.cm { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; }
.cm p { padding-top: 5px; font-size: 14px; line-height: 20px; }
.cm-form { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.cm-form input { flex: 1; min-width: 0; height: 38px; padding: 0 14px; border: 0; border-radius: 19px; outline: none; background: var(--fill); font-size: 14px; }
.cm-send { padding: 8px 4px; border: 0; background: none; color: var(--accent); font-size: 14px; font-weight: 700; }
.emoji-row { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; margin-top: 16px; }
.emoji-row button { aspect-ratio: 1; padding: 0; border: 0; border-radius: 10px; background: var(--fill); font-size: 20px; }
.emoji-row button.on { background: #f0ecfd; box-shadow: inset 0 0 0 2px #634cb8; }
.field { display: block; margin-top: 14px; }
.field > span { display: block; margin-bottom: 6px; color: var(--gray); font-size: 12px; font-weight: 600; }
.field input { width: 100%; height: 42px; padding: 0 14px; border: 0; border-radius: 12px; outline: none; background: var(--fill); font-size: 15px; }
.field input:focus { box-shadow: inset 0 0 0 2px #634cb8; }
.seg-wide { display: flex; gap: 6px; }
.seg-wide button { flex: 1; height: 38px; border: 0; border-radius: 12px; background: var(--fill); color: var(--gray); font-size: 14px; font-weight: 700; }
.seg-wide button.on { background: #f0ecfd; color: #5238b0; box-shadow: inset 0 0 0 2px #634cb8; }
.menu { display: flex; flex-direction: column; margin-top: 12px; overflow: hidden; border-radius: 14px; background: var(--fill); }
.menu button { height: 50px; padding: 0 16px; border: 0; background: none; font-size: 15px; font-weight: 600; text-align: left; }
.menu button + button { border-top: 1px solid var(--line); }
.menu .danger { color: #c4342d; }
.about { display: flex; flex-direction: column; align-items: center; text-align: center; }
.about-mark { width: 84px; height: 84px; padding: 12px; border-radius: 22px; background: var(--brand); }
.about-mark .logo, .about-mark .logo-img { display: block; width: 100%; height: 100%; }
.about h2 { margin-top: 12px; font-size: 20px; }
.about p { margin-top: 8px; color: #333; font-size: 14px; line-height: 1.5; }
.about .about-by { color: var(--gray); font-size: 13px; }
.af { display: flex; flex-direction: column; align-items: center; text-align: center; }
.af-art { display: flex; align-items: center; gap: 14px; margin: 6px 0 16px; }
.af-phone { width: 72px; height: 112px; display: grid; place-items: center; border-radius: 16px; background: var(--fill); box-shadow: inset 0 0 0 3px #1a1a1a; }
.af-q { color: #b0b0b0; font-size: 28px; font-weight: 700; }
.af-pulse { display: flex; gap: 5px; }
.af-pulse i { width: 7px; height: 7px; border-radius: 50%; background: #cfcfcf; }
.af-art.is-tapping .af-pulse i { background: var(--brand); animation: blink 1s infinite; }
.af-art.is-tapping .af-pulse i:nth-child(2) { animation-delay: .15s; }
.af-art.is-tapping .af-pulse i:nth-child(3) { animation-delay: .3s; }
.af h2 { font-size: 20px; }
.af p { margin-top: 6px; color: var(--gray); font-size: 14px; line-height: 1.45; }
.af .af-done { color: #276e11; font-weight: 600; }
.look-preview { width: 110px; height: 130px; margin: 14px auto 4px; display: grid; place-items: center; border-radius: 18px; background: #e3f4e0; }
.look-row { margin-top: 14px; }
.look-row > span { display: block; margin-bottom: 8px; color: var(--gray); font-size: 12px; font-weight: 600; }
.swatches { display: flex; gap: 10px; }
.sw { width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.sw.on { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #000; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { height: 32px; padding: 0 12px; border: 0; border-radius: 16px; background: var(--fill); color: #333; font-size: 13px; font-weight: 600; }
.chips button.on { background: #000; color: #fff; }

/* ---------------- desktop side panel ---------------- */
.side { flex: none; width: 300px; color: var(--page-ink); }
.side-brand { display: flex; align-items: center; gap: 12px; }
.side-mark { width: 46px; height: 46px; padding: 7px; border-radius: 13px; background: var(--brand); }
.side-mark .logo { display: block; width: 100%; height: 100%; }
.side-name { font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.side-tag { margin: 14px 0 28px; color: var(--page-muted); font-size: 16px; line-height: 24px; }
.side h2 { margin-bottom: 12px; font-size: 14px; font-weight: 700; }
.steps { margin: 0 0 26px; padding: 0; list-style: none; counter-reset: step; }
.steps li { position: relative; padding: 0 0 12px 32px; color: var(--page-muted); font-size: 14px; line-height: 20px; counter-increment: step; }
.steps li b { color: var(--page-ink); font-weight: 600; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: var(--page-ink); color: var(--page-bg); font-size: 11px; font-weight: 700; }
.qr-block { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; padding: 14px; border: 1px solid var(--page-line); border-radius: 16px; }
.qr { flex: none; width: 86px; height: 86px; padding: 7px; border-radius: 10px; background: #fff; }
.qr svg { display: block; width: 100%; height: 100%; }
.qr-block p { color: var(--page-muted); font-size: 13px; line-height: 19px; }
.qr-block b { display: block; margin-bottom: 2px; color: var(--page-ink); font-size: 14px; }
.side-links { display: flex; gap: 18px; }
.side-links a, .side-links button { padding: 0; border: 0; background: none; color: var(--page-muted); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.side-credit { margin-top: 16px; color: var(--page-muted); font-size: 12px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
