:root {
  color-scheme: light;
  --bg: #f5f6f3;
  --surface: #ffffff;
  --surface-muted: #ece9df;
  --ink: #1f2423;
  --muted: #66706c;
  --line: #d7dcd7;
  --teal: #087f72;
  --indigo: #4f46e5;
  --amber: #b45309;
  --coral: #c2410c;
  --shadow: 0 12px 34px rgba(31, 36, 35, 0.09);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Noto Sans KR", "Malgun Gothic", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(180deg, rgba(236, 233, 223, 0.78), rgba(245, 246, 243, 0.88) 42%),
    var(--bg);
  color: var(--ink);
}

button,
input,
select {
  font: inherit;
}

a {
  color: inherit;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.search-surface {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 20px;
  border: 1px solid rgba(31, 36, 35, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.brand {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
  border-radius: 8px;
  color: inherit;
  text-decoration: none;
}

.brand:focus-visible {
  outline: 3px solid rgba(8, 127, 114, 0.18);
  outline-offset: 4px;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
}

.brand-mark img {
  display: block;
  width: 40px;
  height: 40px;
}

h1 {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.2;
  letter-spacing: 0;
}

.result-strip span,
.book-meta,
.snippet,
.shipping {
  color: var(--muted);
}

.toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.account-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.account-status {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.account-status[data-role="admin"] {
  padding: 5px 8px;
  border: 1px solid rgba(8, 127, 114, 0.22);
  border-radius: 999px;
  background: rgba(8, 127, 114, 0.08);
  color: var(--teal);
}

.account-button {
  min-height: 34px;
  padding: 0 10px;
  font-size: 0.86rem;
  white-space: nowrap;
}

.sort-control {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

select,
input {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

select {
  height: 38px;
  padding: 0 34px 0 12px;
}

.search-form {
  display: grid;
  grid-template-columns: minmax(220px, 1.35fr) minmax(160px, 0.8fr) auto 112px;
  gap: 10px;
}

.query-field {
  min-width: 0;
}

.author-field input {
  background: #fbfbf8;
}

.query-field input {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  font-size: 1rem;
  outline: none;
}

.query-field input:focus,
select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(8, 127, 114, 0.14);
}

button,
.primary-link,
.secondary-link,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 120ms ease,
    border-color 120ms ease,
    background 120ms ease;
}

button:active,
.primary-link:active,
.secondary-link:active,
.ghost-button:active {
  transform: translateY(1px);
}

#search-button {
  height: 48px;
  border: 0;
  background: var(--teal);
  color: #fff;
  font-weight: 700;
}

#search-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.media-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(58px, 1fr));
  align-items: center;
  min-width: 220px;
  height: 48px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f7f4;
}

.media-tab {
  position: relative;
  min-width: 0;
}

.media-tab input {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.media-tab span {
  display: grid;
  min-height: 38px;
  place-items: center;
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
}

.media-tab input:checked + span {
  background: var(--ink);
  color: #fff;
}

.media-tab input:focus-visible + span {
  box-shadow: 0 0 0 3px rgba(8, 127, 114, 0.16);
}

.store-filter-panel {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafaf8;
}

.store-filter-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 40px;
  padding: 0 12px;
  color: var(--ink);
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 800;
  list-style: none;
}

.store-filter-summary::-webkit-details-marker {
  display: none;
}

.store-filter-summary::before {
  content: "+";
  display: grid;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
  font-weight: 900;
  line-height: 1;
}

.store-filter-panel[open] .store-filter-summary::before {
  content: "-";
}

.store-filter-summary span:first-child {
  flex: 1 1 auto;
}

.store-filter-summary:focus-visible {
  outline: 3px solid rgba(8, 127, 114, 0.18);
  outline-offset: 2px;
}

.store-filter-count {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.store-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: min(38vh, 320px);
  padding: 0 12px 12px;
  overflow-y: auto;
}

.store-filter-panel:not([open]) .store-filters {
  display: none;
}

.store-toggle {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  gap: 6px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 0.9rem;
}

.store-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 24px;
  cursor: pointer;
}

.store-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--teal);
}

.store-filter-link {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 2px;
  border-radius: 6px;
  font-weight: 700;
  text-decoration: none;
}

.store-filter-link:hover {
  text-decoration: underline;
}

.store-filter-link:focus-visible {
  outline: 3px solid rgba(8, 127, 114, 0.18);
  outline-offset: 2px;
}

