* {
    scroll-behavior: smooth;
}

html {
  /* ── Theme variables () ── */
  --bg-primary:   #191b18;
  --bg-secondary: #20221e;
  --bg-dark:      #151614;
  --bg-card:      #1d1f1b;
  --bg-raised:    #262924;
  --bg-button:    #272925;
  --accent:       #86f38c;
  --accent-light: #dcffde;
  --accent-mid:   #a0e9a4;
  --accent-dim:   #9edaa2;
  --text-primary: #e8ffe9;
  --text-h1:      #c4f1c6;
  --text-h2:      #b9eebc;
  --text-h3:      #a3dba6;
  --text-body:    #c8d4c9;
  --text-muted:   #7a8878;
  --text-dim:     #5a6055;
  --text-faint:   #4a5048;
  --border:       #2a2e27;
  --outline:      #171b14;
  --accent-rgb:   134,243,140;

    width: 100%;
    height: 100%;
    font-family: 'Roboto', sans-serif;
    text-decoration: none;
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}



#sort-bar {
  position: relative;
  display: flex;
  justify-content: flex-end;
  margin: 0 0 10px;
}
.sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--bg-elevated, #262b24);
  color: var(--text-2, #b2c9b4);
  border: 1px solid var(--border, #2e3b2e);
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.sort-btn:hover {
  border-color: var(--accent, #86f38c);
  color: var(--accent, #86f38c);
}
.sort-btn.open {
  border-color: var(--accent, #86f38c);
  color: var(--accent, #86f38c);
}
.sort-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 160px;
  background: var(--bg-elevated, #262b24);
  border: 1px solid var(--border, #2e3b2e);
  border-radius: 10px;
  padding: 4px;
  z-index: 200;
  box-shadow: 0 8px 24px rgba(0,0,0,0.45);
}
.sort-menu.open { display: block; }
.sort-option {
  display: block;
  width: 100%;
  padding: 8px 14px;
  background: none;
  border: none;
  border-radius: 7px;
  color: var(--text-2, #b2c9b4);
  font-family: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.sort-option:hover  { background: var(--bg2, #1f2320); color: var(--text-1, #e8f5e9); }
.sort-option.sort-active { color: var(--accent, #86f38c); font-weight: 600; }

html::-webkit-scrollbar {
    display: none; /* Chrome, Safari and Opera */
}

/* ═══════════════════════════════════════════════
   THEME OVERRIDES  — set by settings.js via data-theme
   ═══════════════════════════════════════════════ */

html[data-theme="midnight"] {
  --bg-primary:   #0d1117;
  --bg-secondary: #161b22;
  --bg-dark:      #0a0d14;
  --bg-card:      #1c2128;
  --bg-raised:    #1f2937;
  --bg-button:    #21262d;
  --accent:       #60a5fa;
  --accent-light: #bfdbfe;
  --accent-mid:   #93c5fd;
  --accent-dim:   #7fb8f9;
  --text-primary: #e6edf3;
  --text-h1:      #bfdbfe;
  --text-h2:      #93c5fd;
  --text-h3:      #60a5fa;
  --text-body:    #8fa8c4;
  --text-muted:   #5a7a9a;
  --text-dim:     #3a5570;
  --text-faint:   #2a4060;
  --border:       #21262d;
  --outline:      #0d1117;
  --accent-rgb:   96,165,250;
}

html[data-theme="dusk"] {
  --bg-primary:   #1a1525;
  --bg-secondary: #211b2e;
  --bg-dark:      #130f1e;
  --bg-card:      #1e1830;
  --bg-raised:    #241e35;
  --bg-button:    #2a2040;
  --accent:       #a78bfa;
  --accent-light: #ede9fe;
  --accent-mid:   #c4b5fd;
  --accent-dim:   #b8a4f8;
  --text-primary: #ede9fe;
  --text-h1:      #ddd6fe;
  --text-h2:      #c4b5fd;
  --text-h3:      #a78bfa;
  --text-body:    #9a8ab0;
  --text-muted:   #6a5a88;
  --text-dim:     #504070;
  --text-faint:   #3a2e58;
  --border:       #2d2640;
  --outline:      #1a1525;
  --accent-rgb:   167,139,250;
}

html[data-theme="ember"] {
  --bg-primary:   #1a1208;
  --bg-secondary: #231a0d;
  --bg-dark:      #140e05;
  --bg-card:      #1e1508;
  --bg-raised:    #2a1e10;
  --bg-button:    #2a1e0d;
  --accent:       #fb923c;
  --accent-light: #fed7aa;
  --accent-mid:   #fbbf70;
  --accent-dim:   #f8a060;
  --text-primary: #fef3c7;
  --text-h1:      #fde68a;
  --text-h2:      #fcd34d;
  --text-h3:      #fb923c;
  --text-body:    #c8a870;
  --text-muted:   #9a7848;
  --text-dim:     #6b5228;
  --text-faint:   #4a3818;
  --border:       #382a15;
  --outline:      #1a1208;
  --accent-rgb:   251,146,60;
}

html[data-theme="rose"] {
  --bg-primary:   #1c1018;
  --bg-secondary: #231621;
  --bg-dark:      #160c12;
  --bg-card:      #1e1220;
  --bg-raised:    #281828;
  --bg-button:    #2a1825;
  --accent:       #f472b6;
  --accent-light: #fce7f3;
  --accent-mid:   #f9a8d4;
  --accent-dim:   #f690c8;
  --text-primary: #fce7f3;
  --text-h1:      #fbcfe8;
  --text-h2:      #f9a8d4;
  --text-h3:      #f472b6;
  --text-body:    #c8a0b8;
  --text-muted:   #907090;
  --text-dim:     #604060;
  --text-faint:   #402848;
  --border:       #342030;
  --outline:      #1c1018;
  --accent-rgb:   244,114,182;
}

html[data-theme="nord"] {
  --bg-primary:   #1a1f2e;
  --bg-secondary: #1e2637;
  --bg-dark:      #141824;
  --bg-card:      #1e2438;
  --bg-raised:    #263040;
  --bg-button:    #243048;
  --accent:       #88c0d0;
  --accent-light: #d8eef4;
  --accent-mid:   #b0d4e0;
  --accent-dim:   #a0c8d8;
  --text-primary: #d8dee9;
  --text-h1:      #d8dee9;
  --text-h2:      #c0ccd8;
  --text-h3:      #88c0d0;
  --text-body:    #8fa4b8;
  --text-muted:   #607080;
  --text-dim:     #405060;
  --text-faint:   #2a3848;
  --border:       #263040;
  --outline:      #1a1f2e;
  --accent-rgb:   136,192,208;
}

html[data-theme="sand"] {
  --bg-primary:   #1a1810;
  --bg-secondary: #221e12;
  --bg-dark:      #141210;
  --bg-card:      #1e1c10;
  --bg-raised:    #282418;
  --bg-button:    #2a2015;
  --accent:       #d4a853;
  --accent-light: #fef3c7;
  --accent-mid:   #e8c878;
  --accent-dim:   #e0bc68;
  --text-primary: #fef9ec;
  --text-h1:      #fef3c7;
  --text-h2:      #fde68a;
  --text-h3:      #d4a853;
  --text-body:    #c8a868;
  --text-muted:   #9a8048;
  --text-dim:     #6b5828;
  --text-faint:   #4a3c18;
  --border:       #38321a;
  --outline:      #1a1810;
  --accent-rgb:   212,168,83;
}

html[data-theme="sakura"] {
  --bg-primary:   #1a0f1a;
  --bg-secondary: #231523;
  --bg-dark:      #140c14;
  --bg-card:      #201828;
  --bg-raised:    #2a1e30;
  --bg-button:    #2a1828;
  --accent:       #e879a0;
  --accent-light: #fce7f3;
  --accent-mid:   #f0a0c0;
  --accent-dim:   #e890b0;
  --text-primary: #fce7f3;
  --text-h1:      #fbcfe8;
  --text-h2:      #f9a8d4;
  --text-h3:      #e879a0;
  --text-body:    #c8a0b8;
  --text-muted:   #907090;
  --text-dim:     #604058;
  --text-faint:   #402840;
  --border:       #3a2035;
  --outline:      #1a0f1a;
  --accent-rgb:   232,121,160;
}

html[data-theme="bw-dark"] {
  --bg-primary:   #000000;
  --bg-secondary: #111111;
  --bg-dark:      #080808;
  --bg-card:      #1a1a1a;
  --bg-raised:    #222222;
  --bg-button:    #1e1e1e;
  --accent:       #ffffff;
  --accent-light: #ffffff;
  --accent-mid:   #cccccc;
  --accent-dim:   #eeeeee;
  --text-primary: #ffffff;
  --text-h1:      #eeeeee;
  --text-h2:      #dddddd;
  --text-h3:      #cccccc;
  --text-body:    #aaaaaa;
  --text-muted:   #777777;
  --text-dim:     #555555;
  --text-faint:   #333333;
  --border:       #222222;
  --outline:      #000000;
  --accent-rgb:   255,255,255;
}

html[data-theme="bw-light"] {
  --bg-primary:   #f2f2f2;
  --bg-secondary: #ffffff;
  --bg-dark:      #e0e0e0;
  --bg-card:      #f8f8f8;
  --bg-raised:    #eeeeee;
  --bg-button:    #e8e8e8;
  --accent:       #1a1a1a;
  --accent-light: #333333;
  --accent-mid:   #444444;
  --accent-dim:   #555555;
  --text-primary: #111111;
  --text-h1:      #222222;
  --text-h2:      #333333;
  --text-h3:      #444444;
  --text-body:    #555555;
  --text-muted:   #777777;
  --text-dim:     #888888;
  --text-faint:   #999999;
  --border:       #dddddd;
  --outline:      #cccccc;
  --accent-rgb:   26,26,26;
}



body {
    background-color: var(--bg-primary);
    display: flex;
    flex-direction: column;
    font-family: 'Roboto', sans-serif;
    margin: 0;
    text-decoration: none;
    min-height: 100vh;
}


#ad90x720 {
    background-color: var(--bg-dark);
    display: flex;
    flex-wrap: wrap;
    margin: 3%;
    justify-content: center;
}

#NativeAd {
    background-color: var(--bg-dark);
    scale: 1;
    display: flex;
    justify-content: center;
    padding: 15px;
    margin: 1%;
    padding-top: 30px;
    gap: 35px;
    

}

#NativeAd2 {
    background-color: var(--bg-dark);
    display: flex;
    justify-content: center;
    padding: 15px;
    padding-top: 30px;
    gap: 8px;
    border-radius: 12px;
    overflow: hidden;
}

#NativeAd3 {
    background-color: var(--bg-dark);
    scale: 1;
    display: flex;
    justify-content: center;
    padding: 15px;
    margin: 1.5%;
    
    padding-top: 30px;
    gap: 8px;
    border-radius: 12px;

}

#NativeAd4 {
    display: flex;
    justify-content: center;
    padding: 10px;
    margin: 2%;
    margin-bottom: 0;
    gap: 8px;
    border-radius: 12px;
    overflow: hidden;
}








header {
    font-family: 'Roboto', sans-serif;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--bg-secondary);
    position: sticky;
    box-shadow: 1px 10px 5px 3px #151614;
    border-radius: 9px;
    display: flex;
    justify-content: space-between;
    transition: 700ms;
    z-index: 1000;
}

footer {
    display: flex;
    background-color: var(--bg-secondary);
    width: 100%;
    height: 160px;
    border-radius: 9px;
    margin-top: auto;
    justify-content: center;
    align-items: center;
}

.FooterHolder {
    background-color: var(--bg-secondary);
    height: 100%;
    width: 100%;
    box-shadow: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    
}

.SocialButton {
    align-items: center;
    width: fit-content;
    padding: 5px;
    margin: 5px;
    display: flex;
    justify-content: center;
    gap: 20%;
    





}

 .socialButton {
    background-color: var(--bg-button);
    
    border: none;
    padding: 2px;
    border-radius: 6px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    scale: 1;
    display: flex;
    overflow: hidden;
    
}

 .socialButton:hover {
    outline: 2px solid var(--accent);
 }

#updates{
    font-size: 80%;
}

#SocialDiv {
    
    display: flex;
    
    justify-content: center;
    
    
    width: auto;
    margin: 1%;
    border-radius: 12px;
}

#h1Footer {
    
    margin: 0;
    font-size: 80%;
    text-decoration: none;
    font-family: 'Roboto', sans-serif;
    color: white;
    text-align: center;
}

#FooterLeft {
    box-shadow: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: var(--bg-card);
    height: 75% ;
    width: 260px;
    margin: 1%;
    border-radius: 12px;
}

#announcementsDiv {
    box-shadow: none;
    display: flex;
    flex-direction: column;
    
  
    
    align-items: center;
    margin-top: 20  px;
    margin-left: 5%;
    margin-right: 5%;
    border-radius: 12px;
}



a {
    
    text-decoration: none;
    font-family: 'Roboto', sans-serif;
    color: white;
    
    transition: color 600ms;
}

a:hover {
    color: var(--accent-light);
    transition: color 0.6s;
}

h3 {
    font-size: 150%;
    text-decoration: none;
    font-family: 'Roboto', sans-serif;
    color: var(--text-h3);
    text-align: center;
}

h1 {
    font-size: 120%;
    text-decoration: none;
    font-family: 'Roboto', sans-serif;
    color: var(--text-h1);
    text-align: center;
}

h2 {
    font-size: 120%;
    text-decoration: none;
    font-family: 'Roboto', sans-serif;
    color: var(--text-h2);
    text-align: center;
}

#DescriptionText {
    font-size: 100%;
    text-align: left;
    padding: 1%;
    background-color: var(--bg-card);
    border-radius: 10px;
    box-shadow: 1px 5px 5px 2px #151614;
    
}

.description {
    font-size: 100%;
    text-decoration: none;
    font-family: 'Roboto', sans-serif;
    color: white;
    text-align: center;
    margin: 3%;
    margin-left: 2%;
    margin-right: 2%;
    margin-top: 6%;
    background-color: var(--bg-primary);
    height: fit-content;
    padding-bottom: 1%;
    border-radius: 10px;
    box-shadow: 1px 5px 5px 2px #151614;
    
}

#DescriptionPar {
    margin: 3%;
}

