:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #e8e8e8;
  color: #111;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  min-height: 100dvh;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  min-height: 100vh;
  min-height: 100dvh;
}

button,
input,
label {
  font: inherit;
}

button,
.file-button {
  min-height: 36px;
  border: 1px solid #24292f;
  border-radius: 6px;
  background: #111;
  color: #fff;
  padding: 0 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

button:hover,
.file-button:hover {
  background: #3a3f44;
}

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

.secondary-button:hover {
  background: #eeeeee;
}

input {
  min-height: 34px;
  border: 1px solid #c8c8c8;
  border-radius: 6px;
  background: #fff;
  color: #202124;
  padding: 0 12px;
  width: 100%;
}

.contact-type-group {
  margin: 0;
  padding: 0;
  border: 0;
  display: grid;
  gap: 8px;
}

.contact-type-group legend {
  font-size: 0.8rem;
  font-weight: 900;
  color: #333;
  margin-bottom: 2px;
}

.contact-type-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: #222;
}

.contact-type-group input[type='radio'] {
  width: 16px;
  height: 16px;
  min-height: 16px;
  margin: 0;
  accent-color: #111;
}

.app-shell {
  width: 100%;
  margin: 0;
  padding: 0 10% 40px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: stretch;
  padding: 18px 22px;
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 5;
  border-bottom: 4px solid #111;
  box-shadow: 0 2px 10px rgb(0 0 0 / 8%);
}

h1 {
  margin: 0 0 6px;
  font-size: clamp(1.45rem, 2.7vw, 2.25rem);
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
}

p {
  margin: 0;
  color: #5d5b55;
}

.topbar-main {
  display: grid;
  gap: 10px;
}

.title-row {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  min-width: 0;
}

.title-with-art {
  display: flex;
  gap: 0;
  align-items: center;
  min-width: 0;
  flex: 1 1 auto;
}

.album-pack-image {
  display: none !important;
  width: 0;
  height: 0;
  object-fit: contain;
  flex: 0 0 auto;
}

.session-box {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex: 0 0 auto;
  flex-wrap: wrap;
  font-weight: 700;
}

.language-switch {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
}

.lang-button {
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 50%;
  font-size: 1rem;
  background: #fff;
  color: #111;
  border-color: #c8c8c8;
}

.lang-button img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.sl-button img {
  object-position: 50% 50%;
  transform: scale(1.08);
}

.share-button {
  font-size: 1rem;
  font-weight: 900;
}

.share-button span {
  display: block;
  line-height: 1;
}

.summary-toggle {
  width: 34px;
  height: 34px;
  min-height: 34px;
  min-width: 34px;
  aspect-ratio: 1 / 1;
  padding: 0;
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 900;
  flex: 0 0 auto;
}

.summary-toggle span {
  display: block;
  line-height: 1;
}

.find-matches-button {
  width: 100%;
  min-height: 34px;
  padding: 0 16px;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 8px;
  border: 1px solid #b42318;
  background: #b42318;
  color: #fff;
}

.find-matches-button:hover {
  background: #8f1a13;
  border-color: #8f1a13;
}

.lang-button.active {
  background: #111;
  color: #fff;
  border-color: #111;
  padding: 4px;
  box-shadow: none;
}

.lang-button.active img {
  border-radius: 50%;
  background: #fff;
  width: 100%;
  height: 100%;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
}

.user-avatar {
  width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid #111;
  background: #111;
  color: #fff;
  font-weight: 900;
  flex: 0 0 auto;
}

.user-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 6;
  padding: 8px;
  border: 1px solid #d1d1d1;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 24px rgb(0 0 0 / 12%);
}

.user-menu[hidden] {
  display: none !important;
}

.user-meta {
  text-align: right;
  display: grid;
  gap: 1px;
  line-height: 1.05;
}

.back-button {
  width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid #111;
  background: #111;
  color: #fff;
  font-size: 1rem;
  font-weight: 900;
  flex: 0 0 auto;
}

.back-button:hover {
  background: #333;
}

.current-user {
  font-weight: 900;
}

