:root {
    --brown: #4b2318;
    --deep-brown: #2d150f;
    --gold: #d6a33b;
    --cream: #fff8e8;
    --paper: #fffdf6;
    --green: #27441d;
    --muted: #6d5b4a;
    --border: #e4d2a8;
}

* { box-sizing: border-box; }
@font-face {
  font-family: 'SiyamRupali';
  src: url('fonts/SiyamRupali.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

body,
.bpy,
.bn,
.story-bpy,
.story-bn,
.title-bpy,
.title-bn {
  font-family: 'SiyamRupali', "Noto Serif Bengali", serif;
}

body {
    margin: 0;
    background: linear-gradient(180deg, #fff8e8 0%, #f4ead2 100%);
    color: var(--deep-brown);
    line-height: 1.65;
}

.site-header {
    background: var(--deep-brown);
    border-bottom: 5px solid var(--gold);
    box-shadow: 0 5px 18px rgba(0,0,0,.22);
}

.hero-banner img {
    width: 100%;
    display: block;
    max-height: 420px;
    object-fit: cover;
    object-position: center;
}

.top-nav {
    max-width: 1180px;
    margin: 0 auto;
    display: flex;
    gap: 10px;
    justify-content: center;
    padding: 12px 16px;
    background: linear-gradient(90deg, var(--deep-brown), var(--green), var(--deep-brown));
}

.top-nav a {
    color: var(--cream);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 999px;
    font-weight: 700;
}

.top-nav a:hover { background: rgba(255,255,255,.14); }

.main-wrap {
    max-width: 1180px;
    margin: 0 auto;
    padding: 28px 18px 50px;
}

.intro-card,
.story-reader,
.story-list-section {
    background: rgba(255,253,246,.93);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: 0 10px 28px rgba(75,35,24,.10);
    padding: 28px;
}

.eyebrow {
    color: var(--green);
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    font-size: 13px;
    margin: 0 0 8px;
}

.intro-card h1,
.reader-head h1 {
    margin: 0;
    font-size: clamp(38px, 6vw, 72px);
    color: var(--brown);
    line-height: 1.1;
}

.story-list-section { margin-top: 24px; }
.section-heading h2 { margin: 0; font-size: 32px; color: var(--brown); }
.section-heading p { margin-top: 4px; color: var(--muted); }

.story-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
    margin-top: 20px;
}

.story-card {
    background: #fffaf0;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 20px;
    transition: transform .18s ease, box-shadow .18s ease;
}
.story-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 22px rgba(75,35,24,.14);
}
.story-card h3 { margin: 0 0 6px; font-size: 25px; color: var(--green); }
.story-title-en, .reader-title-en { color: var(--brown); font-weight: 700; }
.story-title-bn, .reader-title-bn { color: var(--muted); }
.meta-line { color: var(--muted); font-size: 14px; display: grid; gap: 2px; margin: 10px 0; }

.read-btn,
.back-link {
    display: inline-block;
    background: var(--brown);
    color: var(--cream);
    text-decoration: none;
    padding: 9px 16px;
    border-radius: 999px;
    margin-top: 10px;
}
.read-btn:hover, .back-link:hover { background: var(--green); }

.reader-head {
    border-bottom: 2px solid var(--border);
    padding-bottom: 20px;
    margin-bottom: 22px;
}

.source-box {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    color: var(--muted);
    margin: 14px 0;
}

.translation-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 18px;
}
.translation-toggle button {
    border: 1px solid var(--gold);
    background: #fff4d6;
    color: var(--brown);
    padding: 8px 14px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 700;
}
.translation-toggle button.active {
    background: var(--green);
    color: white;
}

.sentence-block {
    padding: 22px 0;
    border-bottom: 1px dashed var(--border);
}
.sentence-block:last-child { border-bottom: none; }

.bpy-text,
.translation {
    padding: 14px 16px;
    border-radius: 16px;
    margin: 10px 0;
}
.bpy-text { background: #fff5df; border-left: 5px solid var(--gold); font-size: 21px; }
.translation { background: #f7f4e9; border-left: 5px solid var(--green); }
.line-label {
    display: inline-block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--muted);
    font-weight: 700;
}
.bpy-text p, .translation p { margin: 4px 0 0; }

.translation-bn { display: none; }
body.show-bn .translation-en { display: none; }
body.show-bn .translation-bn { display: block; }
body.show-en .translation-en { display: block; }
body.show-en .translation-bn { display: none; }

.story-figure {
    margin: 0 0 18px;
    background: #fffaf0;
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow: hidden;
}
.story-figure img {
    display: block;
    width: 100%;
    max-height: 460px;
    object-fit: cover;
}
.story-figure figcaption {
    padding: 12px 15px;
    color: var(--muted);
    display: grid;
    gap: 4px;
}

.empty-box {
    background: #fff4d6;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 18px;
}

.site-footer {
    background: var(--deep-brown);
    color: var(--cream);
    text-align: center;
    padding: 24px 16px;
    border-top: 4px solid var(--gold);
}
.footer-inner p { margin: 3px 0; }
.footer-native { color: #f2cf85; }

@media (max-width: 700px) {
    .top-nav { justify-content: flex-start; overflow-x: auto; }
    .intro-card, .story-reader, .story-list-section { padding: 20px; border-radius: 18px; }
    .bpy-text { font-size: 19px; }
}
