:root {
  color-scheme: light;
  --ink: #15231c;
  --muted: #66736c;
  --paper: #f7f4ec;
  --card: #fffdf8;
  --line: #dfe4dc;
  --green: #147a52;
  --green-dark: #0d5639;
  --green-soft: #dff3e9;
  --red: #c3473d;
  --red-soft: #fbe6e3;
  --amber: #9a660a;
  --amber-soft: #fff1cf;
  --blue: #2e5fa7;
  --blue-soft: #e4edfb;
  --shadow: 0 12px 32px rgba(28, 43, 34, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 5% 0%, rgba(20, 122, 82, 0.11), transparent 25rem),
    linear-gradient(180deg, #f1eee5 0, var(--paper) 28rem);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  color: inherit;
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid rgba(21, 35, 28, 0.1);
  background: rgba(247, 244, 236, 0.92);
  backdrop-filter: blur(16px);
}

.topbar-inner,
.page {
  width: min(1480px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 20px;
}

.account-panel {
  display: flex;
  align-items: center;
  gap: 9px;
}

.account-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
}

.account-copy strong,
.account-copy small {
  display: block;
  max-width: 180px;
}

.account-copy strong {
  overflow: hidden;
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-copy small {
  color: var(--muted);
  font-size: 0.65rem;
}

.account-copy .sync-error {
  color: var(--red);
}

.account-button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 13px;
  color: white;
  background: var(--green);
  font-weight: 900;
  box-shadow: 0 8px 20px rgba(20, 122, 82, 0.25);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.brand small {
  color: var(--muted);
  font-size: 0.72rem;
}

.nav-tabs {
  display: flex;
  gap: 8px;
}

.nav-tab,
.button,
.filter-chip,
.state-button,
.stick-toggle,
.section-page-button,
.icon-button {
  cursor: pointer;
  border: 0;
  border-radius: 10px;
  transition: 160ms ease;
}

.nav-tab {
  padding: 10px 14px;
  color: var(--muted);
  background: transparent;
  font-weight: 750;
}

.nav-tab:hover,
.nav-tab.active {
  color: white;
  background: var(--green-dark);
}

.page {
  padding: 38px 0 80px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.6fr);
  align-items: end;
  gap: 28px;
  margin-bottom: 24px;
  padding: 34px;
  overflow: hidden;
  border-radius: 24px;
  color: white;
  background:
    linear-gradient(115deg, rgba(12, 67, 44, 0.98), rgba(20, 122, 82, 0.9)),
    var(--green-dark);
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 8px;
  color: #aee2c8;
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  max-width: 780px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.3rem, 6vw, 5.3rem);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 0.95;
}

.hero-copy {
  margin: 18px 0 0;
  max-width: 680px;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
}

.hero-progress {
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
}

.hero-progress-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.hero-progress strong {
  font-size: 2.2rem;
}

.progress-track {
  height: 10px;
  margin-top: 14px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.15);
}

.progress-bar {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: #d4f3e4;
  transition: width 280ms ease;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.summary-card {
  padding: 17px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 253, 248, 0.84);
  box-shadow: 0 6px 18px rgba(28, 43, 34, 0.04);
}

.summary-card span,
.summary-card strong {
  display: block;
}

.progress-overview {
  margin-bottom: 18px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.9);
  box-shadow: 0 6px 18px rgba(28, 43, 34, 0.04);
}

.progress-overview-heading,
.progress-overview-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.progress-overview-heading > div > span,
.progress-overview-heading > div > strong {
  display: block;
}

.progress-overview-heading > div > span {
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
}

.progress-overview-heading > div > strong {
  font-size: 1.05rem;
}

.progress-overview-heading > #progress-text {
  color: var(--green-dark);
  font-size: 1.75rem;
}

.progress-overview .progress-track {
  height: 8px;
  margin-top: 12px;
  background: #e4e8e2;
}

.progress-overview .progress-bar {
  background: linear-gradient(90deg, var(--green), #43a779);
}

.progress-overview-meta {
  justify-content: flex-start;
  margin-top: 9px;
  color: var(--muted);
  font-size: 0.72rem;
}

.progress-overview-meta span + span::before {
  margin-right: 16px;
  color: #b3bbb4;
  content: "•";
}

.progress-overview-meta strong {
  color: var(--ink);
}

.section-menu-panel {
  margin-bottom: 24px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 253, 248, 0.84);
  box-shadow: 0 6px 18px rgba(28, 43, 34, 0.04);
}

