/* Debieb-GPT — Halloween theme.
   Everything is scoped to html[data-theme="halloween"], so switching the theme off
   restores the original light design exactly. Loaded after style.css + floating-motion.css. */

/* ---------- Palette ---------- */
html[data-theme="halloween"]{
  color-scheme:dark;
  --hw-bg:#0c0713;--hw-card:#1b1129;--hw-card2:#261739;
  --hw-line:#3a2557;--hw-line2:#5b3a85;
  --hw-ink:#f4e9d8;--hw-ink2:#cdbfdc;--hw-muted:#9487ab;
  --hw-orange:#ff7a1a;--hw-orange2:#ffa04d;--hw-purple:#9b5cff;--hw-green:#a6ff3d;--hw-blood:#ff4d5e;
  --bg:var(--hw-bg);--ink:var(--hw-ink);--ink-2:var(--hw-ink2);--muted:var(--hw-muted);
  --line:var(--hw-line);--line-strong:var(--hw-line2);--danger:var(--hw-blood);
  --grid:rgba(155,92,255,.1);
}

/* ---------- Canvas ---------- */
html[data-theme="halloween"] body{
  background:
    radial-gradient(1100px 650px at 88% -12%,#2c1248 0%,transparent 62%),
    radial-gradient(900px 600px at 0% 112%,#2a0e05 0%,transparent 58%),
    var(--hw-bg);
  color:var(--hw-ink);
}
html[data-theme="halloween"] body::before{
  background-image:
    linear-gradient(rgba(155,92,255,.1) 1px,transparent 1px),
    linear-gradient(90deg,rgba(155,92,255,.1) 1px,transparent 1px),
    radial-gradient(600px circle at var(--mouse-x) var(--mouse-y),rgba(255,122,26,.16),rgba(155,92,255,.07) 40%,transparent 74%);
}
html[data-theme="halloween"] body::after{
  background:radial-gradient(360px circle at var(--mouse-x) var(--mouse-y),rgba(255,140,50,.15),transparent 70%);
  mix-blend-mode:screen;
}
html[data-theme="halloween"] .main{background:transparent}
html[data-theme="halloween"] .main::before{
  background:
    radial-gradient(ellipse at var(--mouse-x-pct) var(--mouse-y-pct),rgba(255,122,26,.07),transparent 46%),
    radial-gradient(ellipse at 50% -10%,rgba(155,92,255,.17) 0%,transparent 62%);
}
html[data-theme="halloween"] ::selection{background:var(--hw-orange);color:#1a0d00}
html[data-theme="halloween"] ::-webkit-scrollbar-thumb{background:#4a2f6e;border:2px solid transparent;background-clip:padding-box}
html[data-theme="halloween"] ::-webkit-scrollbar-thumb:hover{background:var(--hw-orange);border:2px solid transparent;background-clip:padding-box}
html[data-theme="halloween"] button:focus-visible,
html[data-theme="halloween"] a:focus-visible,
html[data-theme="halloween"] textarea:focus-visible,
html[data-theme="halloween"] input:focus-visible{outline-color:var(--hw-orange)}

/* ---------- Brand mark ---------- */
html[data-theme="halloween"] .brand-d{fill:var(--hw-ink)}
html[data-theme="halloween"] .brand-orbit{stroke:var(--hw-orange)}
html[data-theme="halloween"] .brand-spark{fill:var(--hw-orange2);stroke:#2a1200}
html[data-theme="halloween"] .logo-icon,
html[data-theme="halloween"] .welcome-logo{
  background:linear-gradient(145deg,#2d1a47,#150b24);
  border-color:var(--hw-orange);
  box-shadow:0 0 22px rgba(255,122,26,.35),3px 3px 0 rgba(155,92,255,.35);
}
html[data-theme="halloween"] .welcome-logo::before{border-color:rgba(255,122,26,.45)}
html[data-theme="halloween"] .welcome-logo.cursor-tracking{box-shadow:0 0 38px rgba(255,122,26,.5),3px 3px 0 rgba(155,92,255,.35)}
html[data-theme="halloween"] .logo-text{font-family:'Creepster','Syne',cursive;font-weight:400;font-size:21px;letter-spacing:.04em;color:var(--hw-ink)}
html[data-theme="halloween"] .wordmark-hyphen{color:var(--hw-orange)}
html[data-theme="halloween"] .wordmark-gpt{font-weight:400;color:var(--hw-orange2);letter-spacing:.04em}

/* ---------- Sidebar ---------- */
html[data-theme="halloween"] .sidebar{
  background:rgba(16,9,26,.86);
  border-color:var(--hw-line2);
  box-shadow:inset -1px 0 0 var(--hw-line);
}
html[data-theme="halloween"][dir="rtl"] .sidebar{border-left-color:var(--hw-line2);box-shadow:inset 1px 0 0 var(--hw-line)}
html[data-theme="halloween"] .sidebar::after{background:linear-gradient(transparent,var(--hw-orange) 25%,var(--hw-purple) 70%,transparent);opacity:.55}
html[data-theme="halloween"] .sidebar-top,
html[data-theme="halloween"] .sidebar-bottom{border-color:var(--hw-line)}
html[data-theme="halloween"] .sidebar-bottom{background:rgba(10,5,18,.55)}
html[data-theme="halloween"] .new-chat-btn{
  background:linear-gradient(180deg,#ff8a2e,#f0600a);
  border:1.5px solid #2a1200;color:#1a0d00;
  box-shadow:3px 3px 0 #5a2ea0;
}
html[data-theme="halloween"] .new-chat-btn:hover{
  background:linear-gradient(180deg,#ffa04d,#ff7a1a);
  box-shadow:3px 3px 0 #5a2ea0,0 0 24px rgba(255,122,26,.45);
}
html[data-theme="halloween"] .history-label{color:var(--hw-muted)}
html[data-theme="halloween"] .history-item{color:var(--hw-ink2)}
html[data-theme="halloween"] .history-item::before{background:var(--hw-orange)}
html[data-theme="halloween"] .history-item:hover,
html[data-theme="halloween"] .history-item.active{
  background-color:var(--hw-card2);border-color:var(--hw-orange);color:#fff;
  box-shadow:0 0 18px rgba(255,122,26,.22),2px 2px 0 rgba(255,122,26,.2);
}
html[data-theme="halloween"] .lang-switcher{background:var(--hw-card);border-color:var(--hw-line2)}
html[data-theme="halloween"] .lang-btn{color:var(--hw-muted)}
html[data-theme="halloween"] .lang-btn.active,
html[data-theme="halloween"] .lang-btn:hover{background:var(--hw-card2);border-color:var(--hw-orange);color:var(--hw-orange2);box-shadow:0 0 12px rgba(255,122,26,.2)}
html[data-theme="halloween"] .credits-name{color:var(--hw-ink)}
html[data-theme="halloween"] .credits-ar{color:var(--hw-ink2)}
html[data-theme="halloween"] .credits-sub{color:var(--hw-muted)}
html[data-theme="halloween"] .sidebar-toggle{background:var(--hw-card);border-color:var(--hw-line2);color:var(--hw-ink)}

/* ---------- Top bar ---------- */
html[data-theme="halloween"] .topbar{background:rgba(12,7,19,.6);border-bottom-color:var(--hw-line2)}
html[data-theme="halloween"] .topbar-kicker{color:var(--hw-muted)}
html[data-theme="halloween"] .topbar-kicker::before{background:var(--hw-green);box-shadow:0 0 0 4px rgba(166,255,61,.14),0 0 12px rgba(166,255,61,.6)}
html[data-theme="halloween"] .topbar-right{color:var(--hw-muted)}
html[data-theme="halloween"] .topbar-line{background:var(--hw-line2)}

/* ---------- Welcome screen ---------- */
html[data-theme="halloween"] .welcome-title{
  font-family:'Creepster','Syne',cursive;font-weight:400;
  font-size:clamp(44px,5.4vw,70px);letter-spacing:.03em;line-height:1.05;
  color:var(--hw-orange);
  text-shadow:0 0 18px rgba(255,122,26,.6),0 0 44px rgba(255,90,0,.35),2px 3px 0 #3a0f00;
  animation:interfaceFloat 7s ease-in-out infinite,hwFlicker 6s linear infinite!important;
}
html[data-theme="halloween"] .welcome-sub{color:var(--hw-ink2)}
html[data-theme="halloween"] .suggestion-chip{
  background-color:rgba(27,17,41,.84);
  background-image:radial-gradient(180px circle at var(--spot-x,50%) var(--spot-y,50%),rgba(255,122,26,.18),transparent 72%);
  border:1.5px solid var(--hw-line2);color:var(--hw-ink2);
  box-shadow:2px 2px 0 rgba(0,0,0,.35);
}
html[data-theme="halloween"] .suggestion-chip::after{content:"🎃";color:inherit}
html[data-theme="halloween"] .suggestion-chip:hover{
  background-color:#2b1a42;border-color:var(--hw-orange);color:#fff;
  box-shadow:0 0 24px rgba(255,122,26,.3),3px 4px 0 rgba(255,122,26,.22);
}

/* ---------- Chat ---------- */
html[data-theme="halloween"] .bubble.ai{
  background:rgba(27,17,41,.92);border-color:var(--hw-line2);color:var(--hw-ink);
  box-shadow:2px 3px 0 rgba(0,0,0,.35);
}
html[data-theme="halloween"] .bubble.user{
  background:linear-gradient(145deg,#ff8a2e,#f0600a);
  border-color:#2a1200;color:#1a0d00;
  box-shadow:3px 4px 0 rgba(90,46,160,.6);
}
html[data-theme="halloween"] .bubble pre{background:#0f0818;border-color:var(--hw-line2);color:#ffd9b0}
html[data-theme="halloween"] .bubble blockquote{border-inline-start-color:var(--hw-orange);background:rgba(255,122,26,.08);color:var(--hw-ink2)}
html[data-theme="halloween"] .bubble hr{border-top-color:var(--hw-line2)}
html[data-theme="halloween"] .bubble a{color:var(--hw-orange2)}
html[data-theme="halloween"] .bubble.user a{color:#3a1400}
html[data-theme="halloween"] .bubble.user blockquote{background:rgba(0,0,0,.12);color:#2a1200;border-inline-start-color:#2a1200}
html[data-theme="halloween"] .bubble.user pre{background:rgba(26,13,0,.88);color:#ffe2c2}
html[data-theme="halloween"] .avatar.ai{
  background:linear-gradient(145deg,#2d1a47,#120a1f);border-color:var(--hw-orange);
  box-shadow:0 0 16px rgba(255,122,26,.32),0 3px 0 rgba(0,0,0,.3);
}
html[data-theme="halloween"] .avatar.ai::before{border-color:rgba(255,122,26,.28)}
html[data-theme="halloween"] .avatar.ai .avatar-mark-d{fill:var(--hw-ink)}
html[data-theme="halloween"] .avatar.ai .avatar-mark-orbit{stroke:var(--hw-orange)}
html[data-theme="halloween"] .avatar.ai .avatar-mark-spark{fill:var(--hw-orange2);stroke:#2a1200}
html[data-theme="halloween"] .avatar.user-av{background:var(--hw-card);border-color:var(--hw-line2);color:var(--hw-ink2)}
html[data-theme="halloween"] .typing-indicator span{background:var(--hw-orange)}
html[data-theme="halloween"] .mode-indicator{background:var(--hw-card);border-color:var(--hw-line2);color:var(--hw-ink2)}
html[data-theme="halloween"] .mode-indicator.image,
html[data-theme="halloween"] .mode-indicator.text{color:var(--hw-orange2)}

/* ---------- Composer ---------- */
html[data-theme="halloween"] .input-bar{
  background-color:rgba(24,14,38,.94);
  background-image:radial-gradient(180px circle at var(--spot-x,50%) var(--spot-y,50%),rgba(255,122,26,.1),transparent 72%);
  border-color:var(--hw-line2);
  box-shadow:0 12px 34px rgba(0,0,0,.5),0 0 0 1px rgba(255,122,26,.06);
}
html[data-theme="halloween"] .input-bar:focus-within,
html[data-theme="halloween"] .input-bar.is-focused,
html[data-theme="halloween"] .main .input-bar.cursor-active{
  border-color:var(--hw-orange);
  box-shadow:0 12px 38px rgba(0,0,0,.55),0 0 0 3px rgba(255,122,26,.16),0 0 28px rgba(255,122,26,.22);
}
html[data-theme="halloween"] .message-input{color:var(--hw-ink);caret-color:var(--hw-orange)}
html[data-theme="halloween"] .message-input::placeholder{color:var(--hw-muted)}
html[data-theme="halloween"] .mode-btn{background:var(--hw-card);border-color:var(--hw-line2);color:var(--hw-muted)}
html[data-theme="halloween"] .mode-btn.active,
html[data-theme="halloween"] .mode-btn:hover{background:var(--hw-orange);border-color:#2a1200;color:#1a0d00}
html[data-theme="halloween"] .send-btn{
  background:linear-gradient(180deg,#ff8a2e,#f0600a);border-color:#2a1200;color:#1a0d00;
  box-shadow:2px 3px 0 #5a2ea0;
}
html[data-theme="halloween"] .send-btn:hover{background:linear-gradient(180deg,#ffa04d,#ff7a1a);box-shadow:2px 3px 0 #5a2ea0,0 0 20px rgba(255,122,26,.5)}
html[data-theme="halloween"] .input-footer{color:var(--hw-muted);text-shadow:none}
html[data-theme="halloween"] .jump-latest{background:var(--hw-card);border-color:var(--hw-orange);color:var(--hw-orange)}
html[data-theme="halloween"] .toast{background:#2a0f14;border-color:var(--hw-blood);color:#ffb3bb}

/* ---------- Auth + account tools (they use !important in style.css) ---------- */
html[data-theme="halloween"] .auth-overlay{background:rgba(8,4,14,.9)!important}
html[data-theme="halloween"] .auth-card{
  background:#170d25!important;border:1.5px solid var(--hw-orange)!important;color:var(--hw-ink)!important;
  box-shadow:0 0 50px rgba(255,122,26,.25),6px 7px 0 rgba(90,46,160,.45)!important;
}
html[data-theme="halloween"] .auth-card h2{font-family:'Creepster','Syne',cursive!important;font-weight:400!important;letter-spacing:.03em!important;font-size:34px!important;color:var(--hw-orange)!important;text-shadow:0 0 16px rgba(255,122,26,.45)}
html[data-theme="halloween"] .auth-card p{color:var(--hw-ink2)!important}
html[data-theme="halloween"] .auth-card input{background:#0f0818!important;border:1.5px solid var(--hw-line2)!important;color:var(--hw-ink)!important}
html[data-theme="halloween"] .auth-card input:focus{border-color:var(--hw-orange)!important;box-shadow:0 0 0 4px rgba(255,122,26,.15)!important}
html[data-theme="halloween"] .auth-card button{background:var(--hw-orange)!important;border:1.5px solid #2a1200!important;color:#1a0d00!important}
html[data-theme="halloween"] .auth-card button:hover{background:var(--hw-orange2)!important}
html[data-theme="halloween"] .auth-card .auth-switch{background:transparent!important;border-color:transparent!important;color:var(--hw-orange2)!important}
html[data-theme="halloween"] .auth-error{color:#ff6b7a!important}
html[data-theme="halloween"] .account-tools button,
html[data-theme="halloween"] .account-tools a{background:var(--hw-card)!important;border:1.5px solid var(--hw-line2)!important;color:var(--hw-ink)!important}

/* ---------- Cursor trail goes ember-orange ---------- */
html[data-theme="halloween"] .cursor-mote{background:var(--hw-orange);box-shadow:0 0 0 2px rgba(255,122,26,.12),0 0 14px rgba(255,122,26,.55)}
html[data-theme="halloween"] .cursor-mote-alt{background:var(--hw-orange2)}
html[data-theme="halloween"] .cursor-burst{border-color:rgba(255,160,77,.7)}
html[data-theme="halloween"] .motion-flare{background:var(--hw-orange);box-shadow:0 0 0 8px rgba(255,122,26,.18)}
html[data-theme="halloween"] .main button.cursor-active:not(:disabled){
  background-image:radial-gradient(130px circle at var(--spot-x,50%) var(--spot-y,50%),rgba(255,122,26,.22),transparent 75%);
}

/* ---------- Atmosphere layer (created by halloween.js) ---------- */
.hw-layer{display:none}
html[data-theme="halloween"] .hw-layer{display:block;pointer-events:none}

.hw-fog{position:fixed;left:0;right:0;bottom:0;height:40vh;z-index:0;overflow:hidden;opacity:.6;
  -webkit-mask-image:linear-gradient(to top,#000 10%,transparent);mask-image:linear-gradient(to top,#000 10%,transparent)}
.hw-fog::before,.hw-fog::after{content:"";position:absolute;left:-50%;bottom:-20%;width:200%;height:100%;
  background:
    radial-gradient(ellipse at 20% 80%,rgba(155,92,255,.38),transparent 50%),
    radial-gradient(ellipse at 60% 90%,rgba(255,122,26,.2),transparent 45%),
    radial-gradient(ellipse at 85% 70%,rgba(155,92,255,.26),transparent 50%);
  animation:hwFog 34s ease-in-out infinite alternate}
.hw-fog::after{bottom:-38%;opacity:.7;animation-duration:52s;animation-direction:alternate-reverse}
@keyframes hwFog{from{transform:translateX(0)}to{transform:translateX(24%)}}

.hw-moon{position:fixed;top:84px;inset-inline-end:7vw;width:84px;height:84px;border-radius:50%;z-index:0;opacity:.88;
  background:
    radial-gradient(circle at 62% 32%,rgba(190,130,60,.35) 0 7px,transparent 8px),
    radial-gradient(circle at 34% 60%,rgba(190,130,60,.3) 0 10px,transparent 11px),
    radial-gradient(circle at 70% 70%,rgba(190,130,60,.28) 0 5px,transparent 6px),
    radial-gradient(circle at 35% 35%,#fff6dd,#ffd89b 58%,#e8a652);
  box-shadow:0 0 50px 14px rgba(255,190,100,.28),0 0 150px 54px rgba(255,140,50,.12)}

.hw-bat{position:fixed;left:0;top:var(--y,20vh);width:var(--s,34px);height:calc(var(--s,34px)/2);z-index:0;opacity:0;
  animation:hwFly var(--d,24s) linear var(--delay,0s) infinite}
.hw-bat i{display:block;width:100%;height:100%;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 50'%3E%3Cpath fill='%23412766' d='M50 17L53 8L56 15Q70 10 96 12Q90 17 88 24Q82 20 78 26Q72 22 68 30Q62 26 58 34Q54 38 50 42Q46 38 42 34Q38 26 32 30Q28 22 22 26Q18 20 12 24Q10 17 4 12Q30 10 44 15L47 8Z'/%3E%3C/svg%3E") center/contain no-repeat;
  filter:drop-shadow(0 0 6px rgba(155,92,255,.65));
  transform-origin:50% 40%;animation:hwFlap .36s ease-in-out infinite}
@keyframes hwFlap{0%,100%{transform:scaleY(1)}50%{transform:scaleY(.5)}}
@keyframes hwFly{
  0%{transform:translate(-12vw,0);opacity:0}
  6%{opacity:.95}
  25%{transform:translate(25vw,-6vh)}
  50%{transform:translate(55vw,5vh)}
  75%{transform:translate(82vw,-5vh)}
  94%{opacity:.95}
  100%{transform:translate(112vw,2vh);opacity:0}
}

.hw-ghost{position:fixed;bottom:24vh;inset-inline-end:9vw;width:58px;height:68px;z-index:0;opacity:.5;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 70'%3E%3Cpath fill='%23f1e7ff' d='M30 4C16 4 8 14 8 28v34l8-6 7 8 7-8 7 8 7-8 8 6V28C52 14 44 4 30 4Z'/%3E%3Ccircle cx='22' cy='28' r='4' fill='%23241636'/%3E%3Ccircle cx='38' cy='28' r='4' fill='%23241636'/%3E%3Cellipse cx='30' cy='41' rx='4' ry='5.5' fill='%23241636'/%3E%3C/svg%3E") center/contain no-repeat;
  filter:drop-shadow(0 0 14px rgba(190,160,255,.55));
  animation:hwGhost 11s ease-in-out infinite}
@keyframes hwGhost{
  0%,100%{transform:translate(0,0) rotate(-4deg);opacity:.28}
  50%{transform:translate(-26px,-30px) rotate(4deg);opacity:.62}
}

.hw-web,.hw-pumpkin{display:none}
html[data-theme="halloween"] .hw-web,html[data-theme="halloween"] .hw-pumpkin{display:block}
.hw-web{position:absolute;top:0;right:0;width:150px;height:150px;z-index:2;opacity:.38;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120' fill='none' stroke='%23cdbfdc' stroke-width='1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M120 0L0 0M120 0L9 46M120 0L35 85M120 0L74 111M120 0L120 120'/%3E%3Cpath d='M90 0L92.3 11.5L98.8 21.2L108.5 27.7L120 30'/%3E%3Cpath d='M60 0L64.6 23L77.6 42.4L97 55.4L120 60'/%3E%3Cpath d='M30 0L36.8 34.5L56.4 63.6L85.5 83.2L120 90'/%3E%3Cpath d='M5 0L13.7 44L38.7 81.3L76 106.3L120 115'/%3E%3C/svg%3E") top right/contain no-repeat}

.hw-spider{position:fixed;top:-60vh;inset-inline-end:23vw;width:30px;height:calc(60vh + 34px);z-index:2;
  animation:hwDrop 10s ease-in-out infinite}
.hw-spider::before{content:"";position:absolute;left:50%;top:0;bottom:30px;width:1px;background:rgba(205,191,220,.4)}
.hw-spider i{position:absolute;left:0;bottom:0;width:30px;height:30px;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cg stroke='%234a2a73' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 20L5 14L2 8M13 24L3 24L0 30M14 28L6 34L4 40M15 17L8 9L8 3M26 20L35 14L38 8M27 24L37 24L40 30M26 28L34 34L36 40M25 17L32 9L32 3'/%3E%3C/g%3E%3Cellipse cx='20' cy='24' rx='7' ry='8' fill='%234a2a73'/%3E%3Ccircle cx='20' cy='14' r='4.5' fill='%234a2a73'/%3E%3Ccircle cx='18.2' cy='13' r='1.1' fill='%23ff7a1a'/%3E%3Ccircle cx='21.8' cy='13' r='1.1' fill='%23ff7a1a'/%3E%3C/svg%3E") center/contain no-repeat;
  filter:drop-shadow(0 0 6px rgba(155,92,255,.5))}
@keyframes hwDrop{0%,100%{transform:translateY(6vh)}50%{transform:translateY(22vh)}}

/* little pumpkin on the welcome logo */
.hw-pumpkin{position:absolute;inset-inline-end:-14px;bottom:-12px;width:36px;height:36px;z-index:3;pointer-events:none;
  filter:drop-shadow(0 0 8px rgba(255,122,26,.75));animation:hwPumpkin 3.2s ease-in-out infinite}
.hw-pumpkin svg{width:100%;height:100%;display:block}
@keyframes hwPumpkin{0%,100%{transform:scale(1) rotate(-4deg)}50%{transform:scale(1.07) rotate(4deg)}}

@keyframes hwFlicker{
  0%,18%,22%,24%,52%,55%,100%{text-shadow:0 0 18px rgba(255,122,26,.6),0 0 44px rgba(255,90,0,.35),2px 3px 0 #3a0f00}
  20%,23%,54%{text-shadow:0 0 7px rgba(255,122,26,.3),0 0 16px rgba(255,90,0,.15),2px 3px 0 #3a0f00}
}

/* ---------- Theme toggle (lives in the sidebar, always visible) ---------- */
.hw-toggle{width:100%;margin:0 0 12px;padding:8px 10px;display:flex;align-items:center;justify-content:center;gap:8px;
  border-radius:10px;border:1px solid #aeb2b8;background:#f0f1f2;color:#4a4d52;font-size:12px;font-weight:700;cursor:pointer;
  transition:background .2s ease,border-color .2s ease,color .2s ease,box-shadow .2s ease}
.hw-toggle:hover{border-color:#292b30;color:#111}
.hw-toggle .hw-state{font-size:10px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;opacity:.7}
html[data-theme="halloween"] .hw-toggle{background:var(--hw-card);border-color:var(--hw-orange);color:var(--hw-orange2);box-shadow:0 0 14px rgba(255,122,26,.2)}
html[data-theme="halloween"] .hw-toggle:hover{background:var(--hw-card2);color:#fff}

/* ---------- Responsive + accessibility ---------- */
@media(max-width:1100px){
  .hw-ghost{display:none}
}
@media(max-width:700px){
  .hw-moon{top:66px;width:46px;height:46px;inset-inline-end:5vw;box-shadow:0 0 30px 8px rgba(255,190,100,.25)}
  .hw-spider,.hw-bat:nth-child(n+3){display:none}
  .hw-web{width:96px;height:96px}
  html[data-theme="halloween"] .welcome-title{font-size:clamp(38px,11vw,48px)}
  html[data-theme="halloween"] .logo-text{font-size:19px}
  .hw-pumpkin{width:28px;height:28px;inset-inline-end:-10px;bottom:-9px}
}
@media(prefers-reduced-motion:reduce){
  .hw-bat,.hw-spider{display:none}
  .hw-fog::before,.hw-fog::after,.hw-ghost,.hw-pumpkin{animation:none!important}
  html[data-theme="halloween"] .welcome-title{animation:none!important}
}


/* ---------- Halloween mobile layout parity (colors and decorations unchanged) ---------- */
@media(max-width:700px){
  html[data-theme="halloween"] body:has(.sidebar.open) .main::after{
    content:"";position:absolute;inset:0;z-index:60;background:rgba(0,0,0,.48);pointer-events:auto
  }
  html[data-theme="halloween"] .sidebar{width:min(86vw,320px);max-width:320px;z-index:500}
  html[data-theme="halloween"] .sidebar.open{box-shadow:6px 0 0 var(--hw-orange)}
  html[data-theme="halloween"][dir="rtl"] .sidebar.open{box-shadow:-6px 0 0 var(--hw-orange)}
  html[data-theme="halloween"] .topbar{flex:0 0 60px;height:60px;min-height:60px;padding:0 12px;gap:12px}
  html[data-theme="halloween"] .topbar-kicker{font-size:0;letter-spacing:0;gap:10px;max-width:none}
  html[data-theme="halloween"] .topbar-kicker::after{content:"Debieb-GPT";font:800 18px/1 'Syne','Cairo',sans-serif;letter-spacing:-.035em;color:var(--hw-orange)}
  html[data-theme="halloween"] .welcome-screen{width:100%;min-width:0;padding:20px 16px calc(170px + env(safe-area-inset-bottom));overflow-x:hidden}
  html[data-theme="halloween"] .welcome-title{font-size:clamp(34px,10.5vw,46px);overflow-wrap:anywhere}
  html[data-theme="halloween"] .suggestions{grid-template-columns:minmax(0,1fr);width:100%;max-width:440px;gap:9px}
  html[data-theme="halloween"] .suggestion-chip{width:100%;min-width:0;min-height:56px;padding:12px 14px;overflow-wrap:anywhere}
  html[data-theme="halloween"] .chat-area{width:100%;min-width:0;overflow-x:hidden;padding:14px 0 calc(150px + env(safe-area-inset-bottom))}
  html[data-theme="halloween"] .message-row,
  html[data-theme="halloween"] .message-row.user{width:100%;min-width:0;max-width:100%;padding:7px 12px;gap:9px}
  html[data-theme="halloween"] .message-row .bubble{min-width:0;max-width:calc(100% - 42px);overflow-wrap:anywhere}
  html[data-theme="halloween"] .message-row.user .bubble{max-width:88%}
  html[data-theme="halloween"] .bubble pre{max-width:100%;min-width:0;overflow-x:hidden;white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word}
  html[data-theme="halloween"] .input-bar-wrapper{position:absolute;left:0;right:0;bottom:0;width:100%;max-width:none;padding:7px 12px calc(8px + env(safe-area-inset-bottom));z-index:30}
  html[data-theme="halloween"] .input-bar{display:flex;flex-wrap:wrap;align-items:center;width:100%;max-width:none;min-width:0;gap:6px 8px;padding:10px;border-radius:16px}
  html[data-theme="halloween"] .message-input{order:1;flex:1 1 100%;width:100%;min-width:0;min-height:30px;max-height:132px;padding:4px 6px 6px;font-size:16px;line-height:1.5}
  html[data-theme="halloween"] .mode-toggle{order:2;flex-direction:row;gap:6px;padding:0}
  html[data-theme="halloween"] .mode-btn{width:40px;height:40px;min-width:40px;min-height:40px}
  html[data-theme="halloween"] .send-btn{order:3;flex:0 0 44px;width:44px;height:44px;min-width:44px;min-height:44px;margin-inline-start:auto}
  html[data-theme="halloween"] .input-footer{font-size:10px;margin-top:6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:0 8px}
  html[data-theme="halloween"] .jump-latest{bottom:calc(152px + env(safe-area-inset-bottom))}
  html[data-theme="halloween"] .toast{bottom:calc(152px + env(safe-area-inset-bottom));left:50%;width:calc(100% - 28px);max-width:500px}
  html[data-theme="halloween"] .auth-overlay{padding:14px;overflow-y:auto}
  html[data-theme="halloween"] .auth-card{width:100%!important;max-width:430px!important;padding:24px!important}
}
@media(max-width:380px){
  html[data-theme="halloween"] .message-row,
  html[data-theme="halloween"] .message-row.user{padding-left:8px;padding-right:8px}
  html[data-theme="halloween"] .message-row .bubble{padding:10px 12px}
  html[data-theme="halloween"] .input-bar-wrapper{padding-left:9px;padding-right:9px}
}
@media(max-height:560px) and (max-width:700px){
  html[data-theme="halloween"] .welcome-screen{justify-content:flex-start;padding-top:12px;padding-bottom:calc(150px + env(safe-area-inset-bottom))}
}
@media(prefers-reduced-motion:reduce){
  html[data-theme="halloween"] *,
  html[data-theme="halloween"] *::before,
  html[data-theme="halloween"] *::after{animation:none!important;transition:none!important;scroll-behavior:auto!important;translate:none!important;scale:1!important}
  html[data-theme="halloween"] .main :is(button,.input-bar,.suggestion-chip){transform:none!important}
}
