/* mindset bucket: line drawings on white paper, mint accent. */

:root {
  --ink: #141414;
  --paper: #ffffff;
  --muted: #5c5c5c;
  --hair: #c8ebe0;
  --accent: #2f9a7c;
  --accent-strong: #237e65;
  --accent-deep: #1b6350;
  --accent-soft: #eafbf5;
  --accent-mid: rgba(47, 154, 124, 0.35);
  --accent-pastel: #8fe3cb;
  --warn: #8a5300;
  --danger: #b3261e;
  --signal: #e0a800;
  --stroke: 1.5px;
  --bar-space: calc(64px + env(safe-area-inset-bottom));
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  height: 100%;
}

html:has(body.create-page),
body.create-page {
  overscroll-behavior-y: none;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body > .page {
  flex: 1 0 auto;
}

body.has-gamebar {
  padding-bottom: var(--bar-space);
}

a {
  color: inherit;
  transition: color 0.12s ease;
}

a:hover {
  color: var(--accent-strong);
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---- Frame ---- */

.top,
.page {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

.top {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding-top: env(safe-area-inset-top);
}

.crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
}

.wordmark {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.02em;
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.brand-mark {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.crumb-sep {
  color: var(--muted);
  flex-shrink: 0;
}

.crumb-current {
  font-weight: 650;
  font-size: 16px;
  letter-spacing: -0.01em;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-actions {
  position: static;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.top-action {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  text-underline-offset: 4px;
  white-space: nowrap;
}


h1,
h2,
h3 {
  margin: 0;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h1 {
  font-size: 30px;
  font-weight: 700;
  margin-bottom: 6px;
}

h2 {
  font-size: 18px;
  font-weight: 650;
  margin-bottom: 8px;
}

h3 {
  font-size: 15px;
  font-weight: 650;
  margin: 14px 0 6px;
}

p {
  margin: 0 0 10px;
}

.lead {
  font-size: 17px;
}

.hint,
.meta {
  color: var(--muted);
  font-size: 14px;
}

.fineprint {
  color: var(--muted);
  font-size: 13px;
}

.eyebrow {
  margin: 0 0 2px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.number {
  font-size: 60px;
  line-height: 1;
  font-weight: 750;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  margin: 0;
}

.alias {
  color: var(--accent);
  font-weight: 600;
  margin: 0;
}

.alias.is-missing {
  color: var(--danger);
}

.head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 4px 8px;
  margin: 6px 0 8px;
  padding: 4px 0 18px;
  position: sticky;
  top: 0;
  z-index: 9;
  background: var(--paper);
  border-bottom: 1px solid var(--hair);
  box-shadow: 0 10px 18px -14px rgba(20, 20, 20, 0.28);
}

.head:has(+ .static-page),
.head:has(+ .auth-form) {
  margin-bottom: 1.5em;
}

/* Title subtitle under h1 — new / me / profile */
.head-meta {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.3;
}

/* Header actions: pinned top-right, same 40px slot on every page */
.head-back {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 12px;
  color: var(--muted);
  text-decoration: none;
  background: none;
  cursor: pointer;
}

.head > .head-back {
  position: absolute;
  top: 4px;
  right: 0;
  z-index: 1;
}

.head-back svg {
  display: block;
  width: 10px;
  height: 16px;
}

.head-back:hover {
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.head-main {
  min-width: 0;
  flex: 1 1 auto;
  padding-right: 44px;
}

.head h1 {
  margin: 0;
  min-height: 40px;
  line-height: 40px;
}

.head-side {
  order: 2;
  color: var(--muted);
  font-size: 14px;
  text-align: right;
  flex-shrink: 0;
}

a.head-side {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  font-weight: 600;
}

a.head-side:hover {
  color: var(--accent-strong);
}

.section {
  padding: 20px 0;
}

/* Page content (header + body + footer) gated; site chrome stays. */
body.is-page-loading .page,
body.is-page-loading #gated:not([hidden]),
body.is-page-loading #profile:not([hidden]) {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: calc(100dvh - 56px - var(--bar-space));
}

body.is-page-loading .current-stick,
body.is-page-loading .lake-stick,
body.is-page-loading .school-stick,
body.is-page-loading .root-stick,
body.is-page-loading .page-footer,
body.is-page-loading .page-header {
  display: none !important;
}

body.is-page-loading .page-body {
  position: relative;
  flex: 1 1 auto;
  min-height: 240px;
}

body.is-page-loading .page-body > :not(.page-loading):not(.head) {
  visibility: hidden;
  pointer-events: none;
}

body.is-page-loading header.top,
body.is-page-loading .page-chrome,
body.is-page-loading .head {
  position: relative;
  z-index: 12;
  background: var(--paper);
}

.page-loading {
  display: none;
  box-sizing: border-box;
  margin: 0;
  pointer-events: none;
}

body.is-page-loading .page-loading {
  display: flex;
  position: fixed;
  left: 0;
  right: 0;
  top: calc(56px + env(safe-area-inset-top));
  bottom: 0;
  z-index: 10;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--paper);
  visibility: visible;
}

body.has-gamebar.is-page-loading .page-loading {
  bottom: var(--bar-space);
}

.page-loading[hidden],
body:not(.is-page-loading) .page-loading {
  display: none !important;
}

.page-loading-logo {
  display: block;
  flex: 0 0 auto;
  width: min(52vw, 52dvh, 280px);
  height: min(52vw, 52dvh, 280px);
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  border: 0;
  pointer-events: none;
}

#alias-section {
  padding-bottom: 8px;
}

#alias-section + .section {
  padding-top: 8px;
}

.section-private {
  border: var(--stroke) dashed var(--accent-mid);
  border-radius: 18px;
  padding: 16px;
  margin: 16px 0;
}

.summary {
  font-size: 20px;
  line-height: 1.35;
  font-weight: 600;
  margin: 8px 0 12px;
}

.quote {
  border-left: 2px solid var(--accent);
  padding-left: 12px;
  color: var(--ink);
}

.quote:empty {
  display: none;
}

.empty {
  color: var(--muted);
  padding: 14px 0;
  margin: 0;
}

.status {
  font-size: 14px;
  margin: 8px 0;
  overflow-wrap: anywhere;
}

.notice-dock {
  position: fixed;
  top: calc(56px + env(safe-area-inset-top));
  left: 0;
  right: 0;
  z-index: 30;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
  pointer-events: none;
}

body.is-page-loading .notice-dock {
  display: none;
}

.notice-dock .status {
  position: relative;
  width: 100%;
  box-sizing: border-box;
  pointer-events: auto;
  margin: 0;
  padding: 12px 44px 12px 14px;
  background: var(--paper);
  border: 1px solid var(--hair);
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(20, 20, 20, 0.14);
  animation: notice-drop 0.18s ease;
}

.notice-dock .notice-text {
  display: block;
}

.notice-close {
  position: absolute;
  top: 6px;
  right: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.notice-close:hover {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.notice-close .icon {
  width: 16px;
  height: 16px;
}

.notice-dock .status.error {
  border-color: var(--danger);
}

.notice-dock:popover-open {
  position: fixed;
  inset: unset;
  top: calc(56px + env(safe-area-inset-top));
  left: 0;
  right: 0;
  width: 100%;
  max-width: 560px;
  height: auto;
  margin: 0 auto;
  padding: 0 20px;
  border: 0;
  background: transparent;
  overflow: visible;
}

@keyframes notice-drop {
  from {
    transform: translateY(-12px);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

.status.error {
  color: var(--danger);
  font-weight: 600;
}

.status.warn {
  color: var(--warn);
  font-weight: 600;
}

.plain-list {
  padding-left: 18px;
  margin: 8px 0 0;
}

.plain-list li {
  margin: 6px 0;
}

.tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid var(--accent-mid);
  background: var(--accent-soft);
  color: var(--accent-strong);
  border-radius: 999px;
  padding: 0 8px;
  margin-top: -2px;
  margin-left: 6px;
  vertical-align: middle;
}

/* ---- Buttons ---- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: var(--stroke) solid var(--accent-mid);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.btn:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-strong);
}

.btn:active {
  transform: scale(0.97);
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  color: #ffffff;
}

.btn-primary:active {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
  color: #ffffff;
}

.btn-small {
  font-size: 14px;
  padding: 0 14px;
}

.btn-block {
  width: 100%;
}

.btn-danger,
.btn-danger:hover,
.btn-danger:active {
  background: var(--danger);
  border-color: var(--danger);
  color: var(--paper);
}

.btn-quiet-danger,
.btn-quiet-danger:hover,
.btn-quiet-danger:active {
  background: transparent;
  border-color: transparent;
  color: var(--danger);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.btn:disabled,
.btn:disabled:hover {
  opacity: 0.45;
  cursor: default;
  transform: none;
}
.btn:disabled:not(.btn-primary):hover {
  background: var(--paper);
  border-color: var(--accent-mid);
  color: var(--ink);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0;
}

.sticky-actions {
  position: sticky;
  bottom: var(--bar-space);
  z-index: 5;
  background: var(--paper);
  padding: 10px 0;
  margin: 0;
  border-top: 1px solid var(--hair);
  box-shadow: 0 -10px 18px -14px rgba(20, 20, 20, 0.28);
}

.me-account-actions {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding-top: calc(10px + 1lh);
  padding-bottom: 10px;
}

.me-account-actions .actions-note {
  flex: 0 0 auto;
  width: 100%;
  min-width: 0;
  text-align: center;
}

.me-account-actions .actions-note-line {
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
  color: var(--muted);
  text-align: center;
}

.me-account-actions .actions-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 10px;
  flex: 0 0 auto;
  width: 100%;
  margin: 0;
}

.me-account-link {
  appearance: none;
  border: 0;
  background: none;
  padding: 10px 8px;
  margin: 0;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--danger);
  cursor: pointer;
  white-space: nowrap;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.me-account-link:hover {
  color: var(--danger);
  opacity: 0.85;
}

#me-entry {
  margin: 0 0 16px;
}

#me-entry.entry {
  margin-bottom: 16px;
}

/* ---- Forms ---- */

.field {
  display: grid;
  gap: 6px;
  margin: 12px 0;
}

#mindset-form [data-step="1"] .field {
  margin: 14px 0 -8px;
}

.field > span:first-child {
  font-weight: 600;
  font-size: 14px;
}

.field small {
  color: var(--muted);
  font-size: 13px;
  justify-self: end;
}

input[type="text"],
input[type="search"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
  width: 100%;
  border: var(--stroke) solid var(--accent-mid);
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  padding: 11px 12px;
  min-height: 44px;
}

textarea {
  resize: vertical;
  line-height: 1.45;
}

select {
  box-sizing: border-box;
  height: 44px;
  max-height: 44px;
  line-height: 1.25;
}

select:disabled,
input:disabled {
  opacity: 0.5;
}

input[type="text"]:focus-visible,
input[type="search"]:focus-visible,
input[type="email"]:focus-visible,
input[type="password"]:focus-visible,
input[type="number"]:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

textarea[aria-invalid="true"] {
  border-color: var(--danger);
}

.prefix-input {
  display: flex;
  align-items: center;
  border: var(--stroke) solid var(--accent-mid);
  border-radius: 12px;
  padding-left: 12px;
  background: var(--paper);
}

.prefix-input > span {
  color: var(--muted);
}

.prefix-input input {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding-left: 4px;
  min-height: 0;
  height: 42px;
}

.prefix-input:focus-within {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.prefix-input input:focus-visible {
  outline: none;
  border-color: transparent;
  box-shadow: none;
}

.inline-form {
  display: flex;
  gap: 10px;
  align-items: center;
}

.inline-form .field {
  flex: 1;
  margin: 0;
}

.leak {
  display: block;
  font-size: 14px;
  color: var(--warn);
}

.leak::before {
  content: "! ";
  font-weight: 700;
}

.leak.is-block {
  color: var(--danger);
  font-weight: 600;
}

.demo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 12px;
}

.demo-grid .field {
  align-content: start;
}

.demo-grid .field:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.choices {
  border: 0;
  padding: 0;
  margin: 8px 0;
}

.choices label,
.check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-weight: 500;
}

input[type="radio"],
input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
  margin: 0;
}

.invite {
  border: var(--stroke) dashed var(--accent-mid);
  border-radius: 16px;
  padding: 4px 14px;
  margin: 12px 0;
}

/* ---- Lists ---- */

.feed,
.list {
  display: grid;
}

.feed {
  gap: 10px;
}

.entry {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  column-gap: 14px;
  row-gap: 4px;
  padding: 14px 12px;
  border: var(--stroke) solid var(--accent-mid);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: background 0.12s ease, border-color 0.12s ease;
}

div.entry {
  cursor: default;
}

.entry:hover {
  background: var(--accent-soft);
  border-color: var(--accent-mid);
}

.entry-id {
  grid-column: 1;
  grid-row: 1 / span 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  flex-shrink: 0;
}

.entry-id-top {
  position: relative;
  display: flex;
  align-items: flex-start;
  flex-shrink: 0;
}

.entry-sim {
  display: block;
  height: 0;
  overflow: hidden;
  background: transparent;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 16px;
  text-align: center;
  text-transform: lowercase;
  transition: height 0.2s ease;
}

.entry:hover .entry-sim,
.entry:focus-within .entry-sim,
.mindset-id:hover .entry-sim,
.mindset-id:focus-within .entry-sim {
  height: 16px;
}

.mindset-id:has(.entry-sim:not(.entry-real)) {
  background: var(--danger);
  color: #fff;
}

.entry-body {
  grid-column: 2;
  grid-row: 1 / span 3;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.entry-status {
  position: absolute;
  top: 14px;
  right: 12px;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.entry-status .entry-fish,
.entry-status .glyph {
  margin: 0;
}

.entry .entry-headline {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
  line-height: 1.3;
}

.entry-radar {
  display: block;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  overflow: visible;
}

.entry-radar .radar-compact,
.entry-radar svg {
  width: 54px;
  height: 54px;
  max-width: none;
  margin: -7px 0 -7px -7px;
  display: block;
}

.entry-fish {
  width: 28px;
  height: 18px;
  flex-shrink: 0;
}

.entry-fish .fish-body,
.entry-fish .fish-fin,
.entry-fish .fish-eye {
  fill: transparent;
  stroke: var(--accent);
  stroke-width: 0.7;
}

.entry-fish.is-sim .fish-body,
.entry-fish.is-sim .fish-fin,
.entry-fish.is-sim .fish-eye {
  stroke: var(--danger);
}

.entry-fish.is-fresh.is-real .fish-body,
.entry-fish.is-fresh.is-real .fish-fin,
.entry-fish.is-fresh.is-real .fish-eye {
  fill: var(--accent);
  stroke: var(--accent);
}

.entry-fish.is-fresh.is-sim .fish-body,
.entry-fish.is-fresh.is-sim .fish-fin,
.entry-fish.is-fresh.is-sim .fish-eye {
  fill: var(--danger);
  stroke: var(--danger);
}

.entry-number {
  font-size: 22px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  line-height: 1;
}

.entry .mindset-id {
  position: relative;
  z-index: 1;
  margin-top: -18px;
  padding-top: calc(4px + 0.12em);
  padding-bottom: 12px;
  margin-right: 0;
  min-width: 40px;
  text-align: center;
  font-weight: 700;
  border-radius: 4px 4px 0 0;
}

.entry-foot {
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 12px;
  margin-top: 2px;
  min-width: 0;
}

.entry-side {
  margin-left: auto;
  color: var(--muted);
  font-size: 13px;
  text-align: right;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.2;
}

.entry-summary {
  display: block;
  font-size: 13px;
  font-weight: 500;
  font-style: italic;
  color: var(--muted);
  line-height: 1.45;
}

.entry-meta {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 13px;
}

#preview-entry {
  margin: 0 0 16px;
}

#preview-entry.entry {
  margin-bottom: 16px;
}

#preview-entry.entry-pending {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  padding: 24px 16px;
  border: 1px dashed var(--hair);
  border-radius: 16px;
  background: var(--paper);
}

.preview-pending {
  margin: 0;
  color: var(--muted);
  font-weight: 500;
  text-align: center;
}

.preview-loading {
  display: flex;
  position: fixed;
  left: 0;
  right: 0;
  top: calc(56px + env(safe-area-inset-top));
  bottom: calc(72px + env(safe-area-inset-bottom));
  z-index: 4;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  margin: 0;
  padding: 24px;
  background: var(--paper);
  pointer-events: none;
}

.preview-loading[hidden] {
  display: none !important;
}

.person {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--hair);
}

.person-hit {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.person-id.mindset-id {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  margin-top: 0;
  margin-right: 0;
  min-width: 40px;
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
  line-height: 1.1;
}

.person-body {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  pointer-events: none;
}

.person-title {
  display: block;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
}

.person-blurb {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.person-statuses {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.person-status.chip {
  cursor: default;
}

.person-tools {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
  max-width: 46%;
  pointer-events: auto;
}

body[data-tab="current"] .person-tools,
body[data-tab="school"] .person-tools {
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  max-width: none;
}

body[data-tab="current"] .person-tools .btn,
body[data-tab="school"] .person-tools .btn {
  white-space: nowrap;
  flex-shrink: 0;
}

.person-body .head-meta {
  margin: 0;
}

.person-body .person-meta {
  margin-top: 2px;
}

.person-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  min-width: 0;
  flex: 1 1 auto;
}

.person-link strong,
.person-link small {
  display: block;
}

.person-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.modal-has-close {
  position: relative;
  padding-top: 48px;
}

.modal-close-top {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 1;
}

.links {
  margin: 8px 0 4px;
}

.link-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  border-bottom: 1px solid var(--hair);
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.12s ease;
}

.link-row:hover {
  color: var(--accent-strong);
}

.link-side {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.tab-side {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  margin-left: 4px;
}

.profile-stick .tabs,
.profile-stick .depth-tabs {
  margin: 0;
  margin-bottom: 0;
  border-bottom: 0;
  gap: 0;
}

.profile-stick .depth-tabs button {
  min-height: 40px;
  padding-left: 12px;
  padding-right: 12px;
}

.profile-stick .depth-tabs button:first-child {
  padding-left: 0;
}

.profile-stick .depth-tabs button:focus {
  outline: none;
}

.profile-stick .depth-tabs button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.profile-stick .depth-tabs button + button {
  border-left: 1px solid var(--hair);
}

.link-side::after {
  content: "  →";
  color: var(--accent);
}

.posts .post {
  border-top: 1px solid var(--hair);
  padding: 12px 0;
}

.reading-texts {
  margin-top: 20px;
}

.post h3 {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.post p {
  margin: 0;
  white-space: pre-wrap;
}

/* ---- Drawings ---- */

.icon,
.glyph {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.glyph {
  stroke-width: 1;
}

.glyph .fish-eye,
.icon .fish-eye {
  fill: currentColor;
  stroke: none;
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: var(--stroke) solid var(--accent-mid);
  border-radius: 50%;
  flex-shrink: 0;
}

.avatar .glyph {
  width: 28px;
  height: 18px;
}

.avatar-sm {
  width: 40px;
  height: 40px;
}

.hero {
  padding: 8px 0 24px;
}

.hero-art .icon {
  width: 150px;
  height: 150px;
  stroke-width: 1.1;
  margin: 0 0 4px -10px;
}

.hero h1,
.hero h2 {
  font-size: 34px;
  line-height: 1.1;
}

#hero .actions {
  justify-content: flex-end;
}

#empty .me-empty-actions {
  justify-content: flex-end;
}


/* ---- Readings ---- */

.radar {
  display: block;
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
}

.radar-ring,
.radar-spoke {
  fill: none;
  stroke: var(--hair);
  stroke-width: 1;
}

.radar-shape {
  fill: var(--accent-soft);
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linejoin: round;
}

.radar-ghost {
  fill: none;
  stroke: var(--accent-deep);
  stroke-width: 1.2;
  stroke-dasharray: 4 3;
  opacity: 0.55;
}

.radar-label {
  fill: var(--ink);
  font-size: 12px;
}

.radar-wide {
  max-width: 480px;
}

.radar-wide .radar-label {
  font-size: 11px;
}

.field-plain {
  font-style: normal;
  font-weight: 500;
  font-size: 13px;
  color: var(--muted);
}

.card-face {
  margin-top: 8px;
}

.card-headline {
  margin: 0 0 8px;
  font-size: clamp(26px, 6vw, 34px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.card-blurb {
  margin: 0 0 10px;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.45;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 0;
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
}

.head-meta > span:not(:empty):not([hidden]) {
  display: inline;
}

.head-meta > span:not(:empty):not([hidden]) ~ span:not(:empty):not([hidden])::before {
  content: "·";
  margin: 0 8px;
  color: var(--muted);
}

.radar-mini {
  display: flex;
  justify-content: center;
  margin: 4px 0 18px;
}

.radar-compact {
  width: 140px;
  max-width: 140px;
  margin: 0;
}

.radar-compact .radar-ring,
.radar-compact .radar-spoke {
  stroke-width: 1.2;
}

.radar-compact .radar-shape {
  stroke-width: 2.2;
}

.bar-row {
  margin: 14px 0;
}

.bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 600;
}

.bar-track {
  height: 8px;
  border: 1px solid var(--accent-mid);
  background: var(--accent-soft);
  border-radius: 999px;
  overflow: hidden;
  margin: 6px 0 4px;
}

.bar-fill {
  height: 100%;
  background: var(--accent);
}

.bar-poles {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
}

.bar-row.is-unknown .bar-label span:last-child {
  color: var(--muted);
  font-weight: 500;
}

.trend {
  display: block;
  width: 100%;
}

.trend-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.8;
  stroke-linejoin: round;
}

.trend-axis {
  stroke: var(--hair);
  stroke-dasharray: 3 3;
}

.trend-now {
  stroke: var(--accent);
  stroke-width: 2;
}

.trend-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}

.trend-key {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.trend-key svg {
  width: 24px;
  height: 6px;
}

.trend-key line {
  stroke: var(--accent);
  stroke-width: 1.6;
}

.timeline-when,
.version-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
  padding: 6px 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
}

.timeline-now {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

#timeline-count {
  flex: 0 0 40px;
  width: 40px;
  text-align: end;
}

.timeline-manage {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--accent-deep);
  cursor: pointer;
}

.timeline-manage .icon {
  width: 14px;
  height: 14px;
}

.timeline-manage:hover,
.timeline-manage[aria-expanded="true"] {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.version-drawer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.28s ease;
}

.version-drawer.is-open {
  grid-template-rows: 1fr;
}

.version-drawer-inner {
  overflow: hidden;
}

.version-list {
  max-height: 240px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px 0 2px;
}

.profile-stick .timeline-when,
.profile-stick .version-row {
  padding-left: 0;
}

.version-row {
  border-radius: 8px;
  padding-top: 0;
  padding-bottom: 0;
}

.version-row.is-active {
  background: var(--accent-soft);
}

.version-open {
  flex: 1 1 auto;
  align-self: stretch;
  display: flex;
  align-items: center;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: start;
  cursor: pointer;
}

.version-row .btn-icon.version-delete {
  flex: 0 0 40px;
  justify-content: flex-end;
  color: var(--danger);
}

.version-row .btn-icon.version-delete:hover {
  color: var(--danger);
}

@media (prefers-reduced-motion: reduce) {
  .version-drawer {
    transition: none;
  }
}

.timeline-field input[type="range"] {
  width: 100%;
  min-height: 28px;
  margin: 0;
  accent-color: var(--accent);
}

/* ---- Hunt ---- */

.lake-wrap {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 18px;
  column-gap: 6px;
  align-items: center;
  margin: 4px 0 8px;
}

.lake {
  position: relative;
  grid-column: 2;
  grid-row: 2;
  width: 100%;
  aspect-ratio: 1 / 1;
  border: var(--stroke) solid var(--accent-mid);
  border-radius: 24px;
  overflow: hidden;
  touch-action: none;
  background: var(--paper);
  user-select: none;
  -webkit-user-select: none;
}

.lake-svg {
  display: block;
  width: 100%;
  height: 100%;
}

.lake-targets,
.lake-sims {
  position: absolute;
  left: 8px;
  z-index: 2;
  background: var(--paper);
  border: 1px solid var(--hair);
}

.lake-targets {
  top: 8px;
}

.lake-sims {
  top: 52px;
}

.lake-targets[aria-pressed="true"],
.lake-sims[aria-pressed="true"] {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.wave {
  fill: none;
  stroke: #b8c8e4;
  stroke-width: 0.9;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.lake-axis {
  stroke: var(--hair);
  stroke-dasharray: 3 4;
  vector-effect: non-scaling-stroke;
}

.lake-label {
  display: block;
  grid-column: 2;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  margin: 4px 0;
}

.lake-label-top {
  grid-row: 1;
}

.lake-side {
  position: relative;
  grid-row: 2;
  align-self: stretch;
  min-width: 0;
  font-size: 12px;
  color: var(--muted);
}

.lake-side-left {
  grid-column: 1;
}

.lake-side-right {
  grid-column: 3;
}

.lake-label-bottom {
  grid-row: 3;
  transform: rotate(180deg);
}

.lake-side span {
  position: absolute;
  left: 50%;
  top: 50%;
  white-space: nowrap;
}

.lake-side-left span {
  transform: translate(-50%, -50%) rotate(-90deg);
}

.lake-side-right span {
  transform: translate(-50%, -50%) rotate(90deg);
}

.lake-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 8px;
}

.lake-tools #lake-count {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
}

.lake-tools .btn,
.lake-tools .btn-icon {
  flex: 0 0 auto;
}

.lake-tools .btn-icon[aria-pressed="true"] {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.lake-wrap.is-collapsed .lake,
.lake-wrap.is-collapsed .lake-label,
.lake-wrap.is-collapsed .lake-side {
  display: none;
}

.fish {
  cursor: pointer;
  outline: none;
  transition: opacity 0.3s ease;
}

.fish-body,
.fish-fin {
  fill: var(--paper);
  stroke: var(--accent-deep);
  stroke-width: 1.3;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.fish-eye {
  fill: var(--ink);
  stroke: none;
}

.fish-me {
  fill: var(--signal);
  stroke: var(--signal);
  stroke-width: 1.8;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.fish-sonar {
  display: none;
  pointer-events: none;
}

.fish.is-calling .fish-sonar {
  display: block;
}

.sonar-ring {
  fill: none;
  stroke: var(--signal);
  stroke-width: 1.4;
  vector-effect: non-scaling-stroke;
  transform-box: fill-box;
  transform-origin: center;
  animation: sonar 1.8s ease-out infinite;
}

.sonar-late {
  animation-delay: 0.9s;
}

@keyframes sonar {
  0% {
    transform: scale(0.35);
    opacity: 0.9;
  }
  100% {
    transform: scale(2.6);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sonar-ring {
    animation: none;
    opacity: 0.85;
    transform: scale(1.4);
  }

  .sonar-late {
    display: none;
  }
}

.fish-bang {
  visibility: hidden;
  fill: var(--signal);
  font-size: 13px;
  font-weight: 800;
  font-family: inherit;
  pointer-events: none;
}

.fish.is-attention .fish-bang {
  visibility: visible;
}

.fish-bubble {
  position: absolute;
  z-index: 2;
  max-width: 190px;
  padding: 8px 10px;
  border: var(--stroke) solid var(--signal);
  border-radius: 14px;
  background: var(--paper);
  color: var(--ink);
  text-align: center;
  transform: translate(-50%, calc(-100% - 8px));
  pointer-events: auto;
}

.fish-bubble p {
  margin: 0;
  font-size: 14px;
  line-height: 1.35;
}

.fish-bubble .btn {
  margin-top: 8px;
}

.call-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 8px 0 12px;
}

.call-bar > .btn {
  width: 100%;
}

.call-timer {
  margin: 0;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  color: #8a6400;
}

.fish.is-real .fish-body,
.fish.is-real .fish-fin,
.fish.is-real .fish-eye {
  fill: var(--accent);
  stroke: var(--accent);
}

.fish.is-sim .fish-body,
.fish.is-sim .fish-fin,
.fish.is-sim .fish-eye {
  fill: var(--danger);
  stroke: var(--danger);
}

.fish.is-real:hover .fish-body,
.fish.is-real:hover .fish-fin,
.fish.is-real:focus-visible .fish-body,
.fish.is-real:focus-visible .fish-fin,
.fish.is-mine.is-real:hover .fish-body,
.fish.is-mine.is-real:hover .fish-fin,
.fish.is-mine.is-real:focus-visible .fish-body,
.fish.is-mine.is-real:focus-visible .fish-fin {
  fill: var(--accent);
  stroke: var(--accent-deep);
}

.fish.is-sim:hover .fish-body,
.fish.is-sim:hover .fish-fin,
.fish.is-sim:focus-visible .fish-body,
.fish.is-sim:focus-visible .fish-fin,
.fish.is-mine.is-sim:hover .fish-body,
.fish.is-mine.is-sim:hover .fish-fin,
.fish.is-mine.is-sim:focus-visible .fish-body,
.fish.is-mine.is-sim:focus-visible .fish-fin {
  fill: var(--danger);
  stroke: var(--ink);
}

.fish.is-faded {
  opacity: 0.12;
  pointer-events: none;
}

.fish-sway {
  transform-box: fill-box;
  transform-origin: center;
  animation: sway 3.6s ease-in-out infinite;
  filter: drop-shadow(0 1px 1px rgba(20, 20, 20, 0.22));
}

@keyframes sway {
  0%,
  100% {
    transform: rotate(-5deg) translateY(0);
  }
  50% {
    transform: rotate(5deg) translateY(-0.6px);
  }
}

.panel {
  margin: 12px 0 8px;
}

.panel-handle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: var(--stroke) solid var(--accent-mid);
  border-radius: 16px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.panel-handle:hover,
.panel-handle[aria-expanded="true"] {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-strong);
}

.panel-handle::after {
  content: "↓";
  margin-left: 8px;
}

.panel-handle[aria-expanded="true"] {
  border-radius: 16px 16px 0 0;
}

.panel-handle[aria-expanded="true"]::after {
  content: "↑";
}

.panel-handle .hint {
  margin-left: auto;
}

#panel-body {
  border: var(--stroke) solid var(--accent);
  border-top: 0;
  border-radius: 0 0 16px 16px;
  padding: 6px 16px 12px;
}

.tabs {
  display: flex;
  gap: 20px;
  border-bottom: 1px solid var(--hair);
  margin-bottom: 8px;
}

.tabs button {
  min-height: 44px;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-weight: 650;
  padding: 0;
  cursor: pointer;
  transition: color 0.12s ease;
}

.tabs button:hover {
  color: var(--accent-strong);
}

.tabs button[aria-selected="true"] {
  color: var(--accent-strong);
}

.range {
  border: 0;
  padding: 0;
  margin: 12px 0 16px;
}

.range legend {
  font-weight: 600;
  font-size: 14px;
  padding: 0;
}

.range-value {
  color: var(--muted);
  font-weight: 500;
  margin-left: 4px;
  font-variant-numeric: tabular-nums;
}

.range-pair {
  position: relative;
  height: 44px;
}

.range-pair::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  background: var(--accent-mid);
}

.range-pair input[type="range"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 44px;
  margin: 0;
  background: none;
  pointer-events: none;
  -webkit-appearance: none;
  appearance: none;
}

.range-pair input[type="range"]::-webkit-slider-runnable-track {
  background: none;
  height: 44px;
}

.range-pair input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  pointer-events: auto;
  width: 26px;
  height: 26px;
  margin-top: 9px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: var(--paper);
  cursor: pointer;
}

.range-pair input[type="range"]::-moz-range-track {
  background: none;
}

.range-pair input[type="range"]::-moz-range-thumb {
  pointer-events: auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: var(--paper);
  cursor: pointer;
}

.range-pair input[type="range"]:focus-visible {
  outline: none;
}

.range-pair input[type="range"]:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.range-pair input[type="range"]::-webkit-slider-thumb:hover {
  background: var(--accent-soft);
}

.range-poles {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
}

.hist-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 18px;
}

