:root {
  color-scheme: light;
  --nav-height: 60px;
  --black: #080806;
  --ink: #171510;
  --muted: #6f6757;
  --line: #ddc781;
  --paper: #fff8df;
  --panel: #fffdf3;
  --yellow: #edc23a;
  --yellow-strong: #f5d45a;
  --yellow-soft: #fff0b8;
  --shadow: 0 12px 30px rgba(8, 8, 6, 0.12);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
}

body {
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(180deg, #fff0b8 0, #fff9e8 280px, #fff8df 100%),
    var(--paper);
  color: var(--ink);
  font-size: 14px;
}

body.family-tree-fullscreen-active {
  overflow: hidden;
}

body.pax-photo-expanded-active {
  overflow: hidden;
}

button,
select,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  width: min(100%, 920px);
  min-height: 100vh;
  margin: 0 auto;
  padding-bottom: calc(var(--nav-height) + env(safe-area-inset-bottom));
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(8, 8, 6, 0.12);
  background: rgba(255, 247, 223, 0.94);
  backdrop-filter: blur(16px);
}

.title-lockup {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 70px;
  padding: calc(10px + env(safe-area-inset-top)) 14px 10px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
}

.f3-logo {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  border: 2px solid var(--black);
  border-radius: 8px;
  background: #ffffff;
  object-fit: contain;
  padding: 4px;
  box-shadow: 4px 4px 0 var(--black);
}

.secret-standard-link {
  display: grid;
  place-items: center;
  border-radius: 8px;
}

.secret-standard-link:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 3px;
}

.app-version {
  flex: 0 0 auto;
  border: 2px solid var(--black);
  border-radius: 8px;
  background: var(--yellow);
  color: var(--black);
  padding: 5px 7px;
  font-size: 0.7rem;
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 3px 3px 0 var(--black);
}

button.app-version {
  cursor: pointer;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  color: var(--black);
  font-size: clamp(1.25rem, 4.5vw, 1.75rem);
  line-height: 1;
  letter-spacing: 0;
}

#sourceStatus {
  display: none;
  margin-top: 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

#sourceStatus[data-status="error"] {
  display: block;
  margin-top: 5px;
  color: #a12617;
}

main {
  padding: 14px;
}

.screen {
  display: none;
}

.screen.is-active {
  display: grid;
  gap: 12px;
}

.stats-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 244, 0.84);
  box-shadow: var(--shadow);
}

.stats-tabs button {
  min-width: 0;
  min-height: 22px;
  border: 2px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 950;
  line-height: 1;
  padding: 2px 4px;
}

.stats-tabs button.is-active {
  border-color: var(--black);
  background: var(--yellow);
  color: var(--black);
}

.id-card-tabs {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stats-panel {
  display: none;
}

.stats-panel.is-active {
  display: grid;
  gap: 12px;
}

.id-card-panel {
  display: none;
}

.id-card-panel.is-active {
  display: grid;
  gap: 12px;
}

.id-card-ao-toolbar {
  grid-template-columns: 1fr;
}

#qSheetScreen.is-active {
  grid-template-rows: auto minmax(0, 1fr);
  height: calc(100vh - var(--nav-height) - 91px);
  height: calc(100svh - var(--nav-height) - 91px);
  min-height: 0;
  overflow: hidden;
}