.swatch {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--teal);
}

.result-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 2px 12px;
}

.result-strip strong {
  margin-right: 8px;
  font-size: 1rem;
}

.ghost-button {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  padding: 0 12px;
}

.edit-search-button {
  display: none;
}

.wishlist-panel {
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
}

.wishlist-head,
.auth-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.wishlist-head h2,
.auth-head h2 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.3;
}

.wishlist-items {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.wishlist-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.wishlist-item strong,
.wishlist-item span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wishlist-item span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.84rem;
}

.wishlist-note-input {
  width: 100%;
  height: 34px;
  margin-top: 8px;
  padding: 0 10px;
  font-size: 0.84rem;
}

.wishlist-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.admin-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid rgba(8, 127, 114, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
}

.admin-head,
.admin-actions,
.admin-store-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-head h2,
.admin-stores h3 {
  margin: 0;
  font-size: 1rem;
}

.admin-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.admin-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
}

.admin-stat {
  display: grid;
  gap: 3px;
  min-height: 72px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.admin-stat strong {
  font-size: 1.25rem;
}

.admin-stat span,
.admin-message,
.admin-store-row span {
  color: var(--muted);
  font-size: 0.84rem;
}

.admin-message[data-state="error"] {
  color: #b91c1c;
}

.admin-stores {
  display: grid;
  gap: 8px;
}

.admin-store-row {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.admin-store-row strong,
.admin-store-row span {
  display: block;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(31, 36, 35, 0.36);
}

.auth-dialog {
  width: min(100%, 420px);
  padding: 18px;
  border: 1px solid rgba(31, 36, 35, 0.1);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.auth-message {
  min-height: 20px;
  margin: 10px 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.auth-message[data-state="error"] {
  color: #b91c1c;
}

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

.auth-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.auth-form input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
}

.auth-form button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: var(--teal);
  color: #fff;
  cursor: pointer;
  font-weight: 800;
}

.auth-mode-button {
  width: 100%;
  min-height: 38px;
  margin-top: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.source-links-panel {
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.source-links-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 40px;
  padding: 0 12px;
  color: var(--ink);
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 800;
  list-style: none;
}

.source-links-summary::-webkit-details-marker {
  display: none;
}

.source-links-summary::before {
  content: "+";
  display: grid;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
  font-weight: 900;
  line-height: 1;
}

.source-links-panel[open] .source-links-summary::before {
  content: "-";
}

.source-links-summary span:first-child {
  flex: 1 1 auto;
}

.source-links-summary:focus-visible {
  outline: 3px solid rgba(8, 127, 114, 0.18);
  outline-offset: 2px;
}

.source-links-count {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.source-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: min(34vh, 280px);
  padding: 0 12px 12px;
  overflow-y: auto;
}

.source-links-panel:not([open]) .source-links {
  display: none;
}

.source-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 0.88rem;
  text-decoration: none;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  align-items: start;
  gap: 14px;
}

.result-group {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(31, 36, 35, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
}

.result-group-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.result-group-title {
  flex: 1 1 auto;
  min-width: 0;
}

.result-group-title h2 {
  margin: 0;
  display: -webkit-box;
  overflow: hidden;
  font-size: 0.98rem;
  line-height: 1.34;
  letter-spacing: 0;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.result-group-title a {
  text-decoration: none;
}

.result-group-title p {
  min-height: 18px;
  margin: 3px 0 0;
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.86rem;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.result-group-summary {
  margin-top: 5px;
  color: var(--teal);
  font-size: 0.82rem;
  font-weight: 800;
}

.result-group-items {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.group-cover-link {
  position: relative;
  display: grid;
  width: 70px;
  height: 104px;
  flex: 0 0 70px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-decoration: none;
}

.group-cover {
  display: block;
  width: 100%;
  height: 100%;
  padding: 6px;
  object-fit: contain;
  background: #fff;
}

.group-cover[hidden] {
  display: none;
}

.group-cover-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 8px;
  color: rgba(31, 36, 35, 0.72);
  font-size: 0.86rem;
  font-weight: 800;
  text-align: center;
}

.offer-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 8px 8px 8px 10px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--teal);
  border-radius: 8px;
  background: #fff;
}

.offer-row-lowest {
  box-shadow: 0 0 0 1px rgba(8, 127, 114, 0.12);
}

.offer-main {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.offer-badges,
.offer-price-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.offer-title {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.offer-link {
  min-height: 32px;
  padding: 0 10px;
  white-space: nowrap;
}

.offer-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.wishlist-save-button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}

.wishlist-save-button[data-saved="true"] {
  border-color: rgba(8, 127, 114, 0.22);
  background: #eef7f5;
  color: var(--teal);
}

.offer-details {
  min-width: 0;
}

.offer-details-summary {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f7f4;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 800;
  list-style: none;
}

.offer-details-summary::-webkit-details-marker {
  display: none;
}

.offer-details-summary::before {
  content: "+";
  margin-right: 6px;
  color: var(--teal);
  font-weight: 900;
}

.offer-details[open] .offer-details-summary {
  margin-bottom: 8px;
}

.offer-details[open] .offer-details-summary::before {
  content: "-";
}

.offer-details:not([open]) .offer-details-list {
  display: none;
}

.offer-details-list {
  display: grid;
  gap: 8px;
}

.result-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  min-height: 196px;
  border: 1px solid rgba(31, 36, 35, 0.1);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
}

.cover-link {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 196px;
  background: #fff;
  text-decoration: none;
}

.cover {
  width: 100%;
  height: 100%;
  min-height: 196px;
  padding: 8px;
  object-fit: contain;
  display: block;
  background: #fff;
}

.cover[hidden] {
  display: none;
}

.cover-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 10px;
  color: rgba(31, 36, 35, 0.72);
  font-weight: 800;
  text-align: center;
}

.result-body {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 9px;
  padding: 14px;
}

.card-head,
.price-row,
.card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-head {
  min-height: 24px;
  flex-wrap: wrap;
}

.store-pill,
.lowest-pill,
.availability-pill,
.condition-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  max-width: 100%;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef7f5;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.availability-pill {
  background: #e8f6ee;
  color: #15803d;
}

.lowest-pill {
  background: #fff4df;
  color: var(--amber);
}

.availability-pill[data-availability="out_of_stock"] {
  background: #fee2e2;
  color: #b91c1c;
}

.availability-pill[data-availability="preorder"] {
  background: #e0e7ff;
  color: #4338ca;
}

.availability-pill[data-availability="unknown"] {
  background: #f1f5f9;
  color: #475569;
}

.condition-pill {
  background: #fff3e5;
  color: var(--amber);
}

.condition-pill:empty {
  display: none;
}

.result-card h2 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.38;
  letter-spacing: 0;
}

.title-link {
  text-decoration: none;
}

.source-link:hover,
.secondary-link:hover {
  text-decoration: underline;
}

.book-meta,
.snippet {
  margin: 0;
  line-height: 1.45;
}

.book-meta {
  min-height: 20px;
  font-size: 0.88rem;
}

.price-row {
  flex-wrap: wrap;
}

.price {
  font-size: 1.05rem;
}

.shipping {
  font-size: 0.84rem;
}

.snippet {
  display: -webkit-box;
  overflow: hidden;
  min-height: 20px;
  color: var(--muted);
  font-size: 0.84rem;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-actions {
  margin-top: auto;
  flex-wrap: wrap;
}

.primary-link,
.secondary-link {
  min-height: 34px;
  padding: 0 12px;
  font-weight: 700;
}

.primary-link {
  background: var(--ink);
  color: #fff;
}

.secondary-link {
  border: 1px solid var(--line);
  color: var(--ink);
}

.primary-link.offer-link {
  min-height: 32px;
  padding: 0 10px;
  font-size: 0.82rem;
}

.empty-state,
.loading-state {
  grid-column: 1 / -1;
  min-height: 190px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.64);
  color: var(--muted);
  text-align: center;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 44px;
  margin-top: 18px;
}

.page-buttons {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.page-info,
.page-gap {
  color: var(--muted);
  font-size: 0.88rem;
}

.page-button {
  min-width: 40px;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.page-button[aria-current="page"] {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.page-button:disabled {
  cursor: default;
  opacity: 0.45;
}

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

@media (max-width: 720px) {
  .shell {
    width: min(100% - 20px, 640px);
    padding-top: 10px;
  }

  .search-surface {
    padding: 14px;
    transition:
      padding 180ms ease,
      box-shadow 180ms ease;
  }

  .topbar,
  .result-strip {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar {
    justify-content: flex-start;
  }

  .account-bar {
    width: 100%;
  }

  .search-form {
    grid-template-columns: 1fr;
    max-height: 260px;
    overflow: hidden;
    transition:
      max-height 220ms ease,
      opacity 180ms ease,
      transform 180ms ease;
  }

  .store-filter-panel {
    max-height: 380px;
    overflow: hidden;
    transition:
      max-height 220ms ease,
      margin 180ms ease,
      opacity 180ms ease,
      transform 180ms ease;
  }

  .media-tabs {
    width: 100%;
    min-width: 0;
  }

  #search-button {
    width: 100%;
  }

  .results-grid,
  .result-group-items {
    grid-template-columns: 1fr;
  }

  .result-group-summary {
    white-space: normal;
  }

  .result-strip {
    scroll-margin-top: 82px;
  }

  .search-surface.search-surface-collapsed {
    padding: 10px 12px;
  }

  .search-surface.search-surface-collapsed .topbar {
    align-items: center;
    flex-direction: row;
    gap: 10px;
    margin-bottom: 0;
  }

  .search-surface.search-surface-collapsed .brand {
    flex: 1 1 auto;
    gap: 10px;
  }

  .search-surface.search-surface-collapsed .brand-mark,
  .search-surface.search-surface-collapsed .brand-mark img {
    width: 34px;
    height: 34px;
  }

  .search-surface.search-surface-collapsed h1 {
    font-size: 1.05rem;
  }

  .search-surface.search-surface-collapsed .toolbar {
    flex: 0 0 auto;
    justify-content: flex-end;
  }

  .search-surface.search-surface-collapsed .sort-control {
    display: none;
  }

  .search-surface.search-surface-collapsed .edit-search-button:not([hidden]) {
    display: inline-flex;
    min-height: 34px;
    padding: 0 10px;
    white-space: nowrap;
  }

  .search-surface.search-surface-collapsed .account-bar {
    width: auto;
  }

  .search-surface.search-surface-collapsed .account-status,
  .search-surface.search-surface-collapsed .account-button[hidden] {
    display: none;
  }

  .search-surface.search-surface-collapsed .search-form,
  .search-surface.search-surface-collapsed .store-filter-panel {
    max-height: 0;
    margin: 0;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
  }

  .search-surface.search-surface-collapsed .store-filter-panel {
    border-color: transparent;
  }
}

@media (max-width: 430px) {
  .group-cover-link {
    width: 58px;
    height: 88px;
    flex-basis: 58px;
  }

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

  .offer-actions,
  .primary-link.offer-link,
  .wishlist-save-button {
    width: 100%;
  }

  .wishlist-item {
    grid-template-columns: 1fr;
  }

  .result-card {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .cover-link,
  .cover {
    min-height: 180px;
  }

  .result-body {
    padding: 12px;
  }
}

.content-section {
  margin-top: 28px;
  padding: 28px;
  border: 1px solid rgba(31, 36, 35, 0.09);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.section-heading {
  max-width: 820px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--teal);
  font-size: 0.82rem;
  font-weight: 800;
}

.section-heading h2,
.prose-section h2 {
  margin: 0;
  font-size: 1.45rem;
  line-height: 1.35;
}

.section-heading p,
.prose-section p,
.prose-section li,
.site-footer p {
  color: var(--muted);
  line-height: 1.72;
}

.info-grid,
.faq-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.info-grid article,
.faq-list article,
.notice-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 18px;
}

.info-grid h3,
.faq-list h3,
.prose-section h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  line-height: 1.4;
}

.info-grid p,
.faq-list p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.site-footer {
  margin-top: 30px;
  padding: 22px 0 0;
  border-top: 1px solid var(--line);
}

.footer-nav,
.static-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.footer-nav a,
.static-nav a {
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
}

.footer-nav a:hover,
.static-nav a:hover,
.footer-nav a:focus-visible,
.static-nav a:focus-visible {
  color: var(--teal);
}

.content-page {
  max-width: 940px;
}

.static-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.prose-section {
  background: #fff;
}

.prose-section ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.notice-box {
  margin: 18px 0;
  border-color: rgba(180, 83, 9, 0.28);
  background: #fff8eb;
}

.notice-box p {
  margin: 8px 0 0;
}

@media (max-width: 720px) {
  .content-section {
    padding: 20px;
  }

  .info-grid,
  .faq-list {
    grid-template-columns: 1fr;
  }

  .static-header {
    align-items: flex-start;
    flex-direction: column;
  }
}
