/* =========================================
   STONE GRILL — Reflections (Unified Clean)
   ========================================= */

/* Theme */
:root{
  --bg:#1f1815; --paper:#2a211e; --ink:#f3e6dd; --muted:#c9b0a4;
  --accent:#ff6a3e; --accent2:#f7b733; --line:#3a2f2b;
}

/* Base */
*{box-sizing:border-box}
html,body{margin:0}
body{
  font-family:Georgia, ui-serif, serif;
  background:var(--bg);
  color:var(--ink);
}
a{color:inherit; text-decoration:none}
a:hover{text-decoration:underline}

/* Header */
.site-header{
  background: linear-gradient(to right, var(--accent2), var(--accent));
  padding: 16px 10px;
  text-align:center;

  /* keep header from being too stretched on big screens */
  max-width:1100px;
  margin:0 auto;
  border-radius:0 0 16px 16px;
}
.site-header img{max-height:56px}
.site-header h1{margin:8px 0 4px; font-size:clamp(24px,4.5vw,40px)}
.site-header .tag{margin:0 0 6px; opacity:.9}
.hero{
  padding:14px 16px;
  text-align:center;
  color:var(--muted);
}

/* Layout */
.wrap{
  max-width:1100px;
  margin:0 auto;
  padding:12px 16px 42px;
}

/* GRID OF CARDS (desktop) */
.grid{
  display:grid;
  gap:16px;
}

/* On wide screens, show cards in a true grid (2–3 columns) */
@media (min-width:900px){
  .grid{
    grid-template-columns:repeat(auto-fit, minmax(320px, 1fr));
    align-items:stretch;
  }

  article.card{
    grid-template-columns:1fr;   /* inside the card: stack cover + text */
    max-width:480px;
    margin:0 auto;
  }

  article.card .left{
    margin-bottom:8px;
    justify-content:center;
  }

  article.card .right{
    align-items:flex-start;
    text-align:left;
  }
}

/* Card */
article.card{
  display:grid;
  grid-template-columns:180px minmax(0,1fr); /* mobile/tablet default */
  column-gap:14px;
  align-items:start;
  background:var(--paper);
  border:2px solid var(--accent);
  border-radius:16px;
  padding:12px;
  transition:transform .15s ease, box-shadow .15s ease;
}
article.card:hover{
  transform:translateY(-2px);
  box-shadow:0 8px 20px rgba(0,0,0,.35);
}

article.card .left{ display:flex; justify-content:center; }
article.card .right{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:10px;
  align-items:flex-start;
}

/* Cover */
img.book-cover{
  display:block;
  width:180px; height:260px;
  object-fit:cover;
  border-radius:10px;
  box-shadow:0 15px 20px rgba(0,0,0,.35);
  background:#111;
}

/* When used in grid mode, let the cover adapt */
@media (min-width:900px){
  img.book-cover{
    width:100%;
    max-width:280px;
    height:auto;
    aspect-ratio:3 / 4;
  }
}

/* Text */
article.card h3{
  margin:2px 0 4px;
  font-size:1.05rem;
  line-height:1.2;
}
.right p{
  margin:0 0 8px;
  color:var(--muted);
  font-size:.95rem;
}
.meta{ font-size:.9rem; color:var(--muted); }

/* Center reflection card title + subtitle */
h3,
h3 + p{
  text-align:center;
}

.title-link{
  display:inline-block;
}


/* Meta + Share aligned */
.meta-share{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  flex-wrap:wrap;
  width:100%;
}
.meta-share .meta{ margin:0; }
.meta-share .share-group{ margin:0; }

/* Global share-group style (buttons rendered by JS) */
.share-group{ display:flex; gap:8px; }
.share-group .btn{
  background:var(--accent);
  color:#fff;
  border:none;
  border-radius:8px;
  padding:8px 12px;
  font-size:.9rem;
  font-weight:600;
  cursor:pointer;
}
.share-group .btn:hover{ filter:brightness(.95); }