.toolbar,
.stats-card,
.search-card,
.id-card,
.trend-card,
.profile-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.toolbar {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.toolbar label {
  display: grid;
  gap: 4px;
  min-width: 0;
  color: var(--black);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.toolbar label span {
  line-height: 1;
}

.stats-toolbar {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.q-sheet-toolbar {
  grid-template-columns: 1fr;
}

select,
input[type="date"] {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 40px;
  border: 2px solid var(--black);
  border-radius: 8px;
  background: #ffffff;
  color: var(--black);
  padding: 0 10px;
  font-weight: 850;
}

select:focus,
input:focus {
  outline: 3px solid rgba(243, 198, 35, 0.45);
}

.stats-card {
  overflow: hidden;
}

.table-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fffdf4, #fff8db);
}

.table-title p {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 950;
  text-transform: uppercase;
}

.table-title h2 {
  margin-top: 2px;
  color: var(--black);
  font-size: 1.08rem;
  line-height: 1.1;
}

#rowCount,
#kottersCount,
#milestonesCount,
#aoStatsCount {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 2px solid var(--black);
  border-radius: 8px;
  background: var(--yellow);
  color: var(--black);
  padding: 4px 9px;
  font-size: 0.78rem;
  font-weight: 950;
  white-space: nowrap;
}

.table-wrap {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  background: #ffffff;
  font-size: 0.86rem;
}

.stats-table {
  font-size: 0.78rem;
}

th,
td {
  min-width: 0;
  padding: 8px 7px;
  border-bottom: 1px solid #eee3c2;
  white-space: nowrap;
}

.stats-table th,
.stats-table td {
  padding: 7px 4px;
}

.stats-table th:first-child,
.stats-table td:first-child {
  width: min(31vw, 11rem);
  min-width: 5.4rem;
  max-width: 11rem;
}

.stats-table th:not(:first-child),
.stats-table td:not(:first-child) {
  width: 2.85rem;
  min-width: 2.45rem;
}

.stats-table th:not(:first-child),
.stats-table th:not(:first-child) button {
  justify-content: center;
  text-align: center;
}

.stats-table td:not(:first-child) {
  text-align: center;
}

.kotters-table th:first-child,
.kotters-table td:first-child {
  width: min(28vw, 10.5rem);
  min-width: 4.9rem;
  max-width: 10.5rem;
}

.kotters-table th:nth-child(2),
.kotters-table td:nth-child(2) {
  width: min(22vw, 6.6rem);
  min-width: 4.9rem;
}

.kotters-table th:nth-child(3),
.kotters-table td:nth-child(3) {
  width: min(50vw, 15rem);
  min-width: 8rem;
}

.kotters-table th,
.kotters-table td {
  padding: 6px 3px;
  font-size: 0.74rem;
}

.kotters-table th:nth-child(2),
.kotters-table th:nth-child(2) button,
.kotters-table td:nth-child(2) {
  justify-content: center;
  text-align: center;
}

.kotters-table th:nth-child(3),
.kotters-table th:nth-child(3) button,
.kotters-table td:nth-child(3) {
  justify-content: flex-start;
  text-align: left;
}

.milestones-table th:first-child,
.milestones-table td:first-child {
  width: min(34vw, 10.5rem);
  min-width: 5.4rem;
  max-width: 10.5rem;
}

.milestones-table th:not(:first-child),
.milestones-table td:not(:first-child) {
  width: min(20vw, 5.6rem);
  min-width: 3.9rem;
}

.milestones-table th,
.milestones-table td {
  padding: 6px 3px;
  font-size: 0.75rem;
}

.ao-stats-table th:first-child,
.ao-stats-table td:first-child {
  width: min(33vw, 9.5rem);
  min-width: 5.3rem;
  max-width: 9.5rem;
}

.ao-stats-table th:not(:first-child),
.ao-stats-table td:not(:first-child) {
  width: min(19vw, 5.2rem);
  min-width: 3.85rem;
}

.ao-stats-table th,
.ao-stats-table td {
  padding: 5px 3px;
  font-size: 0.72rem;
  line-height: 1.12;
}

.ao-stats-table th:not(:first-child),
.ao-stats-table th:not(:first-child) button {
  justify-content: center;
  text-align: center;
}

.ao-stats-wrap {
  overflow: visible;
}

.ao-name {
  overflow: hidden;
  font-weight: 900;
  text-overflow: ellipsis;
}

.last-bd-cell {
  overflow: hidden;
  text-overflow: ellipsis;
}

th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--black);
  color: #ffffff;
  font-size: 0.7rem;
  text-align: left;
  text-transform: uppercase;
}

th button {
  display: inline-flex;
  align-items: center;
  justify-content: inherit;
  gap: 5px;
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  font-weight: 950;
  text-align: inherit;
  text-transform: uppercase;
}

th button span {
  color: var(--yellow);
  font-size: 0.9rem;
  line-height: 1;
}

td {
  color: var(--ink);
  font-weight: 750;
}

tbody tr:nth-child(even) td {
  background: #fffaf0;
}

tbody tr:hover td {
  background: var(--yellow-soft);
}

.numeric {
  text-align: right;
}

.pax-name {
  overflow: hidden;
  color: var(--black);
  font-weight: 950;
  text-overflow: ellipsis;
}

.pax-name-button {
  display: block;
  width: 100%;
  overflow: hidden;
  border: 0;
  background: transparent;
  color: var(--black);
  padding: 0;
  font-weight: 950;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pax-name-button:focus,
.pax-name-button:hover {
  color: #6b5200;
  text-decoration: underline;
}

.q-sheet-wrap {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overscroll-behavior: contain;
}

.q-sheet-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.q-sheet-toolbar {
  align-items: flex-end;
  gap: 10px;
}

.q-sheet-toolbar label {
  flex: 1 1 190px;
}

.q-sheet-source-links {
  display: flex;
  flex: 0 0 auto;
  gap: 7px;
}

.source-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 1px solid rgba(8, 8, 6, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--black);
  font-size: 0.72rem;
  font-weight: 950;
  line-height: 1;
  padding: 0 10px;
  text-decoration: none;
  white-space: nowrap;
}

.source-link[hidden] {
  display: none;
}

.source-link:focus,
.source-link:hover {
  border-color: var(--black);
  background: var(--yellow-soft);
}

#qSheetScreen.is-active .q-sheet-card {
  height: 100%;
}

.q-sheet-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.today-button {
  min-height: 32px;
  border: 2px solid var(--black);
  border-radius: 8px;
  background: var(--yellow);
  color: var(--black);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 950;
  padding: 0 10px;
}

