
  :root{
    --gold:#c9a227; --gold-soft:#e0be5a;
    --red:#a63d3d; --red-soft:#c25858;
    --blue:#3a6ea5; --blue-soft:#5f8fc4;
    --bg:#0a0e17; --surface:#111726; --surface-2:#161e30;
    --border:#252f45; --text:#e9e6da; --text-dim:#9aa3b8; --text-faint:#5c6478;
    --shadow: 0 20px 60px -20px rgba(0,0,0,0.6);
  }
  html[data-theme="light"]{
    --bg:#f4efe2; --surface:#ffffff; --surface-2:#faf6ea;
    --border:#e1d8bf; --text:#201b10; --text-dim:#5a5241; --text-faint:#a39a83;
    --shadow: 0 20px 50px -25px rgba(80,60,20,0.25);
  }
  *{box-sizing:border-box; margin:0; padding:0;}
  html{scroll-behavior:smooth;}
  body{
    background:var(--bg); color:var(--text); font-family:'Inter', sans-serif;
    transition:background .35s ease, color .35s ease; overflow-x:hidden;
  }
  ::selection{ background:var(--gold); color:#0a0e17; }
  a{color:inherit; text-decoration:none;}
  .mono{ font-family:'JetBrains Mono', monospace; }
  .display{ font-family:'Sora', sans-serif; }

  .scanlines{
    position:fixed; inset:0; z-index:-1; pointer-events:none; opacity:.05;
    background:repeating-linear-gradient(0deg, var(--text) 0px, var(--text) 1px, transparent 1px, transparent 3px);
  }
  .grid-bg{
    position:fixed; inset:0; z-index:-2; pointer-events:none;
    background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 64px 64px; opacity:.2;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 30%, transparent 75%);
  }

  /* ===== Topbar ===== */
  .topbar{
    position:fixed; top:18px; left:50%; transform:translateX(-50%); z-index:50;
    width:calc(100% - 32px); max-width:920px;
    background: rgba(17,23,38,0.65); backdrop-filter: blur(20px) saturate(1.4); -webkit-backdrop-filter: blur(20px) saturate(1.4);
    border:1px solid rgba(255,255,255,0.08); border-radius:20px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.04);
    transition: background .35s ease, border-color .35s ease;
  }
  html[data-theme="light"] .topbar{
    background: rgba(255,255,255,0.72); border:1px solid rgba(0,0,0,0.08);
    box-shadow: 0 12px 40px rgba(80,60,20,0.18), inset 0 1px 0 rgba(255,255,255,0.6);
  }
  .topbar-inner{ display:flex; align-items:center; justify-content:space-between; padding:10px 16px; gap:12px; }
  .brand-wordmark{ display:flex; align-items:center; gap:2px; font-family:'Sora',sans-serif; font-weight:800; font-size:16px; letter-spacing:.02em; }
  .brand-wordmark .k{ color:var(--text); }
  .brand-wordmark .flix{ color:var(--gold); }
  .theme-toggle{
    position:relative; display:flex; align-items:center; justify-content:center;
    width:38px; height:38px; background:var(--surface-2); border:1px solid var(--border);
    border-radius:12px; cursor:pointer; flex-shrink:0; transition: border-color .2s ease, transform .2s ease;
  }
  .theme-toggle:hover{ border-color:var(--gold-soft); transform:translateY(-1px); }
  .theme-toggle svg{ position:absolute; width:18px; height:18px; color:var(--gold-soft); transition: opacity .3s ease, transform .4s ease; }
  html[data-theme="dark"] .icon-sun{ opacity:0; transform:rotate(90deg) scale(.5); }
  html[data-theme="light"] .icon-moon{ opacity:0; transform:rotate(-90deg) scale(.5); }

  /* ===== Hero ===== */
  .hero{
    display:flex; flex-direction:column; align-items:center; justify-content:center;
    text-align:center; padding:120px 24px 40px; position:relative;
  }
  .ticker-wrap{
    margin-top:32px; width:100%; max-width:720px; overflow:hidden;
    border-top:1px solid var(--border); border-bottom:1px solid var(--border); padding:12px 0;
    mask-image: linear-gradient(90deg, transparent, black 12%, black 88%, transparent);
  }
  .ticker{ display:flex; gap:36px; white-space:nowrap; width:max-content; animation:ticker 22s linear infinite; }
  .ticker span{ font-size:12px; letter-spacing:.1em; color:var(--text-faint); text-transform:uppercase; }
  @keyframes ticker{ from{ transform:translateX(0);} to{ transform:translateX(-50%);} }

  /* ===== Channel rows ===== */
  .channel{ padding:70px 24px; max-width:1180px; margin:0 auto; }
  .channel-head{ display:flex; align-items:flex-end; justify-content:space-between; gap:16px; margin-bottom:26px; flex-wrap:wrap; }
  .channel-num{ font-size:12px; letter-spacing:.1em; color:var(--text-faint); text-transform:uppercase; margin-bottom:6px; }
  .channel-title{ font-family:'Sora',sans-serif; font-weight:700; font-size:clamp(24px,4vw,34px); display:flex; align-items:center; gap:10px; }
  .channel-title .swatch{ width:10px; height:26px; border-radius:3px; }
  .channel-desc{ color:var(--text-dim); font-size:14px; max-width:420px; }
  .row-controls{ display:flex; gap:8px; }
  .row-btn{
    width:36px; height:36px; border-radius:10px; background:var(--surface); border:1px solid var(--border);
    display:flex; align-items:center; justify-content:center; cursor:pointer; color:var(--text-dim); transition:all .2s ease;
  }
  .row-btn:hover{ color:var(--text); border-color:var(--gold-soft); }

  .reel{
    display:flex; gap:18px; overflow-x:auto; scroll-snap-type:x proximity; padding:6px 6px 18px;
    scrollbar-width:none;
  }
  .reel::-webkit-scrollbar{ display:none; }

  .card{
    scroll-snap-align:start; flex:0 0 auto; cursor:pointer; transition:transform .3s ease;
  }
  .card:hover{ transform:translateY(-6px); }

  .poster{
    position:relative; border-radius:14px; overflow:hidden; border:1px solid var(--border);
    background: linear-gradient(155deg, var(--pc1), var(--pc2));
    display:flex; align-items:center; justify-content:center; box-shadow:var(--shadow);
    transition: border-color .3s ease;
  }
  .card:hover .poster{ border-color:var(--pc-accent); }
  .poster img{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
  .poster-icon{ opacity:.55; width:34%; height:34%; color:rgba(255,255,255,.85); }
  .poster-index{ position:absolute; bottom:10px; right:12px; font-size:11px; color:rgba(255,255,255,.65); }
  .play-overlay{
    position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
    background:rgba(10,14,23,0); transition:background .25s ease;
  }
  .card:hover .play-overlay{ background:rgba(10,14,23,.28); }
  .play-btn{
    width:52px; height:52px; border-radius:50%; background:rgba(255,255,255,.92); display:flex; align-items:center; justify-content:center;
    opacity:0; transform:scale(.8); transition:all .25s ease; color:#111;
  }
  .card:hover .play-btn{ opacity:1; transform:scale(1); }
  .play-btn svg{ width:20px; height:20px; margin-left:2px; }

  .pic-poster, .vid-poster{ width:190px; aspect-ratio:2/3; }
  .write-poster{ width:230px; aspect-ratio:3/4; padding:20px; align-items:flex-start; flex-direction:column; justify-content:space-between; }
  .write-poster .quote{ font-family:'Sora',sans-serif; font-size:15px; line-height:1.4; color:rgba(255,255,255,.92); }
  .write-poster .wtag{ font-size:10px; letter-spacing:.12em; text-transform:uppercase; color:rgba(255,255,255,.6); }

  .card-meta{ padding:10px 2px 0; max-width:190px; }
  .write-poster ~ .card-meta{ max-width:230px; }
  .card-title{ font-size:14px; font-weight:600; }
  .card-sub{ font-size:12px; color:var(--text-faint); margin-top:2px; }

  /* ===== Modal / lightbox ===== */
  .kf-modal{
    display:none; position:fixed; inset:0; z-index:100; background:rgba(5,7,12,.82);
    align-items:center; justify-content:center; padding:24px;
  }
  .kf-modal.open{ display:flex; }
  .kf-modal-box{
    background:var(--surface); border:1px solid var(--border); border-radius:18px; box-shadow:var(--shadow);
    max-width:720px; width:100%; max-height:86vh; overflow:auto; position:relative;
    /* Hide scrollbar for modal box */
    scrollbar-width: none; /* Firefox */
  }
  .kf-modal-box::-webkit-scrollbar {
    display: none; /* Safari and Chrome */
  }
  
  .kf-modal-close{
    position:absolute; top:14px; right:14px; width:34px; height:34px; border-radius:10px;
    background:var(--surface-2); border:1px solid var(--border); color:var(--text); cursor:pointer;
    display:flex; align-items:center; justify-content:center; z-index:2;
  }
  .kf-modal-media{ width:100%; max-height:52vh; object-fit:contain; background:#000; display:block; }
  .kf-modal-body{ padding:26px 28px 30px; }
  .kf-modal-tag{ font-size:11px; letter-spacing:.1em; text-transform:uppercase; color:var(--text-faint); margin-bottom:8px; }
  .kf-modal-title{ font-family:'Sora',sans-serif; font-weight:700; font-size:22px; margin-bottom:12px; }
  .kf-modal-text{ color:var(--text-dim); font-size:15px; line-height:1.75; white-space:pre-line; }
  .kf-modal-video{ width:100%; max-height:52vh; background:#000; display:block; }

  /* ===== Nested Accordion Dropdown Styles inside Modal/Reader ===== */
  .writings-dropdown-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
  }

  .sub-writing-card {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.2s ease;
  }

  .sub-writing-card:hover {
    border-color: var(--red-soft);
  }

  .sub-writing-header {
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .sub-writing-meta h4 {
    font-size: 0.95rem;
    font-family: 'Sora', sans-serif;
    margin: 0 0 0.2rem 0;
    color: var(--text);
  }

  .sub-writing-meta span {
    font-size: 0.8rem;
    color: var(--text-faint);
    font-family: 'JetBrains Mono', monospace;
  }

  .sub-dropdown-icon {
    transition: transform 0.3s ease;
    color: var(--text-dim);
    flex-shrink: 0;
  }

  .sub-writing-card.active .sub-dropdown-icon {
    transform: rotate(180deg);
    color: var(--red-soft);
  }

  .sub-writing-body-wrapper {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--bg);
  }

  .sub-writing-body {
    padding: 1.25rem;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-dim);
    white-space: pre-line;
    border-top: 1px solid var(--border);
  }

  .tab{
    display:flex; align-items:center; gap:8px;
    padding:10px 16px; font-size:13px; color:var(--text-dim);
    border-right:1px solid var(--border);
    cursor:pointer; transition:color .2s ease, background .2s ease;
    white-space:nowrap;
    border-radius: 0;
  }
  .tab:hover{ color:var(--text); background:var(--surface-2); border-radius:10px; }
  .tab.active{ color:var(--text); background:var(--bg); box-shadow:inset 0 -2px 0 var(--gold); border-radius:10px 10px 0 0; }
  .tab-dot{ width:7px; height:7px; border-radius:50%; flex-shrink:0; background:#ffd700; }

  footer{ padding:40px 24px 60px; text-align:center; color:var(--text-faint); font-size:12px; }

  @media (max-width:560px){
    .channel{ padding:52px 20px; }
    .pic-poster, .vid-poster{ width:150px; }
  }