.current-user-status {
  max-width: 320px;
  color: #4f4a43;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}


.landing {
  flex: 1 1 auto;
  min-height: calc(100vh - 140px);
  position: relative;
  display: grid;
  grid-template-columns: 50% 50%;
  gap: 28px;
  align-items: center;
  transform: translateY(-20px);
  padding: 34px;
  background:
    linear-gradient(135deg, rgb(255 255 255 / 92%), rgb(255 255 255 / 82%)),
    linear-gradient(120deg, #d92b2b 0 32%, #1772b8 32% 68%, #2ea44f 68% 100%);
  border-bottom: 1px solid #d1d1d1;
  overflow: hidden;
}

@media (min-width: 761px) {
  .landing-panel {
    order: 1;
  }

  .landing-art {
    order: 2;
  }
}

.tracker {
  display: block;
  padding: 0 0 24px;
}

.summary,
.status,
.checklist-shell {
  width: 100%;
}

.landing::before {
  content: none;
}

.landing-art {
  position: relative;
  min-height: 210px;
  width: 100%;
}

.color-tile {
  position: absolute;
  border-radius: 18px;
  box-shadow: 0 18px 45px rgb(0 0 0 / 15%);
}

.tile-red {
  width: 220px;
  height: 150px;
  left: 8%;
  top: 16%;
  background: #d92b2b;
  transform: rotate(-8deg);
}

.tile-blue {
  width: 250px;
  height: 160px;
  left: 28%;
  top: 24%;
  background: #1772b8;
  transform: rotate(6deg);
}

.tile-green {
  width: 190px;
  height: 125px;
  left: 18%;
  bottom: 10%;
  background: #2ea44f;
  transform: rotate(4deg);
}

.landing-panel {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 18px;
  justify-items: start;
  width: 100%;
  max-width: 100%;
}

.landing-kicker {
  color: #1266b0;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.landing-panel h2 {
  margin: 0;
  max-width: 100%;
  font-size: clamp(1.7rem, 4.6vw, 3.2rem);
  line-height: 0.95;
  letter-spacing: 0;
  text-transform: uppercase;
  white-space: normal;
  overflow-wrap: anywhere;
}

.album-button {
  min-height: 64px;
  padding: 0 32px;
  font-size: clamp(1rem, 3vw, 1.35rem);
  font-weight: 900;
  text-transform: uppercase;
}

.public-search {
  width: min(100%, 380px);
  display: grid;
  gap: 8px;
  padding-top: 8px;
}

.public-search label {
  font-weight: 900;
  color: #333;
  white-space: nowrap;
}

.public-search .inline-input {
  display: flex;
  gap: 8px;
  align-items: center;
}

.public-search .inline-input input {
  flex: 1 1 auto;
  min-width: 0;
}

.tracker {
  display: block;
}

.summary-toggle:hover {
  background: #333;
}

.summary-toggle[hidden] {
  display: none !important;
}

.topbar .summary {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  margin: 0;
  background: #111;
  border: 1px solid #111;
}

.summary-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: stretch;
  gap: 10px;
}

.summary div,
.summary-card {
  background: #fdfdfd;
  padding: 8px 16px;
}

.summary span,
.summary-card span {
  display: block;
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1.05;
}

.summary small,
.summary-card small {
  color: #65615a;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
  font-size: 0.8rem;
}

.summary-button {
  min-height: auto;
  border: 2px solid #111;
  border-radius: 10px;
  color: #111;
  cursor: pointer;
  display: block;
  width: 100%;
  text-align: left;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 75%);
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
  touch-action: manipulation;
}

.summary-button:hover,
.summary-button.active {
  background: #fff5cf;
  border-color: #000;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 65%), 0 0 0 2px rgb(0 0 0 / 8%);
  transform: translateY(-1px);
}

.summary-button:disabled {
  cursor: default;
}

.summary-button:disabled:hover {
  background: #fdfdfd;
}

.summary-button.active span {
  color: #b67a00;
}

.topbar .summary.is-collapsed {
  display: none;
}