.stats-count {
  margin: 0;
  font-size: 40px;
  font-weight: 750;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--accent-deep);
}

.stats-lead .hint {
  margin: 6px 0 0;
  white-space: nowrap;
}

#pane-lake-stats > .section h2 {
  margin: 0 0 12px;
  font-size: 15px;
}

#pane-lake-stats > .section + .section {
  border-top: 1px solid var(--hair);
  padding-top: 16px;
}

#pane-lake-stats > .section:last-child {
  padding-bottom: 8px;
}

.dist-title,
#pane-lake-stats .bar-label,
#pane-lake-stats .bar-label span {
  font-weight: 450;
}

.dist-title {
  margin: 8px 0 0;
  font-size: 14px;
  text-align: center;
}

.demo-chart {
  display: grid;
  grid-template-columns: minmax(0, 1fr) min(200px, 52%) minmax(0, 1fr);
  column-gap: 10px;
  align-items: center;
  margin: 28px 0;
}

.demo-pie {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
}

.demo-pie text {
  font-family: inherit;
  font-weight: 450;
  fill: var(--ink);
}

.demo-pie .demo-slice-label.is-on-slice {
  fill: var(--paper);
}

.demo-side {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  min-width: 0;
}

.demo-side.is-left {
  align-items: flex-end;
}