.section-menu-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}

.section-menu-heading .eyebrow {
  color: var(--green);
}

.section-menu-heading h2 {
  margin: 0;
  font-family: inherit;
  font-size: clamp(1.35rem, 2vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -0.025em;
}

.section-menu-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.section-page-button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--green-dark);
  background: var(--green-soft);
  font-size: 1rem;
  font-weight: 900;
}

.section-page-button:hover {
  color: white;
  background: var(--green);
}

.section-page-status {
  display: flex;
  min-width: min(260px, 55vw);
  align-items: center;
  flex-direction: column;
  line-height: 1.25;
  text-align: center;
}

.section-page-status strong {
  overflow: hidden;
  max-width: 100%;
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.section-page-status small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.65rem;
}

.section-menu {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 9px;
}

.section-menu-tile {
  display: flex;
  min-width: 0;
  aspect-ratio: 1;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  padding: 9px;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--muted);
  background: white;
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  transition: 160ms ease;
}

.section-menu-tile:hover,
.section-menu-tile.active {
  border-color: rgba(20, 122, 82, 0.45);
  color: var(--green-dark);
  background: var(--green-soft);
  box-shadow: 0 6px 16px rgba(20, 122, 82, 0.12);
  transform: translateY(-2px);
}

.section-menu-tile:focus-visible {
  outline: 3px solid rgba(20, 122, 82, 0.3);
  outline-offset: 2px;
}

.section-menu-visual {
  display: grid;
  width: 50%;
  height: 50%;
  place-items: center;
}

.section-menu-visual img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.section-menu-placeholder {
  color: var(--green);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.7rem;
  font-weight: 700;
}

.section-menu-tile-special .section-menu-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 9px;
  color: white;
  background: var(--green-dark);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(0.65rem, 1.3vw, 1rem);
  font-weight: 900;
}

.section-menu-tile-special:nth-last-child(-n + 3) .section-menu-placeholder {
  color: var(--ink);
  background: var(--amber-soft);
}

.section-menu-all .section-menu-visual {
  width: auto;
  height: auto;
}

.summary-card span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 720;
}

.summary-card strong {
  margin-top: 5px;
  font-size: 1.65rem;
}

.toolbar {
  position: sticky;
  z-index: 15;
  top: 78px;
  margin-bottom: 24px;
  padding: 14px;
  border: 1px solid rgba(21, 35, 28, 0.1);
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.92);
  box-shadow: 0 10px 28px rgba(28, 43, 34, 0.07);
  backdrop-filter: blur(14px);
}

.toolbar-main,
.filters,
.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.toolbar-main {
  justify-content: space-between;
}

.search-wrap {
  position: relative;
  flex: 1;
}

.search-wrap span {
  position: absolute;
  top: 50%;
  left: 14px;
  color: var(--muted);
  transform: translateY(-50%);
}

.search {
  width: 100%;
  min-height: 44px;
  padding: 0 16px 0 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  color: var(--ink);
  background: white;
}

.search:focus,
.section-select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(20, 122, 82, 0.12);
}

.section-select {
  max-width: 260px;
  min-height: 44px;
  padding: 0 34px 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  background: white;
}

.filters {
  flex-wrap: wrap;
  margin-top: 10px;
}

.filter-chip {
  padding: 8px 11px;
  color: var(--muted);
  background: #f0f1ec;
  font-size: 0.78rem;
  font-weight: 760;
}

.filter-chip:hover,
.filter-chip.active {
  color: var(--green-dark);
  background: var(--green-soft);
  box-shadow: inset 0 0 0 1px rgba(20, 122, 82, 0.25);
}

.button {
  min-height: 40px;
  padding: 0 13px;
  color: var(--green-dark);
  background: var(--green-soft);
  font-size: 0.78rem;
  font-weight: 780;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(20, 122, 82, 0.15);
}

.button.secondary {
  color: var(--muted);
  background: #f0f1ec;
}

.social-button {
  color: white;
  background: var(--green-dark);
}

.section-block {
  margin-top: 36px;
  scroll-margin-top: 180px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.section-heading h2 {
  margin: 0;
  font-family: inherit;
  font-size: clamp(1.45rem, 3vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.025em;
}

.section-count {
  color: var(--muted);
  font-size: 0.8rem;
  white-space: nowrap;
}

.sticker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(225px, 1fr));
  gap: 13px;
}