.percentage-card {
  background:
    linear-gradient(90deg, rgb(25 135 84 / 14%), #fdfdfd 52%),
    #fdfdfd;
}

.percentage-card span {
  color: #198754;
}

.missing-card:hover {
  background: #ffe3e3;
  border-color: #7f1d1d;
}

.missing-card:hover span {
  color: #b42318;
}

.missing-card:hover small {
  color: #8a1f14;
}

.missing-card {
  cursor: pointer;
}

.missing-card.active {
  background: #ffe3e3;
  border-color: #7f1d1d;
}

.missing-card.active span {
  color: #b42318;
}

.missing-card.active small {
  color: #8a1f14;
}

.missing-card:disabled {
  cursor: default;
}

.status {
  min-height: 24px;
  margin-bottom: 10px;
  color: #665200;
  font-weight: 700;
}

.checklist-shell {
  background: #fff;
  border: 1px solid #d1d1d1;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgb(0 0 0 / 8%);
}

.checklist-filter {
  display: grid;
  grid-template-columns: 120px minmax(260px, 1.2fr) minmax(180px, 220px) minmax(360px, 1fr);
  gap: 8px;
  align-items: center;
  width: 100%;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid #d1d1d1;
  border-radius: 8px;
}

.checklist-filter label {
  font-weight: 900;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
}

.search-wrap {
  position: relative;
  width: 100%;
}

.search-wrap input {
  padding-right: 34px;
}

.clear-search-button {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  min-height: 22px;
  padding: 0;
  border-radius: 50%;
  font-size: 0.75rem;
  line-height: 1;
}

.filter-mode-switch {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.filter-mode-button {
  width: 100%;
  max-width: 100%;
  min-height: 34px;
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  box-sizing: border-box;
}

.filter-mode-button.active {
  background: #111;
  color: #fff;
  border-color: #111;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 20%);
}

body.read-only-view .filter-mode-switch {
  grid-column: 3 / 5;
}

.checklist-head {
  display: grid;
  grid-template-columns: minmax(240px, 300px) 22px minmax(0, 1fr);
  gap: 8px;
  padding: 10px 12px;
  background: #111;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sections {
  width: 100%;
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.section-row {
  display: grid;
  grid-template-columns: minmax(240px, 300px) 22px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 3px 12px;
  border-bottom: 1px solid #e6e6e6;
}

.section-row.read-only {
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
}

.section-row.read-only .section-actions {
  display: none !important;
}

.section-row:nth-child(even) {
  background: #f8f8f8;
}

.section-row.saved-flash {
  animation: saved-flash 0.5s ease;
}

@keyframes saved-flash {
  0% {
    box-shadow: inset 0 0 0 2px #2ea44f;
  }
  100% {
    box-shadow: inset 0 0 0 0 transparent;
  }
}

.section-title {
  display: flex;
  gap: 7px;
  align-items: center;
  min-width: 0;
  flex-wrap: wrap;
}

.section-actions {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.section-actions[hidden] {
  display: none !important;
}

.country-flag {
  width: 24px;
  height: 18px;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgb(0 0 0 / 18%);
  flex: 0 0 auto;
}

.brand-badge {
  width: 24px;
  height: 18px;
  border-radius: 3px;
  object-fit: cover;
  flex: 0 0 auto;
  box-shadow: 0 0 0 1px rgb(0 0 0 / 18%);
}

.section-code {
  width: 42px;
  border-radius: 4px;
  background: #1266b0;
  color: #fff;
  padding: 4px 0;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 900;
}

.section-name {
  overflow-wrap: anywhere;
  font-size: 0.86rem;
  font-weight: 700;
}

.section-progress {
  margin-left: 0;
  min-width: 54px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 900;
  text-align: center;
}

.section-edit-button {
  width: auto;
  height: auto;
  min-height: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #111;
  border: 0;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
  align-self: center;
}

.section-edit-button:hover {
  background: transparent;
  color: #0b4272;
}

.section-menu {
  position: fixed;
  z-index: 20;
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid #d1d1d1;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 24px rgb(0 0 0 / 12%);
}

.section-menu.drop-up {
  /* position handled in JS */
}

.section-menu button {
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid #d1d1d1;
  border-radius: 6px;
  background: #fff;
  color: #111;
  font-weight: 800;
  text-align: left;
  white-space: nowrap;
}

.section-menu button:hover {
  background: #f2f2f2;
}

.sticker-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--sticker-col-width, 64px), 1fr));
  gap: 5px;
  width: 100%;
  justify-content: start;
  min-width: 0;
}

.sticker-button {
  width: 100%;
  min-width: 0;
  max-width: none;
  height: 28px;
  min-height: 28px;
  padding: 0 4px;
  border-radius: 5px;
  background: #ffffff;
  color: #555;
  border-color: #cfcfcf;
  font-size: 0.72rem;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  appearance: none;
}