/* Audio (unified) */
.audio-section{ text-align:center; margin:6px 0 0; width:100%; }
.audio-label{ font-size:.95rem; color:#ffb380; margin:0 0 6px; }

.audio-wrap{
  width:100%;
  margin:4px 0 0;
}
.audio-wrap .label{
  font-size:.95rem;
  color:#ffb380;
  margin:0 0 6px;
}

/* Actual audio element styling */
.audio-wrap audio,
.audio-player{
  width:100%;
  max-width:280px;        /* keeps it neat on wide layouts (desktop / AA) */
  height:34px;            /* slimmer than default */
  border-radius:999px;    /* pill shape */
  background-color:#f4f4f4; /* light so dark icons are visible */
  outline:none;
}

/* Slightly tighter on wider screens (incl. AA desktop mode) */
@media (min-width:700px){
  .audio-wrap audio,
  .audio-player{
    max-width:260px;
    height:32px;
  }
}

/* Footer */
.site-footer{
  background:#5a2a27;
  color:#fff;
  text-align:center;
  padding:20px;
}
.site-footer a{color:#fff; font-weight:700}

/* Responsive */
@media (max-width:700px){
  article.card{
    grid-template-columns:160px minmax(0,1fr);
    padding:10px;
    column-gap:12px;
  }
  img.book-cover{ width:150px; height:210px; }
}
@media (max-width:480px){
  article.card{
    grid-template-columns:1fr;
    row-gap:12px;
  }
  .left{ justify-content:center; }
  .right{ align-items:center; text-align:center; }
  .meta-share{ justify-content:center; gap:10px; }
  .share-group{ justify-content:center; }
  .audio-player{ width:100%; }
}
/* ==============================
   GLOBAL PLAYER POP-UP CONTROL
   ============================== */
#globalPlayer {
  display: none;
}

#globalPlayer.is-visible {
  display: block;
}

/* ==========================================
   Cusdis Comments — High Contrast Card
   ========================================== */

.comments-wrap{
  margin-top: 26px;
  padding: 18px 16px;
  border-radius: 18px;

  /* ✅ SOLID contrast (less transparency) */
  background: #120f0e;              /* dark solid */
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 18px 55px rgba(0,0,0,.55);

  /* ❌ remove blur/glass so text won’t blend */
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.comments-wrap h3{
  margin: 0 0 12px;
  color: rgba(255,255,255,.94);
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 800;
  font-size: 14px;

  /* optional: left align looks cleaner */
  text-align: left;
}

/* Cusdis container */
#cusdis_thread{
  border-radius: 14px;
  overflow: hidden;

  /* ✅ solid backing behind the iframe */
  background: #0f0d0c;
  border: 1px solid rgba(255,255,255,.12);
}

/* Cusdis = fixed window with its own scroll */
#cusdis_thread iframe{
  width: 100%;
  height: 70vh;        /* comment window height */
  min-height: 520px;   /* safe on phones */
  max-height: 900px;   /* not too huge on desktop */
  border: 0;
  display: block;
  background: #fff;    /* for light theme */
}

  /* helps if iframe background is transparent */
  background: #0f0d0c;
}

/* Default comments (light paper) */
.comments-wrap{
  margin: 26px auto;
  padding: 18px 18px 14px;
  border-radius: 18px;
  background: #F6F0E8;
  color: #1E1916;
  border: 1px solid rgba(0,0,0,.08);
  box-shadow: 0 18px 50px rgba(0,0,0,.25);
}

/* DARK comments box (use this on light pages) */
.comments-wrap.comments-dark{
  background: #171210;
  color: #F4EEE7;
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: 0 18px 50px rgba(0,0,0,.35);
}

.comments-wrap h3{ margin:0 0 12px; font-size:18px; opacity:.9; }
.comments-wrap.comments-dark h3{ color:#F4EEE7; }

#cusdis_thread{ border-radius:14px; overflow:hidden; }
#cusdis_thread iframe{
  width:100%;
  height:70vh;
  min-height:520px;
  max-height:900px;
  border:0;
  display:block;
  background:#ffffff; /* Cusdis stays light inside */
  border-radius:14px;
}
