:root {
  --blue: #0868c9;
  --blue-dark: #063c9c;
  --blue-soft: #bfe5ff;
  --orange: #ff6b12;
  --green: #62be2f;
  --text: #17345d;
  --shadow: 0 16px 30px rgba(34, 85, 130, .13);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top, #fff 0, #fff 42%, #f7fbff 100%);
}

.memory-site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 16px clamp(16px, 4vw, 42px);
  background: rgba(255, 255, 255, .93);
  border-bottom: 1px solid #d9ecfb;
  backdrop-filter: blur(12px);
}

.memory-back,
.print-all {
  justify-self: start;
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(8, 104, 201, .18);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.print-all { justify-self: end; }

.memory-brand,
.sheet-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: "Libre Franklin", sans-serif;
  font-weight: 800;
  letter-spacing: -.04em;
}

.memory-brand strong,
.sheet-logo strong {
  color: var(--orange);
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1;
}

.memory-brand strong span,
.sheet-logo strong span { color: var(--blue); }
.memory-book { width: clamp(52px, 7vw, 82px); }
.memory-book svg { display: block; width: 100%; }
.book-left { fill: #0c82d8; }
.book-right { fill: #68bf36; }
.book-base { fill: none; stroke: var(--orange); stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.book-mark { font-size: clamp(28px, 4vw, 46px); }

.memory-page {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto 70px;
}

.memory-intro {
  padding: 40px 0 24px;
  text-align: center;
}

.memory-intro span {
  color: var(--orange);
  font-weight: 900;
  letter-spacing: .14em;
  font-size: 14px;
}

.memory-intro h1 {
  margin: 8px 0 10px;
  font-family: "Libre Franklin", sans-serif;
  font-size: clamp(36px, 6vw, 64px);
  color: var(--blue-dark);
  letter-spacing: -.05em;
}

.memory-intro p {
  margin: 0 auto;
  max-width: 760px;
  font-size: clamp(16px, 2vw, 20px);
  color: #46617d;
}

.memory-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 10px 0 36px;
}

.memory-tabs a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 2px solid #d7efff;
  border-radius: 999px;
  padding: 8px 18px;
  color: var(--blue-dark);
  background: #fff;
  font-weight: 900;
  text-decoration: none;
}

.memory-sheet {
  page-break-inside: avoid;
  margin: 0 auto 42px;
  padding: clamp(22px, 3vw, 38px);
  border: 1px solid #dff1ff;
  border-radius: 36px;
  background: #fff;
  box-shadow: var(--shadow);
}

.sheet-title {
  margin: 18px auto 24px;
  font-family: "Libre Franklin", sans-serif;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.08;
  text-align: center;
  color: var(--blue-dark);
  letter-spacing: -.05em;
}

.memory-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(10px, 1.7vw, 22px);
}

.memory-card {
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  align-content: center;
  gap: clamp(4px, .8vw, 10px);
  min-width: 0;
  overflow: hidden;
  border: clamp(4px, .6vw, 7px) solid var(--blue-soft);
  border-radius: clamp(16px, 2.2vw, 30px);
  background: linear-gradient(180deg, #fff 0%, #fefefe 60%, #f8fdff 100%);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.memory-card:hover {
  transform: scale(1.04);
}

.icon-img { font-size: clamp(48px, 8vw, 96px); line-height: 1; }

@media (max-width: 760px) {
  .memory-site-header { grid-template-columns: 1fr; text-align: center; }
  .memory-back, .print-all { justify-self: center; }
  .memory-grid { grid-template-columns: repeat(3, 1fr); }
}
