@font-face {
  font-family: "Pretendard Variable";
  font-style: normal;
  font-weight: 45 920;
  font-display: swap;
  src: url("./vendor/fonts/PretendardVariable.woff2") format("woff2-variations"),
       url("./vendor/fonts/PretendardVariable.woff2") format("woff2");
}

/* VFZ V4 — unified design tokens (single source of truth, 2026-07-01).
   Replaces 6 duplicate :root blocks that had drifted (brand teal had
   accidentally converged with blue; see memory vfzcoin-deploy-pipeline). */
:root {
  color-scheme: light;

  /* ── FONTS (Pretendard stack for Korean coverage; SF Pro Display/Text on Apple) ── */
  --font-display: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", system-ui, sans-serif;
  --font-text:    "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "SF Pro Text",    "Helvetica Neue", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;

  /* ── SURFACES (warm iOS canvas) ── */
  --surface-canvas:      #F2F2F7;                       /* page background */
  --surface-elevated:    #FFFFFF;                       /* grouped list cards */
  --surface-secondary:   #F9F9FB;                       /* inset rows, skeleton base */
  --surface-tertiary:    #EFEFF4;                       /* pressed state */
  --surface-chrome:      rgba(242, 242, 247, 0.82);     /* nav + tab bar backdrop */
  --surface-chrome-blur: saturate(180%) blur(20px);
  --surface-overlay:     rgba(0, 0, 0, 0.32);           /* sheet/modal scrim */
  --surface-sheet:       #FFFFFF;

  /* ── TEXT (iOS label hierarchy) ── */
  --text-primary:    #000000;
  --text-secondary:  rgba(60, 60, 67, 0.60);
  --text-tertiary:   rgba(60, 60, 67, 0.30);
  --text-quaternary: rgba(60, 60, 67, 0.18);
  --text-inverse:    #FFFFFF;
  --text-link:       #00B789;
  --text-link-aa:    #007A5C;          /* 5.1:1 on white, WCAG AA */
  --text-disabled:   #57595E;          /* 5.4:1 on white */

  /* ── BRAND (rationed — ≤ 2 beats per screen) ── */
  --brand-cyan:        #00B789;
  --brand-cyan-press:  #009974;
  --brand-cyan-bg-soft: rgba(0, 183, 137, 0.10);
  --brand-cyan-ring:   rgba(0, 183, 137, 0.32);

  /* ── SEMANTIC (iOS system colors) ── */
  --green:          #34C759;                    /* positive amounts, success */
  --green-bg-soft:  rgba(52, 199, 89, 0.12);
  --red:            #FF3B30;                    /* destructive, error */
  --red-bg-soft:    rgba(255, 59, 48, 0.10);
  --orange:         #FF9500;                    /* warning, pending */
  --orange-bg-soft: rgba(255, 149, 0, 0.12);
  --blue:           #0A84FF;                    /* neutral info */
  --indigo:         #5856D6;                    /* admin-gated cluster accent */
  --gray:           #8E8E93;

  /* ── HAIRLINES (Geist-grafted discipline) ── */
  --hairline:        rgba(60, 60, 67, 0.18);
  --hairline-strong: rgba(60, 60, 67, 0.29);
  --hairline-soft:   rgba(60, 60, 67, 0.10);
  --hairline-w:      0.5px;

  /* ── SHADOWS (multilayer — never single heavy shadow) ── */
  --shadow-card:       0 0 0 0.5px rgba(60, 60, 67, 0.10), 0 1px 2px rgba(60, 60, 67, 0.04), 0 8px 24px rgba(60, 60, 67, 0.06);
  --shadow-card-hover: 0 0 0 0.5px rgba(60, 60, 67, 0.14), 0 2px 4px rgba(60, 60, 67, 0.06), 0 12px 32px rgba(60, 60, 67, 0.08);
  --shadow-sheet:      0 -0.5px 0 rgba(60, 60, 67, 0.18), 0 -8px 32px rgba(0, 0, 0, 0.12);
  --shadow-toast:      0 0 0 0.5px rgba(60, 60, 67, 0.14), 0 8px 24px rgba(0, 0, 0, 0.16);
  --shadow-pill:       0 1px 1px rgba(0, 153, 116, 0.18), 0 0 0 0.5px rgba(0, 153, 116, 0.32);
  --shadow-chrome-top: inset 0 -0.5px 0 var(--hairline);
  --shadow-chrome-bottom: inset 0 0.5px 0 var(--hairline);
  /* legacy aliases */
  --shadow-xs:   0 1px 2px rgba(0, 0, 0, 0.045);
  --shadow:      0 0 0 0.5px rgba(60, 60, 67, 0.10), 0 1px 2px rgba(60, 60, 67, 0.04), 0 8px 24px rgba(60, 60, 67, 0.06);
  --shadow-lift: 0 0 0 0.5px rgba(60, 60, 67, 0.14), 0 2px 4px rgba(60, 60, 67, 0.06), 0 12px 32px rgba(60, 60, 67, 0.08);

  /* ── RADIUS (iOS continuous corners) ── */
  --r-xs:   6px;
  --r-sm:   10px;
  --r-md:   14px;
  --r-lg:   18px;   /* grouped list card */
  --r-xl:   22px;   /* balance card, sheet top */
  --r-2xl:  28px;
  --r-pill: 999px;
  --r-sheet: 14px 14px 0 0;
  --r-sheet-corner: 22px;
  /* legacy aliases */
  --radius:    8px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 22px;
  --polish-card-radius: 8px;

  /* ── SPACING (4pt grid) ── */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;   /* iOS standard inset */
  --s-5: 20px;
  --s-6: 24px;
  --s-7: 32px;
  --s-8: 40px;
  --s-9: 48px;
  --s-10: 64px;
  --inset-page: 16px;
  --inset-row:  16px;
  --gap-row:    12px;
  --gap-group:  24px;

  /* ── TYPOGRAPHY LADDER (Pretendard sizes/weights/tracking; not SF family) ── */
  --t-hero-size:    36px;   --t-hero-weight:    700;  --t-hero-track:    -0.04em; --t-hero-line:    1.05;
  --t-large-size:   28px;   --t-large-weight:   700;  --t-large-track:   -0.03em; --t-large-line:   1.10;
  --t-title-size:   22px;   --t-title-weight:   600;  --t-title-track:   -0.02em; --t-title-line:   1.18;
  --t-headline-size:17px;   --t-headline-weight:600;  --t-headline-track:-0.015em;--t-headline-line:1.29;
  --t-body-size:    17px;   --t-body-weight:    400;  --t-body-track:    -0.01em; --t-body-line:    1.41;
  --t-callout-size: 16px;   --t-callout-weight: 400;  --t-callout-track: -0.01em;
  --t-subhead-size: 15px;   --t-subhead-weight: 400;  --t-subhead-track: -0.005em;--t-subhead-line: 1.33;
  --t-footnote-size:13px;   --t-footnote-weight:400;  --t-footnote-track:0;       --t-footnote-line:1.38;
  --t-caption-size: 12px;   --t-caption-weight: 400;  --t-caption-track: 0;       --t-caption-line: 1.33;
  --t-section-size: 13px;   --t-section-weight: 400;  --t-section-track: 0.02em;  --t-section-transform: uppercase;

  /* ── MOTION ── */
  --ease-ios:        cubic-bezier(0.32, 0.72, 0, 1);   /* sheet spring */
  --ease-standard:   cubic-bezier(0.4,  0.0,  0.2, 1);
  --ease-emphasized: cubic-bezier(0.2,  0.0,  0,   1);
  --ease-decelerate: cubic-bezier(0,    0,    0.2, 1);
  --ease-out:        cubic-bezier(0.16, 1, 0.3, 1);    /* legacy alias */

  --d-instant:    80ms;
  --d-fast:      160ms;
  --d-base:      240ms;
  --d-sheet:     280ms;
  --d-modal:     320ms;
  --d-deliberate:420ms;

  /* ── A11Y / TARGETS ── */
  --touch-min:  44px;    /* WCAG 2.5.5 */
  --focus-ring: 0 0 0 3px var(--brand-cyan-ring);
  --focus-ring-opaque: 0 0 0 2px #FFFFFF, 0 0 0 4px #00B789;

  /* ── LAYOUT ── */
  --max-w-app:   420px;
  --chrome-top-h: 56px;
  --tabbar-h:    64px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --header-h:    68px;
  --nav-h:       72px;

  /* ── LEGACY SURFACE / COLOR ALIASES (keep existing var names working) ── */
  --bg:           var(--surface-canvas);
  --surface:      var(--surface-elevated);
  --surface-soft: var(--surface-secondary);
  --surface-strong: var(--surface-tertiary);
  --ink:          var(--text-primary);
  --muted:        var(--text-secondary);
  --faint:        rgba(60, 60, 67, 0.30);
  --line:         var(--hairline);
  --line-strong:  var(--hairline-strong);
  --teal:         var(--brand-cyan);
  --teal-dark:    var(--brand-cyan-press);
  --teal-soft:    var(--brand-cyan-bg-soft);
  --amber:        var(--orange);

  font-family: var(--font-text);
}

[hidden] {
  display: none !important;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--surface-canvas, #F2F2F7);
  color: var(--text-primary, #000000);
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "tnum", "ss01";
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  min-height: 100vh;
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom));
  overflow-x: hidden;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px clamp(16px, 3vw, 36px);
  background: var(--surface-chrome, rgba(242, 242, 247, 0.82));
  box-shadow: var(--shadow-chrome-top, inset 0 -0.5px 0 rgba(60, 60, 67, 0.18));
  backdrop-filter: var(--surface-chrome-blur, saturate(180%) blur(20px));
  -webkit-backdrop-filter: var(--surface-chrome-blur, saturate(180%) blur(20px));
}

.app-header::after {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 34%;
  height: 2px;
  content: "";
  background: linear-gradient(90deg, transparent, var(--brand-cyan, #00B789), transparent);
  opacity: 0;          /* permanently hidden — V5 header has no animated stripe */
  transform: translateX(-40%);
  pointer-events: none;
}

.app-shell[data-syncing="true"] .app-header::after {
  opacity: 0;   /* stripe permanently off in V5; selector kept for JS compatibility */
  animation: syncBar 1.1s var(--ease-standard) infinite both;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}

.brand-text {
  display: grid;
  line-height: 1.08;
}

.brand-text strong {
  font-size: 16px;
  letter-spacing: 0;
}

.brand-text span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.profile-button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  max-width: 260px;
  height: 42px;
  padding: 4px 10px 4px 5px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.84);
  color: var(--ink);
}

.avatar-mini,
.avatar {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  color: white;
  background: linear-gradient(135deg, var(--teal), var(--blue));
  font-weight: 800;
}

.avatar-mini {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  font-size: 13px;
}

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  font-size: 14px;
}

.profile-copy {
  display: grid;
  min-width: 0;
  text-align: left;
  line-height: 1.15;
}

.profile-copy strong,
.profile-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-copy strong {
  font-size: 13px;
}

.profile-copy span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.view-stack {
  width: min(1240px, 100%);
  margin: 0 auto;
  padding: clamp(14px, 2.4vw, 26px) clamp(12px, 2.4vw, 28px)
           calc(var(--nav-h) + 34px + env(safe-area-inset-bottom));
}

.view {
  display: none;
}

.view.is-active {
  display: block;
  opacity: 1;
  transform: none;
  animation: viewIn 240ms var(--ease-out) both;
}

.account-panel,
.home-section,
.placeholder-view,
.messenger-shell,
.wallet-panel,
.apps-panel,
.hunt-panel,
.module-panel {
  background: #FFFFFF;
  border: none;
  border-radius: 18px;
  box-shadow: 0 0 0 0.5px rgba(60,60,67,0.10), 0 1px 2px rgba(60,60,67,0.04), 0 8px 24px rgba(60,60,67,0.06);
  overflow: hidden;
}

.account-panel {
  position: relative;
  overflow: hidden;
  padding: 20px;
  background: #FFFFFF;
}

.home-section {
  padding: 0;
  background: transparent;
}

.messenger-summary {
  min-height: 272px;
}

.activity-section,
.service-section {
  grid-column: 1 / -1;
}

.section-kicker {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 8px 16px 4px;
}

.account-line,
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 0 4px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  margin-top: 4px;
  font-size: 36px;
  line-height: 1.02;
  letter-spacing: 0;
}

h2 {
  margin-top: 2px;
  font-size: 20px;
  line-height: 1.15;
  letter-spacing: 0;
}

