/* myrecipes — design applied from Claude Design ("Personal Recipe Collection Website") */

:root {
  --cream: #f7f1e8;
  --paper: #fffaf2;
  --plum: #3b1c52;
  --plum-2: #6a3d8c;
  --muted: #5c4670;
  --gold: #e6b44a;
  --gold-hover: #efc566;
  --lav: #c6b7da;
  --lav-soft: #ece5f3;
  --charcoal: #2b2724;
  --line: rgba(59, 28, 82, .14);
  --line-2: rgba(59, 28, 82, .22);
  --line-3: rgba(59, 28, 82, .3);
  --script: 'Petit Formal Script', cursive;
  --display: 'Antic Didone', Georgia, serif;
  --sans: Cantarell, system-ui, sans-serif;
  --gutter: clamp(16px, 3vw, 40px);
  --maxw: 1360px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background-color: var(--cream);
  background-image: radial-gradient(rgba(59, 28, 82, .05) 1px, transparent 1px);
  background-size: 18px 18px;
  color: var(--plum);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
body.no-scroll { overflow: hidden; }
a { color: var(--plum); text-decoration-color: var(--gold); text-underline-offset: 3px; }
a:hover { color: var(--plum-2); }
input, select, button, textarea { font-family: inherit; }
input::placeholder, textarea::placeholder { color: #7d6a8c; }
.hidden { display: none !important; }

/* ── Buttons ── */
.pill-btn {
  border: 0; border-radius: 999px; padding: 9px 16px; font-size: 14px; cursor: pointer;
  white-space: nowrap; line-height: 1.2; transition: background .15s, border-color .15s, transform .15s;
}
.pill-sm { padding: 7px 14px; font-size: 13px; }
.pill-lg { padding: 12px 24px; font-size: 15px; }
.pill-bold { font-weight: 700; }
.pill-plum { background: var(--plum); color: var(--cream); }
.pill-plum:hover { background: var(--plum-2); }
.pill-gold { background: var(--gold); color: var(--plum); font-weight: 700; }
.pill-gold:hover { background: var(--gold-hover); }
.pill-outline { background: transparent; color: var(--plum); border: 1px solid var(--line-3); }
.pill-outline:hover { border-color: var(--plum); }
.round-x {
  width: 40px; height: 40px; flex: 0 0 40px; border: 0; background: var(--plum); color: var(--cream);
  border-radius: 50%; font-size: 18px; cursor: pointer;
}
.btn-text { border: 0; background: transparent; color: var(--plum); text-decoration: underline; font-size: 14px; cursor: pointer; padding: 4px 0; }

/* ── Header ── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 241, 232, .96);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 6px 20px -14px rgba(59, 28, 82, .35);
}
.header-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 12px var(--gutter);
  display: flex; align-items: center; gap: 14px 24px; flex-wrap: wrap;
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: 0 0 auto; }
.logo-mark {
  width: 44px; height: 44px; border-radius: 12px; background: var(--charcoal);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
}
.lm-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.lm-bar { width: 28px; height: 3px; border-radius: 2px; background: var(--cream); }
.lm-bowl { width: 22px; height: 11px; border-radius: 0 0 12px 12px; background: var(--cream); }
.logo-text { font-family: var(--script); font-size: 26px; color: var(--plum); line-height: 1; }

.main-nav { display: flex; gap: 4px; flex: 1 1 auto; overflow-x: auto; padding: 2px 0; scrollbar-width: none; }
.main-nav::-webkit-scrollbar { display: none; }
.nav-pill {
  flex: 0 0 auto; border: 1px solid var(--line-2); background: var(--paper); color: var(--plum);
  padding: 9px 16px; border-radius: 999px; font-size: 15px; cursor: pointer;
  display: flex; align-items: center; gap: 6px; white-space: nowrap;
}
.nav-pill:hover { border-color: var(--plum); }
.nav-pill.on { background: var(--plum); color: var(--cream); border-color: var(--plum); }
.nav-pill .caret { font-size: 11px; opacity: .7; }

.header-search {
  flex: 1 1 220px; max-width: 340px; display: flex; align-items: center; gap: 8px;
  background: var(--paper); border: 1px solid var(--line-2); border-radius: 999px;
  padding: 0 6px 0 16px; height: 44px;
}
.search-ring { width: 12px; height: 12px; border: 2px solid var(--plum); border-radius: 50%; flex: 0 0 auto; }
.header-search input {
  flex: 1; min-width: 0; border: 0; background: transparent; outline: none;
  font-size: 15px; color: var(--plum); height: 100%;
}
input[type="search"]::-webkit-search-cancel-button { display: none; }
.clear-x {
  flex: 0 0 30px; width: 30px; height: 30px; border: 1px solid var(--line-3); background: var(--gold);
  color: var(--plum); border-radius: 50%; font-size: 15px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}

.mega-menu {
  position: absolute; top: 100%; left: 0; right: 0; background: var(--paper);
  border-bottom: 1px solid rgba(59, 28, 82, .18);
  box-shadow: 0 24px 40px -24px rgba(59, 28, 82, .45);
}
.mega-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 22px var(--gutter) 26px;
  display: flex; flex-wrap: wrap; gap: 18px 40px; align-items: flex-start;
}
.mega-intro { flex: 0 1 260px; }
.mega-title { font-family: var(--script); font-size: 28px; line-height: 1.3; }
.mega-intro p { font-size: 14px; color: var(--muted); margin: 6px 0 0; line-height: 1.5; }
.mega-chips { flex: 1 1 400px; display: flex; flex-wrap: wrap; gap: 10px; }
.mega-chip {
  border: 1px solid var(--line-2); background: var(--paper); color: var(--plum);
  border-radius: 14px; padding: 12px 18px; cursor: pointer;
  display: flex; align-items: baseline; gap: 10px; font-size: 16px;
}
.mega-chip:hover { border-color: var(--plum); }
.mega-chip.on { background: var(--plum); color: var(--cream); border-color: var(--plum); }
.mega-chip .mc-label { font-family: var(--display); font-size: 19px; }
.mega-chip .mc-count { font-size: 12px; opacity: .75; }

/* ── Hero ── */
.hero { max-width: var(--maxw); margin: 0 auto; padding: 24px var(--gutter) 0; }
.hero-frame {
  position: relative; height: clamp(520px, 72vh, 700px); border-radius: 28px; overflow: hidden;
  border: 1px solid rgba(59, 28, 82, .18); background: var(--lav);
}
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(59, 28, 82, .45), rgba(59, 28, 82, 0) 60%); }
.hero-card-wrap {
  position: absolute; left: clamp(16px, 4vw, 56px); right: clamp(16px, 4vw, 56px); bottom: clamp(16px, 4vw, 56px);
  display: flex; pointer-events: none;
}
.hero-card {
  pointer-events: auto; max-width: 600px; background: var(--cream); border-radius: 24px;
  padding: clamp(22px, 3vw, 38px); border: 1px solid rgba(59, 28, 82, .15);
  box-shadow: 0 30px 60px -30px rgba(59, 28, 82, .6);
}
.kicker { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.hero-card h1 {
  font-family: var(--script); font-weight: 400; font-size: clamp(40px, 5.4vw, 68px);
  line-height: 1.25; margin: 10px 0 6px; color: var(--plum);
}
.hero-card p { font-family: var(--display); font-size: clamp(19px, 1.8vw, 23px); line-height: 1.45; margin: 0 0 22px; text-wrap: pretty; }
.hero-search-row { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-search {
  flex: 1 1 260px; display: flex; align-items: center; gap: 10px; background: var(--paper);
  border: 1px solid rgba(59, 28, 82, .25); border-radius: 16px; padding: 0 16px; height: 54px;
}
.hero-search .search-ring { width: 14px; height: 14px; }
.hero-search input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font-size: 17px; color: var(--plum); height: 100%; }
.surprise-btn {
  height: 54px; border: 0; background: var(--gold); color: var(--plum); border-radius: 16px;
  padding: 0 22px; font-size: 16px; font-weight: 700; cursor: pointer;
}
.surprise-btn:hover { background: var(--gold-hover); }

/* ── Sections ── */
.section { max-width: var(--maxw); margin: 0 auto; padding: clamp(48px, 6vw, 80px) var(--gutter) 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.display-title { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(32px, 3.4vw, 46px); }
.script-note { font-family: var(--script); font-size: 22px; color: var(--plum-2); }

.inspire-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); gap: 24px; }
.panel { border-radius: 24px; padding: clamp(22px, 3vw, 34px); border: 1px solid rgba(59, 28, 82, .15); }
.panel-gold { background: var(--gold); }
.panel-lav { background: var(--lav); }
.panel-label { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; }
.panel-lead { font-family: var(--display); font-size: 20px; line-height: 1.4; margin: 10px 0 16px; }

