.search-topics > summary, .result-shortcut { display: none; }

:root {
  --return-size: 48px;
  --return-inset: clamp(14px, 2.2vw, 32px);
}
.issue-back-to-top {
  position: fixed;
  right: calc(var(--return-inset) + env(safe-area-inset-right, 0px));
  bottom: calc(var(--return-inset) + env(safe-area-inset-bottom, 0px));
  display: grid;
  place-items: center;
  box-sizing: border-box;
  width: var(--return-size);
  height: var(--return-size);
  padding: 0;
  border: 1px solid #aa9597;
  border-radius: 50%;
  background: #faf7f0;
  color: #792333;
  box-shadow: 0 2px 6px rgb(46 26 29 / 10%);
  cursor: pointer;
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 200ms ease-out, transform 200ms ease-out, visibility 0s;
}
.issue-back-to-top:disabled {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition-delay: 0s, 0s, 200ms;
}
.issue-back-to-top:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
/* The sticky header is already in view when keyboard focus moves through it. */
html:has(.issue-back-to-top:focus-visible, .dl-wordmark:focus-visible) { scroll-padding-top: 0; }
.top-arrow { position: relative; width: 16px; height: 18px; }
.top-arrow::before, .top-arrow::after { content: ''; position: absolute; }
.top-arrow::before { top: 2px; bottom: 1px; left: calc(50% - .75px); border-left: 1.5px solid currentColor; }
.top-arrow::after {
  left: 50%; top: 2px; width: 8px; height: 8px;
  border: solid currentColor; border-width: 1.5px 0 0 1.5px;
  transform: translateX(-50%) rotate(45deg);
}
[data-header]:has(.rubric-menu[open], dialog[open]) .issue-back-to-top,
body:has(.atelier-overlay[data-open="true"]) .issue-back-to-top { visibility: hidden; opacity: 0; transition: none; }
@media (hover: hover) {
  .issue-back-to-top:hover { border-color: currentColor; background: #fffdf9; }
}
@media (prefers-reduced-motion: reduce) {
  .issue-back-to-top, .issue-back-to-top:disabled { transition: none; transform: none; }
}

@media (max-width: 1100px) {
  :root { --return-size: 46px; }
  .journal-choice {
    --choice-ink: #792333;
    --choice-caption: #584e48;
    --choice-rule: #c9bfb3;
    position: relative;
    display: grid;
    grid-template-columns: minmax(4.4rem, 27%) minmax(0, 1fr) 9px;
    align-items: center;
    gap: 10px;
    min-width: 0;
    min-height: 48px;
    padding-block: 9px;
    border-bottom: 1px solid var(--choice-rule);
    cursor: pointer;
  }
  #cinema .journal-choice {
    --choice-ink: #f2d4d9;
    --choice-caption: #d3c9c0;
    --choice-rule: #625a54;
    color-scheme: dark;
  }
  .journal-choice .choice-label {
    color: var(--choice-caption);
    font: 400 13px/1.3 var(--sans, sans-serif);
  }
  .journal-choice select {
    min-width: 0;
    width: 100%;
    min-height: 44px;
    grid-column: 2 / -1;
    font: 400 17px/1.3 var(--sans, sans-serif);
    cursor: pointer;
  }
  .journal-choice .choice-value {
    display: none;
    grid-column: 2;
    overflow-wrap: anywhere;
    color: var(--choice-ink);
    font: italic 500 clamp(23px, 5.6vw, 27px)/1.08 var(--serif, Georgia, serif);
  }
  .journal-choice:has(select) .choice-value:not(:empty) { display: block; }
  /* The native control covers the complete row. Its visible value can wrap onto two lines. */
  .journal-choice:has(.choice-value:not(:empty)) select {
    position: absolute;
    grid-column: auto;
    inset: 0;
    z-index: 1;
    height: 100%;
    opacity: 0;
  }
  .journal-choice:has(.choice-value:not(:empty))::after {
    content: '';
    width: 7px;
    height: 7px;
    margin-top: -4px;
    border: solid var(--choice-ink);
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(45deg);
  }
  .journal-choice:has(select:focus-visible) {
    outline: 2px solid var(--choice-ink);
    outline-offset: 2px;
  }
  .journal-choice:active { background: color-mix(in srgb, var(--choice-ink) 7%, transparent); }
  .journal-choice option { font: 400 16px/1.3 var(--sans, sans-serif); }
  html { scroll-padding-top: 64px; scroll-behavior: auto; }
  [data-header] .dl-v3-header > header { background: #fafafa !important; }
  [data-header].has-rubric-menu .dl-mobile-nav > a { display: none; }
  [data-header] .rubric-menu { position: static; }
  [data-header] .rubric-menu summary {
    gap: 8px;
    padding-inline: 8px;
    font-size: 15px;
  }
  .rubric-menu summary::after {
    content: '';
    width: 7px;
    height: 7px;
    border: solid currentColor;
    border-width: 0 1.5px 1.5px 0;
    transform: translateY(-2px) rotate(45deg);
  }
  .rubric-menu[open] summary::after { transform: translateY(2px) rotate(225deg); }
  [data-header] .rubric-menu[open] .dl-mobile-menu-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 16px;
    right: 0;
    width: min(100%, 470px);
    box-sizing: border-box;
    padding: 6px 16px 12px;
    max-height: calc(100vh - 60px);
    max-height: calc(100dvh - 60px);
    overflow: auto;
    overscroll-behavior: contain;
    box-shadow: 0 8px 18px rgba(32, 24, 19, .12);
  }
  [data-header] .rubric-menu .dl-mobile-menu-links a {
    padding: 4px 0;
    min-height: 44px;
    box-sizing: border-box;
    line-height: 1.25;
    font-size: 14px;
    border: 0;
    border-bottom: 1px solid #d7cdc0;
  }
  .rubric-menu .dl-mobile-menu-links a:first-child { grid-column: 1 / -1; color: #792333; }
  .search-topics { margin-block: 4px 12px; }
  .search-topics > summary {
    display: list-item;
    width: fit-content;
    min-height: 44px;
    line-height: 44px;
    cursor: pointer;
    color: #792333;
  }
  .search-topics > div { padding: 4px 0 12px !important; }
  [data-issue-search] button { min-height: 44px !important; }
  [data-issue-search] > div { padding-top: 12px !important; }
  .just-updated { position: relative; }
  .result-shortcut {
    display: block;
    grid-column: 1 / -1;
    min-height: 44px;
    max-width: 100%;
    padding: 6px 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 15px;
    text-align: left;
    text-decoration: underline;
    text-underline-offset: .2em;
  }
  .just-updated::before {
    content: '';
    position: absolute;
    inset-block: .08em;
    inset-inline-start: -8px;
    width: 3px;
    background: currentColor;
  }
  .library-feature { padding-top: 24px !important; align-items: flex-start !important; }
  .library-feature > a { flex-basis: clamp(145px, 24vw, 230px) !important; min-width: 0 !important; }
  .library-feature a[download] { display: inline-flex; align-items: center; min-height: 44px; }
  [data-screen-label="Gift hero"] a[download] { display: inline-flex; align-items: center; min-height: 44px; }
}

@media (max-width: 1100px) and (forced-colors: active) {
  .journal-choice:has(.choice-value:not(:empty)) select {
    position: static;
    grid-column: 2 / -1;
    height: auto;
    opacity: 1;
  }
  .journal-choice:has(select) .choice-value:not(:empty), .journal-choice:has(.choice-value:not(:empty))::after { display: none; }
}

@media (min-width: 701px) and (max-width: 1100px) {
  .issue-rubric-list {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0 24px !important;
    padding-top: 12px !important;
  }
  .issue-rubric-list > a {
    display: grid !important;
    grid-template-columns: 64px minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 2px 14px !important;
    align-content: center;
    padding: 10px 0;
    border-bottom: 1px solid #c9c1b6;
  }
  .issue-rubric-list > a > img { width: 64px !important; height: 64px; grid-row: span 2; }
  .issue-rubric-list > a > span:first-of-type { justify-content: flex-start !important; align-self: end; }
  .issue-rubric-list > a > span:last-of-type { font-size: 25px !important; }
}

@media (max-width: 700px) {
  .search-result { grid-template-columns: minmax(0, 1fr) !important; padding-block: 12px !important; }
  .search-result > span:last-child { white-space: normal !important; }
  .chic-stills {
    grid-template-columns: 1.35fr 1fr !important;
    grid-template-rows: repeat(2, clamp(90px, 24vw, 152px));
    gap: 6px !important;
  }
  .chic-stills img { width: 100%; height: 100%; min-height: 0; aspect-ratio: auto !important; }
  .chic-stills img:first-child { grid-row: span 2; }
  .library-feature { display: grid !important; grid-template-columns: minmax(0, 1fr) 24%; gap: 10px 12px !important; }
  .library-feature > div { display: contents !important; }
  .library-feature > a { grid-column: 2; grid-row: 1 / 3; }
  .library-feature > div > span, .library-feature h2 { grid-column: 1; }
  .library-feature h2 { font-size: clamp(32px, 7vw, 44px) !important; }
  .library-feature p, .library-feature > div > div { grid-column: 1 / -1; }
  [data-screen-label="Gift hero"] > div:nth-child(2) { gap: 24px !important; padding-top: 24px !important; }
  [data-screen-label="How to use"] > div:nth-child(2) { display: grid !important; gap: 20px !important; padding-top: 20px !important; }
  [data-screen-label="How to use"] ol { grid-row: 1; }
}

@media (max-width: 470px) {
  [data-header] .rubric-menu[open] .dl-mobile-menu-links {
    padding-inline: calc(var(--issue-gutter) - 1px);
  }
}