.today-button:active {
  transform: translateY(1px);
}

.q-sheet-table {
  table-layout: fixed;
}

.q-sheet-table th,
.q-sheet-table td {
  width: auto;
  min-width: 0;
  padding: 8px 6px;
  font-size: 0.8rem;
}

.q-sheet-table th:nth-child(1),
.q-sheet-table td:nth-child(1) {
  width: 3rem;
  min-width: 3rem;
  max-width: 3rem;
}

.q-sheet-table th:nth-child(2),
.q-sheet-table td:nth-child(2) {
  width: 4.45rem;
  min-width: 4.45rem;
}

.q-sheet-table th:nth-child(3),
.q-sheet-table td:nth-child(3) {
  width: 4.35rem;
  min-width: 4.35rem;
}

.q-sheet-table th:nth-child(4),
.q-sheet-table td:nth-child(4) {
  width: 6.4rem;
  min-width: 6.4rem;
}

.q-sheet-table th:nth-child(5),
.q-sheet-table td:nth-child(5) {
  width: auto;
  min-width: 5.7rem;
}

.q-bd-number,
.q-name {
  color: var(--black);
  font-weight: 950;
}

.q-name,
.q-notes {
  overflow: hidden;
  text-overflow: ellipsis;
}

.q-notes {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
}

.q-sheet-table tr.is-closest-date td {
  background: var(--yellow-soft);
  box-shadow:
    inset 0 2px 0 var(--yellow),
    inset 0 -2px 0 var(--yellow);
}

.q-sheet-table tr.is-future-slot td {
  color: #817866;
  font-style: italic;
}

.empty-cell {
  padding: 28px 12px;
  color: var(--muted);
  text-align: center;
}

.search-card,
.id-card {
  overflow: hidden;
}

.search-panel {
  display: grid;
  gap: 8px;
  padding: 12px;
  background: #ffffff;
}

.search-panel label {
  color: var(--black);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

input[type="search"] {
  min-height: 44px;
  width: 100%;
  border: 2px solid var(--black);
  border-radius: 8px;
  background: #ffffff;
  color: var(--black);
  font-size: 16px;
  padding: 0 12px;
  font-weight: 850;
}

.suggestion-list {
  display: grid;
  gap: 6px;
}

.suggestion-list:empty {
  display: none;
}

.suggestion-list button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 38px;
  border: 1px solid #eadcae;
  border-radius: 8px;
  background: #fffaf0;
  color: var(--black);
  padding: 7px 9px;
  text-align: left;
}

.suggestion-list button:hover,
.suggestion-list button:focus {
  border-color: var(--black);
  background: var(--yellow-soft);
}

.suggestion-list span {
  min-width: 0;
  overflow: hidden;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.suggestion-list small {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
}

.suggestion-empty,
.empty-card {
  padding: 12px;
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

.id-card {
  background: #ffffff;
}

.profile-card {
  display: grid;
  gap: 12px;
  padding: 12px;
  background: #ffffff;
}

.is-hidden,
.profile-card.is-hidden {
  display: none !important;
}

.profile-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.profile-heading p {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 950;
  text-transform: uppercase;
}

.profile-heading h2 {
  margin-top: 2px;
  font-size: 1.1rem;
  line-height: 1.1;
}

.profile-heading > span {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff9e7;
  padding: 5px 7px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
}

.profile-form {
  display: grid;
  gap: 10px;
}

.profile-admin-panel {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
  border: 2px solid var(--black);
  border-radius: 8px;
  background: #fff9e7;
  padding: 10px;
  box-shadow: 3px 3px 0 var(--black);
}

.profile-admin-panel label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 950;
  text-transform: uppercase;
}

.profile-admin-panel input {
  min-width: 0;
  min-height: 40px;
  width: 100%;
  border: 2px solid var(--black);
  border-radius: 8px;
  background: #ffffff;
  color: var(--black);
  font: inherit;
  font-size: 16px;
  font-weight: 900;
  padding: 8px 10px;
}

.profile-admin-panel p {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
}

.profile-section {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.profile-section:first-child {
  border-top: 0;
  padding-top: 0;
}

.profile-section h3 {
  color: var(--black);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.profile-form label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 950;
  text-transform: uppercase;
}

.profile-form input,
.profile-form select,
.profile-form textarea {
  min-width: 0;
  min-height: 40px;
  width: 100%;
  border: 2px solid var(--black);
  border-radius: 8px;
  background: #ffffff;
  color: var(--black);
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  padding: 8px 10px;
  text-transform: none;
}

.profile-form input[type="date"] {
  display: block;
  max-width: 100%;
  appearance: none;
  -webkit-appearance: none;
}

.profile-form input[type="date"]::-webkit-date-and-time-value {
  min-width: 0;
  text-align: left;
}

.profile-form textarea {
  min-height: 86px;
  resize: vertical;
}

.profile-form label.is-invalid input,
.profile-form label.is-invalid select,
.profile-form label.is-invalid textarea {
  border-color: #a33a2a;
  background: #fff4f0;
}

.profile-form label.is-invalid > span::after {
  content: " *";
  color: #a33a2a;
}

.profile-field-error {
  color: #a33a2a;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1.25;
  text-transform: none;
}

.profile-suggested-input::placeholder {
  color: #9b9485;
  font-style: italic;
  font-weight: 650;
  opacity: 1;
}

.profile-role-suggestions {
  margin-top: 2px;
}

.profile-toggle-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 44px;
  border: 1px solid #eadcae;
  border-radius: 8px;
  background: #fffaf0;
  padding: 8px 10px;
}

.profile-toggle-row input {
  width: 22px;
  min-height: 22px;
  accent-color: var(--yellow);
}

.profile-toggle-row span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.profile-help-button {
  display: inline-grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border: 2px solid var(--black);
  border-radius: 50%;
  background: #ffffff;
  color: var(--black);
  font-size: 0.76rem;
  font-weight: 950;
  line-height: 1;
}

.auth-code-row {
  margin-top: 2px;
}

.auth-action-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.claim-code-box {
  border: 1px solid #eadcae;
  border-radius: 8px;
  background: #fffaf0;
  padding: 9px;
}

.claim-code-box span {
  display: block;
  color: var(--black);
  font-size: 0.8rem;
  font-weight: 950;
}

.claim-code-box p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.3;
}