.sticker-card {
  position: relative;
  display: flex;
  min-height: 272px;
  flex-direction: column;
  padding: 15px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--card);
  box-shadow: 0 7px 22px rgba(28, 43, 34, 0.045);
  transition: 180ms ease;
}

.sticker-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  content: "";
  background: transparent;
}

.sticker-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.sticker-card[data-personal-state="owned"]::before {
  background: var(--green);
}

.sticker-card[data-personal-state="missing"] {
  background: rgba(255, 253, 248, 0.72);
}

.card-top,
.card-meta,
.copy-row,
.state-controls {
  display: flex;
  align-items: center;
}

.card-top {
  justify-content: space-between;
  gap: 10px;
}

.sticker-number {
  display: grid;
  min-width: 40px;
  height: 34px;
  padding: 0 8px;
  place-items: center;
  border-radius: 9px;
  color: white;
  background: var(--ink);
  font-weight: 900;
}

.strategy-badge {
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.035em;
}

.strategy-stick {
  color: var(--green-dark);
  background: var(--green-soft);
}

.strategy-dont {
  color: #8c2c26;
  background: var(--red-soft);
}

.strategy-wait {
  color: #755009;
  background: var(--amber-soft);
}

.strategy-review {
  color: #274d85;
  background: var(--blue-soft);
}

.sticker-name {
  margin: 13px 0 6px;
  font-family: inherit;
  font-size: 1.3rem;
  font-weight: 750;
  line-height: 1.08;
}

.sticker-visual {
  position: relative;
  display: grid;
  width: 100%;
  aspect-ratio: 232 / 308;
  max-height: 258px;
  margin-top: 12px;
  overflow: hidden;
  place-items: center;
  border-radius: 12px;
  border: 0;
  padding: 0;
  cursor: pointer;
  background:
    linear-gradient(135deg, rgba(20, 122, 82, 0.08), rgba(21, 35, 28, 0.03)),
    #eef0ea;
}

.sticker-visual:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
}

.sticker-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: filter 220ms ease, opacity 220ms ease, transform 220ms ease;
}

.sticker-visual-crest {
  padding: 30px;
}

.sticker-visual-crest .sticker-image {
  max-width: 160px;
  max-height: 190px;
}

.sticker-card:hover .sticker-image {
  transform: scale(1.015);
}

.sticker-card[data-personal-state="missing"] .sticker-image {
  filter: grayscale(1) contrast(0.9);
  opacity: 0.68;
}

.sticker-visual-empty {
  border: 1px dashed #c7cec5;
  color: #929c94;
}

.sticker-visual-empty::before {
  position: absolute;
  width: 70%;
  height: 1px;
  content: "";
  background: #c7cec5;
  transform: rotate(-36deg);
}

.sticker-visual-empty span {
  z-index: 1;
  max-width: 90px;
  padding: 5px 8px;
  border-radius: 7px;
  text-align: center;
  background: rgba(238, 240, 234, 0.92);
  font-size: 0.68rem;
  font-weight: 750;
}

.sticker-type {
  min-height: 18px;
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: capitalize;
}

.card-meta {
  align-items: flex-start;
  min-height: 45px;
  gap: 7px;
  margin: 12px 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.45;
}

.card-meta strong {
  color: var(--ink);
}

.card-spacer {
  flex: 1;
}

.copy-row {
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  padding: 8px 9px;
  border-radius: 11px;
  background: #f1f2ed;
}

.copy-label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
}

.copy-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-button {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: var(--ink);
  background: white;
  box-shadow: 0 1px 5px rgba(28, 43, 34, 0.09);
  font-size: 1rem;
  font-weight: 800;
}

.icon-button:hover {
  color: white;
  background: var(--green);
}

.copy-count {
  min-width: 20px;
  text-align: center;
  font-weight: 900;
}

.duplicate-pill {
  margin-left: 5px;
  padding: 3px 6px;
  border-radius: 99px;
  color: #8c2c26;
  background: var(--red-soft);
  font-size: 0.65rem;
  font-weight: 850;
}

.state-controls {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
}

.state-button {
  min-height: 35px;
  padding: 5px;
  color: var(--muted);
  background: #f1f2ed;
  font-size: 0.68rem;
  font-weight: 780;
}

.state-button:hover {
  color: var(--ink);
  background: #e7e9e2;
}

