﻿:root {
  --bg: #f3f6f4;
  --panel: #ffffff;
  --ink: #1d2423;
  --muted: #66706e;
  --line: #dce4df;
  --teal: #0b8f7b;
  --coral: #d45d4c;
  --violet: #6c5ce7;
  --amber: #c88719;
  --shadow: 0 14px 34px rgba(38, 50, 46, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(11, 143, 123, 0.08), transparent 34%),
    linear-gradient(225deg, rgba(212, 93, 76, 0.08), transparent 32%),
    var(--bg);
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.shell {
  width: min(1480px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 42px;
}

.topbar,
.map-topbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}


.site-logo {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 210px;
  height: 128px;
  padding: 0;
  overflow: hidden;
  background: #e4e4e4;
  border: 1px solid rgba(29, 36, 35, 0.08);
  border-radius: 6px;
  box-shadow: var(--shadow);
  text-decoration: none;
}

.site-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.topbar-title {
  min-width: 0;
  margin-right: auto;
}

.map-topbar #mapTitle {
  flex: 1 1 auto;
  min-width: 0;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.05;
}

.progress-box {
  min-width: 190px;
  padding: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.progress-box span {
  display: block;
  margin-bottom: 9px;
  font-weight: 800;
}

.progress-track {
  height: 9px;
  overflow: hidden;
  background: #e8ece9;
  border-radius: 999px;
}

.progress-track span {
  display: block;
  width: 0%;
  height: 100%;
  margin: 0;
  background: linear-gradient(90deg, var(--teal), var(--amber));
}

.controls {
  display: grid;
  grid-template-columns: minmax(240px, 2fr) repeat(3, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.search,
.select-wrap {
  display: grid;
  gap: 6px;
  padding: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.search span,
.select-wrap span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

input,
select {
  width: 100%;
  min-height: 38px;
  color: var(--ink);
  background: #f9fbfa;
  border: 1px solid transparent;
  border-radius: 6px;
  outline: none;
}

input {
  padding: 0 11px;
}

select {
  padding: 0 9px;
}

input:focus,
select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(11, 143, 123, 0.16);
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 14px;
}

.tab,
.mark-button,
.back-link {
  min-height: 36px;
  padding: 0 13px;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
}

.back-link {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.tab.is-active,
.mark-button.is-caught {
  color: #fff;
  background: var(--teal);
  border-color: var(--teal);
}

.status-line {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 13px;
}

.pal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.pal-card {
  display: grid;
  grid-template-columns: 1fr auto;
  min-height: 146px;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(38, 50, 46, 0.07);
}

.pal-card.is-caught {
  border-color: rgba(11, 143, 123, 0.55);
}

.pal-card.has-map .location-text {
  color: var(--teal);
  font-weight: 800;
}

.card-main {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 14px;
  width: 100%;
  padding: 14px;
  text-align: left;
  background: transparent;
  border: 0;
}

.pal-icon {
  width: 76px;
  height: 76px;
  object-fit: contain;
  background: #eef2ef;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.pal-lines {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.card-row {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 10px;
  align-items: start;
  min-height: 26px;
}

.name-row {
  grid-template-columns: minmax(140px, auto) 1fr;
  align-items: baseline;
}

.pal-name {
  margin: 0;
  font-size: 21px;
  line-height: 1.2;
}

.pal-en,
.row-label,
.location-text {
  color: var(--muted);
  font-size: 13px;
}

.pal-en {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-label {
  padding-top: 4px;
  font-weight: 800;
}

.location-text {
  padding-top: 4px;
}

.badges,
.work-list,
.legend,
.map-title-main {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.badge {
  min-height: 24px;
  padding: 3px 8px;
  color: #fff;
  background: var(--violet);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.badge.Neutral { background: #747b83; }
.badge.Fire { background: #d45d4c; }
.badge.Water { background: #1685be; }
.badge.Electric { background: #c88719; }
.badge.Grass { background: #309f63; }
.badge.Ice { background: #45a9bf; }
.badge.Ground { background: #9b7650; }
.badge.Dark { background: #4d455f; }
.badge.Dragon { background: #6c5ce7; }

.work-pill {
  padding: 3px 7px;
  color: var(--ink);
  background: #f0f4f1;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
}

.card-actions {
  display: grid;
  align-content: space-between;
  justify-items: end;
  padding: 10px;
  border-left: 1px solid var(--line);
}

.icon-button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: #f9fbfa;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 21px;
}

.favorite-button.is-favorite {
  color: #fff;
  background: var(--amber);
  border-color: var(--amber);
}

.tab:hover,
.mark-button:hover,
.icon-button:hover,
.back-link:hover {
  border-color: var(--teal);
}

.empty,
.map-empty {
  padding: 44px 20px;
  text-align: center;
  color: var(--muted);
  background: var(--panel);
  border: 1px dashed var(--line);
  border-radius: 8px;
}

.map-shell {
  width: min(1320px, calc(100% - 32px));
}

.map-topbar {
  align-items: center;
}

.map-title-main {
  align-items: center;
  justify-content: flex-end;
  text-align: right;
}

.map-title-main p {
  margin: 4px 0 8px;
  color: var(--muted);
}

.map-toolbar,
.map-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.legend {
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.dot-sample,
.map-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(29, 36, 35, 0.3);
}

.dot-sample.day,
.map-dot.day {
  background: #ff8a00;
}

.dot-sample.night,
.map-dot.night {
  background: #6c5ce7;
}

.dot-sample.all,
.map-dot.all {
  background: #d84a3a;
}

.map-info {
  padding: 12px 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.map-info strong,
.map-info span {
  display: block;
}

.map-info p {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.local-map-wrap {
  overflow: auto;
  max-height: calc(100vh - 240px);
  background: #d8e1dc;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.local-map {
  position: relative;
  width: 2048px;
  height: 2048px;
  transform-origin: top left;
}

.tile-layer,
.point-layer {
  position: absolute;
  inset: 0;
}

.tile-layer img {
  position: absolute;
  width: 512px;
  height: 512px;
}

.map-dot {
  position: absolute;
  width: 10px;
  height: 10px;
  transform: translate(-50%, -50%);
}

@media (max-width: 820px) {
  .topbar,
  .map-topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .site-logo {
    width: 132px;
    height: 80px;
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .topbar-title {
    grid-column: 1;
    grid-row: 1;
    margin-right: 0;
  }

  .map-topbar .back-link {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
  }

  .map-topbar #mapTitle {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .topbar,
  .map-topbar,
  .status-line,
  .map-toolbar,
  .map-info {
    display: grid;
  }

  .progress-box {
    width: 100%;
  }

  .controls {
    grid-template-columns: 1fr;
  }

  .map-title-main {
    justify-content: start;
    text-align: left;
  }
}

@media (max-width: 560px) {
  .shell {
    width: min(100% - 20px, 1480px);
    padding-top: 16px;
  }

  .pal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

  .pal-card {
    grid-template-columns: 1fr;
    min-height: 188px;
  }

  .card-main {
    display: block;
    padding: 8px;
    min-width: 0;
  }

  .card-row,
  .name-row {
    grid-template-columns: 1fr;
    gap: 0;
    min-height: 0;
  }

  .pal-lines {
    gap: 5px;
  }

  .name-row {
    margin-top: 5px;
  }

  .pal-icon {
    display: block;
    width: 48px;
    height: 48px;
    margin: 0 auto;
  }

  .pal-name {
    overflow: hidden;
    font-size: 13px;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .pal-en,
  .row-label {
    display: none;
  }

  .badges,
  .work-list {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .badge,
  .work-pill {
    max-width: 100%;
    min-height: 20px;
    padding: 2px 6px;
    overflow: hidden;
    font-size: 10px;
    text-overflow: ellipsis;
    vertical-align: top;
    white-space: nowrap;
  }

  .badges .badge:not(:first-child),
  .work-list .work-pill:not(:first-child) {
    display: none;
  }

  .location-text {
    display: block;
    overflow: hidden;
    padding-top: 0;
    font-size: 10px;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .card-actions {
    grid-template-columns: auto auto;
    align-content: center;
    justify-content: center;
    gap: 5px;
    padding: 7px;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .icon-button {
    width: 28px;
    height: 28px;
    font-size: 15px;
  }

  .mark-button {
    min-height: 28px;
    padding: 0 6px;
    font-size: 10px;
  }
}

.top-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.top-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 800;
  text-decoration: none;
}

.top-actions a.is-active {
  color: #fff;
  background: var(--teal);
  border-color: var(--teal);
}

.breed-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.breed-panel {
  min-width: 0;
  padding: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(38, 50, 46, 0.07);
}

.breed-panel h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.breed-form {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.breed-form.two-cols {
  grid-template-columns: 1fr 1fr;
}

.breed-form label {
  display: grid;
  gap: 6px;
}

.breed-form span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.breed-count {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.breed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 8px;
  max-height: 68vh;
  overflow: auto;
  padding-right: 4px;
}

.breed-card {
  display: grid;
  gap: 10px;
  padding: 10px;
  background: #f9fbfa;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.breed-card-child,
.breed-pal-mini,
.breed-card-parents {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.breed-card-child img {
  width: 46px;
  height: 46px;
  object-fit: contain;
  background: #eef2ef;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.breed-card-child strong,
.breed-card-child span,
.breed-pal-mini span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.breed-card-child span {
  color: var(--muted);
  font-size: 12px;
}

.breed-card-parents {
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
}

.breed-pal-mini {
  max-width: 44%;
}

.breed-pal-mini img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 50%;
}

.empty.slim {
  padding: 26px 12px;
}

@media (max-width: 900px) {
  .breed-layout,
  .breed-form.two-cols {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .top-actions a {
    min-height: 32px;
    padding: 0 10px;
    font-size: 12px;
  }

  .breed-panel {
    padding: 10px;
  }

  .breed-grid {
    grid-template-columns: 1fr;
    max-height: none;
  }
}

/* final layout override */
.pal-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 560px) {
  .pal-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
/* v4 forced card grid */
.pal-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

@media (max-width: 560px) {
  .pal-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }
}
/* v6 fixed full-map preview */
.map-shell {
  width: min(1180px, calc(100% - 32px));
}

.local-map-wrap {
  width: 100% !important;
  height: min(72vh, 760px) !important;
  min-height: 420px !important;
  overflow: hidden !important;
  display: grid !important;
  place-items: center !important;
}

.local-map {
  width: min(100%, min(72vh, 760px)) !important;
  height: auto !important;
  max-width: 760px !important;
  aspect-ratio: 1 / 1 !important;
  overflow: hidden !important;
}

.tile-layer img {
  width: 25% !important;
  height: 25% !important;
}

@media (max-width: 560px) {
  .map-shell {
    width: calc(100% - 20px);
  }

  .local-map-wrap {
    height: min(74vh, calc(100vw - 20px)) !important;
    min-height: 0 !important;
  }

  .local-map {
    width: 100% !important;
    max-width: none !important;
  }

  .map-dot {
    width: 6px !important;
    height: 6px !important;
  }
}
/* v7 locked compact map */
.map-shell {
  width: min(980px, calc(100% - 32px)) !important;
}
.local-map-wrap {
  width: 100% !important;
  height: min(68vh, 660px) !important;
  min-height: 360px !important;
  overflow: hidden !important;
  display: grid !important;
  place-items: center !important;
  touch-action: manipulation !important;
}
.local-map {
  position: relative !important;
  width: min(100%, 620px, 68vh) !important;
  height: auto !important;
  max-width: 620px !important;
  aspect-ratio: 1 / 1 !important;
  overflow: hidden !important;
}
.tile-layer img {
  width: 25% !important;
  height: 25% !important;
}
@media (max-width: 560px) {
  .map-shell {
    width: calc(100% - 20px) !important;
  }
  .local-map-wrap {
    height: calc(100vw - 20px) !important;
    min-height: 0 !important;
  }
  .local-map {
    width: 100% !important;
    max-width: none !important;
  }
}

/* v8 interactive zoomable map */
.map-shell {
  width: min(1320px, calc(100% - 24px)) !important;
}
.map-toolbar {
  align-items: center !important;
}
.map-zoom-controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}
.map-zoom-controls button,
.map-toggle {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
}
.map-zoom-controls button {
  min-width: 38px;
  padding: 0 12px;
  cursor: pointer;
}
.map-toggle {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  cursor: pointer;
}
.map-toggle input {
  width: 14px;
  height: 14px;
  accent-color: #1d8f63;
}
.local-map-wrap {
  position: relative !important;
  width: 100% !important;
  height: min(78vh, 860px) !important;
  min-height: 520px !important;
  overflow: hidden !important;
  display: block !important;
  place-items: unset !important;
  cursor: grab !important;
  touch-action: none !important;
  background: #d8e1dc !important;
}
.local-map-wrap.is-dragging {
  cursor: grabbing !important;
}
.local-map {
  position: absolute !important;
  left: 0 !important;
  top: 0 !important;
  width: 2048px !important;
  height: 2048px !important;
  max-width: none !important;
  aspect-ratio: auto !important;
  overflow: visible !important;
  transform-origin: 0 0 !important;
  will-change: transform !important;
}
.tile-layer img {
  width: 512px !important;
  height: 512px !important;
}
.place-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}
.place-label {
  position: absolute;
  translate: -50% -50%;
  white-space: nowrap;
  color: #153024;
  text-shadow: 0 1px 0 rgba(255,255,255,.9), 0 -1px 0 rgba(255,255,255,.85), 1px 0 0 rgba(255,255,255,.85), -1px 0 0 rgba(255,255,255,.85), 0 2px 10px rgba(0,0,0,.28);
  font-weight: 900;
  letter-spacing: 0;
}
.place-label.region {
  font-size:  20px;
  color: rgba(20, 47, 35, .78);
}
.place-label.fast {
  padding: 3px 7px;
  border: 1px solid rgba(31, 65, 50, .28);
  border-radius: 999px;
  background: rgba(255, 255, 255, .78);
  color: #19382b;
  font-size: 16px;
  opacity: 0;
  transition: opacity .12s ease;
}
.local-map.show-detail .place-label.fast {
  opacity: 1;
}
.local-map.hide-labels .place-label {
  display: none;
}
.point-layer {
  z-index: 3;
}
.map-dot {
  z-index: 4;
}
@media (max-width: 720px) {
  .map-shell {
    width: calc(100% - 12px) !important;
  }
  .map-toolbar {
    gap: 8px !important;
  }
  .map-zoom-controls {
    width: 100%;
    margin-left: 0;
  }
  .map-zoom-controls button {
    flex: 1;
  }
  .local-map-wrap {
    height: 72vh !important;
    min-height: 420px !important;
  }
}





/* v20 mobile header: keep progress on the right side */
@media (max-width: 560px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
  }

  .topbar .site-logo {
    grid-column: 2 !important;
    grid-row: 1 !important;
    justify-self: end !important;
  }

  .topbar .topbar-title {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }

  .topbar .top-actions {
    grid-column: 1 !important;
    grid-row: 2 !important;
    align-self: center !important;
  }

  .topbar .progress-box {
    grid-column: 2 !important;
    grid-row: 2 !important;
    justify-self: end !important;
    align-self: center !important;
    width: 118px !important;
    min-width: 0 !important;
    padding: 8px !important;
  }

  .topbar .progress-box span {
    margin-bottom: 6px !important;
    font-size: 12px !important;
  }

  .topbar .progress-track {
    height: 7px !important;
  }
}

/* v21 transparent 18183 logo and larger mobile progress */
.site-logo {
  width: 260px !important;
  height: 118px !important;
  padding: 0 !important;
  overflow: visible !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.site-logo img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  filter: drop-shadow(0 8px 16px rgba(38, 50, 46, .16));
}

@media (max-width: 820px) {
  .site-logo {
    width: 170px !important;
    height: 78px !important;
  }
}

@media (max-width: 560px) {
  .topbar,
  .map-topbar {
    column-gap: 12px !important;
  }

  .site-logo {
    width: 150px !important;
    height: 70px !important;
  }

  .topbar .progress-box {
    width: 150px !important;
    padding: 10px !important;
  }

  .topbar .progress-box span {
    margin-bottom: 7px !important;
    font-size: 13px !important;
  }

  .topbar .progress-track {
    height: 8px !important;
  }
}

/* v22 mobile-safe logo sizing */
.site-logo {
  width: 230px !important;
  height: 92px !important;
}

.site-logo img {
  filter: drop-shadow(0 5px 10px rgba(38, 50, 46, .12)) !important;
}

@media (max-width: 820px) {
  .site-logo {
    width: 148px !important;
    height: 58px !important;
  }
}

@media (max-width: 560px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr) 140px !important;
    column-gap: 10px !important;
  }

  .site-logo {
    width: 136px !important;
    height: 54px !important;
  }

  .site-logo img {
    filter: none !important;
  }

  .topbar .progress-box {
    width: 140px !important;
    padding: 9px 10px !important;
  }

  .topbar .progress-box span {
    font-size: 13px !important;
  }
}

/* v24 compact logo and locked mobile width */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

.site-logo {
  width: 178px !important;
  height: 70px !important;
}

.site-logo picture {
  display: block;
  width: 100%;
  height: 100%;
}

.site-logo img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
}

@media (max-width: 820px) {
  .site-logo {
    width: 128px !important;
    height: 50px !important;
  }
}

@media (max-width: 560px) {
  html,
  body {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden !important;
  }

  .shell,
  .map-shell {
    width: 100% !important;
    max-width: 100vw !important;
    padding-right: 10px !important;
    padding-left: 10px !important;
    overflow-x: hidden !important;
  }

  .topbar {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 124px !important;
    width: 100% !important;
    max-width: 100% !important;
    gap: 10px !important;
    align-items: center !important;
  }

  .map-topbar {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  .topbar-title,
  .top-actions,
  .progress-box,
  .controls,
  .pal-grid,
  .pal-card,
  .card-main {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .topbar-title h1 {
    font-size: 22px !important;
    line-height: 1.12 !important;
  }

  .top-actions {
    flex-wrap: nowrap !important;
    gap: 6px !important;
  }

  .top-actions a {
    min-width: 0 !important;
    padding: 0 10px !important;
    white-space: nowrap !important;
  }

  .site-logo {
    width: 118px !important;
    height: 46px !important;
  }

  .topbar .progress-box {
    width: 124px !important;
    padding: 9px 10px !important;
  }

  .topbar .progress-box span {
    font-size: 13px !important;
    white-space: nowrap !important;
  }

  .pal-grid {
    width: 100% !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }
}

/* v25 hard mobile width clamp */
@media (max-width: 560px) {
  html {
    width: 100vw !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
    overscroll-behavior-x: none;
  }

  body {
    width: 100vw !important;
    min-width: 0 !important;
    max-width: 100vw !important;
    overflow-x: clip !important;
    touch-action: pan-y;
  }

  .shell {
    width: 100vw !important;
    max-width: 100vw !important;
    margin: 0 !important;
    padding: 12px 10px 32px !important;
  }

  .topbar,
  .controls,
  .tabs,
  .status-line,
  .pal-grid {
    width: calc(100vw - 20px) !important;
    max-width: calc(100vw - 20px) !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
    overflow: hidden !important;
  }

  .controls {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .search,
  .select-wrap,
  input,
  select {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .tabs {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }

  .tab {
    width: 100% !important;
    min-width: 0 !important;
    padding: 0 4px !important;
    font-size: 12px !important;
    white-space: nowrap !important;
  }

  .pal-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    column-gap: 6px !important;
    row-gap: 8px !important;
  }

  .pal-card,
  .card-main,
  .pal-lines,
  .card-row,
  .badges,
  .work-list,
  .location-text {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .pal-card {
    display: flex !important;
    flex-direction: column !important;
  }

  .card-main {
    flex: 1 1 auto !important;
  }

  .card-actions {
    display: grid !important;
    grid-template-columns: 26px minmax(0, 1fr) !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding: 6px !important;
    gap: 4px !important;
    overflow: hidden !important;
  }

  .icon-button {
    width: 26px !important;
    height: 26px !important;
    min-width: 0 !important;
  }

  .mark-button {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding: 0 2px !important;
    overflow: hidden !important;
    font-size: 10px !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .badge,
  .work-pill {
    max-width: 100% !important;
  }

  img {
    max-width: 100% !important;
  }
}

/* v27 no horizontal pull on mobile */
@media (max-width: 560px) {
  html,
  body {
    position: relative !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    overscroll-behavior-x: none !important;
  }

  body {
    touch-action: pan-y !important;
  }

  .shell {
    width: 100% !important;
    max-width: 100% !important;
    padding-right: 10px !important;
    padding-left: 10px !important;
    contain: inline-size !important;
  }

  .topbar,
  .controls,
  .tabs,
  .status-line,
  .pal-grid,
  .pal-card,
  .card-main,
  .card-actions {
    min-width: 0 !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  .pal-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 5px !important;
  }

  .pal-card {
    contain: layout paint style !important;
  }

  .card-main {
    padding: 6px 3px !important;
  }

  .pal-icon {
    width: min(42px, 82%) !important;
    height: auto !important;
    aspect-ratio: 1 / 1 !important;
  }

  .pal-name {
    font-size: 11px !important;
  }

  .badge,
  .work-pill,
  .location-text,
  .mark-button {
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .card-actions {
    grid-template-columns: 24px minmax(0, 1fr) !important;
    padding: 5px 3px !important;
  }

  .icon-button {
    width: 24px !important;
    height: 24px !important;
  }
}

/* v28 pal card glass style */
.pal-card {
  position: relative !important;
  min-height: 176px !important;
  overflow: hidden !important;
  background:
    radial-gradient(circle at 18% 10%, rgba(255, 255, 255, .82), rgba(255, 255, 255, 0) 30%),
    linear-gradient(145deg, rgba(196, 249, 239, .72), rgba(211, 244, 255, .58) 46%, rgba(255, 255, 239, .74)) !important;
  border: 2px solid rgba(255, 255, 255, .82) !important;
  border-radius: 24px !important;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .55),
    inset 0 16px 28px rgba(255, 255, 255, .34),
    0 12px 24px rgba(76, 166, 158, .18) !important;
  isolation: isolate;
}

.pal-card::before {
  content: "";
  position: absolute;
  top: 14px;
  left: 18px;
  right: 18px;
  height: 8px;
  border-radius: 999px;
  background:
    linear-gradient(90deg,
      rgba(119, 213, 164, .8) 0 30%,
      transparent 30% 31%,
      rgba(23, 184, 170, .88) 31% 49%,
      rgba(255, 255, 255, .92) 49% 58%,
      rgba(28, 178, 166, .86) 58% 75%,
      transparent 75% 76%,
      rgba(109, 151, 164, .74) 76% 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .75);
  z-index: 2;
}

.pal-card::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, .72);
  pointer-events: none;
  z-index: 1;
}

.pal-card.is-caught {
  border-color: rgba(169, 238, 203, .95) !important;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .65),
    inset 0 16px 28px rgba(255, 255, 255, .38),
    0 12px 26px rgba(34, 158, 118, .22) !important;
}

.card-main {
  position: relative !important;
  z-index: 2 !important;
  margin: 30px 12px 12px !important;
  padding: 14px !important;
  background: rgba(255, 255, 255, .62) !important;
  border: 1px solid rgba(255, 255, 255, .68) !important;
  border-radius: 18px !important;
  box-shadow: inset 0 1px 18px rgba(255, 255, 255, .42) !important;
  backdrop-filter: blur(8px);
}

.pal-icon {
  background: rgba(255, 255, 255, .54) !important;
  border: 1px solid rgba(255, 255, 255, .72) !important;
  border-radius: 18px !important;
  box-shadow: 0 8px 18px rgba(49, 140, 133, .13) !important;
}

.pal-name {
  color: #06413e !important;
  font-weight: 900 !important;
}

.pal-en,
.row-label,
.location-text {
  color: rgba(19, 69, 67, .72) !important;
}

.badge,
.work-pill {
  border-color: rgba(255, 255, 255, .72) !important;
  box-shadow: 0 3px 8px rgba(36, 127, 121, .12) !important;
}

.work-pill {
  background: rgba(255, 255, 255, .66) !important;
}

.card-actions {
  position: relative !important;
  z-index: 2 !important;
  margin: 30px 10px 12px 0 !important;
  padding: 0 !important;
  border-left: 0 !important;
}

.icon-button,
.mark-button {
  background: rgba(255, 255, 255, .74) !important;
  border-color: rgba(255, 255, 255, .82) !important;
  box-shadow: 0 6px 14px rgba(46, 139, 132, .16) !important;
}

.mark-button.is-caught {
  background: rgba(35, 172, 154, .86) !important;
}

@media (max-width: 560px) {
  .pal-card {
    min-height: 182px !important;
    border-width: 1px !important;
    border-radius: 16px !important;
    box-shadow:
      inset 0 0 0 1px rgba(255, 255, 255, .48),
      0 6px 12px rgba(76, 166, 158, .12) !important;
  }

  .pal-card::before {
    top: 8px;
    left: 9px;
    right: 9px;
    height: 5px;
  }

  .pal-card::after {
    inset: 4px;
    border-radius: 13px;
  }

  .card-main {
    margin: 18px 5px 0 !important;
    padding: 7px 4px !important;
    border-radius: 12px !important;
  }

  .pal-icon {
    border-radius: 12px !important;
  }

  .card-actions {
    margin: 6px 5px 6px !important;
    padding: 0 !important;
  }

  .pal-name {
    font-size: 11px !important;
  }

  .badge,
  .work-pill,
  .location-text {
    font-size: 9px !important;
  }
}

/* v29 card action layout polish */
.pal-card {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 96px !important;
  gap: 10px !important;
  align-items: stretch !important;
  min-height: 196px !important;
}

.card-main {
  width: auto !important;
  min-width: 0 !important;
  margin: 32px 0 14px 14px !important;
  grid-template-columns: 78px minmax(0, 1fr) !important;
  gap: 14px !important;
}

.card-actions {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 82px !important;
  min-width: 82px !important;
  max-width: 82px !important;
  margin: 32px 14px 14px 0 !important;
  padding: 0 !important;
  overflow: visible !important;
}

.icon-button {
  flex: 0 0 auto !important;
  width: 38px !important;
  height: 38px !important;
  border-radius: 12px !important;
  font-size: 19px !important;
}

.mark-button {
  width: 82px !important;
  min-width: 82px !important;
  max-width: 82px !important;
  min-height: 40px !important;
  padding: 0 8px !important;
  border-radius: 14px !important;
  line-height: 1.15 !important;
  text-align: center !important;
  white-space: normal !important;
}

.pal-lines,
.card-row,
.name-row,
.badges,
.work-list,
.location-text {
  min-width: 0 !important;
}

.location-text {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

@media (max-width: 820px) and (min-width: 561px) {
  .pal-card {
    grid-template-columns: minmax(0, 1fr) 84px !important;
    gap: 8px !important;
  }

  .card-actions {
    width: 72px !important;
    min-width: 72px !important;
    max-width: 72px !important;
    margin-right: 10px !important;
  }

  .mark-button {
    width: 72px !important;
    min-width: 72px !important;
    max-width: 72px !important;
    padding: 0 6px !important;
    font-size: 12px !important;
  }
}

@media (max-width: 560px) {
  .pal-card {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    min-height: 186px !important;
    position: relative !important;
  }

  .card-main {
    display: block !important;
    width: auto !important;
    max-width: none !important;
    margin: 18px 5px 0 !important;
    padding: 7px 4px !important;
    flex: 1 1 auto !important;
  }

  .card-actions {
    display: block !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 5px 5px 6px !important;
    padding: 0 !important;
    overflow: visible !important;
  }

  .favorite-button {
    position: absolute !important;
    top: 16px !important;
    right: 8px !important;
    z-index: 4 !important;
    width: 24px !important;
    height: 24px !important;
    border-radius: 9px !important;
    font-size: 14px !important;
  }

  .mark-button {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    min-height: 26px !important;
    padding: 0 4px !important;
    border-radius: 10px !important;
    font-size: 10px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }

  .pal-icon {
    width: 42px !important;
    height: 42px !important;
    margin-bottom: 4px !important;
  }

  .name-row {
    margin-top: 2px !important;
  }

  .pal-lines {
    gap: 4px !important;
  }

  .badge,
  .work-pill {
    min-height: 18px !important;
    padding: 1px 4px !important;
    border-radius: 8px !important;
  }
}

/* v30 visible favorite state */
.favorite-button,
.favorite-button:hover {
  color: #627472 !important;
}

.favorite-button.is-favorite,
.favorite-button.is-favorite:hover,
.favorite-button.is-favorite:focus-visible {
  color: #f5a400 !important;
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, .95), rgba(255, 244, 196, .78)) !important;
  border-color: rgba(245, 164, 0, .72) !important;
  box-shadow:
    0 6px 14px rgba(245, 164, 0, .22),
    inset 0 0 0 1px rgba(255, 255, 255, .72) !important;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .75) !important;
}

@media (max-width: 560px) {
  .favorite-button.is-favorite,
  .favorite-button.is-favorite:hover,
  .favorite-button.is-favorite:focus-visible {
    color: #f2a000 !important;
    background: rgba(255, 250, 222, .92) !important;
    border-color: rgba(242, 160, 0, .76) !important;
  }
}

/* v31 favorite size and mobile positioning */
.icon-button.favorite-button {
  width: 46px !important;
  height: 46px !important;
  border-radius: 15px !important;
  font-size: 24px !important;
  line-height: 1 !important;
}

@media (max-width: 820px) and (min-width: 561px) {
  .icon-button.favorite-button {
    width: 40px !important;
    height: 40px !important;
    border-radius: 13px !important;
    font-size: 21px !important;
  }
}

@media (max-width: 560px) {
  .pal-card {
    position: relative !important;
    overflow: hidden !important;
  }

  .card-actions {
    position: static !important;
  }

  .icon-button.favorite-button,
  .favorite-button {
    display: grid !important;
    position: absolute !important;
    top: 15px !important;
    right: 8px !important;
    z-index: 8 !important;
    width: 26px !important;
    height: 26px !important;
    min-width: 26px !important;
    max-width: 26px !important;
    border-radius: 9px !important;
    font-size: 15px !important;
    opacity: 1 !important;
    visibility: visible !important;
    overflow: visible !important;
    pointer-events: auto !important;
  }

  .favorite-button.is-favorite {
    color: #f2a000 !important;
  }
}

/* v32 repaired mobile header and cards */
@media (max-width: 560px) {
  .shell {
    width: 100% !important;
    max-width: 100vw !important;
    padding: 12px 8px 32px !important;
    overflow-x: hidden !important;
  }

  .topbar {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 120px !important;
    grid-template-areas:
      "title logo"
      "actions progress" !important;
    width: calc(100vw - 16px) !important;
    max-width: calc(100vw - 16px) !important;
    gap: 8px !important;
    align-items: center !important;
    margin-bottom: 12px !important;
    overflow: visible !important;
  }

  .topbar .topbar-title {
    grid-area: title !important;
    min-width: 0 !important;
    margin: 0 !important;
  }

  .topbar-title .eyebrow {
    margin: 0 0 2px !important;
    font-size: 11px !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
  }

  .topbar-title h1 {
    display: block !important;
    width: auto !important;
    max-width: 100% !important;
    margin: 0 !important;
    font-size: 24px !important;
    line-height: 1.08 !important;
    letter-spacing: 0 !important;
    text-align: left !important;
    white-space: nowrap !important;
    writing-mode: horizontal-tb !important;
    word-break: keep-all !important;
    overflow: visible !important;
  }

  .topbar .site-logo {
    grid-area: logo !important;
    justify-self: end !important;
    width: 108px !important;
    height: 42px !important;
  }

  .topbar .top-actions {
    grid-area: actions !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 6px !important;
    min-width: 0 !important;
  }

  .topbar .top-actions a {
    min-height: 34px !important;
    padding: 0 12px !important;
    font-size: 13px !important;
  }

  .topbar .progress-box {
    grid-area: progress !important;
    justify-self: stretch !important;
    width: 120px !important;
    min-width: 0 !important;
    padding: 9px 10px !important;
  }

  .controls,
  .tabs,
  .status-line,
  .pal-grid {
    width: calc(100vw - 16px) !important;
    max-width: calc(100vw - 16px) !important;
  }

  .pal-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  .pal-card {
    display: flex !important;
    flex-direction: column !important;
    min-height: 188px !important;
    border-radius: 18px !important;
    overflow: hidden !important;
    contain: layout paint !important;
  }

  .pal-card::before {
    top: 9px !important;
    left: 10px !important;
    right: 10px !important;
    height: 6px !important;
  }

  .card-main {
    display: grid !important;
    grid-template-columns: 46px minmax(0, 1fr) !important;
    gap: 7px !important;
    width: auto !important;
    margin: 22px 6px 0 !important;
    padding: 8px 6px !important;
    border-radius: 13px !important;
    flex: 1 1 auto !important;
    overflow: hidden !important;
  }

  .pal-icon {
    grid-column: 1 !important;
    grid-row: 1 / span 4 !important;
    display: block !important;
    width: 44px !important;
    height: 44px !important;
    margin: 2px 0 0 !important;
    border-radius: 12px !important;
  }

  .pal-lines {
    grid-column: 2 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    min-width: 0 !important;
    padding-right: 24px !important;
    text-align: left !important;
  }

  .card-row,
  .name-row {
    display: block !important;
    min-width: 0 !important;
    width: 100% !important;
    margin: 0 !important;
  }

  .row-label,
  .pal-en {
    display: none !important;
  }

  .pal-name {
    display: block !important;
    max-width: 100% !important;
    margin: 0 !important;
    overflow: hidden !important;
    font-size: 13px !important;
    line-height: 1.2 !important;
    text-align: left !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .badges,
  .work-list,
  .location-text {
    display: block !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-align: left !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .badge,
  .work-pill {
    display: inline-flex !important;
    max-width: 100% !important;
    min-height: 18px !important;
    padding: 1px 5px !important;
    overflow: hidden !important;
    font-size: 9px !important;
    line-height: 1.4 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .badges .badge:not(:first-child),
  .work-list .work-pill:not(:first-child) {
    display: none !important;
  }

  .location-text {
    font-size: 9px !important;
    line-height: 1.35 !important;
  }

  .card-actions {
    display: block !important;
    position: static !important;
    width: auto !important;
    margin: 5px 6px 7px !important;
    padding: 0 !important;
  }

  .icon-button.favorite-button,
  .favorite-button {
    display: grid !important;
    position: absolute !important;
    top: 27px !important;
    right: 10px !important;
    z-index: 10 !important;
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    max-width: 24px !important;
    border-radius: 9px !important;
    font-size: 14px !important;
    line-height: 1 !important;
  }

  .mark-button {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    min-height: 26px !important;
    padding: 0 4px !important;
    border-radius: 10px !important;
    font-size: 10px !important;
    white-space: nowrap !important;
  }
}

/* v33 compact mobile pal cards */
@media (max-width: 560px) {
  .pal-grid {
    gap: 7px !important;
  }

  .pal-card {
    min-height: 174px !important;
    border-radius: 16px !important;
  }

  .pal-card::before {
    top: 8px !important;
    left: 9px !important;
    right: 9px !important;
    height: 5px !important;
  }

  .card-main {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 4px !important;
    width: auto !important;
    min-height: 0 !important;
    margin: 20px 6px 0 !important;
    padding: 8px 5px 7px !important;
    flex: 0 0 auto !important;
    text-align: center !important;
  }

  .pal-icon {
    display: block !important;
    flex: 0 0 auto !important;
    width: 46px !important;
    height: 46px !important;
    margin: 0 auto 2px !important;
    grid-column: auto !important;
    grid-row: auto !important;
  }

  .pal-lines {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 3px !important;
    width: 100% !important;
    min-width: 0 !important;
    padding: 0 2px !important;
    grid-column: auto !important;
    text-align: center !important;
  }

  .card-row,
  .name-row {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    text-align: center !important;
  }

  .pal-name {
    width: 100% !important;
    padding: 0 18px !important;
    font-size: 12px !important;
    line-height: 1.15 !important;
    text-align: center !important;
  }

  .badges,
  .work-list {
    display: flex !important;
    justify-content: center !important;
    width: 100% !important;
    text-align: center !important;
  }

  .badge,
  .work-pill {
    max-width: 100% !important;
    min-height: 17px !important;
    padding: 1px 5px !important;
    font-size: 9px !important;
    line-height: 1.25 !important;
  }

  .location-text {
    display: -webkit-box !important;
    width: 100% !important;
    min-height: 24px !important;
    max-height: 26px !important;
    overflow: hidden !important;
    color: rgba(19, 69, 67, .76) !important;
    font-size: 9px !important;
    line-height: 1.35 !important;
    text-align: center !important;
    text-overflow: clip !important;
    white-space: normal !important;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .card-actions {
    margin: auto 6px 7px !important;
  }

  .icon-button.favorite-button,
  .favorite-button {
    top: 25px !important;
    right: 9px !important;
    width: 23px !important;
    height: 23px !important;
    min-width: 23px !important;
    max-width: 23px !important;
    font-size: 13px !important;
  }

  .mark-button {
    min-height: 25px !important;
    font-size: 9px !important;
  }
}

/* v34 desktop action alignment and wrapped locations */
@media (min-width: 561px) {
  .pal-card {
    grid-template-columns: minmax(0, 1fr) 112px !important;
    min-height: 206px !important;
  }

  .card-main {
    align-self: stretch !important;
  }

  .card-actions {
    width: 96px !important;
    min-width: 96px !important;
    max-width: 96px !important;
    margin: 32px 14px 14px 0 !important;
  }

  .icon-button.favorite-button {
    width: 96px !important;
    height: 46px !important;
    min-width: 96px !important;
    max-width: 96px !important;
    border-radius: 14px !important;
    font-size: 25px !important;
  }

  .mark-button {
    width: 96px !important;
    min-width: 96px !important;
    max-width: 96px !important;
    min-height: 44px !important;
  }

  .location-text {
    display: block !important;
    max-height: none !important;
    overflow: visible !important;
    line-height: 1.45 !important;
    text-overflow: clip !important;
    white-space: normal !important;
    word-break: break-word !important;
  }

  .location-row {
    align-items: start !important;
  }
}

/* v35 square desktop favorite and two-column mobile cards */
@media (min-width: 561px) {
  .pal-card {
    grid-template-columns: minmax(0, 1fr) 96px !important;
  }

  .card-actions {
    width: 78px !important;
    min-width: 78px !important;
    max-width: 78px !important;
    align-items: center !important;
    margin: 32px 14px 14px 0 !important;
  }

  .icon-button.favorite-button {
    width: 58px !important;
    height: 58px !important;
    min-width: 58px !important;
    max-width: 58px !important;
    border-radius: 16px !important;
    font-size: 30px !important;
  }

  .mark-button {
    width: 78px !important;
    min-width: 78px !important;
    max-width: 78px !important;
    min-height: 44px !important;
  }
}

@media (max-width: 560px) {
  .pal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 9px !important;
  }

  .pal-card {
    min-height: 202px !important;
    border-radius: 18px !important;
  }

  .card-main {
    margin: 21px 7px 0 !important;
    padding: 9px 7px 8px !important;
    gap: 5px !important;
  }

  .pal-icon {
    width: 54px !important;
    height: 54px !important;
  }

  .pal-name {
    padding: 0 22px !important;
    font-size: 13px !important;
  }

  .badge,
  .work-pill {
    min-height: 19px !important;
    font-size: 10px !important;
  }

  .location-text {
    min-height: 30px !important;
    max-height: 32px !important;
    font-size: 10px !important;
    line-height: 1.45 !important;
  }

  .icon-button.favorite-button,
  .favorite-button {
    top: 26px !important;
    right: 11px !important;
    width: 25px !important;
    height: 25px !important;
    min-width: 25px !important;
    max-width: 25px !important;
    font-size: 14px !important;
  }

  .mark-button {
    min-height: 28px !important;
    font-size: 10px !important;
  }
}

/* v36 one-line desktop capture and larger mobile favorite */
@media (min-width: 561px) {
  .pal-card {
    grid-template-columns: minmax(0, 1fr) 112px !important;
  }

  .card-actions {
    width: 96px !important;
    min-width: 96px !important;
    max-width: 96px !important;
  }

  .icon-button.favorite-button {
    width: 58px !important;
    height: 58px !important;
    min-width: 58px !important;
    max-width: 58px !important;
  }

  .mark-button {
    width: 96px !important;
    min-width: 96px !important;
    max-width: 96px !important;
    white-space: nowrap !important;
    line-height: 1 !important;
    font-size: 13px !important;
  }
}

@media (max-width: 560px) {
  .icon-button.favorite-button,
  .favorite-button {
    top: 24px !important;
    right: 12px !important;
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    max-width: 30px !important;
    border-radius: 11px !important;
    font-size: 17px !important;
  }

  .pal-name {
    padding-right: 30px !important;
    padding-left: 30px !important;
  }
}

/* v37 larger mobile card text and favorite */
@media (max-width: 560px) {
  .pal-card {
    min-height: 218px !important;
  }

  .card-main {
    margin-top: 22px !important;
    padding: 10px 8px 9px !important;
    gap: 6px !important;
  }

  .pal-icon {
    width: 60px !important;
    height: 60px !important;
  }

  .pal-name {
    padding-right: 36px !important;
    padding-left: 36px !important;
    font-size: 15px !important;
    line-height: 1.18 !important;
  }

  .badge,
  .work-pill {
    min-height: 21px !important;
    padding: 2px 7px !important;
    font-size: 11px !important;
  }

  .location-text {
    min-height: 34px !important;
    max-height: 36px !important;
    font-size: 11px !important;
    line-height: 1.5 !important;
  }

  .icon-button.favorite-button,
  .favorite-button {
    top: 25px !important;
    right: 12px !important;
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    max-width: 34px !important;
    border-radius: 12px !important;
    font-size: 20px !important;
  }

  .mark-button {
    min-height: 30px !important;
    font-size: 11px !important;
  }
}

/* v38 larger mobile favorite and capture text */
@media (max-width: 560px) {
  .icon-button.favorite-button,
  .favorite-button {
    top: 24px !important;
    right: 12px !important;
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    max-width: 38px !important;
    border-radius: 13px !important;
    font-size: 23px !important;
  }

  .pal-name {
    padding-right: 40px !important;
    padding-left: 40px !important;
  }

  .mark-button {
    min-height: 34px !important;
    font-size: 13px !important;
    font-weight: 900 !important;
  }
}

/* v39 desktop glass nav and larger progress */
@media (min-width: 821px) {
  .topbar {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) 260px !important;
    grid-template-areas:
      "logo title progress"
      "logo actions progress" !important;
    align-items: center !important;
    gap: 8px 22px !important;
  }

  .topbar .site-logo {
    grid-area: logo !important;
    align-self: center !important;
  }

  .topbar .topbar-title {
    grid-area: title !important;
    margin: 0 !important;
  }

  .topbar .top-actions {
    grid-area: actions !important;
    justify-self: start !important;
    display: flex !important;
    gap: 10px !important;
  }

  .topbar .top-actions a {
    min-width: 84px !important;
    min-height: 42px !important;
    padding: 0 20px !important;
    color: #06413e !important;
    background:
      linear-gradient(145deg, rgba(255, 255, 255, .64), rgba(207, 246, 239, .48)) !important;
    border: 1px solid rgba(255, 255, 255, .82) !important;
    border-radius: 14px !important;
    box-shadow:
      0 8px 18px rgba(46, 139, 132, .12),
      inset 0 0 0 1px rgba(255, 255, 255, .5) !important;
    backdrop-filter: blur(8px);
  }

  .topbar .top-actions a.is-active {
    color: #fff !important;
    background: linear-gradient(145deg, rgba(16, 160, 143, .9), rgba(35, 188, 168, .74)) !important;
    border-color: rgba(255, 255, 255, .78) !important;
    box-shadow: 0 10px 22px rgba(11, 143, 123, .22) !important;
  }

  .topbar .progress-box {
    grid-area: progress !important;
    justify-self: end !important;
    width: 260px !important;
    min-width: 260px !important;
    padding: 18px 20px !important;
    background: rgba(255, 255, 255, .72) !important;
    border: 1px solid rgba(255, 255, 255, .84) !important;
    border-radius: 18px !important;
    box-shadow:
      0 12px 28px rgba(46, 139, 132, .14),
      inset 0 0 0 1px rgba(255, 255, 255, .55) !important;
    backdrop-filter: blur(10px);
  }

  .topbar .progress-box span {
    margin-bottom: 12px !important;
    font-size: 22px !important;
    line-height: 1 !important;
  }

  .topbar .progress-track {
    height: 12px !important;
  }
}

/* v40 centered desktop nav and stable breed header */
@media (min-width: 821px) {
  .topbar .top-actions a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    line-height: 1 !important;
  }

  .topbar .progress-placeholder {
    grid-area: progress !important;
    justify-self: end !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
}

@media (max-width: 820px) {
  .topbar .progress-placeholder {
    display: none !important;
  }
}

/* v41 stable viewport and consistent nav/progress footprint */
html {
  overflow-y: scroll !important;
  scrollbar-gutter: stable;
}

body {
  min-width: 0 !important;
}

.topbar .progress-placeholder {
  visibility: hidden !important;
  pointer-events: none !important;
}

.topbar .top-actions a {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  line-height: 1 !important;
}

@media (min-width: 821px) {
  .shell {
    width: min(1480px, calc(100vw - 48px)) !important;
    max-width: 1480px !important;
  }

  .topbar .top-actions a {
    width: 84px !important;
    min-width: 84px !important;
    height: 42px !important;
    min-height: 42px !important;
    padding: 0 !important;
  }
}

@media (max-width: 820px) {
  .topbar .progress-placeholder {
    display: block !important;
  }
}

@media (max-width: 560px) {
  .topbar .progress-placeholder {
    display: block !important;
    opacity: 0 !important;
  }

  .topbar .top-actions a {
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
  }
}

/* v42 mobile header spacing and 18183 title polish */
@media (max-width: 560px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr) 132px !important;
    column-gap: 8px !important;
  }

  .topbar .site-logo {
    width: 126px !important;
    max-width: 126px !important;
    justify-self: end !important;
    transform: translateX(2px) !important;
  }

  .topbar .site-logo img {
    width: 126px !important;
    max-width: 126px !important;
    height: auto !important;
  }

  .topbar .progress-box {
    width: 132px !important;
    min-width: 132px !important;
    max-width: 132px !important;
    padding: 11px 12px !important;
    justify-self: start !important;
    transform: translateX(-12px) !important;
  }

  .topbar .progress-box span {
    margin-bottom: 8px !important;
    font-size: 16px !important;
    font-weight: 900 !important;
    letter-spacing: 0 !important;
  }

  .topbar .progress-track {
    height: 9px !important;
  }

  .topbar-title h1 {
    font-size: 24px !important;
    line-height: 1.08 !important;
  }
}

@media (max-width: 380px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr) 124px !important;
  }

  .topbar .site-logo,
  .topbar .site-logo img {
    width: 118px !important;
    max-width: 118px !important;
  }

  .topbar .progress-box {
    width: 124px !important;
    min-width: 124px !important;
    max-width: 124px !important;
    transform: translateX(-8px) !important;
  }
}

/* v43 mobile header de-overlap and larger progress */
@media (max-width: 560px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr) 136px !important;
    grid-template-areas:
      "title logo"
      "actions progress" !important;
    row-gap: 14px !important;
    column-gap: 8px !important;
    align-items: start !important;
  }

  .topbar .site-logo {
    width: 136px !important;
    max-width: 136px !important;
    height: 64px !important;
    max-height: 64px !important;
    justify-self: end !important;
    align-self: start !important;
    transform: translate(4px, -8px) !important;
    overflow: visible !important;
  }

  .topbar .site-logo img {
    width: 136px !important;
    max-width: 136px !important;
    height: 64px !important;
    max-height: 64px !important;
    object-fit: contain !important;
    object-position: center !important;
  }

  .topbar .progress-box {
    width: 150px !important;
    min-width: 150px !important;
    max-width: 150px !important;
    min-height: 64px !important;
    padding: 13px 14px !important;
    justify-self: start !important;
    align-self: start !important;
    transform: translate(-24px, 4px) !important;
    z-index: 3 !important;
  }

  .topbar .progress-box span {
    margin-bottom: 9px !important;
    font-size: 17px !important;
    line-height: 1 !important;
    font-weight: 900 !important;
  }

  .topbar .progress-track {
    height: 10px !important;
  }
}

@media (max-width: 380px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr) 126px !important;
    row-gap: 12px !important;
  }

  .topbar .site-logo,
  .topbar .site-logo img {
    width: 126px !important;
    max-width: 126px !important;
    height: 60px !important;
    max-height: 60px !important;
  }

  .topbar .progress-box {
    width: 142px !important;
    min-width: 142px !important;
    max-width: 142px !important;
    min-height: 62px !important;
    transform: translate(-20px, 4px) !important;
  }
}

/* v44 mobile progress and logo in one row */
@media (max-width: 560px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr) 150px 112px !important;
    grid-template-areas:
      "title title title"
      "actions progress logo" !important;
    row-gap: 12px !important;
    column-gap: 8px !important;
    align-items: center !important;
  }

  .topbar .topbar-title {
    grid-area: title !important;
    min-width: 0 !important;
  }

  .topbar .top-actions {
    grid-area: actions !important;
    width: 100% !important;
    min-width: 0 !important;
    justify-self: start !important;
    align-self: center !important;
    gap: 6px !important;
  }

  .topbar .top-actions a {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    height: 36px !important;
    min-height: 36px !important;
    padding: 0 6px !important;
  }

  .topbar .progress-box {
    grid-area: progress !important;
    width: 150px !important;
    min-width: 150px !important;
    max-width: 150px !important;
    min-height: 66px !important;
    padding: 14px 14px !important;
    justify-self: center !important;
    align-self: center !important;
    transform: none !important;
    z-index: 2 !important;
  }

  .topbar .progress-box span {
    margin-bottom: 9px !important;
    font-size: 18px !important;
    line-height: 1 !important;
    font-weight: 900 !important;
  }

  .topbar .progress-track {
    height: 10px !important;
  }

  .topbar .site-logo {
    grid-area: logo !important;
    width: 112px !important;
    max-width: 112px !important;
    height: 58px !important;
    max-height: 58px !important;
    justify-self: end !important;
    align-self: center !important;
    transform: none !important;
    overflow: visible !important;
  }

  .topbar .site-logo img {
    width: 112px !important;
    max-width: 112px !important;
    height: 58px !important;
    max-height: 58px !important;
    object-fit: contain !important;
    object-position: center !important;
  }
}

@media (max-width: 380px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr) 142px 104px !important;
    column-gap: 6px !important;
  }

  .topbar .progress-box {
    width: 142px !important;
    min-width: 142px !important;
    max-width: 142px !important;
    min-height: 64px !important;
    padding: 13px 12px !important;
  }

  .topbar .progress-box span {
    font-size: 17px !important;
  }

  .topbar .site-logo,
  .topbar .site-logo img {
    width: 104px !important;
    max-width: 104px !important;
    height: 56px !important;
    max-height: 56px !important;
  }
}

/* v45 balanced glass controls for mobile and desktop progress */
@media (min-width: 821px) {
  .topbar .progress-box {
    background:
      linear-gradient(145deg, rgba(255, 255, 255, .72), rgba(211, 248, 241, .5)) !important;
    border: 1px solid rgba(255, 255, 255, .88) !important;
    box-shadow:
      0 14px 30px rgba(36, 128, 122, .16),
      inset 0 0 0 1px rgba(255, 255, 255, .58),
      inset 0 12px 24px rgba(255, 255, 255, .3) !important;
    backdrop-filter: blur(12px) saturate(1.12) !important;
  }

  .topbar .progress-track {
    background: rgba(229, 239, 235, .82) !important;
    box-shadow: inset 0 1px 2px rgba(26, 74, 72, .12) !important;
  }
}

@media (max-width: 560px) {
  .topbar {
    grid-template-columns: minmax(112px, 1fr) 136px 95px !important;
    grid-template-areas:
      "title title title"
      "actions progress logo" !important;
    column-gap: 6px !important;
    row-gap: 12px !important;
    align-items: center !important;
  }

  .topbar .top-actions {
    grid-area: actions !important;
    width: 100% !important;
    gap: 8px !important;
    align-self: stretch !important;
  }

  .topbar .top-actions a {
    flex: 1 1 0 !important;
    height: 62px !important;
    min-height: 62px !important;
    min-width: 0 !important;
    padding: 0 6px !important;
    border-radius: 16px !important;
    color: #06413e !important;
    font-size: 15px !important;
    font-weight: 900 !important;
    background:
      linear-gradient(145deg, rgba(255, 255, 255, .72), rgba(211, 248, 241, .5)) !important;
    border: 1px solid rgba(255, 255, 255, .88) !important;
    box-shadow:
      0 10px 20px rgba(36, 128, 122, .13),
      inset 0 0 0 1px rgba(255, 255, 255, .56),
      inset 0 10px 20px rgba(255, 255, 255, .28) !important;
    backdrop-filter: blur(10px) saturate(1.08) !important;
  }

  .topbar .top-actions a.is-active {
    color: #fff !important;
    background:
      linear-gradient(145deg, rgba(13, 155, 140, .92), rgba(43, 199, 179, .76)) !important;
    border-color: rgba(255, 255, 255, .82) !important;
    box-shadow:
      0 12px 22px rgba(10, 139, 122, .2),
      inset 0 0 0 1px rgba(255, 255, 255, .38) !important;
  }

  .topbar .progress-box {
    grid-area: progress !important;
    width: 136px !important;
    min-width: 136px !important;
    max-width: 136px !important;
    min-height: 62px !important;
    padding: 13px 13px !important;
    justify-self: center !important;
    align-self: stretch !important;
    transform: none !important;
    border-radius: 16px !important;
    background:
      linear-gradient(145deg, rgba(255, 255, 255, .74), rgba(211, 248, 241, .52)) !important;
    border: 1px solid rgba(255, 255, 255, .9) !important;
    box-shadow:
      0 10px 20px rgba(36, 128, 122, .13),
      inset 0 0 0 1px rgba(255, 255, 255, .56),
      inset 0 10px 20px rgba(255, 255, 255, .28) !important;
    backdrop-filter: blur(10px) saturate(1.08) !important;
  }

  .topbar .progress-box span {
    margin-bottom: 9px !important;
    font-size: 18px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
  }

  .topbar .progress-track {
    height: 10px !important;
    background: rgba(226, 237, 234, .86) !important;
    box-shadow: inset 0 1px 2px rgba(26, 74, 72, .12) !important;
  }

  .topbar .site-logo {
    grid-area: logo !important;
    width: 95px !important;
    max-width: 95px !important;
    height: 62px !important;
    max-height: 62px !important;
    justify-self: end !important;
    align-self: center !important;
    transform: none !important;
  }

  .topbar .site-logo img {
    width: 95px !important;
    max-width: 95px !important;
    height: 62px !important;
    max-height: 62px !important;
    object-fit: contain !important;
  }
}

@media (max-width: 380px) {
  .topbar {
    grid-template-columns: minmax(104px, 1fr) 132px 88px !important;
    column-gap: 6px !important;
  }

  .topbar .top-actions a {
    height: 60px !important;
    min-height: 60px !important;
    font-size: 14px !important;
  }

  .topbar .progress-box {
    width: 132px !important;
    min-width: 132px !important;
    max-width: 132px !important;
    min-height: 60px !important;
    padding: 12px 12px !important;
  }

  .topbar .progress-box span {
    font-size: 17px !important;
  }

  .topbar .site-logo,
  .topbar .site-logo img {
    width: 88px !important;
    max-width: 88px !important;
    height: 60px !important;
    max-height: 60px !important;
  }
}

/* v45 narrow mobile guard */
@media (max-width: 340px) {
  .topbar {
    grid-template-columns: minmax(90px, 1fr) 120px 78px !important;
    column-gap: 5px !important;
  }

  .topbar .top-actions {
    gap: 5px !important;
  }

  .topbar .top-actions a {
    height: 56px !important;
    min-height: 56px !important;
    padding: 0 4px !important;
    font-size: 13px !important;
  }

  .topbar .progress-box {
    width: 120px !important;
    min-width: 120px !important;
    max-width: 120px !important;
    min-height: 56px !important;
    padding: 11px 10px !important;
  }

  .topbar .progress-box span {
    margin-bottom: 8px !important;
    font-size: 16px !important;
  }

  .topbar .site-logo,
  .topbar .site-logo img {
    width: 78px !important;
    max-width: 78px !important;
    height: 56px !important;
    max-height: 56px !important;
  }
}

/* v47 mobile logo moved upward to center */
@media (max-width: 560px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr) 136px minmax(0, 1fr) !important;
    grid-template-areas:
      "title logo logo"
      "actions progress progress" !important;
    column-gap: 8px !important;
    row-gap: 10px !important;
    align-items: center !important;
  }

  .topbar .site-logo {
    grid-area: logo !important;
    width: 108px !important;
    max-width: 108px !important;
    height: 54px !important;
    max-height: 54px !important;
    justify-self: center !important;
    align-self: start !important;
    transform: translate(-8px, -8px) !important;
    z-index: 4 !important;
  }

  .topbar .site-logo img {
    width: 108px !important;
    max-width: 108px !important;
    height: 54px !important;
    max-height: 54px !important;
    object-fit: contain !important;
    object-position: center !important;
  }

  .topbar .top-actions {
    grid-area: actions !important;
    align-self: stretch !important;
  }

  .topbar .progress-box {
    grid-area: progress !important;
    justify-self: start !important;
    transform: none !important;
  }
}

@media (max-width: 380px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr) 128px minmax(0, 1fr) !important;
  }

  .topbar .site-logo,
  .topbar .site-logo img {
    width: 100px !important;
    max-width: 100px !important;
    height: 50px !important;
    max-height: 50px !important;
  }

  .topbar .site-logo {
    transform: translate(-6px, -7px) !important;
  }
}

/* v48 mobile logo pinned to upper-right blank area */
@media (max-width: 560px) {
  .topbar {
    position: relative !important;
    grid-template-columns: minmax(0, 1fr) 136px !important;
    grid-template-areas:
      "title title"
      "actions progress" !important;
    column-gap: 8px !important;
    row-gap: 10px !important;
    align-items: center !important;
    min-height: 132px !important;
  }

  .topbar .topbar-title {
    grid-area: title !important;
    padding-right: 112px !important;
    min-width: 0 !important;
  }

  .topbar .site-logo {
    position: absolute !important;
    top: 18px !important;
    right: 8px !important;
    grid-area: unset !important;
    width: 100px !important;
    max-width: 100px !important;
    height: 56px !important;
    max-height: 56px !important;
    justify-self: auto !important;
    align-self: auto !important;
    transform: none !important;
    z-index: 5 !important;
  }

  .topbar .site-logo img {
    width: 100px !important;
    max-width: 100px !important;
    height: 56px !important;
    max-height: 56px !important;
    object-fit: contain !important;
    object-position: center !important;
  }

  .topbar .top-actions {
    grid-area: actions !important;
    align-self: stretch !important;
  }

  .topbar .progress-box {
    grid-area: progress !important;
    justify-self: stretch !important;
    width: 136px !important;
    min-width: 136px !important;
    max-width: 136px !important;
    transform: none !important;
  }
}

@media (max-width: 380px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr) 128px !important;
  }

  .topbar .topbar-title {
    padding-right: 100px !important;
  }

  .topbar .site-logo,
  .topbar .site-logo img {
    width: 92px !important;
    max-width: 92px !important;
    height: 52px !important;
    max-height: 52px !important;
  }

  .topbar .site-logo {
    top: 18px !important;
    right: 6px !important;
  }

  .topbar .progress-box {
    width: 128px !important;
    min-width: 128px !important;
    max-width: 128px !important;
  }
}

/* v49 mobile compact tabs, longer progress, higher logo */
@media (max-width: 560px) {
  .topbar {
    position: relative !important;
    grid-template-columns: 118px minmax(0, 1fr) !important;
    grid-template-areas:
      "title title"
      "actions progress" !important;
    column-gap: 8px !important;
    row-gap: 12px !important;
    min-height: 150px !important;
    padding-top: 16px !important;
  }

  .topbar .topbar-title {
    grid-area: title !important;
    padding-right: 132px !important;
    min-height: 58px !important;
  }

  .topbar .site-logo {
    position: absolute !important;
    top: -4px !important;
    right: 6px !important;
    grid-area: unset !important;
    width: 118px !important;
    max-width: 118px !important;
    height: 60px !important;
    max-height: 60px !important;
    transform: none !important;
    z-index: 6 !important;
    pointer-events: auto !important;
  }

  .topbar .site-logo img {
    width: 118px !important;
    max-width: 118px !important;
    height: 60px !important;
    max-height: 60px !important;
    object-fit: contain !important;
    object-position: center !important;
  }

  .topbar .top-actions {
    grid-area: actions !important;
    width: 118px !important;
    max-width: 118px !important;
    gap: 6px !important;
    align-self: stretch !important;
  }

  .topbar .top-actions a {
    height: 56px !important;
    min-height: 56px !important;
    padding: 0 4px !important;
    font-size: 14px !important;
    border-radius: 15px !important;
  }

  .topbar .progress-box {
    grid-area: progress !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: 56px !important;
    padding: 12px 14px !important;
    justify-self: stretch !important;
    align-self: stretch !important;
    transform: none !important;
    border-radius: 15px !important;
  }

  .topbar .progress-box span {
    margin-bottom: 8px !important;
    font-size: 18px !important;
    line-height: 1 !important;
  }

  .topbar .progress-track {
    height: 10px !important;
  }
}

@media (max-width: 380px) {
  .topbar {
    grid-template-columns: 108px minmax(0, 1fr) !important;
    column-gap: 7px !important;
    min-height: 146px !important;
  }

  .topbar .topbar-title {
    padding-right: 118px !important;
  }

  .topbar .site-logo,
  .topbar .site-logo img {
    width: 108px !important;
    max-width: 108px !important;
    height: 56px !important;
    max-height: 56px !important;
  }

  .topbar .top-actions {
    width: 108px !important;
    max-width: 108px !important;
    gap: 5px !important;
  }

  .topbar .top-actions a {
    height: 54px !important;
    min-height: 54px !important;
    font-size: 13px !important;
  }

  .topbar .progress-box {
    min-height: 54px !important;
    padding: 11px 12px !important;
  }
}

/* v50 mobile logo larger like reference, progress full width */
@media (max-width: 560px) {
  .topbar {
    grid-template-columns: 118px minmax(0, 1fr) !important;
    grid-template-areas:
      "title title"
      "actions progress" !important;
    min-height: 158px !important;
    padding-top: 18px !important;
    row-gap: 14px !important;
    column-gap: 8px !important;
  }

  .topbar .topbar-title {
    grid-area: title !important;
    min-height: 64px !important;
    padding-right: 158px !important;
  }

  .topbar .site-logo {
    position: absolute !important;
    top: 6px !important;
    right: 2px !important;
    width: 148px !important;
    max-width: 148px !important;
    height: 72px !important;
    max-height: 72px !important;
    transform: none !important;
    z-index: 6 !important;
  }

  .topbar .site-logo img {
    width: 148px !important;
    max-width: 148px !important;
    height: 72px !important;
    max-height: 72px !important;
    object-fit: contain !important;
    object-position: center !important;
  }

  .topbar .top-actions {
    grid-area: actions !important;
    width: 118px !important;
    max-width: 118px !important;
    gap: 6px !important;
  }

  .topbar .top-actions a {
    height: 58px !important;
    min-height: 58px !important;
    font-size: 14px !important;
  }

  .topbar .progress-box {
    grid-area: progress !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: 58px !important;
    padding: 12px 16px !important;
    justify-self: stretch !important;
    align-self: stretch !important;
    transform: none !important;
  }

  .topbar .progress-box span {
    margin-bottom: 8px !important;
    font-size: 19px !important;
  }
}

@media (max-width: 380px) {
  .topbar {
    grid-template-columns: 108px minmax(0, 1fr) !important;
    min-height: 154px !important;
  }

  .topbar .topbar-title {
    padding-right: 138px !important;
  }

  .topbar .site-logo,
  .topbar .site-logo img {
    width: 132px !important;
    max-width: 132px !important;
    height: 66px !important;
    max-height: 66px !important;
  }

  .topbar .top-actions {
    width: 108px !important;
    max-width: 108px !important;
  }
}

/* v51 mobile bottom row proportions like reference */
@media (max-width: 560px) {
  .topbar {
    grid-template-columns: 110px minmax(0, 1fr) !important;
    grid-template-areas:
      "title title"
      "actions progress" !important;
    column-gap: 8px !important;
  }

  .topbar .top-actions {
    grid-area: actions !important;
    width: 110px !important;
    max-width: 110px !important;
    gap: 6px !important;
  }

  .topbar .top-actions a {
    width: 52px !important;
    min-width: 52px !important;
    flex: 0 0 52px !important;
    height: 58px !important;
    min-height: 58px !important;
    padding: 0 !important;
    font-size: 14px !important;
    border-radius: 15px !important;
  }

  .topbar .progress-box {
    grid-area: progress !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 58px !important;
    min-height: 58px !important;
    padding: 12px 16px !important;
    justify-self: stretch !important;
    align-self: stretch !important;
  }

  .topbar .progress-box span {
    display: block !important;
    margin: 0 0 8px !important;
    font-size: 19px !important;
    line-height: 1 !important;
    text-align: left !important;
  }

  .topbar .progress-track {
    width: 100% !important;
    height: 10px !important;
  }
}

@media (max-width: 380px) {
  .topbar {
    grid-template-columns: 102px minmax(0, 1fr) !important;
    column-gap: 7px !important;
  }

  .topbar .top-actions {
    width: 102px !important;
    max-width: 102px !important;
    gap: 5px !important;
  }

  .topbar .top-actions a {
    width: 48px !important;
    min-width: 48px !important;
    flex-basis: 48px !important;
    font-size: 13px !important;
  }
}

/* v52 mobile bottom row: two compact buttons, gap, progress on right */
@media (max-width: 560px) {
  .topbar {
    grid-template-columns: 176px minmax(0, 1fr) !important;
    grid-template-areas:
      "title title"
      "actions progress" !important;
    column-gap: 24px !important;
    row-gap: 14px !important;
  }

  .topbar .top-actions {
    grid-area: actions !important;
    width: 176px !important;
    max-width: 176px !important;
    gap: 14px !important;
    justify-self: start !important;
  }

  .topbar .top-actions a {
    width: 81px !important;
    min-width: 81px !important;
    flex: 0 0 81px !important;
    height: 58px !important;
    min-height: 58px !important;
    padding: 0 !important;
    font-size: 15px !important;
    border-radius: 15px !important;
  }

  .topbar .progress-box {
    grid-area: progress !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 58px !important;
    min-height: 58px !important;
    padding: 12px 16px !important;
    justify-self: stretch !important;
    align-self: stretch !important;
    transform: none !important;
  }

  .topbar .progress-box span {
    margin: 0 0 8px !important;
    font-size: 19px !important;
    line-height: 1 !important;
    text-align: left !important;
  }

  .topbar .progress-track {
    width: 100% !important;
    height: 10px !important;
  }
}

@media (max-width: 380px) {
  .topbar {
    grid-template-columns: 154px minmax(0, 1fr) !important;
    column-gap: 16px !important;
  }

  .topbar .top-actions {
    width: 154px !important;
    max-width: 154px !important;
    gap: 10px !important;
  }

  .topbar .top-actions a {
    width: 72px !important;
    min-width: 72px !important;
    flex-basis: 72px !important;
    font-size: 14px !important;
  }
}

@media (max-width: 340px) {
  .topbar {
    grid-template-columns: 140px minmax(0, 1fr) !important;
    column-gap: 12px !important;
  }

  .topbar .top-actions {
    width: 140px !important;
    max-width: 140px !important;
    gap: 8px !important;
  }

  .topbar .top-actions a {
    width: 66px !important;
    min-width: 66px !important;
    flex-basis: 66px !important;
    font-size: 13px !important;
  }
}

/* v53 larger mobile card favorite and detail text */
@media (max-width: 560px) {
  .pal-card {
    min-height: 252px !important;
  }

  .icon-button.favorite-button,
  .favorite-button {
    top: 24px !important;
    right: 12px !important;
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    max-width: 42px !important;
    min-height: 42px !important;
    border-radius: 14px !important;
    font-size: 25px !important;
    line-height: 1 !important;
    z-index: 8 !important;
  }

  .work-list {
    gap: 4px !important;
  }

  .work-pill {
    padding: 2px 7px !important;
    font-size: 11px !important;
    line-height: 1.35 !important;
    font-weight: 800 !important;
  }

  .location-text {
    max-height: none !important;
    font-size: 11.5px !important;
    line-height: 1.35 !important;
    font-weight: 800 !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    -webkit-line-clamp: unset !important;
  }

  .location-row {
    margin-top: 3px !important;
  }
}

@media (max-width: 380px) {
  .icon-button.favorite-button,
  .favorite-button {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    min-height: 40px !important;
    font-size: 24px !important;
  }

  .work-pill {
    font-size: 10.5px !important;
  }

  .location-text {
    font-size: 11px !important;
  }
}
