:root {
  --bg: #fff;
  --text: #050505;
  --muted: #7a7a7a;
  --line: #cfcfcf;
  --soft: #f5f5f3;
  --danger: #a0271d;

  --header-h: 58px;
  --page-x: clamp(18px, 3.2vw, 52px);

  --century-col: clamp(116px, 18vw, 300px);
  --suffix-col: clamp(116px, 18vw, 300px);

  --year-size: clamp(84px, 13.2vw, 214px);
}

/* KYMWA — hide page scrollbar while preserving scroll */
html,
body {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}


* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
}

body {
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Helvetica,
    Arial,
    sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: fixed;
  z-index: 50;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  padding:
    env(safe-area-inset-top)
    var(--page-x)
    0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: rgb(255 255 255 / 0.94);
  backdrop-filter: blur(12px);
}

.brand-lockup {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.brand {
  font-size: 13px;
  font-weight: 780;
  letter-spacing: -0.025em;
  white-space: nowrap;
}

.brand-meaning {
  color: var(--muted);
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-button {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 10px;
  font-weight: 730;
  letter-spacing: 0.08em;
}

.header-button.danger {
  color: var(--danger);
}

.timeline-page {
  padding-top: var(--header-h);
}

.timeline {
  width: 100%;
}

/* ========================================================
   YEAR
   19 | 49 -------------------- HISTORY

   - The first two digits and last two digits use separate rails.
   - Within the same century, the first two digits stay sticky.
   - Each year line starts at the last two digits and extends
     through the history area.
   - No extra divider between years.
======================================================== */

.century-group {
  position: relative;
  display: grid;
  grid-template-columns:
    var(--century-col)
    minmax(0, 1fr);
}

.century-rail {
  position: relative;
  grid-column: 1;
}

.century-sticky {
  position: sticky;
  top: calc(var(--header-h) + 22px);
  padding-left: var(--page-x);
  padding-top: 22px;
  height: fit-content;
}

.century-number,
.year-suffix {
  font-size: var(--year-size);
  font-weight: 790;
  line-height: 0.74;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.century-years {
  grid-column: 2;
  min-width: 0;
}

.year-section {
  position: relative;
  display: grid;
  grid-template-columns:
    var(--suffix-col)
    minmax(0, 1fr);
  min-height: 420px;

  /* The line starts here, at the last-two-digits column. */
  border-top: 1px solid var(--line);
}

.suffix-rail {
  position: relative;
  min-width: 0;
}

.suffix-sticky {
  position: sticky;
  top: calc(var(--header-h) + 22px);
  padding:
    22px
    clamp(16px, 2vw, 30px)
    42px
    0;
  height: fit-content;
}

.year-age {
  margin-top: 20px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 730;
  letter-spacing: 0.1em;
}

.year-content {
  min-width: 0;
  padding:
    clamp(62px, 8vw, 120px)
    var(--page-x)
    clamp(90px, 12vw, 170px)
    clamp(26px, 4vw, 72px);
}

.history-list,
.people-list {
  display: grid;
}

.history-list {
  gap: 22px;
}

.history-item,
.person-moment {
  max-width: 680px;
}

.history-meta,
.person-meta {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 740;
  letter-spacing: 0.12em;
}

.history-title,
.history-description {
  max-width: 48ch;
  line-height: 1.68;
}

.history-title {
  margin: 0;
  color: var(--text);
}

.history-description {
  margin: 4px 0 0;
  font-size: 16px;
}

.history-title-link {
  color: inherit;
  text-decoration: none;
}

.history-description {
  color: #3d3d3d;
}

.history-image,
.person-image {
  display: block;
  width: 100%;
  max-height: 560px;
  margin-top: 28px;
  object-fit: cover;
  background: var(--soft);
}

.history-source {
  display: inline-block;
  margin-top: 12px;
  font-size: 9px;
  font-weight: 730;
  letter-spacing: 0.1em;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.people-list {
  margin-top: 22px;
  gap: 12px;
}

.history-list + .people-list {
  margin-top: 12px;
}

.person-moment {
  padding-top: 0;
}



.person-image {
  max-width: 520px;
}

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

.edit-moment-button {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 9px;
  font-weight: 740;
  letter-spacing: 0.09em;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.timeline-empty {
  min-height: 100dvh;
  padding:
    calc(var(--header-h) + 80px)
    var(--page-x);
  display: flex;
  align-items: flex-start;
  color: var(--muted);
  font-size: 12px;
}

.floating-add {
  position: fixed;
  z-index: 45;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid #111;
  border-radius: 50%;
  background: #111;
  color: #fff;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

/* ========================================================
   SHEETS
======================================================== */

.sheet-backdrop {
  position: fixed;
  z-index: 90;
  inset: 0;
  background: rgb(0 0 0 / 0.24);
  opacity: 0;
  transition: opacity 180ms ease;
}

.sheet-backdrop.is-visible {
  opacity: 1;
}

.sheet {
  position: fixed;
  z-index: 100;
  left: 50%;
  bottom: 0;
  width: min(650px, 100%);
  max-height: 90dvh;
  overflow: auto;
  padding:
    10px
    clamp(20px, 5vw, 40px)
    max(28px, env(safe-area-inset-bottom));
  background: #fff;
  transform: translate(-50%, 105%);
  transition: transform 220ms ease;
}

.sheet.is-open {
  transform: translate(-50%, 0);
}

.sheet-handle {
  width: 38px;
  height: 4px;
  margin: 2px auto 24px;
  border-radius: 999px;
  background: #c7c7c7;
}

.sheet-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}

.sheet-kicker {
  margin: 0 0 10px;
  font-size: 9px;
  font-weight: 740;
  letter-spacing: 0.12em;
}

.sheet-header h2 {
  margin: 0;
  font-size: clamp(34px, 7vw, 56px);
  line-height: 0.96;
  letter-spacing: -0.055em;
}

.icon-button {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 30px;
}

.sheet-form {
  display: grid;
  gap: 24px;
}

.field {
  display: grid;
  gap: 8px;
}

.field > span {
  font-size: 9px;
  font-weight: 740;
  letter-spacing: 0.1em;
}

.field small {
  color: var(--muted);
  font-size: 8px;
}

.field input {
  width: 100%;
  padding: 13px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  outline: none;
  background: transparent;
  color: var(--text);
}

.photo-picker {
  min-height: 140px;
  padding: 20px;
  display: grid;
  place-items: center;
  background: var(--soft);
  cursor: pointer;
  font-size: 10px;
  font-weight: 740;
  letter-spacing: 0.08em;
}

.photo-preview img {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
}

.photo-preview .header-button {
  margin-top: 10px;
}

.primary-button,
.secondary-button {
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid #111;
  cursor: pointer;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.08em;
}

.primary-button {
  background: #111;
  color: #fff;
}

.secondary-button {
  background: #fff;
  color: #111;
}

.secondary-button.danger {
  color: var(--danger);
  border-color: var(--danger);
}

.form-actions {
  display: flex;
  gap: 10px;
}

.form-actions > * {
  flex: 1;
}

.form-status {
  min-height: 18px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.upgrade-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.upgrade-grid > div {
  padding: 20px 0;
  display: grid;
  gap: 8px;
}

.upgrade-grid > div + div {
  padding-left: 20px;
}

.upgrade-grid strong {
  font-size: 17px;
}

.upgrade-grid span {
  color: var(--muted);
  font-size: 11px;
}

@media (max-width: 760px) {
  :root {
    --header-h: 54px;
    --page-x: 14px;

    --century-col: 24vw;
    --suffix-col: 24vw;

    --year-size: clamp(62px, 19vw, 92px);
  }

  .header-actions {
    gap: 10px;
  }

  .brand-meaning {
    display: none;
  }

  .century-sticky,
  .suffix-sticky {
    top: calc(var(--header-h) + 16px);
    padding-top: 16px;
  }

  .century-sticky {
    padding-left: 10px;
  }

  .suffix-sticky {
    padding-right: 8px;
  }

  .year-section {
    min-height: 380px;
  }

  .year-content {
    padding:
      52px
      14px
      78px
      16px;
  }

  .history-title {
    font-size: clamp(25px, 8vw, 40px);
  }

  .person-title {
    font-size: 21px;
  }

  .history-description {
    font-size: 13px;
  }

  .people-list {
    margin-top: 26px;
    gap: 12px;
  }

  .history-list + .people-list {
    margin-top: 12px;
  }

  .floating-add {
    right: 14px;
    bottom: max(14px, env(safe-area-inset-bottom));
  }
}


/* KYMWA v8 — keep admin-history and user text exactly the same size */
.history-title,
.person-title {
  margin: 0;
  color: var(--text);
  font-size: clamp(20px, 2.6vw, 36px);
  font-weight: 720;
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.history-title-link,
.history-title-link:link,
.history-title-link:visited,
.history-title-link:hover,
.history-title-link:active {
  color: var(--text);
  text-decoration: none;
}

@media (max-width: 680px) {
  .history-title {
    font-size: 16px;
    line-height: 1.4;
    letter-spacing: -0.02em;
  }

  .person-title {
    font-size: 19px;
    line-height: 1.35;
    letter-spacing: -0.025em;
  }
}


/* KYMWA account */
.account-actions {
  grid-template-columns: 1fr 1fr;
}

.account-summary {
  display: grid;
  gap: 8px;
  padding: 8px 0 26px;
}

.account-summary-label {
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .1em;
}

.account-summary strong {
  font-size: 30px;
  line-height: 1;
  letter-spacing: -.04em;
}

.account-summary span:last-child {
  color: var(--muted);
  font-size: 11px;
}

.tier-list {
  display: grid;
  margin-top: 34px;
  border-top: 1px solid var(--line);
}

.tier-list > div {
  display: grid;
  grid-template-columns: 100px 1fr;
  column-gap: 20px;
  row-gap: 4px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}

.tier-list > div > span {
  grid-column: 2;
}

.tier-list strong {
  font-size: 10px;
  letter-spacing: .06em;
}

.tier-list span {
  color: var(--muted);
  font-size: 11px;
}

@media (max-width: 520px) {
  .account-actions {
    grid-template-columns: 1fr;
  }
}


/* KYMWA v10 — timeline lazy loading */
.timeline-loader {
  width: 100%;
  height: 1px;
}

.timeline-loader.is-loading {
  height: 56px;
}

.timeline-loader.is-loading::after {
  content: "";
  display: block;
  width: 18px;
  height: 18px;
  margin: 18px auto;
  border: 1px solid var(--line);
  border-top-color: var(--text);
  border-radius: 50%;
  animation: kymwa-spin .7s linear infinite;
}

@keyframes kymwa-spin {
  to {
    transform: rotate(360deg);
  }
}


/* KYMWA v12 — consistent moment photo frame */
.person-image,
.moment-photo,
.timeline img[data-moment-photo] {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  object-position: center;
  display: block;
}



/* KYMWA v15 — release hardening */
.field-counter {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .08em;
  text-align: right;
}

.account-preserve-note {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
  letter-spacing: .03em;
}

.primary-button:disabled,
.secondary-button:disabled,
.header-button:disabled {
  opacity: .45;
  pointer-events: none;
}

.year-more-button {
  margin-top: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .1em;
  cursor: pointer;
}

.year-more-button:hover {
  color: var(--text);
}

.person-moment[data-moment-id] {
  scroll-margin-top: 92px;
}



/* KYMWA v16 — privacy, recovery, share */
.visibility-field {
  margin: 0;
  padding: 0;
  border: 0;
}

.visibility-field legend {
  margin-bottom: 10px;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .1em;
}

.visibility-field label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 18px;
  font-size: 11px;
  font-weight: 700;
}

.visibility-field small {
  display: block;
  margin-top: 9px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.4;
}

.save-recovery {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
}

.save-recovery[hidden] {
  display: none;
}

.network-banner {
  position: fixed;
  z-index: 90;
  top: 58px;
  left: 50%;
  transform: translateX(-50%);
  width: min(560px, calc(100% - 32px));
  padding: 9px 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.96);
  color: var(--text);
  font-size: 9px;
  text-align: center;
  letter-spacing: .04em;
}

.network-banner[hidden] {
  display: none;
}

.person-moment.is-private {
  opacity: .74;
}



/* KYMWA v22.2 — scroll stability
   Do not virtualize whole year sections: their real heights are needed by
   sticky year rails and Safari scroll positioning. */
.person-image,
.history-image {
  content-visibility: auto;
}

.person-image {
  aspect-ratio: 3 / 2;
}

.timeline-loader {
  overflow-anchor: none;
}


/* ========================================================
   KYMWA ADMIN — v18
======================================================== */

.admin-page {
  --admin-page-x: clamp(20px, 4vw, 48px);
  --admin-content: 1120px;
  background: #fff;
}

.admin-page button,
.admin-page input,
.admin-page select,
.admin-page textarea {
  border-radius: 0;
}

.admin-shell {
  width: min(var(--admin-content), calc(100% - (var(--admin-page-x) * 2)));
  margin: 0 auto;
  padding: 0 0 96px;
}

.admin-brandbar {
  height: 72px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.admin-brand {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}

.admin-brand strong {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -.04em;
}

.admin-brand span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .12em;
}

.admin-login {
  width: min(420px, 100%);
  padding: 96px 0 120px;
}

.admin-login[hidden],
.admin-panel[hidden],
.admin-editor[hidden] {
  display: none;
}

.admin-login-copy {
  margin-bottom: 44px;
}

.admin-login-copy h1,
.admin-page-head h1 {
  margin: 6px 0 0;
  font-size: clamp(42px, 5vw, 64px);
  font-weight: 760;
  line-height: .98;
  letter-spacing: -.06em;
}

.admin-login-copy > p:last-child {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.admin-kicker {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  font-weight: 760;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.admin-panel {
  padding-top: 58px;
}

.admin-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  padding-bottom: 54px;
}

.admin-page-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-bottom: 4px;
}

.admin-section {
  padding: 42px 0 52px;
  border-top: 1px solid #111;
}

.admin-section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.admin-section-heading h2,
.admin-system-details summary h2 {
  margin: 5px 0 0;
  font-size: 24px;
  font-weight: 730;
  line-height: 1.08;
  letter-spacing: -.045em;
}

.admin-section-meta,
.admin-section-description {
  color: var(--muted);
  font-size: 11px;
}

.admin-section-description {
  margin: 9px 0 0;
  line-height: 1.55;
}

.admin-form,
.event-form {
  display: grid;
  gap: 24px;
}

.admin-field {
  display: grid;
  gap: 8px;
}

.admin-field > span {
  color: #555;
  font-size: 10px;
  font-weight: 680;
  letter-spacing: .02em;
}

.admin-field input,
.admin-field textarea,
.admin-field select,
.admin-search-form input,
.admin-system-inline-form input,
.admin-confirm-field input {
  width: 100%;
  padding: 12px 0 13px;
  border: 0;
  border-bottom: 1px solid var(--line);
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  line-height: 1.4;
  transition: border-color 140ms ease;
}

.admin-field input:focus,
.admin-field textarea:focus,
.admin-field select:focus,
.admin-search-form input:focus,
.admin-system-inline-form input:focus,
.admin-confirm-field input:focus {
  border-bottom-color: #111;
}

.admin-field textarea {
  min-height: 112px;
  resize: vertical;
}

.admin-field select {
  appearance: none;
}

.admin-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  color: #555;
  font-size: 11px;
}

.admin-checkbox input {
  margin: 0;
}

.admin-primary-button,
.admin-secondary-button,
.admin-danger-button,
.admin-text-button {
  appearance: none;
  cursor: pointer;
  font: inherit;
  transition: opacity 140ms ease, background 140ms ease, color 140ms ease, border-color 140ms ease;
}

.admin-primary-button {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid #111;
  background: #111;
  color: #fff;
  font-size: 11px;
  font-weight: 720;
}

.admin-primary-button--compact {
  min-height: 38px;
  padding: 0 15px;
}

.admin-secondary-button {
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid var(--line);
  background: #fff;
  color: #222;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.admin-text-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: #555;
  font-size: 10px;
  font-weight: 700;
}

.admin-primary-button:hover,
.admin-secondary-button:hover,
.admin-text-button:hover {
  opacity: .62;
}

.admin-primary-button:disabled,
.admin-secondary-button:disabled,
.admin-danger-button:disabled,
.admin-text-button:disabled {
  opacity: .4;
  pointer-events: none;
}

.admin-status {
  min-height: 16px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.admin-status.is-error {
  color: var(--danger);
}

.admin-performance-table {
  border-top: 1px solid #111;
}

.admin-performance-row {
  display: grid;
  grid-template-columns: minmax(140px, 1.25fr) repeat(3, minmax(88px, .75fr));
  align-items: center;
  min-height: 62px;
  border-bottom: 1px solid var(--line);
}

.admin-performance-row > * {
  padding-right: 18px;
}

.admin-performance-row > *:not(:first-child) {
  text-align: right;
}

.admin-performance-head {
  min-height: 36px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.admin-performance-row strong {
  font-size: 12px;
  font-weight: 700;
}

.admin-performance-row:not(.admin-performance-head) span {
  font-size: clamp(19px, 2.2vw, 28px);
  font-weight: 720;
  line-height: 1;
  letter-spacing: -.045em;
}

.admin-analytics-summary {
  display: grid;
  grid-template-columns: minmax(170px, auto) minmax(0, 1fr);
  align-items: end;
  gap: 28px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.admin-analytics-summary span {
  display: block;
  color: var(--muted);
  font-size: 9px;
}

.admin-analytics-summary strong {
  display: block;
  margin-top: 8px;
  font-size: 32px;
  font-weight: 730;
  line-height: 1;
  letter-spacing: -.055em;
}

.admin-analytics-summary p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.admin-analytics-chart-block {
  padding: 28px 0 32px;
  border-bottom: 1px solid var(--line);
}

.admin-analytics-chart-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.admin-analytics-chart-head > div span,
.admin-analytics-chart-head > span {
  color: var(--muted);
  font-size: 9px;
}

.admin-analytics-chart-head strong {
  display: block;
  margin-top: 4px;
  font-size: 14px;
  font-weight: 700;
}

.admin-analytics-chart {
  width: 100%;
  min-height: 230px;
  overflow: hidden;
}

.admin-bar-chart {
  display: grid;
  grid-template-columns: repeat(30, minmax(0, 1fr));
  gap: clamp(2px, .45vw, 6px);
  width: 100%;
  height: 230px;
  padding-top: 8px;
  border-bottom: 1px solid rgba(0, 0, 0, .12);
}

.admin-bar-column {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) 28px;
  min-width: 0;
  height: 100%;
}

.admin-bar-track {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 0;
}

.admin-bar-fill {
  display: block;
  width: 100%;
  min-height: 0;
  background: #111;
  border-radius: 2px 2px 0 0;
}

.admin-bar-date {
  position: absolute;
  bottom: -27px;
  color: #888;
  font-size: 10px;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
}

.admin-bar-date.is-visible {
  opacity: 1;
}

.admin-bar-column:first-child .admin-bar-date {
  left: 0;
}

.admin-bar-column:not(:first-child):not(:last-child) .admin-bar-date {
  left: 50%;
  transform: translateX(-50%);
}

.admin-bar-column:last-child .admin-bar-date {
  right: 0;
}

.admin-overview-heading {
  padding: 34px 0 18px;
}

.admin-overview-heading h3 {
  margin: 5px 0 0;
  font-size: 18px;
  font-weight: 720;
  letter-spacing: -.04em;
}

.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.admin-stat {
  min-height: 112px;
  padding: 18px 20px 18px 0;
  border-bottom: 1px solid var(--line);
}

.admin-stat span {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.admin-stat strong {
  display: block;
  margin-top: 20px;
  font-size: clamp(28px, 3.2vw, 40px);
  font-weight: 720;
  line-height: 1;
  letter-spacing: -.055em;
}

.admin-editor {
  margin: 0 0 34px;
  padding: 28px;
  border: 1px solid #111;
}

.admin-editor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}

.admin-editor-head h3 {
  margin: 5px 0 0;
  font-size: 21px;
  font-weight: 720;
  letter-spacing: -.04em;
}

.event-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 30px;
}

.event-form-grid .wide {
  grid-column: 1 / -1;
}

.admin-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 2px;
}

.admin-form-footer .admin-status {
  margin: 0;
}

.admin-events {
  display: grid;
  border-top: 1px solid var(--line);
}

.admin-event {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) auto;
  align-items: start;
  gap: 22px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.admin-event-year {
  font-size: 24px;
  font-weight: 730;
  line-height: 1;
  letter-spacing: -.05em;
}

.admin-event-title {
  margin: 0;
  font-size: 15px;
  font-weight: 690;
  line-height: 1.35;
  letter-spacing: -.02em;
}

.admin-event-meta {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.admin-event-actions {
  display: flex;
  gap: 14px;
}

.admin-event-actions button {
  padding: 0;
  border: 0;
  background: transparent;
  color: #666;
  cursor: pointer;
  font-size: 10px;
  font-weight: 690;
}

.admin-event-actions button[data-delete] {
  color: #888;
}

.admin-search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  width: min(520px, 100%);
}

.admin-user-id-change-form {
  margin-top: 18px;
}

.admin-user-id-change-form + .admin-status {
  margin-top: 8px;
}

.admin-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.admin-inline-actions + .admin-status {
  margin-top: 8px;
}

.admin-user-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 24px;
  border-top: 1px solid var(--line);
}

.admin-user-summary > div {
  padding: 17px 16px 18px 0;
  border-bottom: 1px solid var(--line);
}

.admin-user-summary span,
.admin-user-moment span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.admin-user-summary strong {
  display: block;
  margin-top: 8px;
  font-size: 15px;
  font-weight: 700;
}

.admin-user-moments {
  border-top: 0;
}

.admin-user-moment {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.admin-user-moment > div > strong {
  display: block;
  margin-bottom: 5px;
  font-size: 14px;
}

.admin-user-moment .admin-danger-button {
  min-height: 32px;
  padding: 0 10px;
  border-color: var(--line);
  background: #fff;
  color: #666;
}

.admin-audit-list {
  border-top: 1px solid var(--line);
}

.admin-audit-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.admin-audit-row strong {
  display: block;
  font-size: 12px;
  font-weight: 680;
}

.admin-audit-row span,
.admin-audit-row time {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.4;
}

.admin-system-section {
  padding-bottom: 0;
}

.admin-system-details {
  border: 0;
}

.admin-system-details > summary {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  cursor: pointer;
  list-style: none;
}

.admin-system-details > summary::-webkit-details-marker {
  display: none;
}

.admin-details-state {
  width: 14px;
  height: 14px;
  position: relative;
  flex: 0 0 auto;
}

.admin-details-state::before,
.admin-details-state::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 1px;
  background: #777;
  transform: translate(-50%, -50%);
}

.admin-details-state::after {
  transform: translate(-50%, -50%) rotate(90deg);
  transition: transform 140ms ease;
}

.admin-system-details[open] .admin-details-state::after {
  transform: translate(-50%, -50%) rotate(0deg);
}

.admin-system-body {
  margin-top: 30px;
  border-top: 1px solid var(--line);
}

.admin-system-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 32px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.admin-system-row h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 690;
  letter-spacing: -.02em;
}

.admin-system-row p {
  margin: 7px 0 0;
  max-width: 650px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.admin-system-row--critical {
  margin-top: 20px;
  border-top: 1px solid #111;
}

.admin-system-inline-form {
  display: grid;
  grid-template-columns: 150px auto;
  align-items: end;
  gap: 10px;
}

.admin-confirm-dialog {
  width: min(480px, calc(100vw - 32px));
  padding: 0;
  border: 0;
  background: #fff;
  color: var(--text);
  box-shadow: 0 28px 90px rgb(0 0 0 / .18);
}

.admin-confirm-dialog::backdrop {
  background: rgb(0 0 0 / .42);
  backdrop-filter: blur(2px);
}

.admin-confirm-card {
  padding: 30px;
}

.admin-confirm-card h2 {
  margin: 6px 0 13px;
  font-size: 24px;
  font-weight: 730;
  letter-spacing: -.045em;
}

.admin-confirm-card > p:not(.admin-kicker):not(.admin-status) {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.admin-confirm-field {
  display: grid;
  gap: 9px;
  margin-top: 26px;
}

.admin-confirm-field span {
  color: #555;
  font-size: 10px;
}

.admin-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 24px;
}

.admin-danger-button {
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid var(--danger);
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 720;
}

.admin-danger-button:hover {
  opacity: .72;
}

@media (max-width: 760px) {
  .admin-shell {
    width: min(100% - 36px, var(--admin-content));
    padding-bottom: 72px;
  }

  .admin-brandbar {
    height: 60px;
  }

  .admin-login {
    padding-top: 68px;
  }

  .admin-panel {
    padding-top: 42px;
  }

  .admin-page-head {
    align-items: flex-start;
    flex-direction: column;
    padding-bottom: 42px;
  }

  .admin-page-actions {
    width: 100%;
    justify-content: space-between;
  }

  .admin-section {
    padding: 34px 0 42px;
  }

  .admin-section-heading {
    margin-bottom: 22px;
  }

  .admin-section-heading h2,
  .admin-system-details summary h2 {
    font-size: 22px;
  }

  .admin-performance-row {
    grid-template-columns: minmax(96px, 1.15fr) repeat(3, minmax(58px, .75fr));
    min-height: 56px;
  }

  .admin-performance-row > * {
    padding-right: 8px;
  }

  .admin-performance-row:not(.admin-performance-head) span {
    font-size: 20px;
  }

  .admin-analytics-summary {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .admin-analytics-chart svg {
    height: 200px;
  }

  .admin-stat-grid,
  .admin-user-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-stat {
    min-height: 96px;
  }

  .admin-stat strong {
    margin-top: 17px;
    font-size: 30px;
  }

  .admin-editor {
    padding: 22px 18px;
  }

  .event-form-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .event-form-grid .wide {
    grid-column: auto;
  }

  .admin-event {
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 16px;
  }

  .admin-event-actions {
    grid-column: 2;
  }

  .admin-system-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .admin-system-inline-form {
    grid-template-columns: minmax(0, 1fr) auto;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .admin-page-head h1 {
    font-size: 44px;
  }

  .admin-stat-grid,
  .admin-user-summary {
    grid-template-columns: 1fr 1fr;
  }

  .admin-stat:nth-child(7) {
    grid-column: 1 / -1;
  }

  .admin-form-footer,
  .admin-user-moment,
  .admin-audit-row {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .admin-form-footer {
    display: flex;
    flex-direction: column;
  }

  .admin-form-footer .admin-primary-button {
    width: 100%;
  }

  .admin-search-form,
  .admin-system-inline-form {
    grid-template-columns: 1fr;
  }

  .admin-audit-row time {
    margin-top: 3px;
  }
}


/* KYMWA v19 — event location */
.admin-location-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px 30px;
}

@media (max-width: 680px) {
  .admin-location-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}








/* KYMWA v19.7 — fixed year digit cells */
:root {
  --year-digit-step: calc(var(--year-size) * 0.59);
}

/*
  Every numeral occupies an identical cell.
  The visible rhythm therefore stays fixed regardless of whether
  the year contains narrow numerals such as 1 or wide numerals such as 8.
*/
.century-number,
.year-suffix {
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.year-digits {
  display: grid;
  grid-template-columns:
    var(--year-digit-step)
    var(--year-digit-step);
  width: calc(var(--year-digit-step) * 2);
}

.year-digit {
  display: block;
  width: var(--year-digit-step);
  text-align: center;
}

/*
  The suffix rail begins exactly two digit-steps after the first digit rail,
  so the 2→0, 0→2 and 2→6 center intervals are identical.
*/
:root {
  --century-col: calc(
    var(--page-x) +
    (var(--year-digit-step) * 2)
  );
}

.century-sticky {
  padding-left: var(--page-x);
}

.year-section {
  column-gap: 0;
}

.century-rail,
.suffix-rail {
  margin: 0;
  padding-right: 0;
}

@media (max-width: 760px) {
  :root {
    --century-col: calc(
      10px +
      (var(--year-digit-step) * 2)
    );
  }

  .century-sticky {
    padding-left: 10px;
  }

  .suffix-sticky {
    padding-left: 0;
  }
}


/* KYMWA v20 — permanent year-grid alignment model */

/*
  YEAR GEOMETRY
  -------------
  A year is four equal digit cells:
      [1][2][3][4]

  The century rail owns cells 1–2.
  The suffix rail owns cells 3–4.

  AGE uses the suffix rail itself as its alignment box.
  Therefore:
    AGE right edge = suffix box right edge
  and the content column begins from that same structural boundary.

  No numeral-specific offsets or per-year patches are used.
*/

:root {
  --year-digit-step: calc(var(--year-size) * 0.59);
  --year-pair-width: calc(var(--year-digit-step) * 2);
  --year-full-width: calc(var(--year-digit-step) * 4);
}

.year-digits {
  display: grid;
  grid-template-columns:
    repeat(2, var(--year-digit-step));
  width: var(--year-pair-width);
}

.year-digit {
  display: flex;
  width: var(--year-digit-step);
  align-items: baseline;
  justify-content: center;
  text-align: center;
}

.century-number,
.year-suffix {
  margin: 0;
  padding: 0;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/*
  Both year halves are adjacent with no artificial inter-pair spacing.
  Their cell centers define the visual rhythm.
*/
.year-section {
  column-gap: 0;
}

.century-rail,
.suffix-rail {
  margin: 0;
  padding-right: 0;
}

/*
  AGE belongs to the two-cell suffix rail.
  It fills exactly the same width as the final two digits and aligns right.
  This makes its right edge identical to the structural end of the year.
*/
.year-age {
  box-sizing: border-box;
  width: var(--year-pair-width);
  max-width: var(--year-pair-width);
  margin-left: 0;
  margin-right: 0;
  padding-left: 0;
  padding-right: 0;
  text-align: right;
  justify-self: start;
}

/*
  The suffix column starts immediately after the century pair.
  The content boundary is therefore derived from the same year geometry.
*/
:root {
  --century-col: calc(
    var(--page-x) +
    var(--year-pair-width)
  );
}

.century-sticky {
  padding-left: var(--page-x);
}

.suffix-sticky {
  padding-left: 0;
}

@media (max-width: 760px) {
  :root {
    --century-col: calc(
      10px +
      var(--year-pair-width)
    );
  }

  .century-sticky {
    padding-left: 10px;
  }

  .suffix-sticky {
    padding-left: 0;
  }
}






/* KYMWA v20.4 — header is always paintable */
#birth-year-button,
#plan-button {
  visibility: visible;
}


/* ========================================================
ADMIN · RECORD MANAGEMENT
======================================================== */

.admin-record-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 18px 0 8px;
}

.admin-record-filters {
  display: flex;
  align-items: center;
  gap: 4px;
}

.admin-filter-button {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 7px 9px;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
}

.admin-filter-button.is-active {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.admin-record-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-record-search input {
  width: min(280px, 34vw);
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--bg);
  color: var(--text);
  padding: 8px 10px;
  outline: none;
}

.admin-record-search input:focus {
  border-color: var(--text);
}

.admin-record-list {
  border-top: 1px solid var(--line);
}

.admin-record-row {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) auto;
  align-items: start;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.admin-record-year {
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -0.03em;
}

.admin-record-main {
  min-width: 0;
}

.admin-record-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  color: var(--muted);
  font-size: 12px;
}

.admin-record-meta strong {
  color: var(--text);
  font-size: 12px;
}

.admin-record-title {
  margin: 8px 0 0;
  font-size: 16px;
  font-weight: 650;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.admin-record-delete {
  align-self: center;
}

.admin-record-more-wrap {
  display: flex;
  justify-content: center;
  padding-top: 18px;
}

@media (max-width: 680px) {
  .admin-record-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-record-search input {
    width: 100%;
  }

  .admin-record-search {
    width: 100%;
  }

  .admin-record-search input {
    flex: 1;
    min-width: 0;
  }

  .admin-record-row {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 12px;
  }

  .admin-record-delete {
    grid-column: 2;
    justify-self: start;
  }
}


/* KYMWA v21.1 — account profile layout */
#account-signed-in:not([hidden]) {
  display: grid;
  gap: 0;
}

.account-summary {
  padding: 4px 0 18px;
}

.account-section {
  border-top: 1px solid var(--line);
  padding: 16px 0;
}

.account-section-heading {
  display: grid;
  gap: 4px;
  margin-bottom: 14px;
}

.account-section-heading strong {
  font-size: 12px;
  line-height: 1.2;
  letter-spacing: 0.04em;
}

.account-section-heading span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
  letter-spacing: 0.02em;
}

.account-plus-section {
  display: grid;
  gap: 8px;
}

.account-signout-section .secondary-button,
.account-id-change-section .secondary-button {
  width: 100%;
}

#account-id-change-form.account-id-change-section {
  gap: 14px;
}

#account-id-change-form .field {
  gap: 5px;
}

#account-id-change-form .field input {
  padding-top: 10px;
  padding-bottom: 10px;
}

