:root {
    --bg: #070c0c;
    --panel: #0c1515;
    --panel-2: #101c1a;
    --green: #113f32;
    --green-2: #1d6f55;
    --gold: #c58b32;
    --gold-2: #e7b556;
    --paper: #efe0bc;
    --paper-2: #f7ebce;
    --brown: #38251c;
    --ink: #3b281f;
    --muted: #b9aa8d;
    --line: rgba(218, 170, 80, .25);
    --shadow: 0 28px 90px rgba(0,0,0,.45);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body {
    margin: 0;
    min-width: 320px;
    min-height: 100vh;
    background:
        radial-gradient(circle at 20% 0%, rgba(29,111,85,.08), transparent 32%),
        radial-gradient(circle at 80% 8%, rgba(197,139,50,.08), transparent 30%),
        #070c0c;
    color: #f7ead0;
    font-family: Tahoma, Arial, sans-serif;
    direction: rtl;
    overflow-x: hidden;
}
button, input, textarea { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
.ui-icon { width: 1.1em; height: 1.1em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.15em; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: 68px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 28px;
    padding: 0 max(24px, calc((100vw - 1320px) / 2));
    background: rgba(4, 9, 9, .92);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(16px);
}
.brand {
    border: 0;
    background: none;
    color: var(--gold-2);
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 23px;
    font-weight: 700;
    white-space: nowrap;
}
.brand-mark { display: grid; place-items: center; color: var(--gold-2); }
.brand-mark .ui-icon { width: 30px; height: 30px; }
.site-nav { display: flex; align-items: center; justify-content: center; gap: 8px; }
.site-nav button, .footer-links button {
    border: 0;
    color: #e8dcc4;
    background: transparent;
    padding: 10px 13px;
    border-radius: 8px;
}
.site-nav button:hover, .site-nav button.active { color: var(--gold-2); background: rgba(197,139,50,.08); }
.header-cta {
    border: 1px solid rgba(231,181,86,.55);
    color: #fbe9c4;
    background: rgba(89,56,25,.36);
    border-radius: 8px;
    padding: 10px 14px;
}
.header-cta:hover { background: rgba(197,139,50,.16); }

.home-hero {
    min-height: 620px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    background-image: url('/assets/site/binworld-hero.jpg');
    background-size: cover;
    background-position: center 52%;
    border-bottom: 1px solid var(--line);
}
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(4,8,8,.58), rgba(4,8,8,.86) 58%, rgba(4,8,8,.96)); }
.hero-copy { position: relative; z-index: 2; width: min(1320px, calc(100% - 48px)); margin: 0 auto; padding: 82px 0; }
.hero-copy > * { max-width: 650px; }
.eyebrow { color: var(--gold-2); letter-spacing: .09em; font-size: 12px; font-weight: 700; }
.hero-copy h1 { margin: 14px 0 18px; font-size: clamp(45px, 5vw, 76px); line-height: 1.18; color: #fff6e5; text-shadow: 0 3px 22px rgba(0,0,0,.4); }
.hero-copy h1 em { color: var(--gold-2); font-style: normal; }
.hero-copy p { color: #d9cdb7; font-size: 18px; line-height: 2; margin-bottom: 28px; }
.hero-seal { position: absolute; z-index: 2; left: max(30px, calc((100vw - 1280px)/2)); bottom: 42px; width: 86px; height: 86px; border: 1px solid rgba(231,181,86,.45); border-radius: 50%; display: grid; place-items: center; color: var(--gold-2); background: rgba(7,12,12,.62); box-shadow: inset 0 0 0 6px rgba(197,139,50,.06); }
.hero-seal span { font-family: Georgia, serif; font-size: 28px; line-height: 1; }
.hero-seal small { position: absolute; bottom: 16px; font-size: 7px; letter-spacing: .15em; }

.gold-btn, .outline-btn, .locked-btn {
    border-radius: 8px;
    min-height: 42px;
    padding: 0 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 700;
    transition: .16s ease;
}
.gold-btn { border: 1px solid #f0be65; color: #2b1c12; background: linear-gradient(#e9b95f, #b97c25); box-shadow: inset 0 1px rgba(255,255,255,.38), 0 5px 18px rgba(0,0,0,.28); }
.gold-btn:hover { transform: translateY(-1px); filter: brightness(1.07); }
.gold-btn.big { min-height: 50px; padding: 0 27px; font-size: 16px; }
.outline-btn { border: 1px solid rgba(231,181,86,.45); color: #f0d7a6; background: rgba(60,39,23,.35); }
.outline-btn:hover { background: rgba(197,139,50,.12); }
.locked-btn { border: 1px solid rgba(199,176,133,.22); color: #8e877b; background: rgba(255,255,255,.025); cursor: not-allowed; }

.section { width: min(1320px, calc(100% - 48px)); margin: 0 auto; }
.games-section { padding: 66px 0 88px; }
.section-title { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 18px; margin-bottom: 28px; }
.section-title span { height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.section-title h2 { margin: 0; color: #f7ead0; font-size: 29px; }
.game-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.game-card { overflow: hidden; border: 1px solid rgba(218,170,80,.28); border-radius: 12px; background: linear-gradient(180deg, rgba(19,31,30,.92), rgba(9,16,16,.98)); box-shadow: 0 16px 40px rgba(0,0,0,.22); }
.game-card.live { border-color: rgba(231,181,86,.7); box-shadow: 0 0 0 1px rgba(231,181,86,.08), 0 18px 50px rgba(0,0,0,.35); }
.game-art { height: 180px; background-size: cover; background-position: center; position: relative; }
.game-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(transparent 52%, rgba(5,10,10,.75)); }
.new-badge { position: absolute; z-index: 2; right: 12px; top: 12px; background: #16764c; color: white; border: 1px solid #42a976; border-radius: 6px; padding: 5px 9px; font-size: 11px; }
.game-info { padding: 18px; }
.game-info h3 { font-size: 22px; margin: 0 0 6px; }
.game-info p { color: var(--muted); margin: 0 0 18px; min-height: 44px; line-height: 1.7; font-size: 13px; }
.game-info button { width: 100%; }

.about-section { padding: 10px 0 80px; }
.about-card { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; padding: 42px; background: linear-gradient(120deg, rgba(20,59,48,.62), rgba(22,18,14,.65)), url('/assets/bank/haroun/partner-meeting.webp') left 28% center/46% auto no-repeat; }
.about-card::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, transparent 38%, rgba(7,12,12,.87) 63%); }
.about-card > * { position: relative; z-index: 2; max-width: 650px; }
.about-card h2 { font-size: 32px; margin: 10px 0 14px; }
.about-card p { line-height: 2; color: #d8ccb4; }
.about-pills { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.about-pills span { display: inline-flex; gap: 7px; align-items: center; padding: 9px 12px; border: 1px solid rgba(231,181,86,.2); border-radius: 8px; background: rgba(0,0,0,.18); color: #ead5ab; }
.update-strip { margin-bottom: 80px; border: 1px solid var(--line); border-radius: 10px; padding: 18px 22px; background: #0b1413; display: flex; align-items: center; justify-content: space-between; gap: 20px; color: #d8c9ab; }
.update-strip div { display: flex; align-items: center; gap: 8px; }

.bank-page { width: min(1320px, calc(100% - 48px)); margin: 0 auto; }
.bank-hero { display: grid; grid-template-columns: 1fr 1.05fr; gap: 52px; align-items: center; min-height: 575px; padding: 52px 0 38px; }
.breadcrumb { color: #8e826d; font-size: 12px; margin-bottom: 35px; }
.bank-emblem { display: grid; place-items: center; color: var(--gold-2); width: 56px; height: 56px; border: 1px solid rgba(231,181,86,.35); border-radius: 50%; background: rgba(197,139,50,.06); }
.bank-emblem .ui-icon { width: 32px; height: 32px; }
.bank-copy h1 { font-size: 54px; margin: 14px 0 4px; color: #fff0cf; }
.bank-copy h2 { color: var(--gold-2); margin: 0 0 18px; font-size: 18px; }
.bank-copy > p { color: #d0c4ad; line-height: 2.1; max-width: 650px; font-size: 15px; }
.game-meta { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 28px; color: #c5b697; font-size: 12px; }
.game-meta span { display: inline-flex; align-items: center; gap: 6px; padding: 9px 10px; border: 1px solid rgba(218,170,80,.14); border-radius: 7px; background: rgba(255,255,255,.025); }
.bank-cover { position: relative; padding: 10px; border: 1px solid rgba(231,181,86,.42); border-radius: 13px; background: #110d09; box-shadow: var(--shadow); }
.bank-cover img { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: 7px; filter: saturate(.95) contrast(1.04); }
.cover-frame { position: absolute; inset: 4px; border: 1px solid rgba(231,181,86,.18); border-radius: 10px; pointer-events: none; }

.screenshot-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; padding-bottom: 45px; }
.screenshot-strip button { padding: 0; border: 1px solid rgba(218,170,80,.25); border-radius: 9px; overflow: hidden; background: #0b1110; }
.screenshot-strip img { width: 100%; aspect-ratio: 16/9; object-fit: cover; transition: transform .22s ease; }
.screenshot-strip button:hover img { transform: scale(1.035); }

.play-section { padding: 30px 0 66px; }
.play-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.play-header h2 { margin: 4px 0 0; }
.game-stage { width: 100%; aspect-ratio: 16/9; max-height: calc(100vh - 100px); position: relative; overflow: hidden; background: #020303; border: 1px solid rgba(231,181,86,.38); border-radius: 12px; box-shadow: var(--shadow); }
#game-container { position: absolute; inset: 0; width: 100%; height: 100%; overflow: hidden; }
#game-container canvas { display: block; width: 100% !important; height: 100% !important; }
.game-cover { position: absolute; z-index: 5; inset: 0; display: grid; place-items: center; background: linear-gradient(rgba(5,10,9,.82), rgba(5,10,9,.9)), url('/assets/bank/haroun/haroun-desk-clean-v3.webp') center/cover; transition: opacity .28s ease; }
.game-cover.hidden { opacity: 0; pointer-events: none; }
.game-cover-inner { text-align: center; padding: 34px; }
.game-cover-inner > span { color: var(--gold-2); display: inline-block; }
.game-cover-inner > span .ui-icon { width: 54px; height: 54px; }
.game-cover-inner h3 { font-size: 42px; margin: 8px 0 6px; }
.game-cover-inner p { color: #d1c1a2; }
.game-cover-inner small { display: block; margin-top: 14px; color: #968a77; }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 17px; padding-bottom: 70px; }
.feature-grid article { border: 1px solid var(--line); border-radius: 12px; padding: 25px; background: linear-gradient(145deg, rgba(21,57,48,.34), rgba(14,18,17,.8)); }
.feature-grid article > span { color: var(--gold-2); }
.feature-grid article > span .ui-icon { width: 30px; height: 30px; }
.feature-grid h3 { margin: 12px 0 7px; }
.feature-grid p { color: #bdb19c; line-height: 1.9; font-size: 13px; }

.chapter-card { margin: 10px 0 80px; display: grid; grid-template-columns: 1.3fr .7fr; gap: 28px; border: 1px solid rgba(231,181,86,.32); border-radius: 14px; overflow: hidden; background: radial-gradient(circle at 85% 40%, rgba(197,139,50,.1), transparent 35%), #120d0b; box-shadow: var(--shadow); }
.chapter-copy { padding: 42px; }
.chapter-copy h2 { font-size: 33px; line-height: 1.55; margin: 8px 0 15px; color: #f3dfb9; }
.chapter-copy p { color: #c9b89a; line-height: 2; }
.chapter-points { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 20px; }
.chapter-points span { padding: 7px 10px; border: 1px solid rgba(231,181,86,.22); background: rgba(197,139,50,.06); color: #e2c892; border-radius: 6px; font-size: 12px; }
.chapter-photo { position: relative; min-height: 330px; }
.chapter-photo img { width: 100%; height: 100%; object-fit: cover; filter: sepia(.25) saturate(.7) brightness(.7); }
.chapter-photo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, #120d0b, transparent 55%); }
.chapter-photo span { position: absolute; z-index: 2; bottom: 30px; left: 28px; transform: rotate(-3deg); color: #173f33; background: #d4bd89; padding: 10px 16px; font-weight: 700; border: 1px solid #77603c; box-shadow: 0 6px 20px rgba(0,0,0,.4); }
.chapter-photo small { color: #4f412d; }

.reviews-section { scroll-margin-top: 90px; padding: 30px 0 85px; }
.reviews-head { display: grid; grid-template-columns: 1fr auto; gap: 35px; align-items: center; margin-bottom: 24px; }
.reviews-head h2 { font-size: 36px; margin: 6px 0 9px; }
.reviews-head p { max-width: 760px; color: #bfb198; line-height: 2; }
.rating-summary { text-align: center; min-width: 160px; border: 1px solid var(--line); border-radius: 12px; padding: 16px 25px; background: #0d1514; }
.rating-summary strong { display: block; font-size: 35px; color: #f5dfb0; }
.big-stars, .review-stars { color: #eab04d; letter-spacing: 2px; direction: ltr; }
.rating-summary small { color: #958873; }
.reviews-layout { display: grid; grid-template-columns: 400px 1fr; gap: 20px; }
.review-form, .review-feed { border: 1px solid rgba(218,170,80,.26); border-radius: 12px; background: linear-gradient(180deg, #f1e2bf, #e9d4a9); color: var(--ink); box-shadow: 0 18px 44px rgba(0,0,0,.28); }
.review-form { padding: 24px; }
.review-form h3 { font-size: 24px; margin: 0 0 18px; }
.review-form > label { display: block; margin: 12px 0 7px; font-size: 12px; font-weight: 700; }
.review-form input:not([type='radio']), .review-form textarea { width: 100%; border: 1px solid rgba(88,61,39,.24); background: rgba(255,255,255,.42); color: #38271d; border-radius: 7px; padding: 11px 12px; outline: none; resize: vertical; }
.review-form input:focus, .review-form textarea:focus { border-color: #b27b2e; box-shadow: 0 0 0 3px rgba(197,139,50,.12); }
.review-form .gold-btn { width: 100%; margin-top: 15px; }
.star-picker { display: inline-flex; flex-direction: row; direction: rtl; }
.star-picker input { position: absolute; opacity: 0; pointer-events: none; }
.star-picker label { color: #aa9978; font-size: 31px; cursor: pointer; transition: color .12s; }
.star-picker label:hover, .star-picker label:hover ~ label, .star-picker input:checked ~ label { color: #d99a2d; }
.form-status { min-height: 20px; color: #36614d; font-size: 12px; }
.review-feed { padding: 22px; min-height: 430px; }
.feed-title { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(88,61,39,.15); padding-bottom: 13px; margin-bottom: 8px; }
.feed-title h3 { margin: 0; font-size: 24px; }
.review-card { display: grid; grid-template-columns: 46px 1fr; gap: 12px; padding: 16px 2px; border-bottom: 1px solid rgba(88,61,39,.12); }
.review-avatar { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: #254f42; color: #f3ddb0; border: 2px solid #c89a4a; font-weight: 700; }
.review-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.review-head span { color: #8a7359; font-size: 11px; }
.review-stars { font-size: 13px; margin-top: 2px; }
.review-body p { margin: 7px 0 0; line-height: 1.8; color: #4a3829; font-size: 13px; }
.empty-reviews, .reviews-loading { display: grid; min-height: 290px; place-items: center; color: #796a55; text-align: center; }

.latest-updates { padding-bottom: 90px; }
.update-card { border: 1px solid var(--line); border-radius: 12px; padding: 25px; background: #0c1413; display: grid; grid-template-columns: .45fr 1fr; gap: 30px; }
.update-card strong { display: block; color: #f2d69d; font-size: 19px; margin-bottom: 6px; }
.update-card span { color: #918571; }
.update-card ul { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 28px; color: #c2b399; }
.update-card li::marker { color: #59a47e; }

.site-footer { border-top: 1px solid var(--line); padding: 40px max(24px, calc((100vw - 1320px) / 2)); background: #050909; display: grid; grid-template-columns: auto 1fr auto; gap: 35px; align-items: center; color: #817967; }
.footer-brand { pointer-events: none; }
.site-footer p { margin: 0; text-align: center; }
.footer-links { display: flex; align-items: center; gap: 8px; }
.footer-links button { color: #a69a84; padding: 5px 7px; }

.lightbox { position: fixed; z-index: 1000; inset: 0; display: none; place-items: center; padding: 35px; background: rgba(0,0,0,.9); }
.lightbox.open { display: grid; }
.lightbox img { max-width: 92vw; max-height: 86vh; border: 1px solid rgba(231,181,86,.45); border-radius: 10px; box-shadow: 0 30px 100px #000; }
#lightbox-close { position: fixed; top: 22px; left: 25px; width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(231,181,86,.4); background: #2c1a12; color: #f6d99c; font-size: 26px; }

@media (max-width: 980px) {
    .site-header { grid-template-columns: auto 1fr; gap: 10px; padding: 0 18px; }
    .site-nav { display: none; }
    .header-cta { justify-self: start; }
    .game-grid { grid-template-columns: repeat(2, 1fr); }
    .bank-hero { grid-template-columns: 1fr; }
    .bank-cover { max-width: 760px; }
    .screenshot-strip { grid-template-columns: repeat(2,1fr); }
    .reviews-layout { grid-template-columns: 1fr; }
    .feature-grid { grid-template-columns: 1fr; }
    .chapter-card { grid-template-columns: 1fr; }
    .chapter-photo { min-height: 260px; }
    .site-footer { grid-template-columns: 1fr; text-align: center; }
    .footer-links { justify-content: center; flex-wrap: wrap; }
}

@media (max-width: 620px) {
    .site-header { height: 60px; }
    .brand { font-size: 18px; }
    .brand-mark .ui-icon { width: 25px; height: 25px; }
    .header-cta { padding: 8px 10px; font-size: 11px; }
    .home-hero { min-height: 520px; }
    .hero-copy { width: calc(100% - 32px); }
    .hero-copy h1 { font-size: 43px; }
    .hero-copy p { font-size: 15px; }
    .hero-seal { display: none; }
    .section, .bank-page { width: calc(100% - 28px); }
    .game-grid { grid-template-columns: 1fr; }
    .about-card { padding: 28px; background-size: cover; background-position: center; }
    .about-card::after { background: rgba(6,10,10,.8); }
    .update-strip, .play-header, .reviews-head { display: block; }
    .update-strip button, .play-header button { margin-top: 13px; width: 100%; }
    .bank-copy h1 { font-size: 43px; }
    .screenshot-strip { grid-template-columns: 1fr 1fr; }
    .game-stage { border-radius: 5px; }
    .chapter-copy { padding: 27px; }
    .reviews-head .rating-summary { margin-top: 18px; }
    .update-card { grid-template-columns: 1fr; }
    .update-card ul { grid-template-columns: 1fr; }
}


/* Release-candidate safeguards */
.portrait-game-notice{display:none;position:sticky;top:70px;z-index:999;background:#5b3a22;color:#f9e4b3;border:1px solid #c7984f;border-radius:10px;padding:10px 14px;margin:10px auto;max-width:520px;text-align:center;font-weight:700}
.binworld-error{position:fixed;inset:auto 20px 20px 20px;z-index:99999;margin:auto;max-width:620px;background:#2b1b14;color:#f7e5bd;border:2px solid #c7984f;border-radius:14px;padding:16px 18px;box-shadow:0 16px 50px #0008;display:grid;gap:8px;text-align:right}
.binworld-error strong{font-size:16px}.binworld-error span{font-size:13px;color:#dcc8a5}.binworld-error button{justify-self:start;background:#2d775b;color:#fff;border:1px solid #d6ad5f;border-radius:8px;padding:8px 16px;cursor:pointer;font-weight:700}
@media (orientation:portrait) and (max-width:900px){.portrait-game-notice{display:block}.game-stage{min-height:56vw}}

/* Mobile direct-play / installed PWA mode */
html.game-only-mode,
body.game-only-mode {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
    overflow: hidden !important;
    background: #050808 !important;
    overscroll-behavior: none;
    touch-action: none;
}
body.game-only-mode #app {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    padding: 0;
    overflow: hidden;
}
.mobile-game-page,
.mobile-game-viewport,
.mobile-game-container {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: #050808;
}
.mobile-game-page {
    z-index: 2147480000;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    box-sizing: border-box;
}
.mobile-game-viewport {
    inset: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    width: auto;
    height: auto;
}
.mobile-game-container canvas {
    display: block !important;
    position: absolute !important;
    inset: 0 !important;
    margin: auto !important;
    max-width: none !important;
    max-height: none !important;
    image-rendering: auto;
    -webkit-user-select: none;
    user-select: none;
    touch-action: none;
}
.mobile-landscape-hint {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 999999;
    place-items: center;
    align-content: center;
    gap: 10px;
    background: radial-gradient(circle at center, #18362f 0, #07100e 68%);
    color: #f6e2b3;
    text-align: center;
    font-family: Tahoma, Arial, sans-serif;
}
.mobile-landscape-hint strong { font-size: 23px; }
.mobile-landscape-hint span { color: #baa98b; font-size: 13px; }
.rotate-phone-icon {
    width: 76px;
    height: 48px;
    border: 3px solid #d8aa55;
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-size: 27px;
    transform: rotate(90deg);
    margin-bottom: 10px;
}
@media (orientation: portrait) and (pointer: coarse) {
    html.game-only-mode .mobile-landscape-hint { display: grid; }
}
@media (display-mode: fullscreen), (display-mode: standalone) {
    html.game-only-mode .mobile-game-page,
    html.game-only-mode .mobile-game-viewport,
    html.game-only-mode .mobile-game-container {
        width: 100vw;
        height: 100vh;
        height: 100dvh;
    }
}


@media (orientation: landscape) and (pointer: coarse) {
    html.game-only-mode,
    body.game-only-mode,
    body.game-only-mode #app,
    .mobile-game-page,
    .mobile-game-viewport,
    .mobile-game-container {
        width: 100dvw !important;
        height: 100dvh !important;
        min-height: 100dvh !important;
    }
}


/* v2.1.13 — Mobile safe viewport fix
   Use VisualViewport instead of raw 100vw/100dvh so Android/iOS system bars
   never cover the left/right edge after landscape rotation. */
html.game-only-mode,
body.game-only-mode,
body.game-only-mode #app {
    position: fixed !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: #050808 !important;
}

html.game-only-mode .mobile-game-page {
    position: fixed !important;
    left: var(--bh-vv-left, 0px) !important;
    top: var(--bh-vv-top, 0px) !important;
    width: var(--bh-vv-width, 100vw) !important;
    height: var(--bh-vv-height, 100dvh) !important;
    inset: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

html.game-only-mode .mobile-game-viewport {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    padding-top: env(safe-area-inset-top) !important;
    padding-right: env(safe-area-inset-right) !important;
    padding-bottom: env(safe-area-inset-bottom) !important;
    padding-left: env(safe-area-inset-left) !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    background: #050808 !important;
}

html.game-only-mode .mobile-game-container {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

/* Preserve the whole 1280×720 game instead of letting phone chrome crop an edge.
   On very wide phones we stretch only the presentation layer, so no gameplay UI is lost. */
html.game-only-mode .mobile-game-container canvas {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    right: auto !important;
    bottom: auto !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    transform: none !important;
    touch-action: none !important;
}

@media (orientation: landscape) and (pointer: coarse) {
    html.game-only-mode .mobile-game-page,
    html.game-only-mode .mobile-game-viewport,
    html.game-only-mode .mobile-game-container {
        min-height: 0 !important;
    }
}


/* v2.1.14 — True mobile fullscreen pass.
   Keep the safe VisualViewport fallback until fullscreen is granted, then use
   the whole layout viewport so the game does not leave a black strip. */
html.game-only-mode.native-fullscreen-active .mobile-game-page,
html.game-only-mode .mobile-game-page:fullscreen,
html.game-only-mode .mobile-game-page:-webkit-full-screen {
    position: fixed !important;
    inset: 0 !important;
    left: 0 !important;
    top: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    min-width: 100vw !important;
    min-height: 100vh !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: #050808 !important;
    overflow: hidden !important;
}

html.game-only-mode.native-fullscreen-active .mobile-game-viewport,
html.game-only-mode.native-fullscreen-active .mobile-game-container,
html.game-only-mode .mobile-game-page:fullscreen .mobile-game-viewport,
html.game-only-mode .mobile-game-page:fullscreen .mobile-game-container,
html.game-only-mode .mobile-game-page:-webkit-full-screen .mobile-game-viewport,
html.game-only-mode .mobile-game-page:-webkit-full-screen .mobile-game-container {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: #050808 !important;
}

html.game-only-mode.native-fullscreen-active .mobile-game-container canvas,
html.game-only-mode .mobile-game-page:fullscreen .mobile-game-container canvas,
html.game-only-mode .mobile-game-page:-webkit-full-screen .mobile-game-container canvas {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    transform: none !important;
    touch-action: none !important;
}

@media (display-mode: fullscreen) {
    html.game-only-mode .mobile-game-page,
    html.game-only-mode .mobile-game-viewport,
    html.game-only-mode .mobile-game-container {
        position: fixed !important;
        inset: 0 !important;
        left: 0 !important;
        top: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        min-width: 100vw !important;
        min-height: 100vh !important;
        margin: 0 !important;
        padding: 0 !important;
    }
}

/* Bank Haroun offline-first PWA installer / updater */
.bh-offline-progress {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: grid;
    place-items: center;
    padding: max(18px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
    background: radial-gradient(circle at 50% 28%, rgba(33,78,61,.48), rgba(4,8,7,.96) 58%, #030504 100%);
    direction: rtl;
    font-family: Tahoma, Arial, sans-serif;
}
.bh-offline-card {
    width: min(560px, 92vw);
    padding: 28px 30px 24px;
    border: 1px solid rgba(216,177,91,.66);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(26,48,39,.98), rgba(9,22,18,.99));
    box-shadow: 0 24px 70px rgba(0,0,0,.55), inset 0 1px rgba(255,255,255,.08);
    color: #f7ecd0;
    text-align: center;
}
.bh-offline-emblem {
    width: 64px;
    height: 64px;
    margin: 0 auto 14px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    border: 2px solid #d7b25c;
    background: #173b2e;
    color: #f3d68c;
    font: 800 20px/1 Georgia, serif;
    box-shadow: inset 0 0 0 4px rgba(0,0,0,.18);
}
.bh-offline-card h2 { margin: 0 0 10px; font-size: clamp(20px, 4vw, 28px); color: #ffe3a0; }
.bh-offline-card p { margin: 0 auto 18px; max-width: 470px; line-height: 1.85; font-size: clamp(13px, 2.6vw, 16px); color: #dfd6c1; }
.bh-offline-bar { height: 14px; overflow: hidden; border-radius: 999px; background: #07100d; border: 1px solid rgba(218,183,105,.42); box-shadow: inset 0 2px 5px rgba(0,0,0,.55); }
.bh-offline-bar span { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #2e7658, #d8b55f); transition: width .16s ease-out; }
.bh-offline-percent { display: block; margin-top: 12px; font: 800 22px/1 Arial, sans-serif; color: #f4d27e; }
.bh-offline-count { display: block; margin-top: 8px; color: #b9c9bf; font-size: 11px; }
.bh-offline-note { margin-top: 15px; padding-top: 13px; border-top: 1px solid rgba(216,177,91,.18); color: #aeb7ae; font-size: 11px; }
.bh-offline-card button, .bh-update-toast button { border: 1px solid #d8b35e; border-radius: 9px; background: linear-gradient(#d7b360,#a77c32); color: #1c160c; font: 700 13px Tahoma,Arial,sans-serif; padding: 10px 18px; cursor: pointer; }
.bh-offline-card.error .bh-offline-emblem { color: #ffd3c4; border-color: #b96b51; background: #5a2a1e; }
.bh-update-toast {
    position: fixed;
    z-index: 99990;
    right: max(16px, env(safe-area-inset-right));
    bottom: max(16px, env(safe-area-inset-bottom));
    width: min(500px, calc(100vw - 32px));
    display: grid;
    grid-template-columns: 42px 1fr auto auto;
    gap: 11px;
    align-items: center;
    padding: 14px;
    direction: rtl;
    border: 1px solid rgba(216,179,94,.72);
    border-radius: 14px;
    background: rgba(10,30,23,.97);
    box-shadow: 0 16px 45px rgba(0,0,0,.5);
    color: #f6ead0;
    font-family: Tahoma,Arial,sans-serif;
}
.bh-update-icon { width: 38px; height: 38px; display: grid; place-items:center; border-radius: 50%; background:#204b39; color:#efd18b; font-size:22px; }
.bh-update-copy { min-width: 0; }
.bh-update-copy strong, .bh-update-copy span { display:block; }
.bh-update-copy strong { color:#ffe0a0; font-size:13px; margin-bottom:4px; }
.bh-update-copy span { color:#cbd3cc; font-size:10px; line-height:1.6; }
.bh-update-toast button { white-space: nowrap; padding:8px 11px; font-size:10px; }
.bh-update-toast button.secondary { background:#172a23; color:#d5d8d3; border-color:#4f685e; }
.bh-offline-mini-warning { position:fixed; z-index:99980; left:50%; bottom:18px; transform:translateX(-50%); width:min(540px,90vw); padding:10px 14px; border-radius:9px; background:#4d3321; color:#ffe9c2; border:1px solid #a98654; text-align:center; font:11px/1.7 Tahoma,Arial,sans-serif; direction:rtl; }
@media (max-width: 700px) {
    .bh-offline-card { padding: 20px 20px 18px; }
    .bh-update-toast { grid-template-columns: 34px 1fr auto; }
    .bh-update-toast #bh-update-later { grid-column: 3; }
    .bh-update-icon { width:32px; height:32px; font-size:18px; }
}

/* v2.1.20 — in-game chapter-one review form (PWA/desktop) */
.bh-game-review-overlay {
    position: absolute;
    inset: 0;
    z-index: 200000;
    display: grid;
    place-items: center;
    padding: max(10px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
    box-sizing: border-box;
    background: radial-gradient(circle at 50% 28%, rgba(28,72,55,.46), rgba(8,7,6,.88) 60%, rgba(3,3,3,.96));
    backdrop-filter: blur(3px);
    direction: rtl;
    font-family: Tahoma, Arial, sans-serif;
    overflow: auto;
    overscroll-behavior: contain;
}
.bh-game-review-card {
    position: relative;
    width: min(720px, 94vw);
    max-height: min(650px, 92dvh);
    overflow: auto;
    box-sizing: border-box;
    padding: 22px 26px 20px;
    border: 2px solid #c89a4a;
    border-radius: 18px;
    background:
        linear-gradient(rgba(255,255,255,.08), rgba(255,255,255,0) 25%),
        linear-gradient(180deg, #f2dfb6 0%, #e5c990 100%);
    color: #3c291d;
    box-shadow: 0 28px 90px rgba(0,0,0,.68), inset 0 0 0 5px rgba(92,57,29,.12);
}
.bh-review-close {
    position: absolute;
    top: 10px;
    left: 12px;
    width: 38px;
    height: 38px;
    border: 1px solid #8d6336;
    border-radius: 50%;
    background: #6b4932;
    color: #fff1cf;
    font: 700 24px/1 Arial, sans-serif;
    cursor: pointer;
}
.bh-review-heading { padding-left: 45px; }
.bh-review-heading > span { display: inline-block; color: #26735a; font-size: 11px; font-weight: 800; letter-spacing: .3px; }
.bh-review-heading h2 { margin: 4px 0 4px; color: #51321f; font-size: clamp(22px, 4vw, 31px); }
.bh-review-heading p { margin: 0 0 12px; color: #76583c; line-height: 1.7; font-size: 12px; }
#bh-game-review-form { display: grid; gap: 9px; }
.bh-review-stars-block > label, .bh-review-fields > label { display: block; margin-bottom: 5px; color: #5b3d29; font-size: 11px; font-weight: 800; }
.bh-review-stars { display: inline-flex; direction: rtl; flex-direction: row; gap: 2px; padding: 3px 0 5px; }
.bh-review-stars input { position: absolute; opacity: 0; pointer-events: none; }
.bh-review-stars label { color: #a98b5e; font: 700 clamp(31px, 6vw, 42px)/1 Arial, sans-serif; cursor: pointer; filter: drop-shadow(0 1px rgba(255,255,255,.55)); transition: transform .12s ease, color .12s ease; }
.bh-review-stars label:active { transform: scale(.88); }
.bh-review-stars label:hover, .bh-review-stars label:hover ~ label, .bh-review-stars input:checked ~ label { color: #d89420; }
.bh-review-fields { display: grid; grid-template-columns: 92px 1fr; gap: 7px 10px; align-items: center; }
.bh-review-fields > label { margin: 0; }
.bh-review-fields input, .bh-review-fields textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid rgba(91,58,33,.42);
    border-radius: 9px;
    background: rgba(255,252,242,.78);
    color: #302117;
    padding: 10px 12px;
    outline: none;
    font: 16px/1.5 Tahoma, Arial, sans-serif;
    direction: rtl;
    text-align: right;
}
.bh-review-fields textarea { resize: vertical; min-height: 82px; max-height: 150px; }
.bh-review-fields input:focus, .bh-review-fields textarea:focus { border-color: #27755a; box-shadow: 0 0 0 3px rgba(39,117,90,.14); }
.bh-game-review-status { min-height: 19px; margin: 0; color: #256047; font-size: 11px; font-weight: 700; line-height: 1.6; }
.bh-review-actions { display: flex; gap: 9px; justify-content: flex-start; }
.bh-review-actions button { min-width: 150px; border-radius: 9px; padding: 10px 16px; font: 700 12px Tahoma, Arial, sans-serif; cursor: pointer; }
.bh-review-actions .primary { border: 1px solid #1e5d47; background: linear-gradient(#3b8d6b,#28654e); color: #fff8e6; box-shadow: inset 0 1px rgba(255,255,255,.15); }
.bh-review-actions .secondary { border: 1px solid #8a6847; background: #78563b; color: #f7e3bc; }
.bh-review-actions button:disabled { opacity: .55; cursor: default; }
@media (max-height: 520px) and (orientation: landscape) {
    .bh-game-review-overlay { place-items: start center; }
    .bh-game-review-card { width: min(780px, 95vw); max-height: calc(100dvh - 18px); padding: 14px 20px 13px; }
    .bh-review-heading h2 { font-size: 22px; margin-top: 2px; }
    .bh-review-heading p { font-size: 10px; line-height: 1.45; margin-bottom: 5px; }
    .bh-review-stars label { font-size: 30px; }
    .bh-review-fields textarea { min-height: 55px; max-height: 78px; }
    .bh-review-fields input, .bh-review-fields textarea { padding: 7px 10px; }
    .bh-review-actions button { padding: 8px 13px; }
}
@media (max-width: 620px) {
    .bh-game-review-card { padding: 18px 18px 16px; }
    .bh-review-fields { grid-template-columns: 1fr; gap: 5px; }
    .bh-review-fields > label { margin-top: 3px; }
    .bh-review-actions { display: grid; grid-template-columns: 1fr 1fr; }
    .bh-review-actions button { min-width: 0; }
}