.mood-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 18px; }
.mood-btn {
  text-align: left; border: 1px solid rgba(59, 28, 82, .2); background: var(--cream); color: var(--plum);
  border-radius: 16px; padding: 14px 16px; cursor: pointer; min-height: 92px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 8px; transition: transform .15s;
}
.mood-btn:hover { transform: translateY(-2px); }
.mood-btn.on { background: var(--plum); color: var(--cream); }
.mood-label { font-family: var(--script); font-size: 20px; line-height: 1.3; }
.mood-note { font-size: 13px; opacity: .85; }

.pantry-row { display: flex; gap: 10px; flex-wrap: wrap; }
.pantry-row input {
  flex: 1 1 220px; height: 48px; border: 1px solid rgba(59, 28, 82, .25); background: var(--paper);
  border-radius: 14px; padding: 0 16px; font-size: 16px; color: var(--plum); outline: none;
}
.pantry-add { height: 48px; border: 0; background: var(--plum); color: var(--cream); border-radius: 14px; padding: 0 20px; font-size: 15px; cursor: pointer; }
.pantry-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; align-items: center; }
.pantry-chip {
  border: 0; background: var(--plum); color: var(--cream); border-radius: 999px; padding: 7px 12px 7px 14px;
  font-size: 14px; cursor: pointer; display: flex; gap: 8px; align-items: center;
}
.pantry-chip span { opacity: .7; }
.quick-label { font-size: 13px; margin: 18px 0 8px; }
.staples { display: flex; flex-wrap: wrap; gap: 8px; }
.staple { border: 1px solid rgba(59, 28, 82, .25); background: var(--cream); color: var(--plum); border-radius: 999px; padding: 7px 13px; font-size: 14px; cursor: pointer; }
.staple.on { background: var(--gold); }

/* ── Collection / filters ── */
.collection-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.collection-head .display-title { margin-top: 4px; }
.collection-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.sort-label { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.sort-label select {
  height: 42px; border: 1px solid rgba(59, 28, 82, .25); background: var(--paper); color: var(--plum);
  border-radius: 12px; padding: 0 12px; font-size: 14px;
}
.filter-panel { background: var(--paper); border: 1px solid var(--line); border-radius: 22px; padding: 8px 22px; }
.filter-row { display: flex; gap: 10px 20px; align-items: center; flex-wrap: wrap; padding: 14px 0; }
.filter-row + .filter-row { border-top: 1px solid rgba(59, 28, 82, .1); }
.filter-row-label { flex: 0 0 96px; font-family: var(--display); font-size: 20px; }
.filter-chips { flex: 1 1 300px; display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--line-2); background: var(--paper); color: var(--plum);
  border-radius: 999px; padding: 8px 15px; font-size: 14px; cursor: pointer;
}
.chip:hover { border-color: var(--plum); }
.chip.on { background: var(--plum); color: var(--cream); border-color: var(--plum); }
.chip .chip-count { opacity: .6; font-size: 12px; margin-left: 4px; }