.demo-side.is-right {
  align-items: flex-start;
}

.demo-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 12px;
  font-weight: 450;
  line-height: 1.25;
}

.demo-side.is-left .demo-tag {
  flex-direction: row-reverse;
  text-align: right;
}

.demo-switch {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 16px;
}

.demo-switch button {
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-size: 14px;
  font-weight: 450;
  color: var(--muted);
  cursor: pointer;
}

.demo-switch button[aria-pressed="true"] {
  color: var(--accent-deep);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.demo-legend {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.demo-key {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: baseline;
  font-size: 14px;
  font-weight: 450;
}

.demo-swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  align-self: center;
}

.demo-count {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

#demo-city-note {
  margin: 10px 0 0;
}

.hist-bars {
  display: flex;
  align-items: flex-end;
  gap: 4px;
}

.hist-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}

.hist-bars-pair {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  width: 100%;
  height: 72px;
  border-bottom: 1px solid var(--hair);
}

.hist-bar {
  width: 46%;
  min-height: 2px;
  border-radius: 4px 4px 0 0;
  background: var(--accent);
}

.hist-bar.is-slice {
  background: var(--accent-strong);
}

.hist-col span {
  margin-top: 4px;
  font-size: 11px;
  font-weight: 450;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.legend {
  font-size: 12px;
  color: var(--muted);
  margin: 6px 0 0;
}

.legend .key {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--accent);
  margin: 0 4px 0 0;
  vertical-align: -1px;
}