.primary-action,
.secondary-action {
  min-height: 40px;
  border: 2px solid var(--black);
  border-radius: 8px;
  font-weight: 950;
}

.primary-action {
  background: var(--yellow);
  color: var(--black);
}

.secondary-action {
  flex: 0 0 auto;
  background: #ffffff;
  color: var(--black);
  padding: 0 12px;
}

.primary-action:disabled,
.secondary-action:disabled {
  opacity: 0.55;
}

.profile-status {
  min-height: 18px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.profile-status[data-tone="ok"] {
  color: #236a3a;
}

.profile-status[data-tone="error"] {
  border: 1px solid #dba093;
  border-radius: 8px;
  background: #fff4f0;
  color: #a33a2a;
  padding: 8px 9px;
}

.profile-picture-row {
  display: grid;
  place-items: center;
  padding: 2px 0 10px;
}

.profile-picture-shell {
  position: relative;
  width: min(42vw, 148px);
  min-width: 128px;
  aspect-ratio: 1;
}

.profile-picture {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border: 3px solid var(--black);
  border-radius: 8px;
  background: var(--yellow);
  color: var(--black);
  font-size: 1.65rem;
  font-weight: 950;
  overflow: hidden;
  box-shadow: 4px 4px 0 var(--black);
}

.profile-picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-picture-edit {
  position: absolute;
  right: -6px;
  bottom: -6px;
  min-height: 34px;
  border: 2px solid var(--black);
  border-radius: 8px;
  background: var(--yellow);
  color: var(--black);
  padding: 0 11px;
  font-size: 0.76rem;
  font-weight: 950;
  box-shadow: 3px 3px 0 var(--black);
}

.profile-picture-edit:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 2px;
}

.profile-picture-file {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.profile-crop-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(8, 8, 6, 0.62);
}

.profile-crop-card {
  display: grid;
  gap: 12px;
  width: min(100%, 520px);
  max-height: calc(100svh - 32px);
  overflow: auto;
  border: 2px solid var(--black);
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
  box-shadow: 6px 6px 0 var(--black);
}

.profile-crop-stage {
  display: grid;
  place-items: center;
  min-height: 220px;
  border: 2px solid var(--black);
  border-radius: 8px;
  background: #1a1812;
  padding: 10px;
  overflow: hidden;
}

.profile-crop-image-wrap {
  position: relative;
  display: inline-block;
  max-width: 100%;
}

.profile-crop-image-wrap img {
  display: block;
  max-width: 100%;
  max-height: min(54svh, 420px);
  user-select: none;
}

.profile-crop-box {
  position: absolute;
  left: 0;
  top: 0;
  border: 3px solid var(--yellow);
  background: rgba(243, 198, 35, 0.12);
  box-shadow:
    0 0 0 999px rgba(8, 8, 6, 0.46),
    0 0 0 2px var(--black);
  cursor: grab;
  touch-action: none;
}

.profile-crop-box:active {
  cursor: grabbing;
}

.profile-crop-box span {
  position: absolute;
  right: -8px;
  bottom: -8px;
  width: 16px;
  height: 16px;
  border: 2px solid var(--black);
  border-radius: 999px;
  background: var(--yellow);
}

.profile-crop-size {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 950;
  text-transform: uppercase;
}

.profile-crop-size input {
  width: 100%;
  accent-color: var(--yellow);
}

.id-card-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  background: var(--black);
  color: #ffffff;
}

.id-card-header p {
  color: var(--yellow);
  font-size: 0.7rem;
  font-weight: 950;
  text-transform: uppercase;
}