.state-button.active[data-state="missing"] {
  color: #8c2c26;
  background: var(--red-soft);
}

.state-button.active[data-state="owned"] {
  color: #274d85;
  background: var(--blue-soft);
}

.stick-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 38px;
  gap: 8px;
  margin-top: 7px;
  padding: 7px 10px;
  color: var(--muted);
  background: #f1f2ed;
  font-size: 0.72rem;
  font-weight: 800;
}

.stick-toggle small {
  font-size: 0.61rem;
  font-weight: 650;
}

.stick-toggle:hover {
  color: var(--ink);
  background: #e7e9e2;
}

.stick-toggle.active {
  color: #8c2c26;
  background: var(--red-soft);
}

.empty-state {
  padding: 56px 24px;
  border: 1px dashed #bdc6bc;
  border-radius: 18px;
  color: var(--muted);
  text-align: center;
  background: rgba(255, 253, 248, 0.65);
}

.empty-state strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 1.1rem;
}

.toast {
  position: fixed;
  z-index: 50;
  right: 22px;
  bottom: 22px;
  max-width: min(360px, calc(100% - 44px));
  padding: 12px 16px;
  border-radius: 12px;
  color: white;
  background: var(--ink);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: 180ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.hidden {
  display: none !important;
}

.read-only .copy-row,
.read-only .state-controls,
.read-only .stick-toggle,
.read-only #import-progress,
.read-only #export-progress,
.read-only #social-open,
.read-only .account-panel {
  display: none !important;
}

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

.social-dialog {
  width: min(760px, calc(100% - 28px));
  max-height: min(820px, calc(100dvh - 28px));
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 22px;
  color: var(--ink);
  background: var(--card);
  box-shadow: 0 24px 80px rgba(21, 35, 28, 0.28);
}

.social-dialog::backdrop {
  background: rgba(21, 35, 28, 0.58);
  backdrop-filter: blur(5px);
}

#social-content {
  display: flex;
  max-height: min(820px, calc(100dvh - 28px));
  flex-direction: column;
}

.social-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 14px;
}

.social-header span {
  color: var(--green);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.social-header h2 {
  margin: 2px 0 0;
  font-size: 1.45rem;
  letter-spacing: -0.03em;
}

.social-close {
  width: 38px;
  height: 38px;
  cursor: pointer;
  border: 0;
  border-radius: 50%;
  color: var(--muted);
  background: #eff1ec;
  font-size: 1.4rem;
}

.social-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 0 22px 14px;
}

.social-tabs button,
.social-row-actions button,
.friend-row button,
.social-primary,
.social-back {
  min-height: 36px;
  cursor: pointer;
  border: 0;
  border-radius: 10px;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 800;
}

.social-tabs button {
  color: var(--muted);
  background: #eff1ec;
}

.social-tabs button.active {
  color: var(--green-dark);
  background: var(--green-soft);
}

.social-body {
  padding: 4px 22px 24px;
  overflow-y: auto;
}

.social-body h3 {
  margin: 18px 0 10px;
  font-size: 0.9rem;
}

.social-card,
.social-row,
.friend-row,
.trade-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
}

.social-intro {
  padding: 16px;
  background: linear-gradient(135deg, var(--green-soft), #f4faf7);
}

.social-intro p,
.social-help {
  margin: 6px 0 13px;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.45;
}

.social-primary {
  padding: 0 14px;
  color: white;
  background: var(--green-dark);
}

.social-row,
.friend-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  padding: 11px 12px;
}

.social-row strong,
.social-row small,
.friend-row strong,
.friend-row small {
  display: block;
}

.social-row small,
.friend-row small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.65rem;
}

.social-row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.social-row-actions button,
.friend-row button {
  min-height: 32px;
  padding: 0 10px;
  color: var(--green-dark);
  background: var(--green-soft);
}

.social-row-actions .danger,
.social-row-actions button.danger {
  color: #8c2c26;
  background: var(--red-soft);
}

.friend-row img,
.friend-avatar {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 50%;
  object-fit: cover;
}

.friend-avatar {
  display: grid;
  place-items: center;
  color: var(--green);
  background: var(--green-soft);
}

.friend-row > div {
  min-width: 0;
  flex: 1;
}

.social-notice {
  display: none;
  margin: 0 22px 10px;
  padding: 9px 12px;
  border-radius: 10px;
  color: var(--green-dark);
  background: var(--green-soft);
  font-size: 0.72rem;
  font-weight: 750;
}