.legend .key.is-slice {
  background: var(--accent-strong);
  margin-left: 8px;
}

.row-chart .row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 2fr auto;
  gap: 10px;
  align-items: center;
  font-size: 14px;
  margin: 8px 0;
}

.row-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-track {
  height: 8px;
  border: 1px solid var(--accent-mid);
  background: var(--accent-soft);
  border-radius: 999px;
  overflow: hidden;
}

.row-fill {
  height: 100%;
  background: var(--accent);
}

.row-value {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

/* ---- Dialogs ---- */

.modal {
  width: calc(100% - 32px);
  max-width: 520px;
  border: var(--stroke) solid var(--accent-mid);
  border-radius: 20px;
  padding: 20px;
  color: var(--ink);
  background: var(--paper);
}

.modal::backdrop {
  background: rgba(20, 20, 20, 0.35);
}

.modal-sheet {
  width: 100%;
  max-width: 560px;
  margin: auto auto 0;
  border-radius: 22px 22px 0 0;
  border-bottom: 0;
  padding-bottom: calc(20px + env(safe-area-inset-bottom));
  max-height: 85vh;
}

.modal-sheet .head {
  margin-top: 0;
  align-items: flex-start;
}

#fish-card {
  overflow: visible;
}

#card-number {
  margin: calc(-20px - var(--stroke) - 6px) 136px 8px 0;
  min-height: 0;
  line-height: 1;
}