.sticker-button.have {
  background: #198754;
  color: #fff;
  border-color: #198754;
}

.sticker-button.duplicate {
  background: #f2b705;
  color: #111;
  border-color: #d39b00;
}

.sticker-button:hover {
  background: #222;
  color: #fff;
}

.sticker-button:focus,
.sticker-button:active {
  background: inherit;
  color: inherit;
}

.sticker-button:focus-visible {
  outline: 2px solid #111;
  outline-offset: 1px;
}

.sticker-button:disabled {
  cursor: default;
  opacity: 1;
}

.sticker-button:disabled:hover {
  background: #ffffff;
  color: #555;
}

.sticker-button.have:disabled:hover {
  background: #198754;
  color: #fff;
}

.sticker-button.duplicate:disabled:hover {
  background: #f2b705;
  color: #111;
}

.sticker-button.duplicate:hover {
  background: #b67a00;
}

.sticker-button.read-only {
  cursor: default;
}

.sticker-button.read-only,
.sticker-button.read-only:hover,
.sticker-button.read-only:focus,
.sticker-button.read-only:active {
  background: #ffffff;
  color: #555;
  border-color: #cfcfcf;
}

.sticker-button.read-only.have,
.sticker-button.read-only.have:hover,
.sticker-button.read-only.have:focus,
.sticker-button.read-only.have:active {
  background: #198754;
  color: #fff;
  border-color: #198754;
}

.sticker-button.read-only.duplicate,
.sticker-button.read-only.duplicate:hover,
.sticker-button.read-only.duplicate:focus,
.sticker-button.read-only.duplicate:active {
  background: #f2b705;
  color: #111;
  border-color: #d39b00;
}

.sticker-button.read-only:focus,
.sticker-button.read-only:active {
  background: inherit;
  color: inherit;
}

.sticker-tooltip {
  position: fixed;
  z-index: 60;
  max-width: min(320px, 42vw);
  padding: 8px 12px;
  border: 1px solid #111;
  border-radius: 999px 8px 8px 999px;
  background: #111;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.01em;
  box-shadow: 0 10px 24px rgb(0 0 0 / 20%);
  pointer-events: none;
  white-space: normal;
}

.sticker-tooltip::after {
  content: '';
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 6px solid #111;
}

.empty {
  padding: 32px;
  text-align: center;
  color: #65615a;
}