#list {
    box-shadow: 1px 10px 5px 3px #151614;
}

.lesson-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding-inline: 5px;
    padding-bottom: 20px;
    margin-top: 30px;
    border-radius: 15px;
    margin-inline: 6px;
    font-family: 'Roboto', sans-serif;
    gap: 6px;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    
}

.lesson-card {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 5px 20px;
    background-clip: padding-box;
    width: auto;
    min-width: 9%;
    min-height: 200px;
    content-visibility: auto;
    contain-intrinsic-size: 0px 175px;
    height: auto;
    
    margin-inline: 6px;
    align-items: end;
    margin-block: 6px;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    position: relative;
    box-shadow: 1px 10px 5px 3px #151614;
    color: white;
    border-radius: 15px;
    text-align: center;
    outline: 3px solid var(--outline);
    font-family: 'Roboto', sans-serif;
    background-color: var(--bg-dark);
    overflow: hidden;
    z-index: 1;
    
    transition: outline 0.6s;
}




.ad-label {
    display: block;
    font-family: 'Roboto', sans-serif;
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-dim, #5a6055);
    text-align: center;
    margin-bottom: 4px;
    user-select: none;
    pointer-events: none;
  }

  .ad-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin: 6px 0;
    padding-bottom: 40px;
    padding-top: 40px;
  }

  .ad-wrap ins {
    display: inline-block;
    width: 728px;
    height: 90px;
    max-width: 100%;
  }

  .ad-sidebar-rect {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 0 12px;
  }

  .ad-sidebar-rect ins,