.account-line p {
  margin-top: 2px;
  color: rgba(60, 60, 67, 0.60);
  font-size: 13px;
  font-weight: 400;
  overflow-wrap: anywhere;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid rgba(0, 183, 137, 0.24);
  border-radius: 999px;
  color: var(--teal-dark);
  background: rgba(0, 183, 137, 0.08);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.status-pill::before {
  width: 6px;
  height: 6px;
  content: "";
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(21, 128, 61, 0.12);
}

.app-shell[data-syncing="true"] .status-pill::before {
  background: var(--amber);
  box-shadow: 0 0 0 3px rgba(183, 121, 31, 0.16);
  animation: statusPulse 900ms var(--ease-standard) infinite;
}

.balance-block {
  margin-top: 16px;
  padding: 20px 20px 16px;
  border: none;
  border-radius: 22px;
  background: #FFFFFF;
  box-shadow: 0 0 0 0.5px rgba(60,60,67,0.10), 0 1px 2px rgba(60,60,67,0.04), 0 8px 24px rgba(60,60,67,0.06);
}

.balance-label {
  color: rgba(60, 60, 67, 0.60);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.balance-value {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 4px;
  color: #000000;
  font-size: 36px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.balance-value small {
  color: rgba(60, 60, 67, 0.60);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.balance-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  position: relative;
  color: rgba(60, 60, 67, 0.60);
  font-size: 13px;
  font-weight: 400;
}
.balance-foot::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(60, 60, 67, 0.18);
  transform: scaleY(0.5);
  transform-origin: top;
}

.balance-foot span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.balance-foot span + span {
  padding-left: 12px;
  position: relative;
}
.balance-foot span + span::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10%;
  bottom: 10%;
  width: 1px;
  background: rgba(60, 60, 67, 0.18);
  transform: scaleX(0.5);
  transform-origin: left;
}

.balance-foot strong {
  color: #34C759;
  font-weight: 600;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
}

.quick-actions button {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 84px;
  padding: 12px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-xs),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.brand-lockup,
.profile-button,
.icon-button,
.text-button,
.quick-actions button,
.wallet-actions button,
.hunt-actions button,
.module-actions button,
.bottom-nav button,
.thread-preview,
.thread-row,
.service-item,
.app-card,
.registry-row,
.hunt-lock-row,
.module-row,
.sheet-action,
.sheet-result,
.inline-form button,
.send-button {
  transition:
    background 160ms var(--ease-standard),
    border-color 160ms var(--ease-standard),
    box-shadow 180ms var(--ease-standard),
    color 160ms var(--ease-standard),
    opacity 160ms var(--ease-standard),
    transform 180ms var(--ease-out);
}

.profile-button:active,
.icon-button:active,
.text-button:active,
.quick-actions button:active,
.wallet-actions button:active,
.hunt-actions button:active,
.module-actions button:active,
.bottom-nav button:active,
.thread-preview:active,
.thread-row:active,
.service-item:active,
.app-card:active,
.sheet-result:active,
.inline-form button:active,
.send-button:active {
  transform: scale(0.98);
}

.quick-actions button:focus-visible,
.text-button:focus-visible,
.thread-preview:focus-visible,
.thread-row:focus-visible,
.service-item:focus-visible,
.app-card:focus-visible,
.hunt-actions button:focus-visible,
.wallet-actions button:focus-visible,
.module-actions button:focus-visible,
.sheet-action:focus-visible,
.sheet-result:focus-visible,
.icon-button:focus-visible,
.profile-button:focus-visible,
.inline-form button:focus-visible,
.send-button:focus-visible,
.bottom-nav button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 4px var(--brand-cyan, #00B789);
}

.quick-actions button:hover,
.text-button:hover,
.thread-preview:hover,
.thread-row:hover,
.service-item:hover,
.sheet-action:hover,
.sheet-result:hover {
  transform: translateY(-1px);
}

.action-icon,
.nav-glyph {
  position: relative;
  display: inline-block;
  width: 24px;
  height: 24px;
}

.action-icon::before,
.action-icon::after,
.nav-glyph::before,
.nav-glyph::after {
  position: absolute;
  content: "";
  box-sizing: border-box;
}

.icon-send::before {
  inset: 5px 3px 5px 5px;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 15px solid var(--blue);
}

.icon-receive::before {
  left: 4px;
  top: 5px;
  width: 16px;
  height: 14px;
  border: 2px solid var(--teal);
  border-top: 0;
  border-radius: 0 0 5px 5px;
}

.icon-receive::after {
  left: 10px;
  top: 2px;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--teal);
  border-bottom: 2px solid var(--teal);
  transform: rotate(45deg);
}

.icon-swap::before,
.icon-swap::after {
  width: 17px;
  height: 7px;
  border: 2px solid var(--amber);
  border-left: 0;
  border-bottom: 0;
}

.icon-swap::before {
  top: 5px;
  left: 3px;
}

.icon-swap::after {
  right: 3px;
  bottom: 5px;
  transform: rotate(180deg);
}

.icon-chat::before,
.nav-chat::before {
  inset: 4px 3px 6px;
  border: 2px solid var(--teal);
  border-radius: 7px;
}

.icon-chat::after,
.nav-chat::after {
  left: 8px;
  bottom: 3px;
  width: 7px;
  height: 7px;
  border-left: 2px solid var(--teal);
  border-bottom: 2px solid var(--teal);
  transform: rotate(-22deg);
}

.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 850;
}

.thread-preview-list,
.activity-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.thread-preview,
.thread-row,
.activity-item,
.service-item {
  border: none;
  border-radius: 0;
  background: #FFFFFF;
  box-shadow: none;
}

.thread-preview {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 12px 16px;
  position: relative;
  color: inherit;
  text-align: left;
}

.thread-main,
.activity-copy,
.service-copy {
  min-width: 0;
}

.thread-main strong,
.thread-main span,
.activity-copy strong,
.activity-copy span,
.service-copy strong,
.service-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.thread-main strong,
.activity-copy strong,
.service-copy strong {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.thread-main span,
.activity-copy span,
.service-copy span {
  margin-top: 2px;
  color: rgba(60, 60, 67, 0.60);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: -0.005em;
}

.thread-meta {
  display: grid;
  justify-items: end;
  gap: 4px;
  color: rgba(60, 60, 67, 0.60);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.005em;
}

.unread-dot {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--text-primary, #000);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 600;
}

.activity-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.activity-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 44px;
  padding: 12px 16px;
  position: relative;
}

.activity-mark,
.service-mark {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: white;
  font-size: 13px;
  font-weight: 700;
}

.activity-mark.trade {
  background: var(--blue);
}

.activity-mark.identity {
  background: var(--teal);
}

.activity-mark.system {
  background: var(--amber);
}