#card-number .mindset-id {
  vertical-align: top;
  transition: margin-bottom 0.2s ease;
}

#card-number .mindset-id:hover,
#card-number .mindset-id:focus-within {
  margin-bottom: -16px;
}

#fish-card .profile-tools {
  top: 8px;
  right: 8px;
}

#fish-card .btn-icon[aria-pressed="true"] {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

#fish-card .card-body {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

#fish-card .card-copy {
  flex: 1;
  min-width: 0;
}

#fish-card .entry-headline {
  margin: 0;
  font-size: 15px;
}

#fish-card .summary {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
  margin: 8px 0 0;
}

#fish-card .head-meta {
  margin: 8px 0 0;
  font-size: 12px;
}

#fish-card .radar-face {
  flex: 0 0 80px;
  width: 80px;
  margin: 0;
  justify-content: flex-start;
}

#fish-card .radar-face .radar {
  width: 80px;
  max-width: 80px;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.publish-history {
  margin: 12px 0;
}

.publish-history > summary {
  cursor: pointer;
  list-style: none;
  line-height: 1.45;
  color: var(--ink);
  font-weight: 600;
}

.publish-history > summary::-webkit-details-marker {
  display: none;
}

.publish-history-body {
  margin-top: 10px;
}

.publish-history-body .choices {
  margin-top: 4px;
}

/* ---- Language and game bar ---- */

.dock {
  display: inline-flex;
  align-items: stretch;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--hair);
  border-radius: 16px;
  box-shadow: 0 4px 14px rgba(27, 99, 80, 0.12);
}

.dock-item {
  appearance: none;
  pointer-events: auto;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 44px;
  min-height: 32px;
  padding: 6px 12px;
  border: 0;
  border-right: 1px solid var(--hair);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.12s ease, background 0.12s ease;
}

.dock-item:last-child {
  border-right: 0;
}

