:root {
  --bg: #fbf7f2; --card: #fff; --fg: #2b2522; --muted: #7a6f68; --accent: #c2410c; --accent-soft: #fde7da;
  --ok: #15803d; --border: #eadfd6; --radius: 12px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); line-height: 1.45; }
a { color: var(--accent); }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: .75rem 1.25rem; background: var(--card); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 5; }
.brand { font-weight: 700; font-size: 1.15rem; text-decoration: none; color: var(--fg); }
#nav { display: flex; gap: .9rem; flex-wrap: wrap; align-items: center; }
#nav a, #nav button { font-size: .95rem; }
main { max-width: 860px; margin: 1.5rem auto; padding: 0 1rem 4rem; }
h1 { font-size: 1.6rem; margin: 0 0 .25rem; }
h2 { font-size: 1.2rem; margin: 1.75rem 0 .6rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem; margin-bottom: .8rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .8rem; }
.list-card { display: block; text-decoration: none; color: inherit; }
.list-card:hover { border-color: var(--accent); }
.row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.stack > * + * { margin-top: .7rem; }
form.stack { max-width: 520px; }
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .2rem; }
label.check { display: flex; gap: .5rem; align-items: flex-start; font-weight: 400; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=number], input[type=date], input[type=search], select, textarea {
  width: 100%; padding: .55rem .65rem; border: 1px solid var(--border); border-radius: 8px; font: inherit; background: #fff;
}
textarea { min-height: 80px; resize: vertical; }
button, .btn { font: inherit; border: 1px solid var(--accent); background: var(--accent); color: #fff; padding: .5rem .9rem; border-radius: 8px; cursor: pointer; text-decoration: none; display: inline-block; }
button.secondary, .btn.secondary { background: #fff; color: var(--accent); }
button.link { background: none; border: none; color: var(--accent); padding: 0; text-decoration: underline; }
button.danger { background: #b91c1c; border-color: #b91c1c; }
button.icon { background: #fff; color: var(--fg); border-color: var(--border); padding: .25rem .5rem; }
button:disabled { opacity: .5; cursor: default; }
.error { color: #b91c1c; font-size: .9rem; }
.tag { display: inline-block; font-size: .75rem; padding: .1rem .5rem; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.tag.ok { background: #dcfce7; color: var(--ok); }
.tag.grey { background: #eee; color: #555; }
.gift { display: flex; gap: .9rem; align-items: flex-start; }
.gift img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); background: #fff; }
.gift .body { flex: 1; min-width: 0; }
.gift .title { font-weight: 600; overflow-wrap: anywhere; }
.gift.crossed .title { text-decoration: line-through; color: var(--muted); }
.gift .actions { display: flex; flex-direction: column; gap: .35rem; align-items: flex-end; }
.forum-post { border-left: 3px solid var(--accent-soft); padding-left: .7rem; margin: .6rem 0; white-space: pre-wrap; }
.toast { position: fixed; bottom: 1.2rem; left: 50%; transform: translateX(-50%); background: var(--fg); color: #fff; padding: .6rem 1rem; border-radius: 8px; max-width: 90vw; z-index: 20; }
.toast.error-toast { background: #b91c1c; }
.hidden { display: none !important; }
dialog { border: 1px solid var(--border); border-radius: var(--radius); padding: 1.2rem; max-width: 560px; width: 92vw; }
dialog::backdrop { background: rgba(0,0,0,.35); }
.filters { display: flex; gap: .5rem; align-items: end; flex-wrap: wrap; }
.filters input { width: 110px; }
.tabs { display: flex; gap: .4rem; flex-wrap: wrap; margin: .8rem 0; }
.tabs button { background: #fff; color: var(--fg); border-color: var(--border); }
.tabs button.active { background: var(--accent); color: #fff; border-color: var(--accent); }
code.share { display: block; padding: .5rem; background: #f4efe9; border-radius: 6px; overflow-wrap: anywhere; font-size: .85rem; }
