:root {
  --accent: #FF6B35;
  --accent2: #FFD23F;
  --accent3: #4ECDC4;
  --bg: #FFFDF7;
  --surface: #FFFFFF;
  --text: #1A1A2E;
  --text-muted: #6B6B8A;
  --border: #E8E4D9;
  --shadow: rgba(26,26,46,0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Zen Maru Gothic', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* ── HEADER ── */
header {
  position: relative;
  background: var(--text);
  padding: 0;
  overflow: hidden;
}

.header-logo-wrap {
  width: 100%;
  line-height: 0;
}

.header-main {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 20px 40px 24px;
}

.paper-badge {
  background: var(--accent2);
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  padding: 4px 10px;
  border-radius: 4px;
  letter-spacing: 0.05em;
  white-space: nowrap;
  transform: rotate(-2deg);
  display: inline-block;
}

.header-logo {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.header-sub {
  font-size: 15px;
  color: rgba(255,255,255,0.55);
  margin-top: 6px;
  padding-bottom: 10px;
  letter-spacing: 0.03em;
}

/* ── MAIN ── */
main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

/* ── GRID ── */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

/* ── CARD ── */
.card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  display: block;
  color: inherit;
}

.card-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 3/2;
  overflow: hidden;
  background: #F0EDE4;
}
.card-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
  object-position: center top;
}

/* placeholder when no image */
.card-thumb-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 48px;
  background: linear-gradient(135deg, #F0EDE4 0%, #E8E4D9 100%);
}

.card-num-badge {
  position: absolute;
  top: 12px; left: 12px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  letter-spacing: 0.05em;
}

.card-body {
  padding: 16px 18px 18px;
}

.card-date {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-bottom: 6px;
  padding: 0px 10px;
}

.card-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--text);
  margin-bottom: 14px;
  padding: 0px 10px;
}

.card-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  font-family: 'Zen Maru Gothic', sans-serif;
  padding: 8px 0;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: filter 0.15s, transform 0.1s;
}
.btn:hover { filter: brightness(0.92); }
.btn:active { transform: scale(0.97); }

.btn-pdf {
  background: #FFEAE1;
  color: #C0391B;
}
.btn-img {
  background: #E1F7F5;
  color: #0E8F87;
}

/* ── ADD CARD ── */
.card-add {
  border-style: dashed;
  border-color: #CCC8BE;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  gap: 8px;
  color: var(--text-muted);
  font-size: 14px;
  transition: border-color 0.2s, background 0.2s;
}
.card-add:hover {
  border-color: var(--accent);
  background: #FFF8F5;
  transform: translateY(-2px);
}
.add-icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 2px dashed #CCC8BE;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  color: #CCC8BE;
  margin-bottom: 4px;
  transition: border-color 0.2s, color 0.2s;
}
.card-add:hover .add-icon {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── FOOTER ── */
footer {
  text-align: center;
  padding: 24px;
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

@media (max-width: 600px) {
  .header-main { padding: 20px; gap: 12px; }
  .header-count { display: none; }
  main { padding: 24px 16px 60px; }
  .grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .card-body { padding: 12px 12px 14px; }
  .card-title { font-size: 13px; }
  .btn { font-size: 11px; padding: 7px 0; }
}