.ad-sidebar-rect div {
    display: inline-block;
    width: 300px;
    
}

  .sidebar-header {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 10px 7px;
    font-family: 'Roboto', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--text-h3, #a3dba6);
    border-bottom: 1px solid var(--border, #2a2e27);
    margin-bottom: 4px;
  }

  .sidebar-header svg {
    width: 13px;
    height: 13px;
    fill: var(--accent, #86f38c);
    flex-shrink: 0;
  }

  .right {
    display: flex;
    flex-direction: column;
  }

  #wm46-activity-like,
  #wm46-activity-dislike {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 6px 14px !important;
    background: var(--bg-raised, #262924) !important;
    border: 1px solid var(--border, #2a2e27) !important;
    border-radius: 20px !important;
    cursor: pointer !important;
    font-family: 'Roboto', sans-serif !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: var(--text-body, #c8d4c9) !important;
    white-space: nowrap !important;
    transition: border-color 0.15s, background 0.15s, color 0.15s !important;
  }

  #wm46-activity-like:hover:not(.wm46-like--liked):not(.wm46-like--busy):not(.wm46-btn--disabled) {
    border-color: var(--accent, #86f38c) !important;
    color: var(--accent, #86f38c) !important;
    background: rgba(134,243,140,0.07) !important;
  }

  #wm46-activity-like.wm46-like--liked {
    border-color: var(--accent, #86f38c) !important;
    color: var(--accent, #86f38c) !important;
    background: rgba(134,243,140,0.1) !important;
  }

  #wm46-activity-dislike:hover:not(.wm46-dislike--disliked):not(.wm46-btn--disabled) {
    border-color: #f38686 !important;
    color: #f38686 !important;
    background: rgba(243,134,134,0.07) !important;
  }

  #wm46-activity-dislike.wm46-dislike--disliked {
    border-color: #f38686 !important;
    color: #f38686 !important;
    background: rgba(243,134,134,0.1) !important;
  }

  #wm46-activity-like.wm46-btn--disabled,
  #wm46-activity-dislike.wm46-btn--disabled {
    opacity: 0.32 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
  }

  #wm46-activity-like .al-heart,
  #wm46-activity-dislike .al-heart {
    font-size: 14px !important;
    line-height: 1 !important;
  }

  #wm46-activity-like .al-label,
  #wm46-activity-dislike .al-label {
    display: none !important;
  }

  #wm46-activity-like .al-count,
  #wm46-activity-dislike .al-count {
    font-size: 12px !important;
    font-weight: 600 !important;
    color: inherit !important;
    opacity: 0.72 !important;
  }


.grid-break { width: 90%; margin: 8px; display: flex; justify-content: center; padding: 15px;  }
.grid-break iframe { 
    
    height: 350px;
    border: none;
    display: block; 
}