#account-id-change-form .form-status,
.account-plus-section .form-status {
  min-height: 0;
}

#account-id-change-form .form-status:empty,
.account-plus-section .form-status:empty {
  display: none;
}

.account-signout-section {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

#account-id-change-button,
#sign-out-button {
  min-height: 46px;
}

.tier-list {
  margin-top: 22px;
}


/* ========================================================
SPONSORED CONTENT / CAMPAIGNS / REPORTS
======================================================== */
.history-sponsored-label {
  margin: 0 0 8px;
  color: #777;
  font-size: 8px;
  font-weight: 760;
  letter-spacing: .04em;
}
.history-item.is-sponsored { position: relative; }

.admin-sponsored-badge { display: inline-block; margin-top: 6px; color: #777; font-size: 9px; font-weight: 760; letter-spacing: .03em; text-transform: uppercase; }
.admin-campaigns { display: grid; border-top: 1px solid var(--line); }
.admin-campaign-row { display: grid; grid-template-columns: minmax(220px, 1.2fr) minmax(320px, 1fr) auto; gap: 26px; align-items: center; padding: 22px 0; border-bottom: 1px solid var(--line); }
.admin-campaign-main h3 { margin: 6px 0 0; font-size: 15px; line-height: 1.35; }
.admin-campaign-main p { margin: 6px 0 0; color: var(--muted); font-size: 10px; }
.admin-campaign-performance { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; }
.admin-campaign-performance div { display: grid; gap: 4px; }
.admin-campaign-performance span { color: var(--muted); font-size: 9px; }
.admin-campaign-performance strong { font-size: 15px; }
.admin-campaign-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px; }

