:root { --ink:#18202b; --muted:#647083; --paper:#f4f6f8; --line:#dde4ea; --blue:#1f4e79; --blue-deep:#173e61; }
* { box-sizing:border-box; }
body { margin:0; background:var(--paper); color:var(--ink); font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif; }
.wrap { width:min(1120px,calc(100% - 40px)); margin:0 auto; }
.site-header { background:#fff; border-bottom:1px solid var(--line); }
.header-inner { min-height:78px; display:flex; align-items:center; justify-content:space-between; gap:24px; }
.brand { display:flex; flex-direction:column; color:var(--ink); text-decoration:none; }
.brand-name { font-size:20px; font-weight:800; letter-spacing:-.02em; }
.tagline { margin-top:2px; color:var(--muted); font-size:13px; }
nav { display:flex; gap:22px; }
nav a { color:var(--muted); text-decoration:none; font-size:15px; }
nav a:hover, nav a.active { color:var(--blue); }
.market-hero { background:#eef3f8; border-bottom:1px solid var(--line); padding:64px 0 58px; }
.eyebrow { margin:0 0 10px; color:var(--blue); font-size:12px; font-weight:800; letter-spacing:.12em; text-transform:uppercase; }
.market-hero h1 { margin:0; max-width:750px; font-size:48px; line-height:1.05; letter-spacing:-.045em; }
.hero-copy { max-width:620px; margin:18px 0 0; color:var(--muted); font-size:18px; }
.market { padding:42px 0 68px; }
.market-toolbar { display:flex; justify-content:space-between; align-items:end; margin-bottom:20px; }
.count { margin:0; color:var(--muted); font-size:14px; }
.filter-label { display:grid; gap:6px; color:var(--muted); font-size:12px; font-weight:700; }
select { min-width:180px; border:1px solid #ccd6df; border-radius:8px; background:#fff; color:var(--ink); padding:9px 35px 9px 11px; font:inherit; }
.market-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px; }
.market-card { overflow:hidden; background:#fff; border:1px solid var(--line); border-radius:14px; transition:transform .18s ease, box-shadow .18s ease; }
.market-card:hover { transform:translateY(-3px); box-shadow:0 14px 30px rgba(28,36,48,.10); }
.template-image { display:block; width:100%; aspect-ratio:16/10; object-fit:cover; background:#dde4ea; }
.card-body { padding:16px; }
.category { margin:0 0 6px; color:var(--blue); font-size:11px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
.card-title-row { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.card-title-row h2 { margin:0; font-size:20px; letter-spacing:-.02em; }
.price { color:var(--ink); font-size:16px; font-weight:800; white-space:nowrap; }
.description { min-height:48px; margin:9px 0 14px; color:var(--muted); font-size:14px; }
.buy-btn { display:flex; width:100%; align-items:center; justify-content:center; border-radius:8px; background:var(--blue); color:#fff; padding:11px 16px; font-weight:800; text-decoration:none; }
.buy-btn:hover { background:var(--blue-deep); }
.buy-btn.pending { background:#778397; }
.card-actions { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.detail-btn { border:1px solid #b9c5d0; border-radius:8px; background:#fff; color:var(--blue); padding:11px 16px; font:inherit; font-weight:800; cursor:pointer; }
.detail-btn:hover { background:#eef3f7; }
.modal-open { overflow:hidden; }
.modal { position:fixed; inset:0; z-index:50; display:grid; place-items:center; padding:20px; }
.modal[hidden] { display:none; }
.modal-backdrop { position:absolute; inset:0; background:rgba(15,23,42,.58); }
.modal-card { position:relative; width:min(520px,100%); max-height:calc(100vh - 40px); overflow:auto; border-radius:16px; background:#fff; box-shadow:0 24px 60px rgba(15,23,42,.28); padding:22px; }
.modal-close { position:absolute; top:10px; right:12px; width:36px; height:36px; border:0; border-radius:50%; background:#edf1f5; color:var(--ink); font-size:24px; line-height:1; cursor:pointer; }
.modal-card h2 { margin:0 42px 12px 0; font-size:26px; }
.detail-image { display:block; width:100%; aspect-ratio:16/9; object-fit:cover; border-radius:10px; background:#dde4ea; }
.detail-description { max-height:72px; margin:14px 0; color:var(--muted); font-size:15px; line-height:1.5; }
.modal-actions { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.modal-actions .buy-btn { width:auto; min-width:150px; }
footer { border-top:1px solid var(--line); background:#fff; color:var(--muted); padding:22px 0; font-size:14px; }
.status { grid-column:1/-1; color:var(--muted); text-align:center; padding:40px 20px; }
@media (max-width:800px) { .header-inner { align-items:flex-start; flex-direction:column; padding:15px 0; } nav { flex-wrap:wrap; } .market-hero { padding:44px 0; } .market-hero h1 { font-size:36px; } .market-grid { grid-template-columns:1fr; } .market-toolbar { align-items:flex-start; gap:16px; } }
