:root {
  color-scheme: light;
  --bg: #f7f1e8;
  --paper: #fffaf2;
  --card: rgba(255, 255, 255, .88);
  --ink: #2d241d;
  --muted: #74685f;
  --line: rgba(80, 61, 43, .14);
  --accent: #7d5b3e;
  --shadow: 0 14px 38px rgba(55, 39, 21, .11);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-width: 320px;
  background: radial-gradient(circle at top left, #fff8dc 0, transparent 30rem), var(--bg);
  color: var(--ink);
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.app-shell {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 14px max(18px, env(safe-area-inset-left)) 52px max(18px, env(safe-area-inset-right));
}
.hero {
  position: sticky;
  top: 0;
  z-index: 5;
  backdrop-filter: blur(18px);
  background: color-mix(in srgb, var(--bg), transparent 8%);
  border-bottom: 1px solid var(--line);
}
.hero-inner {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 14px max(18px, env(safe-area-inset-left)) 12px max(18px, env(safe-area-inset-right));
  display: grid;
  gap: 12px;
}
.brand h1 { margin: 0; font-size: clamp(1.75rem, 8vw, 3rem); letter-spacing: -.055em; line-height: .95; }
.brand p { margin: 7px 0 0; color: var(--muted); max-width: 42rem; line-height: 1.38; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn {
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  border-radius: 999px;
  padding: 10px 14px;
  box-shadow: 0 3px 10px rgba(0,0,0,.04);
  text-decoration: none;
}
.btn.primary { background: var(--ink); color: white; border-color: var(--ink); }
.btn.danger { background: #fff2ef; color: #a64032; }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(520px, 100%); background: var(--paper); border: 1px solid var(--line); border-radius: 28px; padding: 26px; box-shadow: var(--shadow); }
.login-card h1 { margin: 0; font-size: 2.4rem; letter-spacing: -.05em; }
.login-card p { color: var(--muted); line-height: 1.5; }
.field { display: grid; gap: 6px; margin: 12px 0; }
label { font-weight: 750; font-size: .9rem; }
input, textarea, select { width: 100%; border: 1px solid var(--line); border-radius: 16px; background: white; color: var(--ink); padding: 12px; }
textarea { min-height: 120px; resize: vertical; }
.tabs { display: flex; padding: 4px; background: #efe4d3; border-radius: 999px; gap: 4px; margin: 20px 0; }
.tabs button { flex: 1; border: 0; border-radius: 999px; padding: 10px; background: transparent; }
.tabs button.active { background: white; box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.kicker { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); font-weight: 900; }
.search-box { display: none; margin: 0 0 14px; }
.search-box.visible { display: block; }
.category-stack { display: grid; gap: 12px; }
.category-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  overflow: hidden;
  scroll-margin-top: 120px;
}
.category-summary {
  list-style: none;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.category-summary::-webkit-details-marker { display:none; }
.category-summary::after {
  content: '⌄';
  color: var(--muted);
  font-size: 1.15rem;
  transform: rotate(-90deg);
  transition: transform .16s ease;
}
.category-panel[open] > .category-summary::after { transform: rotate(0); }
.category-title { display:flex; gap:10px; align-items:center; margin:0; font-size:1.15rem; font-weight: 900; letter-spacing: -.02em; }
.icon { width: 38px; height: 38px; flex: 0 0 auto; display:grid; place-items:center; background:#fff; border-radius: 14px; border: 1px solid var(--line); }
.count { margin-left: auto; color: var(--muted); font-size: .88rem; white-space: nowrap; }
.category-content { padding: 0 12px 12px; }
.add-here { margin: 0 0 8px; }
.item { background: #fff; border: 1px solid var(--line); border-radius: 18px; margin: 9px 0; overflow: hidden; }
.item summary { list-style: none; padding: 14px; display: flex; align-items: center; gap: 10px; }
.item summary::-webkit-details-marker { display:none; }
.item summary::after { content: '+'; margin-left: auto; color: var(--muted); font-weight: 800; font-size: 1.15rem; }
.item[open] summary::after { content: '–'; }
.item-title { font-weight: 850; }
.item-sub { color: var(--muted); margin-top: 3px; font-size: .95rem; line-height: 1.35; }
.item-body { border-top: 1px solid var(--line); padding: 2px 14px 15px; color: #3b3027; line-height: 1.55; overflow-wrap: anywhere; }
.item-body ul { padding-left: 20px; margin-bottom: 0; }
.photos { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 12px; }
.photos img { width:100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 16px; border: 1px solid var(--line); }
.admin-bar { background: #1f1812; color: white; border-radius: 20px; padding: 12px; display: grid; gap: 8px; margin-bottom: 14px; }
.admin-bar .muted { color: rgba(255,255,255,.72); }
.editor { display: none; position: fixed; inset: 0; background: rgba(31,24,18,.42); z-index: 20; padding: 16px; overflow: auto; }
.editor.visible { display: grid; place-items: start center; }
.editor-card { width: min(780px, 100%); background: var(--paper); border-radius: 26px; padding: 18px; box-shadow: var(--shadow); }
.editor-row { display:grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.category-head { display:flex; justify-content:space-between; align-items:flex-start; gap:10px; margin-bottom: 10px; }
.muted { color: var(--muted); }
.empty { text-align:center; padding: 28px; color: var(--muted); }
@media (max-width: 760px) {
  .hero { position: static; }
  .app-shell { padding-left: max(18px, env(safe-area-inset-left)); padding-right: max(18px, env(safe-area-inset-right)); }
  .editor-row { grid-template-columns: 1fr; }
  .category-summary { padding: 15px 14px; }
  .category-content { padding: 0 10px 10px; }
  .item-body { padding-right: 14px; padding-left: 14px; }
}
