:root{
  color-scheme: light dark;
  --bg:#0b0c0f;
  --panel:rgba(255,255,255,.04);
  --border:rgba(255,255,255,.10);
  --text:rgba(255,255,255,.92);
  --muted:rgba(255,255,255,.70);
  --link:rgba(120,170,255,.95);
  --max: 900px;
  --radius: 18px;
}

@media (prefers-color-scheme: light){
  :root{
    --bg:#f6f7fb;
    --panel:rgba(0,0,0,.03);
    --border:rgba(0,0,0,.10);
    --text:rgba(0,0,0,.88);
    --muted:rgba(0,0,0,.60);
    --link:rgba(0,90,200,.95);
  }
}

*{ box-sizing:border-box; }

html, body { height: 100%; }

body{
  margin:0;
  background:
    radial-gradient(1200px 600px at 20% 10%, rgba(120,170,255,.10), transparent 55%),
    radial-gradient(1000px 500px at 80% 0%, rgba(255,255,255,.06), transparent 55%),
    var(--bg);
  color:var(--text);
  font:16px/1.75 system-ui,-apple-system,Segoe UI,Roboto,sans-serif;
}

main{
  max-width:var(--max);
  margin:0 auto;
  padding:44px 18px 70px;
}

a{ color:var(--link); text-decoration:none; }
a:hover{ text-decoration:underline; }

h1{
  margin:0 0 6px;
  font-size:clamp(2rem,3vw,2.7rem);
  letter-spacing:-.02em;
}

.subtitle{ margin:0; color:var(--muted); }

.nav{
  margin-top:18px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:10px 12px;
  border-radius:999px;
  border:1px solid var(--border);
  background:rgba(0,0,0,.08);
}

.card{
  margin-top:22px;
  padding:16px;
  border-radius:var(--radius);
  border:1px solid var(--border);
  background:var(--panel);
  box-shadow:0 12px 30px rgba(0,0,0,.20);
}

.meta{
  display:flex;
  gap:14px;
  flex-wrap:wrap;
  color:var(--muted);
  font-size:.95rem;
}

hr.sep{
  border:0;
  height:1px;
  background:var(--border);
  margin:18px 0;
}

/* =========================
   Reader (Obsidian-like)
   ========================= */

.reader{
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  font-size:1.08rem;
}

/* Tighter, more "book" title inside the reader card */
.reader h1{
  font-family: inherit;
  font-size: 1.9rem;
  margin: 0 0 .6rem;
  letter-spacing: -0.015em;
}

/* Section hierarchy */
.reader h2{
  font-family: inherit;
  font-size: 1.45rem;
  margin: 2.2rem 0 .6rem;
}

.reader h3{
  font-family: inherit;
  font-size: 1.15rem;
  margin: 1.6rem 0 .35rem;
  opacity: .95;
}

/* Paragraph rhythm */
.reader p{
  margin: 0 0 1em;
}

/* Lists */
.reader ul, .reader ol{
  margin: .4em 0 1.2em 1.2em;
  padding: 0;
}
.reader li{
  margin: .35em 0;
}
.reader li ul, .reader li ol{
  margin-top: .4em;
}

/* Horizontal rules inside exported HTML */
.reader hr{
  border:0;
  height:1px;
  background: var(--border);
  margin: 2rem 0;
}

/* Blockquotes (nice for dramatic quotes / DM narration) */
.reader blockquote{
  margin: 1em 0;
  padding: .85em 1em;
  border-left: 3px solid var(--border);
  background: rgba(0,0,0,.06);
  border-radius: 12px;
}

/* Inline code + code blocks (in case your notes have them) */
.reader code{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: .95em;
  padding: .12em .35em;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(0,0,0,.08);
}
.reader pre{
  overflow:auto;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(0,0,0,.08);
}
.reader pre code{
  border: 0;
  padding: 0;
  background: transparent;
}

/* Obsidian internal-link style (so broken links look intentional) */
.reader .internal-link{
  text-decoration: underline dotted;
  opacity: .85;
}

/* =========================
   Pager + Footer
   ========================= */

.pager{
  display:flex;
  justify-content:space-between;
  gap:10px;
  margin-top:18px;
}

.pager a{
  flex:1;
  border:1px solid var(--border);
  border-radius:14px;
  padding:12px 14px;
  background:rgba(0,0,0,.06);
}

.pager a:hover{
  background:rgba(0,0,0,.10);
  text-decoration:none;
}

.footer{
  margin-top:40px;
  color:var(--muted);
  font-size:.95rem;
}
/* =========================
   Maps gallery
   ========================= */

.gallery {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}

.map-card {
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0,0,0,.20);
}

.map-card:hover {
  border-color: rgba(255,255,255,.18);
  transform: translateY(-1px);
}

.map-thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
  background: rgba(0,0,0,.08);
}

.map-meta {
  padding: 12px 12px 14px;
}

.map-title {
  margin: 0 0 6px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.map-caption {
  margin: 0;
  color: var(--muted);
  font-size: .95rem;
}

.tags {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,.08);
  color: var(--muted);
  font-size: .85rem;
}

/* motion respect */
@media (prefers-reduced-motion: no-preference) {
  .map-card { transition: transform .12s ease, border-color .12s ease; }
}
