.guide-section {
  margin: 0 0 64px;
  padding: 26px 0 52px;
  border-top: 5px solid var(--accent);
  border-bottom: 1px solid var(--paper);
}

.guide-head {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  margin-bottom: 24px;
}

.guide-head > span {
  padding-top: 7px;
  color: var(--accent);
  font: 800 10px/1 ui-monospace, SFMono-Regular, monospace;
  letter-spacing: .14em;
}

.guide-head h3 {
  margin: 0;
  color: var(--paper);
  font: 400 clamp(30px, 3.2vw, 48px)/1 GallerySerif, serif;
  letter-spacing: -.04em;
}

.guide-head p {
  margin: 10px 0 0;
  color: #716d65;
  font-size: 13px;
  line-height: 1.65;
}

.guide-deck {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.guide-deck .manual-card { width: 100%; }

.featured-section {
  margin: 0 0 58px;
  padding: 30px 0 48px;
  border-top: 5px solid var(--paper);
  border-bottom: 1px solid var(--paper);
}

.featured-head {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr);
  gap: 36px;
  align-items: end;
  margin-bottom: 28px;
}

.featured-head span,
.archive-head span,
.archive-head em {
  color: var(--accent);
  font: 800 10px/1 ui-monospace, SFMono-Regular, monospace;
  letter-spacing: .14em;
}

.featured-head h3 {
  margin: 10px 0 0;
  color: var(--paper);
  font: 400 clamp(36px, 4.4vw, 68px)/.98 GallerySerif, serif;
  letter-spacing: -.045em;
}

.featured-head p {
  max-width: 560px;
  margin: 0;
  color: #716d65;
  font-size: 13px;
  line-height: 1.75;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 34px 22px;
}

.featured-card {
  display: grid;
  min-width: 0;
  grid-template-rows: auto auto auto 1fr auto;
  padding-top: 8px;
  border-top: 1px solid var(--paper);
  color: inherit;
  text-decoration: none;
}

.featured-card:hover,
.featured-card:focus-visible { color: inherit; }
.featured-card:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; }

.featured-media {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #d8d3c8;
}

.featured-media::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(20, 20, 17, .14);
  pointer-events: none;
}

.featured-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s cubic-bezier(.2,.8,.2,1), filter .25s ease;
}

.featured-card:hover .featured-media img { transform: scale(1.025); filter: contrast(1.03); }

.featured-rank {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  background: var(--accent);
  color: #fff;
  font: 500 20px/1 GallerySerif, serif;
}

.featured-model {
  position: absolute;
  z-index: 2;
  right: 10px;
  bottom: 10px;
  padding: 7px 9px;
  background: rgba(20, 20, 17, .88);
  color: #f1eee4;
  font: 750 9px/1 ui-monospace, SFMono-Regular, monospace;
  letter-spacing: .07em;
}

.featured-meta {
  margin-top: 13px;
  color: var(--accent);
  font: 800 9px/1.2 ui-monospace, SFMono-Regular, monospace;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.featured-card h4 {
  margin: 8px 0 0;
  color: var(--paper);
  font: 400 clamp(23px, 2vw, 32px)/1.12 GallerySerif, serif;
  letter-spacing: -.035em;
  word-break: keep-all;
}

.featured-card p {
  margin: 12px 0 0;
  color: #716d65;
  font-size: 12px;
  line-height: 1.65;
  word-break: keep-all;
}

.featured-open {
  display: flex;
  justify-content: space-between;
  margin-top: 18px;
  padding-top: 10px;
  border-top: 1px solid #c9c4b9;
  color: var(--paper);
  font: 800 9px/1 ui-monospace, SFMono-Regular, monospace;
  letter-spacing: .12em;
}

.featured-open::after { content: "VIEW ↗"; color: var(--accent); }

.archive-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: baseline;
  margin: 0 0 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--paper);
}

.archive-head strong {
  color: var(--paper);
  font: 400 24px/1 GallerySerif, serif;
}

.archive-head em { color: #716d65; font-style: normal; }

.gallery-controls {
  display: grid;
  grid-template-columns: minmax(300px, 1.4fr) minmax(220px, .8fr) auto auto;
  gap: 12px;
  align-items: stretch;
  margin: 0 0 28px;
}

.deck-search,
.deck-sort {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  min-height: 52px;
  border: 1px solid var(--paper);
  background: rgba(241, 238, 228, .72);
}

.deck-search > span,
.deck-sort > span {
  padding: 0 14px;
  color: var(--accent);
  font: 800 10px/1 ui-monospace, SFMono-Regular, monospace;
  letter-spacing: .12em;
}

.deck-search input,
.deck-sort select {
  width: 100%;
  min-width: 0;
  height: 50px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--paper);
  font: 720 14px/1 SUIT, sans-serif;
}

