:root {
      --bg: #f3f1ec; --surface: #ffffff; --surface-2: #faf8f4; --line: #e7e1d6; --text: #1c1a18;
      --muted: #6f685f; --gold: #c7a23a; --gold-dark: #a88421; --shadow: 0 16px 40px rgba(34,25,11,.12);
    }
    * { box-sizing: border-box; }
    html, body { margin:0; padding:0; width:100%; height:100%; font-family:Inter,Arial,Helvetica,sans-serif; background:linear-gradient(180deg,#f7f5f1 0%,#efebe4 100%); color:var(--text); overflow:hidden; }
    body.slider-active { background:#000; }
    .app-shell { display:flex; flex-direction:column; height:100dvh; padding:12px; gap:12px; max-width:980px; margin:0 auto; position:relative; z-index:1; }
    .frame { background:rgba(255,255,255,.88); border:1px solid rgba(255,255,255,.7); box-shadow:var(--shadow); backdrop-filter:blur(12px); -webkit-backdrop-filter:blur(12px); }
    .header { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:18px 22px; border-radius:30px; min-height:110px; position:relative; z-index:1200; }
    .logo-wrap { flex:1 1 auto; display:flex; align-items:center; justify-content:center; min-width:0; }
    .logo-img { max-width:min(360px, 82%); max-height:76px; width:auto; height:auto; object-fit:contain; display:block; }
    .logo-fallback { font-size:34px; font-weight:700; letter-spacing:.18em; color:#2e2823; text-align:center; }
    .hamburger-btn { flex:0 0 auto; width:58px; height:58px; border:0; border-radius:18px; display:grid; place-items:center; cursor:pointer; background:rgba(199,162,58,.12); color:var(--text); box-shadow:inset 0 0 0 1px rgba(199,162,58,.22); position:relative; z-index:1202; }
    .hamburger-btn span, .hamburger-btn span::before, .hamburger-btn span::after { display:block; width:22px; height:2px; border-radius:999px; background:currentColor; content:''; transition:transform .22s ease, opacity .22s ease; }
    .hamburger-btn span { position:relative; }
    .hamburger-btn span::before { position:absolute; top:-7px; left:0; }
    .hamburger-btn span::after { position:absolute; top:7px; left:0; }
    .menu-open .hamburger-btn span { background:transparent; }
    .menu-open .hamburger-btn span::before { transform:translateY(7px) rotate(45deg); }
    .menu-open .hamburger-btn span::after { transform:translateY(-7px) rotate(-45deg); }
    .menu-panel { position:absolute; top:calc(100% + 10px); right:0; width:min(360px, calc(100vw - 16px)); padding:10px; border-radius:26px; opacity:0; pointer-events:none; transform:translateY(-8px) scale(.98); transition:opacity .22s ease, transform .22s ease; z-index:1201; }
    .menu-open .menu-panel { opacity:1; pointer-events:auto; transform:translateY(0) scale(1); }
    .top-menu { display:grid; grid-template-columns:repeat(2,1fr); gap:10px; }
    .menu-btn,.control-btn { border:0; background:transparent; color:var(--text); text-decoration:none; border-radius:18px; min-height:78px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px; padding:10px 8px; cursor:pointer; }
    .menu-btn:hover { background:rgba(199,162,58,.08); }
    .menu-icon { width:34px; height:34px; display:grid; place-items:center; font-size:24px; }
    .menu-label { font-size:15px; color:#3f3a34; text-align:center; }
    .view { display:none; flex:1 1 auto; min-height:0; }
    .view.active { display:flex; flex-direction:column; gap:12px; position:relative; z-index:1; }
    .hero { flex:0 0 220px; border-radius:28px; overflow:hidden; position:relative; background:#d9d4cc center center / cover no-repeat; min-height:220px; z-index:1; }
    .hero::after { content:""; position:absolute; inset:0; background:linear-gradient(180deg,rgba(0,0,0,.05),rgba(0,0,0,.18)); z-index:0; }
    .hero-text { position:absolute; left:24px; bottom:18px; z-index:1; color:#fff; text-shadow:0 2px 12px rgba(0,0,0,.35); }
    .hero-text strong { display:block; font-size:28px; margin-bottom:6px; }
    .hero-text span { font-size:16px; }
    .tiles-wrap { flex:1 1 auto; min-height:0; border-radius:28px; padding:18px; display:flex; flex-direction:column; gap:16px; position:relative; z-index:1; }
    .section-title { font-size:20px; color:#423c35; margin:0; }
    .tiles { display:grid; grid-template-columns:repeat(2,1fr); gap:16px; flex:1 1 auto; min-height:0; }
    .tile { position:relative; overflow:hidden; border-radius:24px; background:#d7d1c6 center center / cover no-repeat; min-height:0; box-shadow:inset 0 0 0 1px rgba(255,255,255,.15); z-index:1; }
    .tile::before { content:""; position:absolute; inset:0; background:linear-gradient(180deg,rgba(0,0,0,.08),rgba(0,0,0,.48)); }
    .tile-action { position:absolute; inset:0; z-index:1; display:flex; flex-direction:column; align-items:flex-start; justify-content:flex-end; padding:18px; color:#fff; text-decoration:none; background:transparent !important; border:0; width:100%; cursor:pointer; }
    .tile-title { font-size:22px; font-weight:700; text-shadow:0 2px 8px rgba(0,0,0,.4); }
    .tile-subtitle { font-size:14px; opacity:.92; margin-top:6px; text-shadow:0 2px 8px rgba(0,0,0,.4); }

    body.slider-active .header, body.slider-active .menu-panel, body.slider-active #homeView, body.slider-active .admin-fab { display:none !important; }
    body.slider-active .app-shell { max-width:none; width:100%; padding:0; gap:0; }

    .slider-view { border-radius:28px; overflow:hidden; background:#0b0b0d; position:relative; }
    body.slider-active .slider-view { position:fixed; inset:0; width:100%; height:100dvh; border-radius:0; z-index:999; display:flex !important; }
    .slider-stage { position:relative; flex:1 1 auto; min-height:0; background:#050506; width:100%; height:100%; }
    .slide { position:absolute; inset:0; opacity:0; transition:opacity .8s ease; display:grid; place-items:center; background:#050506; }
    .slide.active { opacity:1; z-index:1; }
    .slide img { width:100%; height:100%; object-fit:cover; object-position:center; background:#050506; }
    .slider-bar { position:absolute; left:0; right:0; bottom:0; z-index:4; display:flex; align-items:center; justify-content:space-between; gap:14px; padding:14px 16px calc(14px + env(safe-area-inset-bottom)); background:linear-gradient(180deg,transparent,rgba(0,0,0,.72)); }
    .slider-meta { color:#fff; background:rgba(255,255,255,.12); border-radius:999px; padding:10px 14px; font-size:14px; }
    .slider-controls { display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
    .control-btn { min-height:48px; padding:10px 14px; flex-direction:row; background:rgba(255,255,255,.14); color:#fff; }
    .control-btn.gold { background:linear-gradient(180deg,var(--gold),var(--gold-dark)); color:#1e1706; font-weight:700; }
    .empty-state { position:absolute; inset:0; display:grid; place-items:center; text-align:center; z-index:2; color:#fff; padding:28px; background:linear-gradient(180deg,rgba(0,0,0,.25),rgba(0,0,0,.58)); }
    .empty-state strong { font-size:32px; display:block; margin-bottom:10px; }

    .admin-fab { position:fixed; right:18px; bottom:18px; z-index:30; width:68px; height:68px; border-radius:999px; border:0; box-shadow:var(--shadow); background:linear-gradient(180deg,var(--gold),var(--gold-dark)); color:#1b1406; font-size:26px; cursor:pointer; display:grid; place-items:center; text-decoration:none; }
    .desktop-help { position:fixed; inset:0; display:none; align-items:center; justify-content:center; padding:20px; z-index:70; background:rgba(0,0,0,.52); }
    .desktop-help.show { display:flex; }
    .desktop-help-card { width:min(560px,100%); background:#fff; padding:24px; border-radius:26px; box-shadow:var(--shadow); }
    .desktop-help-card h3 { margin:0 0 10px; font-size:30px; }
    .desktop-help-card p { margin:0 0 16px; color:var(--muted); font-size:18px; line-height:1.5; }
    .desktop-help-card button { min-height:48px; padding:12px 18px; font-size:16px; border-radius:14px; border:0; background:linear-gradient(180deg,var(--gold),var(--gold-dark)); color:#1d1505; font-weight:700; cursor:pointer; }
    @media (max-width:900px), (orientation:portrait) {
      .app-shell{padding:8px;gap:8px}.header{padding:14px 16px;border-radius:22px;min-height:92px}.logo-img{max-width:min(250px,72vw);max-height:62px}.logo-fallback{font-size:26px}.hamburger-btn{width:52px;height:52px;border-radius:16px}.menu-panel{width:min(320px,calc(100vw - 16px))}.top-menu{grid-template-columns:1fr 1fr}.hero{min-height:180px;flex-basis:180px}.tiles{gap:12px}.tile-title{font-size:18px}
      .slider-bar { align-items:flex-end; flex-direction:column; }
      .slider-controls { width:100%; justify-content:space-between; }
      .control-btn { flex:1 1 calc(50% - 8px); }
    }

.tiles-count-1 { grid-template-columns:1fr; }
.tiles-count-2 { grid-template-columns:repeat(2,1fr); }
.tiles-count-3 .tile:first-child { grid-column:1 / -1; }