/* ── Grid & cards ── */
.grid-section { padding-top: 32px; padding-bottom: clamp(64px, 8vw, 110px); }
.recipe-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 28px; }
.recipe-card {
  background: var(--lav); border-radius: 22px; padding: 12px; border: 1px solid rgba(59, 28, 82, .12);
  display: flex; flex-direction: column; box-shadow: 0 18px 30px -24px rgba(59, 28, 82, .55);
}
.card-photo {
  position: relative; aspect-ratio: 4/3; border-radius: 14px; overflow: hidden; background: var(--paper);
  cursor: pointer; display: block; width: 100%; border: 0; padding: 0;
}
.card-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.recipe-card:hover .card-photo img { transform: scale(1.03); }
.photo-placeholder {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background-color: var(--paper);
  background-image: radial-gradient(rgba(59, 28, 82, .09) 1px, transparent 1px);
  background-size: 14px 14px;
  font-family: var(--script); color: var(--plum-2); font-size: 72px; line-height: 1;
}
.photo-placeholder.big { font-size: 120px; }
.card-badge {
  position: absolute; top: 10px; left: 10px; pointer-events: none; background: var(--cream); color: var(--plum);
  border-radius: 999px; padding: 5px 11px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
.match-badge {
  position: absolute; top: 10px; right: 10px; pointer-events: none; background: var(--gold); color: var(--plum);
  border-radius: 999px; padding: 5px 11px; font-size: 12px; font-weight: 700;
}
.card-body { padding: 16px 8px 6px; display: flex; flex-direction: column; flex: 1; gap: 8px; }
.card-source { font-size: 13px; opacity: .85; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-title {
  margin: 0; font-family: var(--display); font-weight: 400; font-size: 26px; line-height: 1.15; cursor: pointer;
  overflow-wrap: anywhere;
}
.card-title:hover { text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 4px; }
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.card-tags span { background: rgba(247, 241, 232, .7); border-radius: 999px; padding: 4px 10px; font-size: 12px; }
.card-spacer { flex: 1; }
.card-foot {
  display: flex; align-items: center; gap: 8px; border-top: 1px solid rgba(59, 28, 82, .2);
  padding-top: 12px; margin-top: 6px; flex-wrap: wrap;
}
.card-time { font-size: 14px; font-weight: 700; }
.diamond { width: 5px; height: 5px; background: var(--plum); transform: rotate(45deg); flex: 0 0 auto; }
.card-serves { font-size: 14px; }
.card-foot .grow { flex: 1; }
.card-foot .pill-btn { font-size: 13px; padding: 7px 12px; }
.card-foot .pill-plum { padding: 8px 14px; }

.empty-state { text-align: center; padding: 70px 20px; border: 1px dashed var(--line-3); border-radius: 24px; margin-bottom: 28px; }
.empty-title { font-family: var(--script); font-size: 32px; }
.empty-state p { font-size: 16px; color: var(--muted); }
.show-more-wrap { display: flex; justify-content: center; margin-top: 36px; }
.show-more-wrap .pill-btn { padding: 12px 26px; font-size: 15px; background: var(--paper); }

/* ── Footer ── */
.site-footer { background: var(--plum); color: var(--cream); }
.footer-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 48px var(--gutter);
  display: flex; flex-wrap: wrap; gap: 20px 40px; justify-content: space-between; align-items: center;
}
.footer-mark { font-family: var(--script); font-size: 34px; color: var(--gold); }
.footer-text { font-family: var(--display); font-size: 19px; max-width: 520px; line-height: 1.5; }

/* ── Recipe & edit pages (full-page, same look as the home page) ── */
.overlay {
  position: fixed; inset: 0; z-index: 100; overflow-y: auto;
  background-color: var(--cream);
  background-image: radial-gradient(rgba(59, 28, 82, .05) 1px, transparent 1px);
  background-size: 18px 18px;
}
.modal-overlay { z-index: 120; }
.sheet { min-height: 100%; display: flex; flex-direction: column; }
.sheet > #detail-body, .sheet > .recipe-form { flex: 1 0 auto; }
.sheet-bar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(247, 241, 232, .96);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 6px 20px -14px rgba(59, 28, 82, .35);
}
.sheet-bar-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 12px var(--gutter);
  display: flex; align-items: center; gap: 10px 8px; flex-wrap: wrap;
}
.sheet-bar-inner .logo { margin-right: 16px; }
.sheet-bar-inner .grow { flex: 1 1 auto; }
.logo-btn { border: 0; background: transparent; padding: 0; cursor: pointer; font: inherit; }
.sheet-bar .pill-gold { padding: 10px 18px; font-size: 15px; }
.sheet-footer { margin-top: clamp(64px, 8vw, 110px); }
.panel-paper { background: var(--paper); }