.report-page {
  background: #fff;
  color: #111;
}

.report-shell {
  width: min(1080px, calc(100% - 48px));
  margin: 0 auto;
  padding: 30px 0 72px;
}

.report-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  font-size: 10px;
  font-weight: 760;
  line-height: 1;
  letter-spacing: .11em;
}

.report-brand a {
  color: inherit;
  text-decoration: none;
}

.report-content {
  padding-top: clamp(42px, 6vw, 68px);
}

.report-hero {
  max-width: 900px;
}

.report-hero-label {
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 760;
  line-height: 1.2;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.report-hero h1 {
  max-width: 880px;
  margin: 0;
  font-size: clamp(34px, 5.4vw, 64px);
  font-weight: 760;
  line-height: .98;
  letter-spacing: -.055em;
}

.report-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: .07em;
}

.report-hero-link {
  margin-top: 18px;
}

.report-destination-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid #111;
  color: #111;
  font-size: 9px;
  font-weight: 760;
  line-height: 1;
  letter-spacing: .08em;
  text-decoration: none;
}

.report-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: clamp(42px, 6vw, 64px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.report-metrics > div {
  min-width: 0;
  padding: 20px 20px 22px;
  border-right: 1px solid var(--line);
}

.report-metrics > div:first-child {
  padding-left: 0;
}

.report-metrics > div:last-child {
  border-right: 0;
  padding-right: 0;
}

.report-metrics span,
.report-summary-meta span,
.report-insight > span,
.report-moment-stats span,
.report-method-grid span {
  display: block;
  color: var(--muted);
  font-size: 9px;
  font-weight: 740;
  line-height: 1.25;
  letter-spacing: .085em;
}

.report-metrics > div > strong {
  display: block;
  margin-top: 10px;
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 760;
  line-height: 1;
  letter-spacing: -.045em;
}

.report-metrics small {
  display: block;
  margin-top: 9px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.report-section {
  margin-top: 58px;
}

.report-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 11px;
  border-bottom: 1px solid var(--line);
  font-size: 10px;
  font-weight: 740;
  line-height: 1.2;
  letter-spacing: .075em;
}

.report-section-head strong {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.report-summary {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
  gap: 48px;
  padding-top: 24px;
}

.report-summary > p {
  max-width: 680px;
  margin: 0;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.55;
  letter-spacing: -.025em;
}

.report-summary > p strong {
  font-weight: 760;
}

.report-summary-meta {
  display: grid;
  gap: 16px;
}

.report-summary-meta > div {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.report-summary-meta strong {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.report-insight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

.report-insight {
  min-width: 0;
  padding: 22px 20px 24px;
  border-right: 1px solid var(--line);
}

.report-insight:first-child {
  padding-left: 0;
}

.report-insight:last-child {
  border-right: 0;
  padding-right: 0;
}

.report-insight > strong {
  display: block;
  margin-top: 10px;
  overflow: hidden;
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 730;
  line-height: 1.15;
  letter-spacing: -.035em;
  text-overflow: ellipsis;
}

.report-insight p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.report-chart {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(4px, 1fr);
  align-items: end;
  gap: clamp(2px, .45vw, 6px);
  height: 200px;
  padding-top: 24px;
}

.report-bar-wrap {
  display: flex;
  align-items: flex-end;
  height: 100%;
}

.report-bar {
  width: 100%;
  min-height: 3px;
  background: #111;
}

.report-chart-axis {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1;
}

.report-empty-chart {
  display: grid;
  place-items: center;
  height: 150px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .06em;
}

.report-table-wrap {
  overflow-x: auto;
  margin-top: 24px;
  -webkit-overflow-scrolling: touch;
}

.report-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}

.report-table th,
.report-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  white-space: nowrap;
}

.report-table th:first-child,
.report-table td:first-child {
  padding-left: 0;
  text-align: left;
}

.report-table th:last-child,
.report-table td:last-child {
  padding-right: 0;
}

.report-table th {
  color: var(--muted);
  font-size: 9px;
  font-weight: 740;
  letter-spacing: .075em;
}

.report-table td {
  font-size: 11px;
  font-weight: 620;
}

.report-moments {
  border-bottom: 1px solid var(--line);
}

.report-moments article {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(420px, 1fr);
  gap: 28px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.report-moments article:last-child {
  border-bottom: 0;
}

.report-moment-copy {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 16px;
  align-items: baseline;
  min-width: 0;
}

.report-moment-copy > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.report-moment-copy > strong {
  min-width: 0;
  overflow: hidden;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  text-overflow: ellipsis;
}

.report-moment-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.report-moment-stats > div {
  min-width: 0;
}

.report-moment-stats strong {
  display: block;
  margin-top: 5px;
  font-size: 13px;
  font-weight: 720;
  line-height: 1.2;
}

.report-empty-copy {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.report-method-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 34px;
}

.report-method-grid > div {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.report-method-grid p {
  max-width: 430px;
  margin: 6px 0 0;
  color: #444;
  font-size: 11px;
  line-height: 1.55;
}

.report-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 68px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 9px;
  line-height: 1.4;
  letter-spacing: .075em;
}

.report-loading,
.report-error {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.report-error strong {
  color: #111;
  font-size: 14px;
}

.report-error p {
  margin: 8px 0 0;
}

@media (max-width: 800px) {
  .admin-campaign-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .admin-campaign-performance {
    grid-template-columns: repeat(4, 1fr);
  }

  .admin-campaign-actions {
    justify-content: flex-start;
  }

  .report-shell {
    width: min(100% - 28px, 1080px);
    padding-top: 20px;
    padding-bottom: 48px;
  }

  .report-content {
    padding-top: 36px;
  }

  .report-hero h1 {
    font-size: clamp(34px, 10vw, 52px);
  }

  .report-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 38px;
  }

  .report-metrics > div,
  .report-metrics > div:first-child,
  .report-metrics > div:last-child {
    padding: 18px 14px;
    border-bottom: 1px solid var(--line);
  }

  .report-metrics > div:nth-child(odd) {
    padding-left: 0;
  }

  .report-metrics > div:nth-child(even) {
    border-right: 0;
    padding-right: 0;
  }

  .report-metrics > div:nth-child(3),
  .report-metrics > div:nth-child(4) {
    border-bottom: 0;
  }

  .report-section {
    margin-top: 44px;
  }

  .report-section-head {
    align-items: flex-start;
  }

  .report-summary {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .report-insight-grid {
    grid-template-columns: 1fr;
  }

  .report-insight,
  .report-insight:first-child,
  .report-insight:last-child {
    padding: 18px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .report-insight:last-child {
    border-bottom: 0;
  }

  .report-chart {
    height: 170px;
  }

  .report-moments article {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 16px 0;
  }

  .report-moment-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 18px;
  }

  .report-method-grid {
    grid-template-columns: 1fr;
  }

  .report-footer {
    display: grid;
    gap: 6px;
    margin-top: 52px;
  }
}

/* ========================================================
   KYMWA ADMIN — event image upload + iPhone form focus
======================================================== */
.admin-image-upload {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 40px;
}

.admin-image-upload-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.admin-image-upload-name {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-image-preview {
  display: grid;
  gap: 10px;
  width: min(460px, 100%);
  margin-top: 4px;
}

.admin-image-preview[hidden] {
  display: none;
}

.admin-image-preview img {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  background: var(--soft);
}

.admin-image-preview .admin-text-button {
  width: fit-content;
}

.admin-text-button.danger {
  color: var(--danger);
}

@media (max-width: 680px) {
  /* iOS Safari automatically zooms focused controls below 16px. */
  .admin-page input,
  .admin-page select,
  .admin-page textarea {
    font-size: 16px;
  }

  .admin-image-upload {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-image-upload-name {
    width: 100%;
  }
}


/* ========================================================
KYMWA ADMIN — USER LIST
======================================================== */

.admin-user-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 24px;
}

.admin-user-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-user-list-search {
  display: grid;
  grid-template-columns: minmax(180px, 260px) auto;
  gap: 8px;
}

.admin-user-list-search input {
  width: 100%;
}

.admin-user-list-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 34px;
  margin-top: 10px;
}

.admin-user-list-meta > span {
  color: var(--muted);
  font-size: 10px;
}

.admin-user-table-wrap {
  overflow-x: auto;
  border-top: 1px solid var(--line);
  -webkit-overflow-scrolling: touch;
}

.admin-user-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.admin-user-table th,
.admin-user-table td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

.admin-user-table th:first-child,
.admin-user-table td:first-child {
  padding-left: 0;
}

.admin-user-table th:last-child,
.admin-user-table td:last-child {
  padding-right: 0;
}

.admin-user-table th {
  color: var(--muted);
  font-size: 9px;
  font-weight: 740;
  letter-spacing: .07em;
}

.admin-user-table td {
  font-size: 11px;
}

.admin-user-row {
  cursor: pointer;
}

.admin-user-row:hover td {
  background: rgba(0, 0, 0, .018);
}

.admin-user-row:focus {
  outline: none;
}

.admin-user-row:focus td {
  background: rgba(0, 0, 0, .035);
}

.admin-user-id {
  font-size: 12px;
  font-weight: 720;
}

.admin-user-plan,
.admin-user-state {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 9px;
  font-weight: 720;
  line-height: 1;
}

.admin-user-plan.is-plus {
  border-color: var(--line-strong);
  color: var(--text);
}

.admin-user-state.is-active {
  border-color: var(--line-strong);
}

.admin-user-state.is-normal {
  color: var(--muted);
}

.admin-user-state.is-idle {
  color: var(--muted);
  opacity: .7;
}

.admin-user-empty {
  padding: 28px 0 !important;
  color: var(--muted);
  text-align: center !important;
}

.admin-user-more-wrap {
  display: flex;
  justify-content: center;
  padding-top: 18px;
}

.admin-user-detail-block {
  margin-top: 54px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
}

@media (max-width: 680px) {
  .admin-user-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .admin-user-list-search {
    grid-template-columns: 1fr auto;
  }

  .admin-user-list-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .admin-user-table th,
  .admin-user-table td {
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .admin-user-detail-block {
    margin-top: 40px;
    padding-top: 24px;
  }
}



/* ========================================================
KYMWA ADMIN — USER ACTIVITY ANALYTICS
======================================================== */

.admin-user-activity-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 24px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.admin-user-activity-summary > div {
  min-width: 0;
  padding: 17px 16px 18px;
  border-right: 1px solid var(--line);
}

.admin-user-activity-summary > div:first-child {
  padding-left: 0;
}

.admin-user-activity-summary > div:last-child {
  padding-right: 0;
  border-right: 0;
}

.admin-user-activity-summary span {
  display: block;
  color: var(--muted);
  font-size: 9px;
  font-weight: 720;
  letter-spacing: .06em;
}

.admin-user-activity-summary strong {
  display: block;
  margin-top: 8px;
  font-size: 24px;
  line-height: 1;
  letter-spacing: -.04em;
}

.admin-user-activity-filter-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
}

.admin-user-activity-filter-row > span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 9px;
  font-weight: 720;
  letter-spacing: .06em;
}

@media (max-width: 680px) {
  .admin-user-activity-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-user-activity-summary > div,
  .admin-user-activity-summary > div:first-child,
  .admin-user-activity-summary > div:last-child {
    padding: 15px 12px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .admin-user-activity-summary > div:nth-child(odd) {
    padding-left: 0;
  }

  .admin-user-activity-summary > div:nth-child(even) {
    padding-right: 0;
    border-right: 0;
  }

  .admin-user-activity-summary > div:nth-child(3),
  .admin-user-activity-summary > div:nth-child(4) {
    border-bottom: 0;
  }

  .admin-user-activity-filter-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
}


/* ========================================================
KYMWA ADMIN — ANALYTICS DATE RANGE
======================================================== */

.admin-analytics-range {
  margin-top: 22px;
}

.admin-analytics-range-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-analytics-custom-range {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin-top: 14px;
}

.admin-analytics-custom-range[hidden] {
  display: none;
}

.admin-analytics-custom-range label {
  display: grid;
  gap: 6px;
}

.admin-analytics-custom-range label > span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 720;
  letter-spacing: .06em;
}

.admin-analytics-custom-range input {
  min-width: 150px;
}

.admin-analytics-range-separator {
  padding-bottom: 11px;
  color: var(--muted);
  font-size: 10px;
}

.admin-analytics-selected-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 18px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.admin-analytics-selected-summary > div {
  min-width: 0;
  padding: 17px 14px 18px;
  border-right: 1px solid var(--line);
}

.admin-analytics-selected-summary > div:first-child {
  padding-left: 0;
}

.admin-analytics-selected-summary > div:last-child {
  padding-right: 0;
  border-right: 0;
}

.admin-analytics-selected-summary span {
  display: block;
  color: var(--muted);
  font-size: 9px;
  font-weight: 720;
  letter-spacing: .06em;
}

.admin-analytics-selected-summary strong {
  display: block;
  margin-top: 8px;
  font-size: 22px;
  line-height: 1;
  letter-spacing: -.04em;
}

@media (max-width: 760px) {
  .admin-analytics-selected-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-analytics-selected-summary > div,
  .admin-analytics-selected-summary > div:first-child,
  .admin-analytics-selected-summary > div:last-child {
    padding: 14px 12px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .admin-analytics-selected-summary > div:nth-child(odd) {
    padding-left: 0;
  }

  .admin-analytics-selected-summary > div:nth-child(even) {
    padding-right: 0;
    border-right: 0;
  }

  .admin-analytics-selected-summary > div:last-child {
    grid-column: 1 / -1;
    padding-left: 0;
    border-bottom: 0;
  }

  .admin-analytics-custom-range {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-analytics-custom-range input {
    width: 100%;
    min-width: 0;
  }

  .admin-analytics-range-separator {
    display: none;
  }
}


/* ========================================================
KYMWA ADMIN — ACTIVE USER ENGAGEMENT
======================================================== */

.admin-engagement-block {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.admin-engagement-block .admin-overview-heading {
  margin: 0 0 14px;
}

.admin-engagement-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.admin-engagement-grid > div {
  min-width: 0;
  padding: 16px 13px 17px;
  border-right: 1px solid var(--line);
}

.admin-engagement-grid > div:first-child {
  padding-left: 0;
}

.admin-engagement-grid > div:last-child {
  padding-right: 0;
  border-right: 0;
}

.admin-engagement-grid span {
  display: block;
  color: var(--muted);
  font-size: 9px;
  font-weight: 740;
  letter-spacing: .06em;
}

.admin-engagement-grid strong {
  display: block;
  margin-top: 8px;
  font-size: 24px;
  line-height: 1;
  letter-spacing: -.04em;
}

.admin-engagement-grid small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.35;
}

@media (max-width: 900px) {
  .admin-engagement-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .admin-engagement-grid > div,
  .admin-engagement-grid > div:first-child,
  .admin-engagement-grid > div:last-child {
    padding: 15px 12px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .admin-engagement-grid > div:nth-child(3n + 1) {
    padding-left: 0;
  }

  .admin-engagement-grid > div:nth-child(3n) {
    padding-right: 0;
    border-right: 0;
  }

  .admin-engagement-grid > div:nth-last-child(-n + 3) {
    border-bottom: 0;
  }
}

@media (max-width: 600px) {
  .admin-engagement-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-engagement-grid > div,
  .admin-engagement-grid > div:first-child,
  .admin-engagement-grid > div:last-child {
    padding: 14px 11px;
  }

  .admin-engagement-grid > div:nth-child(3n + 1) {
    padding-left: 11px;
  }

  .admin-engagement-grid > div:nth-child(3n) {
    padding-right: 11px;
    border-right: 1px solid var(--line);
  }

  .admin-engagement-grid > div:nth-child(odd) {
    padding-left: 0;
  }

  .admin-engagement-grid > div:nth-child(even) {
    padding-right: 0;
    border-right: 0;
  }

  .admin-engagement-grid > div:nth-last-child(-n + 3) {
    border-bottom: 1px solid var(--line);
  }

  .admin-engagement-grid > div:nth-last-child(-n + 2) {
    border-bottom: 0;
  }
}


/* ========================================================
KYMWA ADMIN — CONVERSION FUNNEL
======================================================== */

.admin-funnel-block {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.admin-funnel-block .admin-overview-heading {
  margin: 0 0 16px;
}

.admin-funnel {
  display: grid;
  grid-template-columns:
    minmax(0, 1fr)
    28px
    minmax(0, 1fr)
    28px
    minmax(0, 1fr)
    28px
    minmax(0, 1fr);
  align-items: stretch;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.admin-funnel-step {
  min-width: 0;
  padding: 18px 14px 17px;
}

.admin-funnel-step:first-child {
  padding-left: 0;
}

.admin-funnel-step:last-child {
  padding-right: 0;
}

.admin-funnel-step span {
  display: block;
  color: var(--muted);
  font-size: 9px;
  font-weight: 740;
  letter-spacing: .06em;
}

.admin-funnel-step strong {
  display: block;
  margin-top: 8px;
  font-size: 26px;
  line-height: 1;
  letter-spacing: -.04em;
}

.admin-funnel-step small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.4;
}

.admin-funnel-arrow {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
}

.admin-funnel-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

@media (max-width: 760px) {
  .admin-funnel {
    grid-template-columns: 1fr;
  }

  .admin-funnel-step,
  .admin-funnel-step:first-child,
  .admin-funnel-step:last-child {
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
  }

  .admin-funnel-step:last-child {
    border-bottom: 0;
  }

  .admin-funnel-arrow {
    display: none;
  }

  .admin-funnel-step strong {
    font-size: 24px;
  }
}


/* ========================================================
KYMWA ADMIN — PLUS ANALYTICS
======================================================== */

.admin-plus-analytics-block {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.admin-plus-analytics-block .admin-overview-heading {
  margin: 0 0 16px;
}

.admin-plus-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.admin-plus-summary-grid > div {
  min-width: 0;
  padding: 17px 14px 18px;
  border-right: 1px solid var(--line);
}

.admin-plus-summary-grid > div:first-child {
  padding-left: 0;
}

.admin-plus-summary-grid > div:last-child {
  padding-right: 0;
  border-right: 0;
}

.admin-plus-summary-grid span,
.admin-plus-source-grid span,
.admin-plus-source-head span {
  display: block;
  color: var(--muted);
  font-size: 9px;
  font-weight: 740;
  letter-spacing: .06em;
}

.admin-plus-summary-grid strong {
  display: block;
  margin-top: 8px;
  font-size: 24px;
  line-height: 1;
  letter-spacing: -.04em;
}

.admin-plus-summary-grid small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.35;
}

.admin-plus-source {
  margin-top: 18px;
}

.admin-plus-source-head {
  margin-bottom: 8px;
}

.admin-plus-source-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.admin-plus-source-grid > div {
  min-width: 0;
  padding: 14px 12px 15px;
  border-right: 1px solid var(--line);
}

.admin-plus-source-grid > div:first-child {
  padding-left: 0;
}

.admin-plus-source-grid > div:last-child {
  padding-right: 0;
  border-right: 0;
}

.admin-plus-source-grid strong {
  display: block;
  margin-top: 7px;
  font-size: 18px;
  line-height: 1;
  letter-spacing: -.03em;
}

.admin-plus-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

@media (max-width: 760px) {
  .admin-plus-summary-grid,
  .admin-plus-source-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-plus-summary-grid > div,
  .admin-plus-summary-grid > div:first-child,
  .admin-plus-summary-grid > div:last-child,
  .admin-plus-source-grid > div,
  .admin-plus-source-grid > div:first-child,
  .admin-plus-source-grid > div:last-child {
    padding: 14px 11px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .admin-plus-summary-grid > div:nth-child(odd),
  .admin-plus-source-grid > div:nth-child(odd) {
    padding-left: 0;
  }

  .admin-plus-summary-grid > div:nth-child(even),
  .admin-plus-source-grid > div:nth-child(even) {
    padding-right: 0;
    border-right: 0;
  }

  .admin-plus-summary-grid > div:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .admin-plus-source-grid > div:last-child {
    grid-column: 1 / -1;
    padding-left: 0;
    border-bottom: 0;
  }
}


/* ========================================================
KYMWA ADMIN — MOMENT CONTENT ANALYTICS
======================================================== */

.admin-content-analytics-block {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.admin-content-analytics-block .admin-overview-heading {
  margin: 0 0 16px;
}

.admin-content-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.admin-content-summary-grid > div {
  min-width: 0;
  padding: 17px 14px 18px;
  border-right: 1px solid var(--line);
}

.admin-content-summary-grid > div:first-child {
  padding-left: 0;
}

.admin-content-summary-grid > div:last-child {
  padding-right: 0;
  border-right: 0;
}

.admin-content-summary-grid span,
.admin-content-subhead span {
  display: block;
  color: var(--muted);
  font-size: 9px;
  font-weight: 740;
  letter-spacing: .06em;
}

.admin-content-summary-grid strong {
  display: block;
  margin-top: 8px;
  font-size: 24px;
  line-height: 1;
  letter-spacing: -.04em;
}

.admin-content-summary-grid small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.35;
}

.admin-content-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(240px, .85fr);
  gap: 28px;
  margin-top: 22px;
}

.admin-content-trend,
.admin-content-years {
  min-width: 0;
}

.admin-content-subhead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.admin-content-subhead strong {
  font-size: 12px;
  letter-spacing: -.02em;
}

.admin-content-chart {
  min-height: 150px;
}

.admin-content-bar-chart {
  display: flex;
  align-items: stretch;
  gap: 2px;
  width: 100%;
  height: 150px;
  padding-top: 8px;
  border-bottom: 1px solid var(--line);
}

.admin-content-bar-column {
  display: grid;
  grid-template-rows: 1fr 18px;
  flex: 1 1 0;
  min-width: 2px;
}

.admin-content-bar-track {
  position: relative;
  min-height: 0;
}

.admin-content-bar {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  min-height: 0;
  background: currentColor;
  opacity: .72;
}

.admin-content-bar-column small {
  overflow: visible;
  margin-top: 5px;
  color: var(--muted);
  font-size: 8px;
  white-space: nowrap;
}

.admin-content-year-list {
  border-top: 1px solid var(--line);
}

.admin-content-year-row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 35px;
  border-bottom: 1px solid var(--line);
}

.admin-content-year-row span,
.admin-content-year-row em {
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
}

.admin-content-year-row strong {
  font-size: 11px;
  font-weight: 680;
}

@media (max-width: 800px) {
  .admin-content-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-content-summary-grid > div,
  .admin-content-summary-grid > div:first-child,
  .admin-content-summary-grid > div:last-child {
    padding: 14px 11px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .admin-content-summary-grid > div:nth-child(odd) {
    padding-left: 0;
  }

  .admin-content-summary-grid > div:nth-child(even) {
    padding-right: 0;
    border-right: 0;
  }

  .admin-content-summary-grid > div:last-child {
    grid-column: 1 / -1;
    padding-left: 0;
    border-bottom: 0;
  }

  .admin-content-detail-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .admin-content-bar-chart {
    height: 130px;
  }
}


/* ========================================================
KYMWA ADMIN — ADVERTISING ANALYTICS
======================================================== */

.admin-ad-analytics-block {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.admin-ad-analytics-block .admin-overview-heading {
  margin: 0 0 16px;
}

.admin-ad-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.admin-ad-summary-grid > div {
  min-width: 0;
  padding: 17px 14px 18px;
  border-right: 1px solid var(--line);
}

.admin-ad-summary-grid > div:first-child {
  padding-left: 0;
}

.admin-ad-summary-grid > div:last-child {
  padding-right: 0;
  border-right: 0;
}

.admin-ad-summary-grid span {
  display: block;
  color: var(--muted);
  font-size: 9px;
  font-weight: 740;
  letter-spacing: .06em;
}

.admin-ad-summary-grid strong {
  display: block;
  margin-top: 8px;
  font-size: 24px;
  line-height: 1;
  letter-spacing: -.04em;
}

.admin-ad-summary-grid small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.35;
}

.admin-ad-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, .9fr);
  gap: 28px;
  margin-top: 22px;
}

.admin-ad-chart {
  min-height: 150px;
}

.admin-ad-bar-chart {
  display: flex;
  align-items: stretch;
  gap: 2px;
  width: 100%;
  height: 150px;
  padding-top: 8px;
  border-bottom: 1px solid var(--line);
}

.admin-ad-bar-column {
  display: grid;
  grid-template-rows: 1fr 18px;
  flex: 1 1 0;
  min-width: 2px;
}

.admin-ad-bar-track {
  position: relative;
  min-height: 0;
}

.admin-ad-bar {
  position: absolute;
  bottom: 0;
  width: 50%;
  min-height: 0;
  background: currentColor;
}

.admin-ad-bar-impressions {
  left: 0;
  opacity: .28;
}

.admin-ad-bar-clicks {
  right: 0;
  opacity: .82;
}

.admin-ad-bar-column small {
  overflow: visible;
  margin-top: 5px;
  color: var(--muted);
  font-size: 8px;
  white-space: nowrap;
}

.admin-ad-chart-legend {
  display: flex;
  gap: 14px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 9px;
}

.admin-ad-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.admin-ad-chart-legend i {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: currentColor;
}

.admin-ad-legend-impressions {
  opacity: .28;
}

.admin-ad-legend-clicks {
  opacity: .82;
}

.admin-ad-top-list {
  border-top: 1px solid var(--line);
}

.admin-ad-top-row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 8px 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.admin-ad-top-rank {
  color: var(--muted);
  font-size: 9px;
}

.admin-ad-top-row > div {
  min-width: 0;
}

.admin-ad-top-row strong {
  display: block;
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-ad-top-row small {
  display: block;
  overflow: hidden;
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-ad-top-row em {
  grid-column: 2;
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
  line-height: 1.4;
}

@media (max-width: 800px) {
  .admin-ad-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-ad-summary-grid > div,
  .admin-ad-summary-grid > div:first-child,
  .admin-ad-summary-grid > div:last-child {
    padding: 14px 11px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .admin-ad-summary-grid > div:nth-child(odd) {
    padding-left: 0;
  }

  .admin-ad-summary-grid > div:nth-child(even) {
    padding-right: 0;
    border-right: 0;
  }

  .admin-ad-summary-grid > div:last-child {
    grid-column: 1 / -1;
    padding-left: 0;
    border-bottom: 0;
  }

  .admin-ad-detail-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .admin-ad-bar-chart {
    height: 130px;
  }
}


/* ========================================================
KYMWA ADMIN — OPERATIONS ANALYTICS
======================================================== */

.admin-operations-analytics-block {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.admin-operations-analytics-block .admin-overview-heading {
  margin: 0 0 16px;
}

.admin-operations-summary-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.admin-operations-summary-grid > div {
  min-width: 0;
  padding: 17px 12px 18px;
  border-right: 1px solid var(--line);
}

.admin-operations-summary-grid > div:first-child {
  padding-left: 0;
}

.admin-operations-summary-grid > div:last-child {
  padding-right: 0;
  border-right: 0;
}

.admin-operations-summary-grid span {
  display: block;
  color: var(--muted);
  font-size: 9px;
  font-weight: 740;
  letter-spacing: .05em;
}

.admin-operations-summary-grid strong {
  display: block;
  margin-top: 8px;
  font-size: 22px;
  line-height: 1;
  letter-spacing: -.04em;
}

.admin-operations-summary-grid small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.35;
}

.admin-operations-audit {
  margin-top: 22px;
}

.admin-operations-audit-list {
  border-top: 1px solid var(--line);
}

.admin-operations-audit-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  min-height: 42px;
  border-bottom: 1px solid var(--line);
}

.admin-operations-audit-row strong {
  display: block;
  font-size: 10px;
  font-weight: 680;
}

.admin-operations-audit-row small,
.admin-operations-audit-row time {
  color: var(--muted);
  font-size: 9px;
}

.admin-operations-audit-row small {
  display: block;
  margin-top: 3px;
}

.admin-operations-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

@media (max-width: 900px) {
  .admin-operations-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .admin-operations-summary-grid > div:nth-child(3n) {
    border-right: 0;
  }
}

@media (max-width: 600px) {
  .admin-operations-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-operations-summary-grid > div,
  .admin-operations-summary-grid > div:first-child,
  .admin-operations-summary-grid > div:last-child {
    padding: 14px 10px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .admin-operations-summary-grid > div:nth-child(odd) {
    padding-left: 0;
  }

  .admin-operations-summary-grid > div:nth-child(even) {
    padding-right: 0;
    border-right: 0;
  }

  .admin-operations-summary-grid > div:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .admin-operations-audit-row {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 9px 0;
  }
}


/* ========================================================
KYMWA ADMIN — STEP 10 INFORMATION HIERARCHY
======================================================== */

.admin-dashboard-section > .admin-overview-heading {
  margin-top: 2px;
}

.admin-dashboard-section > .admin-stat-grid {
  margin-bottom: 28px;
}

.admin-dashboard-section > .admin-analytics-range {
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.admin-dashboard-group-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.admin-dashboard-group-heading span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 740;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.admin-dashboard-group-heading strong {
  font-size: 11px;
  font-weight: 680;
  letter-spacing: -.02em;
}

.admin-dashboard-group-heading + .admin-engagement-block,
.admin-dashboard-group-heading + .admin-content-analytics-block,
.admin-dashboard-group-heading + .admin-ad-analytics-block,
.admin-dashboard-group-heading + .admin-operations-analytics-block {
  margin-top: 14px;
  padding-top: 0;
  border-top: 0;
}

.admin-dashboard-section .admin-analytics-chart-block {
  margin-top: 24px;
}

@media (max-width: 600px) {
  .admin-dashboard-group-heading {
    display: block;
    margin-top: 28px;
    padding-top: 18px;
  }

  .admin-dashboard-group-heading strong {
    display: block;
    margin-top: 4px;
  }
}


/* ========================================================
KYMWA CAMPAIGN REPORT — FINAL COMPACT PERFORMANCE UI
======================================================== */

.page-report {
  min-height: 100dvh;
}

.report-chart-dual {
  height: 92px;
  gap: 2px;
}

.report-bar-wrap-dual {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 1px;
  height: 100%;
}

.report-bar-wrap-dual .report-bar {
  position: static;
  flex: 1 1 0;
  width: auto;
}

.report-bar-impressions {
  opacity: .26;
}

.report-bar-clicks {
  opacity: .86;
}

.report-chart-legend {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 8px;
}

.report-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.report-chart-legend i {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: currentColor;
}

.report-chart-legend-impressions {
  opacity: .26;
}

.report-chart-legend-clicks {
  opacity: .86;
}

.report-ranking-list {
  border-top: 1px solid var(--line);
}

.report-ranking-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 58px;
  border-bottom: 1px solid var(--line);
}

.report-ranking-number {
  color: var(--muted);
  font-size: 9px;
}

.report-ranking-copy {
  min-width: 0;
}

.report-ranking-copy small {
  display: block;
  color: var(--muted);
  font-size: 8px;
}

.report-ranking-copy strong {
  display: block;
  overflow: hidden;
  margin-top: 2px;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-ranking-stats {
  text-align: right;
}

.report-ranking-stats strong {
  display: block;
  font-size: 10px;
}

.report-ranking-stats span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}

.report-summary-meta {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.report-section:has(.report-chart-dual) {
  padding-bottom: 4px;
}

@media (max-width: 680px) {
  .report-chart-dual {
    height: 76px;
  }

  .report-chart-axis {
    margin-top: 5px;
    font-size: 8px;
  }

  .report-ranking-row {
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 6px 9px;
    min-height: 52px;
    padding: 8px 0;
  }

  .report-ranking-stats {
    grid-column: 2;
    text-align: left;
  }

  .report-summary-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


/* ========================================================
KYMWA ADMIN — UNIFIED SEARCH UI
======================================================== */

.admin-search-control {
  display: flex;
  align-items: stretch;
  width: min(360px, 100%);
  min-height: 42px;
  border: 1px solid var(--line-strong);
  background: #fff;
}

.admin-search-control:focus-within {
  border-color: var(--text);
}

.admin-search-control input {
  min-width: 0;
  flex: 1 1 auto;
  width: 100%;
  min-height: 40px;
  margin: 0;
  padding: 0 13px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  line-height: 1;
  appearance: none;
  -webkit-appearance: none;
}

.admin-search-control input::placeholder {
  color: var(--muted);
  opacity: 1;
}

.admin-search-control input::-webkit-search-cancel-button {
  cursor: pointer;
}

.admin-search-submit {
  flex: 0 0 auto;
  min-width: 62px;
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  border-left: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 10px;
  font-weight: 720;
  white-space: nowrap;
}

.admin-search-submit:hover {
  background: rgba(0, 0, 0, .025);
}

.admin-search-submit:active {
  background: rgba(0, 0, 0, .045);
}

.admin-user-list-search,
.admin-record-search {
  display: flex;
  grid-template-columns: none;
  gap: 0;
}

.admin-user-list-search input,
.admin-record-search input {
  width: auto;
  min-height: 40px;
  padding: 0 13px;
  border: 0;
  background: transparent;
}

.admin-record-search input:focus {
  border-color: transparent;
}

.admin-user-detail-block .admin-section-description {
  margin-top: 7px;
}

@media (max-width: 680px) {
  .admin-search-control {
    width: 100%;
    min-height: 46px;
  }

  .admin-search-control input {
    min-height: 44px;
    padding: 0 12px;
    font-size: 16px;
  }

  .admin-search-submit {
    min-width: 66px;
    min-height: 44px;
    padding: 0 13px;
    font-size: 11px;
  }

  .admin-user-toolbar,
  .admin-record-toolbar {
    align-items: stretch;
  }
}


/* ========================================================
KYMWA ADMIN — UNIFIED FILTER / DATE CONTROLS
======================================================== */

/* Shared filter groups */
.admin-analytics-range-presets,
.admin-user-filters,
.admin-record-filters {
  display: flex;
  align-items: center;
  gap: 0;
  width: fit-content;
  max-width: 100%;
  border: 1px solid var(--line-strong);
  background: #fff;
}

.admin-filter-button {
  min-height: 38px;
  padding: 0 12px;
  border: 0;
  border-right: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.admin-filter-button:last-child {
  border-right: 0;
}

.admin-filter-button:hover {
  background: rgba(0, 0, 0, .025);
  color: var(--text);
}

.admin-filter-button.is-active {
  background: var(--text);
  color: #fff;
  text-decoration: none;
}

.admin-filter-button.is-active:hover {
  background: var(--text);
  color: #fff;
}

/* Analytics date range */
.admin-analytics-range {
  display: grid;
  gap: 12px;
}

.admin-analytics-custom-range {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
}

.admin-analytics-custom-range label {
  display: grid;
  gap: 6px;
}

.admin-analytics-custom-range label > span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 680;
}

.admin-analytics-custom-range input[type="date"] {
  width: 154px;
  min-height: 42px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  outline: 0;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  -webkit-appearance: none;
  appearance: none;
}

.admin-analytics-custom-range input[type="date"]:focus {
  border-color: var(--text);
}

.admin-analytics-range-separator {
  display: flex;
  align-items: center;
  min-height: 42px;
  color: var(--muted);
  font-size: 10px;
}

.admin-analytics-custom-range .admin-secondary-button {
  min-height: 42px;
  padding: 0 15px;
  border-color: var(--text);
  background: var(--text);
  color: #fff;
}

/* Toolbar alignment */
.admin-user-toolbar,
.admin-record-toolbar {
  align-items: center;
  gap: 12px;
}

.admin-user-activity-filter-row {
  gap: 12px;
}

.admin-user-activity-filter-row > span {
  flex: 0 0 auto;
}

/* Keep management actions visually distinct from filters/search. */
.admin-user-more-wrap .admin-secondary-button,
.admin-record-more-wrap .admin-secondary-button {
  min-height: 40px;
  padding: 0 16px;
}

/* Mobile: same component language, touch-sized, no broken wrapping. */
@media (max-width: 680px) {
  .admin-analytics-range-presets,
  .admin-user-filters,
  .admin-record-filters {
    width: 100%;
    overflow-x: auto;
    border-right: 1px solid var(--line-strong);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .admin-analytics-range-presets::-webkit-scrollbar,
  .admin-user-filters::-webkit-scrollbar,
  .admin-record-filters::-webkit-scrollbar {
    display: none;
  }

  .admin-filter-button {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 0 13px;
    font-size: 11px;
  }

  .admin-user-toolbar,
  .admin-record-toolbar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .admin-user-activity-filter-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .admin-analytics-custom-range {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 7px;
    width: 100%;
  }

  .admin-analytics-custom-range label {
    min-width: 0;
  }

  .admin-analytics-custom-range input[type="date"] {
    width: 100%;
    min-height: 46px;
    padding: 0 10px;
    font-size: 16px;
  }

  .admin-analytics-range-separator {
    min-height: 46px;
  }

  .admin-analytics-custom-range .admin-secondary-button {
    grid-column: 1 / -1;
    min-height: 46px;
    width: 100%;
    margin-top: 1px;
    font-size: 11px;
  }
}


/* ========================================================
KYMWA ADMIN — UNIFIED CARDS / TABLES / ACTIONS
======================================================== */

/* Shared card rhythm */
.admin-card,
.admin-overview-card,
.admin-analytics-card,
.admin-user-card,
.admin-record-card,
.admin-event-card,
.admin-campaign-card,
.admin-system-card {
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: none;
}

.admin-card + .admin-card,
.admin-overview-card + .admin-overview-card,
.admin-analytics-card + .admin-analytics-card,
.admin-user-card + .admin-user-card,
.admin-record-card + .admin-record-card,
.admin-event-card + .admin-event-card,
.admin-campaign-card + .admin-campaign-card,
.admin-system-card + .admin-system-card {
  margin-top: 12px;
}

/* Consistent card interiors */
.admin-card,
.admin-overview-card,
.admin-analytics-card,
.admin-user-card,
.admin-record-card,
.admin-event-card,
.admin-campaign-card,
.admin-system-card {
  padding: 18px;
}

.admin-card h3,
.admin-overview-card h3,
.admin-analytics-card h3,
.admin-user-card h3,
.admin-record-card h3,
.admin-event-card h3,
.admin-campaign-card h3,
.admin-system-card h3 {
  margin-top: 0;
}

/* Unified metric grid */
.admin-stat-grid,
.admin-overview-grid,
.admin-analytics-summary-grid,
.admin-engagement-grid,
.admin-funnel-grid,
.admin-plus-grid,
.admin-content-grid,
.admin-ads-grid,
.admin-operations-grid {
  gap: 10px;
}

.admin-stat-card,
.admin-overview-item,
.admin-analytics-summary-card,
.admin-engagement-card,
.admin-funnel-card,
.admin-plus-card,
.admin-content-card,
.admin-ads-card,
.admin-operation-card {
  min-height: 92px;
  padding: 14px;
  border: 1px solid var(--line);
  background: #fff;
}

.admin-stat-card small,
.admin-overview-item small,
.admin-analytics-summary-card small,
.admin-engagement-card small,
.admin-funnel-card small,
.admin-plus-card small,
.admin-content-card small,
.admin-ads-card small,
.admin-operation-card small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 680;
}

.admin-stat-card strong,
.admin-overview-item strong,
.admin-analytics-summary-card strong,
.admin-engagement-card strong,
.admin-funnel-card strong,
.admin-plus-card strong,
.admin-content-card strong,
.admin-ads-card strong,
.admin-operation-card strong {
  display: block;
  margin-top: 7px;
  font-size: 20px;
  line-height: 1;
  letter-spacing: -.02em;
}

/* Section headers */
.admin-overview-heading,
.admin-section-heading,
.admin-card-heading {
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 14px;
}

.admin-overview-heading h2,
.admin-overview-heading h3,
.admin-section-heading h2,
.admin-section-heading h3,
.admin-card-heading h2,
.admin-card-heading h3 {
  margin-bottom: 0;
}

.admin-section-description {
  max-width: 620px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

/* Unified table language */
.admin-table-wrap,
.admin-user-table-wrap,
.admin-record-table-wrap,
.admin-campaign-table-wrap,
.admin-audit-table-wrap {
  width: 100%;
  overflow-x: auto;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  -webkit-overflow-scrolling: touch;
}

.admin-table,
.admin-user-table,
.admin-record-table,
.admin-campaign-table,
.admin-audit-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th,
.admin-user-table th,
.admin-record-table th,
.admin-campaign-table th,
.admin-audit-table th {
  padding: 10px 9px;
  border-bottom: 1px solid var(--line-strong);
  color: var(--muted);
  font-size: 8px;
  font-weight: 760;
  text-align: left;
  white-space: nowrap;
}

.admin-table td,
.admin-user-table td,
.admin-record-table td,
.admin-campaign-table td,
.admin-audit-table td {
  padding: 12px 9px;
  border-bottom: 1px solid var(--line);
  font-size: 10px;
  vertical-align: middle;
}

.admin-table tbody tr:last-child td,
.admin-user-table tbody tr:last-child td,
.admin-record-table tbody tr:last-child td,
.admin-campaign-table tbody tr:last-child td,
.admin-audit-table tbody tr:last-child td {
  border-bottom: 0;
}

.admin-table tbody tr:hover,
.admin-user-table tbody tr:hover,
.admin-record-table tbody tr:hover,
.admin-campaign-table tbody tr:hover,
.admin-audit-table tbody tr:hover {
  background: rgba(0, 0, 0, .018);
}

/* Primary vs secondary actions */
.admin-primary-button,
.admin-secondary-button,
.admin-danger-button,
.admin-link-button {
  min-height: 40px;
  border-radius: 0;
  font-size: 10px;
  font-weight: 720;
  line-height: 1;
}

.admin-primary-button {
  padding: 0 16px;
  border: 1px solid var(--text);
  background: var(--text);
  color: #fff;
}

.admin-secondary-button {
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--text);
}

.admin-danger-button {
  padding: 0 14px;
}

.admin-primary-button:hover {
  opacity: .88;
}

.admin-secondary-button:hover,
.admin-link-button:hover {
  background: rgba(0, 0, 0, .025);
}

/* Management list rows */
.admin-event-list,
.admin-campaign-list,
.admin-user-list,
.admin-record-list {
  gap: 10px;
}

.admin-event-item,
.admin-campaign-item,
.admin-user-item,
.admin-record-item {
  border: 1px solid var(--line);
  background: #fff;
}

/* Empty/status messages */
.admin-empty,
.admin-status {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

/* Mobile hierarchy */
@media (max-width: 680px) {
  .admin-card,
  .admin-overview-card,
  .admin-analytics-card,
  .admin-user-card,
  .admin-record-card,
  .admin-event-card,
  .admin-campaign-card,
  .admin-system-card {
    padding: 14px;
  }

  .admin-stat-grid,
  .admin-overview-grid,
  .admin-analytics-summary-grid,
  .admin-engagement-grid,
  .admin-funnel-grid,
  .admin-plus-grid,
  .admin-content-grid,
  .admin-ads-grid,
  .admin-operations-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .admin-stat-card,
  .admin-overview-item,
  .admin-analytics-summary-card,
  .admin-engagement-card,
  .admin-funnel-card,
  .admin-plus-card,
  .admin-content-card,
  .admin-ads-card,
  .admin-operation-card {
    min-height: 82px;
    padding: 12px;
  }

  .admin-stat-card strong,
  .admin-overview-item strong,
  .admin-analytics-summary-card strong,
  .admin-engagement-card strong,
  .admin-funnel-card strong,
  .admin-plus-card strong,
  .admin-content-card strong,
  .admin-ads-card strong,
  .admin-operation-card strong {
    margin-top: 6px;
    font-size: 18px;
  }

  .admin-primary-button,
  .admin-secondary-button,
  .admin-danger-button,
  .admin-link-button {
    min-height: 44px;
    font-size: 11px;
  }

  .admin-table th,
  .admin-user-table th,
  .admin-record-table th,
  .admin-campaign-table th,
  .admin-audit-table th {
    padding: 9px 8px;
    font-size: 8px;
  }

  .admin-table td,
  .admin-user-table td,
  .admin-record-table td,
  .admin-campaign-table td,
  .admin-audit-table td {
    padding: 11px 8px;
    font-size: 10px;
  }
}


/* ========================================================
KYMWA ADMIN — FINAL SECTION RHYTHM / PRIORITY
======================================================== */

/* Whole admin page rhythm */
.admin-section {
  margin-top: 0;
}

.admin-section + .admin-section {
  margin-top: 34px;
}

.admin-section > .admin-section-heading,
.admin-section > .admin-overview-heading {
  margin-bottom: 14px;
}

/* Keep the first operational block visually dominant without oversizing it */
#dashboard-section .admin-overview,
#dashboard-section .admin-dashboard-overview {
  margin-bottom: 22px;
}

#dashboard-section .admin-overview:first-of-type,
#dashboard-section .admin-dashboard-overview:first-of-type {
  padding-top: 0;
}

/* Internal analytics groups */
.admin-analytics-group,
.admin-dashboard-group,
.admin-operations-group {
  margin-top: 24px;
}

.admin-analytics-group:first-child,
.admin-dashboard-group:first-child,
.admin-operations-group:first-child {
  margin-top: 0;
}

.admin-analytics-group-heading,
.admin-dashboard-group-heading,
.admin-operations-group-heading {
  margin-bottom: 11px;
}

.admin-analytics-group-heading h3,
.admin-dashboard-group-heading h3,
.admin-operations-group-heading h3 {
  margin: 0;
  font-size: 12px;
  line-height: 1.3;
}

.admin-analytics-group-heading p,
.admin-dashboard-group-heading p,
.admin-operations-group-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

/* Prevent excessive vertical stacking inside cards */
.admin-card > :first-child,
.admin-overview-card > :first-child,
.admin-analytics-card > :first-child,
.admin-user-card > :first-child,
.admin-record-card > :first-child,
.admin-event-card > :first-child,
.admin-campaign-card > :first-child,
.admin-system-card > :first-child {
  margin-top: 0;
}

.admin-card > :last-child,
.admin-overview-card > :last-child,
.admin-analytics-card > :last-child,
.admin-user-card > :last-child,
.admin-record-card > :last-child,
.admin-event-card > :last-child,
.admin-campaign-card > :last-child,
.admin-system-card > :last-child {
  margin-bottom: 0;
}

/* Toolbars stay close to what they control */
.admin-user-toolbar,
.admin-record-toolbar,
.admin-event-toolbar,
.admin-campaign-toolbar,
.admin-analytics-range {
  margin-bottom: 12px;
}

/* Lists and tables should not visually detach from their controls */
.admin-user-table-wrap,
.admin-record-table-wrap,
.admin-campaign-table-wrap,
.admin-audit-table-wrap,
.admin-event-list,
.admin-campaign-list,
.admin-user-list,
.admin-record-list {
  margin-top: 0;
}

/* Editing areas are secondary to status/list content */
.admin-editor-card,
.admin-event-editor,
.admin-campaign-editor {
  margin-top: 18px;
}

/* Status text belongs close to its action */
.admin-status {
  margin-top: 8px;
  margin-bottom: 0;
}

/* Bottom system/admin actions need more separation from analytics */
#system-section,
#logs-section {
  padding-top: 2px;
}

/* Desktop width control for cleaner scanning */
@media (min-width: 681px) {
  .admin-section {
    scroll-margin-top: 24px;
  }

  .admin-overview-heading,
  .admin-section-heading {
    min-height: 34px;
  }
}

/* Mobile rhythm: tighter sections, same hierarchy */
@media (max-width: 680px) {
  .admin-section + .admin-section {
    margin-top: 26px;
  }

  .admin-section > .admin-section-heading,
  .admin-section > .admin-overview-heading {
    margin-bottom: 11px;
  }

  #dashboard-section .admin-overview,
  #dashboard-section .admin-dashboard-overview {
    margin-bottom: 18px;
  }

  .admin-analytics-group,
  .admin-dashboard-group,
  .admin-operations-group {
    margin-top: 20px;
  }

  .admin-analytics-group-heading,
  .admin-dashboard-group-heading,
  .admin-operations-group-heading {
    margin-bottom: 9px;
  }

  .admin-user-toolbar,
  .admin-record-toolbar,
  .admin-event-toolbar,
  .admin-campaign-toolbar,
  .admin-analytics-range {
    margin-bottom: 10px;
  }

  .admin-editor-card,
  .admin-event-editor,
  .admin-campaign-editor {
    margin-top: 14px;
  }
}


/* ========================================================
KYMWA ADMIN — SECTION NAVIGATION
======================================================== */

.admin-section-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 0;
  width: 100%;
  overflow-x: auto;
  margin: 0 0 34px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, .96);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.admin-section-nav::-webkit-scrollbar {
  display: none;
}

.admin-section-nav a {
  position: relative;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 14px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 720;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.admin-section-nav a:first-child {
  padding-left: 0;
}

.admin-section-nav a:hover,
.admin-section-nav a:focus-visible {
  color: var(--text);
}

.admin-section-nav a:focus-visible {
  outline: 0;
}

#admin-dashboard,
#admin-users,
#admin-records,
#admin-events,
#admin-campaigns,
#admin-audit,
#admin-system {
  scroll-margin-top: 58px;
}

/* The navigation already separates the first section from the page header. */
.admin-section-nav + .admin-section {
  border-top: 0;
  padding-top: 8px;
}

@media (max-width: 680px) {
  .admin-section-nav {
    margin-bottom: 24px;
    margin-left: calc(var(--admin-page-x) * -1);
    width: calc(100% + (var(--admin-page-x) * 2));
    padding: 0 var(--admin-page-x);
  }

  .admin-section-nav a {
    min-height: 44px;
    padding: 0 12px;
    font-size: 11px;
  }

  .admin-section-nav a:first-child {
    padding-left: 0;
  }

  #admin-dashboard,
  #admin-users,
  #admin-records,
  #admin-events,
  #admin-campaigns,
  #admin-audit,
  #admin-system {
    scroll-margin-top: 54px;
  }

  .admin-section-nav + .admin-section {
    padding-top: 4px;
  }
}


/* ========================================================
KYMWA ADMIN — ACTIVE SECTION NAVIGATION
======================================================== */

.admin-section-nav a.is-active,
.admin-section-nav a[aria-current="location"] {
  color: var(--text);
}

.admin-section-nav a.is-active::after,
.admin-section-nav a[aria-current="location"]::after {
  content: "";
  position: absolute;
  right: 14px;
  bottom: -1px;
  left: 14px;
  height: 2px;
  background: var(--text);
}

.admin-section-nav a:first-child.is-active::after,
.admin-section-nav a:first-child[aria-current="location"]::after {
  left: 0;
}

@media (max-width: 680px) {
  .admin-section-nav a.is-active::after,
  .admin-section-nav a[aria-current="location"]::after {
    right: 12px;
    left: 12px;
  }

  .admin-section-nav a:first-child.is-active::after,
  .admin-section-nav a:first-child[aria-current="location"]::after {
    left: 0;
  }
}


/* ========================================================
KYMWA ADMIN — UNIFIED FORMS / EDITORS
======================================================== */

/* Shared form rhythm */
.admin-form,
.event-form {
  gap: 20px;
}

.event-form-grid {
  gap: 16px 18px;
}

/* Shared field language */
.admin-field {
  gap: 7px;
}

.admin-field > span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 720;
  letter-spacing: .02em;
}

.admin-field input,
.admin-field textarea,
.admin-field select,
.admin-system-inline-form input,
.admin-confirm-field input {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  outline: 0;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  line-height: 1.4;
  transition: border-color 140ms ease, background 140ms ease;
  appearance: none;
  -webkit-appearance: none;
}

.admin-field textarea {
  min-height: 118px;
  padding-top: 11px;
  resize: vertical;
}

.admin-field select {
  padding-right: 32px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 15px) 50%,
    calc(100% - 11px) 50%;
  background-size:
    4px 4px,
    4px 4px;
  background-repeat: no-repeat;
}

.admin-field input:focus,
.admin-field textarea:focus,
.admin-field select:focus,
.admin-system-inline-form input:focus,
.admin-confirm-field input:focus {
  border-color: var(--text);
}

/* Checkbox */
.admin-checkbox {
  gap: 8px;
  min-height: 24px;
  color: var(--text);
  font-size: 10px;
  font-weight: 650;
}

.admin-checkbox input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--text);
}

/* File upload */
.admin-image-upload {
  gap: 10px;
  min-height: 42px;
}

.admin-image-upload-button {
  min-height: 40px;
}

.admin-image-upload-name {
  font-size: 9px;
}

/* Editors */
.admin-editor,
.admin-editor-card,
.admin-event-editor,
.admin-campaign-editor {
  border: 1px solid var(--line);
  background: #fff;
}

.admin-editor-head {
  gap: 12px;
  margin-bottom: 18px;
}

.admin-editor-head h2,
.admin-editor-head h3 {
  margin: 0;
}

/* Footer actions */
.admin-form-footer {
  align-items: center;
  gap: 8px;
  padding-top: 4px;
}

.admin-form-footer .admin-primary-button,
.admin-form-footer .admin-secondary-button,
.admin-form-footer .admin-danger-button {
  min-height: 42px;
}

/* Text actions are tertiary actions only */
.admin-text-button {
  color: var(--muted);
  font-size: 9px;
  font-weight: 720;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.admin-text-button:hover {
  color: var(--text);
  opacity: 1;
}

.admin-text-button.danger {
  color: var(--danger);
}

/* System inline controls use same input/button geometry */
.admin-system-inline-form {
  grid-template-columns: minmax(140px, 180px) auto;
  align-items: stretch;
  gap: 8px;
}

.admin-system-inline-form input {
  min-height: 42px;
}

.admin-system-inline-form .admin-secondary-button,
.admin-system-inline-form .admin-primary-button {
  min-height: 42px;
}

/* Confirmation dialog form */
.admin-confirm-field {
  display: grid;
  gap: 7px;
}

.admin-confirm-field > span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 720;
}

/* Mobile */
@media (max-width: 680px) {
  .admin-form,
  .event-form {
    gap: 17px;
  }

  .event-form-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .event-form-grid .wide {
    grid-column: auto;
  }

  .admin-field > span,
  .admin-confirm-field > span {
    font-size: 10px;
  }

  .admin-field input,
  .admin-field textarea,
  .admin-field select,
  .admin-system-inline-form input,
  .admin-confirm-field input {
    min-height: 46px;
    padding: 10px 11px;
    font-size: 16px;
  }

  .admin-field textarea {
    min-height: 124px;
  }

  .admin-checkbox {
    min-height: 32px;
    font-size: 11px;
  }

  .admin-checkbox input {
    width: 18px;
    height: 18px;
  }

  .admin-image-upload {
    gap: 8px;
  }

  .admin-image-upload-button {
    min-height: 44px;
  }

  .admin-image-upload-name {
    font-size: 10px;
  }

  .admin-form-footer {
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .admin-form-footer .admin-primary-button,
  .admin-form-footer .admin-secondary-button,
  .admin-form-footer .admin-danger-button {
    width: 100%;
    min-height: 46px;
  }

  .admin-system-inline-form {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .admin-system-inline-form .admin-secondary-button,
  .admin-system-inline-form .admin-primary-button {
    width: 100%;
    min-height: 46px;
  }
}


/* ========================================================
KYMWA ADMIN — UNIFIED STATUS / EMPTY / FEEDBACK STATES
======================================================== */

/* Shared feedback language */
.admin-status,
.admin-empty,
.admin-loading,
.admin-error,
.admin-success {
  width: 100%;
  margin: 8px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 10px;
  line-height: 1.55;
}

.admin-status,
.admin-empty,
.admin-loading {
  color: var(--muted);
}

.admin-error {
  color: var(--danger);
}

.admin-success {
  color: var(--text);
}

/* Empty areas should read as intentional, not broken. */
.admin-empty {
  display: flex;
  align-items: center;
  min-height: 72px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

/* Loading state */
.admin-loading {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
}

.admin-loading::before {
  content: "";
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border: 1px solid var(--line-strong);
  border-top-color: var(--text);
  border-radius: 50%;
  animation: admin-loading-spin .8s linear infinite;
}

@keyframes admin-loading-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Inline state badges */
.admin-state-badge,
.admin-status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 7px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--muted);
  font-size: 8px;
  font-weight: 720;
  line-height: 1;
  white-space: nowrap;
}

.admin-state-badge.is-active,
.admin-status-badge.is-active,
.admin-state-badge.is-plus,
.admin-status-badge.is-plus {
  border-color: var(--text);
  color: var(--text);
}

.admin-state-badge.is-muted,
.admin-status-badge.is-muted,
.admin-state-badge.is-inactive,
.admin-status-badge.is-inactive {
  color: var(--muted);
}

.admin-state-badge.is-danger,
.admin-status-badge.is-danger {
  border-color: rgba(190, 50, 50, .32);
  color: var(--danger);
}

/* Keep feedback close to controls, not floating between sections. */
.admin-user-toolbar + .admin-status,
.admin-record-toolbar + .admin-status,
.admin-event-toolbar + .admin-status,
.admin-campaign-toolbar + .admin-status,
.admin-form-footer + .admin-status,
.admin-system-inline-form + .admin-status {
  margin-top: 8px;
}

/* System/audit messages remain compact. */
.admin-system-card .admin-status,
.admin-audit-section .admin-status {
  max-width: 680px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .admin-loading::before {
    animation: none;
  }
}

@media (max-width: 680px) {
  .admin-status,
  .admin-empty,
  .admin-loading,
  .admin-error,
  .admin-success {
    font-size: 11px;
  }

  .admin-empty {
    min-height: 64px;
    padding: 12px 0;
  }

  .admin-state-badge,
  .admin-status-badge {
    min-height: 24px;
    padding: 0 7px;
    font-size: 9px;
  }
}


/* ========================================================
KYMWA ADMIN — MOBILE TABLE READABILITY
======================================================== */

/* Desktop stays compact and fully aligned. */
.admin-user-table,
.admin-campaign-table,
.admin-audit-table {
  table-layout: auto;
}

.admin-user-table td,
.admin-campaign-table td,
.admin-audit-table td {
  white-space: nowrap;
}

/* Long text cells may still wrap where useful. */
.admin-user-table td[data-wrap="true"],
.admin-campaign-table td[data-wrap="true"],
.admin-audit-table td[data-wrap="true"] {
  white-space: normal;
}

/* Numeric columns read more cleanly when aligned right. */
.admin-user-table th[data-align="right"],
.admin-user-table td[data-align="right"],
.admin-campaign-table th[data-align="right"],
.admin-campaign-table td[data-align="right"],
.admin-audit-table th[data-align="right"],
.admin-audit-table td[data-align="right"] {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Mobile: keep actual table structure, but make horizontal reading obvious. */
@media (max-width: 680px) {
  .admin-user-table-wrap,
  .admin-campaign-table-wrap,
  .admin-audit-table-wrap {
    position: relative;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
  }

  .admin-user-table {
    min-width: 820px;
  }

  .admin-campaign-table {
    min-width: 720px;
  }

  .admin-audit-table {
    min-width: 760px;
  }

  /* Keep the identity column visible while horizontally scrolling. */
  .admin-user-table th:first-child,
  .admin-user-table td:first-child,
  .admin-campaign-table th:first-child,
  .admin-campaign-table td:first-child,
  .admin-audit-table th:first-child,
  .admin-audit-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    background: #fff;
    box-shadow: 1px 0 0 var(--line);
  }

  .admin-user-table th:first-child,
  .admin-campaign-table th:first-child,
  .admin-audit-table th:first-child {
    z-index: 3;
  }

  .admin-user-table tbody tr:hover td:first-child,
  .admin-campaign-table tbody tr:hover td:first-child,
  .admin-audit-table tbody tr:hover td:first-child {
    background: #fff;
  }

  /* Slightly emphasize identifiers without making them look like buttons. */
  .admin-user-table td:first-child,
  .admin-campaign-table td:first-child,
  .admin-audit-table td:first-child {
    color: var(--text);
    font-weight: 720;
  }

  /* Dates and counts stay compact and scan-friendly. */
  .admin-user-table td,
  .admin-campaign-table td,
  .admin-audit-table td {
    font-variant-numeric: tabular-nums;
  }

  /* Give the final column breathing room near the screen edge. */
  .admin-user-table th:last-child,
  .admin-user-table td:last-child,
  .admin-campaign-table th:last-child,
  .admin-campaign-table td:last-child,
  .admin-audit-table th:last-child,
  .admin-audit-table td:last-child {
    padding-right: 16px;
  }
}


/* ========================================================
KYMWA ADMIN — FINAL HEADER / PAGE SHELL
======================================================== */

/* Keep the admin page centered and visually consistent. */
.admin-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding-bottom: 64px;
}

/* Header hierarchy */
.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 78px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.admin-header-brand {
  min-width: 0;
}

.admin-header-brand h1,
.admin-header-brand .admin-logo,
.admin-brand {
  margin: 0;
}

.admin-header-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

/* Keep secondary header actions quieter than primary page controls. */
.admin-header-actions .admin-secondary-button,
.admin-header-actions .admin-link-button {
  min-height: 36px;
  padding: 0 12px;
  font-size: 9px;
}

/* Main content starts with a deliberate gap below header. */
.admin-main,
#admin-section {
  padding-top: 0;
}

