/* Project Hoof — /guides/ workshop.
   Feed = dark cards on the shared subpage frame.
   Reader + composer = parchment sheets, so the `.req-*` field styles from
   /requests/requests.css (which are drawn for ink-on-parchment) land correctly.
   This file is self-contained: it does NOT borrow .leave-gate/.leave-modal,
   which live in /leave/leave.css and are only loaded on that page. */

.guides-main {
  position: relative; z-index: 2;
  padding: 88px 24px 64px;
  max-width: 1280px; margin: 0 auto;
}

/* ============= Anonymous gate ============= */
.gd-gate {
  max-width: 520px;
  margin: clamp(48px, 12vh, 140px) auto;
  text-align: center;
}
.gd-gate h1 {
  font-family: 'Cinzel Decorative', 'Cinzel', serif;
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  color: #f1ead4; margin-bottom: 12px;
}
.gd-gate p {
  font-family: 'EB Garamond', serif; font-style: italic;
  color: #b3a98b; margin-bottom: 22px;
}

/* ============= Toolbar: category chips + sort + compose ============= */
.gd-toolbar {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 18px; flex-wrap: wrap;
  margin: 8px 0 24px;
}
.gd-cats { display: flex; flex-wrap: wrap; gap: 8px; flex: 1 1 420px; }
.gd-cat {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 13px;
  border: 1px solid rgba(201,162,74,.26);
  border-radius: 999px;
  background: rgba(18,26,46,.55);
  color: #b3a98b;
  font-family: 'IM Fell English SC', serif;
  font-size: .86rem; letter-spacing: .06em;
  transition: border-color .16s, color .16s, background .16s;
}
.gd-cat:hover { border-color: rgba(201,162,74,.55); color: #e8e2d2; }
.gd-cat.is-on {
  background: linear-gradient(180deg, rgba(242,204,106,.16), rgba(201,162,74,.1));
  border-color: #c9a24a; color: #f2cc6a;
}
.gd-cat-ico { font-size: .95rem; line-height: 1; }
.gd-cat-n {
  font-family: 'Manrope', sans-serif; font-size: .72rem; font-weight: 700;
  color: #8b8271; background: rgba(0,0,0,.28);
  padding: 1px 6px; border-radius: 999px;
}
.gd-cat.is-on .gd-cat-n { color: #2a1f0d; background: #c9a24a; }

.gd-toolbar-right { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.gd-sort {
  display: flex; border: 1px solid rgba(201,162,74,.26); border-radius: 999px; overflow: hidden;
}
.gd-sort button {
  padding: 8px 16px;
  font-family: 'IM Fell English SC', serif; font-size: .82rem; letter-spacing: .1em;
  color: #b3a98b; background: rgba(18,26,46,.55);
  transition: background .16s, color .16s;
}
.gd-sort button[aria-selected="true"] { background: rgba(201,162,74,.18); color: #f2cc6a; }
.gd-new-btn { white-space: nowrap; }

/* ============= Feed ============= */
.gd-feed {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 20px;
}
.gd-card {
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, rgba(18,26,46,.78), rgba(10,17,32,.86));
  border: 1px solid rgba(201,162,74,.2);
  border-radius: 14px;
  overflow: hidden;
  transition: transform .18s, border-color .18s, box-shadow .18s;
}
.gd-card:hover {
  transform: translateY(-3px);
  border-color: rgba(201,162,74,.5);
  box-shadow: 0 18px 44px -18px rgba(0,0,0,.7);
}
.gd-card.is-pinned { border-color: rgba(242,204,106,.55); }

.gd-card-media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: radial-gradient(ellipse at 50% 40%, rgba(201,162,74,.14), rgba(8,13,26,.9) 70%);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.gd-card-thumb { width: 100%; height: 100%; object-fit: cover; }
.gd-card-glyph { color: #c9a24a; opacity: .38; }
.gd-card:hover .gd-card-glyph { opacity: .55; }
.gd-card-play {
  position: absolute; inset: 0; margin: auto;
  width: 54px; height: 54px; border-radius: 50%;
  background: rgba(10,17,32,.72);
  border: 1px solid rgba(242,204,106,.7);
  pointer-events: none;
}
.gd-card-play::after {
  content: ''; position: absolute; inset: 0; margin: auto;
  width: 0; height: 0;
  border-left: 15px solid #f2cc6a;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  transform: translateX(2px);
}

.gd-card-badges { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.gd-badge {
  font-family: 'Manrope', sans-serif; font-size: .68rem; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 999px;
  background: rgba(10,17,32,.85); border: 1px solid rgba(201,162,74,.4); color: #f2cc6a;
}
.gd-badge.is-draft  { border-color: rgba(150,150,150,.5); color: #cfcabb; }
.gd-badge.is-hidden { border-color: rgba(196,72,60,.65); color: #e0796c; }

.gd-card-body { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px 12px; flex: 1; }
.gd-card-meta { display: flex; gap: 6px; flex-wrap: wrap; }
.gd-chip {
  font-family: 'Manrope', sans-serif; font-size: .7rem; font-weight: 600;
  letter-spacing: .04em;
  padding: 2px 8px; border-radius: 999px;
  background: rgba(201,162,74,.12); border: 1px solid rgba(201,162,74,.22); color: #c9a24a;
}
.gd-chip-lang { color: #8b8271; background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.09); }
.gd-card-title {
  font-family: 'Cinzel', serif; font-weight: 700;
  font-size: 1.06rem; line-height: 1.3; color: #f1ead4;
}
.gd-card-title:hover { color: #f2cc6a; }
.gd-card-summary {
  font-family: 'EB Garamond', serif; font-size: .95rem; line-height: 1.45;
  color: #9c9481;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.gd-card-foot {
  margin-top: auto; padding-top: 10px;
  border-top: 1px solid rgba(201,162,74,.14);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.gd-author { display: flex; align-items: center; gap: 7px; min-width: 0; }
.gd-author-av {
  width: 24px; height: 24px; border-radius: 50%; flex: 0 0 auto;
  object-fit: cover; border: 1px solid rgba(201,162,74,.35);
}
.gd-author-av-fb {
  display: flex; align-items: center; justify-content: center;
  background: rgba(201,162,74,.18); color: #c9a24a;
  font-family: 'Cinzel', serif; font-size: .72rem; text-transform: uppercase;
}
.gd-author-name {
  font-family: 'Manrope', sans-serif; font-size: .8rem; color: #b3a98b;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 11ch;
}
.gd-card-date { font-family: 'Manrope', sans-serif; font-size: .72rem; color: #6f6a5e; white-space: nowrap; }

.gd-card-stats { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.gd-stat {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: 'Manrope', sans-serif; font-size: .8rem; color: #8b8271;
}
.gd-stat-ico { font-size: .95rem; line-height: 1; }
.gd-stat-done { color: #6fbf73; font-weight: 700; }
.gd-like-btn { transition: color .15s, transform .15s; }
.gd-like-btn:hover:not(.is-disabled) { color: #e0796c; transform: scale(1.06); }
.gd-like-btn.is-liked { color: #e0796c; }
.gd-like-btn.is-disabled { cursor: not-allowed; opacity: .55; }

.gd-empty {
  text-align: center; padding: 60px 20px;
  font-family: 'EB Garamond', serif; font-style: italic; color: #8b8271;
}

/* ============= Reader ============= */
.gd-reader-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  max-width: 900px; margin: 0 auto 18px;
}
.gd-reader-staff { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-ghost-dark {
  display: inline-flex; align-items: center; gap: 7px;
  background: transparent;
  border: 1px solid rgba(201,162,74,.35);
  color: #b3a98b;
  font-family: 'IM Fell English SC', serif;
  font-size: .82rem; letter-spacing: .12em; text-transform: uppercase;
  padding: 8px 15px; border-radius: 999px;
  transition: border-color .15s, color .15s, background .15s;
}
.btn-ghost-dark:hover { border-color: #c9a24a; color: #f2cc6a; background: rgba(201,162,74,.08); }

.gd-article { max-width: 900px; margin: 0 auto; }
.gd-art-kicker { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.gd-art-kicker .gd-badge {
  background: rgba(90,60,20,.1); border-color: rgba(138,93,26,.45); color: #8a5d1a;
}
.gd-art-kicker .gd-badge.is-hidden { border-color: rgba(150,40,30,.5); color: #8f2b20; }
.gd-art-title { margin-bottom: 10px; }
.gd-art-by {
  display: flex; align-items: center; gap: 8px;
  font-family: 'Manrope', sans-serif; font-size: .84rem; color: #6b5636;
  margin: 14px 0 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(90,60,20,.2);
}
.gd-art-by-name { font-weight: 700; color: #4a3a1c; }
.gd-art-by-sep { opacity: .5; }
.gd-art-edited { font-style: italic; opacity: .8; }

/* ---- Click-to-load YouTube (no third-party JS until the reader asks) ---- */
.gd-video {
  position: relative; aspect-ratio: 16 / 9;
  margin: 0 0 26px; border-radius: 10px; overflow: hidden;
  background: #0a1326;
  border: 1px solid rgba(90,60,20,.35);
  box-shadow: 0 10px 30px -10px rgba(0,0,0,.5);
}
.gd-video-play { display: block; width: 100%; height: 100%; position: relative; padding: 0; }
.gd-video-thumb { width: 100%; height: 100%; object-fit: cover; }
.gd-video-tri {
  position: absolute; inset: 0; margin: auto;
  width: 72px; height: 72px; border-radius: 50%;
  background: rgba(10,17,32,.78);
  border: 1.5px solid rgba(242,204,106,.85);
  transition: transform .18s, background .18s;
}
.gd-video-tri::after {
  content: ''; position: absolute; inset: 0; margin: auto;
  width: 0; height: 0;
  border-left: 20px solid #f2cc6a;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  transform: translateX(3px);
}
.gd-video-play:hover .gd-video-tri { transform: scale(1.08); background: rgba(10,17,32,.9); }
.gd-video-frame { width: 100%; height: 100%; border: 0; display: block; }

/* ---- Guide typography (ink on parchment) ---- */
.gd-art-body, .gd-preview {
  font-family: 'EB Garamond', 'Spectral', serif;
  font-size: 1.08rem; line-height: 1.68; color: #2f2411;
}
.gd-p { margin: 0 0 1.05em; }
.gd-h {
  font-family: 'Cinzel', serif; font-weight: 700;
  color: #2a1f0d; line-height: 1.25;
  margin: 1.5em 0 .55em;
}
.gd-h1 { font-size: 1.6rem; border-bottom: 1px solid rgba(90,60,20,.25); padding-bottom: .25em; }
.gd-h2 { font-size: 1.32rem; }
.gd-h3 { font-size: 1.12rem; letter-spacing: .02em; }
.gd-art-body > .gd-h:first-child, .gd-preview > .gd-h:first-child { margin-top: 0; }

.gd-list { margin: 0 0 1.05em 1.5em; }
.gd-list li { margin-bottom: .35em; }
ul.gd-list { list-style: disc; }
ol.gd-list { list-style: decimal; }

.gd-quote {
  margin: 0 0 1.05em;
  padding: .5em 0 .5em 1.1em;
  border-left: 3px solid rgba(138,93,26,.5);
  color: #5b4622; font-style: italic;
  white-space: pre-line;
}
.gd-hr { border: 0; border-top: 1px solid rgba(90,60,20,.28); margin: 1.8em 0; }

/* base.css resets em/i to normal — opt italics back in for guide prose. */
.gd-em { font-style: italic; }
.gd-strong { font-weight: 700; color: #241a09; }
.gd-u { text-decoration: underline; text-underline-offset: 2px; }
.gd-s { text-decoration: line-through; opacity: .75; }

.gd-inline-code, .gd-code {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  background: rgba(90,60,20,.1);
  border: 1px solid rgba(90,60,20,.22);
  color: #3d2f12;
}
.gd-inline-code { padding: .1em .35em; border-radius: 4px; font-size: .88em; }
.gd-code {
  display: block; padding: 14px 16px; border-radius: 8px;
  margin: 0 0 1.05em; overflow-x: auto;
  font-size: .86rem; line-height: 1.5;
}
.gd-code code { background: none; border: 0; padding: 0; }

.gd-link { color: #8a5d1a; text-decoration: underline; text-underline-offset: 2px; }
.gd-link:hover { color: #5b4622; }

.gd-spoiler {
  background: #3b2f18; color: transparent; border-radius: 3px;
  padding: 0 .2em; cursor: pointer; user-select: none;
  transition: background .15s, color .15s;
}
.gd-spoiler.is-open { background: rgba(90,60,20,.12); color: inherit; user-select: auto; cursor: auto; }
.gd-spoiler.is-open * { color: inherit; }

.gd-figure { margin: 0 0 1.3em; }
.gd-img {
  width: 100%; height: auto; border-radius: 8px;
  border: 1px solid rgba(90,60,20,.35);
  box-shadow: 0 8px 22px -10px rgba(0,0,0,.45);
}
.gd-figcap {
  margin-top: .5em; text-align: center;
  font-size: .88rem; font-style: italic; color: #6b5636;
}

/* ---- Sticky action bar: like + the honest "I read this" ---- */
.gd-actionbar {
  position: sticky; bottom: 18px;
  max-width: 900px; margin: 22px auto 0;
  display: flex; align-items: center; gap: 16px;
  padding: 12px 18px;
  background: linear-gradient(180deg, rgba(18,26,46,.94), rgba(10,17,32,.96));
  border: 1px solid rgba(201,162,74,.32);
  border-radius: 999px;
  box-shadow: 0 16px 40px -14px rgba(0,0,0,.75);
  backdrop-filter: blur(6px);
}
.gd-actionbar[hidden] { display: none; }
.gd-like {
  display: inline-flex; align-items: center; gap: 7px;
  color: #b3a98b;
  font-family: 'Manrope', sans-serif; font-weight: 700; font-size: .95rem;
  padding: 6px 12px; border-radius: 999px;
  border: 1px solid rgba(201,162,74,.28);
  transition: color .15s, border-color .15s, transform .15s;
}
.gd-like:hover:not(.is-disabled) { color: #e0796c; border-color: rgba(224,121,108,.6); transform: scale(1.03); }
.gd-like.is-liked { color: #e0796c; border-color: rgba(224,121,108,.6); }
.gd-like.is-liked svg path { fill: #e0796c; }
.gd-like.is-disabled { cursor: not-allowed; opacity: .5; }
.gd-actionbar-mid { flex: 1; display: flex; justify-content: center; }
.gd-views { display: inline-flex; align-items: center; gap: 7px; color: #8b8271; font-family: 'Manrope', sans-serif; font-size: .9rem; }
.gd-watched { white-space: nowrap; }
.gd-watched[disabled] { opacity: .45; cursor: not-allowed; }
.gd-watched.is-done {
  background: linear-gradient(180deg, #7fbf83, #4f8a53);
  border-color: #3c6b40; color: #0d1f0f; opacity: 1;
}
.gd-watched-hint {
  max-width: 900px; margin: 10px auto 0; text-align: right;
  font-family: 'EB Garamond', serif; font-style: italic; font-size: .86rem; color: #6f6a5e;
}

/* ============= Composer (parchment sheet in a modal) ============= */
.gd-modal {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(5,8,18,.72);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 40px 20px;
  overflow-y: auto;
  backdrop-filter: blur(6px);
}
.gd-modal[hidden] { display: none; }
.gd-modal-card {
  position: relative;
  width: 100%; max-width: 760px;
  background:
    radial-gradient(ellipse at 20% 10%, rgba(255,230,170,.08), transparent 60%),
    radial-gradient(ellipse at 80% 90%, rgba(120,80,30,.12), transparent 60%),
    linear-gradient(180deg, #f0e3bd 0%, #e7d4a0 100%);
  color: #2a1f0d;
  border-radius: 16px;
  padding: clamp(26px, 4vw, 44px);
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.6), 0 0 0 1px rgba(201,162,74,.35);
  font-family: 'EB Garamond', 'Spectral', serif;
}
.gd-modal-x {
  position: absolute; top: 10px; right: 16px;
  font-size: 1.9rem; line-height: 1; color: #8a5d1a;
}
.gd-modal-x:hover { color: #2a1f0d; }

.gd-cat-grid { grid-template-columns: repeat(4, 1fr); margin-bottom: 20px; }
@media (max-width: 640px) { .gd-cat-grid { grid-template-columns: repeat(2, 1fr); } }

/* requests.css only styles number/date/textarea inputs — add the text ones. */
.gd-compose input[type="text"],
.gd-compose input[type="url"] {
  width: 100%; box-sizing: border-box;
  background: rgba(255,253,242,.8);
  border: 1px solid rgba(90,60,20,.35);
  color: #2a1f0d;
  padding: 10px 12px; border-radius: 8px;
  font-family: 'EB Garamond', serif; font-size: 1rem;
  outline: 0;
}
.gd-compose input[type="text"]:focus,
.gd-compose input[type="url"]:focus {
  border-color: #8a5d1a; box-shadow: 0 0 0 3px rgba(140,95,30,.15);
}

.gd-lang-pick { display: flex; border: 1px solid rgba(90,60,20,.35); border-radius: 8px; overflow: hidden; }
.gd-lang-pick button {
  flex: 1; padding: 10px 8px;
  font-family: 'IM Fell English SC', serif; font-size: .86rem; letter-spacing: .06em;
  color: #5b4622; background: rgba(255,253,242,.5);
}
.gd-lang-pick button[aria-selected="true"] { background: linear-gradient(180deg, #f2cc6a, #c9a24a); color: #2a1f0d; }

.gd-body-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.gd-body-tabs { display: flex; border: 1px solid rgba(90,60,20,.3); border-radius: 999px; overflow: hidden; margin-bottom: 6px; }
.gd-body-tabs button {
  padding: 5px 14px;
  font-family: 'IM Fell English SC', serif; font-size: .78rem; letter-spacing: .08em;
  color: #5b4622; background: transparent;
}
.gd-body-tabs button[aria-selected="true"] { background: rgba(138,93,26,.18); color: #2a1f0d; }

.gd-body-wrap { position: relative; }
.gd-compose textarea {
  width: 100%; box-sizing: border-box;
  background: rgba(255,253,242,.8);
  border: 1px solid rgba(90,60,20,.35);
  color: #2a1f0d;
  padding: 12px 14px; border-radius: 8px;
  font-family: 'EB Garamond', serif; font-size: 1.02rem; line-height: 1.6;
  resize: vertical; min-height: 240px; outline: 0;
}
.gd-compose textarea:focus { border-color: #8a5d1a; box-shadow: 0 0 0 3px rgba(140,95,30,.15); }
.gd-compose textarea.is-drop { border-color: #8a5d1a; border-style: dashed; background: rgba(255,253,242,.95); }
.gd-preview {
  min-height: 240px;
  padding: 14px 16px;
  background: rgba(255,253,242,.55);
  border: 1px solid rgba(90,60,20,.22);
  border-radius: 8px;
}
.gd-preview[hidden] { display: none; }

.gd-body-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 10px 0 18px; }
.gd-img-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px;
  border: 1px dashed rgba(90,60,20,.45);
  color: #5b4622; cursor: pointer;
  font-family: 'IM Fell English SC', serif; font-size: .84rem; letter-spacing: .06em;
  transition: border-color .15s, background .15s;
}
.gd-img-btn:hover { border-color: #8a5d1a; background: rgba(255,253,242,.7); }
.gd-img-hint { font-style: italic; font-size: .9rem; color: #6b5636; }
.gd-img-status {
  font-family: 'Manrope', sans-serif; font-size: .82rem; font-weight: 600; color: #2f6b33;
}
.gd-img-status.is-err { color: #8f2b20; }

.gd-compose-actions { gap: 10px; }
.gd-actions-spacer { flex: 1; }
.gd-danger { border-color: rgba(150,40,30,.45); color: #8f2b20; }
.gd-danger:hover { background: rgba(150,40,30,.08); }
.btn-parchment[disabled] { opacity: .6; cursor: progress; }

/* ============= Responsive ============= */
@media (max-width: 860px) {
  .guides-main { padding: 78px 16px 56px; }
  .gd-toolbar { flex-direction: column; align-items: stretch; }
  .gd-toolbar-right { justify-content: space-between; }
  .gd-actionbar { border-radius: 16px; bottom: 10px; }
  .gd-watched-hint { text-align: center; }
}
@media (max-width: 520px) {
  .gd-feed { grid-template-columns: 1fr; }
  .gd-actionbar { gap: 10px; padding: 10px 12px; }
  .gd-actionbar-mid { display: none; }
}
