/*
 * Felis Grove v0.3 — warm naturalist-journal styling.
 *
 * Palette: ink green on paper, rust and gold used sparingly. Serif headings,
 * green buttons, softly bordered cards. Sections:
 *   1 tokens and base   2 frame (header, sidebar)   3 controls
 *   4 cards and meters  5 page sections             6 dialog, toast, summary
 *   7 responsive        8 motion and utilities
 */

/* Self-hosted (SIL OFL 1.1, licences beside the files): no third-party requests. DM Sans is
   one variable file covering every weight used. Subsets and ranges as served by Google Fonts. */
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 400 700; font-display: swap; src: url('assets/fonts/dm-sans-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 400 700; font-display: swap; src: url('assets/fonts/dm-sans-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Libre Caslon Display'; font-style: normal; font-weight: 400; font-display: swap; src: url('assets/fonts/libre-caslon-display-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Libre Caslon Display'; font-style: normal; font-weight: 400; font-display: swap; src: url('assets/fonts/libre-caslon-display-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ------------------------------------------------------------------ 1 tokens and base */

:root {
  --ink: #283f35;
  --muted: #5f6759;
  --green: #254c40;
  --green-hover: #386351;
  --paper: #f7f6ef;
  --card: #fbfaf6;
  --panel: #fcfbf6;
  --line: #dedfd3;
  --wash: #e9ede1;
  --wash-deep: #dbe3cf;
  --rust: #ad6950;
  --rust-text: #96553e;
  --leaf: #7e9069;
  --sage: #6b7f56;
  --gold: #ad8b46;
  --good-text: #3d6a4b;
  --warn-bg: #f6ebe0;
  --serif: 'Libre Caslon Display', Georgia, serif;
  --sans: 'DM Sans', Arial, sans-serif;
  --radius: 5px;
}

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

html {
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 15px/1.6 var(--sans);
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

h1,
h2 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.15;
}

h1 {
  font-size: 40px;
  letter-spacing: -1px;
}

h2 {
  font-size: 28px;
}

h3 {
  font-size: 15px;
  font-weight: 600;
}

h4 {
  font-size: 14px;
  font-weight: 600;
}

p + p {
  margin-top: 10px;
}

a {
  color: var(--green);
  text-decoration-color: color-mix(in srgb, var(--green) 40%, transparent);
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-color: currentColor;
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: default;
  opacity: 0.5;
}

:focus-visible {
  outline: 3px solid #2f7a63;
  outline-offset: 2px;
  border-radius: 3px;
}

main:focus,
[tabindex='-1']:focus {
  outline: none;
}

code {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.92em;
}

em {
  font-style: normal;
}

.eyebrow {
  font-size: 11px;
  letter-spacing: 1.8px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--muted);
}

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

.good-text {
  color: var(--good-text);
}

.warn-text {
  color: var(--rust-text);
}

/* ------------------------------------------------------------------ 2 frame */

.skip-link {
  position: absolute;
  left: 8px;
  top: -60px;
  z-index: 100;
  background: var(--green);
  color: #fff;
  padding: 8px 14px;
  border-radius: var(--radius);
}

.skip-link:focus {
  top: 8px;
}

.masthead {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 32px;
  background: #fbfaf5;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font: 30px/1 var(--serif);
  letter-spacing: -1px;
  color: var(--ink);
}

.brandmark {
  font: 42px Georgia, serif;
  transform: rotate(-12deg);
  color: var(--sage);
}

.brand-text small {
  display: block;
  font: 10px var(--sans);
  letter-spacing: 3px;
  margin-top: 8px;
  color: var(--muted);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.cattery-name {
  font: 18px var(--serif);
  color: var(--green);
}

.day-label {
  font-weight: 600;
  white-space: nowrap;
}

.wallet {
  font-size: 16px;
  white-space: nowrap;
}

.wallet small {
  font-size: 12px;
  color: var(--muted);
}

.coin {
  color: var(--gold);
  margin-right: 4px;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #cfd7c5;
  background: var(--wash);
  color: var(--green);
}

.app-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  max-width: 1680px;
  margin: 0 auto;
}

.sidebar {
  position: sticky;
  top: 76px;
  align-self: start;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 32px 22px 20px 28px;
  border-right: 1px solid var(--line);
  min-height: calc(100vh - 76px);
}

.sidebar > .eyebrow {
  margin-bottom: 16px;
  font-size: 10px;
}

nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 3px -9px;
  padding: 10px 12px;
  border-radius: var(--radius);
  color: #4d5a4f;
  font-size: 14px;
  text-decoration: none;
}

nav a:hover {
  background: #eceee5;
}

nav a.active {
  background: #e3e9da;
  color: var(--green);
  font-weight: 600;
}

.nav-icon {
  width: 20px;
  text-align: center;
  font-size: 18px;
  line-height: 1;
}

