/* =========================
   1) Theme (colors, fonts)
========================= */
:root{
  --bg:#070707;
  --panel:#0c0c0c;
  --text:#f5f5f5;
  --muted:#c9c9c9;
  --line:#e0a21a;   /* オレンジ/金 */
  --line2:#2a2a2a;  /* うすい境界 */

  --wrap-x: 40px;   /* PC時の左右余白 */
  --wrap-y: 16px;
}

body, button, input, select, textarea{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", "MS Mincho", serif;
}

/* =========================
   2) Layout helpers
========================= */
.wrap{
  padding: var(--wrap-y) var(--wrap-x);
}

h1{
  margin: 8px 0 16px;
  letter-spacing: .06em;
}

/* =========================
   3) Side lines (decoration)
========================= */
body::before,
body::after{
  content:"";
  position: fixed;
  top: 14px;
  bottom: 14px;
  width: 1px;
  background: var(--line);
  opacity: .85;
  pointer-events: none;
  z-index: 9999;
}
body::before{ left: 14px; }
body::after { right: 14px; }

/* =========================
   4) Controls (search/select/button)
========================= */
.controls input,
.controls select{
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line2);
}

.controls button{
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}

/* =========================
   5) Chips (filter buttons)
========================= */
.chip{
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line2);
  font-size: 14px;
  letter-spacing: .04em;
}

.chip.active{
  background: var(--line);
  color: #111;
  border-color: var(--line);
}

/* =========================
   6) Grid (cards container)
========================= */
.grid{
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* =========================
   7) Card
========================= */
.card{
  background: var(--panel);
  border: 1px solid var(--line2);
  border-radius: 16px;
  overflow: hidden; /* 角丸からのはみ出し防止 */
}

.card .pad{
  padding: 12px;
}

.card h2{
  color: var(--text);
  font-size: 18px;
  line-height: 1.25;
  margin: 0 0 6px;
}

.card .meta{
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

/* image: 外周の白枠を見せない用に少し内側を表示 */
.card img{
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: #000;
  display: block;
  clip-path: inset(2% 2% 2% 2%); /* 上 右 下 左 */
  border-bottom: 1px solid var(--line2);
}

/* =========================
   8) Tags (inside card)
========================= */
.tags{
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag{
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  line-height: 1;
  box-sizing: border-box;

  color: var(--text);
  border: 1px solid var(--line2);
  font-size: 12px;
}

/* =========================
   9) Responsive
========================= */
@media (max-width: 560px){
  :root{
    --wrap-x: 20px;
    --wrap-y: 14px;
  }

  .grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .card h2{ font-size: 15px; }
  .card .meta{ font-size: 12px; }
  .tag{ font-size: 11px; }
}

@media (max-width: 480px){
  :root{
    --wrap-x: 28px;
  }
}