.lesson-card--sidebar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 5px 20px;
    width: auto;
    min-width: 25%;
    min-height: 150px;
    height: auto;
    margin-inline: 6px;
    align-items: end;
    margin-block: 6px;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    position: relative;
    image-rendering: optimizeSpeed;
    color: white;
    border-radius: 15px;
    text-align: center;
    outline: 3px solid var(--outline);
    font-family: 'Roboto', sans-serif;
    background-color: var(--bg-dark);
    overflow: hidden;
    z-index: 1;
    transition: outline 0.6s;
}



.lesson-card--sidebar:hover {
  outline: 2.5px solid var(--accent);
  z-index: 3;
}

.lesson-card:hover .lesson-title {
    transition: color 0.6s;
    color: var(--accent-dim);
}

.lesson-card:hover {
    outline: 3px solid var(--accent);
    z-index: 3;
}

.fullscreen-btn {
    background-color: color-mix(in srgb, var(--accent-dim) 5%, transparent);
    border: dotted;
    padding: 8px;
    border-width: 1px;
    border-color: rgba(var(--accent-light));
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    
    align-items: center;
    justify-content: center;
    scale: 1.25;
}
.fullscreen-btn:hover {
    background-color: color-mix(in srgb, var(--accent-mid) 10%, transparent);
}
.fullscreen-btn img {
    width: 20px;
    height: 20px;
    display: block;
}



.lesson-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.2;
    padding: 6px 0;
    text-align: center;
    z-index: 2;
    
}

.announcementsText1 {
    display: flex;
    width: 100%;
    margin-top: 20px;
    background-color: var(--bg-raised);
    border-color: var(--accent)48;
    border-width: 1px;
    border-style: dashed;
    color: var(--accent-dim);
    font-size: 14px;
    line-height: 1.2;
    padding: 6px 0;
    text-align: center;
    z-index: 2;
    border-radius: 12px;
    align-items: center;
    justify-content: center;
}

.Aboutus {
    width: 50%;
    justify-content: center;
    border-radius: 15px;
    text-align: center;
    border: 3px solid var(--bg-primary);
    box-shadow: 1px 10px 5px 3px #151614;
    padding: 20px;
    margin: auto;
    margin-top: 20px;
    margin-bottom: 45px;
    background-color: var(--bg-secondary);
}


#audioControl {
  display: flex;
  border-color: rgba(var(--accent-light));
    align-items: center;
    width: 120px;         /* adjust width as needed */
    padding: 2px;
    margin-left: auto;     /* pushes it to the right side */
    justify-content: flex-start; /* aligns content inside */
    flex-grow: 0;
    margin-right: 2%;
}
#audioSlider { width: 100%; }


canvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.banner {
    padding-bottom: 20px;
    padding-top: 20px;
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 9px;
    margin: 0;
    text-decoration: none;
    display: flex;
    justify-content: space-between;
}

.Holder {
    display: flex;
    gap: 20px;
    padding: 20px;
}

.left, .center, .right {
    background-color: var(--bg-secondary);
    border: 2px solid var(--bg-dark);
    border-radius: 10px;
    padding: 10px;
    box-shadow: 1px 10px 5px 3px #151614;
    
    max-height: fit-content;
    
}

#list-right, #list-left {
    box-shadow: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    
    
}

.left, .right {
    flex: 1;
    width: 250px;
    
}



.center {
    flex: 4;
    
}

.qualityWrapper {
    position: relative; /* dropdown positioned relative to button */
    display: inline-block;
}

#qualityMenu {
    display: none;            /* hidden initially */
    position: absolute;       /* relative to .qualityWrapper */
    top: 100%;                /* directly below button */
    left: 0;
    flex-direction: column;
    background: #222;
    padding: 5px;
    border-radius: 5px;
    z-index: 1000;
    
}

#qualityMenu button {
    margin: 2px 0;
    padding: 5px 10px;
    color: white;
    background: #444;
    border: none;
    cursor: pointer;
}

#qualityMenu button:hover { background: #666; }

#ruffle-container {
    width: 100%;
    height: 620px; /* will scale dynamically with canvas */
    overflow: hidden; /* keeps canvas inside container */
    position: relative;
}


.BottomHolder {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 5px 10px;
  height: 50px;
  z-index: 500;
  background-color: var(--bg-2);
  border-radius: 0 0 10px 10px;
}


#game-frame {
    width: 100%;
    height: auto;
    border: none;
    display: block;
    padding-top: 30px;
}



#BackLink {
    color: #f1f1f1;
     position: absolute;
      background: rgba(0, 0, 0, 0.5);
       font-size: 20px;
    padding: 20px;
     text-align: center;
      margin: 5px;
       z-index: 1000;
        font-family: 'Roboto', sans-serif;
         border-radius: 7px;
     text-decoration: none;
}

.error {
    color: #ff6b6b;
    text-align: center;
    padding: 20px;
    background-color: #2c2f33;
    border-radius: 10px;
    margin: 20px;
}

.error a {
    color: #4da6ff;
    display: block;
    margin-top: 15px;
}

#emulator-container {
    background-color: #000;
}

#emulator-container {
    width: 100%;
    height: 750px;
    background-color: #000;
}

#Holder1 {
    display: flex;
    flex-direction: column;
    padding: 20px;
    gap: 20px;
}

#Watermelon {
    text-align: left;
    font-size: 20px;
    color: var(--text-primary);
    margin-inline: 6px;
    padding: 10px 50px;
    text-shadow: 0 0 25px var(--accent);
}

#Watermelon:hover {
    color: var(--accent-dim);
}

#Request-G:hover {
    color: var(--accent-dim);
}


#WatermelonFooter {
    text-align: center;
    font-size: 20px;
    text-shadow: 0 0 25px var(--accent);
    
}

#fullscreenBtn{
    max-width: 25px;
    height: 25px;
    padding: 5px;
    
    
    justify-content: center;
}



#audioBtn {
    max-width: 25px;
    height: 25px;
    padding: 5px;
    margin: 5px;
    
    justify-content: center;
}

#Request-G {
    text-align: right;
    margin-inline: 6px;
    padding: 10px 50px;
    font-size: 120%;
    color: var(--text-primary);
    text-shadow: 0 0 15px var(--accent);
}

