:root {
  --bg: #faf8f5; --card: #fff; --ink: #1f2328; --muted: #6b7280; --line: #e7e2da;
  --free: #15803d; --sale: #1d4ed8; --warn: #b45309; --radius: 12px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink); background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.5; }
a { color: inherit; }
img { max-width: 100%; display: block; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.top { background: var(--card); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; justify-content: space-between; align-items: center; height: 56px; }
.brand { font-weight: 700; text-decoration: none; font-size: 1.1rem; }
.area { color: var(--muted); font-size: .9rem; }
.hero { padding: 28px 0 8px; }
.hero h1 { margin: 0 0 4px; font-size: 1.8rem; }
.hero p { margin: 0; color: var(--muted); }

.tabs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 18px 0; }
.tabs button { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 6px 14px; font: inherit; cursor: pointer; }
.tabs button b { color: var(--muted); font-weight: 500; margin-left: 4px; }
.tabs button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.tabs button.on b { color: #cbd5e1; }
.showgone { margin-left: auto; color: var(--muted); font-size: .9rem; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; transition: transform .1s, box-shadow .1s; }
.card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.08); }
.card[hidden] { display: none; }
.card.gone { opacity: .5; }
.thumb { position: relative; aspect-ratio: 4 / 3; background: #eee; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.tag { position: absolute; left: 10px; top: 10px; padding: 2px 10px; border-radius: 999px; color: #fff; font-weight: 700; font-size: .9rem; }
.tag.free { background: var(--free); }
.tag.sale { background: var(--sale); }
.status { display: inline-block; background: var(--warn); color: #fff; border-radius: 999px; padding: 1px 10px; font-size: .8rem; font-weight: 600; }
.thumb .status { position: absolute; right: 10px; top: 10px; }
.gone .status { background: #4b5563; }
.meta { padding: 10px 12px 12px; }
.meta h2 { font-size: 1rem; margin: 0; }
.meta p { margin: 2px 0 0; color: var(--muted); font-size: .85rem; }
.empty { color: var(--muted); text-align: center; padding: 40px 0; }

.back { margin: 16px 0; }
.back a { color: var(--muted); text-decoration: none; }
.item { display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px; align-items: start; }
@media (max-width: 760px) { .item { grid-template-columns: 1fr; } }
.gallery .main { width: 100%; border-radius: var(--radius); background: #eee; }
.thumbs { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.thumbs button { padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; width: 72px; height: 54px; cursor: pointer; background: none; }
.thumbs button.on { border-color: var(--ink); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.details h1 { margin: 0; font-size: 1.6rem; }
.price { font-size: 1.5rem; font-weight: 700; margin: 4px 0 12px; }
.price.free { color: var(--free); }
.price.sale { color: var(--sale); }
dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 0 0 14px; }
dt { color: var(--muted); }
dd { margin: 0; }
.desc { margin-bottom: 16px; }
code { background: #f1ede6; padding: 1px 6px; border-radius: 4px; }
.btn { display: inline-block; background: var(--ink); color: #fff; border: 0; border-radius: 10px; padding: 10px 18px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.pay { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 16px; }
.pay p { margin: 8px 0 0; font-size: .9rem; }
.muted { color: var(--muted); }
.request { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: grid; gap: 10px; }
.request h3 { margin: 0; }
.request label { display: grid; gap: 4px; font-size: .9rem; }
.request input, .request textarea { font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
.hp { display: none; }
.gone-note { font-weight: 600; }
.foot { color: var(--muted); font-size: .85rem; padding: 40px 16px; text-align: center; }
.paylabel { margin: 0 0 8px !important; font-weight: 600; }
.paybtns { display: flex; gap: 8px; flex-wrap: wrap; }
