:root {
  --bg: #FAF7F2;
  --surface: #FFFFFF;
  --surface-soft: #F3EDE3;
  --border: #E6DDD0;
  --border-strong: #D7CBB9;
  --text: #231F1D;
  --text-muted: #675C53;
  --accent: #C8553D;
  --accent-hover: #AF442E;
  --accent-soft: #FBECE8;
  --fit-bg: #EEF6F1;
  --fit-text: #24513B;
  --flaw-bg: #FDF5E6;
  --flaw-text: #7A4B12;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow: 0 6px 24px rgba(56, 40, 26, 0.05);
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: radial-gradient(circle at top right, #F4EBDD 0%, var(--bg) 42%, #FAF7F2 100%);
  color: var(--text);
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
  min-height: 100vh;
}

.page-shell {
  max-width: 820px;
  margin: 0 auto;
  padding: 20px 16px 44px;
}

.profile-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow);
}

.profile-top {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.avatar-wrap {
  position: relative;
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--border-strong);
  background: var(--accent-soft);
  display: grid;
  place-items: center;
}

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

.avatar-fallback {
  display: none;
  font-family: "Newsreader", Georgia, serif;
  font-weight: 600;
  font-size: 1.8rem;
  color: var(--accent);
}

.avatar-wrap.is-fallback img {
  display: none;
}

.avatar-wrap.is-fallback .avatar-fallback {
  display: block;
}

.profile-meta {
  flex: 1;
  min-width: 0;
}

.name-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin-bottom: 6px;
}

.name-row h1 {
  margin: 0;
  font-family: "Newsreader", Georgia, serif;
  font-size: 1.65rem;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.handle-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--border);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.handle-pill:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.tagline {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.disclosure-bar {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.disclosure-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 6px;
  flex-shrink: 0;
}

.disclosure-bar p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.controls-bar {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 16px;
  color: var(--text-muted);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(200, 85, 61, 0.12);
}

.search-box input {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: 0.93rem;
  color: var(--text);
}

.search-box input::placeholder {
  color: #93867B;
}

.category-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.category-tabs::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tab-btn:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.tab-btn.is-active {
  background: var(--text);
  border-color: var(--text);
  color: #FFFFFF;
}

.tab-count {
  font-size: 0.76rem;
  opacity: 0.78;
}

.results-bar {
  margin: 14px 2px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.catalog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.pill-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}

.pill-mall {
  background: #FDE9E6;
  color: #B42318;
}

.pill-cat {
  background: var(--surface-soft);
  color: var(--text-muted);
}

.pill-stats {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-left: auto;
}

.card-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
}

.notes-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.note-box {
  padding: 9px 11px;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  line-height: 1.48;
}

.note-fit {
  background: var(--fit-bg);
  color: var(--fit-text);
}

.note-flaw {
  background: var(--flaw-bg);
  color: var(--flaw-text);
}

.note-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
  opacity: 0.9;
}

.card-footer {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.price-block {
  display: flex;
  flex-direction: column;
}

.price-label {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.price-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--accent);
  color: #FFFFFF;
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease, transform 0.12s ease;
}

.cta-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.cta-btn:focus-visible,
.tab-btn:focus-visible,
.reset-btn:focus-visible,
.handle-pill:focus-visible,
.footer-links a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.empty-state {
  text-align: center;
  padding: 34px 20px;
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--text-muted);
}

.reset-btn {
  margin-top: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface-soft);
  color: var(--text);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.site-footer {
  margin-top: 28px;
  padding: 16px 6px 0;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
}

.site-footer p {
  margin: 0 0 8px;
}

.footer-links a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

@media (min-width: 680px) {
  .page-shell {
    padding: 28px 20px 56px;
  }

  .profile-card {
    padding: 24px;
  }

  .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