p {
    font-size: 100%;
    text-decoration: none;
    font-family: 'Roboto', sans-serif;
    color: var(--text-body);
    text-align: center;
}

h4 {
    font-size: 100%;
    text-decoration: none;
    font-family: 'Roboto', sans-serif;
    color: var(--text-body);
    text-align: center;
}


.search-wrapper {
    padding: 0 6px 8px 6px;
    width: 100%;
    box-sizing: border-box;
}

.search-bar {
    position: relative;
    display: flex;
    align-items: center;
    max-width: 600px;
    margin: 0 auto;
    background-color: var(--bg-secondary);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 0 14px;
    
    gap: 10px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.search-bar:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 18px rgba(var(--accent-rgb), 0.18);
}

.search-icon {
    width: 18px;
    height: 18px;
    color: var(--text-dim);
    flex-shrink: 0;
    transition: color 0.3s;
}

.search-bar:focus-within .search-icon {
    color: var(--accent);
}

#searchInput {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-family: 'Roboto', sans-serif;
    font-size: 15px;
    padding: 13px 0;
    caret-color: var(--accent);
}

#searchInput::placeholder {
    color: var(--text-faint);
    font-size: 13px;
}

.search-clear {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    border-radius: 4px;
    color: var(--text-dim);
}

.search-clear:hover {
    color: var(--accent);
    background-color: rgba(var(--accent-rgb), 0.08);
}

.search-clear svg {
    width: 16px;
    height: 16px;
}

/* No results message */
.search-no-results {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    gap: 12px;
    width: 100%;
}

.search-no-results span {
    font-size: 48px;
    line-height: 1;
}

.search-no-results p {
    color: var(--text-dim);
    font-size: 15px;
    margin: 0;
}

.search-no-results p span {
    font-size: inherit;
    color: var(--accent);
}

/* Updates.html */

.updates {
    width: 90%;
    
    justify-content: center;
    border-radius: 15px;
    text-align: center;
    border: 3px solid var(--bg-primary);
    box-shadow: 1px 10px 5px 3px #151614;
    padding: 20px;
    margin: auto;
    margin-top: 20px;
    margin-bottom: 45px;
    background-color: var(--bg-secondary);
}

 /* ── Page shell ── */
    .updates-page {
      max-width: 780px;
      margin: 0 auto;
      padding: 32px 20px 80px;
    }

    .updates-heading {
      text-align: center;
      font-family: 'Poppins', sans-serif;
      font-weight: 600;
      font-size: 26px;
      color: var(--accent);
      text-shadow: 0 0 22px rgba(var(--accent-rgb), 0.35);
      margin: 0 0 6px;
      letter-spacing: 0.02em;
    }

    .updates-sub {
      text-align: center;
      color: var(--text-dim);
      font-size: 13px;
      margin: 0 0 40px;
      font-family: 'Roboto', sans-serif;
    }

    /* ── Timeline wrapper ── */
    .timeline {
      position: relative;
      padding-left: 28px;
    }

    /* Vertical green line */
    .timeline::before {
      content: '';
      position: absolute;
      left: 7px;
      top: 6px;
      bottom: 6px;
      width: 2px;
      background: linear-gradient(to bottom, rgba(var(--accent-rgb), 0.33), rgba(var(--accent-rgb), 0.13), transparent);
      border-radius: 2px;
    }

    /* ── Individual entry ── */
    .entry {
      position: relative;
      margin-bottom: 28px;
      background: var(--bg-secondary);
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 18px 20px 16px;
      transition: border-color 0.3s, box-shadow 0.3s;
      animation: fadeUp 0.4s ease both;
    }

    .entry:hover {
      border-color: var(--accent);
      box-shadow: 0 4px 24px rgba(var(--accent-rgb), 0.07);
    }

    /* Dot on the timeline */
    .entry::before {
      content: '';
      position: absolute;
      left: -24px;
      top: 20px;
      width: 10px;
      height: 10px;
      border-radius: 50%;
      background: var(--accent);
      box-shadow: 0 0 8px rgba(var(--accent-rgb), 0.6);
      border: 2px solid var(--bg-primary);
    }

    /* ── Entry header ── */
    .entry-header {
      display: flex;
      align-items: baseline;
      flex-wrap: wrap;
      gap: 8px;
      margin-bottom: 10px;
    }

    .entry-date {
      font-family: 'Poppins', sans-serif;
      font-weight: 600;
      font-size: 15px;
      color: var(--text-primary);
      letter-spacing: 0.01em;
    }

    .entry-version {
      font-family: 'Roboto', sans-serif;
      font-size: 11px;
      color: var(--accent);
      background: rgba(var(--accent-rgb), 0.08);
      border: 1px solid rgba(var(--accent-rgb), 0.2);
      border-radius: 6px;
      padding: 2px 8px;
      letter-spacing: 0.06em;
      text-transform: uppercase;
    }

    /* ── Tag chips ── */
    .tag {
      display: inline-block;
      font-size: 10px;
      font-family: 'Roboto', sans-serif;
      border-radius: 5px;
      padding: 2px 7px;
      letter-spacing: 0.05em;
      text-transform: uppercase;
      font-weight: 700;
      margin-left: 2px;
      margin-right: 6px;
    }

    .tag-New      { background: rgba(var(--accent-rgb), 0.12); color: var(--accent);  border: 1px solid rgba(var(--accent-rgb), 0.25); }
    .tag-Fix      { background: rgba(255,180, 60,0.10); color: #ffb43c;  border: 1px solid rgba(255,180,60,0.2);  }
    .tag-Improved   { background: rgba( 80,160,255,0.10); color: #7ab8ff;  border: 1px solid rgba(80,160,255,0.2); }
    .tag-Removed  { background: rgba(255, 90, 90,0.10); color: #ff7070;  border: 1px solid rgba(255,90,90,0.2);  }
    
    
    /* ── Item list inside entry ── */
    .entry-items {
      list-style: none;
      margin: 0;
      padding: 0;
      display: flex;
      flex-direction: column;
      gap: 7px;
    }


    
    .entry-items li {
      display: flex;
      align-items: flex-start;
      gap: 9px;
      font-family: 'Roboto', sans-serif;
      font-size: 14px;
      color: var(--text-body);
      text-align: left;
      line-height: 1.5;
    }

    .entry-items li .dot {
      margin-top: 6px;
      width: 5px;
      height: 5px;
      border-radius: 50%;
      background: #3a4038;
      flex-shrink: 0;
    }

    /* ── Fade-up animation ── */
    @keyframes fadeUp {
      from { opacity: 0; transform: translateY(10px); }
      to   { opacity: 1; transform: translateY(0);    }
    }

    .entry:nth-child(1) { animation-delay: 0.05s; }
    .entry:nth-child(2) { animation-delay: 0.10s; }
    .entry:nth-child(3) { animation-delay: 0.15s; }
    .entry:nth-child(4) { animation-delay: 0.20s; }
    .entry:nth-child(5) { animation-delay: 0.25s; }

    /* ── Empty state ── */
    .no-updates {
      text-align: center;
      color: #3a4038;
      font-size: 14px;
      padding: 60px 0;
      font-family: 'Roboto', sans-serif;
    }

    /* ── Responsive ── */
    @media (max-width: 500px) {
      .timeline { padding-left: 20px; }
      .entry { padding: 14px 14px 12px; }
    }

    #mobile-banner {
    display: none;
    justify-content: center;
    overflow: hidden;
    padding: 2px 0;
    background-color: var(--bg-secondary);
    border-radius: 10px;
    margin: 0 10px 0 10px;
}

#desktop-banner {
    display: none;
    justify-content: center;
    overflow: hidden;
    padding: 2px 0;
    background-color: var(--bg-secondary);
    border-radius: 10px;
    margin: 4px 0;
}

@media (max-width: 768px) {
    .left, .right { display: none; }
    .Holder { flex-direction: column; padding: 10px; gap: 10px; }
    #mobile-banner { display: flex; }
}

@media (min-width: 769px) {
    #desktop-banner { display: flex; }
}

/* ── Discovery rows ─────────────────────────────────────────────────────── */

.discovery-row {
  margin: 0 6px 8px;
  background: var(--bg-secondary);
  border-radius: 14px;
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: 1px 6px 14px rgba(0,0,0,0.28);
}

.discovery-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}