/* Section titles share the same visual hierarchy. */
.admin-section > .admin-section-heading h2,
.admin-section > .admin-overview-heading h2 {
  font-size: 18px;
  line-height: 1.15;
  letter-spacing: -.02em;
}

.admin-section > .admin-section-heading h3,
.admin-section > .admin-overview-heading h3 {
  font-size: 14px;
  line-height: 1.2;
}

/* Kicker labels stay subtle. */
.admin-kicker {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 760;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* Avoid clipped anchor targets beneath sticky navigation. */
.admin-section {
  scroll-margin-top: 58px;
}

/* Tablet */
@media (max-width: 960px) {
  .admin-shell {
    width: min(100% - 32px, 1180px);
  }
}

/* Mobile */
@media (max-width: 680px) {
  .admin-shell {
    width: 100%;
    margin: 0;
    padding-right: var(--admin-page-x);
    padding-bottom: 44px;
    padding-left: var(--admin-page-x);
  }

  .admin-header {
    align-items: flex-start;
    min-height: 68px;
    padding: 14px 0;
  }

  .admin-header-actions {
    gap: 6px;
  }

  .admin-header-actions .admin-secondary-button,
  .admin-header-actions .admin-link-button {
    min-height: 34px;
    padding: 0 10px;
    font-size: 9px;
  }

  .admin-section > .admin-section-heading h2,
  .admin-section > .admin-overview-heading h2 {
    font-size: 17px;
  }

  .admin-section > .admin-section-heading h3,
  .admin-section > .admin-overview-heading h3 {
    font-size: 13px;
  }

  .admin-kicker {
    margin-bottom: 4px;
    font-size: 8px;
  }

  .admin-section {
    scroll-margin-top: 54px;
  }
}

/* Very narrow phones */
@media (max-width: 390px) {
  .admin-header {
    gap: 10px;
  }

  .admin-header-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .admin-section-nav a {
    padding-right: 10px;
    padding-left: 10px;
  }
}


/* ========================================================
KYMWA ADMIN — FINAL INTERACTION / ACCESSIBILITY STATES
======================================================== */

/* Keyboard focus: same visual language everywhere */
.admin-section-nav a:focus-visible,
.admin-primary-button:focus-visible,
.admin-secondary-button:focus-visible,
.admin-danger-button:focus-visible,
.admin-link-button:focus-visible,
.admin-text-button:focus-visible,
.admin-search-submit:focus-visible,
.admin-filter-button:focus-visible,
.admin-image-upload-button:focus-visible,
.admin-field input:focus-visible,
.admin-field textarea:focus-visible,
.admin-field select:focus-visible,
.admin-search-control input:focus-visible,
.admin-analytics-custom-range input[type="date"]:focus-visible,
.admin-system-inline-form input:focus-visible,
.admin-confirm-field input:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

/* Mouse focus remains clean */
.admin-primary-button:focus:not(:focus-visible),
.admin-secondary-button:focus:not(:focus-visible),
.admin-danger-button:focus:not(:focus-visible),
.admin-link-button:focus:not(:focus-visible),
.admin-search-submit:focus:not(:focus-visible),
.admin-filter-button:focus:not(:focus-visible) {
  outline: 0;
}

/* Disabled controls */
.admin-primary-button:disabled,
.admin-secondary-button:disabled,
.admin-danger-button:disabled,
.admin-link-button:disabled,
.admin-search-submit:disabled,
.admin-filter-button:disabled,
.admin-image-upload-button:disabled,
.admin-field input:disabled,
.admin-field textarea:disabled,
.admin-field select:disabled,
.admin-search-control input:disabled,
.admin-analytics-custom-range input[type="date"]:disabled,
.admin-system-inline-form input:disabled,
.admin-confirm-field input:disabled {
  cursor: not-allowed;
  opacity: .42;
}

.admin-primary-button:disabled:hover,
.admin-secondary-button:disabled:hover,
.admin-danger-button:disabled:hover,
.admin-link-button:disabled:hover,
.admin-search-submit:disabled:hover,
.admin-filter-button:disabled:hover,
.admin-image-upload-button:disabled:hover {
  background: inherit;
}

/* Busy actions */
.admin-primary-button[aria-busy="true"],
.admin-secondary-button[aria-busy="true"],
.admin-danger-button[aria-busy="true"],
.admin-search-submit[aria-busy="true"] {
  pointer-events: none;
  cursor: progress;
  opacity: .62;
}

/* Clickable table rows */
.admin-user-table tbody tr[role="button"],
.admin-user-table tbody tr[data-user-id],
.admin-campaign-table tbody tr[role="button"],
.admin-record-table tbody tr[role="button"] {
  cursor: pointer;
}

.admin-user-table tbody tr[role="button"]:focus-visible,
.admin-user-table tbody tr[data-user-id]:focus-visible,
.admin-campaign-table tbody tr[role="button"]:focus-visible,
.admin-record-table tbody tr[role="button"]:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: -2px;
}

