/* OUJI Illustrated guides. Keep original poster artwork at its full 4:5 ratio. */
.ax--illustrated {
  --ax-paper: #fcfdfd;
  --ax-paper-2: #f0f7f7;
  --ax-card: #fff;
  --ax-ink: #17343d;
  --ax-muted: #4b6169;
  --ax-hair: #dce7e7;
  --ax-stamp: #205864;
  --ax-wash: #e8f5f5;
  --ax-f-display: var(--ax-f-ui);
  --ax-f-read: var(--ax-f-ui);
  --ax-width: 1080px;
  --ax-journal-art: url("/assets/images/home-codex/notes/stickers/journal.webp");
  --ax-search-art: url("/assets/images/home-codex/notes/stickers/search.webp");
  --ax-skincare-art: url("/assets/images/home-codex/notes/stickers/skincare.webp");
  --ax-makeup-art: url("/assets/images/home-codex/notes/stickers/makeup.webp");
  --ax-shopping-art: url("/assets/images/home-codex/notes/stickers/shopping.webp");
  display: flow-root;
  position: relative;
  isolation: isolate;
  background:
    repeating-linear-gradient(0deg, #5b93b019 0 1px, transparent 1px 26px),
    repeating-linear-gradient(90deg, #5b93b019 0 1px, transparent 1px 26px),
    radial-gradient(ellipse 53rem 72rem at 3% 12rem, #b7dfef, transparent),
    radial-gradient(ellipse 57rem 64rem at 99% 42%, #d7cfee, transparent),
    linear-gradient(90deg, #dbedf5, #f4fafc 42% 58%, #ebe4f7),
    var(--ax-paper);
}

/* Artwork stays inside the outer margins, even when the article column narrows. */
@media (min-width: 1350px) {
  .ax--illustrated::before,
  .ax--illustrated::after {
    content: "";
    position: absolute;
    inset-block: 0;
    z-index: -1;
    width: max(0px, calc((100% - var(--ax-width)) / 2));
    pointer-events: none;
    background-repeat: no-repeat;
  }
  .ax--illustrated::before {
    inset-inline-start: 0;
    background-image:
      var(--ax-search-art), var(--ax-skincare-art),
      radial-gradient(ellipse 44% 42% at 51% 50%, #f2fcff 25%, #b9dced 81%, #a7cfe252 96%, transparent),
      radial-gradient(ellipse 46% 44% at 52% 48%, #f5fdff 24%, #bfdfed 82%, #a7cfe244 96%, transparent);
    background-position: 57% clamp(122px, 12vw, 250px), 60% 34%, 52% 112px, 60% 34%;
    background-size: min(76%, 258px) auto, min(70%, 217px) auto,
      min(99%, 400px) 375px, min(92%, 355px) 335px;
  }
  .ax--illustrated::after {
    inset-inline-end: 0;
    background-image:
      var(--ax-makeup-art), var(--ax-shopping-art),
      radial-gradient(ellipse 45% 44% at 50% 50%, #fbf6ff 25%, #d9c7eb 81%, #c1a8e359 96%, transparent),
      radial-gradient(ellipse 46% 43% at 50% 50%, #fcf8ff 24%, #dbcaef 82%, #c1a8e349 96%, transparent);
    background-position: 47% clamp(250px, 16vw, 365px), 44% 57%, 47% 227px, 44% 57%;
    background-size: min(72%, 246px) auto, min(73%, 235px) auto,
      min(99%, 382px) 414px, min(94%, 366px) 348px;
  }
}

.ax--illustrated .ax-cover {
  width: min(calc(100% - 2 * var(--ax-gut)), var(--ax-width));
  max-width: none;
  margin: clamp(14px, 2.5vw, 30px) auto 0;
  padding: clamp(18px, 4vw, 48px);
  gap: clamp(20px, 4vw, 48px);
  position: relative;
  isolation: isolate;
  background:
    radial-gradient(ellipse at 10% 92%, #cfebf7, transparent 65%),
    radial-gradient(ellipse at 96% 4%, #e4e0f8, transparent 55%),
    linear-gradient(144deg, #f6fdfe, #edf7fd 67%, #f8faff);
  border: 1px solid #dbe9eb;
  border-radius: 18px;
}
.ax--illustrated .ax-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background-image:
    linear-gradient(#5996ad29 1px, transparent 1px),
    linear-gradient(90deg, #5996ad29 1px, transparent 1px);
  background-size: 23px 23px;
  mask-image: radial-gradient(ellipse at 10% 82%, #000 5%, transparent 64%);
  pointer-events: none;
}
.ax--illustrated .ax-cover > div::after {
  content: "";
  display: block;
  width: clamp(108px, 14vw, 160px);
  aspect-ratio: 360 / 337;
  margin: 6px clamp(7px, 2vw, 24px) -10px auto;
  background: var(--ax-journal-art) center / contain no-repeat;
  filter: drop-shadow(0 5px 6px #4e799324);
}
.ax--illustrated .ax-h1 {
  max-width: 12em;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1.13;
  letter-spacing: -.035em;
}
.ax--illustrated .ax-cover .ax-dek { max-width: 31em; color: var(--ax-muted); }
.ax--illustrated .ax-cover .ax-by { margin-top: 16px; }
.ax--illustrated .ax-issue { letter-spacing: .04em; }
.ax--illustrated .ax-issue span { border-radius: 999px; background: #fff; }
.ax--illustrated .ax-cover-art,
.ax--illustrated .ax-product-poster { margin: 0; min-width: 0; }
.ax--illustrated .ax-poster-zoom { display: block; color: var(--ax-stamp); text-decoration: none; }
.ax--illustrated .ax-poster-zoom img {
  width: 100%;
  height: auto;
  border-radius: 9px;
  box-shadow: 0 3px 14px #1b4d5f12;
}
.ax--illustrated .ax-poster-zoom__label {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  font: 700 13px/1.4 var(--ax-f-ui);
}
.ax--illustrated .ax-poster-zoom:hover .ax-poster-zoom__label {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.ax--illustrated .ax-illustrated-actions,
.ax--illustrated .ax-card__actions { display: flex; flex-wrap: wrap; gap: 6px 10px; }
.ax--illustrated .ax-illustrated-action,
.ax--illustrated .ax-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--ax-stamp);
  border-radius: 8px;
  background: var(--ax-stamp);
  color: #fff;
  font: 700 14px/1.4 var(--ax-f-ui);
  text-decoration: none;
  cursor: pointer;
}
.ax--illustrated .ax-illustrated-action--secondary { background: transparent; color: var(--ax-stamp); }
.ax--illustrated .ax-add[hidden] { display: none; }
.ax--illustrated .ax-add:disabled { background: #476a72; border-color: #476a72; cursor: default; }
.ax--illustrated :is(a, button):focus-visible { outline: 2px solid #0e6677; outline-offset: 3px; }
.ax--illustrated .ax-illustrated-action:hover,
.ax--illustrated .ax-add:not(:disabled):hover { box-shadow: inset 0 0 0 1px currentColor; }

.ax--illustrated .ax-body {
  display: block;
  max-width: calc(var(--ax-width) + 2 * var(--ax-gut));
  padding-bottom: 56px;
}
.ax--illustrated .ax-body > .ax-col { max-width: none; margin: 0; }
.ax--illustrated .ax-illustrated-band {
  display: grid;
  gap: clamp(20px, 4vw, 42px);
  align-items: center;
  margin: clamp(32px, 5vw, 64px) 0;
}
.ax--illustrated .ax-illustrated-band--compare {
  padding: clamp(16px, 4vw, 38px);
  border: 1px solid var(--ax-hair);
  border-radius: 18px;
  background: radial-gradient(ellipse at 100% 92%, #eaf6fc, transparent 70%), #fff;
}
.ax--illustrated .ax-illustrated-band__copy { min-width: 0; }
.ax--illustrated .ax-sec { margin: 0 0 14px; }
.ax--illustrated .ax-sec small { letter-spacing: .04em; color: var(--ax-stamp); }
.ax--illustrated .ax-sec small:empty { display: none; }
.ax--illustrated .ax-sec h2 { padding-bottom: 0; border: 0; text-wrap: pretty; }
.ax--illustrated .ax-illustrated-band p { margin-bottom: 16px; }
.ax--illustrated .ax-illustrated-band .ax-figure { margin: 0; }
.ax--illustrated .ax-illustrated-band .ax-figure img {
  width: 100%;
  height: auto;
  margin-inline: auto;
  border-radius: 10px;
}
.ax--illustrated .ax-illustrated-band .ax-figure figcaption { max-width: 100%; margin-inline: auto; }
.ax--illustrated .ax-picks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.ax--illustrated :is(.ax-pick, .ax-card) { --ax-tint: #e7f5ef; --ax-accent: #286052; }
.ax--illustrated :is(.ax-picks li:nth-child(2) .ax-pick, .ax-card:nth-child(2)) { --ax-tint: #f9ecf0; --ax-accent: #89425c; }
.ax--illustrated :is(.ax-picks li:nth-child(3) .ax-pick, .ax-card:nth-child(3)) { --ax-tint: #faf3dc; --ax-accent: #745a17; }
.ax--illustrated :is(.ax-picks li:nth-child(4) .ax-pick, .ax-card:nth-child(4)) { --ax-tint: #f0ecfa; --ax-accent: #624a87; }
.ax--illustrated .ax-pick {
  position: relative;
  display: grid;
  gap: 3px;
  min-height: 82px;
  padding: 10px 24px 10px 12px;
  border-radius: 8px;
  background: var(--ax-tint);
  color: var(--ax-ink);
  text-decoration: none;
}
.ax--illustrated .ax-pick:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.ax--illustrated .ax-pick::after {
  content: "↘";
  position: absolute;
  top: 10px;
  right: 10px;
  color: var(--ax-accent);
}
.ax--illustrated .ax-pick__number { font: 800 13px/1.35 var(--ax-f-ui); color: var(--ax-accent); }
.ax--illustrated .ax-pick strong { font: 800 17px/1.35 var(--ax-f-ui); }
.ax--illustrated .ax-pick small { font: 500 12px/1.35 var(--ax-f-ui); color: var(--ax-muted); }

.ax--illustrated .ax-grid--illustrated {
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(24px, 4vw, 48px);
  max-width: none;
  margin: 24px 0 0;
}
.ax--illustrated .ax-grid--illustrated .ax-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto;
  gap: clamp(12px, 4vw, 52px);
  align-items: center;
  padding: clamp(12px, 3vw, 34px);
  border: 1px solid var(--ax-hair);
  border-radius: 18px;
  background: #fff;
  overflow: visible;
}
.ax--illustrated .ax-grid--illustrated .ax-card__body {
  gap: 12px;
  padding: clamp(14px, 2.5vw, 28px);
  border-top: 3px solid var(--ax-accent);
  border-radius: 0 0 12px 12px;
  background: linear-gradient(145deg, #fff, var(--ax-tint));
}
.ax--illustrated .ax-grid--illustrated .ax-strip {
  justify-content: flex-start;
  align-items: center;
  gap: 3px 7px;
  padding: 0;
  border: 0;
  letter-spacing: 0;
}
.ax--illustrated .ax-strip span:first-child {
  padding: 4px 8px;
  border-radius: 99px;
  color: var(--ax-accent);
  background: #fff;
}
.ax--illustrated .ax-grid--illustrated .ax-card__name { font-size: clamp(23px, 3vw, 34px); line-height: 1.34; }
.ax--illustrated .ax-grid--illustrated .ax-card__name a:hover { text-decoration: underline; text-underline-offset: 3px; }
.ax--illustrated .ax-grid--illustrated .ax-card__why { margin: 0; font-size: 16px; line-height: 1.75; }
.ax--illustrated .ax-card__notes { margin: 0; }
.ax--illustrated .ax-card__notes > div {
  padding: 9px 0;
  border-top: 1px solid var(--ax-hair);
}
.ax--illustrated .ax-card__notes > div:last-child { padding-bottom: 0; }
.ax--illustrated .ax-card__notes dt {
  color: var(--ax-accent);
  font: 800 13px/1.5 var(--ax-f-ui);
}
.ax--illustrated .ax-card__notes dd {
  margin: 4px 0 0;
  color: var(--ax-ink);
  font: 400 15px/1.7 var(--ax-f-ui);
}
.ax--illustrated .ax-grid--illustrated .ax-card__foot {
  display: grid;
  justify-content: start;
  gap: 8px;
  margin-top: 4px;
  padding-top: 14px;
}
.ax--illustrated .ax-card__actions .ax-go {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 3px;
  border: 0;
  color: var(--ax-stamp);
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: normal;
}
.ax--illustrated .ax-related {
  background: linear-gradient(110deg, #f0f9fbea, #fbfaffee);
  border-top: 1px solid #c5dce8;
}

@media (min-width: 760px) {
  .ax--illustrated .ax-cover,
  .ax--illustrated .ax-illustrated-band--compare {
    grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr);
    align-items: center;
  }
  .ax--illustrated .ax-illustrated-band { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ax--illustrated .ax-illustrated-band--usage .ax-figure { grid-column: 1; grid-row: 1; }
  .ax--illustrated .ax-illustrated-band--usage .ax-illustrated-band__copy { grid-column: 2; grid-row: 1; }
  .ax--illustrated .ax-grid--illustrated .ax-card {
    grid-template-columns: minmax(0, 1.23fr) minmax(0, .77fr);
  }
}

@media (max-width: 759px) {
  .ax--illustrated .ax-cover { padding: 0; }
  .ax--illustrated .ax-cover > div { padding: 16px 16px 0; }
  .ax--illustrated .ax-cover > div::after { display: none; }
  .ax--illustrated .ax-cover .ax-by {
    min-height: 64px;
    padding-inline-end: 78px;
    padding-block: 11px;
    background: var(--ax-journal-art) right center / 68px auto no-repeat;
  }
  .ax--illustrated .ax-cover .ax-cover-art,
  .ax--illustrated .ax-illustrated-band--compare .ax-figure,
  .ax--illustrated .ax-product-poster { margin-inline: -1px; }
  .ax--illustrated .ax-cover-art .ax-poster-zoom__label { padding-inline: 12px; }
  .ax--illustrated .ax-illustrated-band--compare { padding: 0; overflow: hidden; }
  .ax--illustrated .ax-illustrated-band--compare .ax-illustrated-band__copy { padding: 16px 16px 0; }
  .ax--illustrated .ax-illustrated-band--compare .ax-poster-zoom__label { padding-inline: 12px; }
  .ax--illustrated .ax-grid--illustrated .ax-card { padding: 0; gap: 0; }
  .ax--illustrated .ax-grid--illustrated .ax-card__body { margin: 0 12px 12px; }
  .ax--illustrated .ax-product-poster .ax-poster-zoom__label { padding-inline: 12px; }
}