/* Accent bar — matches the .game accent-on-hover language */
.discovery-header::before {
  content: '';
  display: block;
  width: 3px;
  height: 16px;
  background: var(--accent);
  border-radius: 2px;
  flex-shrink: 0;
  box-shadow: 0 0 8px rgba(var(--accent-rgb), 0.45);
}

.discovery-emoji {
  display: none;
}

.discovery-label {
  font-family: 'Poppins', sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

/* Wrapper for the fade-edge effect */
.discovery-strip-wrap {
  position: relative;
}

/* Right-edge fade — tells the user there's more to scroll */
.discovery-strip-wrap::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 52px;
  background: linear-gradient(to right, transparent, var(--bg-secondary));
  pointer-events: none;
  z-index: 2;
  border-radius: 0 0 14px 0;
}

/* Horizontal scrolling strip */
.discovery-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 14px 0 10px 14px;      /* right padding via ::after spacer — Chrome ignores padding-right on overflow flex */
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
}

.discovery-strip::-webkit-scrollbar { height: 4px; }
.discovery-strip::-webkit-scrollbar-track { background: transparent; }
.discovery-strip::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

/* Row tiles — sized up to feel like real siblings of the main grid */
.lesson-card--row {
  flex-shrink: 0 !important;
  flex-wrap: nowrap !important;
  width: 148px !important;
  min-width: 148px !important;
  max-width: 148px !important;
  min-height: 118px !important;
  height: 118px !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 12px !important;
  scroll-snap-align: start;
  content-visibility: auto;
  
  contain-intrinsic-size: 148px 118px;
  
}

.lesson-card--row .lesson-title {
  font-size: 11px !important;
  padding: 5px 6px !important;
  line-height: 1.25 !important;
  white-space: nowrap;
  overflow: hidden;
  
  text-overflow: ellipsis;
}

@media (max-width: 600px) {
  .lesson-card--row {
    width: 120px !important;
    min-width: 120px !important;
    max-width: 120px !important;
    min-height: 96px !important;
    height: 96px !important;
    contain-intrinsic-size: 120px 96px;
  }
}

/* ===== FOOTER ===== */
.site-footer {
  background-color: var(--bg-card);
  color: var(--text-muted);          /* was #a0a0a8 */
  font-family: inherit;
  margin-top: 60px;
  border-top: 1px solid var(--border);
}
.footer-main {
  max-width: 1200px;
  margin: 0 auto;
  
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1fr;
  gap: 40px;
}

/* Brand column */
.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);        /* was #ffffff */
  margin-bottom: 12px;
}
.footer-logo span {
  color: var(--text-body);
}
.footer-tagline {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-muted);          /* was #d1ebd1ad */
  margin: 0 0 20px 0;
}
.footer-socials {
  display: flex;
  gap: 10px;
}
.footer-socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 7px;
  background: var(--bg-button);      /* was #2a2a2e */
  color: var(--text-muted);          /* was #a0a0a8 */
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.footer-socials a svg {
  width: 16px;
  height: 16px;
}
.footer-socials a:hover {
  background: var(--bg-raised);      /* was #3a3a3e */
  color: var(--text-primary);        /* was #ffffff */
}

/* Nav columns */
.footer-col {
  display: flex;
  flex-direction: column;
}
.footer-heading {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--accent-dim);          /* was #b4e7b4d8 */
  margin: 0 0 16px 0;
}
.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-col ul li a {
  color: var(--text-body);           /* was #bae6ba9f */
  text-decoration: none;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s;
}
.footer-col ul li a:hover {
  color: var(--text-primary);        /* was #ffffff */
}
.link-icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

/* Bottom bar */
.footer-bottom {
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 18px 30px;
}
.footer-bottom p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);          /* was #d1ebd1ad */
}