/* Links inside management content */
.admin-section a:not(.admin-section-nav a):not(.admin-primary-button):not(.admin-secondary-button):not(.admin-link-button) {
  text-underline-offset: 3px;
}

/* Touch devices: remove sticky hover appearance */
@media (hover: none) {
  .admin-primary-button:hover,
  .admin-secondary-button:hover,
  .admin-danger-button:hover,
  .admin-link-button:hover,
  .admin-search-submit:hover,
  .admin-filter-button:hover,
  .admin-section-nav a:hover,
  .admin-table tbody tr:hover,
  .admin-user-table tbody tr:hover,
  .admin-record-table tbody tr:hover,
  .admin-campaign-table tbody tr:hover,
  .admin-audit-table tbody tr:hover {
    background: inherit;
  }

  .admin-filter-button.is-active:hover {
    background: var(--text);
    color: #fff;
  }
}

/* Respect reduced motion across navigation and UI */
@media (prefers-reduced-motion: reduce) {
  .admin-section-nav,
  .admin-section-nav a,
  .admin-primary-button,
  .admin-secondary-button,
  .admin-danger-button,
  .admin-link-button,
  .admin-search-submit,
  .admin-filter-button,
  .admin-field input,
  .admin-field textarea,
  .admin-field select {
    scroll-behavior: auto;
    transition: none;
  }
}