.id-card-header h2 {
  margin-top: 3px;
  color: #ffffff;
  font-size: 1.28rem;
  line-height: 1.05;
}

.pax-card-title {
  min-width: 0;
}

.id-card-header > span,
.pax-header-actions > span {
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  padding: 5px 7px;
  color: #ffffff;
  font-size: 0.73rem;
  font-weight: 900;
  white-space: nowrap;
}

.pax-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
  gap: 7px;
}

.pax-card-photo-button {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 2px solid var(--yellow);
  border-radius: 8px;
  background: #ffffff;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.pax-card-photo-button img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pax-card-photo-button.is-expanded {
  position: fixed;
  inset: 0;
  z-index: 300;
  width: 100vw;
  height: 100vh;
  height: 100svh;
  border: 0;
  border-radius: 0;
  background: rgba(8, 8, 6, 0.88);
  padding: 18px;
  box-shadow: none;
}

.pax-card-photo-button.is-expanded img {
  width: auto;
  height: auto;
  max-width: min(100%, 760px);
  max-height: calc(100svh - 36px);
  border: 3px solid var(--yellow);
  border-radius: 8px;
  background: #ffffff;
  object-fit: contain;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.42);
}

.pax-tree-button {
  flex: 0 0 auto;
  min-height: 26px;
  border: 2px solid var(--black);
  border-radius: 8px;
  background: var(--yellow);
  color: var(--black);
  padding: 0 9px;
  font-size: 0.66rem;
  font-weight: 950;
  line-height: 1;
}

.pax-tree-button:hover,
.pax-tree-button:focus {
  background: var(--yellow-strong);
}

.ao-card-header {
  align-items: center;
  justify-content: space-between;
  min-height: 0;
  padding: 7px 10px;
}

.ao-card-header > div {
  min-width: 0;
}

.ao-card-header h2 {
  margin-top: 1px;
  font-size: 1rem;
}

.ao-card-header p {
  font-size: 0.62rem;
}

.ao-card-header > span {
  margin-left: auto;
  padding: 4px 6px;
  font-size: 0.68rem;
}

.ao-flag {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 52px;
  height: 34px;
  border: 2px solid var(--yellow);
  border-radius: 4px;
  background: #fff8dd;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2);
  overflow: hidden;
}

.ao-flag span {
  display: grid;
  place-items: center;
  min-width: 24px;
  min-height: 18px;
  border-radius: 2px;
  background: var(--black);
  color: var(--yellow);
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0;
}

.ao-flag img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.id-grid,
.metric-grid {
  display: grid;
  gap: 8px;
  padding: 10px;
}

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

.metric-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  background: #fffaf0;
}

.ao-id-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ao-flag-block {
  grid-column: 1 / -1;
}

.ao-flag-block img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin-top: 7px;
  border: 1px solid #eadcae;
  border-radius: 6px;
  background: #fff8dd;
  object-fit: contain;
}

.ao-flag-placeholder {
  display: grid;
  min-height: 120px;
  align-content: center;
  background:
    linear-gradient(135deg, rgba(255, 203, 5, 0.2), rgba(255, 255, 255, 0.92)),
    #ffffff;
}

.ao-metric-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ao-card-links {
  display: flex;
  gap: 8px;
  padding: 0 10px 10px;
}

.ao-card-links:empty {
  display: none;
}

.ao-card-links a {
  flex: 1 1 0;
  display: grid;
  place-items: center;
  min-height: 34px;
  border: 2px solid var(--black);
  border-radius: 8px;
  background: var(--yellow);
  color: var(--black);
  font-size: 0.75rem;
  font-weight: 950;
  text-decoration: none;
}

.detail-block,
.metric-block {
  min-width: 0;
  border: 1px solid #eadcae;
  border-radius: 8px;
  background: #ffffff;
  padding: 9px;
}

.detail-block span,
.metric-block span {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 950;
  text-transform: uppercase;
}

.detail-block strong,
.metric-block strong {
  display: block;
  margin-top: 3px;
  overflow-wrap: anywhere;
  color: var(--black);
  font-size: 0.92rem;
  line-height: 1.2;
}

.detail-block-with-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 10px;
}

.detail-block-copy {
  min-width: 0;
}

.detail-block-action {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.metric-block strong {
  font-size: 1.5rem;
  line-height: 1;
}

.metric-block small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  line-height: 1.25;
}

.metric-breakdown {
  display: grid;
  gap: 2px;
  margin-top: 6px;
}

.metric-ao-block {
  display: grid;
  gap: 5px;
}

.metric-block-with-details .metric-ao-block + .metric-ao-block {
  margin-top: 8px;
  padding-top: 9px;
  border-top: 1px solid #eee3c2;
}

.metric-breakdown small {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
  margin-top: 0;
}