.dock-item:hover {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.dock-item[aria-pressed="true"],
.dock-item[aria-current="page"] {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.lang.dock {
  position: absolute;
  top: 0;
  right: 20px;
  margin-top: 0;
  border-radius: 0 0 6px 16px;
  z-index: 6;
}

.lang .dock-item {
  flex-direction: row;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.lang .btn-icon[data-acting-exit] {
  align-self: stretch;
  width: 36px;
  height: auto;
  border-radius: 0;
  border-right: 1px solid var(--hair);
  color: var(--muted);
}

.lang .btn-icon[data-acting-exit]:hover {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.lang .dock-item[data-lang-menu] {
  min-width: 0;
  padding-left: 10px;
  padding-right: 10px;
}

.lang .dock-item[data-site-menu] {
  min-width: 0;
  padding-left: 2px;
  padding-right: 2px;
}

.lang .dock-item[data-dock-search] {
  min-width: 0;
  padding-left: 10px;
  padding-right: 10px;
}

.dock-search {
  display: flex;
  align-items: center;
  flex: 0 0 0px;
  width: 0;
  min-width: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: flex-basis 0.18s ease, width 0.18s ease, opacity 0.18s ease;
}

.lang.dock.is-search-open .dock-search {
  flex-basis: 4rem;
  width: 4rem;
  margin: 4px 3px;
  border-radius: 10px;
  opacity: 1;
  pointer-events: auto;
}

.lang.dock.is-search-open .dock-item[data-dock-search],
.lang.dock.is-search-open .dock-item[data-dock-search]:hover,
.lang.dock.is-search-open .dock-item[data-dock-search][aria-pressed="true"] {
  background: var(--paper);
  color: var(--muted);
}

.dock-search-hash {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  padding-left: 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.dock-search input {
  flex: 1 1 0;
  width: 0;
  min-width: 0;
  min-height: 0;
  margin: 4px 4px 4px 0;
  padding: 0 6px 0 4px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
  color: var(--ink);
  font: inherit;
  font-size: 11px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.dock-search input:focus,
.dock-search input:focus-visible {
  outline: none;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.lang .dock-item .icon-more {
  width: 18px;
  height: 18px;
  fill: currentColor;
  stroke: none;
}

.lang .dock-item .icon-search {
  width: 18px;
  height: 18px;
}

.lang-menu {
  position: absolute;
  top: 50px;
  right: 20px;
  z-index: 30;
  min-width: 220px;
  margin: 0;
  padding: 6px 0;
  background: var(--paper);
  border: 1px solid var(--hair);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(20, 20, 20, 0.12);
}

.lang-menu a {
  display: block;
  padding: 10px 14px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  text-transform: none;
  letter-spacing: 0;
}

.lang-menu a:hover {
  color: var(--accent-strong);
}

#lang-menu {
  right: 58px;
  min-width: 0;
}

.lang-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 10px 14px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  text-align: start;
  cursor: pointer;
}

.lang-menu button:hover,
.lang-menu button[aria-checked="true"] {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.flag {
  display: block;
  width: 20px;
  height: 14px;
  flex-shrink: 0;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(20, 20, 20, 0.16);
}

.auth-wall {
  margin-top: 24px;
}

.auth-wall .gate-points {
  margin: 12px 0 20px;
}

.auth-wall .gate-schema {
  margin-top: 24px;
}

.gamebar.dock {
  position: fixed;
  left: 50%;
  bottom: calc(8px + env(safe-area-inset-bottom));
  right: auto;
  z-index: 20;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 24px);
  margin-bottom: -20px;
  padding: 0;
  border-top: 0;
  box-shadow: 0 -6px 18px rgba(27, 99, 80, 0.14), 0 4px 12px rgba(27, 99, 80, 0.08);
  pointer-events: none;
  transition: transform 0.25s ease, opacity 0.25s ease;
  will-change: transform, opacity;
}

.gamebar.dock.is-away {
  transform: translateX(-50%) translateY(110%);
  opacity: 0;
  pointer-events: none;
}

.gamebar .dock-item,
.gamebar-button {
  pointer-events: auto;
  min-width: 68px;
  min-height: 48px;
  padding: 6px 10px 20px;
}

.gamebar-button span {
  line-height: 1.1;
}

.gamebar-button .icon {
  width: 18px;
  height: 18px;
}

.gamebar-button,
.depth-tabs button {
  position: relative;
}

.notice-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  pointer-events: none;
}

.depth-tabs .notice-badge {
  top: 4px;
  right: 2px;
  z-index: 1;
}

.gamebar-button .notice-badge {
  top: 4px;
  right: 6px;
}

/* ---- Wizard / guide ---- */

/* Wizard visible: page title scrolls away; steps stick when they hit the top.
   Keep position:relative so absolute .head-back stays inside the header.
   Head may sit under #gated or #gated > .page-body after loading-gate wrap. */
#gated:has(.wizard-steps:not([hidden])) > .head,
#gated:has(.wizard-steps:not([hidden])) > .page-body > .head {
  position: relative;
  z-index: auto;
  border-bottom: 0;
  box-shadow: none;
  padding-bottom: 8px;
}

.wizard-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 8px 10px;
  margin: 8px 0 12px;
  padding: 8px 0 12px;
  overflow-x: auto;
  color: var(--muted);
  font-size: inherit;
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 8;
  background: var(--paper);
  border-bottom: 1px solid var(--hair);
  box-shadow: 0 10px 18px -14px rgba(20, 20, 20, 0.28);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.pane-head {
  margin: 0 0 8px;
}

.pane-head h2 {
  margin-bottom: 4px;
}

.pane-head .hint {
  margin: 0;
}

.wizard-steps::-webkit-scrollbar {
  display: none;
}

.wizard-steps::before,
.wizard-steps::after {
  content: "";
  flex: 1 0 24px;
  height: 1px;
  background: var(--hair);
  min-width: 16px;
}

.wizard-step {
  appearance: none;
  border: 0;
  background: none;
  color: var(--muted);
  border-radius: 0;
  padding: 4px 0;
  font: inherit;
  font-size: inherit;
  font-weight: 650;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  white-space: nowrap;
  flex: 0 0 auto;
}

.wizard-step + .wizard-step::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 1px;
  margin-right: 10px;
  background: var(--hair);
  flex: 0 0 auto;
}

.wizard-step:hover {
  color: var(--accent-strong);
  background: none;
  border-color: transparent;
}

.wizard-step span {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-mid);
  color: var(--paper);
  display: inline-grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  flex: 0 0 auto;
}

.wizard-step.is-active,
.wizard-step.is-active:hover {
  border-color: transparent;
  background: none;
  color: var(--ink);
  font-weight: 700;
}

.wizard-step.is-active span {
  background: var(--accent);
  color: #ffffff;
}

.wizard-step em {
  font-style: normal;
}

.wizard-welcome h2 {
  margin: 0 0 8px;
}

.wizard-welcome .lead {
  margin: 0 0 10px;
  font-size: 17px;
  line-height: 1.45;
  color: var(--muted);
  font-weight: 500;
}

.wizard-welcome .hint {
  margin: 28px 0 0;
}

.wizard-welcome .plain-list,
.about-points {
  margin: 0;
  color: var(--muted);
}

.about-points li {
  margin: 10px 0;
}

.about-points strong {
  color: var(--ink);
  font-weight: 650;
}

.about-more a {
  font-weight: 600;
  color: var(--accent-strong);
  text-decoration: underline;
  text-underline-offset: 2px;
}

#mindset-form {
  padding-bottom: calc(72px + env(safe-area-inset-bottom));
}

body.has-gamebar #mindset-form {
  padding-bottom: calc(72px + var(--bar-space));
}

#mindset-form > .actions {
  position: fixed;
  left: 50%;
  right: auto;
  bottom: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 12px;
  width: 100%;
  max-width: 560px;
  box-sizing: border-box;
  transform: translateX(-50%);
  background: var(--paper);
  padding-top: 10px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom));
  padding-left: 20px;
  padding-right: 20px;
  margin: 0;
  border-top: 1px solid var(--hair);
  box-shadow: 0 -10px 18px -14px rgba(20, 20, 20, 0.28);
}

body.has-gamebar #mindset-form > .actions {
  padding-bottom: calc(10px + var(--bar-space));
}

#mindset-form > .actions .actions-note {
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  gap: 4px;
}

#mindset-form > .actions .actions-note-line {
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
}

#mindset-form > .actions .actions-note .status {
  margin: 0;
  font-size: inherit;
  line-height: inherit;
  color: var(--muted);
}

#mindset-form > .actions .status-inline-link {
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  margin: 0 0 0 0.35em;
  font: inherit;
  font-weight: 600;
  color: var(--accent-strong);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

#mindset-form > .actions .actions-note .status.error {
  color: var(--danger);
}

#mindset-form > .actions .actions-note .status.warn {
  color: var(--warn);
}

#mindset-form > .actions .actions-note a {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-strong);
}

#mindset-form > .actions .btn:not(.btn-primary) {
  background: var(--accent-soft);
  border-color: transparent;
  color: var(--accent-deep);
}

#mindset-form > .actions .btn:not(.btn-primary):hover {
  background: var(--hair);
  border-color: transparent;
  color: var(--accent-deep);
}

#mindset-form > .actions .actions-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  margin-left: auto;
  justify-content: flex-end;
}

#mindset-form > .actions .actions-buttons .linkish {
  white-space: nowrap;
}

.preview-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 12px;
}

.preview-toolbar .depth-tabs {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
}

.btn-round {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  color: #ffffff;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  flex-shrink: 0;
}

.btn-round:hover {
  background: var(--accent-strong);
  color: #ffffff;
}

.how-to-read {
  margin: 0 0 16px;
  padding: 12px 14px;
  border: var(--stroke) solid var(--accent-mid);
  border-radius: 12px;
  background: var(--accent-soft);
}

.how-to-read summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  color: var(--accent-strong);
}

.how-to-read summary:hover {
  color: var(--accent-deep);
}

.how-to-read summary::-webkit-details-marker {
  display: none;
}

.how-to-read[open] summary {
  margin-bottom: 8px;
}

.how-to-read .plain-list {
  margin: 8px 0;
}

.entry-headline {
  margin: 4px 0 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
}

.suggest {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  padding: 10px 12px;
  border: var(--stroke) dashed var(--accent-mid);
  border-radius: 12px;
  background: var(--paper);
}

.suggest .hint {
  margin: 0;
  flex: 1 1 180px;
}

/* ---- Auth ---- */

.page-narrow > .lead {
  margin: 0 0 20px;
  font-size: 18px;
  line-height: 1.45;
  color: var(--muted);
  font-weight: 500;
}

.auth-form {
  margin: 8px 0;
}

.auth-form > .hint {
  margin: 0 0 8px;
}

#register-fields {
  margin-top: 16px;
}

.divider {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  margin: 14px 0 4px;
}

.btn-google .g {
  font-weight: 800;
}

.auth-links {
  display: grid;
  gap: 10px;
  margin: 16px 0;
  justify-items: center;
}

.auth-links a,
.landing-register {
  color: var(--accent-deep);
  font-weight: 500;
  font-size: 14px;
  text-decoration: none;
}