/* ========================================================
KYMWA ADMIN — DAILY BAR WIDTH CONSISTENCY
Selected-period / Moment performance charts
======================================================== */

/*
  The selected-period chart previously used a fixed 30-column grid,
  while Moment performance used flexible day columns.
  On mobile this made the same daily data look like two different
  chart systems. Both now use the same flex-column geometry.
*/

.admin-bar-chart,
.admin-content-bar-chart {
  display: flex;
  align-items: stretch;
  gap: 2px;
}

.admin-bar-column,
.admin-content-bar-column {
  flex: 1 1 0;
  min-width: 2px;
}

/* Preserve the selected-period chart's existing label row. */
.admin-bar-column {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) 28px;
  height: 100%;
}

/* Moment bars use the same full column width as selected-period bars. */
.admin-content-bar {
  right: 0;
  left: 0;
  width: auto;
}

@media (max-width: 680px) {
  .admin-bar-chart,
  .admin-content-bar-chart {
    gap: 2px;
  }

  .admin-bar-column,
  .admin-content-bar-column {
    min-width: 2px;
  }
}


/* ========================================================
KYMWA MOBILE — MOMENT TEXT / PHOTO GAP
======================================================== */

/*
  User Moment photos inherited the global 28px image margin.
  On mobile that made the photo feel detached from the Moment text.
  Keep event/history image spacing unchanged and tighten only user Moments.
*/
@media (max-width: 680px) {
  .person-moment .person-image,
  .person-moment .moment-photo,
  .person-moment img[data-moment-photo] {
    margin-top: 12px;
  }
}