.metric-breakdown b {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric-detail-list {
  display: grid;
  gap: 5px;
  margin-top: 2px;
}

.metric-detail-row {
  display: grid;
  grid-template-columns: 4.2rem minmax(0, 1fr);
  gap: 7px;
  align-items: start;
}

.metric-detail-row time {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1.25;
  white-space: normal;
}

.metric-detail-row span {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.metric-detail-row button {
  border: 1px solid #eadcae;
  border-radius: 999px;
  background: #fffaf0;
  color: var(--black);
  padding: 2px 6px;
  font-size: 0.7rem;
  font-weight: 950;
  line-height: 1.2;
}

.metric-detail-row button:hover,
.metric-detail-row button:focus {
  border-color: var(--black);
  background: var(--yellow-soft);
}

.metric-detail-row em {
  align-self: center;
  color: var(--muted);
  font-size: 0.66rem;
  font-style: normal;
  font-weight: 900;
}

.family-tree-card {
  display: grid;
  grid-template-rows: auto minmax(420px, 62vh);
  background: #ffffff;
}

.family-tree-card.is-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 200;
  width: 100vw;
  height: 100dvh;
  border-radius: 0;
  grid-template-rows: auto minmax(0, 1fr);
  box-shadow: none;
}

.family-tree-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: var(--black);
  color: #ffffff;
}

.family-tree-toolbar p {
  color: var(--yellow);
  font-size: 0.68rem;
  font-weight: 950;
  text-transform: uppercase;
}

.family-tree-toolbar h2 {
  margin-top: 2px;
  color: #ffffff;
  font-size: 1.08rem;
  line-height: 1.1;
}

.family-tree-actions {
  display: flex;
  gap: 6px;
}

.family-tree-actions button {
  min-width: 34px;
  min-height: 32px;
  border: 2px solid var(--black);
  border-radius: 8px;
  background: var(--yellow);
  color: var(--black);
  font-size: 0.74rem;
  font-weight: 950;
  line-height: 1;
}

.family-tree-actions .tree-icon-button {
  display: inline-grid;
  place-items: center;
  padding: 0;
}

.fullscreen-corners-icon {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.family-tree-actions .tree-close-button {
  display: none;
}

.family-tree-card.is-fullscreen .tree-close-button {
  display: inline-grid;
  place-items: center;
}

.family-tree-card.is-fullscreen #treeFullscreenButton {
  display: none;
}

.family-tree-viewport {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  background:
    linear-gradient(rgba(8, 8, 6, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(8, 8, 6, 0.045) 1px, transparent 1px),
    #ffffff;
  background-size: 28px 28px;
  touch-action: none;
}

.family-tree-card.is-fullscreen .family-tree-viewport,
.family-tree-card.is-fullscreen .family-tree-viewport svg {
  min-height: 0;
}

.family-tree-viewport svg {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 420px;
}

.tree-link {
  fill: none;
  stroke: var(--black);
  stroke-width: 2;
}

.tree-link.is-possible {
  stroke: #8f805d;
  stroke-dasharray: 6 5;
}

.tree-node {
  cursor: pointer;
}

.tree-node rect {
  fill: #ffffff;
  stroke: var(--black);
  stroke-width: 2.5;
  filter: drop-shadow(3px 3px 0 rgba(8, 8, 6, 0.95));
}

.tree-node.is-root-family rect {
  fill: #ffffff;
}

.tree-node.is-selected rect {
  fill: #f7f5ed;
  stroke-width: 4;
}

.tree-node.is-possible rect {
  stroke: #8f805d;
  stroke-dasharray: 6 4;
  filter: drop-shadow(3px 3px 0 rgba(143, 128, 93, 0.95));
}

.tree-node text {
  pointer-events: none;
  text-anchor: middle;
}

.tree-node-name {
  color: var(--black);
  fill: var(--black);
  font-size: 13px;
  font-weight: 950;
}

.tree-node-meta {
  color: var(--muted);
  fill: var(--muted);
  font-size: 9.5px;
  font-weight: 900;
}

.apft-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.apft-card.is-private {
  border: 2px solid #c5221f;
  border-left-width: 6px;
  border-radius: 8px;
  padding: 9px;
}

.apft-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  min-width: 0;
  border: 2px solid var(--black);
  border-radius: 8px;
  background: var(--yellow);
  padding: 10px;
  color: var(--black);
  box-shadow: 4px 4px 0 var(--black);
}

.apft-heading span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(8, 8, 6, 0.7);
  font-size: 0.68rem;
  font-weight: 950;
  text-transform: uppercase;
}

.apft-heading strong {
  grid-row: span 2;
  align-self: center;
  font-size: 2.1rem;
  font-weight: 950;
  line-height: 1;
}

.apft-heading em {
  justify-self: start;
  border: 2px solid var(--black);
  border-radius: 999px;
  background: #ffffff;
  padding: 2px 7px;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 950;
}

.apft-heading em.is-pass {
  color: #075b22;
}

.apft-heading em.is-fail {
  color: #8f1c10;
}

