/* Page-specific styles for cards.html. */
:root {
  --bg:#f6f0e4;
  --paper:#fffaf0;
  --ink:#2b2926;
  --line:#d9cdb8;
  --accent:#263746
}

* {
  box-sizing:border-box
}

html {
  scroll-behavior:smooth
}

body {
  margin:0;
  background:var(--bg);
  color:var(--ink);
  font-family:"BIZ UDPGothic","Yu Gothic UI","Yu Gothic",Meiryo,sans-serif;
  font-size:17px;
  line-height:1.7
}

header {
  position:sticky;
  top:0;
  z-index:5;
  background:#f6f0e4f2;
  border-bottom:1px solid var(--line);
  padding:12px 18px
}

header strong {
  font-size:1.25rem
}

nav {
  float:right
}

nav a {
  margin-left:14px;
  color:var(--ink)
}

main {
  max-width:1180px;
  margin:auto;
  padding:20px
}

.notice {
  background:#fff;
  border:1px solid var(--line);
  border-radius:14px;
  padding:14px 16px;
  margin-bottom:22px
}

h2 {
  font-size:1.65rem;
  margin:32px 0 12px
}

.count {
  font-size:.9rem;
  font-weight:400
}

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

.card {
  background:var(--paper);
  border:1px solid var(--line);
  border-radius:16px;
  padding:16px;
  overflow:hidden
}

.badge {
  display:inline-block;
  background:var(--accent);
  color:#fff;
  border-radius:999px;
  padding:3px 9px;
  font-size:.78rem
}

h3 {
  font-size:1.15rem;
  line-height:1.45;
  margin:8px 0 12px;
  overflow-wrap:anywhere
}

.pair {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px
}

figure {
  margin:0
}

.zoomable {
  display:block;
  border-radius:10px;
  overflow:hidden;
  background:#e8e1d4
}

figure img {
  display:block;
  width:100%;
  height:100%;
  object-fit:contain;
  background:#e8e1d4
}

.deresute figure .zoomable {
  aspect-ratio:1280/824
}

.mobamas figure .zoomable {
  aspect-ratio:3/4
}

figcaption {
  text-align:center;
  font-size:.82rem;
  margin-top:4px
}

.info {
  display:grid;
  gap:8px;
  margin:14px 0
}

.info>div {
  display:grid;
  grid-template-columns:110px 1fr;
  gap:10px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:10px;
  padding:10px
}

.info b {
  font-size:.83rem
}

.info span {
  font-size:.94rem
}

details {
  border-top:1px solid var(--line);
  padding:10px 0
}

summary {
  cursor:pointer;
  font-weight:700;
  padding:7px 2px
}

.speech {
  margin:12px 0 18px
}

.speech h5 {
  font-size:1rem;
  margin:8px 0
}

.quote {
  background:#fff;
  border:1px solid var(--line);
  border-radius:10px;
  padding:10px 12px;
  margin:7px 0;
  white-space:pre-wrap
}

footer {
  padding:30px;
  text-align:center;
  font-size:.8rem
}

/* CSS-only lightbox */
.lightbox {
  display:none;
  position:fixed;
  inset:0;
  z-index:100;
  background:rgba(15,18,20,.92);
  padding:18px
}

.lightbox:target {
  display:flex;
  align-items:center;
  justify-content:center
}

.lightbox-bg {
  position:absolute;
  inset:0
}

.lightbox-inner {
  position:relative;
  z-index:1;
  max-width:min(96vw,1200px);
  max-height:94vh;
  display:flex;
  align-items:center;
  justify-content:center
}

.lightbox-inner img {
  max-width:96vw;
  max-height:92vh;
  width:auto;
  height:auto;
  object-fit:contain;
  border-radius:8px;
  background:#111
}

.close {
  position:absolute;
  right:-2px;
  top:-44px;
  color:white;
  text-decoration:none;
  font-size:2rem;
  line-height:1
}

#close {
  display:none
}

@media(max-width:760px) {
  body {
    font-size:16px
  }

  header {
    padding:10px 12px
  }

  main {
    padding:12px
  }

  .grid {
    grid-template-columns:1fr;
    gap:14px
  }

  .card {
    padding:12px
  }

  .pair {
    gap:6px
  }

  h3 {
    font-size:1.05rem
  }

  .info>div {
    grid-template-columns:1fr;
    gap:3px
  }

  .quote {
    font-size:.96rem;
    padding:10px
  }

  .mobamas .pair {
    grid-template-columns:1fr 1fr
  }

  .mobamas figure .zoomable {
    aspect-ratio:3/4
  }

  .deresute figure .zoomable {
    aspect-ratio:1280/824
  }

  .lightbox {
    padding:10px
  }

  .lightbox-inner img {
    max-width:98vw;
    max-height:90vh
  }

}