.auth-modal {
  width: min(420px, calc(100% - 32px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: 0 24px 70px rgb(0 0 0 / 28%);
}

.auth-modal::backdrop {
  background: rgb(0 0 0 / 50%);
}

.matches-modal {
  width: min(980px, calc(100% - 24px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: 0 24px 70px rgb(0 0 0 / 28%);
}

.matches-modal::backdrop {
  background: rgb(0 0 0 / 50%);
}

.matches-form {
  display: grid;
  gap: 14px;
  padding: 24px;
  background: #fff;
  position: relative;
}

.matches-form h2 {
  margin: 0;
  font-size: 1.35rem;
}

.matches-help {
  color: #665f56;
  max-width: 62ch;
}

.matches-toolbar {
  display: grid;
  grid-template-columns: 120px minmax(180px, 240px) auto;
  gap: 10px;
  align-items: center;
}

.matches-toolbar label {
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.matches-toolbar select,
.matches-toolbar button {
  min-height: 40px;
}

.matches-status {
  min-height: 22px;
  font-weight: 800;
  color: #0b4272;
}

.matches-list-view,
.matches-detail-view {
  display: grid;
  gap: 12px;
}

.matches-table-wrap {
  overflow: auto;
  border: 1px solid #d1d1d1;
  border-radius: 8px;
}

.matches-table {
  width: 100%;
  border-collapse: collapse;
}

.matches-table th,
.matches-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e6e6e6;
  text-align: left;
  vertical-align: top;
}

.matches-table th {
  background: #111;
  color: #fff;
  position: sticky;
  top: 0;
}

.matches-table tbody tr:nth-child(even) {
  background: #fafafa;
}

.matches-row {
  cursor: pointer;
}

.matches-row:hover,
.matches-row:focus-visible {
  background: #eef5ff;
  outline: none;
}

.matches-table td:last-child {
  white-space: normal;
}

.matches-back-button {
  justify-self: start;
  min-height: 34px;
  font-weight: 800;
}

.matches-detail-card {
  border: 1px solid #d1d1d1;
  border-radius: 12px;
  background: linear-gradient(180deg, #fafafa 0%, #f3f5f7 100%);
  padding: 18px;
  display: grid;
  gap: 14px;
}

.matches-detail-card h3 {
  margin: 0;
  font-size: 1.2rem;
}

.matches-detail-meta {
  display: grid;
  gap: 12px;
  margin: 0;
}

.matches-detail-meta div {
  display: grid;
  gap: 4px;
}

.matches-detail-meta dt {
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5c5b57;
}

.matches-detail-meta dd {
  margin: 0;
  font-weight: 700;
  color: #111;
}

.matches-code-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.matches-code-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.03em;
}

.auth-form {
  display: grid;
  gap: 10px;
  padding: 22px;
  background: #fff;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 0;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 900;
}

.auth-form h2 {
  margin: 0;
  font-size: 1.6rem;
  line-height: 1;
}

.auth-form label {
  font-weight: 800;
}

.warning {
  padding: 12px;
  border-radius: 6px;
  background: #fff3cd;
  color: #5f4700;
  font-weight: 700;
}

.warning-shake {
  animation: warning-shake 0.45s ease-in-out 0s 2;
}

.field-help {
  margin-top: -4px;
  font-size: 0.88rem;
  line-height: 1.35;
  color: #6b675f;
}

@keyframes warning-shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-3px);
  }
  50% {
    transform: translateX(3px);
  }
  75% {
    transform: translateX(-2px);
  }
}

.auth-message {
  min-height: 22px;
  color: #9b1c1c;
  font-weight: 800;
}

.link-button {
  border: 0;
  background: transparent;
  color: #1266b0;
  justify-self: center;
  min-height: auto;
  padding: 6px;
  text-decoration: underline;
}

.link-button:hover {
  background: transparent;
  color: #0b4272;
}

@media (max-width: 1280px) {
  .app-shell {
    padding-left: 6%;
    padding-right: 6%;
  }

  .checklist-filter {
    grid-template-columns: 100px minmax(220px, 1fr) minmax(170px, 210px);
  }

  .filter-mode-switch,
  body.read-only-view .filter-mode-switch {
    grid-column: 2 / -1;
  }

  .checklist-head,
  .section-row {
    grid-template-columns: minmax(220px, 280px) 22px minmax(0, 1fr);
  }

  .section-row.read-only {
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  }
}

@media (max-width: 1080px) {
  .app-shell {
    padding-left: 4%;
    padding-right: 4%;
  }

  .checklist-head {
    display: none;
  }

  .summary-row {
    grid-template-columns: 1fr;
  }

  .summary-toggle {
    width: 32px;
    height: 32px;
    min-height: 32px;
    min-width: 32px;
    aspect-ratio: 1 / 1;
    flex: 0 0 32px;
  }

  .section-row,
  .section-row.read-only {
    position: relative;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 12px;
  }

  .section-title {
    padding-right: 96px;
  }

  .section-row.read-only .section-title {
    padding-right: 70px;
  }

  .section-actions {
    position: absolute;
    top: 12px;
    right: 14px;
    z-index: 2;
    justify-content: flex-end;
  }

  .section-progress {
    position: absolute;
    right: 44px;
    top: 12px;
    margin-left: 0;
  }

  .section-row.read-only .section-progress {
    right: 14px;
  }

  .sticker-list {
    grid-template-columns: repeat(auto-fill, minmax(var(--sticker-col-width, 64px), 1fr));
  }
}

@media (max-width: 760px) {
  .app-shell {
    padding: 0 12px 32px;
  }

  .topbar {
    position: sticky;
    top: 0;
    display: grid;
    grid-template-columns: 1fr;
    padding: 12px;
    z-index: 20;
  }

  body {
    padding-top: 0;
  }

  .title-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: start;
  }

  .topbar h1 {
    font-size: clamp(1rem, 4.2vw, 1.18rem);
    line-height: 1.05;
  }

  .title-with-art {
    gap: 8px;
  }

  .album-pack-image {
    width: 0;
    height: 0;
  }

  .session-box {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: nowrap;
  }

  .language-switch {
    flex-wrap: nowrap;
  }

  .lang-button {
    width: 32px;
    height: 32px;
    min-height: 32px;
  }

  .topbar-tools {
    min-width: 0;
  }

  .checklist-filter {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 8px;
  }

  .filter-mode-switch,
  body.read-only-view .filter-mode-switch {
    grid-column: auto;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .filter-mode-button {
    min-height: 36px;
    font-size: clamp(0.66rem, 2.7vw, 0.82rem);
    padding: 0 4px;
    white-space: nowrap;
    letter-spacing: 0.02em;
  }

  .find-matches-button {
    min-height: 36px;
    font-size: 0.74rem;
  }

  .current-user,
  .current-user-status {
    display: none;
  }

  body.read-only-view .current-user,
  body.read-only-view .current-user-status {
    display: block;
    max-width: 36vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .current-user-status {
    font-size: 0.62rem;
  }

  .user-chip {
    gap: 6px;
    justify-content: flex-end;
    flex-wrap: nowrap;
  }

  .topbar .summary {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .percentage-card {
    grid-column: 1 / -1;
  }

  .summary-row {
    grid-template-columns: 1fr;
  }

  .summary-toggle {
    width: 100%;
  }

  .landing {
    grid-template-columns: 1fr;
    gap: 16px;
    min-height: calc(100dvh - 116px);
    padding: 18px;
    transform: translateY(-10px);
  }

  .landing-panel {
    order: 1;
  }

  .landing-art {
    order: 2;
  }

  .landing-panel h2 {
    max-width: 100%;
    font-size: clamp(1.05rem, 4.6vw, 1.6rem);
  }

  .public-search {
    width: 100%;
  }

  .public-search .inline-input {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .landing-art {
    min-height: 180px;
  }

  .tile-red {
    left: 0;
  }

  .tile-blue {
    left: 22%;
    width: 194px;
  }

  .tile-green {
    left: 10%;
  }

  .checklist-shell {
    overflow-x: hidden;
  }

  .checklist-head {
    display: none;
  }

  .sections {
    min-width: 0;
  }

  .section-row,
  .section-row.read-only {
    position: relative;
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 12px 10px;
  }

  .section-title {
    flex-wrap: wrap;
    padding-right: 96px;
  }

  .section-row.read-only .section-title {
    padding-right: 70px;
  }

  .section-actions {
    position: absolute;
    top: 10px;
    right: 12px;
    z-index: 2;
    justify-content: flex-end;
  }

  .section-progress {
    position: absolute;
    right: 42px;
    top: 10px;
    margin-left: 0;
  }

  .section-row.read-only .section-progress {
    right: 12px;
  }

  .section-code {
    width: 38px;
    padding: 3px 0;
  }

  .sticker-list {
    gap: 6px;
    grid-template-columns: repeat(auto-fill, minmax(58px, 1fr));
  }

  .sticker-button {
    height: 34px;
    min-height: 34px;
    font-size: 0.68rem;
  }

  .matches-modal {
    width: calc(100% - 16px);
    max-height: calc(100dvh - 16px);
  }

  .matches-form {
    padding: 16px;
    max-height: calc(100dvh - 16px);
    overflow: auto;
  }

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

  .matches-table th,
  .matches-table td {
    padding: 8px 10px;
  }
}

@media (max-width: 460px) {
  .app-shell {
    padding: 0 10px 28px;
  }

  .topbar {
    padding: 10px;
  }

  .title-row {
    gap: 8px;
  }

  .album-pack-image {
    width: 0;
    height: 0;
  }

  .topbar h1 {
    font-size: clamp(0.78rem, 3.4vw, 0.95rem);
  }

  .user-meta {
    max-width: 30vw;
  }

  body.read-only-view .current-user,
  body.read-only-view .current-user-status {
    max-width: 30vw;
  }

  .lang-button,
  .user-avatar,
  .back-button {
    width: 30px;
    height: 30px;
    min-height: 30px;
  }

  .summary div,
  .summary-card {
    padding: 8px 10px;
  }

  .summary span,
  .summary-card span {
    font-size: 1.22rem;
  }

  .summary small,
  .summary-card small {
    font-size: 0.66rem;
  }

  .checklist-filter label {
    font-size: 0.7rem;
  }

  .sticker-list {
    grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
  }

  .sticker-button {
    font-size: 0.64rem;
  }

  .sticker-tooltip {
    display: none !important;
  }
}