.auth-links a:hover,
.landing-register:hover {
  text-decoration: underline;
}

/* ---- Motion and small screens ---- */

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

@media (max-width: 360px) {
  .number {
    font-size: 48px;
  }
  .demo-grid,
  .hist-grid {
    grid-template-columns: 1fr;
  }
}

/* ---- Tail, glint and school handshake ---- */

.chip {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-mid);
  color: var(--accent-deep);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.6;
}

.ritual {
  position: relative;
  margin: 0 0 4px;
  padding: 12px 36px 12px 14px;
  border-radius: 16px;
  background: var(--accent-pastel);
  border: 1px solid var(--accent-mid);
}

.ritual-close {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--accent-deep);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.ritual-line {
  margin: 0;
  color: var(--accent-deep);
}

.ritual-line + .ritual-line,
.ritual-line + .ritual-glint,
.ritual-glint + .ritual-line {
  margin-top: 8px;
}

.ritual-glint .post {
  margin-top: 8px;
}

.pick {
  align-items: flex-start;
  padding: 8px 0;
  border-bottom: 1px solid var(--hair);
}

.pick:last-child {
  border-bottom: 0;
}

.pick input {
  margin-top: 2px;
}

.pick small {
  display: block;
  margin-top: 2px;
  font-weight: 400;
}

/* ---- Root screen ---- */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.stat {
  margin: 0;
  padding: 12px;
  border: 1px solid var(--hair);
  border-radius: 14px;
  background: var(--paper);
}

.stat dd {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--accent-deep);
}

.stat dt {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.sim-fish-bar {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 8px;
}

.sim-fish-bar input {
  width: min(220px, 100%);
}

.sim-run {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 8px;
}

.sim-run .btn {
  flex-shrink: 0;
  margin-left: auto;
}

.sim-tick {
  font-weight: 700;
  color: var(--accent-deep);
}

.sim-rule {
  border: 0;
  border-top: 1px solid var(--hair);
  margin: 16px 0;
}

.sim-config {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0 16px;
}

.sim-config .check {
  grid-column: 1 / -1;
}

#pane-me-prefs #root-link {
  margin-top: 16px;
}

#pane-root-sim .sim-rule + h3 {
  margin-top: 8px;
}

#pane-root-sim .actions {
  justify-content: flex-end;
}

.sim-log {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--hair);
  border-radius: 12px;
  background: var(--paper);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--ink);
}

/* ---- Signed-out landing ---- */

.landing {
  max-width: 40rem;
  margin: 0 auto;
  padding: 8px 0 32px;
}

.landing > h1 {
  font-size: clamp(28px, 7vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 12px 0 10px;
}

.landing > .lead {
  font-size: 18px;
  margin: 0 0 14px;
  line-height: 1.45;
  color: var(--muted);
  font-weight: 500;
}

.lookup {
  margin: 20px 0 6px;
}

.lookup-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: stretch;
}

.landing-or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.landing-or::before,
.landing-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--hair);
}

.landing-dive {
  margin: 0 0 20px;
  line-height: 1.5;
}

.landing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: center;
  justify-content: flex-end;
  margin: 8px 0 0;
}

.lookup-field {
  display: flex;
  align-items: center;
  flex: 1 1 180px;
  min-width: 0;
  border: var(--stroke) solid var(--accent-mid);
  border-radius: 12px;
  background: var(--paper);
  padding: 0 4px 0 12px;
  min-height: 44px;
}

.lookup-field:focus-within {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.lookup-hash {
  color: var(--accent-deep);
  font-weight: 700;
  font-size: 18px;
  margin-right: 4px;
}

.lookup-field input {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 10px 8px 10px 0;
  min-height: 0;
  height: 42px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 18px;
}

.lookup-field input:focus-visible {
  outline: none;
  border-color: transparent;
  box-shadow: none;
}

.lookup .btn {
  flex: 0 0 auto;
}

.static-page {
  margin: 0 0 24px;
}

.static-page > .lead {
  margin: 0 0 20px;
  font-size: 18px;
  line-height: 1.45;
  color: var(--muted);
  font-weight: 500;
}

.static-page > h2 {
  margin: 28px 0 8px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--accent-strong);
}

.static-page > h2:first-of-type {
  margin-top: 0;
}

.static-page > p {
  margin: 0 0 12px;
}

.static-page .gate-schema {
  margin-top: 28px;
}

.theme-label {
  display: block;
  margin: 0 0 4px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}

.theme-sample {
  margin: 0 0 14px;
}

.theme-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin: 0 0 16px;
}

.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 14px 8px;
  margin: 8px 0 4px;
}

.theme-swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin: 0;
  text-align: center;
}

.theme-swatch .btn-icon {
  pointer-events: none;
}

.theme-swatch code {
  color: var(--muted);
  font-size: 11px;
  word-break: break-word;
}

.theme-page .btn-icon[aria-pressed="true"] {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

/* Legacy manifesto pages (if any) share the same rhythm. */
.manifesto {
  margin: 0 0 24px;
  padding-top: 0;
  border-top: 0;
}

.manifesto h2 {
  margin-top: 28px;
}

.manifesto h3 {
  margin-top: 22px;
}

.layers {
  display: grid;
  gap: 12px;
  margin: 12px 0 8px;
}

@media (min-width: 640px) {
  .layers {
    grid-template-columns: 1fr 1fr;
  }
}

.layer {
  margin: 0;
  padding: 14px 14px 10px;
  border-radius: 16px;
  border: 1px solid var(--accent-mid);
  background: var(--accent-pastel);
}

.layer h3,
.layer h4 {
  margin: 0 0 4px;
  font-size: 15px;
  color: var(--accent-deep);
}

.layer .plain-list {
  margin: 8px 0;
}

.landing .gate-schema {
  margin-top: 8px;
}

/* ---- Anonymous profile face ---- */

.profile-face {
  margin-top: 4px;
}

.profile-number {
  font-size: 30px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  margin: 0 0 6px;
}

/* Filled bookmark ribbon around #n; V cutout at bottom (not a tip). */
.mindset-id {
  display: inline-block;
  cursor: pointer;
  vertical-align: baseline;
  color: #fff;
  background: var(--accent);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 78%, 0 100%);
  padding: 0.12em 0.28em 0.42em;
  margin-right: 0.2em;
  min-width: 50px;
  text-align: center;
  border-radius: 6px 6px 0 0;
  line-height: 1.1;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
}

.profile-current {
  margin: 0 0 10px;
  color: var(--accent-deep);
  font-size: 14px;
  font-weight: 600;
}

.radar-face {
  display: flex;
  justify-content: center;
  margin: 8px 0 20px;
}

.radar-face .radar {
  margin: 0;
  max-width: 320px;
}

.surface-fields,
.bottom-fields {
  margin-top: 8px;
}

.surface-fields h2,
.bottom-fields h2 {
  margin-top: 0;
}

.actions-primary {
  margin-top: 8px;
}

.profile-tail-hint {
  margin: 0 0 12px;
}

.actions-secondary {
  margin-top: 4px;
}

.locked-list {
  display: grid;
  gap: 10px;
}

.locked-field {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: start;
  margin: 0;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--accent-mid);
  background: var(--accent-pastel);
}

.locked-field h3 {
  margin: 0;
  font-size: 15px;
}

.locked-icon {
  display: inline-flex;
  color: var(--accent-deep);
  margin-top: 2px;
}