.nav-badge {
  margin-left: auto;
  padding: 0 7px;
  border-radius: 10px;
  background: var(--rust-text); /* white on --rust is 4.27:1; --rust-text is 5.73:1 */
  color: #fff;
  font-size: 11px;
  font-weight: 600;
}

.nav-badge[hidden] {
  display: none;
}

.sidebar-note {
  margin-top: 56px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

.leaf {
  font-size: 34px;
  color: var(--leaf);
}

.sidebar-note p {
  font: 22px/1.3 var(--serif);
  margin: 8px 0;
}

.sidebar-note small,
.version {
  font-size: 12px;
  color: var(--muted);
}

.version {
  margin-top: 16px;
}

main {
  min-width: 0;
  padding: 32px 40px 0;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 40px;
  padding: 18px 0 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.page-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.page-title .eyebrow {
  margin-bottom: 8px;
}

.page-title p:last-child {
  margin-top: 8px;
  color: var(--muted);
  max-width: 60ch;
}

.back {
  margin-bottom: 14px;
  font-size: 13px;
}

/* ------------------------------------------------------------------ 3 controls */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 18px;
  border: 1px solid var(--green);
  border-radius: 4px;
  background: var(--green);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none;
}

.button:hover:enabled {
  background: var(--green-hover);
}

.button.secondary {
  background: transparent;
  color: var(--green);
  border-color: #b9c2ad;
}

.button.secondary:hover:enabled {
  background: var(--wash);
}

.button.danger {
  background: var(--rust-text);
  border-color: var(--rust-text);
}

.next-day {
  white-space: nowrap;
}

.mini {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  border: 1px solid #cdd4c3;
  border-radius: 3px;
  background: transparent;
  color: var(--green);
  font-size: 13px;
  line-height: 1.4;
  text-decoration: none;
  white-space: nowrap;
}

.mini:hover:enabled,
a.mini:hover {
  background: var(--wash);
}

.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

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

select,
input[type='text'] {
  max-width: 100%;
  padding: 8px 10px;
  border: 1px solid #c9cfbd;
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
}

select {
  background: #fbfaf5;
  color: var(--green);
}

.filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

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

.stack label {
  font-weight: 600;
  font-size: 13px;
}

.inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.inline-form input {
  flex: 1 1 200px;
}

.file-button {
  cursor: pointer;
}

.file-button:focus-within {
  outline: 3px solid #2f7a63;
  outline-offset: 2px;
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

legend {
  padding: 0;
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 6px;
}

.choices {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.choice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  cursor: pointer;
}

.choice:has(input:checked) {
  border-color: var(--green);
  background: var(--wash);
}

.choice.disabled {
  opacity: 0.65;
  cursor: default;
}

.choice input {
  margin-top: 4px;
  accent-color: var(--green);
}

.choice small {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.notice {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: #eff0e4;
  font-size: 14px;
}

.notice.warn,
.save-error {
  background: var(--warn-bg);
  border: 1px solid #e6cdb6;
}

.save-error {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: var(--radius);
  font-size: 14px;
}

.notice .button-row {
  margin-top: 8px;
}

/* ------------------------------------------------------------------ 4 cards and meters */

.panel {
  margin-bottom: 20px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.panel > h2 {
  margin-bottom: 12px;
  font-size: 26px;
}

.panel h3 {
  margin: 14px 0 6px;
}

.two-up {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.two-up > .panel {
  margin-bottom: 0;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 0 0 24px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fbfaf5;
}

.summary-strip.six {
  grid-template-columns: repeat(6, 1fr);
}

.summary-strip > div {
  display: flex;
  flex-direction: column;
  padding: 14px 18px;
  border-right: 1px solid var(--line);
}

.summary-strip > div:last-child {
  border-right: 0;
}

.summary-strip b {
  font: 28px/1.2 var(--serif);
  font-weight: 400;
}

.summary-strip span {
  font-size: 12px;
  color: var(--muted);
}

.content-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
  align-items: start;
}

.section-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.section-heading h2 {
  font-size: 28px;
}

.count {
  display: inline-block;
  min-width: 24px;
  padding: 2px 8px;
  border-radius: 12px;
  background: #e7e9dc;
  font: 12px var(--sans);
  text-align: center;
  vertical-align: middle;
}

.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}

/* Ten adoption offers: five columns keeps the rows full on desktop screens. */
.offer-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

@media (max-width: 1240px) {
  .offer-grid {
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  }
}

.cat-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.cat-picture {
  position: relative;
  display: block;
  background: #e9e5d8;
}

.cat-picture.static {
  cursor: default;
}

.cat-picture .sex {
  position: absolute;
  right: 10px;
  top: 10px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #f8f5e7e6;
  color: #3f5646;
  font-size: 15px;
}

.badge {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 2px 8px;
  background: #f7efd7;
  color: var(--ink);
  font-size: 10px;
  letter-spacing: 1px;
}

.cat-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 14px;
}

.cat-name {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
}

.cat-name a,
.cat-name h3 {
  font: 24px/1.2 var(--serif);
  color: var(--ink);
  text-decoration: none;
}

.cat-name a:hover {
  text-decoration: underline;
}

.origin {
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--muted);
}

.breed-label {
  margin-top: 4px;
  font-size: 13px;
  font-weight: 600;
}

.cat-body > .muted {
  margin: 6px 0 10px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 0 0 8px;
}

.tag {
  padding: 1px 8px;
  border-radius: 10px;
  background: #ececde;
  font-size: 12px;
}

.tag-good {
  background: #e1ead4;
  color: #2f573b;
}

.tag-warm {
  background: var(--warn-bg);
  color: var(--rust-text);
}

.meter {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0;
  font-size: 12px;
}

.meter > span {
  width: 64px;
  color: var(--muted);
}

.meter .bar {
  flex: 1;
  height: 6px;
  overflow: hidden;
  border-radius: 5px;
  background: #e5e8da;
}

.meter i {
  display: block;
  height: 100%;
  background: #7f9568;
}

.meter.over i {
  background: var(--rust);
}

.meter b {
  width: 36px;
  text-align: right;
  font-weight: 500;
}

.care-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.cat-body .meter + .care-actions,
.cat-body > .meter:last-of-type {
  margin-bottom: 4px;
}

.care-actions .mini {
  flex: 1 1 auto;
}

/* tags, statuses, icons */

.status {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 10px;
  background: #ececde;
  font-size: 12px;
  white-space: nowrap;
}

.status-tested,
.status-complete,
.status-pref-known {
  background: #dde8cf;
  color: #2f573b;
}

.status-deduced,
.status-pref-leaning {
  background: #f1e8c9;
  color: #6d5a1f;
}

.status-unknown,
.status-pref-unknown {
  background: #ececde;
  color: var(--muted);
}

.icon {
  display: inline-block;
  flex: none;
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.icon-glyph {
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: var(--wash);
  color: var(--green);
  font-size: 20px;
  line-height: 1;
}

.icon.rosette {
  width: 36px;
  height: 36px;
}

.icon.small {
  width: 22px;
  height: 22px;
  font-size: 12px;
}

.title-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 6px 6px 0;
  padding: 2px 10px 2px 4px;
  border-radius: 14px;
  background: #f1ead2;
  font-size: 13px;
}

.title-badge .icon {
  width: 24px;
  height: 24px;
  font-size: 13px;
}

.plain-list {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.plain-list > li {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.plain-list > li:last-child {
  border-bottom: 0;
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 28px;
  margin: 12px 0 0;
}

.facts > div {
  min-width: 90px;
}

.facts dt {
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
}

.facts dd {
  margin: 0;
  font-weight: 500;
}

.facts.stacked {
  display: grid;
  gap: 8px;
}

.facts.stacked > div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px;
}

.table-wrap {
  overflow-x: auto;
  margin-top: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

thead th {
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

tbody th {
  font-weight: 600;
}

tbody th small {
  display: block;
  font-weight: 400;
  color: var(--muted);
  font-size: 12px;
}

tfoot th,
tfoot td {
  font-weight: 700;
  border-bottom: 0;
}

tr.selected {
  background: var(--wash);
}

.genotype {
  padding: 1px 7px;
  border-radius: 3px;
  background: #ecefe2;
  letter-spacing: 1px;
}

.test-cell {
  text-align: right;
}

.gene-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.gene-chips li {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 2px 8px;
  border-radius: 12px;
  background: #ecefe2;
  font-size: 12px;
}

/* ------------------------------------------------------------------ 5 page sections */

.today > section + section {
  margin-top: 24px;
}

.today h2 {
  margin: 8px 0 12px;
  font-size: 26px;
}

.today h3 {
  margin: 14px 0 6px;
}

.tasks {
  margin: 0;
  padding: 0;
  list-style: none;
}

.task {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.task h3 {
  margin: 0 0 2px;
  font-size: 13px;
}

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

.task .mini {
  margin-top: 8px;
}

.nursery {
  padding: 18px;
  border-radius: 4px;
  background: #ececde;
}

.nursery-list {
  display: grid;
  gap: 12px;
}

.nursery-card {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  align-items: start;
}

.nursery-picture {
  display: block;
  overflow: hidden;
  border-radius: 4px;
}

.nursery-name {
  font: 20px var(--serif);
}

.nursery-name a {
  color: var(--ink);
  text-decoration: none;
}

.sex-inline {
  font: 14px var(--sans);
  color: var(--muted);
}

.nursery .care-actions {
  border-top: 0;
  padding-top: 6px;
}

/* profile */

.profile-head {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 28px;
  margin-bottom: 24px;
}

.profile-portrait {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #e9e5d8;
  align-self: start;
}

.profile-info h1 {
  margin: 6px 0 8px;
}

.relations {
  font-size: 14px;
  color: var(--muted);
}

.relations > li {
  padding: 4px 0;
  border: 0;
}

.type-line {
  margin-top: 14px;
}

.label-line {
  font: 24px/1.2 var(--serif);
  margin-bottom: 6px;
}

.label-line b {
  font-weight: 400;
}

.pref-list {
  margin: 8px 0 12px;
  padding: 0;
  list-style: none;
}

.pref-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
}

.action-group {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.action-group:last-child {
  border-bottom: 0;
}

.action-group h3 {
  margin: 0 0 4px;
}

.toy small {
  font-weight: 400;
  opacity: 0.85;
}

.journal-list {
  margin: 0;
  padding: 0;
  list-style: none;
  max-height: 520px;
  overflow-y: auto;
}

.journal-list li {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.journal-list .day {
  display: inline-block;
  min-width: 52px;
  font-size: 11px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--muted);
}

/* pedigree */

.pedigree {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: auto repeat(8, minmax(40px, auto));
  gap: 6px;
}

.ped-head {
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
}

.ped-cell {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--card);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.ped-cell > span {
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
}

.ped-cell a {
  font-weight: 600;
}

.ped-cell small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.ped-unknown {
  background: transparent;
  border-style: dashed;
  color: var(--muted);
}

/* breeding */

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

.parents label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
}

.parents select {
  width: 100%;
  margin-bottom: 14px;
}

.parent-panel {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.parent-panel .fg-art {
  margin-bottom: 10px;
  border-radius: 4px;
}

.parent-panel h3 {
  margin: 0;
  font: 22px var(--serif);
}

.pair-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 20px;
}

.pair-footer > div,
.pair-footer > p {
  flex: 1 1 260px;
}

.forecast-list {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.forecast-list li {
  margin-top: 12px;
}

.forecast-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}

.forecast-meter {
  height: 6px;
  margin-top: 5px;
  overflow: hidden;
  border-radius: 8px;
  background: #e5e8da;
}

.forecast-meter i {
  display: block;
  height: 100%;
  background: #9caa7f;
}

.forecast-table td:nth-child(2),
.forecast-table td:nth-child(3) {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* shows */

.show-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.show-list li + li {
  margin-top: 8px;
}

.show-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  text-align: left;
}

.show-item.selected {
  border-color: var(--green);
  background: var(--wash);
}

.show-main {
  flex: 1;
}

.show-main small {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

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

.entry-cat {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  align-items: center;
  margin-bottom: 12px;
}

.entry-cat .fg-art {
  border-radius: 4px;
}

.score-box {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--wash);
}

.score-box h3 {
  margin: 0 0 4px;
}

.score-box th,
.score-box td {
  padding: 5px 8px;
}

/* show hall: enter all ring-wise cats */

.enter-all {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--wash);
}

.enter-all p {
  margin: 0 0 10px;
}

.enter-all-skipped {
  margin: 0 0 10px;
}

.enter-all-skipped summary {
  cursor: pointer;
  color: var(--green);
}

.ring-status {
  display: block;
  font-weight: 400;
}

.enter-all-note {
  margin: 12px 0 0;
}

/* home */

.home-banner {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 170px;
  margin-bottom: 24px;
  padding: 28px 32px;
  overflow: hidden;
  border-radius: var(--radius);
  background: linear-gradient(120deg, #e3e9d3, #f1ecd8);
}

.home-banner.has-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.banner-copy {
  position: relative;
  max-width: 34%;
  min-width: 220px;
}

.banner-copy h1 {
  margin: 6px 0;
}

.shop-group + .shop-group {
  margin-top: 8px;
}

.shop-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 12px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.shop-item {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.shop-item.owned {
  background: #f1f4e8;
}

.shop-item .icon {
  width: 48px;
  height: 48px;
}

.shop-item h4 {
  margin: 0;
}

/* adoption, placements */

.offer-footer {
  margin-top: auto;
  padding-top: 12px;
}

.offer-footer .button {
  width: 100%;
}

.offer-grid .offer-footer .button {
  padding-inline: 10px;
  white-space: nowrap;
}

.offer-footer .muted {
  margin-top: 6px;
}

.dna-details {
  margin: 4px 0 8px;
  font-size: 13px;
}

.dna-details summary {
  cursor: pointer;
  color: var(--green);
}

.request-list {
  display: grid;
  gap: 14px;
  margin-bottom: 24px;
}

.request {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.request.answered {
  border-color: var(--green);
  box-shadow: inset 4px 0 0 var(--green);
}

.find-home p {
  margin: 0 0 10px;
}

.listing-note {
  margin: 10px 0 0;
}

.request .icon {
  width: 52px;
  height: 52px;
  font-size: 26px;
}

.request h3 {
  margin: 2px 0 4px;
  font: 22px var(--serif);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.chips li {
  padding: 2px 10px;
  border-radius: 12px;
  background: #ececde;
  font-size: 12px;
}

.placement-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.placement {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

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

.placement-portrait {
  display: block;
  overflow: hidden;
  border-radius: 4px;
}

.letter {
  margin: 8px 0 0;
  padding: 10px 14px;
  border-left: 3px solid var(--leaf);
  background: #f1f4e8;
  font-size: 14px;
}

.confirm-cat {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 16px;
  align-items: center;
}

.confirm-portrait {
  overflow: hidden;
  border-radius: 4px;
}

.reasons {
  font-size: 14px;
}

.reasons li {
  padding: 5px 0;
}

/* studio */

.job-list {
  display: grid;
  gap: 16px;
}

.job {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.job h3 {
  margin-bottom: 6px;
  font: 22px var(--serif);
}

/* field guide */

.guide-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

.guide-nav a {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  text-decoration: none;
  font-size: 13px;
}

.guide-nav a:hover {
  background: var(--wash);
}

.steps {
  margin: 12px 0;
  padding-left: 22px;
}

.steps li {
  padding: 4px 0;
}

.breed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 18px;
  margin-top: 16px;
}

.breed-card {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.breed-card h3 {
  margin: 0 0 4px;
  font: 24px var(--serif);
}

.breed-card p + p {
  margin-top: 6px;
}

.breed-figure {
  margin: 0;
}

.breed-figure .fg-art {
  border-radius: 4px;
}

.breed-figure figcaption {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.gene-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
  margin: 14px 0;
  padding: 0;
  list-style: none;
}

.gene {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.gene h3 {
  margin: 0 0 4px;
}

.gene h3 small {
  margin-left: 6px;
  font-weight: 400;
  color: var(--muted);
}

/* ------------------------------------------------------------------ 6 dialog, toast, summary */

dialog {
  width: min(560px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  padding: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 24px 60px rgb(40 63 53 / 25%);
}

dialog.wide {
  width: min(640px, calc(100vw - 24px));
}

dialog::backdrop {
  background: rgb(40 63 53 / 45%);
}

#modal-content {
  position: relative;
  padding: 28px;
}

#modal-content h2 {
  margin-bottom: 14px;
  padding-right: 36px;
}

#modal-content p + p {
  margin-top: 10px;
}

.close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: var(--wash);
  color: var(--green);
  font-size: 22px;
  line-height: 1;
}

#toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 60;
  display: none;
  align-items: flex-start;
  gap: 12px;
  width: min(560px, calc(100vw - 24px));
  padding: 12px 14px 12px 18px;
  border-radius: 6px;
  background: var(--green);
  color: #fff;
  box-shadow: 0 8px 24px rgb(0 0 0 / 22%);
  transform: translateX(-50%);
}

#toast.show {
  display: flex;
}

#toast.error {
  background: var(--rust-text);
}

#toast-text {
  flex: 1;
  font-size: 14px;
}

.toast-close {
  flex: none;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 50%;
  background: rgb(255 255 255 / 18%);
  color: #fff;
  font-size: 17px;
  line-height: 1;
}

.day-summary {
  margin-bottom: 24px;
  padding: 20px 22px;
  border: 1px solid #cfd8c0;
  border-radius: var(--radius);
  background: #eef2e4;
}

.summary-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px 18px;
}

.summary-head > div {
  flex: 1 1 200px;
}

.summary-head h2 {
  margin-top: 4px;
  font-size: 26px;
}

.delta {
  padding: 2px 10px;
  border-radius: 12px;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
}

.delta.up {
  color: var(--good-text);
}

.delta.down {
  color: var(--rust-text);
}

.summary-lines {
  margin: 12px 0 0;
  padding-left: 18px;
}

.summary-lines li {
  padding: 1px 0;
}

.summary-note {
  margin-top: 10px;
}

.arrivals {
  margin-top: 16px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid #d9dfcb;
}

.arrivals h3 {
  margin: 4px 0 10px;
  font: 24px var(--serif);
}

.arrival-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  margin: 0 0 10px;
  padding: 0;
  list-style: none;
}

.arrival a {
  display: block;
  overflow: hidden;
  margin-bottom: 6px;
  border-radius: 4px;
}

.arrival small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

/* ------------------------------------------------------------------ 7 responsive */

@media (max-width: 1100px) {
  .content-columns {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .today > section + section {
    margin-top: 0;
  }

  .today {
    order: -1;
  }
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    position: static;
    min-height: 0;
    padding: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .sidebar > .eyebrow,
  .sidebar-note,
  .version {
    display: none;
  }

  nav {
    display: flex;
    overflow-x: auto;
    padding: 8px 16px;
    gap: 4px;
    scrollbar-width: thin;
  }

  nav a {
    flex: none;
    margin: 0;
    padding: 8px 12px;
    white-space: nowrap;
  }

  main {
    padding: 24px 20px 0;
  }

  .masthead {
    padding: 8px 16px;
  }

  .profile-head {
    grid-template-columns: 1fr;
  }

  .summary-strip.six {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 700px) {
  h1 {
    font-size: 32px;
  }

  .two-up,
  .parents,
  .today {
    grid-template-columns: minmax(0, 1fr);
  }

  .page-title {
    flex-direction: column;
    align-items: stretch;
  }

  .summary-strip,
  .summary-strip.six {
    grid-template-columns: repeat(2, 1fr);
  }

  .summary-strip > div:nth-child(2n) {
    border-right: 0;
  }

  .summary-strip > div {
    border-bottom: 1px solid var(--line);
  }

  .brand-text small,
  .cattery-name {
    display: none;
  }

  .facts.stacked > div {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .banner-copy {
    max-width: none;
  }

  .entry-cat {
    grid-template-columns: 100px 1fr;
  }

  .confirm-cat {
    grid-template-columns: 90px 1fr;
  }

  .request {
    grid-template-columns: 1fr;
  }

  .placement {
    grid-template-columns: 80px 1fr;
  }

  .breed-grid,
  .gene-list {
    grid-template-columns: 1fr;
  }

  .panel {
    padding: 18px;
  }
}

@media (max-width: 480px) {
  main {
    padding: 20px 16px 0;
  }

  .masthead {
    gap: 8px;
    padding: 8px 12px;
  }

  .brand-text {
    display: none;
  }

  .header-right {
    flex: 1;
    justify-content: flex-end;
    gap: 10px;
  }

  .wallet small {
    display: none;
  }

  .day-label,
  .wallet {
    font-size: 14px;
  }

  .button {
    padding: 9px 14px;
  }

  .next-day {
    padding: 8px 12px;
  }

  .nursery-card {
    grid-template-columns: 84px 1fr;
  }

  .shop-item {
    grid-template-columns: 40px 1fr;
  }

  .shop-buy {
    grid-column: 2;
  }

  .shop-item .icon {
    width: 40px;
    height: 40px;
  }

  .ped-cell {
    padding: 4px 6px;
    font-size: 12px;
  }

  .ped-cell small {
    display: none;
  }

  #modal-content {
    padding: 22px 18px;
  }

  #toast {
    bottom: 12px;
  }

  th,
  td {
    padding: 7px 6px;
  }
}

/* ------------------------------------------------------------------ 8 motion and utilities */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  .button,
  .mini,
  nav a {
    transition: background-color 0.15s ease;
  }

  #toast.show {
    animation: toast-in 0.2s ease-out;
  }
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translate(-50%, 8px);
  }
}
.profile-navigation { display:flex; align-items:center; gap:.65rem; flex-wrap:wrap; margin:0 0 1.25rem; }
.profile-navigation > a:first-child { margin-right:auto; }
.profile-navigation > span { color:var(--muted); font-size:.85rem; }
.secret-pi { border:0; background:none; color:inherit; opacity:.4; padding:.2rem .55rem; cursor:pointer; font:inherit; }
.secret-pi:hover,.secret-pi:focus-visible { opacity:1; }
.portrait-controls { display:flex; gap:.75rem; flex-wrap:wrap; padding:.7rem 0; }
.portrait-controls label,.scene-cat-label { display:flex; flex-direction:column; gap:.2rem; font-size:.8rem; color:var(--muted); }
.portrait-controls select,.scene-cat-label select { max-width:100%; padding:.4rem .55rem; font:inherit; border:1px solid #d7dbcf; border-radius:.35rem; background:#fffdf7; color:#294338; }
.section-heading,.furniture-heading { display:flex; align-items:center; justify-content:space-between; gap:.8rem; flex-wrap:wrap; }
.section-heading h2,.furniture-heading h3 { margin:0; }
.section-heading .eyebrow { margin-bottom:.3rem; }
.home-style-picker { min-width:0; margin:1.2rem 0; padding:.8rem 0; border:0; border-top:1px solid var(--line); }
.home-style-picker legend { padding:0 .5rem 0 0; font-weight:500; font-size:.9rem; }
.home-style-picker > p { margin:.4rem 0 .75rem; font-size:.8rem; }
.home-style-choices { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:.7rem; }
.home-style-choice { position:relative; display:grid; grid-template-columns:auto minmax(0,1fr); gap:.35rem .4rem; align-content:start; min-width:0; padding:.65rem; border:1px solid var(--line); border-radius:.45rem; background:var(--card); cursor:pointer; }
.home-style-choice input { grid-column:1; grid-row:2; margin:.2rem 0 0; accent-color:var(--green); }
.home-style-choice:has(input:checked) { border-color:var(--sage); background:var(--wash); }
.home-style-choice:focus-within { outline:2px solid var(--green); outline-offset:2px; }
.home-style-thumb { position:relative; display:block; grid-column:1/-1; aspect-ratio:3/1; overflow:hidden; border-radius:.25rem; }
.home-style-thumb img { display:block; width:100%; height:100%; object-fit:cover; object-position:50% 48%; }
.home-style-thumb > span { position:absolute; right:.25rem; bottom:.25rem; padding:.1rem .25rem; border-radius:.15rem; background:#fcfaf2ed; color:var(--ink); font-size:.6rem; }
.home-style-name { grid-column:2; grid-row:2; font-weight:500; font-size:.85rem; }
.home-style-description { grid-column:1/-1; color:var(--muted); font-size:.75rem; line-height:1.4; }
.home-style-actions { margin:.7rem 0 0; }
.grove-scene-panel[data-style-preview="true"] #home-style-status { color:var(--green); font-weight:500; }
@media(max-width:700px) {
  .home-style-choices { gap:.4rem; }
  .home-style-choice { padding:.4rem; }
  .home-style-thumb { aspect-ratio:1.5/1; }
  .home-style-thumb > span { display:none; }
  .home-style-name { font-size:.75rem; }
  .home-style-description { font-size:.68rem; }
}
.home-scene { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:1rem; margin-top:1.2rem; align-items:start; }
.furniture-card { min-width:0; border:1px solid var(--line); border-radius:.65rem; padding:.8rem; background:#fcfaf3; }
.furniture-heading { margin-bottom:.65rem; }
.scene-caption { color:var(--muted); font-size:.7rem; }
.furniture-stage { aspect-ratio:1; position:relative; overflow:hidden; border-radius:.4rem; background:var(--wash); margin-bottom:.8rem; isolation:isolate; }
.furniture-painting { position:absolute; inset:0; width:100%; height:100%; }
/* The portrait's registered ground is y=321 in a 480x360 viewport. Align that
   to the painted cushion, with room for the tallest pose's ears and tail. */
.furniture-cat { position:absolute; left:0; width:100%; bottom:17%; }
.furniture-cat-tree .furniture-cat { bottom:35%; }
.furniture-hideaway .furniture-cat { left:5%; width:90%; bottom:17%; }
.furniture-cat:focus-visible { outline:3px solid var(--green); outline-offset:-3px; border-radius:.4rem; }
.furniture-empty { position:absolute; inset:auto 6% 6%; text-align:center; font-size:.8rem; color:var(--ink); padding:.5rem; background:#fcfaf2ee; border-radius:.4rem; }
.furniture-stage:not(.is-owned) { aspect-ratio:auto; min-height:80px; display:grid; place-items:center; }
.furniture-stage:not(.is-owned) .furniture-empty { position:static; margin:.5rem; background:none; }
.scene-visitors { font-size:.8rem; line-height:1.6; margin:.6rem 0; overflow-wrap:anywhere; }
.scene-arrange { border-top:1px solid var(--line); padding-top:.55rem; font-size:.8rem; }
.scene-arrange summary,.resting-panel summary { cursor:pointer; color:var(--green); }
.scene-arrange > p { font-size:.75rem; }
.rest-summary { margin-top:1rem; font-size:.85rem; }
.rest-summary p { margin:.5rem 0 0; }
.home-moments { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:1rem; }
.home-moment { min-width:0; padding:1rem; background:var(--wash); border-radius:.4rem; }
.home-moment h3 { margin:.4rem 0; }
.home-moment p { font-size:.85rem; overflow-wrap:anywhere; }
.home-moment .eyebrow { font-size:.65rem; }
.resting-panel summary { font-weight:500; }
.resting-panel details[open] > summary { margin-bottom:1rem; }
.personal-goal-choices { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:1rem; }
.goal-choice { display:flex; flex-direction:column; align-items:start; gap:.6rem; min-width:0; padding:1rem; background:var(--wash); border-radius:.4rem; }
.goal-choice h3 { margin:0 0 .5rem; }
.goal-choice p,.active-goal p { font-size:.85rem; }
.goal-picker { display:flex; flex-direction:column; gap:.6rem; align-items:start; }
.goal-picker label { display:flex; flex-direction:column; gap:.3rem; width:100%; font-size:.85rem; }
.goal-picker select { width:100%; min-width:0; max-width:100%; padding:.5rem; font:inherit; color:var(--ink); background:var(--panel); border:1px solid var(--line); border-radius:.3rem; }
.goal-steps { padding:0; list-style:none; line-height:1.8; }
.goal-steps a { margin-left:.4rem; }
.completed-goals { margin-top:1rem; font-size:.85rem; }
.album-note { max-width:80ch; }
.album-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:1rem; margin:1rem 0; }
.album-event { min-width:0; overflow:hidden; border:1px solid var(--line); border-radius:.5rem; background:var(--card); }
.album-picture { display:block; background:var(--wash); }
.album-copy { padding:.9rem; overflow-wrap:anywhere; }
.album-copy .eyebrow { font-size:.65rem; }
.album-copy > p:not(.eyebrow) { font-size:.9rem; }
.album-family { font-size:.8rem; margin:.7rem 0; }
.moment-pin { display:block; margin-top:.4rem; font-size:.7rem; }
.album-pinned { border-color:#a9b69a; }
@media(max-width:900px) { .album-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:700px) {
  .home-scene,.home-moments,.personal-goal-choices,.album-grid { grid-template-columns:1fr; }
  .furniture-stage { max-width:440px; margin-inline:auto; }
}

/* ------------------------------------------------------------------ lightbox */

.fg-art.zoomable {
  cursor: zoom-in;
}

.picture-frame {
  position: relative;
}

.art-zoom {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid #d7d2c2;
  border-radius: 50%;
  background: #fffdf7e6;
  color: #294338;
  line-height: 0;
  cursor: zoom-in;
  opacity: .85;
  transition: opacity .15s;
}

.art-zoom svg {
  width: 18px;
  height: 18px;
}

.art-zoom:hover,
.art-zoom:focus-visible {
  opacity: 1;
}

.art-zoom:focus-visible {
  outline: 2px solid var(--leaf);
  outline-offset: 2px;
}

/* Small portraits (show and studio entries) keep the picture clickable but drop the button clutter. */
.entry-cat .art-zoom {
  width: 24px;
  height: 24px;
  right: 4px;
  bottom: 4px;
}

.entry-cat .art-zoom svg {
  width: 14px;
  height: 14px;
}

dialog.lightbox {
  width: min(1000px, calc(100vw - 24px), calc((100vh - 150px) * 4 / 3 + 58px));
}

.lightbox-art .fg-art {
  border-radius: 6px;
}

/* ------------------------------------------------------------------ keep toggle */

.keep-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 6px;
  padding: 3px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #a8574f;
  line-height: 0;
  cursor: pointer;
  vertical-align: middle;
}

.keep-toggle svg {
  width: 18px;
  height: 18px;
}

.keep-toggle[aria-pressed="false"] {
  color: #9aa197;
}

.keep-toggle:hover,
.keep-toggle:focus-visible {
  color: #a8574f;
  background: #f3e6e1;
}

.keep-toggle.with-text {
  margin-left: 0;
  padding: 5px 12px 5px 8px;
  border: 1px solid #e3cfc7;
  background: #fbf3ef;
  font: inherit;
  font-size: .85rem;
  line-height: 1.2;
}

.keep-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 4px 0 12px;
}

.keep-note {
  margin-bottom: 12px;
}

.lightbox-art {
  overflow: hidden;
  border-radius: 6px;
  cursor: zoom-in;
}

.lightbox-art .fg-art {
  transition: transform .25s ease;
}

.lightbox-art.closer {
  cursor: zoom-out;
}

.lightbox-art.closer .fg-art {
  transform: scale(2.2);
}

.lightbox-hint {
  margin-top: 10px;
  font-size: .85rem;
}

@media (prefers-reduced-motion: reduce) {
  .lightbox-art .fg-art {
    transition: none;
  }
}

@media (max-width: 640px) {
  dialog.lightbox #modal-content {
    padding: 16px 12px;
  }
}

.cat-name .keep-toggle {
  margin: 0 auto 0 0;
  align-self: center;
}

/* ------------------------------------------------------------------ sync */

.sync-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border: 1px solid #d6dccf;
  border-radius: 999px;
  background: #f3f5ee;
  color: #3f5646;
  font-size: .78rem;
  text-decoration: none;
  white-space: nowrap;
}

.sync-chip::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #6f9a62;
}

.sync-chip.busy::before {
  background: #c9a34a;
}

.sync-chip.warn {
  border-color: #e3c9b8;
  background: #fbf1ea;
  color: #8a4b2f;
}

.sync-chip.warn::before {
  background: #c46a3d;
}

.sync-chip[hidden] {
  display: none;
}

.link-code {
  margin: 14px 0;
  font: 600 2.4rem/1.1 var(--sans, system-ui), sans-serif;
  letter-spacing: .12em;
  text-align: center;
  color: var(--ink);
}

.sync-choice {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.sync-choice > div {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--card);
}

.sync-choice h3 {
  margin-bottom: 4px;
  font-size: 1.05rem;
}

.sync-choice .button {
  margin-top: 8px;
}

.sync-key {
  margin: 12px 0;
}

.sync-key summary {
  cursor: pointer;
  color: var(--muted);
}

.join-offer {
  margin-top: 6px;
  color: var(--muted);
}

@media (max-width: 640px) {
  .sync-chip {
    padding: 2px 8px;
    font-size: .72rem;
  }
}
