:root {
  color-scheme: light;
  --page-background: #fff6f3;
  --paper: #fffdf9;
  --paper-soft: #fffaf7;
  --footer-background: #faeef0;
  --text: #513e45;
  --accent: #79445d;
  --accent-soft: #c08c9b;
  --border: #e1c5ca;
  --focus: #986033;
}

html {
  min-width: 320px;
  background: var(--page-background);
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background: var(--page-background);
  font-family: "Noto Serif JP", "Yu Mincho", "Hiragino Mincho ProN", serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

img { max-width: 100%; }

.collection-header {
  padding: 24px 76px 24px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--paper-soft);
}

.collection-brand,
.collection-footer a { color: var(--accent); }

.collection-brand {
  font-size: 18px;
  text-decoration: none;
}

.collection-main {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 72px;
}

.collection-intro {
  margin-bottom: 40px;
  text-align: center;
}

.links-heading-ribbon,
.links-heading-icon {
  display: block;
  margin-inline: auto;
  object-fit: contain;
}

.links-heading-ribbon {
  width: 100px;
  height: 90px;
  margin-bottom: 12px;
}

.links-heading-icon {
  width: 68px;
  height: 68px;
}

.collection-kicker {
  color: #976175;
  font-size: 12px;
  letter-spacing: .2em;
}

.collection-intro h1 {
  margin: 12px 0;
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 500;
  letter-spacing: .15em;
}

.collection-intro p,
.collection-card p { line-height: 1.9; }

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

.collection-card {
  min-width: 0;
  padding: 28px;
  overflow-wrap: anywhere;
  border: 1px solid #e5cdd0;
  border-top: 3px solid var(--accent-soft);
  border-radius: 4px 20px;
  background: var(--paper) url('../images/sakura-decoration.png') no-repeat right 16px top 16px / 54px auto;
  box-shadow: 0 6px 20px #70475409;
}

.link-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.link-card__image {
  width: 96px;
  height: 96px;
  object-fit: contain;
}

.collection-card h2 {
  margin: 12px 0 16px;
  font-size: 23px;
  font-weight: 500;
  line-height: 1.6;
}

.collection-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
  padding-top: 12px;
}

.collection-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 20px;
  border: 1px solid #aa768a;
  border-radius: 24px;
  color: var(--accent);
  line-height: 1.6;
  text-decoration: none;
}

.collection-button:hover { background: #f8e6ec; }

.side-menu {
  position: fixed;
  top: 0;
  right: -360px;
  z-index: 999;
  width: min(340px, 100%);
  height: 100vh;
  height: 100dvh;
  padding: 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
  visibility: hidden;
  background: #aa0077;
  box-shadow: -2px 0 5px rgb(0 0 0 / 50%);
  transition: right .3s ease, visibility .3s;
}

.side-menu.open {
  right: 0;
  visibility: visible;
}

.menu-list {
  margin: 52px 0 12px;
  padding: 0;
  list-style: none;
  text-align: center;
}

.menu-list li { margin: 6px 0; }

.menu-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  max-width: 100%;
  color: #fff;
  font-size: 20px;
  line-height: 1.5;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.menu-icon-img {
  width: 30px;
  height: auto;
  margin-right: 10px;
  opacity: 0;
  transition: opacity .3s ease;
}

.menu-item:hover .menu-icon-img,
.menu-item:focus-visible .menu-icon-img { opacity: 1; }

.side-menu [aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 6px;
}

.collection-page a:focus-visible,
.menu-icon:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

.links-guide {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  max-width: 660px;
  margin: 36px auto 0;
}

.links-guide img {
  flex: 0 0 auto;
  width: 76px;
  height: 106px;
  object-fit: contain;
}

.links-guide p {
  min-width: 0;
  margin: 0;
  font-size: 14px;
  line-height: 2;
  overflow-wrap: anywhere;
}

.collection-footer {
  padding: 28px 20px;
  border-top: 1px solid var(--border);
  background: var(--footer-background);
  line-height: 2;
  text-align: center;
}

.illustrated-home {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  width: min(240px, 100%);
  padding: 12px 24px 16px;
  border-radius: 50% 50% 24px 24px;
  background: radial-gradient(ellipse at center, #f0d5df 0%, var(--footer-background) 72%);
  text-decoration: none;
  transition: transform .2s ease;
}

.illustrated-home img {
  display: block;
  width: 100%;
  height: 116px;
  object-fit: contain;
}

.illustrated-home span {
  margin-top: 8px;
  border-bottom: 1px solid #b27d93;
  font-size: 16px;
  letter-spacing: .1em;
}

.illustrated-home:hover { transform: translateY(-4px); }

@media (max-width: 640px) {
  .collection-header { padding-left: 16px; }
  .collection-brand { font-size: 16px; }

  .collection-main {
    width: calc(100% - 32px);
    padding: 20px 0 40px;
  }

  .links-heading-ribbon {
    width: 80px;
    height: 72px;
  }

  .links-heading-icon {
    width: 56px;
    height: 56px;
  }

  .collection-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .collection-card { padding: 20px; }
  .collection-card h2 { font-size: 21px; }
  .links-guide { gap: 12px; }

  .links-guide img {
    width: 60px;
    height: 86px;
  }

  .links-guide p { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .side-menu,
  .menu-icon-img,
  .illustrated-home { transition: none; }
  .illustrated-home:hover { transform: none; }
}