/* ========================================================
KYMWA — INFO HEADER / SHEET
======================================================== */

.header-info-button {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}

.header-info-button:focus-visible {
  outline: 1px solid var(--text);
  outline-offset: 2px;
}

.header-info-dot {
  position: absolute;
  top: 1px;
  right: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.info-sheet {
  overflow-y: auto;
}

.info-filters {
  display: flex;
  gap: 0;
  margin: 0 0 20px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}

.info-filters::-webkit-scrollbar {
  display: none;
}

.info-filter {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 12px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .08em;
  cursor: pointer;
}

.info-filter:first-child {
  padding-left: 0;
  padding-right: 14px;
}

.info-filter.is-active {
  color: var(--text);
}

.info-post-list {
  min-height: 120px;
}

.info-post {
  border-bottom: 1px solid var(--line);
}

.info-post:first-child {
  border-top: 1px solid var(--line);
}

.info-post summary {
  position: relative;
  display: grid;
  gap: 7px;
  padding: 16px 24px 16px 0;
  list-style: none;
  cursor: pointer;
}

.info-post summary::-webkit-details-marker {
  display: none;
}

.info-post summary::after {
  content: "+";
  position: absolute;
  top: 17px;
  right: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1;
}

.info-post[open] summary::after {
  content: "−";
}

.info-post summary strong {
  font-size: 13px;
  line-height: 1.45;
  letter-spacing: -.01em;
}

.info-post summary time {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .04em;
}

.info-post-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 760;
  letter-spacing: .08em;
}