/* Responsive */
@media (max-width: 768px) {
  .footer-main {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
}
@media (max-width: 480px) {
  .footer-main {
    grid-template-columns: 1fr;
  }
}
.footer-socials a img {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

#Math2Custom {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.terms-page {
    max-width: 780px;
    margin: 0 auto;
    padding: 32px 20px 80px;
}
.terms-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 28px 28px 24px;
    margin-bottom: 16px;
}
.terms-card:hover {
    border-color: var(--accent)55;
}
.terms-label {
    font-size: 11px;
    font-family: 'Roboto', sans-serif;
    color: var(--accent);
    background: rgba(var(--accent-rgb), 0.08);
    border: 1px solid rgba(var(--accent-rgb), 0.2);
    border-radius: 6px;
    padding: 2px 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 14px;
}
.terms-heading {
    text-align: center;
    font-family: 'Roboto', sans-serif;
    font-size: 26px;
    font-weight: 700;
    color: var(--accent);
    text-shadow: 0 0 22px rgba(var(--accent-rgb), 0.35);
    margin: 0 0 6px;
}
.terms-sub {
    text-align: center;
    color: var(--text-dim);
    font-size: 13px;
    margin: 0 0 32px;
    font-family: 'Roboto', sans-serif;
}
.terms-card p {
    text-align: left;
    color: var(--text-body);
    font-size: 14px;
    line-height: 1.75;
    margin: 0 0 12px;
}
.terms-card p:last-child {
    margin-bottom: 0;
}
.terms-card p.legal-caps {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.7;
}
.terms-notice {
    background: rgba(var(--accent-rgb), 0.06);
    border: 1px dashed rgba(var(--accent-rgb), 0.28);
    border-radius: 10px;
    padding: 12px 16px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 16px;
    text-align: center;
}
.terms-card a {
    color: var(--accent);
    font-weight: 600;
}
.terms-card a:hover {
    color: var(--accent-light);
}
.terms-divider {
    height: 1px;
    background: #2a2e27;
    margin: 18px 0;
}
.terms-dmca {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: 14px;
    padding: 16px 22px;
    font-size: 14px;
    color: var(--text-body);
    font-family: 'Roboto', sans-serif;
    text-align: left;
}
.terms-dmca strong {
    color: var(--text-primary);
}
.terms-dmca a {
    color: var(--accent);
    font-weight: 600;
}
.terms-dmca a:hover {
    color: var(--accent-light);
}

.terms-card ul li {
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    color: var(--text-body);
    line-height: 1.75;
    padding-left: 14px;
    position: relative;
    margin-bottom: 6px;
    text-align: left;
}
.terms-card ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent)55;
}

/* ====================================================================
   SETTINGS PAGE — all new rules below, nothing above changed
   ==================================================================== */

/* ── Gear button in header ── */
#wm46-gear-btn {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  margin-right: 12px;
  border-radius: 8px;
  color: var(--accent);
  flex-shrink: 0;
  align-self: center;
  transition: background 0.2s;
}
#wm46-gear-btn svg {
  width: 20px;
  height: 20px;
  display: block;
}
#wm46-gear-btn:hover {
  background: rgba(var(--accent-rgb), 0.1);
}

/* ── Quick-exit floating button ── */
#wm46-quickexit {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  background: #c0392b;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 13px;
  font-family: 'Roboto', sans-serif;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.45);
  transition: background 0.2s;
}
#wm46-quickexit:hover { background: #e74c3c; }

/* ── Toast notification ── */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: #2a2e27;
  border: 1px solid rgba(var(--accent-rgb), 0.27);
  color: var(--text-primary);
  font-family: 'Roboto', sans-serif;
  font-size: 13px;
  padding: 10px 20px;
  border-radius: 10px;
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  white-space: nowrap;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Bottom nav ── */
.bottom-nav {
  display: flex;
  justify-content: center;
  gap: 2px;
  padding: 10px 16px 20px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  margin-top: auto;
}
.bn-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 11px;
  font-family: 'Roboto', sans-serif;
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
}
.bn-item svg { width: 20px; height: 20px; }
.bn-item:hover { color: var(--text-primary); background: rgba(var(--accent-rgb), 0.06); }
.bn-item.active { color: var(--accent); background: rgba(var(--accent-rgb), 0.1); }

/* ── Page layout ── */
.settings-page {
  display: flex;
  gap: 20px;
  max-width: 960px;
  margin: 24px auto;
  padding: 0 16px 60px;
  width: 100%;
  box-sizing: border-box;
}

/* ── Sidebar nav ── */
.settings-sidebar {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 200px;
  flex-shrink: 0;
}
.settings-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: none;
  border-radius: 10px;
  background: none;
  cursor: pointer;
  color: var(--text-muted);
  font-family: 'Roboto', sans-serif;
  font-size: 14px;
  text-align: left;
  width: 100%;
  transition: color 0.2s, background 0.2s;
}
.settings-nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.settings-nav-item:hover { color: var(--text-primary); background: rgba(var(--accent-rgb), 0.06); }
.settings-nav-item.active { color: var(--accent); background: rgba(var(--accent-rgb), 0.1); }

/* ── Content area ── */
.settings-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.settings-section { display: none; flex-direction: column; gap: 16px; }
.settings-section.active { display: flex; }
.settings-section-title {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 20px;
  color: var(--accent);
  text-align: left;
  margin: 0 0 4px;
  text-shadow: 0 0 18px rgba(var(--accent-rgb), 0.3);
}

/* ── Card ── */
.settings-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.2s;
}
.settings-card:hover { border-color: var(--accent); }
.settings-card-title {
  font-family: 'Roboto', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}
.settings-card-desc {
  font-family: 'Roboto', sans-serif;
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
  text-align: left;
}

/* ── Settings row (toggle rows) ── */
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-top: 1px solid var(--border);
}
.sr-left { display: flex; flex-direction: column; gap: 2px; }
.sr-title { font-size: 13px; color: var(--text-body); font-family: 'Roboto', sans-serif; text-align: left; }

/* ── Theme grid ── */
.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}
.theme-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-primary);
  border: 2px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s;
}
.theme-card:hover { border-color: var(--accent)55; }
.theme-card.active { border-color: var(--accent); }
.theme-swatches { display: flex; gap: 4px; flex-shrink: 0; }
.theme-swatch { width: 18px; height: 18px; border-radius: 50%; }
.theme-card-info { display: flex; flex-direction: column; gap: 2px; }
.theme-card-name { font-size: 12px; font-weight: 600; color: var(--text-primary); font-family: 'Roboto', sans-serif; }
.theme-card-desc { font-size: 10px; color: var(--text-dim); font-family: 'Roboto', sans-serif; }