.apft-heading small {
  grid-column: 1 / -1;
  color: rgba(8, 8, 6, 0.76);
  font-size: 0.74rem;
  font-weight: 850;
}

.apft-heading-private {
  grid-template-columns: minmax(0, 1fr);
}

.apft-heading-private strong {
  grid-row: auto;
  font-size: 1.45rem;
}

.apft-private-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-top: 2px solid rgba(197, 34, 31, 0.2);
  padding-top: 8px;
  color: #c5221f;
}

.apft-private-footer strong {
  font-size: 1.42rem;
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
}

.apft-private-help {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 2px solid #c5221f;
  border-radius: 999px;
  background: #ffffff;
  color: #c5221f;
  font-size: 0.82rem;
  font-weight: 950;
  line-height: 1;
}

.apft-privacy-card {
  gap: 12px;
}

.apft-privacy-card p {
  color: var(--black);
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.35;
}

.apft-event-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.apft-event {
  min-width: 0;
  border: 1px solid #eadcae;
  border-radius: 8px;
  background: #fffaf0;
  padding: 9px;
}

.apft-event > span {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 950;
  text-transform: uppercase;
}

.apft-event > strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
  color: var(--black);
  font-size: 1.05rem;
  line-height: 1.05;
}

.apft-event > em {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 900;
}

.apft-event div {
  display: grid;
  gap: 2px;
  margin-top: 7px;
}

.apft-event small {
  color: var(--muted);
  font-size: 0.69rem;
  font-weight: 800;
  line-height: 1.25;
}

.apft-event small b {
  color: var(--black);
}

.trend-card {
  overflow: hidden;
}

.growth-toolbar {
  grid-template-columns: 1fr;
}

