/* ============================================================================
 * SpecEnvoy — Art Through Time — timeline styles
 * Same "river of time" language as the music timelines (mobile-first, placard
 * bottom-sheet), with an art-museum accent: gilt tones + painting strips.
 * Uses the site palette from /style.css (:root vars).
 * ========================================================================== */

.tl-wide { max-width: 1080px; }
.at-intro { color: var(--muted); margin: -6px 0 22px; max-width: 660px; }
.at-gold { --gilt: #d8b25c; }

/* legend chips */
.at-legend { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center;
  font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.at-legend .chip { display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 11px; border: 1px solid var(--border); border-radius: 999px; background: var(--card); }
.at-legend .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.at-legend .dot.g { background: #d8b25c; }
.at-allbtn { margin-left: auto; font-size: 13px; color: var(--ink); background: var(--card);
  border: 1px solid var(--border); border-radius: 999px; padding: 5px 14px; cursor: pointer; }
.at-allbtn:hover { background: rgba(255,255,255,.08); border-color: rgba(216,178,92,.5); }

/* mobile period chips — sticky horizontal scroller */
.at-chips { position: sticky; top: 0; z-index: 30; display: flex; gap: 8px;
  overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
  padding: 10px 2px; margin: 0 -2px 14px;
  background: linear-gradient(180deg, var(--bg-top) 75%, transparent); }
.at-chips::-webkit-scrollbar { display: none; }
.at-chips a { flex: 0 0 auto; font-size: 12.5px; color: var(--muted); text-decoration: none;
  border: 1px solid var(--border); border-radius: 999px; padding: 5px 12px; background: var(--card); white-space: nowrap; }
.at-chips a.active { color: #ffe9b8; border-color: rgba(216,178,92,.55); background: rgba(216,178,92,.10); }

/* ================================================================ river === */
.at-stage { display: block; }
.at-river { position: relative;
  background-image: linear-gradient(180deg, transparent, var(--border) 8px, var(--border) calc(100% - 8px), transparent);
  background-repeat: no-repeat; background-size: 2px 100%; background-position: 13px 0; }

.at-era { position: relative; padding: 0 0 8px 40px; margin-bottom: 26px; }
.at-era-head { position: relative; margin: 0 0 6px; cursor: pointer; user-select: none; border-radius: 8px; }
.at-era-head:hover { background: rgba(255,255,255,.03); }
.at-era-node { position: absolute; left: -33px; top: 7px; width: 16px; height: 16px;
  border-radius: 50%; background: var(--bg-top); border: 2px solid #d8b25c;
  box-shadow: 0 0 0 4px rgba(216,178,92,.14); transition: transform .15s ease, background .15s ease; }
.at-era-head:hover .at-era-node { transform: scale(1.18); background: #d8b25c; }
.at-era-name { font-size: clamp(20px, 4.5vw, 26px); font-weight: 700; letter-spacing: -.01em; display: inline; }
.at-era-span { font-size: 13px; color: var(--muted); margin-left: 10px; white-space: nowrap; }
.at-era-blurb { color: var(--muted); font-size: 14.5px; margin: 4px 0 16px; max-width: 640px; }
.at-era-toggle { float: right; color: var(--muted); font-size: 13px; border: 1px solid var(--border);
  border-radius: 999px; padding: 3px 10px; background: var(--card); cursor: pointer; }
.at-era.collapsed .at-artist-grid, .at-era.collapsed .at-era-blurb { display: none; }

/* --- artist cards --- */
.at-artist-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }

.at-artist { display: grid; grid-template-columns: 64px 1fr; grid-template-rows: auto auto; gap: 4px 14px;
  width: 100%; padding: 12px; border: 1px solid var(--border); border-radius: 14px;
  background: var(--card); color: inherit; cursor: pointer; text-align: left;
  transition: transform .15s ease, border-color .15s ease, background .15s ease; }
.at-artist:hover { transform: translateY(-2px); border-color: rgba(216,178,92,.5); background: rgba(255,255,255,.06); }
.at-artist:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.at-avatar { grid-row: 1 / 3; width: 64px; height: 80px; border-radius: 8px; overflow: hidden;
  background: linear-gradient(150deg, #2e2a20, #191510); display: grid; place-items: center;
  border: 2px solid rgba(216,178,92,.35); box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.at-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.at-avatar .monogram { font-size: 22px; font-weight: 700; color: #cdb377; letter-spacing: .02em; }

.at-artist .aname { font-weight: 700; font-size: 16.5px; }
.at-artist .alife { color: var(--muted); font-size: 12.5px; margin-left: 8px; font-weight: 400; white-space: nowrap; }
.at-artist .awhy { color: var(--muted); font-size: 13.5px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* the 3-thumb painting strip on each card */
.at-strip { grid-column: 1 / 3; display: flex; gap: 8px; margin-top: 8px; }
.at-strip .th { flex: 1 1 0; height: 74px; border-radius: 6px; overflow: hidden;
  background: #14192c; border: 1px solid var(--border); }
.at-strip .th img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .92; }
.at-artist .go-hint { grid-column: 1 / 3; margin-top: 8px; font-size: 12.5px; color: #d8b25c; }

@media (min-width: 640px) {
  .at-artist-grid { grid-template-columns: 1fr 1fr; }
}

/* desktop: era rail */
.at-rail { display: none; }
@media (min-width: 820px) {
  .at-chips { display: none; }
  .at-stage { display: grid; grid-template-columns: 180px 1fr; gap: 26px; align-items: start; }
  .at-rail { display: block; position: sticky; top: 24px; }
  .at-rail .rail-title { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
  .at-rail a { display: block; font-size: 13.5px; color: var(--muted); text-decoration: none;
    padding: 6px 10px; border-left: 2px solid var(--border); }
  .at-rail a .yrs { display: block; font-size: 11px; opacity: .7; }
  .at-rail a:hover { color: var(--ink); }
  .at-rail a.active { color: #ffe9b8; border-left-color: #d8b25c; background: rgba(216,178,92,.07); }
}

/* ============================================================== placard === */
.at-scrim { position: fixed; inset: 0; z-index: 60; background: rgba(4,7,15,.72);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  display: none; align-items: flex-end; justify-content: center; }
.at-scrim.open { display: flex; }

.at-placard { position: relative; width: 100%; max-width: 720px; max-height: 88vh; overflow-y: auto;
  overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  background: linear-gradient(180deg, #131a30, #0d1326); border: 1px solid rgba(216,178,92,.28);
  border-bottom: none; border-radius: 18px 18px 0 0; padding: 22px 20px 30px;
  box-shadow: 0 -12px 60px rgba(0,0,0,.5); animation: at-rise .22s ease; }
@keyframes at-rise { from { transform: translateY(26px); opacity: .4; } to { transform: none; opacity: 1; } }
@media (min-width: 720px) {
  .at-scrim { align-items: center; padding: 30px 16px; }
  .at-placard { border-radius: 18px; border-bottom: 1px solid rgba(216,178,92,.28); }
}

.at-placard .close { position: sticky; top: 0; float: right; z-index: 2;
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border);
  background: rgba(20,26,48,.9); color: var(--ink); font-size: 20px; cursor: pointer; }

.at-p-head { display: flex; gap: 16px; align-items: center; margin-bottom: 14px; }
.at-p-portrait { flex: 0 0 auto; width: 86px; height: 108px; border-radius: 8px; overflow: hidden;
  border: 2px solid rgba(216,178,92,.4); background: #191510; display: grid; place-items: center;
  box-shadow: 0 4px 14px rgba(0,0,0,.4); }
.at-p-portrait img { width: 100%; height: 100%; object-fit: cover; }
.at-p-portrait .monogram { font-size: 30px; font-weight: 700; color: #cdb377; }
.at-p-name { font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
.at-p-life { color: var(--muted); font-size: 13.5px; margin: 2px 0 6px; }
.at-p-era { display: inline-block; font-size: 12px; color: #ffe9b8; border: 1px solid rgba(216,178,92,.45);
  border-radius: 999px; padding: 2px 10px; background: rgba(216,178,92,.08); }

.at-p-bio { font-size: 14.5px; color: var(--ink); opacity: .92; margin-bottom: 10px; }
.at-p-why { font-size: 14px; color: #ffe9b8; background: rgba(216,178,92,.07);
  border-left: 3px solid #d8b25c; border-radius: 0 8px 8px 0; padding: 10px 12px; margin-bottom: 16px; }

.at-p-enter { display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 14px; margin: 4px 0 18px; border-radius: 12px; border: none; cursor: pointer;
  font-size: 16px; font-weight: 700; color: #16120a; text-decoration: none;
  background: linear-gradient(135deg, #e8c877, #c89a3e); box-shadow: 0 4px 18px rgba(216,178,92,.25); }
.at-p-enter:hover { filter: brightness(1.06); }

.at-p-workstitle { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.at-p-works { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-bottom: 16px; }
.at-p-work { display: block; border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
  background: #10162b; color: inherit; text-decoration: none; cursor: pointer;
  transition: transform .15s ease, border-color .15s ease; }
.at-p-work:hover { transform: translateY(-2px); border-color: rgba(216,178,92,.5); }
.at-p-work .im { height: 110px; background: #0b0f1e; }
.at-p-work .im img { width: 100%; height: 100%; object-fit: cover; display: block; }
.at-p-work .wt { font-size: 12.5px; padding: 7px 9px 2px; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.at-p-work .wy { font-size: 11.5px; color: var(--muted); padding: 0 9px 8px; }
.at-p-loading { color: var(--muted); font-size: 13.5px; padding: 12px 0; }

.at-p-source { color: var(--muted); font-size: 12px; margin-top: 6px; }
.at-p-source a { color: #9fb2e8; }