.locked-blur {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.locked-blur span {
  display: block;
  height: 10px;
  border-radius: 999px;
  background: var(--accent-mid);
  filter: blur(3px);
  opacity: 0.85;
}

.locked-blur span:nth-child(1) { width: 92%; }
.locked-blur span:nth-child(2) { width: 78%; }
.locked-blur span:nth-child(3) { width: 64%; }

/* ---- Profile toolbar + reading slides ---- */

.profile-top {
  position: relative;
  display: block;
  margin: 6px 0 8px;
  padding: 4px 0 0;
}

/* Sticky header tabs → one-line gap before pane content */
.current-stick + .page-body > [role="tabpanel"],
.lake-stick + .page-body > [role="tabpanel"],
.school-stick + .page-body > #school-body > [role="tabpanel"],
.root-stick + .page-body > [role="tabpanel"],
.profile-stick ~ [role="tabpanel"],
.depth-section > [role="tabpanel"],
.tab-slide-clip > [role="tabpanel"] {
  padding-top: 1lh;
  min-height: 100dvh;
  touch-action: pan-y;
}

.tab-slide-clip {
  position: fixed;
  overflow: hidden;
  z-index: 7;
}

.tab-slide-pin {
  position: fixed;
  margin: 0;
  z-index: 7;
  transition: transform 0.32s ease;
}

.tab-slide-clip .tab-slide-pin {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: auto;
}

.current-stick + .page-body > [role="tabpanel"] > .section,
.lake-stick + .page-body > [role="tabpanel"] > .section,
.school-stick + .page-body > #school-body > [role="tabpanel"] > .section,
.root-stick + .page-body > [role="tabpanel"] > .section,
.profile-stick ~ [role="tabpanel"] > .section,
.tab-slide-clip > [role="tabpanel"] > .section {
  padding-top: 0;
}

.school-stick + .page-body > #school-body > [role="tabpanel"] > .section,
.root-stick + .page-body > [role="tabpanel"] > .section {
  padding-bottom: 20px;
}

body[data-tab="root"].is-page-loading #root-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

#sim-fish .person {
  align-items: flex-start;
}

#sim-fish .person-body {
  pointer-events: auto;
}

#sim-fish .person-tools {
  flex-direction: row;
  align-items: flex-start;
  align-self: flex-start;
  max-width: none;
}

.mindset-id-static {
  pointer-events: none;
  cursor: default;
  flex-shrink: 0;
  align-self: flex-start;
}

.person .mindset-id-static {
  font-size: 18px;
  font-weight: 700;
}

.mindset-id-static.is-sim {
  background: var(--danger);
  color: #fff;
}

body[data-tab="school"] .page-body [role="tabpanel"] > .section > .hint:first-child {
  margin-top: 0;
  font-size: 14px;
}

.profile-top-main {
  min-width: 0;
}

.profile-top-main .profile-number {
  margin: 0;
  min-height: 40px;
  line-height: 40px;
}

#title .mindset-id {
  vertical-align: top;
  transition: margin-bottom 0.2s ease;
}

#title .mindset-id:hover,
#title .mindset-id:focus-within {
  margin-bottom: -16px;
}

.profile-tools {
  position: absolute;
  top: 4px;
  right: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  flex-shrink: 0;
  margin: 0;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--accent-deep);
  cursor: pointer;
  text-decoration: none;
}

.btn-icon:hover {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.btn-icon .icon {
  width: 20px;
  height: 20px;
}

.school-chip {
  display: inline-flex;
  align-items: center;
  margin-right: 2px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--accent-mid);
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.how-to-read-link {
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  margin: 0;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.how-to-read-link:hover {
  color: var(--accent-strong);
  text-decoration: none;
}

.global-timeline {
  margin: 4px 0 2px;
  padding-bottom: 0;
  border-bottom: 0;
}

.global-timeline .timeline-field {
  display: grid;
  gap: 2px;
  margin: 0;
}

.profile-stick {
  position: sticky;
  top: 0;
  z-index: 8;
  margin: 0 -4px;
  padding: 0 4px 8px;
  background: var(--paper);
  border-bottom: 0;
  box-shadow:
    0 1px 0 var(--hair),
    0 10px 18px -14px rgba(20, 20, 20, 0.28);
}

.profile-tabs-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  margin: 4px 0 0;
}

.profile-tabs-bar .depth-tabs {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  border-bottom: 0;
}

.profile-tabs-bar .depth-tabs button {
  min-height: 40px;
}

.profile-tabs-bar .btn-round {
  position: relative;
  z-index: 1;
}

.profile-tabs-bar::after {
  content: "";
  position: absolute;
  right: 28px;
  top: 0;
  bottom: 0;
  width: 28px;
  pointer-events: none;
  background: linear-gradient(to right, transparent, var(--paper));
  z-index: 0;
}

.site-footer {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  box-sizing: border-box;
  width: 100%;
  max-width: 560px;
  margin: 12em auto 0;
  padding: 20px 20px calc(24px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--hair);
  background: var(--paper);
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.site-footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 16px;
}

.site-footer-row a {
  color: var(--muted);
  font-weight: 500;
  text-decoration: none;
}

.site-footer-row a:hover {
  color: var(--accent-strong);
}

.site-footer-collective {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.site-footer-collective img {
  width: 18px;
  height: 18px;
}

.site-footer-collective:hover {
  color: var(--accent-strong);
}

body.has-gamebar .site-footer {
  display: none;
}

.legal-page pre {
  white-space: pre-wrap;
  word-break: break-word;
  margin: 16px 0 0;
  padding: 16px;
  border: 1px solid var(--hair);
  border-radius: 12px;
  background: var(--paper);
  font: inherit;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
}

.btn-compact {
  min-height: 36px;
  padding: 6px 12px;
  font-size: 13px;
  border-radius: 999px;
}

#how-to-read-body {
  font-size: 13px;
  line-height: 1.45;
}

#how-to-read-body .hint {
  font-size: 12px;
}

.compass-trend {
  padding: 4px 0 8px;
  min-height: 200px;
}

.depth-section .tabs,
.depth-tabs {
  flex-wrap: nowrap;
  gap: 8px 14px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.depth-tabs::-webkit-scrollbar {
  display: none;
}

.depth-tabs button {
  flex: 0 0 auto;
  white-space: nowrap;
}

#how-to-read-body .plain-list {
  margin: 8px 0;
}


.reading-stage {
  margin: 8px 0 20px;
}

.reading-switch {
  display: flex;
  justify-content: flex-end;
  gap: 4px;
}

.reading-switch .btn-icon[aria-pressed="true"] {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.reading-slides {
  margin: 8px 0 20px;
}

.slides-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.slides-toolbar-end {
  justify-content: flex-end;
}

.slide-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.slides-viewport {
  overflow: hidden;
  width: 100%;
  touch-action: pan-y;
}

.slides-track {
  display: flex;
  width: 100%;
  transition: transform 0.32s ease;
  will-change: transform;
}

.reading-slides .slide {
  flex: 0 0 100%;
  width: 100%;
  min-height: 260px;
  box-sizing: border-box;
}

.face-bars {
  padding: 4px 0 8px;
}

.face-timeline {
  padding: 0;
}

.depth-section {
  margin-top: 0;
}

.depth-section .tabs button,
.depth-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tab-lock {
  display: inline-flex;
  color: var(--accent-deep);
}

.tab-lock .icon {
  width: 14px;
  height: 14px;
}

.locked-post h3 {
  display: flex;
  align-items: center;
  gap: 8px;
}

.locked-post .locked-icon {
  display: inline-flex;
  color: var(--accent-deep);
}

.locked-post .locked-icon .icon {
  width: 16px;
  height: 16px;
}

.entry-chip {
  position: absolute;
  top: 14px;
  right: 12px;
  z-index: 2;
  margin-top: -18px;
  padding: 2px 8px 4px;
  border-radius: 4px 4px 0 0;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.02em;
}

.entry:has(.entry-fish.is-sim) .entry-chip {
  background: var(--danger);
}

.slide-nav {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}

.slide-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--accent-mid);
  background: var(--accent-soft);
  cursor: pointer;
}

.slide-dot.is-active {
  background: var(--accent);
  border-color: var(--accent-deep);
}

.profile-number {
  font-variant-numeric: tabular-nums;
}

button.linkish,
.linkish {
  display: inline;
  margin: 0;
  padding: 0 10px;
  border: 0;
  background: none;
  color: var(--accent-strong);
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

button.linkish:hover,
.linkish:hover {
  color: var(--accent-deep);
}

.radar-dialog-axes {
  margin: 10px 0;
}

.radar-dialog-axes h3 {
  margin: 12px 0 4px;
}

.profile-face .depth-section.section {
  border-top: 0;
  padding-top: 4px;
  margin-top: 0;
}

.profile-face .profile-number {
  margin-bottom: 0;
}

.profile-face .actions-primary {
  flex-wrap: nowrap;
  margin-top: 12px;
}

.profile-face .actions-primary .btn {
  flex: 1 1 0;
  min-width: 0;
  padding-left: 8px;
  padding-right: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-face .actions-primary[hidden] {
  display: none;
  margin: 0;
}