.trend-date-filter {
  display: grid;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 9px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.stats-date-filter {
  box-shadow: var(--shadow);
}

.trend-range {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
  column-gap: 12px;
}

.trend-range label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.trend-range span {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
}

.date-picker-shell {
  position: relative;
  width: 100%;
  min-width: 0;
  height: 34px;
}

.trend-date-display {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  height: 34px;
  overflow: hidden;
  border: 2px solid var(--black);
  border-radius: 7px;
  background: #ffffff;
  color: var(--black);
  padding: 0 4px;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.date-picker-shell input {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  width: 100%;
  height: 34px;
  min-width: 0;
  min-height: 34px;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  font-size: 16px;
}

.date-picker-shell:focus-within .trend-date-display {
  outline: 3px solid rgba(243, 198, 35, 0.45);
}

.trend-presets {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  min-width: 0;
}

.trend-years {
  display: contents;
}

.trend-presets button {
  min-width: 0;
  height: 32px;
  min-height: 32px;
  border: 2px solid var(--black);
  border-radius: 7px;
  background: #ffffff;
  color: var(--black);
  padding: 0 2px;
  font-size: 0.63rem;
  font-weight: 950;
  line-height: 1;
}

.trend-presets button.is-active {
  background: var(--yellow);
}

@media (min-width: 560px) {
  .trend-date-filter {
    gap: 9px;
    padding: 9px;
  }

  .trend-range {
    grid-template-columns: minmax(0, 12rem) minmax(0, 12rem);
    justify-content: start;
  }

  .date-picker-shell,
  .trend-date-display,
  .date-picker-shell input {
    height: 34px;
    min-height: 34px;
  }

  .trend-date-display {
    padding: 0 8px;
    font-size: 0.76rem;
  }

  .trend-presets {
    max-width: 36rem;
  }
}

.trend-card .table-title {
  align-items: center;
}

.trend-granularity {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 5.7rem;
  min-width: 5.7rem;
  overflow: hidden;
  border: 2px solid var(--black);
  border-radius: 7px;
  background: #ffffff;
}

.trend-granularity button {
  min-width: 0;
  min-height: 30px;
  border: 0;
  border-left: 1px solid rgba(8, 8, 6, 0.2);
  background: transparent;
  color: var(--black);
  padding: 0;
  font-size: 0.72rem;
  font-weight: 950;
  line-height: 1;
}

.trend-granularity button:first-child {
  border-left: 0;
}

.trend-granularity button.is-active {
  background: var(--yellow);
}

.trend-granularity button:focus {
  position: relative;
  z-index: 1;
  outline: 3px solid rgba(243, 198, 35, 0.45);
  outline-offset: -3px;
}

.bar-chart {
  display: grid;
  gap: 8px;
  padding: 10px 10px 9px;
  background: #ffffff;
}

.chart-canvas-scroll {
  min-width: 0;
  overflow-x: hidden;
}

.chart-canvas-wrap {
  position: relative;
  width: 100%;
  min-width: 100%;
  height: 176px;
}

.chart-canvas-wrap canvas {
  display: block;
}

.chart-viewport {
  min-width: 0;
  overflow-x: hidden;
}

.chart-viewport.is-scrollable {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding-bottom: 2px;
}

.chart-inner {
  min-width: 100%;
}

.chart-day {
  min-width: max(100%, calc(var(--bar-count) * 4.5px));
}

.bars {
  --chart-y-axis-width: 30px;
  position: relative;
  display: flex;
  align-items: end;
  gap: clamp(1px, 0.45vw, 4px);
  box-sizing: border-box;
  height: 128px;
  min-width: 0;
  margin-top: 18px;
  padding-left: var(--chart-y-axis-width);
  border-bottom: 2px solid var(--black);
}

.chart-day .bars {
  gap: 1px;
}

.bar {
  position: relative;
  flex: 1 1 0;
  min-width: 1px;
  height: var(--bar-height);
  border-radius: 2px 2px 0 0;
  background: var(--black);
}

.chart-day .bar {
  min-width: 3px;
}

.bar span {
  position: absolute;
  bottom: calc(100% + 3px);
  left: 50%;
  display: none;
  color: var(--black);
  font-size: 0.62rem;
  font-weight: 950;
  transform: translateX(-50%);
  white-space: nowrap;
}

.bars.has-values .bar span {
  display: block;
}

.y-axis-scale {
  position: absolute;
  inset: 0 0 0 0;
  pointer-events: none;
}

.y-axis-tick {
  position: absolute;
  right: 0;
  bottom: var(--tick-bottom);
  left: 0;
  height: 0;
  border-top: 1px solid #e7e2cf;
}

.y-axis-tick b {
  position: absolute;
  bottom: -7px;
  left: 0;
  width: calc(var(--chart-y-axis-width) - 6px);
  color: #716a55;
  font-size: 0.6rem;
  font-weight: 900;
  line-height: 1;
  text-align: right;
}

.average-line {
  position: absolute;
  right: 0;
  bottom: var(--average-bottom);
  left: var(--chart-y-axis-width);
  z-index: 2;
  height: 0;
  border-top: 2px dashed #b99015;
  pointer-events: none;
}

.average-line span {
  position: absolute;
  right: 0;
  bottom: 4px;
  border: 1px solid #d8bd51;
  border-radius: 6px;
  background: #fff8d8;
  color: var(--black);
  font-size: 0.68rem;
  font-weight: 950;
  line-height: 1;
  padding: 4px 5px;
  white-space: nowrap;
}

.chart-axis {
  position: relative;
  height: 18px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
}

.chart-axis span {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  white-space: nowrap;
}

.chart-empty {
  padding: 28px 12px;
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

.bottom-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  min-height: var(--nav-height);
  width: min(100%, 460px);
  margin: 0 auto;
  padding: 5px 5px calc(5px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(8, 8, 6, 0.18);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
}

.bottom-nav button {
  display: grid;
  place-items: center;
  gap: 4px;
  min-width: 0;
  min-height: 50px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #6a6253;
  font-size: 10px;
  font-weight: 850;
}

.bottom-nav button.is-active {
  background: var(--yellow);
  color: var(--black);
}

.bottom-nav svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (min-width: 760px) {
  .app-shell {
    border-right: 1px solid rgba(8, 8, 6, 0.08);
    border-left: 1px solid rgba(8, 8, 6, 0.08);
  }

  .bottom-nav {
    border-right: 1px solid rgba(8, 8, 6, 0.14);
    border-left: 1px solid rgba(8, 8, 6, 0.14);
  }
}

@media (max-width: 520px) {
  main {
    padding: 10px 8px 14px;
  }

  #qSheetScreen.is-active {
    height: calc(100vh - var(--nav-height) - 81px);
    height: calc(100svh - var(--nav-height) - 81px);
  }

  .title-lockup {
    padding-right: 8px;
    padding-left: 8px;
  }

  .brand-lockup {
    gap: 9px;
  }

  .app-version {
    padding: 5px 6px;
    font-size: 0.65rem;
  }

  .toolbar {
    padding: 9px;
  }

  .q-sheet-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .q-sheet-source-links {
    align-self: end;
  }

  .source-link {
    min-height: 32px;
    padding: 0 8px;
  }

  .id-grid,
  .metric-grid,
  .apft-event-grid {
    grid-template-columns: 1fr;
  }

  .id-card-header {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .pax-id-card-header {
    align-items: center;
    flex-direction: row;
  }

  .id-card-header > span,
  .pax-header-actions > span {
    width: fit-content;
  }

  .pax-header-actions {
    justify-content: flex-end;
  }

  .pax-card-photo-button {
    width: 48px;
    height: 48px;
  }

  .ao-card-header {
    align-items: center;
    flex-direction: row;
    gap: 8px;
    padding: 7px 10px;
  }

  .ao-card-header > span {
    width: auto;
  }

  th:not(:first-child),
  td:not(:first-child) {
    width: 3.12rem;
    min-width: 2.85rem;
    padding: 8px 5px;
  }

  th:first-child,
  td:first-child {
    width: 29vw;
    min-width: 5.85rem;
    max-width: 7.5rem;
    padding: 8px 6px;
  }

  th {
    font-size: 0.64rem;
  }
}
