:root { --navy:#1d3f94; --bg:#f6f4ef; --ink:#222; }
* { box-sizing:border-box; margin:0; }
body { font-family:'Malgun Gothic','Apple SD Gothic Neo',sans-serif; background:var(--bg); color:var(--ink); }
header { background:var(--navy); color:#fff; padding:16px 20px; display:flex; flex-wrap:wrap; gap:12px; align-items:center; position:sticky; top:0; z-index:5; }
h1 { font-size:1.3rem; }
h1 .sub { font-size:.85rem; font-weight:normal; opacity:.8; margin-left:8px; }
.credit { margin-left:auto; font-weight:bold; font-size:1.15rem; letter-spacing:.5px; }
.filters { display:flex; gap:8px; flex-wrap:wrap; width:100%; }
.filters select,.filters input { padding:8px 10px; border-radius:8px; border:none; font-size:.9rem; }
.grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(240px,1fr)); gap:16px; padding:20px; max-width:1200px; margin:0 auto; }
.card { background:#fff; border-radius:14px; overflow:hidden; box-shadow:0 2px 8px rgba(0,0,0,.08); cursor:pointer; transition:transform .15s; }
.card:hover { transform:translateY(-3px); }
.card img { width:100%; display:block; aspect-ratio:3/4; object-fit:cover; }
.card .info { padding:10px 12px 12px; }
.card .t { font-size:.92rem; font-weight:bold; line-height:1.35; }
.card .m { font-size:.78rem; color:#777; margin-top:6px; }
.chip { background:#eef1fa; color:var(--navy); border-radius:20px; padding:1px 8px; margin-left:4px; }
.modal { position:fixed; inset:0; background:rgba(0,0,0,.6); display:flex; justify-content:center; align-items:flex-start; overflow:auto; padding:24px 10px; z-index:10; }
.modal.hidden,.hidden { display:none; }
.modal-box { background:#fff; border-radius:16px; max-width:720px; width:100%; position:relative; padding:20px; }
.m-close { position:absolute; top:10px; right:14px; font-size:1.6rem; background:none; border:none; cursor:pointer; color:#888; }
.m-head h2 { font-size:1.1rem; padding-right:30px; }
.m-meta { font-size:.85rem; color:#777; margin:6px 0 10px; }
.m-meta a { color:var(--navy); }
.variants { display:flex; gap:6px; flex-wrap:wrap; margin-bottom:8px; }
.variants button { padding:5px 12px; border-radius:16px; border:1px solid var(--navy); background:#fff; color:var(--navy); cursor:pointer; font-size:.82rem; }
.variants button.on { background:var(--navy); color:#fff; }
.toggle { padding:6px 12px; border-radius:8px; border:1px solid #ccc; background:#fafafa; cursor:pointer; font-size:.82rem; margin-bottom:10px; }
.article { white-space:pre-wrap; font-size:.88rem; line-height:1.6; background:#f8f8f5; border-radius:10px; padding:14px; margin-bottom:12px; max-height:340px; overflow:auto; font-family:inherit; }
#m-img { width:100%; border-radius:10px; }
footer { text-align:center; padding:24px; font-size:.8rem; color:#999; }
@media (max-width:600px){ .filters{ width:100%; } .filters input{ flex:1; } }