.deck-search input::placeholder { color: #8b867d; }
.deck-search input::-webkit-search-cancel-button { cursor: pointer; }
.deck-sort select { cursor: pointer; appearance: none; padding-right: 34px; }
.deck-sort::after { content: "↓"; position: absolute; right: 14px; pointer-events: none; color: var(--accent); }

.deck-search kbd {
  margin-right: 12px;
  padding: 4px 7px;
  border: 1px solid var(--line);
  background: #ded9ce;
  color: #57534c;
  font: 750 10px/1 ui-monospace, monospace;
}

.deck-search:focus-within,
.deck-sort:focus-within { box-shadow: inset 0 -3px 0 var(--accent); }

.reset-filters {
  min-width: 82px;
  border: 1px solid var(--paper);
  background: var(--paper);
  color: var(--bg);
  cursor: pointer;
  font: 800 11px/1 ui-monospace, monospace;
  letter-spacing: .06em;
}

.reset-filters:hover,
.reset-filters:focus-visible { background: var(--accent); color: #fff; }

.result-count {
  display: grid;
  min-width: 94px;
  margin: 0;
  place-items: center;
  border-top: 1px solid var(--paper);
  border-bottom: 1px solid var(--paper);
  color: #57534c;
  font: 750 11px/1 ui-monospace, monospace;
  letter-spacing: .04em;
}

.topic-order { grid-template-columns: repeat(8, minmax(0, 1fr)); margin-top: 0; }
.topic-order li { min-height: 54px; padding: 0; }
.topic-order li:first-child { padding-left: 0; }
.topic-order button {
  display: flex;
  width: 100%;
  min-width: 0;
  min-height: 54px;
  gap: 10px;
  align-items: center;
  padding: 14px 12px;
  border: 0;
  background: transparent;
  color: var(--paper);
  cursor: pointer;
  text-align: left;
}
.topic-order button:hover { background: rgba(212, 59, 48, .08); }
.topic-order button[aria-pressed="true"] { background: var(--paper); color: var(--bg); }
.topic-order button[aria-pressed="true"] b { color: var(--accent); }
.topic-order button:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }

.deck-card[hidden] { display: none !important; }
.album-empty {
  grid-column: 1 / -1;
  padding: 72px 20px;
  border-top: 1px solid var(--paper);
  border-bottom: 1px solid var(--paper);
  text-align: center;
}
.album-empty strong { display: block; font: 400 34px/1.2 GallerySerif, serif; }
.album-empty span { display: block; margin-top: 10px; color: #716d65; font-size: 13px; }

.share-deck {
  display: grid;
  width: 38px;
  height: 38px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 0;
  background: transparent;
  color: #d5d0c5;
  cursor: pointer;
}
.share-deck:hover,
.share-deck:focus-visible { border-color: var(--accent); color: var(--accent); }
.share-deck svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.notes-toggle,
.guide-open {
  display: flex;
  min-height: 38px;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 0;
  background: transparent;
  color: #d5d0c5;
  cursor: pointer;
  font: 750 10px/1 ui-monospace, SFMono-Regular, monospace;
  letter-spacing: .04em;
  text-decoration: none;
}
.notes-toggle[hidden],
.guide-open[hidden] { display: none; }
.notes-toggle:hover,
.notes-toggle:focus-visible,
.notes-toggle[aria-expanded="true"],
.guide-open:hover,
.guide-open:focus-visible { border-color: var(--accent); background: var(--accent); color: #fff; }
.notes-toggle svg,
.guide-open svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.speaker-notes[hidden] { display: none; }
.speaker-notes {
  position: absolute;
  z-index: 12;
  top: 58px;
  right: 0;
  bottom: 0;
  display: grid;
  width: min(440px, 92vw);
  grid-template-rows: auto minmax(0,1fr) auto;
  border-left: 1px solid #393833;
  background: #f1eee4;
  color: #171714;
  box-shadow: -18px 0 42px rgba(0,0,0,.34);
}
.speaker-notes-head {
  display: flex;
  width: 100%;
  min-width: 0;
  min-height: 84px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(23,23,20,.24);
}
.speaker-notes-head div { min-width: 0; }
.speaker-notes-head small {
  display: block;
  margin-bottom: 7px;
  color: var(--accent);
  font: 800 9px/1 ui-monospace, SFMono-Regular, monospace;
  letter-spacing: .1em;
}
.speaker-notes-head strong {
  display: block;
  overflow: hidden;
  font: 400 22px/1.2 GallerySerif, "Noto Serif CJK KR", serif;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.notes-close {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border: 1px solid #171714;
  background: transparent;
  color: #171714;
  cursor: pointer;
  font: 300 27px/1 sans-serif;
}
.notes-close:hover,
.notes-close:focus-visible { background: #171714; color: #f1eee4; }
.speaker-notes-body {
  width: 100%;
  min-height: 0;
  min-width: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 22px 20px 42px;
  scrollbar-gutter: stable;
}
.speaker-notes-body h3 {
  margin: 0 0 22px;
  font: 400 30px/1.25 GallerySerif, "Noto Serif CJK KR", serif;
  letter-spacing: -.035em;
  overflow-wrap: anywhere;
  word-break: keep-all;
}
.speaker-notes-body dl { display: grid; gap: 0; margin: 0; }
.speaker-notes-body dt {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(23,23,20,.22);
  color: var(--accent);
  font: 800 10px/1.3 ui-monospace, SFMono-Regular, monospace;
  letter-spacing: .06em;
}
.speaker-notes-body dt:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.speaker-notes-body dd {
  margin: 7px 0 0;
  color: #3f3c36;
  font-size: 14px;
  font-weight: 520;
  line-height: 1.75;
  word-break: keep-all;
}
.speaker-notes-body .notes-empty { display: grid; min-height: 100%; place-content: center; color: #716d65; text-align: center; line-height: 1.7; }
.speaker-notes-nav {
  display: grid;
  width: 100%;
  min-width: 0;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid rgba(23,23,20,.28);
}
.speaker-notes-nav button {
  min-height: 50px;
  border: 0;
  background: #f1eee4;
  color: #171714;
  cursor: pointer;
  font: 800 10px/1 ui-monospace, SFMono-Regular, monospace;
  letter-spacing: .06em;
}
.speaker-notes-nav button + button { border-left: 1px solid rgba(23,23,20,.28); }
.speaker-notes-nav button:hover:not(:disabled),
.speaker-notes-nav button:focus-visible:not(:disabled) { background: #171714; color: #f1eee4; }
.speaker-notes-nav button:disabled { cursor: default; opacity: .32; }
.share-feedback {
  position: fixed;
  z-index: 80;
  right: 18px;
  bottom: 18px;
  max-width: min(360px, calc(100vw - 36px));
  padding: 11px 14px;
  background: #f1eee4;
  color: #171714;
  box-shadow: 5px 5px 0 rgba(0,0,0,.5);
  font-size: 12px;
  font-weight: 750;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .18s ease, transform .18s ease;
}
.share-feedback.visible { opacity: 1; transform: none; }

@media (max-width: 1050px) {
  .guide-deck { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .featured-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery-controls { grid-template-columns: 1fr 1fr auto; }
  .result-count { grid-column: 1 / -1; min-height: 34px; }
  .topic-order { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .topic-order li:nth-child(5) { border-left: 0; }
}

@media (max-width: 760px) {
  .guide-section { margin-bottom: 46px; padding: 20px 0 38px; }
  .guide-head { display: block; }
  .guide-head h3 { margin-top: 10px; font-size: 36px; }
  .guide-deck { grid-template-columns: 1fr; }
  .featured-section { margin-bottom: 42px; padding: 22px 0 38px; }
  .featured-head { display: block; margin-bottom: 22px; }
  .featured-head h3 { font-size: 43px; }
  .featured-head p { margin-top: 16px; }
  .featured-grid { grid-template-columns: 1fr; gap: 30px; }
  .featured-card h4 { font-size: 29px; }
  .archive-head { grid-template-columns: auto 1fr; }
  .archive-head em { grid-column: 2; }
  .gallery-controls { grid-template-columns: 1fr auto; margin: 0 0 20px; }
  .deck-search { grid-column: 1 / -1; }
  .deck-sort { min-width: 0; }
  .reset-filters { min-width: 76px; }
  .result-count { grid-column: 1 / -1; min-height: 32px; }
  .topic-order { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 34px; }
  .topic-order li { min-height: 48px; padding: 0; }
  .topic-order li:nth-child(odd) { padding-left: 0; }
  .topic-order button { min-height: 48px; padding: 12px 9px; font-size: 10.5px; }
  .deck-search kbd { display: none; }
  .viewer-title { max-width: 32vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .share-deck { width: 36px; height: 36px; }
  .notes-toggle,
  .guide-open { width: 36px; min-height: 36px; justify-content: center; padding: 0; }
  .notes-toggle span,
  .guide-open span { display: none; }
  .speaker-notes {
    top: auto;
    left: 0;
    width: 100%;
    height: min(58dvh, 520px);
    border-top: 3px solid var(--accent);
    border-left: 0;
    box-shadow: 0 -16px 38px rgba(0,0,0,.4);
  }
  .speaker-notes-head { min-height: 68px; padding: 12px 16px; }
  .speaker-notes-head strong { font-size: 19px; }
  .speaker-notes-body { padding: 18px 18px 34px; }
  .speaker-notes-body h3 { font-size: 25px; }
}

@media (max-width: 900px) and (orientation: landscape) {
  .notes-toggle,
  .guide-open { width: 36px; min-height: 36px; justify-content: center; padding: 0; }
  .notes-toggle span,
  .guide-open span { display: none; }
  .speaker-notes { top: 0; width: min(420px, 64vw); }
}

@media (prefers-reduced-motion: reduce) {
  .share-feedback { transition: none; }
}