.info-post-pin {
  color: var(--text);
}

.info-post-body {
  padding: 0 0 20px;
  color: var(--text);
  font-size: 12px;
  line-height: 1.75;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.info-empty {
  margin: 0;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
}

.info-status {
  margin-top: 12px;
}

.account-summary--guest {
  margin-bottom: 22px;
}

/* ========================================================
KYMWA ADMIN — INFO MANAGEMENT
======================================================== */

.admin-info-list {
  display: grid;
  gap: 0;
  margin-top: 16px;
}

.admin-info-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}

.admin-info-item:first-child {
  border-top: 1px solid var(--line);
}

.admin-info-item-main {
  min-width: 0;
}

.admin-info-item-main strong {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.4;
}

.admin-info-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 720;
  letter-spacing: .05em;
}

.admin-info-item-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
}

@media (max-width: 680px) {
  .header-actions {
    gap: 7px;
  }

  .header-info-button {
    width: 30px;
    height: 30px;
    font-size: 15px;
  }

  .header-info-dot {
    top: 1px;
    right: 1px;
  }

  .info-filter {
    min-height: 44px;
    padding-right: 11px;
    padding-left: 11px;
  }

  .info-post summary {
    padding-top: 15px;
    padding-bottom: 15px;
  }

  .info-post summary strong {
    font-size: 13px;
  }

  .info-post-body {
    padding-bottom: 18px;
    font-size: 13px;
    line-height: 1.7;
  }

  .admin-info-item {
    align-items: flex-start;
    gap: 12px;
  }

  .admin-info-item-actions {
    gap: 8px;
  }
}


/* ========================================================
KYMWA HEADER — GLOBAL ALIGNMENT FINAL
======================================================== */

.header-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0;
  white-space: nowrap;
  line-height: 1;
}

.header-actions > * {
  flex: 0 0 auto;
}

.header-actions > * + * {
  position: relative;
  margin-left: 18px;
}

.header-actions > * + *::before {
  content: "·";
  position: absolute;
  left: -11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
}

.header-button,
.header-info-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  line-height: 1;
}

.header-info-button {
  position: relative;
  width: auto;
  min-width: 34px;
  height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 10px;
  font-weight: 760;
  letter-spacing: .055em;
  cursor: pointer;
}

.header-info-button:focus-visible {
  outline: 1px solid var(--text);
  outline-offset: 2px;
}

.header-info-dot {
  position: absolute;
  top: 4px;
  right: -5px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

@media (max-width: 680px) {
  .site-header {
    align-items: center;
  }

  .header-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0;
    white-space: nowrap;
  }

  .header-actions > * + * {
    margin-left: 15px;
  }

  .header-actions > * + *::before {
    left: -9px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
  }

  .header-button,
  .header-info-button {
    min-height: 32px;
    height: 32px;
    line-height: 1;
  }

  .header-info-button {
    min-width: 35px;
    font-size: 10px;
    font-weight: 760;
    letter-spacing: .055em;
  }

  .header-info-dot {
    top: 4px;
    right: -4px;
  }
}

/* INFO sheet — global English presentation */

.info-post-body {
  word-break: normal;
  overflow-wrap: anywhere;
}

.info-empty {
  letter-spacing: .02em;
}


/* ========================================================
KYMWA HEADER — EXACT MENU TYPOGRAPHY MATCH
======================================================== */

.site-header .header-actions .header-button,
.site-header .header-actions .header-info-button {
  width: auto;
  min-width: 0;
  height: 32px;
  min-height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 10px;
  font-weight: 760;
  font-style: normal;
  line-height: 1;
  letter-spacing: .055em;
  text-transform: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
}

@media (max-width: 680px) {
  .site-header .header-actions .header-button,
  .site-header .header-actions .header-info-button {
    width: auto;
    min-width: 0;
    height: 32px;
    min-height: 32px;
    padding: 0;
    font-size: 10px;
    font-weight: 760;
    line-height: 1;
    letter-spacing: .055em;
  }
}


/* ========================================================
KYMWA SHEETS — BACKGROUND SCROLL LOCK
======================================================== */

html.sheet-open,
body.sheet-open {
  overflow: hidden;
  overscroll-behavior: none;
}

body.sheet-open {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
}

.sheet {
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.info-sheet {
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}


/* ========================================================
KYMWA TIMELINE — EVENT / SPONSORED / MOMENT TITLE MATCH
======================================================== */

/*
  PC: .history-title and .person-title already share the same typography.
  Mobile: the previous override made .history-title 16px while
  .person-title was 19px. Keep every Timeline title at the same size.
*/

@media (max-width: 680px) {
  .history-title,
  .person-title {
    font-size: 19px;
    line-height: 1.35;
    letter-spacing: -0.025em;
  }
}


/* ========================================================
KYMWA HEADER — INFO UNREAD DOT GAP
======================================================== */

.header-info-dot {
  right: -2px;
}

@media (max-width: 680px) {
  .header-info-dot {
    right: -2px;
  }
}


/* ========================================================
KYMWA ADMIN — DAILY BAR THICKNESS FINAL
======================================================== */

/*
  Keep each date column flexible so dates remain positioned across
  the full selected period, but cap only the visible bar width.
  This prevents 1–2 data points from becoming oversized bars.
*/

.admin-bar-track {
  justify-content: center;
}

.admin-bar-fill {
  width: min(100%, 10px);
  max-width: 10px;
  margin: 0 auto;
}

.admin-content-bar {
  right: auto;
  left: 50%;
  width: min(100%, 10px);
  max-width: 10px;
  transform: translateX(-50%);
}

@media (max-width: 680px) {
  .admin-bar-fill,
  .admin-content-bar {
    width: min(100%, 8px);
    max-width: 8px;
  }
}


/* ========================================================
KYMWA PUBLIC — GLOBAL META LETTER SPACING
======================================================== */

/*
  Normalize compact metadata typography globally.
  This applies to any country / region value (GLOBAL, KOREA,
  JAPAN, USA, FRANCE, CANADA, etc.) through the shared meta
  selectors rather than targeting individual words.

  Signature advertising labels keep their existing rules:
  SPONSORED = .04em
  partner / sponsor badge = .03em
*/

.history-meta,
.person-meta,
.event-meta,
.moment-meta,
.age-label,
.age-value,
[data-event-meta],
[data-moment-meta] {
  letter-spacing: .04em;
}

/* Preserve KYMWA advertising signature spacing. */
.sponsored-label,
[data-sponsored-label] {
  letter-spacing: .04em;
}

.partner-badge,
.sponsor-badge,
[data-partner-badge],
[data-sponsor-badge] {
  letter-spacing: .03em;
}

@media (max-width: 680px) {
  .history-meta,
  .person-meta,
  .event-meta,
  .moment-meta,
  .age-label,
  .age-value,
  [data-event-meta],
  [data-moment-meta] {
    letter-spacing: .04em;
  }
}


/* ========================================================
INFO — YOUTUBE MEDIA + AUTHORED LINE BREAKS
======================================================== */

.info-text-block {
  margin: 0;
  white-space: normal;
}

.info-youtube {
  width: 100%;
  max-width: 720px;
  margin: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
}

.info-youtube iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.info-youtube.is-shorts {
  width: min(100%, 320px);
  max-width: 320px;
  aspect-ratio: 9 / 16;
}

@media (max-width: 680px) {
  .info-youtube {
    width: 100%;
    max-width: none;
    margin: 0;
  }

  .info-youtube.is-shorts {
    width: min(82vw, 300px);
    max-width: 300px;
  }
}


/* ========================================================
INFO — EXACT AUTHORED LINE SPACING
======================================================== */

.info-post-body .info-text-line,
.info-post-body .info-line-gap,
.info-post-body .info-youtube {
  margin-top: 0;
  margin-bottom: 0;
}

.info-post-body .info-text-line {
  min-height: 1.75em;
}

.info-post-body .info-line-gap {
  display: block;
  width: 100%;
  height: 1.75em;
  min-height: 1.75em;
}

.info-post-body .info-youtube {
  margin: 0;
}

/* ========================================================
KYMWA TIMELINE — END SLOGAN
- Final-year Event/Moment layout is intentionally untouched.
- Spacing belongs only to the ending slogan itself.
======================================================== */

.timeline-end-slogan {
  max-width: 48ch;
  margin-top: clamp(240px, 22vw, 288px);
  margin-bottom: clamp(144px, 14vw, 184px);
  color: var(--text);
  font-size: clamp(20px, 2.6vw, 36px);
  font-weight: 720;
  line-height: 1.08;
  letter-spacing: -0.045em;
}

@media (max-width: 680px) {
  .timeline-end-slogan {
    margin-top: 216px;
    margin-bottom: 128px;
    font-size: 19px;
    font-weight: 720;
    line-height: 1.35;
    letter-spacing: -0.025em;
  }
}


/* ========================================================
KYMWA — MINIMAL ACCOUNT SHEET
======================================================== */

.account-sheet-header {
  align-items: center;
}

.account-sheet-header > h2 {
  margin: 0;
}

.account-login-form {
  padding-top: 4px;
}

.account-summary.account-summary--minimal {
  display: grid;
  gap: 5px;
  padding: 6px 0 24px;
}

.account-summary.account-summary--minimal strong {
  font-size: 30px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.account-summary.account-summary--minimal > span:not([hidden]) {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
  letter-spacing: 0.03em;
}

.account-manage {
  border-top: 1px solid var(--line);
}

.account-manage > summary {
  position: relative;
  padding: 17px 24px 17px 0;
  list-style: none;
  cursor: pointer;
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.04em;
}

.account-manage > summary::-webkit-details-marker {
  display: none;
}

.account-manage > summary::after {
  content: "+";
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 15px;
  font-weight: 400;
}

.account-manage[open] > summary::after {
  content: "−";
}

.account-manage-content {
  padding: 4px 0 0;
}

#account-id-change-form.account-id-change-section {
  padding: 18px 0 20px;
  border-top: 1px solid var(--line);
}

.account-signout-section {
  padding: 0;
  border-top: 1px solid var(--line);
}

.account-text-action {
  width: 100%;
  padding: 17px 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.04em;
  text-align: left;
  cursor: pointer;
}

.account-text-action:hover {
  color: var(--text);
}

.account-plus-section[hidden] {
  display: none !important;
}