/* ── Performance slider ── */
.perf-slider-wrap { display: flex; flex-direction: column; gap: 8px; }
.perf-labels { display: flex; justify-content: space-between; }
.perf-label { font-size: 11px; color: var(--text-dim); font-family: 'Roboto', sans-serif; transition: color 0.2s; }
.perf-label.active { color: var(--accent); font-weight: 600; }
.perf-range {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  background: #2a2e27;
  border-radius: 4px;
  outline: none;
  cursor: pointer;
}
.perf-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 0 8px rgba(var(--accent-rgb), 0.5);
}
.perf-range::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: none;
  box-shadow: 0 0 8px rgba(var(--accent-rgb), 0.5);
}
.perf-desc { font-size: 12px; color: var(--text-dim); font-family: 'Roboto', sans-serif; font-style: italic; text-align: left; }

/* ── Preset grid ── */
.preset-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.preset-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--bg-primary);
  border: 2px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-body);
  font-size: 13px;
  font-family: 'Roboto', sans-serif;
  transition: border-color 0.2s, color 0.2s;
}
.preset-btn img { width: 16px; height: 16px; object-fit: contain; }
.preset-btn:hover { border-color: var(--accent)55; color: var(--text-primary); }
.preset-btn.active { border-color: var(--accent); color: var(--accent); }

/* ── Text input ── */
.wm46-text-input {
  width: 100%;
  box-sizing: border-box;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--text-primary);
  font-family: 'Roboto', sans-serif;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}
.wm46-text-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.08); }
.wm46-text-input::placeholder { color: var(--text-faint); }

/* ── Cloak options ── */
.cloak-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.cloak-opt {
  padding: 8px 16px;
  background: var(--bg-primary);
  border: 2px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 13px;
  font-family: 'Roboto', sans-serif;
  transition: border-color 0.2s, color 0.2s;
}
.cloak-opt:hover { border-color: var(--accent)55; color: var(--text-primary); }
.cloak-opt.active { border-color: var(--accent); color: var(--accent); }

/* ── Action button ── */
.wm46-action-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  color: var(--text-body);
  font-family: 'Roboto', sans-serif;
  text-align: left;
  transition: border-color 0.2s, background 0.2s;
  box-sizing: border-box;
}
.wm46-action-btn:hover { border-color: var(--accent)55; background: #1d1f1b; }
.ab-icon { font-size: 22px; flex-shrink: 0; }
.ab-title { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.ab-desc { font-size: 11px; color: var(--text-dim); margin-top: 2px; }
.data-btn-danger { border-color: rgba(192,57,43,0.3); }
.data-btn-danger:hover { border-color: #c0392b; background: rgba(192,57,43,0.08) !important; }

/* ── Panic key row ── */
.key-row { display: flex; align-items: center; gap: 8px; }
.key-display {
  flex: 1;
  padding: 9px 12px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--accent);
  font-size: 13px;
  font-family: 'Roboto', monospace;
  text-align: left;
}
.key-capture, .key-clear {
  padding: 9px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-primary);
  color: var(--text-body);
  font-family: 'Roboto', sans-serif;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.2s, color 0.2s;
}
.key-capture:hover { border-color: var(--accent)55; color: var(--accent); }
.key-capture.listening {
  border-color: var(--accent);
  color: var(--accent);
  animation: wm46-pulse 1s ease infinite;
}
.key-clear { padding: 9px 12px; }
.key-clear:hover { border-color: #c0392b; color: #c0392b; }
@keyframes wm46-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.45; }
}

.wm46-promo-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: fit-content;
  margin: 4px auto 16px;
  padding: 10px 20px;
  background: var(--bg-button);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--accent);
  font-family: 'Roboto', sans-serif;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
}
.wm46-promo-btn:hover {
  border-color: var(--accent);
  background: rgba(var(--accent-rgb), 0.08);
  transform: translateY(-1px);
}
.wm46-promo-btn img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex-shrink: 0;
}

/* ── Toggle switch ── */
.wm46-switch { position: relative; display: inline-block; cursor: pointer; }
.wm46-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.wm46-switch-track {
  display: block;
  width: 44px;
  height: 24px;
  border-radius: 12px;
  background: #2a2e27;
  cursor: pointer;
  transition: background 0.3s;
  position: relative;
}
.wm46-switch-track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #4a5048;
  transition: transform 0.3s, background 0.3s;
}
.wm46-switch input:checked + .wm46-switch-track { background: rgba(var(--accent-rgb), 0.2); }
.wm46-switch input:checked + .wm46-switch-track::after {
  transform: translateX(20px);
  background: var(--accent);
}

/* ── Segment control ── */
.segment-ctrl {
  display: flex;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 4px;
  gap: 4px;
  flex-wrap: wrap;
}
.seg-btn {
  flex: 1;
  padding: 8px 10px;
  border: none;
  border-radius: 7px;
  background: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 12px;
  font-family: 'Roboto', sans-serif;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}
.seg-btn:hover { color: var(--text-primary); background: rgba(var(--accent-rgb), 0.06); }
.seg-btn.active { background: rgba(var(--accent-rgb), 0.15); color: var(--accent); }

/* ── Data actions ── */
.data-actions { display: flex; flex-direction: column; gap: 8px; }

/* ── Responsive ── */
@media (max-width: 700px) {
  .settings-page {
    flex-direction: column;
    margin: 8px auto;
    padding: 0 10px 60px;
    gap: 12px;
  }
  .settings-sidebar {
    flex-direction: row;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
    flex-wrap: nowrap;
    scrollbar-width: none;
    gap: 4px;
  }
  .settings-sidebar::-webkit-scrollbar { display: none; }
  .settings-nav-item {
    flex-direction: column;
    gap: 4px;
    padding: 8px 12px;
    font-size: 10px;
    flex-shrink: 0;
    width: auto;
  }
  .settings-nav-item svg { width: 18px; height: 18px; }
  .theme-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .segment-ctrl { flex-wrap: wrap; }
  .bn-item { padding: 8px 10px; font-size: 10px; }
  
}

   .discovery-row--pending { min-height: 190px; }
   @media (max-width: 600px) { .discovery-row--pending { min-height: 170px; } }