/* Recipe page — hero */
.detail-hero { max-width: var(--maxw); margin: 0 auto; padding: 24px var(--gutter) 0; }
.detail-hero-frame {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(18px, 3vw, 44px); align-items: center;
  padding: clamp(16px, 3vw, 44px); border-radius: 28px; border: 1px solid rgba(59, 28, 82, .18);
  background-color: var(--lav);
  background-image: radial-gradient(rgba(59, 28, 82, .1) 1px, transparent 1px);
  background-size: 18px 18px;
}
.detail-card { max-width: none; display: flex; flex-direction: column; gap: 14px; }
.detail-card .kicker a { text-decoration: underline; text-decoration-color: var(--gold); }
.hero-card .detail-title {
  margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(34px, 3.8vw, 54px);
  line-height: 1.1; overflow-wrap: anywhere; color: var(--plum);
}
.hero-card .detail-desc { margin: 0; font-family: var(--display); font-size: clamp(18px, 1.6vw, 21px); line-height: 1.45; text-wrap: pretty; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.detail-tags span { background: var(--lav-soft); border-radius: 999px; padding: 5px 12px; font-size: 13px; }

.detail-media { min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.detail-photo-frame {
  position: relative; border-radius: 20px; overflow: hidden; background: var(--paper); aspect-ratio: 4 / 3;
  box-shadow: 0 30px 60px -30px rgba(59, 28, 82, .6);
}
.detail-photo-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.detail-photo-frame.aspect-4-3 { aspect-ratio: 4 / 3; }
.detail-photo-frame.aspect-3-2 { aspect-ratio: 3 / 2; }
.detail-photo-frame.aspect-16-9 { aspect-ratio: 16 / 9; }
.detail-photo-frame.aspect-1-1 { aspect-ratio: 1 / 1; }
.detail-photo-frame.aspect-3-4 { aspect-ratio: 3 / 4; max-height: 640px; margin: 0 auto; width: 100%; }
.detail-photo-frame.fit-cover img { object-fit: cover; }
.detail-photo-frame.fit-contain img { object-fit: contain; }
.detail-photo-frame.fit-fill img { object-fit: fill; }
.detail-photo-frame.pos-center img { object-position: center; }
.detail-photo-frame.pos-top img { object-position: center top; }
.detail-photo-frame.pos-bottom img { object-position: center bottom; }
.detail-video { border-radius: 20px; overflow: hidden; background: var(--charcoal); aspect-ratio: 16 / 9; }
.detail-video iframe, .detail-video video { width: 100%; height: 100%; border: 0; display: block; }

.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 6px; }
.stat { background: var(--paper); border: 1px solid rgba(59, 28, 82, .2); border-radius: 16px; padding: 14px 16px; min-width: 0; }
.stat-gold { background: var(--gold); border-color: transparent; }
.stat-label { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.stat-gold .stat-label { color: var(--plum); font-weight: 700; }
.stat-value { font-family: var(--display); font-size: 24px; margin-top: 4px; overflow-wrap: anywhere; }
.serv-row { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.serv-btn {
  width: 30px; height: 30px; flex: 0 0 30px; border-radius: 50%; border: 1px solid var(--plum);
  background: var(--cream); color: var(--plum); font-size: 16px; cursor: pointer;
}
.serv-btn:hover { background: var(--plum); color: var(--cream); }
.serv-value { font-family: var(--display); font-size: 24px; min-width: 24px; text-align: center; white-space: nowrap; }

/* Recipe page — ingredients & method */
.detail-bottom {
  max-width: var(--maxw); margin: 0 auto; padding: clamp(40px, 5vw, 64px) var(--gutter) 0;
  display: flex; flex-wrap: wrap; gap: clamp(20px, 3vw, 40px);
}
.ing-card {
  flex: 1 1 320px; min-width: 0; background: var(--paper); border: 1px solid var(--line);
  border-radius: 22px; padding: clamp(20px, 2.5vw, 30px); align-self: flex-start;
}
.ing-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.script-h { margin: 0; font-family: var(--script); font-weight: 400; font-size: 30px; }
.ing-head span { font-size: 13px; opacity: .8; }
.ing-group { margin-top: 20px; }
.ing-group-title { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; padding-bottom: 8px; border-bottom: 1px solid var(--gold); }
.ing-item {
  display: flex; gap: 12px; align-items: flex-start; padding: 10px 0;
  border-bottom: 1px dashed rgba(59, 28, 82, .15); color: var(--plum);
}
.ing-qty { flex: 0 0 92px; font-weight: 700; font-size: 15px; line-height: 1.4; }
.ing-name { flex: 1; font-size: 15px; line-height: 1.4; }
.no-qty .ing-qty { display: none; }

.method-col { flex: 2 1 420px; min-width: 0; }
.method-col .script-h { margin-bottom: 8px; }
.step { display: flex; gap: 18px; padding: 18px 0; border-bottom: 1px solid rgba(59, 28, 82, .12); }
.step-num {
  flex: 0 0 44px; height: 44px; border-radius: 50%; background: var(--plum); color: var(--gold);
  display: flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 20px;
}
.step-text { flex: 1; min-width: 0; font-size: 16px; line-height: 1.65; text-wrap: pretty; padding-top: 9px; }
.detail-source { margin: 18px 0 0; font-size: 14px; overflow-wrap: anywhere; }
.send-on {
  margin-top: 24px; background: var(--lav); border-radius: 18px; padding: 18px 22px;
  display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
}
.send-on span { font-family: var(--script); font-size: 22px; flex: 1 1 220px; }
.empty-note { font-size: 15px; color: var(--muted); margin: 14px 0 0; }

/* Edit page */
.modal-note { font-size: 14px; color: var(--muted); }
.form-hero { max-width: var(--maxw); margin: 0 auto; padding: 24px var(--gutter) 0; }
.form-hero-frame { height: clamp(460px, 62vh, 580px); }
.hero-card .modal-heading {
  font-family: var(--script); font-weight: 400; font-size: clamp(40px, 5vw, 64px);
  line-height: 1.25; margin: 10px 0 6px; color: var(--plum);
}
.form-hero-card .form-group > label { color: var(--muted); }
.recipe-form .form-hero-card input[type="text"] {
  height: 54px; border-radius: 16px; padding: 0 16px; font-size: 22px; border-color: rgba(59, 28, 82, .25);
}
.form-section .section-head { margin-bottom: 20px; }
.form-panel { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 14px; }
.form-group { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.form-group > label {
  font-size: 13px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700;
}
.recipe-form input[type="text"], .recipe-form textarea, .recipe-form select {
  border: 1px solid rgba(59, 28, 82, .25); background: var(--paper); border-radius: 14px;
  padding: 0 16px; font-size: 16px; color: var(--plum); outline: none; width: 100%;
}
.recipe-form input[type="text"], .recipe-form select { height: 48px; }
.recipe-form textarea { padding: 12px 16px; line-height: 1.5; resize: vertical; }
.recipe-form input:focus, .recipe-form textarea:focus, .recipe-form select:focus { border-color: var(--plum); }
.recipe-form .input-display { font-family: var(--display); font-size: 20px; }
.recipe-form textarea.input-display { font-size: 19px; }
.panel-paper input[type="text"], .panel-paper textarea { background: var(--cream); }

.cat-row { display: flex; gap: 8px 16px; align-items: center; flex-wrap: wrap; padding-top: 14px; border-top: 1px solid rgba(59, 28, 82, .15); }
.cat-name { flex: 0 0 84px; font-family: var(--display); font-size: 20px; }
.chip-picker { flex: 1 1 240px; display: flex; flex-wrap: wrap; gap: 6px; }
.chip-picker .chip { padding: 7px 14px; font-size: 13px; }

.file-btn { align-self: flex-start; }
.file-btn input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.file-btn span {
  display: inline-block; background: var(--plum); color: var(--cream);
  border-radius: 14px; padding: 13px 20px; font-size: 15px; cursor: pointer;
}
.file-btn span:hover { background: var(--plum-2); }
.file-btn input:focus-visible + span { outline: 2px solid var(--plum); outline-offset: 2px; }
.image-preview { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.preview-photo-frame {
  position: relative; width: min(100%, 360px); border-radius: 14px; overflow: hidden; background: var(--cream);
  aspect-ratio: 4 / 3; box-shadow: 0 18px 30px -24px rgba(59, 28, 82, .55);
}
.preview-photo-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.preview-photo-frame.aspect-4-3 { aspect-ratio: 4 / 3; }
.preview-photo-frame.aspect-3-2 { aspect-ratio: 3 / 2; }
.preview-photo-frame.aspect-16-9 { aspect-ratio: 16 / 9; }
.preview-photo-frame.aspect-1-1 { aspect-ratio: 1 / 1; }
.preview-photo-frame.aspect-3-4 { aspect-ratio: 3 / 4; max-height: 320px; width: auto; }
.preview-photo-frame.fit-cover img { object-fit: cover; }
.preview-photo-frame.fit-contain img { object-fit: contain; }
.preview-photo-frame.fit-fill img { object-fit: fill; }
.preview-photo-frame.pos-center img { object-position: center; }
.preview-photo-frame.pos-top img { object-position: center top; }
.preview-photo-frame.pos-bottom img { object-position: center bottom; }

.form-columns { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.form-col { flex: 1 1 380px; }
.form-col-wide { flex: 1.4 1 420px; }
.dynamic-list { display: flex; flex-direction: column; gap: 8px; }
.dynamic-item {
  display: flex; gap: 8px; align-items: center; background: var(--cream);
  border: 1px solid rgba(59, 28, 82, .16); border-radius: 14px; padding: 8px 10px;
}
.recipe-form .dynamic-item input[type="text"] { height: 40px; background: var(--paper); border-radius: 10px; font-size: 15px; border-color: rgba(59, 28, 82, .22); padding: 0 12px; }
.ingredient-row-subtitle { background: transparent; border-color: transparent; padding: 10px 4px 2px; }
.recipe-form .ingredient-row-subtitle input[type="text"] {
  border: 0; border-bottom: 2px solid var(--gold); border-radius: 0; background: transparent;
  font-family: var(--display); font-size: 21px; height: 44px; padding: 0 4px;
}
.ingredient-type-label { display: none; }
.steps-edit { counter-reset: step; }
.steps-edit .dynamic-item { align-items: flex-start; padding: 14px; border-radius: 18px; gap: 12px; }
.steps-edit .dynamic-item::before {
  counter-increment: step; content: counter(step); order: 1;
  flex: 0 0 38px; height: 38px; border-radius: 50%; background: var(--plum); color: var(--gold);
  display: flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 18px;
}
.steps-edit .drag-handle { order: 0; margin-top: 8px; }
.steps-edit textarea { order: 2; flex: 1; min-width: 0; background: var(--paper) !important; border-radius: 10px !important; padding: 10px 12px !important; font-size: 15px !important; line-height: 1.55; min-height: 80px; field-sizing: content; }
.steps-edit .remove-item { order: 3; }
.drag-handle {
  flex: 0 0 auto; border: 0; background: transparent; color: var(--plum); opacity: .5; cursor: grab;
  font-size: 18px; padding: 4px 2px; touch-action: none; line-height: 1;
}
.drag-handle:hover { opacity: 1; }
.remove-item {
  width: 34px; height: 34px; flex: 0 0 34px; border: 1px solid rgba(59, 28, 82, .25); background: var(--paper);
  color: var(--plum); border-radius: 50%; font-size: 15px; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.remove-item:hover { border-color: var(--plum); }
.dynamic-item.is-dragging { position: fixed; z-index: 300; pointer-events: none; box-shadow: 0 16px 30px -12px rgba(59, 28, 82, .5); }
.drag-placeholder { border: 1px dashed var(--line-3); border-radius: 14px; background: rgba(198, 183, 218, .25); }
body.is-reordering { user-select: none; cursor: grabbing; }
.ingredient-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.dashed-btn { border: 1px dashed var(--plum); color: var(--plum); border-radius: 16px; padding: 12px; font-size: 15px; cursor: pointer; flex: 0 0 auto; }
.dashed-btn:hover { border-style: solid; }
.ingredient-actions .dashed-btn { flex: 1 1 auto; }
.dashed-plain { background: transparent; border-color: rgba(59, 28, 82, .4); }
.dashed-lav { background: var(--lav); }
.dashed-gold { background: var(--gold); }

.form-actions {
  position: sticky; bottom: 0; z-index: 10; margin-top: clamp(40px, 5vw, 64px);
  background: rgba(247, 241, 232, .96);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -6px 20px -14px rgba(59, 28, 82, .35);
}
.form-actions-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 12px var(--gutter);
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
}
.form-actions-inner .grow { flex: 1 1 auto; }
.form-actions-inner .pill-lg { height: 54px; border-radius: 16px; background: var(--paper); }
.recipe-form + .sheet-footer { margin-top: 0; }

/* ── Toast ── */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 200;
  background: var(--plum); color: var(--cream); border-radius: 999px; padding: 12px 22px; font-size: 15px;
  box-shadow: 0 12px 30px -10px rgba(59, 28, 82, .6); max-width: calc(100% - 32px);
}

/* ── Small screens ── */
@media (max-width: 720px) {
  .header-inner { gap: 10px 12px; }
  .main-nav { order: 3; flex-basis: 100%; }
  .header-search { order: 4; max-width: none; flex-basis: 100%; }
  #add-recipe-btn { margin-left: auto; }
  .hero-frame { height: auto; min-height: 520px; display: flex; align-items: flex-end; }
  .hero-card-wrap { position: relative; left: auto; right: auto; bottom: auto; padding: 16px; width: 100%; margin-top: 200px; }
  .stat-grid { grid-template-columns: 1fr; }
  .filter-row-label { flex-basis: 100%; }
  .sheet-bar-inner .logo { margin-right: auto; }
  .sheet-bar-inner .grow, .sheet-back { display: none; }
  .sheet-bar .round-x { order: 1; width: 34px; height: 34px; flex-basis: 34px; }
  #detail-overlay .sheet-bar-inner::after { content: ''; order: 1; flex-basis: 100%; height: 0; }
  .sheet-bar .nav-pill, .sheet-bar .pill-gold { order: 2; padding: 7px 12px; font-size: 13px; }
  .modal-note { display: none; }
  .detail-hero-frame { grid-template-columns: 1fr; padding: 12px; }
  .detail-media { order: -1; }
  .form-actions-inner .script-note { display: none; }
  .form-actions-inner .grow { display: none; }
  .form-actions-inner button { flex: 1 1 0; }
}

/* ── Print: just the open recipe ── */
@media print {
  body { background: #fff; }
  .site-header, .hero, main, .site-footer, .sheet-bar, .send-on, .detail-video, .toast { display: none !important; }
  .overlay { position: static; background: none; padding: 0; overflow: visible; }
  .detail-hero-frame { display: block; background: none; border: 0; padding: 0; }
  .detail-media { margin-top: 16px; }
  .hero-card, .detail-photo-frame { box-shadow: none; border: 0; padding: 0; }
  .panel { border: 0; padding: 0; background: none; }
}


/* ═══ Additions for the Blazor site ═══════════════════════════════════════ */
a.pill-btn { display: inline-block; text-decoration: none; }
a.pill-btn.pill-plum, a.pill-btn.pill-plum:hover { color: var(--cream); }
a.pill-btn.pill-gold:hover, a.pill-btn.pill-outline:hover { color: var(--plum); }
a.nav-pill { text-decoration: none; }
.header-search button { flex: 0 0 auto; }

.user-tools { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.user-menu { position: relative; }
.user-menu > summary { list-style: none; max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.user-menu > summary::-webkit-details-marker { display: none; }
.user-menu-pop {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 200px; z-index: 60;
  background: var(--paper); border: 1px solid var(--line-2); border-radius: 16px; padding: 10px 16px;
  box-shadow: 0 18px 30px -18px rgba(59, 28, 82, .5); display: flex; flex-direction: column; gap: 6px;
}
.user-menu-pop a, .user-menu-pop .btn-text { font-size: 14px; text-align: left; padding: 6px 0; }
.user-menu-pop form { margin: 0; }

.footer-signin { color: var(--lav); font-size: 14px; }
.footer-signin:hover { color: var(--gold); }

/* ── Account pages ── */
.auth-page { max-width: var(--maxw); margin: 0 auto; padding: clamp(40px, 6vw, 90px) var(--gutter); display: flex; justify-content: center; }
.auth-card {
  width: min(100%, 520px); background: var(--paper); border: 1px solid var(--line); border-radius: 26px;
  padding: clamp(24px, 4vw, 44px); box-shadow: 0 30px 60px -40px rgba(59, 28, 82, .6);
  display: flex; flex-direction: column; gap: 12px;
}
.auth-lead { font-family: var(--display); font-size: 19px; line-height: 1.45; margin: 0 0 6px; }
.auth-form { display: flex; flex-direction: column; gap: 16px; margin-top: 6px; }
.auth-form .form-group > label { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; }
.auth-form input[type="text"], .auth-form input[type="password"], .auth-form input:not([type]) {
  height: 48px; border: 1px solid rgba(59, 28, 82, .25); background: #fff; border-radius: 12px;
  padding: 0 14px; font-size: 16px; color: var(--plum); outline: none; width: 100%;
}
.auth-form input:focus { border-color: var(--plum); }
.auth-form .pill-btn { align-self: flex-start; }
.check-row { display: flex; gap: 10px; align-items: center; font-size: 15px; }
.check-row input { width: 18px; height: 18px; accent-color: var(--plum); }
.form-error { margin: 0; background: #fbe6e6; color: #7a1f2b; border-radius: 12px; padding: 10px 14px; font-size: 15px; }
.form-ok { margin: 0; background: var(--lav-soft); border-radius: 12px; padding: 10px 14px; font-size: 15px; }
.field-error { color: #7a1f2b; font-size: 14px; font-weight: 700; }
.recipe-form .form-group.has-error input[type="text"], .recipe-form .form-group.has-error textarea, .recipe-form .form-group.has-error select {
  border-color: #b3261e; box-shadow: 0 0 0 3px rgba(179, 38, 30, .15);
}
.muted-small { font-size: 13px; color: var(--muted); }

/* ── Blazor error bar ── */
#blazor-error-ui {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000;
  background: var(--gold); color: var(--plum); padding: 12px 20px; box-shadow: 0 -4px 16px rgba(59, 28, 82, .3);
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 16px; top: 10px; }

/* ── Category menus (details/summary instead of the old JS toggles) ── */
details.mega > summary { list-style: none; }
details.mega > summary::-webkit-details-marker { display: none; }
details.mega[open] > summary .caret { transform: rotate(180deg); }
a.mega-chip, a.chip, a.mood-btn, a.staple, a.pantry-chip, a.surprise-btn { text-decoration: none; }
a.mega-chip.on, a.chip.on, a.mood-btn.on, a.pantry-chip { color: var(--cream); }
a.surprise-btn { display: inline-flex; align-items: center; }

/* ── Browse page ── */
.browse-head { padding-top: clamp(28px, 4vw, 48px); }
.inline-form { align-items: center; }
.inline-form input[type="search"], .inline-form input[type="text"] {
  flex: 1 1 220px; min-width: 0; height: 40px; border: 1px solid var(--line-2); background: #fff;
  border-radius: 999px; padding: 0 16px; font-size: 15px; color: var(--plum); outline: none;
}
.inline-form input:focus { border-color: var(--plum); }
.sort-form { display: flex; align-items: center; gap: 8px; }
.pager { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 36px; }
.pager-row { display: flex; justify-content: center; align-items: center; gap: 8px; flex-wrap: wrap; }
.pager-numbers { display: flex; align-items: center; gap: 6px; }
.pager-num {
  display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 38px; padding: 0 8px;
  border-radius: 999px; border: 1px solid var(--line-3); color: var(--plum); font-size: 14px; text-decoration: none;
  transition: border-color .15s, background .15s;
}
a.pager-num:hover { border-color: var(--plum); color: var(--plum); }
.pager-num.on { background: var(--plum); border-color: var(--plum); color: var(--cream); font-weight: 700; }
.pager-off { opacity: .4; cursor: default; }
.pager-info { font-size: 14px; color: var(--muted); }
@media (max-width: 560px) {
  .pager-row { gap: 6px; }
  .pager-numbers { order: -1; flex-basis: 100%; justify-content: center; }
  .pager-row .pill-btn { padding: 8px 12px; font-size: 13px; }
}
.card-title a { color: inherit; text-decoration: none; }

/* ── Recipe page ── */
.recipe-page { padding-bottom: clamp(64px, 8vw, 110px); }
.recipe-page:has(> .editor-sheet) { padding-bottom: 0; }
/* The sections sit right in the sheet (no wrapper as on the old site), so it stays a plain block. */
.recipe-sheet, .editor-sheet { display: block; min-height: 0; }
/* The site header is already sticky at the top, so the page's own bar scrolls away under it. */
.recipe-sheet .sheet-bar, .editor-sheet .sheet-bar { position: static; box-shadow: none; }
.nav-pill:disabled { opacity: .5; cursor: default; }
.detail-tags a { background: var(--lav-soft); border-radius: 999px; padding: 5px 12px; font-size: 13px; text-decoration: none; }
.detail-tags a:hover { background: var(--lav); }
.detail-byline { font-size: 14px; color: var(--muted); }
.step-subtitle { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; padding: 18px 0 8px; border-bottom: 1px solid var(--gold); }
/* Metric / Cups switch next to the "Ingredients" heading */
.ing-head:has(.unit-switch) { align-items: center; }
.unit-switch { display: inline-flex; flex: 0 0 auto; border: 1px solid var(--plum); border-radius: 999px; overflow: hidden; }
.unit-switch button {
  border: 0; background: var(--cream); color: var(--plum); font: inherit; font-size: 14px; padding: 6px 14px; cursor: pointer;
}
.unit-switch button + button { border-left: 1px solid var(--plum); }
.unit-switch button.on { background: var(--plum); color: var(--cream); }
.unit-switch button:disabled { cursor: default; }
.unit-switch button:not(.on):not(:disabled):hover { background: var(--lav-soft); }
.serv-btn:disabled { opacity: .45; cursor: default; }
.serv-btn:disabled:hover { background: var(--cream); color: var(--plum); }
.pill-btn:disabled { opacity: .5; cursor: default; }
/* The language button on the recipe page: English / Македонски. */
.lang-pill .lang-code {
  font-size: 11px; font-weight: 700; letter-spacing: .06em; background: var(--plum); color: var(--cream);
  border-radius: 999px; padding: 2px 6px; line-height: 1.2;
}
.lang-pill:disabled { opacity: .5; cursor: default; }
.translation-note { font-size: 14px; font-style: italic; opacity: .75; margin: 0 0 8px; }
.visibility-note {
  width: min(calc(100% - 2 * var(--gutter)), calc(var(--maxw) - 2 * var(--gutter))); margin: 16px auto 0;
  background: var(--lav-soft); border: 1px solid var(--line); border-radius: 14px; padding: 10px 16px; font-size: 15px;
}
.visibility-note.warn { background: #fbe6e6; color: #7a1f2b; }
/* A narrow window or a phone: the photo goes above the text and is kept to part of the screen, so the title and
   the servings show without scrolling. A tall photo is shown narrower rather than cut. */
@media (max-width: 900px) {
  .detail-hero-frame { grid-template-columns: 1fr; gap: 18px; }
  .detail-media { order: -1; }
  .detail-photo-frame {
    width: 100%; max-width: 640px; max-height: min(48vh, 420px); margin: 0 auto; border-radius: 16px;
    box-shadow: 0 18px 36px -24px rgba(59, 28, 82, .6);
  }
  .detail-photo-frame.aspect-3-4, .detail-photo-frame.aspect-1-1 {
    width: auto; height: min(52vh, 440px); max-height: none; max-width: 100%; align-self: center;
  }
}
@media (max-width: 480px) {
  .detail-photo-frame { max-height: 34vh; }
  .detail-photo-frame.aspect-3-4, .detail-photo-frame.aspect-1-1 { height: min(40vh, 360px); }
  .hero-card .detail-title { font-size: 30px; }
}
/* The old site hid this on phones because its overlay had a close ×; the recipe page has none, so Back stays. */
@media (max-width: 720px) {
  .recipe-sheet .sheet-back { display: flex; order: 2; padding: 7px 12px; font-size: 13px; }
}
@media print {
  main.recipe-page { display: block !important; padding: 0; }
  .detail-hero, .detail-bottom { padding: 0; }
  .detail-bottom { margin-top: 24px; }
  .recipe-sheet .sheet-bar, .visibility-note, .detail-byline, .unit-switch { display: none !important; }
}

/* ── Recipe editor ── */
.form-group-label { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; }
.check-row { display: flex; align-items: center; gap: 10px; height: 48px; font-size: 16px; cursor: pointer; }
.check-row input { width: 20px; height: 20px; accent-color: var(--plum); }
.move-btns { display: flex; flex-direction: column; flex: 0 0 auto; order: 0; }
.move-btn { border: 0; background: transparent; color: var(--plum); opacity: .55; cursor: pointer; font-size: 13px; line-height: 1; padding: 2px 4px; }
.move-btn:hover:not(:disabled) { opacity: 1; }
.move-btn:disabled { opacity: .15; cursor: default; }
.paste-box { display: flex; flex-direction: column; gap: 8px; }
.recipe-form .paste-box textarea { background: var(--paper); font-size: 15px; }
.button-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.form-messages { max-width: var(--maxw); margin: 0 auto; padding: 32px var(--gutter) 0; display: flex; flex-direction: column; gap: 12px; }
.form-actions-inner a.pill-lg { display: inline-flex; align-items: center; justify-content: center; }
.surprise-btn:disabled { opacity: .6; cursor: default; }
.delete-confirm { font-weight: 700; color: #7a1f2b; }
.danger-text { color: #7a1f2b; }
.pill-btn.pill-danger { background: #7a1f2b; color: #fff; border-color: #7a1f2b; }
.conflict-box { display: flex; flex-direction: column; gap: 8px; }
.conflict-box p { margin: 0; }
@media (max-width: 720px) {
  .form-actions-inner .delete-confirm, .form-actions-inner .btn-text { flex: 0 0 auto; }
  .form-actions-inner .delete-confirm { flex-basis: 100%; }
  .form-actions-inner a.pill-btn { flex: 1 1 0; }
}

/* ── Admin ── */
.admin-page { padding-bottom: clamp(40px, 6vw, 80px); }
.admin-head .display-title { margin-bottom: 14px; }
.admin-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-flash { margin-top: 16px; max-width: 760px; }
.admin-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 24px; }
.admin-stat {
  display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; background: var(--paper); border: 1px solid var(--line);
  border-radius: 18px; color: var(--plum); text-decoration: none;
}
.admin-stat:hover { border-color: var(--plum); }
.admin-stat b { font-family: var(--display); font-size: 34px; font-weight: 400; line-height: 1; }
.admin-stat span { font-size: 13px; color: var(--muted); }
.admin-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.admin-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.admin-filter select, .admin-cat-name input[type="text"] {
  height: 40px; border: 1px solid var(--line-2); background: #fff; border-radius: 999px; padding: 0 14px;
  font-size: 15px; color: var(--plum); outline: none; min-width: 0;
}
.admin-cat-name input[type="text"]:focus, .admin-filter select:focus { border-color: var(--plum); }
.admin-table-wrap { overflow-x: auto; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.admin-table th { text-align: left; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--line-2); }
.admin-table td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table a { color: var(--plum); }
.admin-table .num { text-align: right; }
.admin-table tr.is-deleted td { background: #fdf3f3; }
.admin-table tr:target td { background: var(--lav-soft); }
.nowrap { white-space: nowrap; }
.admin-row-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.admin-row-actions form, .inline-action { margin: 0; display: inline; }
.inline-action { margin-left: 10px; }
.tag { display: inline-block; font-size: 12px; padding: 3px 9px; border-radius: 999px; background: var(--lav-soft); color: var(--plum); margin: 1px 2px 1px 0; white-space: nowrap; }
.tag-gold { background: var(--gold); }
.tag-danger { background: #fbe6e6; color: #7a1f2b; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.admin-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.admin-group { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; }
.admin-group-title { font-family: var(--display); font-weight: 400; font-size: 24px; margin: 0 0 10px; }
.admin-cat-list { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.admin-cat { display: flex; align-items: center; gap: 6px; }
.admin-cat:target { background: var(--lav-soft); border-radius: 12px; }
.admin-cat form { margin: 0; }
.admin-cat-name { display: flex; gap: 6px; flex: 1 1 auto; min-width: 0; }
.admin-cat-name input[type="text"] { flex: 1 1 auto; height: 34px; font-size: 14px; }
.admin-cat-count { min-width: 2.5em; text-align: right; }
.admin-cat .move-btn { font-size: 16px; }
@media (max-width: 640px) {
  .admin-groups { grid-template-columns: 1fr; }
  .admin-row-actions { justify-content: flex-start; }
}