.social-notice.visible {
  display: block;
}

.social-notice.error {
  color: #8c2c26;
  background: var(--red-soft);
}

.social-empty {
  padding: 20px;
  color: var(--muted);
  text-align: center;
  font-size: 0.75rem;
}

.trade-card {
  margin-bottom: 10px;
  padding: 13px;
}

.trade-heading,
.trade-columns {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.trade-status {
  padding: 4px 7px;
  border-radius: 99px;
  color: var(--muted);
  background: #eff1ec;
  font-size: 0.62rem;
  font-weight: 800;
}

.status-accepted {
  color: var(--green-dark);
  background: var(--green-soft);
}

.status-rejected,
.status-cancelled {
  color: #8c2c26;
  background: var(--red-soft);
}

.trade-columns > div,
.trade-columns > section {
  min-width: 0;
  flex: 1;
}

.trade-columns small {
  color: var(--muted);
  font-weight: 750;
}

.trade-columns ul {
  margin: 5px 0 10px;
  padding-left: 17px;
  font-size: 0.72rem;
}

.comparison-columns h3 span {
  color: var(--muted);
}

.trade-options {
  max-height: 280px;
  overflow-y: auto;
}

.trade-option {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 5px;
  padding: 8px;
  border-radius: 9px;
  background: #f3f4f0;
  font-size: 0.7rem;
}

.trade-option input {
  margin-top: 2px;
  accent-color: var(--green);
}

.social-back {
  padding: 0 11px;
  color: var(--muted);
  background: #eff1ec;
}

.social-message {
  display: block;
  margin: 16px 0 10px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 750;
}

.social-message textarea {
  display: block;
  width: 100%;
  min-height: 70px;
  margin-top: 5px;
  padding: 9px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
  }

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

  .toolbar-main {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar-actions {
    justify-content: space-between;
  }

  .section-select {
    max-width: none;
    flex: 1;
  }
}

@media (max-width: 620px) {
  body {
    min-width: 0;
  }

  .topbar {
    position: static;
  }

  .topbar-inner,
  .page {
    width: min(100% - 16px, 1480px);
  }

  .topbar-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    min-height: auto;
    gap: 8px 12px;
    padding: 8px 0;
  }

  .brand {
    gap: 8px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 11px;
  }

  .brand strong {
    font-size: 0.86rem;
  }

  .brand small {
    font-size: 0.64rem;
  }

  .nav-tabs {
    grid-column: 1 / -1;
    width: 100%;
  }

  .nav-tab {
    flex: 1;
    padding: 8px 10px;
    font-size: 0.78rem;
  }

  .account-panel {
    gap: 6px;
  }

  .account-copy {
    display: none;
  }

  .account-avatar {
    width: 30px;
    height: 30px;
  }

  .account-button {
    min-height: 34px;
    padding: 0 9px;
    font-size: 0.68rem;
  }

  .page {
    padding-top: 12px;
  }

  .progress-overview {
    margin-bottom: 10px;
    padding: 12px 14px;
    border-radius: 14px;
  }

  .progress-overview-heading > div > span {
    font-size: 0.65rem;
  }

  .progress-overview-heading > div > strong {
    font-size: 0.9rem;
  }

  .progress-overview-heading > #progress-text {
    font-size: 1.4rem;
  }

  .progress-overview .progress-track {
    height: 6px;
    margin-top: 8px;
  }

  .progress-overview-meta {
    margin-top: 7px;
    font-size: 0.66rem;
  }

  .hero {
    gap: 14px;
    margin-bottom: 12px;
    padding: 18px;
    border-radius: 16px;
  }

  .hero h1 {
    font-size: clamp(2rem, 10vw, 2.7rem);
    line-height: 0.96;
  }

  .hero-copy {
    display: none;
  }

  .hero-progress {
    padding: 12px 14px;
  }

  .hero-progress strong {
    font-size: 1.55rem;
  }

  .progress-track {
    height: 7px;
    margin-top: 8px;
  }

  .summary-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 12px;
  }

  .summary-card {
    padding: 11px 12px;
    border-radius: 13px;
  }

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

  .summary-card strong {
    margin-top: 2px;
    font-size: 1.35rem;
  }

  .section-menu-panel {
    margin-bottom: 12px;
    padding: 12px 8px;
    border-radius: 16px;
  }

  .section-menu-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 8px;
    padding: 0 4px;
  }

  .section-menu-heading .eyebrow {
    display: none;
  }

  .section-menu-heading h2 {
    font-size: 1.15rem;
  }

  .section-menu-pager {
    width: 100%;
    margin-top: 10px;
    padding-top: 10px;
  }

  .section-page-button {
    width: 38px;
    height: 38px;
  }

  .section-page-status {
    min-width: 0;
    flex: 1;
  }

  .section-menu {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
    padding: 2px 4px 4px;
  }

  .section-menu-tile {
    width: 100%;
    gap: 5px;
    padding: 5px;
    border-radius: 11px;
    font-size: 0.53rem;
  }

  .section-menu-tile > span:last-child {
    display: none;
  }

  .section-menu-visual {
    width: 70%;
    height: 70%;
  }

  .section-menu-tile-special .section-menu-placeholder {
    font-size: 0.68rem;
  }

  .toolbar {
    position: static;
    top: 105px;
    margin-bottom: 14px;
    padding: 9px;
    border-radius: 14px;
  }

  .toolbar-main {
    gap: 7px;
  }

  .toolbar-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 7px;
  }

  .section-select {
    display: none;
  }

  .search {
    min-height: 40px;
  }

  .toolbar-actions .button {
    min-height: 36px;
    padding: 0 6px;
    font-size: 0.67rem;
  }

  .filters {
    flex-wrap: wrap;
    overflow: visible;
    gap: 6px;
    margin-top: 7px;
    padding-bottom: 0;
  }

  .filter-chip {
    padding: 7px 9px;
    font-size: 0.7rem;
  }

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

  .sticker-card {
    min-width: 0;
    min-height: 0;
    padding: 7px;
    border-radius: 13px;
  }

  .sticker-number {
    min-width: 32px;
    height: 28px;
    padding: 0 5px;
    border-radius: 7px;
    font-size: 0.75rem;
  }

  .strategy-badge {
    padding: 5px;
    font-size: 0.54rem;
  }

  .sticker-visual {
    max-height: none;
    margin-top: 7px;
    border-radius: 9px;
  }

  .sticker-visual-crest {
    padding: 16px;
  }

  .sticker-name {
    margin: 7px 0 3px;
    font-size: 0.94rem;
  }

  .sticker-type {
    min-height: 14px;
    font-size: 0.65rem;
  }

  .card-meta {
    display: none;
  }

  .copy-row {
    gap: 4px;
    margin: 8px 0 6px;
    padding: 4px 5px;
  }

  .copy-label {
    font-size: 0.62rem;
  }

  .duplicate-pill {
    display: block;
    width: max-content;
    margin: 2px 0 0;
  }

  .copy-control {
    gap: 4px;
  }

  .icon-button {
    width: 23px;
    height: 23px;
  }

  .state-button {
    min-height: 32px;
    font-size: 0.6rem;
  }

  .stick-toggle {
    min-height: 33px;
    margin-top: 5px;
    padding: 5px 7px;
    font-size: 0.65rem;
  }

  .stick-toggle small {
    display: none;
  }

  .section-block {
    margin-top: 20px;
    scroll-margin-top: 230px;
  }

  .section-heading {
    margin-bottom: 9px;
    padding-bottom: 8px;
  }

  .section-heading h2 {
    font-size: 1.35rem;
  }

  .section-heading .section-count {
    display: none;
  }

  .social-dialog {
    width: calc(100% - 12px);
    max-height: calc(100dvh - 12px);
    border-radius: 17px;
  }

  #social-content {
    max-height: calc(100dvh - 12px);
  }

  .social-header {
    padding: 16px 14px 11px;
  }

  .social-header h2 {
    font-size: 1.2rem;
  }

  .social-tabs {
    padding: 0 14px 10px;
  }

  .social-body {
    padding: 3px 14px 18px;
  }

  .social-notice {
    margin: 0 14px 8px;
  }

  .comparison-columns {
    flex-direction: column;
  }
}

@media print {
  .topbar,
  .toolbar,
  .state-controls,
  .copy-row,
  .toast {
    display: none !important;
  }

  body {
    background: white;
  }

  .page {
    width: 100%;
    padding: 0;
  }

  .hero {
    color: var(--ink);
    background: white;
    box-shadow: none;
  }

  .hero-copy,
  .eyebrow {
    color: var(--muted);
  }

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