.activity-amount {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.activity-amount.positive {
  color: #34C759;
}

.activity-amount.neutral {
  color: rgba(60, 60, 67, 0.60);
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.service-item {
  display: grid;
  gap: 8px;
  min-height: auto;
  padding: 12px;
  position: relative;
  color: inherit;
  text-align: left;
}

.service-mark.wallet {
  background: linear-gradient(135deg, #00B789, #0A84FF);
}

.service-mark.lab {
  background: linear-gradient(135deg, #0A84FF, #5856D6);
}

.service-mark.docs {
  background: linear-gradient(135deg, #FF9500, #FF3B30);
}

.service-mark.ai {
  background: linear-gradient(135deg, #8E8E93, #5856D6);
}

.service-mark.guard {
  background: linear-gradient(135deg, #34C759, #00B789);
}

.service-mark.market {
  background: linear-gradient(135deg, #FF3B30, #FF9500);
}

.wallet-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(360px, 1.05fr);
  gap: 16px;
  align-items: start;
}

.wallet-panel {
  padding: clamp(16px, 2.2vw, 22px);
}

.wallet-main {
  display: grid;
  gap: 18px;
}

.wallet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.wallet-head p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.wallet-network-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid #bbd9cb;
  border-radius: 999px;
  color: #215246;
  background: #eaf6f0;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.wallet-network-pill::before {
  width: 6px;
  height: 6px;
  content: "";
  border-radius: 50%;
  background: #31836b;
}

.wallet-network-pill[data-state="checking"] {
  color: #714410;
  background: #fff6e8;
  border-color: #e8c994;
}

.wallet-network-pill[data-state="checking"]::before {
  background: #a06922;
}

.wallet-network-pill[data-state="unavailable"] {
  color: #4c586c;
  background: #f0f3f8;
  border-color: #cdd5e0;
}

.wallet-network-pill[data-state="unavailable"]::before {
  background: #65758a;
}

.wallet-availability {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 8px 0 8px 12px;
  border-inline-start: 2px solid #8491a6;
}

.wallet-availability[hidden],
.wallet-signin[hidden] {
  display: none;
}

.wallet-availability p {
  flex: 1 1 160px;
  margin: 0;
  color: #3e4a5f;
  font-size: 14px;
  line-height: 1.5;
}

.wallet-availability .wallet-signin {
  min-height: 44px;
  min-width: 80px;
  padding: 6px 12px;
  border: 1px solid #b8c9e3;
  border-radius: 8px;
  color: #184d8b;
  background: #edf4ff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.wallet-availability .wallet-signin:hover {
  background: #e0ebfc;
}

.wallet-availability .wallet-signin:focus-visible {
  outline: 2px solid #184d8b;
  outline-offset: 3px;
}

.wallet-actions button:disabled {
  color: #535f71;
  background: #f0f3f8;
  box-shadow: none;
  cursor: default;
}

.wallet-balance-card {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 10px;
  padding: 22px 20px 20px;
  border: none;
  border-radius: var(--r-xl, 22px);
  background: #FFFFFF;
  box-shadow:
    0 0 0 0.5px rgba(60, 60, 67, 0.10),
    0 1px 2px rgba(60, 60, 67, 0.04),
    0 8px 24px rgba(60, 60, 67, 0.06);
}

.wallet-balance-card > span {
  color: var(--text-secondary, rgba(60, 60, 67, 0.60));
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.wallet-balance-card strong {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  color: var(--text-primary, #000000);
  font-size: 36px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.wallet-balance-card small {
  color: var(--text-secondary, rgba(60, 60, 67, 0.60));
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.wallet-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 2px;
  align-items: center;
}

.wallet-meta-line span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-secondary, rgba(60, 60, 67, 0.60));
  font-size: 13px;
  font-weight: 400;
  letter-spacing: -0.005em;
}

.wallet-meta-line span + span {
  padding-left: 0;
  border-left: none;
}
.wallet-meta-line span + span::before {
  content: "·";
  margin-right: 4px;
  color: var(--text-tertiary, rgba(60, 60, 67, 0.30));
  font-size: 14px;
  font-weight: 400;
}

.wallet-meta-line b {
  color: var(--text-primary, #000000);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.wallet-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 6px;
}

.wallet-actions button {
  display: grid;
  place-items: center;
  gap: 6px;
  min-height: 84px;
  padding: 12px 8px;
  border: none;
  border-radius: 14px;
  background: #FFFFFF;
  box-shadow:
    0 0 0 0.5px rgba(60, 60, 67, 0.10),
    0 1px 2px rgba(60, 60, 67, 0.04),
    0 4px 12px rgba(60, 60, 67, 0.05);
  color: var(--text-primary, #000000);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.005em;
}

.wallet-actions button:hover {
  background: var(--surface-secondary, #F9F9FB);
  box-shadow:
    0 0 0 0.5px rgba(60, 60, 67, 0.12),
    0 2px 6px rgba(60, 60, 67, 0.07),
    0 8px 20px rgba(60, 60, 67, 0.07);
}

.icon-refresh::before {
  inset: 5px;
  border: 2px solid var(--green);
  border-right-color: transparent;
  border-radius: 50%;
}

.icon-refresh::after {
  right: 4px;
  top: 5px;
  width: 7px;
  height: 7px;
  border-top: 2px solid var(--green);
  border-right: 2px solid var(--green);
  transform: rotate(28deg);
}

.wallet-account {
  min-width: 0;
}

.wallet-details {
  display: grid;
  gap: 0;
  margin: 16px 0 0;
  background: #FFFFFF;
  border-radius: 14px;
  box-shadow:
    0 0 0 0.5px rgba(60, 60, 67, 0.10),
    0 1px 2px rgba(60, 60, 67, 0.04),
    0 4px 12px rgba(60, 60, 67, 0.04);
  overflow: hidden;
}

.wallet-details div,
.wallet-history-row {
  border: none;
  border-radius: 0;
  background: transparent;
}

.wallet-details div {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 10px;
  min-height: 46px;
  align-items: center;
  padding: 10px 14px;
  position: relative;
  background: #FFFFFF;
}

.wallet-details dt {
  color: var(--text-secondary, rgba(60, 60, 67, 0.60));
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.wallet-details dd {
  min-width: 0;
  margin: 0;
  color: var(--text-primary, #000000);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.005em;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.wallet-history {
  grid-column: 1 / -1;
}

.wallet-history-list {
  display: grid;
  gap: 0;
  margin-top: 14px;
  background: #FFFFFF;
  border-radius: 14px;
  box-shadow:
    0 0 0 0.5px rgba(60, 60, 67, 0.10),
    0 1px 2px rgba(60, 60, 67, 0.04),
    0 4px 12px rgba(60, 60, 67, 0.04);
  overflow: hidden;
}

.wallet-history-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  padding: 10px 14px;
  position: relative;
  background: #FFFFFF;
}

.wallet-history-row .activity-mark {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
}

.wallet-history-copy {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.wallet-history-copy strong,
.wallet-history-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wallet-history-copy strong {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--text-primary, #000000);
}

.wallet-history-copy span {
  margin-top: 0;
  color: var(--text-secondary, rgba(60, 60, 67, 0.60));
  font-size: 13px;
  font-weight: 400;
  letter-spacing: -0.005em;
  font-variant-numeric: tabular-nums;
}

.apps-layout,
.hunt-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  min-width: 0;
}

.hunt-integrated {
  grid-template-columns: minmax(280px, 0.36fr) minmax(0, 0.64fr);
  align-items: start;
}

.apps-panel,
.hunt-panel {
  min-width: 0;
  padding: clamp(18px, 2.4vw, 24px);
}

.apps-main .section-head,
.hunt-main .section-head {
  align-items: center;
}

.apps-main p,
.hunt-main p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: -0.005em;
  line-height: 1.4;
}

.apps-metrics,
.hunt-summary,
.module-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 18px;
}

.apps-metrics span,
.hunt-summary div,
.module-metrics span {
  display: grid;
  gap: 4px;
  min-width: 0;
  min-height: 68px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface-elevated, #FFFFFF);
  box-shadow: 0 0 0 0.5px rgba(60,60,67,0.10), 0 1px 2px rgba(60,60,67,0.04), 0 4px 12px rgba(60,60,67,0.04);
  color: var(--text-secondary, rgba(60,60,67,0.60));
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.apps-metrics strong,
.hunt-summary strong,
.module-metrics strong {
  color: var(--ink);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.apps-tools {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.2fr);
  gap: 8px;
  align-items: center;
  margin-top: 12px;
}

.apps-search-field {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  background: var(--surface-secondary, #F9F9FB);
  box-shadow: 0 0 0 0.5px rgba(60,60,67,0.12);
  transition: box-shadow 160ms ease;
}

.apps-search-field:focus-within {
  box-shadow: 0 0 0 0.5px rgba(60,60,67,0.20), 0 0 0 3px var(--brand-cyan-ring, rgba(0,183,137,0.24));
}

.apps-search-field input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.apps-filter-bar {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 3px;
  min-width: 0;
  padding: 3px;
  border-radius: 10px;
  background: rgba(120,120,128,0.12);
}

.apps-filter-bar button {
  min-width: 0;
  min-height: 44px;
  padding: 0 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text-primary, #000);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.005em;
  white-space: nowrap;
  transition:
    background 160ms cubic-bezier(0.32,0.72,0,1),
    box-shadow 160ms cubic-bezier(0.32,0.72,0,1),
    color 160ms cubic-bezier(0.32,0.72,0,1);
}

.apps-filter-bar button:not(.is-selected):active {
  background: rgba(255,255,255,0.50);
}

.apps-filter-bar button.is-selected {
  background: #FFFFFF;
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 0 0 0.5px rgba(60,60,67,0.10), 0 1px 2px rgba(60,60,67,0.06), 0 3px 8px -2px rgba(16,24,40,0.08);
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.app-card,
.registry-row,
.hunt-lock-row {
  border: none;
  border-radius: 14px;
  background: var(--surface-elevated, #FFFFFF);
  box-shadow: 0 0 0 0.5px rgba(60,60,67,0.10), 0 1px 2px rgba(60,60,67,0.04), 0 8px 24px rgba(60,60,67,0.06);
}

.app-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  min-height: 134px;
  padding: 14px;
  border-radius: 14px;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.app-card:hover {
  box-shadow: 0 0 0 0.5px rgba(60,60,67,0.14), 0 2px 4px rgba(60,60,67,0.06), 0 12px 32px rgba(60,60,67,0.08);
  transform: translateY(-1px);
}

.app-card:active {
  background: var(--surface-tertiary, #EFEFF4);
  transform: translateY(0);
  box-shadow: 0 0 0 0.5px rgba(60,60,67,0.10), 0 1px 2px rgba(60,60,67,0.04);
}

.app-card:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0,183,137,0.32), 0 0 0 0.5px rgba(60,60,67,0.10), 0 1px 2px rgba(60,60,67,0.04), 0 8px 24px rgba(60,60,67,0.06);
}

@media (prefers-reduced-motion: reduce) {
  .app-card:hover,
  .app-card:active {
    transform: none;
  }
}

.app-empty {
  grid-column: 1 / -1;
  display: grid;
  gap: 4px;
  min-height: 118px;
  place-content: center;
  border: 0.5px dashed rgba(60,60,67,0.20);
  border-radius: 12px;
  background: var(--surface-secondary, #F9F9FB);
  color: var(--muted);
  text-align: center;
}

.app-empty strong {
  color: var(--ink);
}


.app-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.app-mark {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 9px;
  border: 0.5px solid rgba(60,60,67,0.10);
  color: var(--text-primary, #000);
  background: #EFEFF4;
  font-weight: 700;
  font-size: 15px;
}

.app-card strong,
.registry-copy strong,
.hunt-lock-copy strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.012em;
  color: var(--text-primary, #000);
}

.app-card p,
.registry-copy span,
.hunt-lock-copy span {
  margin: 0;
  color: var(--text-secondary, rgba(60,60,67,0.60));
  font-size: 13px;
  font-weight: 400;
  letter-spacing: -0.005em;
  line-height: 1.42;
}

.app-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(52,199,89,0.12);
  color: #22863A;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.app-chip--active::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #34C759;
  display: inline-block;
  flex-shrink: 0;
}

.app-chip--beta {
  background: rgba(255,149,0,0.12);
  color: #B45309;
}

.app-chip--locked,
.app-chip--muted {
  background: rgba(60,60,67,0.08);
  color: var(--text-secondary, rgba(60,60,67,0.60));
}

.registry-list,
.hunt-lock-list {
  display: grid;
  gap: 0;
  margin-top: 14px;
  background: var(--surface-elevated, #FFFFFF);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 0 0 0.5px rgba(60,60,67,0.10), 0 1px 2px rgba(60,60,67,0.04), 0 8px 24px rgba(60,60,67,0.06);
}

.registry-row,
.hunt-lock-row {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  min-width: 0;
  align-items: center;
  min-height: 64px;
  padding: 12px 16px;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.registry-row + .registry-row::before,
.hunt-lock-row + .hunt-lock-row::before {
  content: "";
  position: absolute;
  top: 0;
  left: 64px;
  right: 0;
  height: 1px;
  background: rgba(60,60,67,0.18);
  transform: scaleY(0.5);
  transform-origin: top;
}

.registry-copy,
.hunt-lock-copy {
  min-width: 0;
}

.registry-copy strong,
.registry-copy span,
.hunt-lock-copy strong,
.hunt-lock-copy span {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.registry-count,
.hunt-lock-state {
  color: var(--text-secondary, rgba(60,60,67,0.60));
  font-size: 12px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.005em;
  white-space: nowrap;
}

.hunt-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hunt-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.hunt-actions button,
.module-actions button {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 80px;
  padding: 12px 8px;
  border: none;
  border-radius: 14px;
  background: var(--surface-elevated, #FFFFFF);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.005em;
  box-shadow: 0 0 0 0.5px rgba(60,60,67,0.12), 0 1px 2px rgba(60,60,67,0.04), 0 4px 12px rgba(60,60,67,0.05);
}

.hunt-game-panel {
  order: -1;
  grid-column: 1 / -1;
  padding: 0;
  overflow: hidden;
}

.hunt-game-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  box-shadow: inset 0 -0.5px 0 rgba(60,60,67,0.18);
}

.hunt-game-head h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.hunt-game-frame {
  display: block;
  width: 100%;
  height: min(860px, calc(100vh - var(--header-h) - var(--nav-h) - 96px));
  min-height: 620px;
  border: 0;
  background: transparent;
}

.module-layout {
  display: grid;
  grid-template-columns: minmax(340px, 0.92fr) minmax(0, 1.08fr);
  gap: 20px;
  align-items: start;
}

.module-panel {
  min-width: 0;
  padding: 16px;
}

.module-main {
  position: sticky;
  top: calc(var(--header-h) + 14px);
}

.module-main p {
  margin-top: 4px;
  color: var(--text-secondary, rgba(60,60,67,0.60));
  font-size: 13px;
  font-weight: 400;
  letter-spacing: -0.005em;
  line-height: 1.4;
}

.module-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}


.module-list {
  display: grid;
  gap: 0;
  margin-top: 14px;
  background: var(--surface-elevated, #FFFFFF);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 0 0 0.5px rgba(60,60,67,0.10), 0 1px 2px rgba(60,60,67,0.04), 0 8px 24px rgba(60,60,67,0.06);
}

.module-row {
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-width: 0;
  min-height: 64px;
  padding: 12px 16px;
  border: none;
  border-radius: 0;
  background: transparent;
  transition: background 160ms cubic-bezier(0.32,0.72,0,1);
}

.module-row:active {
  background: var(--surface-tertiary, #EFEFF4);
}

.module-row + .module-row::before {
  content: "";
  position: absolute;
  top: 0;
  left: 64px;
  right: 0;
  height: 1px;
  background: rgba(60,60,67,0.18);
  transform: scaleY(0.5);
  transform-origin: top;
}

.module-mark {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 9px;
  border: 0.5px solid rgba(60,60,67,0.10);
  color: var(--text-primary, #000);
  background: #EFEFF4;
  font-size: 13px;
  font-weight: 700;
}

.module-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.module-copy strong,
.module-copy span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.module-copy strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.012em;
}

.module-copy span {
  color: var(--text-secondary, rgba(60,60,67,0.60));
  font-size: 13px;
  font-weight: 400;
  letter-spacing: -0.005em;
}

.module-value {
  max-width: 130px;
  overflow: hidden;
  color: var(--text-secondary, rgba(60,60,67,0.60));
  font-size: 12px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.005em;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon-hunt-run::before {
  inset: 5px;
  border: 2px solid var(--red);
  border-radius: 50%;
}

.icon-hunt-run::after {
  left: 9px;
  top: 9px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
}

.messenger-shell {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  height: calc(100vh - var(--header-h) - var(--nav-h) - 24px);
  height: calc(100dvh - var(--header-h) - var(--nav-h) - 24px);
  max-height: 720px;
  min-height: 0;
  align-items: stretch;
  overflow: hidden;
  border: 0.5px solid rgba(60,60,67,0.18);
  border-radius: 14px;
  background: var(--surface-canvas, #F2F2F7);
  box-shadow: 0 0 0 0.5px rgba(60,60,67,.10), 0 1px 2px rgba(60,60,67,.04), 0 8px 24px rgba(60,60,67,.06);
}

.messenger-sidebar {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 100%;
  min-height: 0;
  min-width: 0;
  border-right: 0.5px solid rgba(60,60,67,0.18);
  background: var(--surface-elevated, #FFFFFF);
}

.messenger-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 16px 12px;
}

.messenger-titlebar h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary, #000);
}

.search-field {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 36px;
  margin: 0 16px 10px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: rgba(118,118,128,0.12);
}

.search-field input,
.composer-input input,
.inline-form input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.search-field input::placeholder,
.composer-input input::placeholder,
.inline-form input::placeholder {
  color: var(--faint);
}

.search-glyph {
  position: relative;
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.search-glyph::before {
  position: absolute;
  inset: 0;
  content: "";
  border: 2px solid var(--faint);
  border-radius: 999px;
}

.search-glyph::after {
  position: absolute;
  right: -4px;
  bottom: -3px;
  width: 7px;
  height: 2px;
  content: "";
  background: var(--faint);
  transform: rotate(45deg);
  transform-origin: center;
}

.segmented-control {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  margin: 0 16px 12px;
  padding: 3px;
  border: 0;
  border-radius: 9px;
  background: rgba(118,118,128,0.12);
}

.segmented-control button {
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.segmented-control button.is-selected {
  background: var(--surface-elevated, #FFFFFF);
  color: var(--text-primary, #000);
  box-shadow: 0 1px 3px rgba(60,60,67,0.14), 0 0 0 0.5px rgba(60,60,67,0.08);
}

.inline-form button {
  min-height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--radius-md);
  background: var(--surface-tertiary, #EFEFF4);
  color: var(--text-primary, #000000);
  font-size: 13px;
  font-weight: 850;
}

.inline-form button:hover {
  background: #E3E3E8;
}

.send-button {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #D1D1D6;
  color: #fff;
  font-size: 0;
  transition: background 160ms ease;
}

.send-button:not(:disabled) {
  background: var(--brand-cyan, #00B789);
}

.send-button:hover:not(:disabled) {
  background: var(--brand-cyan-press, #009974);
}

.thread-list {
  display: flex;
  flex-direction: column;
  align-content: start;
  gap: 0;
  min-height: 0;
  overflow: auto;
  padding: 0 0 16px;
}

.thread-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 72px;
  padding: 12px 16px 12px 28px;
  border: 0;
  border-color: transparent;
  background: var(--surface-elevated, #FFFFFF);
  color: inherit;
  text-align: left;
  position: relative;
  transition: background 80ms ease;
}

.thread-row[data-kind="regional"] {
  background: transparent;
}

.thread-row[data-kind="random"] {
  background: transparent;
}

.thread-row[data-kind="requests"] {
  background: transparent;
}

.thread-row:hover {
  background: var(--surface-tertiary, #EFEFF4);
}

.thread-row.is-active {
  border-color: transparent;
  background: rgba(0,0,0,0.04);
}

.thread-row[data-has-draft="true"] .thread-main span {
  color: var(--text-secondary, rgba(60,60,67,0.60));
  font-weight: 800;
}

.chat-panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  height: 100%;
  max-height: 100%;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  background: var(--surface-canvas, #F2F2F7);
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 70px;
  padding: 12px 16px;
  border-bottom: 0.5px solid var(--hairline, rgba(60,60,67,0.18));
  background: var(--surface-chrome, rgba(242,242,247,0.82));
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}

.chat-peer {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  margin-right: auto;
}

.chat-peer strong,
.chat-peer small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-peer strong {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.chat-peer small {
  margin-top: 2px;
  color: var(--text-secondary, rgba(60,60,67,0.60));
  font-size: 12px;
  font-weight: 400;
  letter-spacing: -0.005em;
}

.chat-tools {
  display: flex;
  gap: 6px;
}

.call-banner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 58px;
  padding: 9px 16px;
  border-bottom: 1px solid var(--hairline, rgba(60,60,67,0.18));
  background: var(--surface-tertiary, #EFEFF4);
}

.call-banner[hidden] {
  display: none;
}

.call-copy {
  min-width: 0;
}

.call-copy strong,
.call-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.call-copy strong {
  color: var(--text-primary, #000000);
  font-size: 13px;
  font-weight: 900;
}

.call-copy small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.call-actions {
  display: flex;
  gap: 6px;
}

.call-actions .icon-button {
  width: 38px;
  height: 38px;
}

.call-banner audio {
  display: none;
}

.icon-end-call {
  color: var(--red);
}

.icon-mic[data-muted="true"] {
  color: var(--red);
}

.message-feed {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 0;
  overflow-y: auto;
  padding: 18px clamp(12px, 2vw, 22px) calc(24px + env(safe-area-inset-bottom));
  background: var(--surface-canvas, #F2F2F7);
}

.day-divider {
  align-self: center;
  margin: 6px 0;
  color: var(--faint);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.message {
  display: grid;
  gap: 3px;
  max-width: min(560px, 74%);
}

.message.is-me {
  align-self: flex-end;
}

.message:not(.is-me) {
  align-self: flex-start;
}

.bubble {
  display: grid;
  gap: 6px;
  max-width: 100%;
  padding: 9px 14px;
  border: 0;
  border-radius: 18px;
  border-bottom-left-radius: 5px;
  background: #E9E9EB;
  color: var(--text-primary, #000);
  font-size: 16px;
  line-height: 1.4;
  overflow-wrap: anywhere;
  cursor: pointer;
  animation: msgBubbleIn 0.28s cubic-bezier(0.32,0.72,0,1) both;
  transition: opacity 160ms ease;
}

.bubble:hover {
  opacity: 0.88;
}

.message.is-me .bubble {
  background: var(--brand-cyan, #00B789);
  border-color: transparent;
  color: var(--text-inverse, #FFFFFF);
  border-bottom-left-radius: 18px;
  border-bottom-right-radius: 5px;
}

.message.is-me .bubble:hover {
  background: var(--brand-cyan-press, #009974);
  border-color: transparent;
  opacity: 1;
}

.bubble-reply {
  display: grid;
  gap: 2px;
  padding: 7px 8px;
  border-left: 3px solid rgba(60, 60, 67, 0.28);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.56);
}

.message.is-me .bubble-reply {
  border-left-color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.16);
}

.message.is-me .bubble-reply strong {
  color: #ffffff;
}

.message.is-me .bubble-reply small {
  color: rgba(255, 255, 255, 0.86);
}

.bubble-reply strong,
.bubble-reply small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bubble-reply strong {
  color: inherit;
  font-size: 12px;
  font-weight: 900;
}

.bubble-reply small {
  color: color-mix(in srgb, currentColor 72%, transparent);
  font-size: 12px;
  font-weight: 700;
}

.message small {
  color: var(--faint);
  font-size: 11px;
  font-weight: 750;
}

.message.is-me small {
  text-align: right;
}

.composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  border-top: 0.5px solid rgba(60,60,67,0.18);
  background: var(--surface-canvas, #F2F2F7);
}

.reply-preview {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--hairline, rgba(60,60,67,0.18));
  border-radius: 8px;
  background: var(--surface-tertiary, #EFEFF4);
}

.reply-preview[hidden] {
  display: none;
}

.reply-preview span,
.reply-preview strong,
.reply-preview small {
  min-width: 0;
}

.reply-preview strong,
.reply-preview small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reply-preview strong {
  color: var(--text-primary, #000000);
  font-size: 12px;
  font-weight: 900;
}

.reply-preview small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.reply-preview .icon-button {
  width: 44px;
  height: 44px;
}

.reply-preview .icon-add {
  --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.35' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12'/%3E%3Cpath d='M18 6 6 18'/%3E%3C/svg%3E");
}

.composer-input {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border: 0.5px solid #D1D1D6;
  border-radius: 18px;
  background: var(--surface-elevated, #FFFFFF);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.composer-input:focus-within {
  border-color: rgba(60,60,67,0.32);
  box-shadow: 0 0 0 3px rgba(60,60,67,0.08);
}

.icon-button {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
}

.icon-button:hover {
  background: var(--surface-soft);
  border-color: var(--line-strong);
}

.icon-button:disabled {
  cursor: default;
  opacity: 0.42;
  box-shadow: none;
}

.icon-button::before,
.icon-button::after {
  position: absolute;
  content: "";
  box-sizing: border-box;
}

.icon-search::before {
  width: 15px;
  height: 15px;
  border: 2px solid var(--muted);
  border-radius: 999px;
  transform: translate(-2px, -2px);
}

.icon-search::after {
  width: 8px;
  height: 2px;
  background: var(--muted);
  transform: translate(8px, 8px) rotate(45deg);
}

.icon-bell::before {
  width: 16px;
  height: 18px;
  border: 2px solid var(--muted);
  border-bottom: 0;
  border-radius: 10px 10px 4px 4px;
  transform: translateY(-2px);
}

.icon-bell::after {
  width: 8px;
  height: 2px;
  border-radius: 999px;
  background: var(--muted);
  transform: translateY(10px);
}

.icon-more::before,
.icon-more::after {
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: var(--muted);
}

.icon-more::before {
  box-shadow: -8px 0 0 var(--muted), 8px 0 0 var(--muted);
}

.icon-add::before,
.icon-add::after {
  width: 16px;
  height: 2px;
  border-radius: 999px;
  background: var(--muted);
}

.icon-add::after {
  transform: rotate(90deg);
}

.icon-back::before {
  width: 11px;
  height: 11px;
  border-left: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateX(2px) rotate(45deg);
}

.icon-call::before {
  width: 15px;
  height: 15px;
  border: 2px solid var(--muted);
  border-radius: 4px 4px 8px 4px;
  transform: rotate(-28deg);
}

.icon-attach::before {
  width: 9px;
  height: 19px;
  border: 2px solid var(--muted);
  border-radius: 999px;
  transform: rotate(28deg);
}

.icon-attach::after {
  width: 5px;
  height: 12px;
  border: 2px solid var(--muted);
  border-left: 0;
  border-bottom: 0;
  border-radius: 0 999px 0 0;
  transform: translate(2px, -1px) rotate(28deg);
}

.icon-apps::before {
  inset: 4px;
  background:
    linear-gradient(var(--muted), var(--muted)) left top / 7px 7px no-repeat,
    linear-gradient(var(--muted), var(--muted)) right top / 7px 7px no-repeat,
    linear-gradient(var(--muted), var(--muted)) left bottom / 7px 7px no-repeat,
    linear-gradient(var(--muted), var(--muted)) right bottom / 7px 7px no-repeat;
  border-radius: 2px;
}

.icon-back {
  display: none;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  width: 100%;
  max-width: 420px;
  height: calc(64px + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: rgba(242, 242, 247, 0.82);
  box-shadow: inset 0 0.5px 0 rgba(60, 60, 67, 0.18);
  transform: translateX(-50%);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}

.bottom-nav button {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 0;
  min-height: 44px;
  padding: 0 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(60, 60, 67, 0.60);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: color 160ms cubic-bezier(0.4, 0.0, 0.2, 1);
}

.bottom-nav button.is-active {
  color: #000000;
  background: transparent;
  font-weight: 600;
}

.bottom-nav button.is-active .nav-glyph {
  color: #000000;
}

.bottom-nav button.is-active .nav-glyph::before,
.bottom-nav button.is-active .nav-glyph::after {
  border-color: #000000;
}

.nav-home::before {
  left: 4px;
  top: 9px;
  width: 16px;
  height: 11px;
  border: 2px solid var(--muted);
  border-top: 0;
  border-radius: 0 0 5px 5px;
}

.nav-home::after {
  left: 6px;
  top: 4px;
  width: 13px;
  height: 13px;
  border-left: 2px solid var(--muted);
  border-top: 2px solid var(--muted);
  transform: rotate(45deg);
}

.nav-wallet::before {
  inset: 6px 3px;
  border: 2px solid var(--muted);
  border-radius: 5px;
}

.nav-wallet::after {
  right: 5px;
  top: 11px;
  width: 7px;
  height: 5px;
  border: 2px solid var(--muted);
  border-radius: 4px;
  background: var(--surface);
}

.nav-apps::before {
  inset: 4px;
  background:
    linear-gradient(var(--muted), var(--muted)) left top / 7px 7px no-repeat,
    linear-gradient(var(--muted), var(--muted)) right top / 7px 7px no-repeat,
    linear-gradient(var(--muted), var(--muted)) left bottom / 7px 7px no-repeat,
    linear-gradient(var(--muted), var(--muted)) right bottom / 7px 7px no-repeat;
  border-radius: 2px;
}

.nav-hunt::before {
  inset: 5px;
  border: 2px solid var(--muted);
  border-radius: 999px;
}

.nav-hunt::after {
  left: 11px;
  top: 11px;
  width: 2px;
  height: 2px;
  background: var(--muted);
  box-shadow: 0 0 0 4px rgba(99, 113, 136, 0.18);
}

.action-sheet {
  position: fixed;
  inset: 0;
  z-index: 110;
  pointer-events: none;
  visibility: hidden;
}

.action-sheet.is-open {
  pointer-events: auto;
  visibility: visible;
}

.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  transition: background 280ms cubic-bezier(0.32, 0.72, 0, 1);
}

.action-sheet.is-open .sheet-backdrop {
  background: rgba(0, 0, 0, 0.32);
}

.sheet-panel {
  position: absolute;
  left: 50%;
  bottom: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: 100%;
  max-width: 420px;
  max-height: 88vh;
  border-radius: 14px 14px 0 0;
  background: #FFFFFF;
  box-shadow: 0 -0.5px 0 rgba(60, 60, 67, 0.18), 0 -8px 32px rgba(0, 0, 0, 0.12);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  transform: translateX(-50%) translateY(100%);
  transition: transform 280ms cubic-bezier(0.32, 0.72, 0, 1);
}

.sheet-panel::before {
  position: absolute;
  top: 6px;
  left: 50%;
  width: 36px;
  height: 5px;
  content: "";
  border-radius: 999px;
  background: rgba(60, 60, 67, 0.18);
  transform: translateX(-50%);
}

.action-sheet.is-open .sheet-panel {
  transform: translateX(-50%) translateY(0);
}

.sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 16px 12px;
  border-bottom: 0.5px solid rgba(60, 60, 67, 0.18);
}

.sheet-head h2 {
  max-width: 300px;
}

.sheet-close::before {
  transform: rotate(45deg);
}

.sheet-close::after {
  transform: rotate(-45deg);
}

.sheet-body {
  display: grid;
  gap: 10px;
  min-height: 0;
  padding: 14px;
  overflow-y: auto;
}

.sheet-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 8px;
  padding: 12px 16px 16px;
  border-top: 0.5px solid rgba(60, 60, 67, 0.18);
}

.action-sheet[data-sheet-mode="legacy"] .sheet-panel {
  top: max(12px, env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
  bottom: max(12px, env(safe-area-inset-bottom));
  width: min(980px, calc(100vw - 24px));
  max-height: none;
  border-radius: 10px;
}

.action-sheet[data-sheet-mode="legacy"].is-open .sheet-panel {
  transform: none;
}

.action-sheet[data-sheet-mode="legacy"] .sheet-body {
  gap: 0;
  padding: 8px;
  overflow: hidden;
}

.legacy-frame-shell {
  display: grid;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.legacy-frame {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  background: #fff;
}

.sheet-action,
.sheet-result {
  border: 0.5px solid rgba(60, 60, 67, 0.18);
  border-radius: 10px;
  background: #FFFFFF;
  color: #000000;
  text-align: left;
}

.sheet-action {
  min-height: 44px;
  padding: 10px 12px;
  color: #000000;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.015em;
  text-align: center;
}

.sheet-action.is-primary {
  border-color: transparent;
  background: #00B789;
  color: #FFFFFF;
}

.sheet-row,
.sheet-note,
.sheet-result {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 12px;
  border: 0.5px solid rgba(60, 60, 67, 0.18);
  border-radius: 10px;
  background: #FFFFFF;
}

.sheet-row {
  grid-template-columns: minmax(88px, 0.38fr) minmax(0, 1fr);
  align-items: center;
}

.sheet-row span,
.sheet-note small,
.sheet-result small {
  color: rgba(60, 60, 67, 0.60);
  font-size: 12px;
  font-weight: 500;
}

.sheet-row strong,
.sheet-note strong,
.sheet-result strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #000000;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.25;
}

.sheet-note {
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
}

.sheet-note-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #EFEFF4;
  color: rgba(60, 60, 67, 0.60);
  font-size: 13px;
  font-weight: 600;
}

.sheet-note-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.sheet-search {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: #F2F2F7;
  box-shadow: inset 0 0 0 0.5px rgba(60, 60, 67, 0.18);
}

.sheet-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #000000;
  font-size: 15px;
  font-weight: 400;
}

.sheet-results {
  display: grid;
  gap: 8px;
}

.messenger-add-form {
  display: grid;
  gap: 10px;
}

.sheet-input-field {
  display: grid;
  gap: 7px;
}

.sheet-input-field span {
  color: rgba(60, 60, 67, 0.60);
  font-size: 12px;
  font-weight: 600;
}

.sheet-input-field input {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  outline: 0;
  background: #FFFFFF;
  box-shadow: inset 0 0 0 0.5px rgba(60, 60, 67, 0.18);
  color: #000000;
  font-size: 15px;
  font-weight: 500;
  transition: box-shadow 160ms cubic-bezier(0.4, 0.0, 0.2, 1);
}

.sheet-input-field input:focus {
  box-shadow: inset 0 0 0 1.5px rgba(60,60,67,0.32), 0 0 0 3px rgba(60,60,67,0.08);
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2px;
  padding: 2px;
  border: 0;
  border-radius: 10px;
  background: #EFEFF4;
}

.auth-tabs button {
  min-width: 0;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #000000;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.005em;
  transition: background 160ms cubic-bezier(0.4, 0.0, 0.2, 1), box-shadow 160ms cubic-bezier(0.4, 0.0, 0.2, 1);
}

.auth-tabs button.is-active,
.auth-tabs button.is-selected {
  background: #FFFFFF;
  color: #000000;
  box-shadow: 0 0 0 0.5px rgba(60, 60, 67, 0.18), 0 1px 2px rgba(0, 0, 0, 0.06);
}

.google-auth-block,
.google-auth-host {
  display: grid;
  min-width: 0;
}

.google-auth-block {
  gap: 10px;
  padding: 2px 0 6px;
}

.google-auth-host {
  min-height: 46px;
  align-items: center;
  justify-items: center;
  overflow: hidden;
}

.google-auth-host iframe,
.google-auth-redirect-host iframe {
  max-width: 100%;
  border-radius: 999px;
}

.google-auth-host .auth-submit {
  width: 100%;
}

.google-auth-redirect {
  min-height: 42px;
  font-size: 12px;
}

.auth-panel-v4,
.auth-form {
  display: grid;
  gap: 12px;
}

.auth-field {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 12px 14px;
  border: 0;
  border-radius: 12px;
  background: #F2F2F7;
  box-shadow: inset 0 0 0 0.5px rgba(60, 60, 67, 0.18);
  transition: box-shadow 160ms cubic-bezier(0.4, 0.0, 0.2, 1);
}

.auth-field:focus-within {
  box-shadow: inset 0 0 0 1.5px #00B789, 0 0 0 3px rgba(0, 183, 137, 0.32);
}

.auth-field span {
  color: rgba(60, 60, 67, 0.60);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.auth-field input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #000000;
  font-size: 16px;
  font-weight: 400;
}

.auth-recovery-code-panel {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: #F2F2F7;
  box-shadow: inset 0 0 0 0.5px rgba(60, 60, 67, 0.18);
}

.auth-recovery-code-panel > span {
  color: rgba(60, 60, 67, 0.72);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.auth-recovery-code-value {
  width: 100%;
  min-height: 86px;
  padding: 10px;
  border: 1px solid rgba(60, 60, 67, 0.22);
  border-radius: 8px;
  background: #FFFFFF;
  color: #111111;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  resize: vertical;
}

.auth-recovery-code-value:focus-visible {
  outline: 2px solid #007F63;
  outline-offset: 2px;
}

.auth-recovery-code-note {
  margin: 0;
  color: #424248;
  font-size: 13px;
  line-height: 1.5;
}

.auth-recovery-ack {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: #1C1C1E;
  font-size: 14px;
  line-height: 1.4;
  cursor: pointer;
}

.auth-recovery-ack input {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  accent-color: #007F63;
}

.auth-recovery-ack input:focus-visible {
  outline: 2px solid #007F63;
  outline-offset: 3px;
}

.auth-submit {
  min-height: 50px;
  border: 0;
  border-radius: 999px;
  background: #00B789;
  color: #FFFFFF;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.015em;
  box-shadow: 0 1px 1px rgba(0, 153, 116, 0.18), 0 0 0 0.5px rgba(0, 153, 116, 0.32);
  transition: background 80ms ease, box-shadow 160ms cubic-bezier(0.4, 0.0, 0.2, 1), opacity 160ms cubic-bezier(0.4, 0.0, 0.2, 1);
}

.auth-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.auth-submit:active {
  background: var(--brand-cyan-press, #009974);
}

.auth-submit.is-secondary {
  border: 0.5px solid rgba(60, 60, 67, 0.18);
  background: #FFFFFF;
  color: #000000;
  box-shadow: none;
}

.auth-form.is-busy {
  opacity: 0.72;
}

.auth-form.is-busy input,
.auth-form.is-busy button {
  pointer-events: none;
}

.auth-status {
  margin: 0;
  padding: 10px 12px;
  border: 0.5px solid rgba(52, 199, 89, 0.30);
  border-radius: 12px;
  background: rgba(52, 199, 89, 0.10);
  color: #248A3D;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}

.auth-status.is-error {
  border-color: rgba(255, 59, 48, 0.30);
  background: rgba(255, 59, 48, 0.08);
  color: #FF3B30;
}

.sheet-result {
  width: 100%;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
}

.sheet-result span:last-child {
  justify-self: end;
  color: var(--faint);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.sheet-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(64px + env(safe-area-inset-bottom, 0px) + 12px);
  z-index: 200;
  max-width: min(420px, calc(100% - 32px));
  padding: 10px 16px;
  border: 0;
  border-radius: 999px;
  background: rgba(28, 28, 30, 0.92);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  color: #FFFFFF;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.005em;
  box-shadow: 0 0 0 0.5px rgba(60, 60, 67, 0.14), 0 8px 24px rgba(0, 0, 0, 0.16);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition: opacity 200ms cubic-bezier(0.4, 0.0, 0.2, 1), transform 200ms cubic-bezier(0.32, 0.72, 0, 1);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@keyframes viewIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes syncBar {
  0% {
    transform: translateX(-45%);
  }
  100% {
    transform: translateX(320%);
  }
}

@keyframes statusPulse {
  0%,
  100% {
    opacity: 0.65;
  }
  50% {
    opacity: 1;
  }
}

.placeholder-view {
  padding: 24px;
}

.placeholder-view h1 {
  font-size: 32px;
}

.placeholder-view p {
  margin-top: 8px;
  color: var(--muted);
  font-weight: 700;
}

@media (max-width: 980px) {
  .wallet-layout {
    grid-template-columns: 1fr;
  }

  .module-layout {
    grid-template-columns: 1fr;
  }

  .module-main {
    position: static;
  }

  .apps-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hunt-integrated {
    grid-template-columns: 1fr;
  }

  .activity-list {
    grid-template-columns: 1fr;
  }

  .service-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  :root {
    --header-h: 62px;
    --nav-h: 68px;
    --chrome-top-h: 50px;
  }

  .brand-text span,
  .profile-copy span {
    display: none;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
  }

  .profile-button {
    width: 42px;
    padding: 4px;
  }

  .profile-copy {
    display: none;
  }

  .view-stack {
    padding: 12px 10px calc(var(--nav-h) + 26px + env(safe-area-inset-bottom));
  }

  .account-panel,
  .home-section,
  .wallet-panel {
    padding: 16px;
  }

  .account-line,
  .wallet-head {
    display: grid;
  }

  h1 {
    font-size: 30px;
  }

  .status-pill {
    justify-self: start;
  }

  .balance-value {
    font-size: 36px;
  }

  .quick-actions {
    grid-template-columns: repeat(4, minmax(68px, 1fr));
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .quick-actions button,
  .wallet-actions button {
    min-height: 74px;
  }

  .wallet-actions {
    grid-template-columns: repeat(4, minmax(68px, 1fr));
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .wallet-details div {
    grid-template-columns: 80px minmax(0, 1fr);
    padding: 9px 12px;
  }

  .wallet-history-row {
    padding: 10px 12px;
  }

  .service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .apps-metrics,
  .hunt-summary,
  .module-metrics {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .apps-tools {
    grid-template-columns: 1fr;
  }

  .apps-filter-bar {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: visible;
  }

  .apps-filter-bar button {
    min-width: 0;
    min-height: 44px;
    font-size: 12px;
  }

  .apps-grid {
    grid-template-columns: 1fr;
  }

  .hunt-actions {
    grid-template-columns: repeat(3, minmax(68px, 1fr));
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .module-actions {
    grid-template-columns: repeat(3, minmax(68px, 1fr));
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .hunt-actions button,
  .module-actions button {
    min-height: 76px;
    border-radius: 12px;
  }

  .hunt-game-head {
    padding: 12px 14px;
  }

  .hunt-game-frame {
    height: calc(100vh - var(--header-h) - var(--nav-h) - 104px);
    min-height: 560px;
  }

  .messenger-shell {
    position: relative;
    display: block;
    border-radius: var(--radius-md);
  }

  .messenger-sidebar {
    height: 100%;
    min-height: 0;
    border-right: 0;
  }

  .chat-panel {
    position: absolute;
    inset: 0;
    display: grid;
    z-index: 3;
    background: var(--surface);
    opacity: 0;
    pointer-events: none;
    transform: translateX(18px);
    transition: opacity 160ms var(--ease-out), transform 160ms var(--ease-out);
  }

  .app-shell[data-chat-open="true"] .messenger-sidebar {
    opacity: 0;
    pointer-events: none;
  }

  .app-shell[data-chat-open="true"] .chat-panel {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
  }

  .icon-back {
    display: inline-grid;
  }

  .message {
    max-width: 86%;
  }

  .bottom-nav {
    max-width: 100%;
  }

  .sheet-panel {
    max-width: 100%;
    max-height: min(88vh, calc(100vh - 18px));
  }

  .action-sheet[data-sheet-mode="legacy"] .sheet-panel {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-height: none;
    border: 0;
    border-radius: 0;
  }

  .action-sheet[data-sheet-mode="legacy"] .sheet-head {
    padding-top: max(18px, env(safe-area-inset-top));
  }

  .action-sheet[data-sheet-mode="legacy"] .sheet-body {
    padding: 8px;
  }

  .action-sheet[data-sheet-mode="legacy"] .legacy-frame {
    height: 100%;
    min-height: 0;
  }

  .sheet-head {
    padding-inline: 16px;
  }

  .sheet-body {
    padding-inline: 16px;
  }

  .sheet-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 420px) {
  .balance-value,
  .wallet-balance-card strong {
    font-size: 32px;
  }

  .balance-foot,
  .wallet-meta-line {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .thread-preview,
  .thread-row {
    grid-template-columns: 36px minmax(0, 1fr) auto;
  }

  .module-row {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .module-value {
    grid-column: 2;
    justify-self: start;
    max-width: 100%;
    text-align: left;
  }

  .avatar {
    width: 34px;
    height: 34px;
  }

  .bottom-nav button {
    min-height: 44px;
    font-size: 10px;
  }

  .sheet-row,
  .sheet-result {
    grid-template-columns: 1fr;
  }

  .sheet-result span:last-child {
    justify-self: start;
  }
}

/* Soft V3 visual pass: keep V4 layout, add only the calmer parts of the V3 language. */
body {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(246, 248, 251, 0.92) 32%),
    #f2f2f7;
}


.avatar-mini,
.avatar {
  box-shadow:
    0 1px 3px rgba(15, 20, 30, 0.08),
    0 0 0 2px rgba(255, 255, 255, 0.85);
}

.profile-button,
.icon-button,
.text-button {
  border-color: rgba(60, 60, 67, 0.14);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 1px 3px rgba(15, 20, 30, 0.07);
}


.account-panel::before,
.wallet-balance-card::before {
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  content: "";
  background: linear-gradient(90deg, var(--teal), var(--teal-dark));
  opacity: 0;
}


.app-mark[data-tone="wallet"] {
  background: linear-gradient(135deg, var(--teal-dark), #1a6faf);
}

.app-mark[data-tone="lab"] {
  background: linear-gradient(135deg, #2563eb, #6d5ce7);
}

.app-mark[data-tone="docs"] {
  background: linear-gradient(135deg, #c07b1a, #c45379);
}

.app-mark[data-tone="ai"] {
  background: linear-gradient(135deg, #3d4a5e, #6d5ce7);
}

.app-mark[data-tone="guard"] {
  background: linear-gradient(135deg, #1a8a46, var(--teal-dark));
}

.app-mark[data-tone="market"] {
  background: linear-gradient(135deg, #c2320c, #b77019);
}

.apps-filter-bar,
.segmented-control {
  border-color: var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
}

.apps-filter-bar button.is-selected,
.segmented-control button.is-selected {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-xs), inset 0 0 0 1px var(--line);
}

.thread-row.is-active {
  background: rgba(0,0,0,0.04);
}


.sheet-action.is-primary {
  background: #00B789;
  color: #FFFFFF;
  border-color: transparent;
}

@media (max-width: 720px) {
  .app-shell {
    padding-bottom: calc(92px + env(safe-area-inset-bottom));
  }


  .sheet-panel {
    max-width: 100%;
    border-radius: 14px 14px 0 0;
  }

  .action-sheet[data-sheet-mode="legacy"] .sheet-panel {
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --d-instant:    0ms;
    --d-fast:       0ms;
    --d-base:       0ms;
    --d-sheet:      0ms;
    --d-modal:      0ms;
    --d-deliberate: 0ms;
  }

  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }

  .view.is-active {
    animation: none;
  }
}

html {
  background: var(--bg);
}

body {
  background:
    linear-gradient(180deg, #fbfbfd 0%, #f7f7fa 28%, #f2f3f5 100%),
    var(--bg);
}


.brand-text strong,
h1,
h2 {
  font-weight: 820;
}

.section-kicker {
  color: rgba(60, 60, 67, 0.60);
  font-weight: 400;
  letter-spacing: 0.02em;
}


.profile-button,
.icon-button,
.text-button,
.search-field,
.apps-search-field {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.sheet-search {
  border-color: transparent;
  background: #F2F2F7;
  box-shadow: inset 0 0 0 0.5px rgba(60, 60, 67, 0.18);
}

.profile-button:hover,
.icon-button:hover,
.text-button:hover,
.quick-actions button:hover,
.wallet-actions button:hover,
.hunt-actions button:hover,
.module-actions button:hover,
.thread-preview:hover,
.thread-row:hover,
.service-item:hover,
.app-card:hover,
.registry-row:hover,
.hunt-lock-row:hover,
.module-row:hover,
.sheet-result:hover {
  border-color: rgba(60, 60, 67, 0.22);
  background: #FFFFFF;
  box-shadow: 0 0 0 0.5px rgba(60, 60, 67, 0.10), 0 1px 2px rgba(60, 60, 67, 0.04), 0 8px 24px rgba(60, 60, 67, 0.06);
}


.action-icon,
.nav-glyph {
  opacity: 0.92;
}

.apps-metrics span,
.hunt-summary div,
.module-metrics span,
.wallet-details div,
.wallet-history-row,
.registry-row,
.hunt-lock-row,
.module-row,
.thread-preview,
.thread-row,
.sheet-row,
.sheet-note,
.sheet-result {
  border-color: transparent;
  border-radius: 18px;
  background: #FFFFFF;
}


.message.is-me .bubble {
  background: var(--brand-cyan, #00B789);
  border-color: transparent;
}


/* .toast backdrop-filter merged into primary .toast definition above. */

/* Apple2 icon pass: replace hand-drawn CSS shapes with refined SVG masks. */
.icon-button,
.action-icon,
.nav-glyph,
.search-glyph {
  color: var(--muted);
}

.icon-button:hover {
  color: var(--ink);
}

.action-icon::before,
.nav-glyph::before,
.icon-button::before,
.search-glyph::before {
  content: "";
  position: absolute;
  width: auto !important;
  height: auto !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: currentColor !important;
  box-shadow: none !important;
  transform: none !important;
  -webkit-mask: var(--icon-mask) center / contain no-repeat;
  mask: var(--icon-mask) center / contain no-repeat;
}

.action-icon::before,
.nav-glyph::before {
  inset: 2px;
}

.icon-button::before {
  inset: 10px;
}

.search-glyph::before {
  inset: 0;
}

.action-icon::after,
.nav-glyph::after,
.icon-button::after,
.search-glyph::after {
  display: none !important;
}

.icon-send {
  color: #6875f5;
  --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.15' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 2 11 13'/%3E%3Cpath d='M22 2 15 22 11 13 2 9 22 2Z'/%3E%3C/svg%3E");
}

.icon-receive {
  color: var(--teal);
  --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.15' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v11'/%3E%3Cpath d='m7 9 5 5 5-5'/%3E%3Cpath d='M5 16v3a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3'/%3E%3C/svg%3E");
}

.icon-swap {
  color: #a87900;
  --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.15' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 3h5v5'/%3E%3Cpath d='M4 20 21 3'/%3E%3Cpath d='M21 16v5h-5'/%3E%3Cpath d='M15 15l6 6'/%3E%3Cpath d='M4 4l5 5'/%3E%3C/svg%3E");
}

.icon-chat,
.nav-chat {
  color: var(--teal);
  --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.15' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12a8 8 0 0 1-8 8H8l-5 3 1.7-5.1A8 8 0 1 1 21 12Z'/%3E%3Cpath d='M8 12h8'/%3E%3C/svg%3E");
}

.icon-refresh {
  color: var(--green);
  --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.15' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12a9 9 0 0 1-15.5 6.2'/%3E%3Cpath d='M3 12A9 9 0 0 1 18.5 5.8'/%3E%3Cpath d='M18 2v5h5'/%3E%3Cpath d='M6 22v-5H1'/%3E%3C/svg%3E");
}

.icon-hunt-run,
.nav-hunt {
  color: #5b6ee1;
  --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.05' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8'/%3E%3Cpath d='M12 2v4'/%3E%3Cpath d='M12 18v4'/%3E%3Cpath d='M2 12h4'/%3E%3Cpath d='M18 12h4'/%3E%3Ccircle cx='12' cy='12' r='2'/%3E%3C/svg%3E");
}

.icon-apps,
.nav-apps {
  color: #606774;
  --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Crect x='4' y='4' width='6' height='6' rx='1.6'/%3E%3Crect x='14' y='4' width='6' height='6' rx='1.6'/%3E%3Crect x='4' y='14' width='6' height='6' rx='1.6'/%3E%3Crect x='14' y='14' width='6' height='6' rx='1.6'/%3E%3C/svg%3E");
}

.icon-search,
.search-glyph {
  --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.15' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.8-3.8'/%3E%3C/svg%3E");
}

.icon-bell {
  --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.15' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 8a6 6 0 0 0-12 0c0 7-3 7-3 9h18c0-2-3-2-3-9'/%3E%3Cpath d='M10 21h4'/%3E%3C/svg%3E");
}

.icon-more {
  --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Ccircle cx='5' cy='12' r='2'/%3E%3Ccircle cx='12' cy='12' r='2'/%3E%3Ccircle cx='19' cy='12' r='2'/%3E%3C/svg%3E");
}

.icon-add {
  --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.35' stroke-linecap='round'%3E%3Cpath d='M12 5v14'/%3E%3Cpath d='M5 12h14'/%3E%3C/svg%3E");
}

.sheet-close.icon-add {
  --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.35' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12'/%3E%3Cpath d='M18 6 6 18'/%3E%3C/svg%3E");
}

.icon-back {
  --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.35' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m15 18-6-6 6-6'/%3E%3C/svg%3E");
}

.icon-call {
  --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.05' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.9v3a2 2 0 0 1-2.2 2 19.7 19.7 0 0 1-8.6-3.1 19.4 19.4 0 0 1-6-6A19.7 19.7 0 0 1 2.1 4.2 2 2 0 0 1 4.1 2h3a2 2 0 0 1 2 1.7c.1 1 .4 2 .7 2.8a2 2 0 0 1-.5 2.1L8.1 9.9a16 16 0 0 0 6 6l1.3-1.3a2 2 0 0 1 2.1-.5c.9.3 1.8.6 2.8.7a2 2 0 0 1 1.7 2.1Z'/%3E%3C/svg%3E");
}

.icon-trash {
  --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.05' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18'/%3E%3Cpath d='M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2'/%3E%3Cpath d='M19 6l-1 16H6L5 6'/%3E%3Cpath d='M10 11v6'/%3E%3Cpath d='M14 11v6'/%3E%3C/svg%3E");
}

.icon-trash:hover {
  color: var(--red);
}

.icon-mic {
  --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2a3 3 0 0 0-3 3v6a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z'/%3E%3Cpath d='M19 10v1a7 7 0 0 1-14 0v-1'/%3E%3Cpath d='M12 18v4'/%3E%3Cpath d='M8 22h8'/%3E%3C/svg%3E");
}

.icon-end-call {
  --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15.5c-5.7-4-12.3-4-18 0'/%3E%3Cpath d='M6.5 13.6 5.2 17a2 2 0 0 0 1.9 2.7h2.2a2 2 0 0 0 2-1.6l.2-1.1a9.3 9.3 0 0 1 3 0l.2 1.1a2 2 0 0 0 2 1.6h2.2a2 2 0 0 0 1.9-2.7l-1.3-3.4'/%3E%3C/svg%3E");
}

.icon-attach {
  --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.05' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21.4 11.6-8.9 8.9a6 6 0 0 1-8.5-8.5l9.5-9.5a4 4 0 0 1 5.7 5.7l-9.5 9.5a2 2 0 0 1-2.8-2.8l8.8-8.8'/%3E%3C/svg%3E");
}

.nav-home {
  --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.15' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 11.5 12 4l9 7.5'/%3E%3Cpath d='M5.5 10.5V20h13v-9.5'/%3E%3Cpath d='M9.5 20v-5h5v5'/%3E%3C/svg%3E");
}

.nav-wallet {
  --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.15' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 7.5A2.5 2.5 0 0 1 5.5 5H19a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H5.5A2.5 2.5 0 0 1 3 17.5Z'/%3E%3Cpath d='M16 12h5'/%3E%3Cpath d='M17.5 15.5h.1'/%3E%3C/svg%3E");
}

.bottom-nav button.is-active .nav-glyph {
  color: #000000;
}


.action-icon {
  width: 26px;
  height: 26px;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, currentColor 10%, transparent);
}

.action-icon::before {
  inset: 5px;
}

.quick-actions .action-icon {
  margin-bottom: 1px;
}

.icon-button {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), 0 8px 22px rgba(31, 41, 55, 0.055);
}

.icon-button::before {
  inset: 9px;
}

.bottom-nav .nav-glyph {
  width: 24px;
  height: 24px;
  border-radius: 0;
  background: transparent;
}

.bottom-nav button.is-active .nav-glyph {
  border-radius: 0;
  background: transparent;
}

.bottom-nav .nav-glyph::before {
  inset: 3px;
}

.section-head p:empty,
#homeIdentity:empty,
.app-card p {
  display: none;
}

body {
  background:
    linear-gradient(180deg, #ffffff 0, #f7f8fb 260px),
    var(--bg);
}


.app-shell[data-signed-in="false"] .profile-button {
  border-color: rgba(10, 132, 255, 0.3);
  background: rgba(10, 132, 255, 0.08);
  color: #0a4fbf;
  box-shadow: inset 0 0 0 1px rgba(10, 132, 255, 0.08);
}

.app-shell[data-signed-in="false"] .avatar-mini {
  background: var(--blue) !important;
  color: #ffffff;
}


.apps-metrics span,
.hunt-summary div,
.module-metrics span,
.wallet-details div {
  border-color: var(--line);
  background: var(--surface);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}


.action-icon {
  background: color-mix(in srgb, currentColor 12%, #ffffff);
}


/* AI UX refresh: cleaner assistant workspace and embedded chat sheet. */
.view-ai .module-layout {
  grid-template-columns: minmax(320px, 0.72fr) minmax(0, 1.28fr);
}

.view-ai .module-main {
  position: sticky;
  top: calc(var(--header-h) + 14px);
  overflow: hidden;
  border-color: rgba(17, 24, 39, 0.10);
  background: #ffffff;
}

.view-ai .module-main::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  content: "";
  background: #111827;
}

.view-ai .section-head {
  align-items: center;
}

.view-ai .section-head h1 {
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.04;
}

.view-ai .module-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.view-ai .module-metrics span {
  min-height: 58px;
  align-content: center;
}

.view-ai .module-actions {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.view-ai .module-actions button {
  min-height: 72px;
  padding: 10px 8px;
  background: #ffffff !important;
}

.view-ai .module-actions button:nth-child(2) {
  border-color: rgba(17, 24, 39, 0.18);
  background: #111827 !important;
  color: #ffffff;
}

.view-ai .module-actions button:nth-child(2) .action-icon {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
}

.view-ai .module-row {
  min-height: 62px;
}

.view-ai .module-mark {
  background: #111827;
}

.action-sheet[data-sheet-mode="legacy"][data-legacy-key="ai-chat"] .sheet-panel {
  width: min(1080px, calc(100vw - 24px));
  background: rgba(248, 250, 252, 0.98);
}

.action-sheet[data-sheet-mode="legacy"][data-legacy-key="ai-chat"] .sheet-head {
  padding: 18px 18px 12px;
}

.action-sheet[data-sheet-mode="legacy"][data-legacy-key="ai-chat"] .sheet-body {
  padding: 10px;
}

.legacy-frame-shell[data-legacy-key="ai-chat"] {
  border-color: rgba(17, 24, 39, 0.10);
  background: #f8fafc;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.legacy-frame[data-legacy-key="ai-chat"] {
  background: #f8fafc;
}

.thread-row[data-kind="regional"],
.thread-row[data-kind="random"] {
  position: relative;
  overflow: hidden;
}

.thread-row[data-kind="regional"]::before,
.thread-row[data-kind="random"]::before {
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 999px;
  content: "";
}

.thread-row[data-kind="regional"]::before {
  background: var(--text-secondary, rgba(60,60,67,0.60));
}

.thread-row[data-kind="random"]::before {
  background: var(--blue);
}

.thread-row[data-kind="regional"].is-active {
  background: rgba(0,0,0,0.04);
}

.thread-row[data-kind="random"].is-active {
  background: rgba(0,0,0,0.04);
}

.chat-panel[data-kind="regional"] .chat-header {
  box-shadow: inset 3px 0 0 rgba(60, 60, 67, 0.28);
}

.chat-panel[data-kind="random"] .chat-header {
  box-shadow: inset 3px 0 0 rgba(10, 132, 255, 0.76);
}

.chat-panel[data-kind="regional"] .composer-input:focus-within {
  border-color: rgba(60, 60, 67, 0.32);
  box-shadow: 0 0 0 3px rgba(60, 60, 67, 0.08);
}

.chat-panel[data-kind="random"] .composer-input:focus-within {
  border-color: rgba(10, 132, 255, 0.36);
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.10);
}

.message[data-status="sending"] small {
  color: var(--blue);
}

.message[data-status="pending"] .bubble {
  border-style: dashed;
  opacity: 0.88;
}

.message[data-status="pending"] small {
  color: #b45309;
}

@media (max-width: 980px) {
  .view-ai .module-layout {
    grid-template-columns: 1fr;
  }

  .view-ai .module-main {
    position: static;
  }
}

@media (max-width: 560px) {
  .view-ai .module-metrics,
  .view-ai .module-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .view-ai .module-actions button {
    min-height: 64px;
  }

  .action-sheet[data-sheet-mode="legacy"][data-legacy-key="ai-chat"] .sheet-panel {
    inset: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
    width: auto;
    border-radius: 8px;
  }

  .action-sheet[data-sheet-mode="legacy"][data-legacy-key="ai-chat"] .sheet-body {
    padding: 8px;
  }
}

body {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(244, 246, 248, 0.98) 210px),
    var(--bg);
}


.brand-text strong {
  font-size: 18px;
  line-height: 1;
}

.brand-text span,
.section-kicker {
  color: rgba(60, 60, 67, 0.60);
}

.profile-button,
.icon-button {
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(15, 23, 42, 0.12);
  box-shadow: 0 1px 2px rgba(16, 24, 39, 0.04);
}

.profile-button {
  height: 44px;
}


.home-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.78fr) minmax(420px, 1.22fr);
  grid-template-areas:
    "account inbox"
    "activity activity"
    "service service";
  gap: 14px;
  align-items: start;
}

.account-panel {
  grid-area: account;
}


.messenger-summary {
  grid-area: inbox;
}

.activity-section {
  grid-area: activity;
}

.service-section {
  grid-area: service;
}

.account-line h1,
.wallet-head h1,
.apps-head h1,
.hunt-head h1,
.section-head h1 {
  font-size: 32px;
  line-height: 1.06;
}


.service-card,
.activity-card,
.thread-preview {
  border-color: rgba(17, 24, 39, 0.08);
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(16, 24, 39, 0.04);
}

.thread-preview-list,
.activity-list {
  gap: 8px;
}

.thread-preview,
.activity-card {
  min-height: 64px;
}


.service-card {
  min-height: 106px;
  padding: 14px;
}


.messenger-titlebar {
  padding: 16px 14px 10px;
}

.messenger-titlebar h1 {
  font-size: 27px;
  line-height: 1.05;
}

.search-field {
  height: 42px;
  margin: 0 12px 8px;
  border-color: rgba(17, 24, 39, 0.10);
  background: #ffffff;
}

.search-field input {
  font-size: 15px;
}

.segmented-control {
  margin: 0 12px 10px;
  padding: 3px;
  background: #e9eef5;
}

.segmented-control button {
  min-height: 40px;
  font-size: 12px;
}

.segmented-control button.is-selected {
  color: #101827;
}

.thread-list {
  gap: 0;
  padding: 0 0 12px;
}

.thread-row {
  min-height: 72px;
  padding: 12px 16px 12px 28px;
  border: 0;
  border-radius: 0;
}

.thread-row:hover {
  background: var(--surface-tertiary, #EFEFF4);
  box-shadow: none;
}

.thread-row.is-active {
  background: rgba(0,0,0,0.04);
  box-shadow: none;
}

.chat-header {
  min-height: 64px;
  background: var(--surface-chrome, rgba(242,242,247,0.82));
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}

.message.is-me .bubble {
  background: var(--brand-cyan, #00B789);
  border-color: transparent;
}

.composer {
  gap: 8px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: var(--surface-canvas, #F2F2F7);
}


@media (max-width: 980px) {
  .home-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "inbox"
      "account"
      "activity"
      "service";
  }

  .messenger-shell {
    grid-template-columns: minmax(280px, 40%) minmax(0, 1fr);
  }

  .service-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  :root {
    --header-h: 62px;
    --nav-h: 74px;
    --chrome-top-h: 50px;
  }

  .app-header {
    padding: 8px 12px;
  }

  .brand-text strong {
    font-size: 17px;
  }

  .brand-text span,
  .profile-copy {
    display: none;
  }

  .profile-button {
    width: 46px;
    padding: 4px;
  }

  .view-stack {
    padding-inline: 10px;
  }

  .account-line h1,
  .wallet-head h1,
  .apps-head h1,
  .hunt-head h1,
  .section-head h1,
  .messenger-titlebar h1 {
    font-size: 28px;
  }

  .quick-actions,
  .wallet-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quick-actions button,
  .wallet-actions button {
    min-height: 74px;
  }

  .messenger-titlebar {
    padding: 16px 12px 8px;
  }

  .search-field {
    height: 44px;
    margin-inline: 12px;
  }

  .segmented-control {
    margin-inline: 12px;
  }

  .thread-row {
    min-height: 74px;
    padding: 10px;
  }

  .chat-header {
    min-height: 60px;
    padding: 8px 10px;
  }

  .message-feed {
    padding: 12px;
  }

  .message {
    max-width: 86%;
  }

  .composer {
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  }

  .bottom-nav {
    max-width: 100%;
  }

  .bottom-nav button {
    min-height: 44px;
    font-size: 10px;
  }
}

/* 2026-06-06 clean pass: remove visual crowding while preserving behavior. */


.view-messenger {
  min-height: 0;
}


.composer {
  position: relative;
  align-self: end;
  height: fit-content;
  min-height: 0;
  z-index: 8;
  border-top: 0.5px solid rgba(60,60,67,0.18);
  box-shadow: none;
}


.action-sheet:not([data-sheet-mode="legacy"]) .sheet-panel {
  /* V5: bottom-sheet everywhere — base rule handles position */
  max-height: 88vh;
}

.action-sheet:not([data-sheet-mode="legacy"]).is-open .sheet-panel {
  transform: translateX(-50%) translateY(0);
}

.action-sheet:not([data-sheet-mode="legacy"]) .sheet-head {
  padding: 18px 16px 12px;
}

.action-sheet:not([data-sheet-mode="legacy"]) .sheet-body {
  padding: 14px 16px 16px;
}

.action-sheet:not([data-sheet-mode="legacy"]) .sheet-actions {
  padding: 12px 16px 16px;
}

@media (max-width: 720px) {


  .view-messenger {
    min-height: 0;
  }

  .bottom-nav {
    max-width: 100%;
  }

  .action-sheet:not([data-sheet-mode="legacy"]) .sheet-panel {
    width: min(430px, calc(100vw - 18px));
    max-height: calc(100vh - 18px);
  }
}

@media (max-width: 420px) {
  .header-actions {
    gap: 6px;
  }

  .icon-button {
    width: 40px;
    height: 40px;
  }

  .account-panel,
  .home-section {
    padding: 16px;
  }

  .messenger-titlebar h1 {
    font-size: 26px;
  }

  .search-field input {
    font-size: 15px;
  }

  .thread-row {
    grid-template-columns: 38px minmax(0, 1fr) auto;
  }

  .avatar {
    width: 36px;
    height: 36px;
  }

  .send-button {
    width: 32px;
    height: 32px;
    min-height: 32px;
    padding: 0;
  }
}

body {
  background: var(--bg) !important;
  color: var(--ink) !important;
}


.brand-mark,
.avatar,
.thread-avatar,
.app-icon,
.activity-icon,
.service-icon {
  border-radius: 8px !important;
  box-shadow: none !important;
}

.brand-text span,
.profile-copy span,
.section-kicker,
.muted,
.thread-row small,
.activity-row small {
  color: var(--muted) !important;
}

.icon-button,
.profile-button,
.text-button,
.primary-button,
.secondary-button,
.send-button,
.segmented-control button {
  border-radius: 8px !important;
  box-shadow: none !important;
  letter-spacing: 0 !important;
}

.icon-button,
.profile-button,
.text-button,
.secondary-button,
.quick-actions button {
  background: #ffffff !important;
  border: 1px solid var(--line) !important;
  color: var(--muted) !important;
}

.text-button:hover,
.icon-button:hover,
.quick-actions button:hover {
  background: #eef7fc !important;
  border-color: #9ed3ec !important;
  color: #0f5f86 !important;
}


.account-panel,
.home-section,
.wallet-shell,
.apps-panel,
.hunt-shell,
.activity-row,
.service-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
}

.thread-row {
  background: var(--surface-elevated, #FFFFFF) !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.action-sheet .sheet-panel {
  background: #FFFFFF !important;
  border: 0 !important;
  border-radius: 14px 14px 0 0 !important;
  box-shadow: 0 -0.5px 0 rgba(60, 60, 67, 0.18), 0 -8px 32px rgba(0, 0, 0, 0.12) !important;
}

.account-panel {
  padding: 20px !important;
}
.home-section {
  padding: 0 !important;
}

.account-line {
  align-items: center !important;
}

.account-line h1 {
  color: #000000 !important;
  letter-spacing: -0.03em !important;
}
.messenger-titlebar h1,
.page-title h1,
.section-head h2 {
  color: var(--ink) !important;
  letter-spacing: 0 !important;
}


.balance-foot {
  gap: 8px !important;
  font-weight: 400 !important;
  color: rgba(60, 60, 67, 0.60) !important;
}

.status-pill,
.sync-pill {
  background: var(--surface-tertiary, #EFEFF4) !important;
  border: none !important;
  border-radius: 999px !important;
  color: var(--text-secondary, rgba(60, 60, 67, 0.60)) !important;
  box-shadow: inset 0 0 0 0.5px rgba(60, 60, 67, 0.10) !important;
}


.quick-actions button {
  min-height: 84px;
}

.action-icon {
  background: var(--surface-tertiary, #EFEFF4) !important;
  border: none !important;
  color: var(--text-primary, #000000) !important;
  box-shadow: inset 0 0 0 0.5px rgba(60, 60, 67, 0.10) !important;
}

.wallet-actions button[data-wallet-action="send"]:not(:disabled) .action-icon,
.quick-actions button[data-action="send"] .action-icon {
  background: rgba(255, 255, 255, 0.24) !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

.chat-header {
  background: var(--surface-chrome, rgba(242,242,247,0.82)) !important;
  border-color: #E5E5EA;
}

.composer {
  background: var(--surface-canvas, #F2F2F7);
  border-color: rgba(60,60,67,0.18);
}

.segmented-control {
  background: rgba(118,118,128,0.12) !important;
  padding: 3px !important;
}

.segmented-control button.is-selected,
.segmented-control button[aria-selected="true"] {
  background: var(--surface-elevated, #FFFFFF) !important;
  color: var(--text-primary, #000) !important;
}

.thread-row {
  border-color: transparent !important;
  box-shadow: none !important;
}

.thread-row.is-active {
  background: rgba(0,0,0,0.04) !important;
  border-color: transparent !important;
}

.thread-row:hover {
  background: var(--surface-tertiary, #EFEFF4) !important;
  border-color: transparent !important;
}

.bubble {
  border-radius: 18px !important;
}


.bottom-nav button[aria-current="page"] {
  background: transparent !important;
  color: #000000 !important;
  font-weight: 600 !important;
}

.bottom-nav .nav-icon,
.bottom-nav svg {
  color: currentColor !important;
}

@media (min-width: 960px) {
  .home-grid {
    grid-template-columns: minmax(320px, 0.9fr) minmax(440px, 1.4fr) !important;
  }
}

@media (max-width: 720px) {
  .brand-text span {
    display: none !important;
  }

  .profile-copy {
    display: none !important;
  }

  .account-panel,
  .home-section {
    padding: 16px;
  }

  .messenger-shell {
    height: calc(100vh - var(--header-h) - var(--nav-h) - 18px) !important;
    height: calc(100dvh - var(--header-h) - var(--nav-h) - 18px) !important;
    min-height: 0 !important;
  }


}

/* V4 Hunt fullscreen pass: keep the v3-grade game surface as the primary UI. */
.app-shell[data-active-view="hunt"] {
  --hunt-nav-clear: calc(var(--nav-h) + 24px + env(safe-area-inset-bottom));
  min-height: 100vh;
  padding-bottom: 0 !important;
  background: #0f172a;
}

.app-shell[data-active-view="hunt"] .app-header {
  display: none !important;
}

.app-shell[data-active-view="hunt"] .view-stack {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.app-shell[data-active-view="hunt"] .view-hunt.is-active,
.app-shell[data-active-view="hunt"] .hunt-layout,
.app-shell[data-active-view="hunt"] .hunt-game-panel {
  display: block !important;
  width: 100% !important;
  height: calc(100vh - var(--hunt-nav-clear));
  min-height: 0 !important;
  overflow: hidden !important;
}

.app-shell[data-active-view="hunt"] .hunt-layout {
  grid-template-columns: 1fr !important;
  gap: 0 !important;
}

.app-shell[data-active-view="hunt"] .hunt-main,
.app-shell[data-active-view="hunt"] .hunt-locks {
  display: none !important;
}

.app-shell[data-active-view="hunt"] .hunt-game-panel {
  position: relative;
  order: 0 !important;
  grid-column: 1 / -1 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #0f172a !important;
  box-shadow: none !important;
}

.app-shell[data-active-view="hunt"] .hunt-game-head {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 6;
  display: flex !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

.app-shell[data-active-view="hunt"] .hunt-game-head > div {
  display: none !important;
}

.app-shell[data-active-view="hunt"] .hunt-game-head .text-button {
  min-height: 44px !important;
  padding: 0 12px !important;
  border: 1px solid rgba(148, 163, 184, 0.38) !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.92) !important;
  color: #0f172a !important;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18) !important;
  backdrop-filter: blur(12px);
}

.app-shell[data-active-view="hunt"] .hunt-game-frame {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #f8fafc !important;
}

@supports (height: 100dvh) {
  .app-shell[data-active-view="hunt"] {
    min-height: 100dvh;
  }

  .app-shell[data-active-view="hunt"] .view-hunt.is-active,
  .app-shell[data-active-view="hunt"] .hunt-layout,
  .app-shell[data-active-view="hunt"] .hunt-game-panel {
    height: calc(100dvh - var(--hunt-nav-clear));
  }
}

@media (max-width: 720px) {
  .app-shell[data-active-view="hunt"] {
    --hunt-nav-clear: calc(var(--nav-h) + 18px + env(safe-area-inset-bottom));
  }

  .app-shell[data-active-view="hunt"] .bottom-nav {
    bottom: max(6px, env(safe-area-inset-bottom)) !important;
    width: calc(100% - 12px) !important;
  }

  .app-shell[data-active-view="hunt"] .hunt-game-head {
    top: 8px;
    right: 8px;
  }

  .app-shell[data-active-view="hunt"] .hunt-game-head .text-button {
    min-height: 32px !important;
    padding: 0 10px !important;
    font-size: 0.76rem !important;
  }
}

/* ── V5 port append: :root token block, @font-face, global re ── */
/* ── V5 Global focus-visible double-ring (WCAG 1.4.11 opaque, visible on white + #F2F2F7) ── */
*:focus:not(:focus-visible) { outline: none; }
*:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring-opaque, 0 0 0 2px #FFFFFF, 0 0 0 4px #00B789);
  border-radius: var(--r-sm, 10px);
}


/* ── V5 port append: shared-cards-rows ── */
/* ── V5 inset hairline dividers (::after, new pseudo-element rules) ── */
/* thread-preview: 54px 인셋(40px 아바타 + 12px gap + 2px 여백), scaleY(0.5) 0.5px 레티나 */
.thread-preview::after {
  content: "";
  position: absolute;
  left: 64px;
  right: 0;
  bottom: 0;
  height: 1px;
  background: rgba(60, 60, 67, 0.18);
  transform: scaleY(0.5);
  transform-origin: bottom;
  pointer-events: none;
}

/* thread-row: 16px 인셋(텍스트 시작 기준), 54px 오프셋 */
.thread-row {
  position: relative;
}
.thread-row::after {
  content: "";
  position: absolute;
  left: 64px;
  right: 0;
  bottom: 0;
  height: 1px;
  background: rgba(60, 60, 67, 0.18);
  transform: scaleY(0.5);
  transform-origin: bottom;
  pointer-events: none;
}

/* activity-item: 52px 인셋(36px mark + 16px 패딩) */
.activity-item::after {
  content: "";
  position: absolute;
  left: 64px;
  right: 0;
  bottom: 0;
  height: 1px;
  background: rgba(60, 60, 67, 0.18);
  transform: scaleY(0.5);
  transform-origin: bottom;
  pointer-events: none;
}

/* ── V5 pressed state overrides: background #EFEFF4, transform none ── */
/* 공유 :active 블록(line 465-482)의 scale(0.98)을 row/service에서만 취소 */
.thread-preview:active,
.thread-row:active,
.service-item:active {
  background: #EFEFF4;
  transform: none;
}

/* ── V5 hover: row family translateY(-1px) 유지(Linear-graft 허용) ── */
/* 기존 규칙과 동일하므로 추가 필요 없음; pressed state만 재정의 */


/* ── V5 port append: home view: .account-panel (specifics), . ── */
/* ── V5 Apple Pure 2026 — Home View overrides (home-agent appendCss) ─────────── */

/* account-panel: win against the !important shared block at lines 4109-4121.
   White elevated card on canvas, V5 multilayer shadow, 22px radius.
   We cannot rewrite that shared block so we use :where() + specificity bump. */
.account-panel.account-panel {
  background: #FFFFFF !important;
  border: none !important;
  border-radius: 22px !important;
  box-shadow: 0 0 0 0.5px rgba(60,60,67,0.10), 0 1px 2px rgba(60,60,67,0.04), 0 8px 24px rgba(60,60,67,0.06) !important;
}

/* home-section (messenger-summary / activity-section / service-section wrappers):
   plain canvas separator, no card chrome. */
.home-section.home-section {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

/* Section-head inside home-sections: V5 grouped-section-header.
   16px inset, 8px top / 4px bottom, 13px uppercase secondary. */
.home-section .section-head,
.activity-section .section-head,
.service-section .section-head {
  padding: 8px 16px 4px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Section-head h2: V5 title-2 scale (22px / 600 / -0.02em) */
.account-panel .section-head h2,
.home-section .section-head h2,
.activity-section .section-head h2,
.service-section .section-head h2 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: #000000;
  margin: 0;
}

/* account-line h1: V5 large-title (28px / 700 / -0.03em) — targeted override
   wins over the shared block at lines 3729-3736 */
.account-panel .account-line h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.06;
  color: #000000;
}

/* Section text-button (e.g. "Open" in Inbox head): V5 system-blue tint link */
.section-head .text-btn,
.section-head .text-button {
  font-size: 15px;
  font-weight: 400;
  color: var(--text-link-aa, #007A5C);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 4px;
}

/* Hover / pressed states on .account-panel — background shift, 160ms, no layout transform */
@media (hover: hover) {
  .account-line:hover {
    background: #EFEFF4;
    transition: background 160ms ease;
    border-radius: 12px;
  }
}

/* @media: keep account-panel white card on narrow viewports; wallet-panel left to wallet agent */
@media (max-width: 768px) {
  .account-panel.account-panel {
    padding: 16px !important;
    background: #FFFFFF !important;
    border-radius: 20px !important;
    box-shadow: 0 0 0 0.5px rgba(60,60,67,0.10), 0 1px 2px rgba(60,60,67,0.04), 0 8px 24px rgba(60,60,67,0.06) !important;
  }

  .balance-block {
    padding: 16px 16px 14px;
    border-radius: 18px;
  }
}

/* Very narrow (≤420px): further tighten balance card */
@media (max-width: 420px) {
  .account-panel.account-panel {
    padding: 14px !important;
    border-radius: 18px !important;
  }

  .balance-block {
    padding: 14px 14px 12px;
    border-radius: 16px;
    margin-top: 12px;
  }
}


/* ── V5 port append: wallet ── */
/* ---- Wallet: Send button — solid cyan pill (brand beat #1 of 2) ---- */
.wallet-actions button[data-wallet-action="send"]:not(:disabled) {
  background: var(--brand-cyan, #00B789);
  color: var(--text-inverse, #FFFFFF);
  box-shadow:
    0 0.5px 0 rgba(0, 0, 0, 0.04),
    0 1px 2px rgba(0, 154, 116, 0.18),
    0 8px 24px -10px rgba(0, 154, 116, 0.32);
  font-weight: 600;
  letter-spacing: -0.012em;
}
.wallet-actions button[data-wallet-action="send"]:not(:disabled):hover {
  background: #00A37C;
  box-shadow:
    0 0.5px 0 rgba(0, 0, 0, 0.04),
    0 2px 6px rgba(0, 154, 116, 0.22),
    0 10px 28px -10px rgba(0, 154, 116, 0.38);
}
.wallet-actions button[data-wallet-action="send"]:not(:disabled):active {
  background: var(--brand-cyan-press, #009974);
}

/* ---- Wallet: action-icon inside Send inherits white ---- */
.wallet-actions button[data-wallet-action="send"]:not(:disabled) .action-icon {
  color: var(--text-inverse, #FFFFFF);
}

/* ---- Wallet: details rows — inset hairline dividers ---- */
.wallet-details div:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 0;
  bottom: 0;
  height: 1px;
  background: rgba(60, 60, 67, 0.18);
  transform: scaleY(0.5);
  transform-origin: bottom;
}

/* ---- Wallet: history rows — inset hairline dividers ---- */
.wallet-history-row:not(:last-child)::after {
  content: "";
  position: absolute;
  left: calc(14px + 36px + 12px);
  right: 0;
  bottom: 0;
  height: 1px;
  background: rgba(60, 60, 67, 0.18);
  transform: scaleY(0.5);
  transform-origin: bottom;
}

/* ---- Wallet: history amount trail (positive = iOS green, sent = --text-primary) ---- */
.wallet-history-row .wallet-history-amount {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  font-size: 17px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.015em;
  color: var(--text-primary, #000000);
}
.wallet-history-row .wallet-history-amount.is-positive,
.wallet-history-row .wallet-history-amount--positive {
  color: var(--green, #34C759);
}
.wallet-history-row .wallet-history-amount .wallet-history-amount-sub {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-secondary, rgba(60, 60, 67, 0.60));
  letter-spacing: -0.005em;
}


/* ── V5 port append: apps + hunt + modules (v4.css lines 1018 ── */
/* ── V5 apps-tab live-dot animation (brand cyan beat #2 on featured Compute tile) ── */
@keyframes appsLiveDot {
  0%, 100% { box-shadow: 0 0 0 3px rgba(0,183,137,0.16); }
  50%       { box-shadow: 0 0 0 5px rgba(0,183,137,0.08); }
}

/* app-mark color variants — only Compute/featured tile gets brand-cyan (beat #1) */
.app-mark--cyan {
  background: var(--brand-cyan, #00B789);
  color: #FFFFFF;
  border-color: rgba(0,183,137,0.20);
}
.app-mark--green {
  background: rgba(52,199,89,0.10);
  color: #22863A;
  border-color: rgba(52,199,89,0.18);
}
.app-mark--orange {
  background: rgba(255,149,0,0.10);
  color: #B45309;
  border-color: rgba(255,149,0,0.18);
}
.app-mark--blue {
  background: rgba(10,132,255,0.10);
  color: #0B61D6;
  border-color: rgba(10,132,255,0.18);
}

/* Open CTA pill on featured Compute tile (brand-cyan beat #1) */
.app-cta-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  min-width: 76px;
  padding: 0 18px;
  background: var(--brand-cyan, #00B789);
  color: #FFFFFF;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.005em;
  transition: background 160ms cubic-bezier(0.32,0.72,0,1), transform 120ms cubic-bezier(0.32,0.72,0,1);
}
.app-cta-pill:active {
  background: var(--brand-cyan-press, #009974);
  transform: scale(0.97);
}
@media (prefers-reduced-motion: reduce) {
  .app-cta-pill:active { transform: none; }
}

/* Live state dot (brand-cyan beat #2 — inside featured tile only) */
.app-live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-cyan, #00B789);
  box-shadow: 0 0 0 3px rgba(0,183,137,0.16);
  animation: appsLiveDot 1800ms cubic-bezier(0.32,0.72,0,1) infinite both;
  flex-shrink: 0;
}
@media (prefers-reduced-motion: reduce) {
  .app-live-dot { animation: none; }
}

/* hunt-lock-list inherits grouped-card pattern (same as registry-list above) */
/* First/last row rounding in grouped card containers */
.registry-list > .registry-row:first-child,
.hunt-lock-list > .hunt-lock-row:first-child,
.module-list > .module-row:first-child {
  border-radius: 14px 14px 0 0;
}
.registry-list > .registry-row:last-child,
.hunt-lock-list > .hunt-lock-row:last-child,
.module-list > .module-row:last-child {
  border-radius: 0 0 14px 14px;
}
.registry-list > .registry-row:only-child,
.hunt-lock-list > .hunt-lock-row:only-child,
.module-list > .module-row:only-child {
  border-radius: 14px;
}


/* ── V5 port append: messenger ── */
/* ============================================================
   V5 MESSENGER — new rules (no existing selector to replace)
   ============================================================ */

/* Apple Mail active-thread bar: 3px black leading-edge indicator */
.thread-row.is-active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 2px 2px 0;
  background: var(--text-primary, #000);
}

/* Regional/random rows: colored kind bar stays even when not active;
   active state still shows neutral black bar via .is-active::before above */
.thread-row[data-kind="regional"]::before {
  background: var(--text-secondary, rgba(60,60,67,0.60));
}

.thread-row[data-kind="random"]::before {
  background: var(--blue, #0A84FF);
}

.thread-row[data-kind="regional"].is-active::before,
.thread-row[data-kind="random"].is-active::before {
  background: var(--text-primary, #000);
}

/* Inset hairline divider between thread rows (Geist discipline) */
.thread-row + .thread-row::after {
  content: "";
  position: absolute;
  left: 28px;
  right: 0;
  bottom: 0;
  height: 1px;
  background: rgba(60,60,67,0.18);
  transform: scaleY(0.5);
  transform-origin: bottom;
  pointer-events: none;
}

/* Bubble entrance animation (fill-mode: both required) */
@keyframes msgBubbleIn {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Typing indicator animation */
@keyframes msgTyping {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-4px); }
}

/* Typing indicator dots */
.typing-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-secondary, rgba(60,60,67,0.60));
  animation: msgTyping 1.2s ease-in-out infinite both;
}

.typing-dot:nth-child(2) { animation-delay: 0.16s; }
.typing-dot:nth-child(3) { animation-delay: 0.32s; }

/* == push90 append: H:\01_MAIN_WORK\VFZ\VFZ\code\apps\vfz-mo == */
/* ── Micro-interaction density pack (2026-07-02) ──────────────────────────── */

/* ---- 1. View-enter staggered entrance ------------------------------------ */
/* Keyframe: 자식 카드/섹션의 stagger entrance (viewIn은 이미 존재하므로 새 이름 사용) */
@keyframes cardEnterIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* 뷰가 활성화될 때 직계 자식에 stagger 적용 */
.view.is-active > *:nth-child(1) {
  opacity: 1;
  transform: none;
  animation: cardEnterIn 240ms cubic-bezier(0.2, 0, 0, 1) 0ms both;
}
.view.is-active > *:nth-child(2) {
  opacity: 1;
  transform: none;
  animation: cardEnterIn 240ms cubic-bezier(0.2, 0, 0, 1) 30ms both;
}
.view.is-active > *:nth-child(3) {
  opacity: 1;
  transform: none;
  animation: cardEnterIn 240ms cubic-bezier(0.2, 0, 0, 1) 60ms both;
}
.view.is-active > *:nth-child(n+4) {
  opacity: 1;
  transform: none;
  animation: cardEnterIn 240ms cubic-bezier(0.2, 0, 0, 1) 90ms both;
}

/* 레이아웃 래퍼(.home-grid / .wallet-layout / .apps-layout 등)가 유일한 직계 자식인
   뷰에서는 래퍼의 자식 카드들에 실제 스태거가 걸리도록 한 단계 더 내린다. */
.view.is-active > .home-grid > *:nth-child(1),
.view.is-active > .wallet-layout > *:nth-child(1),
.view.is-active > .apps-layout > *:nth-child(1),
.view.is-active > .hunt-layout > *:nth-child(1),
.view.is-active > .module-layout > *:nth-child(1) {
  opacity: 1;
  transform: none;
  animation: cardEnterIn 240ms cubic-bezier(0.2, 0, 0, 1) 0ms both;
}
.view.is-active > .home-grid > *:nth-child(2),
.view.is-active > .wallet-layout > *:nth-child(2),
.view.is-active > .apps-layout > *:nth-child(2),
.view.is-active > .hunt-layout > *:nth-child(2),
.view.is-active > .module-layout > *:nth-child(2) {
  opacity: 1;
  transform: none;
  animation: cardEnterIn 240ms cubic-bezier(0.2, 0, 0, 1) 40ms both;
}
.view.is-active > .home-grid > *:nth-child(n+3),
.view.is-active > .wallet-layout > *:nth-child(n+3),
.view.is-active > .apps-layout > *:nth-child(n+3),
.view.is-active > .hunt-layout > *:nth-child(n+3),
.view.is-active > .module-layout > *:nth-child(n+3) {
  opacity: 1;
  transform: none;
  animation: cardEnterIn 240ms cubic-bezier(0.2, 0, 0, 1) 80ms both;
}

@media (prefers-reduced-motion: reduce) {
  .view.is-active > *:nth-child(1),
  .view.is-active > *:nth-child(2),
  .view.is-active > *:nth-child(3),
  .view.is-active > *:nth-child(n+4),
  .view.is-active > .home-grid > *,
  .view.is-active > .wallet-layout > *,
  .view.is-active > .apps-layout > *,
  .view.is-active > .hunt-layout > *,
  .view.is-active > .module-layout > * {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* ---- 2. Pressed states: 80ms background transition, no scale ------------- */
/* service-item, app-card, wallet-history-row, module-row, sheet-action에 80ms 적용 */
.service-item,
.app-card,
.wallet-history-row,
.module-row,
.sheet-action {
  transition: background 80ms ease;
}

/* :active pressed backgrounds — #EFEFF4 = --surface-tertiary */
.service-item:active,
.app-card:active,
.wallet-history-row:active,
.module-row:active,
.sheet-action:active {
  background: var(--surface-tertiary, #EFEFF4);
  transform: none;
}

/* thread-row :active — 마지막 소스 순서라 !important 불필요 (기본 outline 규칙과 충돌 방지) */
.thread-row:active {
  background: var(--surface-tertiary, #EFEFF4);
  transform: none;
}

/* ---- 3. Sheet spring: 이미 280ms cubic-bezier(0.32,0.72,0,1) — 추가 불필요 --- */
/* .sheet-panel의 transition은 파일 line 2617에 정확히 정의되어 있음. 재선언 생략. */

/* ---- 4. Toast: 이미 transition 방식 200ms 구현됨 — keyframe 불필요 --------- */
/* .toast { opacity:0; transform: translate(-50%, 10px); transition: opacity 200ms ..., transform 200ms ... }
   .toast.is-visible { opacity:1; transform: translate(-50%, 0) } — 파일 line 3049~3058 그대로 유효. */

/* ---- 5. Balance hero: 첫 진입 settle animation ---------------------------- */
@keyframes balanceSettle {
  from {
    opacity: 0.4;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.balance-value {
  animation: balanceSettle 320ms cubic-bezier(0.2, 0, 0, 1) both;
}

@media (prefers-reduced-motion: reduce) {
  .balance-value {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* ---- 6. Button active: brand-cyan-press 80ms ----------------------------- */
/* .auth-submit:active는 replacements에서 80ms + 토큰으로 수정됨 */
/* wallet send:active는 파일 line 4972-4974에 이미 --brand-cyan-press 적용됨 */

/* .send-button (composer 원형 전송 버튼) :active 추가 */
.send-button:active {
  background: var(--brand-cyan-press, #009974);
  transition: background 80ms ease;
}

@media (prefers-reduced-motion: reduce) {
  .send-button:active {
    transition: none;
  }
}
/* ── End micro-interaction density pack ────────────────────────────────────── */
