* {margin:0; padding:0; box-sizing:border-box;}

:root {
  --bg: #f0ece7;
  --black: #0d0d0d;
  --white: #fff;
  --yellow: #ffde4d;
  --red: #ff004d;
  --green: #38e54d;
  --mint: #00ffab;
  --accent: #b98eff;
  --pink: #ff6b6b;
  --cyan: #4d96ff;
  --font-display: 'Archivo Black', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --border: 3px solid var(--black);
  --shadow: 4px 4px 0 var(--black);
  --shadow-sm: 3px 3px 0 var(--black);
}

body{
    font-family:var(--font-body);
    background:var(--bg);
    color:var(--black);
    overflow:hidden;
    height:100vh; width:100vw;
    -webkit-font-smoothing:antialiased;
}

/* login */
#login-screen{
  position:fixed; inset:0;
  z-index:100000;
  display:flex;
  align-items:center; justify-content:center;
  overflow:hidden;
  background-color:#ead8c3;
  background-image:
    radial-gradient(rgba(13,13,13,.07) 1px, transparent 1px);
  background-size:18px 18px;
  animation:loginBackground 16s linear infinite;
}

.login-date{
  position:absolute;
  top:32px; right:38px;
  text-align:right;
  font-family:var(--font-mono);
  color:var(--black); line-height:1.1; animation:loginDateIn .6s ease-out .15s both;
}

.login-date #login-day{
  font-family:var(--font-display);
  font-size:15px;
  letter-spacing:2px;
}

.login-date #login-date-text{
  margin-top:7px;
  font-size:11px;
  letter-spacing:3px;
  opacity:.55;
}

.login-card{
  position:relative; z-index:2;
  width:430px; padding:52px 52px 46px;
  background:#fff; border:var(--border);
  border-radius:18px;
  box-shadow:10px 10px 0 var(--black);
  text-align:center;
  animation:loginCardIn .6s cubic-bezier(.34,1.56,.64,1) both;
}

.login-logo{
  font-family:var(--font-display);
  font-size:48px;
  letter-spacing:4px;
  line-height:1;
}

.login-subtitle{
  margin-top:11px;
  font-family:var(--font-mono);
  font-size:10px; font-weight:700;
  letter-spacing:4px;
  opacity:.5;
}

.login-btn{
  margin-top:38px;
  width:100%;
  padding:16px 18px;
  border:var(--border); border-radius:10px;
  background:var(--mint);
  color:var(--black); box-shadow:4px 4px 0 var(--black);
  font-family:var(--font-mono);
  font-size:12px; font-weight:700;
  letter-spacing:2px; cursor:pointer;
  transition:transform .15s, box-shadow .15s;
}

.login-btn:hover{
  transform:translate(-2px,-2px);
  box-shadow:6px 6px 0 var(--black);
}

.login-btn:active{
  transform:translate(2px,2px);
  box-shadow:2px 2px 0 var(--black);
}

.login-quote{
  position:absolute;
  left:50%; bottom:42px; width:min(700px,80vw); transform:translateX(-50%);
  text-align:center;
  animation:loginQuoteIn .7s ease-out .25s both;
}

.quote-text{
  font-family:'Caveat', cursive;
  font-size:25px;
  font-weight:600;  line-height:1.25; color:var(--black);
}

.quote-author{
  margin-top:7px; font-family:var(--font-mono);
  font-size:9px;
  letter-spacing:2px;
  opacity:.5;
}

.login-footer{
  position:absolute;
  left:38px;
  bottom:34px; font-family:var(--font-mono);
  font-size:9px;
  letter-spacing:2px;
  opacity:.35;
}

@keyframes loginBackground{
  from{
    background-position:0 0;
  }
  to{
    background-position:36px 36px;
  }
}

@keyframes loginCardIn{
  from{
    opacity:0;
    transform:translateY(22px) scale(.96);
  }
  to{
    opacity:1;
    transform:translateY(0) scale(1);
  }
}

@keyframes loginDateIn{
  from{
    opacity:0;
    transform:translateY(-10px);
  }
  to{
    opacity:1;
    transform:translateY(0);
  }
}

@keyframes loginQuoteIn{
  from{
    opacity:0;
    transform:translateX(-50%) translateY(12px);
  }
  to{
    opacity:1;
    transform:translateX(-50%) translateY(0);
  }
}

#desktop-bg{
  position:fixed;
  inset:0;
  z-index:0;
  background:#ead8c3 url('wallpaper.jpg') center center / cover no-repeat;
}

/* topbar */
#topbar{
  position:absolute;
  top:0;
  left:0;
  right:0; height:48px;
  background:rgba(255,255,255,.24);
  backdrop-filter:blur(18px) saturate(135%);
  -webkit-backdrop-filter:blur(18px) saturate(135%); border-bottom:1px solid rgba(255,255,255,.55);
  box-shadow: 0 4px 18px rgba(0,0,0,.08), inset 0 1px 0 rgba(255,255,255,.45);
  display:flex;
  align-items:center; justify-content:space-between;
  padding:0 20px;
  z-index:100;
  transition:background .3s, backdrop-filter .3s;
}
.topbar-left{
    display:flex; align-items:center; gap:10px;
}

.logo-mark{
    font-size:18px; 
    color:var(--red);
}

.logo-text {
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: 2px;
}

.topbar-right{
    display:flex; gap:20px; 
    align-items:center;
}

#date{
    font-family:var(--font-mono);
    font-size:12px;font-weight:700;
    letter-spacing:1px;
    opacity:.7;
}

#clock{
    font-family:var(--font-mono); 
    font-size:14px; font-weight:700; 
    background:var(--black); color:var(--accent); 
    padding:4px 12px; border-radius:4px; 
    min-width:70px; text-align:center; letter-spacing:1px;

}

.clock-glitch{animation:clockGlitch .08s ease infinite; 
    background:var(--red) !important; 
    color:#fff !important;}
@keyframes clockGlitch{
    0%,100%{transform:translate(0,0) skewX(0)}
    20%{transform:translate(-2px,-1px) skewX(-2deg)}
    40%{transform:translate(2px,-1px)skewX(2deg)}
    60%{transform:translate(-1px,-1px)skewX(1deg)}
    80%{transform:translate(1px,2px) skewX(-1deg)}
}

/* desktop icons */
#desktop-icons{
    position:absolute; top:60px; left:20px;
    display:flex; flex-direction:column; gap:20px; z-index:1;
}
.desk-icon{
    display:flex; flex-direction:column; 
    align-items:center; gap:8px; 
    cursor:pointer;
    width:80px; user-select:none; 
    transition:transform .2s cubic-bezier(0.34,1.56,0.64,1);
}
.desk-icon:hover{transform: translateY(-4px) scale(1.05);}
.desk-icon-box{
    width:56px; 
    height:56px; border-radius:12px; 
    border:var(--border); 
    box-shadow:var(--shadow-sm); display:flex; align-items:center; 
    justify-content:center; transition:all .2s;
}
.desk-icon:hover .desk-icon-box { box-shadow: 6px 6px 0 var(--black); transform: rotate(-3deg); }
.desk-icon-label {
  font-family: var(--font-display); font-size: 10px; letter-spacing: 2px;
  color: #fff; text-align: center;
  text-shadow: 1px 1px 0 rgba(0,0,0,.85), -1px -1px 0 rgba(0,0,0,.85), 1px -1px 0 rgba(0,0,0,.85), -1px 1px 0 rgba(0,0,0,.85), 0 2px 5px rgba(0,0,0,.5);
}

/* widgets */
#widgets{
    position:absolute; top:60px; right:20px;
    display:flex; 
    flex-direction:column; 
    gap:16px; z-index:1;
}

.systems-label{
    font-family:var(--font-mono); font-size:10px;
    font-weight:700;
    letter-spacing:2px; color:#fff;
    margin-bottom:-6px;
    padding-left:4px;
    text-shadow:1px 1px 0 rgba(0,0,0,0.8), -1px -1px 0 rgba(0,0,0,0.8), 0 2px 6px rgba(0,0,0,0.5);
}

.widget{
    background:#fff; border:var(--border); 
    box-shadow:var(--shadow); 
    border-radius:10px;
    padding:16px; min-width:180px; 
    user-select:none; transition:transform 0.2s;
}
.widget:hover{transform: translate(-3px,-3px);
    box-shadow:7px 7px 0 var(--black); 
}

.widget-header{
    font-family:var(--font-mono); 
    font-weight:700; 
    font-size:12px; margin-bottom: 12px; 
    border-bottom:2px solid var(--black); 
    padding-bottom:6px;
}
.widget-telemetry{min-width:200px;}
.telemetry-row{display:flex; 
    justify-content:space-between; 
    margin-bottom:8px; 
    font-family:var(--font-mono); 
    font-size:10px; font-weight:700;}
.t-label{opacity: 0.6;}

.widget-notes-sticky{min-width:220px; 
    display:flex; 
    flex-direction:column;}

.sticky-notes-textarea{
    width:100%; min-height:110px; 
    resize: none; border:none; 
    outline:none; background:transparent;
    font-family:var(--font-body); 
    font-size:12px; line-height:1.5; padding:4px 0; color:var(--black);
}
.sticky-notes-textarea::placeholder { color: rgba(0,0,0,.3); 
    font-style: italic; }
.sticky-notes-footer { display: flex; 
    justify-content: space-between; 
    align-items: center; margin-top: 8px; }

.sticky-notes-count { font-family: var(--font-mono); 
    font-size: 9px; opacity: .45; }

.sticky-notes-clear {
    font-family: var(--font-mono); 
    font-size: 9px; 
    font-weight: 700;
    background: #fff; 
    border: 2px solid var(--black); padding: 3px 8px;
    cursor: pointer; box-shadow: 2px 2px 0 var(--black); 
    letter-spacing: 1px;
}

.sticky-notes-clear:hover { transform: translate(-1px,-1px); 
    box-shadow: 3px 3px 0 var(--black); }

/* dock */
#dock{
  position:absolute;
  bottom:20px;
  left:50%; transform:translateX(-50%);
  display:flex; align-items:flex-end;
  gap:14px;
  background:rgba(255,255,255,.22); backdrop-filter:blur(18px) saturate(135%);
  -webkit-backdrop-filter:blur(18px) saturate(135%);
  border:1px solid rgba(255,255,255,.6);
  box-shadow:
    0 8px 24px rgba(0,0,0,.12),
    inset 0 1px 0 rgba(255,255,255,.5);
  border-radius:18px;
  padding:14px 20px;
  z-index:300;
}

.dock-item{cursor:pointer; 
    user-select:none; 
    transition:all 0.3s cubic-bezier(0.34,1.56,0.64,1);}
.dock-item:hover{transform:translateY(-16px)scale(1.2);}

.dock-box{
    width:48px; 
    height:48px; 
    border-radius:14px; 
    border:3px solid var(--black); 
    box-shadow:3px 3px 0 var(--black);
    display:flex; align-items:center; 
    justify-content:center; font-size:20px; 
    transition:box-shadow 0.15s;
}

.dock-item:hover .dock-box{box-shadow:5px 5px 0 var(--black);}

.dock-divider{width:3px; 
    height:40px; 
    background:var(--black); 
    border-radius:2px; 
    margin:0 4px; align-self:center;}

.wormhole-box{background:#0d0d0d !important; color:var(--mint); animation:wormholePulse 2s ease-in-out infinite;}
@keyframes wormholePulse{
    0%, 100%{box-shadow: 3px 3px 0 var(--black), 0 0 0 0 rgba(0,255,171,0.4);}
    50%{box-shadow:3px 3px 0 var(--black), 0 0 0 10px rgba(0,255,171,0);}

}

/* content-menu */
#context-menu{
    position: absolute;
    background:#fff;
    border:var(--border); box-shadow:var(--shadow);
    border-radius:12px; padding:8px; display:none; z-index:9999;
    min-width:200px; user-select:none; 
    animation:menuPop .2s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes menuPop{from {opacity:0; transform:scale(.85) translateY(8px);} to {opacity:1; transform:none;}}

.ctx-item{
    padding:11px 16px; 
    font-family:var(--font-mono); 
    font-size:12px; 
    font-weight:700; letter-spacing:1px; 
    cursor:pointer; 
    border-radius:8px; transition:background .12s;
}

.ctx-item:hover{
    background:var(--black);
    color:var(--yellow);
}

.ctx-divider{
    height:2px;
    background:rgba(0,0,0,0.08); 
    margin:6px 0;
}

/* windows */
.window {
    position: absolute;
    background: #fff;
    border: var(--border);
    box-shadow: var(--shadow);
    border-radius: 16px;
    overflow: hidden;
    z-index: 500;
    display: none;
    flex-direction: column;
    transition: width .2s, height .2s, transform .15s, opacity .15s;
}
.window.active {
    z-index: 600;
    box-shadow: 8px 8px 0 var(--black);
}

.window.maximized {
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    border-radius: 0 !important;
    animation: none !important;
    transform: none !important;
}
.window.maximized .window-body {
    flex: 1;
    overflow: auto;
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes windowOpen {
  from {
    opacity: 0;
    transform: scale(.75) translateY(30px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes winClose {
    to {
        transform: scale(.95);
        opacity: 0;
    }
}
@keyframes winMin {
    to {
        transform: scale(.2) translateY(500px);
        opacity: 0;
    }
}

.window.window-opening {
  animation: windowOpen .35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.window.window-closing {
    animation: winClose .15s ease forwards;
}
.window.window-minimizing {
    animation: winMin .25s ease forwards;
}

.window-header {
    display: flex;
    justify-content: space-between; align-items: center;
    padding: 12px 16px; cursor: move;
    user-select: none;
    border-bottom: 3px solid var(--black); flex-shrink: 0;
}

.window-title {
    display: flex;
    align-items: center;  gap: 10px;
    font-family: var(--font-display); font-size: 14px;
    letter-spacing: 1px;
}

.win-icon {
    font-size: 18px;
}

.window-controls {
    display: flex;
    gap: 8px;
}

.win-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--black);
    background: #fff;
    box-shadow: 2px 2px 0 var(--black);
    display: flex; align-items: center; justify-content: center;
    font-size: 12px;
    font-weight: 700; cursor: pointer; transition: all 0.12s;
}
.win-btn:hover {
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0 var(--black);
}

.btn-min:hover {
    background: var(--yellow);
}

.btn-max:hover {
    background: var(--green);
}

.btn-close:hover {
    background: var(--red);
    color: #fff;
}

.window-body {
    flex: 1; overflow: auto;
    display: flex;
    flex-direction: column;
}

/* terminal */
.terminal-body { background: var(--black); display: flex; flex-direction: column; flex: 1; }
.terminal-output {
  flex: 1; padding: 20px; 
  overflow-y: auto;
  font-family: var(--font-mono); font-size: 13px; line-height: 1.8; color: var(--mint);
}

.term-line{margin-bottom:4px; opacity:0; animation:termLine .25s ease forwards;}

@keyframes termLine{to{opacity:1}}

.term-welcome{color:rgba(255,255,255,0.38);}

.term-cmd{color:var(--yellow); background:rgba(255,222,77,.12); padding:2px 8px; border-radius:4px;}

.term-ascii{white-space: pre; font-family:var(--font-mono); line-height:1.2; color:var(--green); margin-bottom:8px;}

.term-alert{color:var(--red) !important; font-weight:bold;}

.term-warning{color:var(--yellow)!important;}

.help-table{
    display:grid; grid-template-columns:auto 1fr; gap:8px 20px;
    margin:12px 0 ;padding:12px;
    background:rgba(255,255,255,0.04); border:1px solid rgba(255,255,255,0.08); border-radius:6px; 
}

.help-cmd{color:var(--yellow); font-weight:700;}

.help-desc{color:rgba(255,255,255,0.65);}

.terminal-input {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 20px; border-top: 1px solid rgba(255,255,255,.1);
  background: rgba(0,0,0,.4); flex-shrink: 0;
}

.term-prompt{color:var(--green);font-weight:700; font-size:16px;}

#term-input{
    background:none; border:none; outline:none; color:var(--mint); font-family:var(--font-mono); font-size:13px; flex:1; caret-color:var(--green);
}

/* music */

.music-body{display:flex; 
    flex-direction:column; 
    padding:20px; flex:1; overflow:hidden;}
.music-player-top{display:flex; 
    flex-direction:column; 
    align-items:center; 
    gap:16px; flex-shrink:0;}
.vinyl-player{position:relative; 
    width:180px; 
    height:180px; flex-shrink:0;}
.vinyl-record{
    width:160px; 
    height:160px; 
    border-radius:50%; 
    background:var(--black);
    position:absolute; 
    top:50%; 
    left:50%; 
    transform:translate(-50%,-50%);
    border:3px solid var(--black);
    box-shadow:4px 4px 0 var(--black);
    display:flex; align-items:center; 
    justify-content: center; transition:all .3s;
}

.vinyl-record.playing{animation:vinylSpin 2.5s linear infinite;}

.vinyl-record.drag-over{box-shadow:0 0 0 4px var(--yellow), 4px 4px 0 var(--black); transform:translate(-50%,-50%) scale(1.05);}

@keyframes vinylSpin{
    from{transform: translate(-50%,-50%) rotate(0deg);}
    to{transform: translate(-50%,-50%) rotate(360deg);}
}

.vinyl-grooves{position:absolute; inset:10px; border-radius: 50%;
    background:repeating-radial-gradient(circle at center, transparent 0, transparent 3px, rgba(255,255,255,0.05) 4px, transparent 5px);
}

.vinyl-label{width:48px; 
    height:48px; 
    border-radius:50%; 
    background:var(--red); 
    border:3px solid var(--black); 
    display:flex; align-items:center;
    justify-content:center; 
    position:relative; z-index: 2;}
.vinyl-hole{width:12px; 
    height:12px;
    border-radius:50%; 
    background:var(--black);}

.vinyl-arm{
    position:absolute; top:-8px; right:25px;
    width:4px; height:70px;
    background:linear-gradient(to bottom, #ccc, #888);
    border:2px solid var(--black); 
    border-radius:2px; 
    transform-origin:top-center; transform:rotate(-35deg);
    transition:transform .6s cubic-bezier(0.34,1.56,0.64,1);
    box-shadow:2px 2px 0 var(--black); 
}
.vinyl-arm.playing { transform: rotate(15deg); }
.vinyl-drop-hint { position: absolute; 
    font-family: var(--font-mono); 
    font-size: 10px; 
    font-weight: 700; 
    color: var(--yellow); 
    opacity: 0; 
    transition: opacity .3s; 
    pointer-events: none; z-index: 10; }

.vinyl-record.drag-over .vinyl-drop-hint { opacity: 1; }

.visualizer { display: flex; 
    gap: 5px;
    height: 50px; 
    align-items: flex-end; 
    justify-content: center; 
    width: 100%; }

.viz-bar { width: 8px; 
    height: 6px;
    background: var(--red); 
    border: 2px solid var(--black); 
    border-radius: 4px; 
    transition: height .05s; }
.viz-bar.active { animation: vizBounce .5s ease infinite alternate; }
.viz-bar:nth-child(2) { animation-delay: .08s }
.viz-bar:nth-child(3) { animation-delay: .16s }
.viz-bar:nth-child(4) { animation-delay: .24s }
.viz-bar:nth-child(5) { animation-delay: .32s }
.viz-bar:nth-child(6) { animation-delay: .40s }
.viz-bar:nth-child(7) { animation-delay: .48s }
.viz-bar:nth-child(8) { animation-delay: .56s }
@keyframes vizBounce { from { height: 6px } to { height: 42px } }

.track-info { text-align: center; }
.track-name { font-family: var(--font-display); 
    font-size: 17px; 
    letter-spacing: 2px; }
.track-artist { font-family: var(--font-mono); 
    font-size: 11px; 
    letter-spacing: 2px; 
    opacity: .55; margin-top: 4px; }

.progress-track { width: 100%; 
    height: 10px; 
    background: var(--bg); 
    border: 2px solid var(--black); 
    border-radius: 5px; 
    overflow: hidden; cursor: pointer; }

.progress-fill { height: 100%; 
    width: 0; background: var(--red); 
    transition: width .1s linear; }

.music-controls { display: flex; gap: 12px; align-items: center; }

.m-btn {
    width: 48px; height: 48px; 
    border-radius: 50%;
    border: 3px solid var(--black); background: #fff; 
    box-shadow: 3px 3px 0 var(--black);
    cursor: pointer; 
    font-size: 16px; display: flex; 
    align-items: center; 
    justify-content: center; 
    transition: all .15s;
}

.m-btn:hover { transform: translateY(-2px); 
    box-shadow: 5px 5px 0 var(--black); }
.m-play { width: 64px; 
    height: 64px; 
    font-size: 22px; 
    background: var(--red); color: #fff; }

.m-upload { background: var(--yellow); }

.music-volume { display: flex; 
    align-items: center; 
    gap: 10px; 
    font-family: var(--font-mono); 
    font-size: 10px; 
    font-weight: 700; }
.music-volume input { width: 100px; }
.music-playlist { margin-top: 16px; 
    flex: 1;
    min-height: 0; display: flex; 
    flex-direction: column; 
    border-top: 2px dashed var(--black); 
    padding-top: 10px; }
.playlist-header { display: flex; 
    justify-content: space-between; 
    align-items: center; 
    font-family: var(--font-display); font-size: 13px; 
    margin-bottom: 8px; }
.playlist-clear-btn { background: none; 
    border: none; 
    color: var(--red); 
    font-family: var(--font-mono); 
    font-size: 10px; 
    cursor: pointer; }

.playlist-clear-btn:hover { text-decoration: underline; }

.playlist-tracks { list-style: none; 
    overflow-y: auto; flex: 1; }

.playlist-empty { font-family: var(--font-mono); 
    font-size: 11px; 
    text-align: center; 
    opacity: .5; padding: 20px 0; }

.playlist-track { display: flex; 
    justify-content: space-between; 
    align-items: center; padding: 8px; 
    font-family: var(--font-mono); 
    font-size: 12px; 
    border-bottom: 1px solid rgba(0,0,0,.08); 
    cursor: pointer; }

.playlist-track:hover { background: rgba(0,0,0,.04); }

.playlist-track.active { background: var(--yellow); 
    font-weight: bold; }
.track-info-left { display: flex; 
    gap: 8px; 
    align-items: center; 
    overflow: hidden; white-space: nowrap; 
    text-overflow: ellipsis; }

.track-number { opacity: .45; 
    font-size: 10px; }

.track-duration { opacity: .6; 
    font-size: 10px; }

.track-remove { background: none; 
    border: none; 
    color: var(--red); 
    cursor: pointer; opacity: 0; font-size: 12px; 
    padding: 0 4px; }

.playlist-track:hover .track-remove { opacity: 1; }

/* calculator */
.calc-body{display:flex; 
    flex-direction:column; 
    gap:16px; padding:20px; flex:1;
}
.calc-display{
    background:var(--black); border:3px solid var(--black); box-shadow:4px 4px 0 var(--black);
    border-radius:10px; padding:16px 20px; text-align:right;
}

.calc-history{
    font-family:var(--font-mono); 
    font-size:12px; color:rgba(255,255,255,0.35);
    min-height:18px; 
}

.calc-current{font-family:var(--font-display);
    font-size:40px; color:#fff; letter-spacing:1px; margin-top:4px;
}

.calc-keypad{display:grid; grid-template-columns:repeat(4,1fr); 
gap:10px; flex:1;}
.c-btn {
    border-radius: 10px; border: 3px solid var(--black); font-family: var(--font-display);
    font-size: 20px; min-height: 56px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 3px 3px 0 var(--black); transition: all .1s;
}
.c-btn:hover{transform:translateY(-2px); box-shadow:5px 5px 0 var(--black);}

.c-btn:active{transform:translateY(2px); box-shadow:1px 1px 0 var(--black);}
.c-num{background:#fff;}

.c-op{background:var(--yellow);}

.c-eq{background:var(--green);}
.c-wide{grid-column: span 2;}

/* notes */
.notes-body{
    padding:0 ;display:flex; flex-direction:column;
    flex:1;
}
.notes-toolbar{display:flex; gap:8px; padding:12px 16px; border-bottom:3px solid var(--black); background:var(--bg);}
.note-tool{
    width:36px; height:36px; border-radius:8px; 
    border:3px solid var(--black); background:#fff;
    box-shadow:2px 2px 0 var(--black); cursor:pointer;
    display:flex; align-items:center; justify-content:center; font-size:14px; transition: all .15s;
}

.note-tool:hover{transform:translateY(-2px); box-shadow:4px 4px 0 var(--black);}

.note-tool:active{box-shadow:none;}

.notes-editor{flex:1; padding:20px; font-size:15px; line-height:1.8; outline:none; overflow-y:auto;}
.notes-editor p {margin-bottom:10px;}

/* paint */
.paint-body{padding:0; display:Flex; flex-direction:column; flex:1;}
.paint-toolbar{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:8px 12px;
    border-bottom:3px solid var(--black);
    background:var(--bg); gap:12px; 
    overflow-x:auto; 
    min-height:56px;
}

.paint-colors{display:flex; gap:8px; 
    align-items:center;}
.paint-color{width:28px; height:28px; 
    border-radius:50%; 
    border:3px solid var(--black); 
    box-shadow: 2px 2px 0 var(--black); 
    cursor:pointer; transition:transform .12s;}

.paint-color:hover{transform:scale(1.2);}

.paint-color.active{box-shadow:0 0 0 3px #fff, 0 0 0 6px var(--black);}

.paint-tools{display:flex; 
    align-items:center; gap:8px; }

.paint-tools label{font-family:var(--font-mono); 
    font-size:10px; 
    font-weight:700; 
    letter-spacing:1px;}
#brush-size{width:80px;}
.paint-btn {
    padding: 8px 12px; 
    border-radius: 8px; 
    border: 3px solid var(--black);
    background: #fff; 
    box-shadow: 2px 2px 0 var(--black); 
    cursor: pointer;
    font-family: var(--font-mono); 
    font-size: 11px; font-weight: 700;
    display: flex; 
    align-items: center; 
    justify-content: center; 
    transition: all .12s;
}
.paint-btn:hover{background:var(--red); 
    color:#fff;}

.paint-btn.active{background:var(--black); 
    color:#fff; 
    box-shadow:none;}
.paint-canvas-area { 
    flex: 1; 
    position: relative; 
    background: #fff; 
    overflow: hidden; 
    min-height: 0; 
}

#paint-canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; touch-action: none; }

/* snake */
.game-body { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 20px; flex: 1; }
.game-header { display: flex; gap: 24px; font-family: var(--font-mono); font-size: 14px; font-weight: 700; letter-spacing: 2px; }

.game-canvas-wrap { border: 3px solid var(--black); box-shadow: 4px 4px 0 var(--black); border-radius: 10px; overflow: hidden; }
#game-canvas { display: block; background: #191a1f; }

.game-controls { display: flex; flex-direction: column; align-items: center; gap: 10px; }

.game-btn {
    padding: 12px 40px; 
    border-radius: 12px; 
    border: 3px solid var(--black);
    background: var(--green); 
    box-shadow: 4px 4px 0 var(--black);
    font-family: var(--font-display); font-size: 16px; letter-spacing: 2px; cursor: pointer; transition: all .15s;
}

.game-btn:hover { transform: translateY(-2px); box-shadow: 6px 6px 0 var(--black); }
.game-btn:active { transform: translateY(2px); box-shadow: none; }
.game-stop { background: var(--red) !important; }
.game-hint { font-family: var(--font-mono); font-size: 10px; letter-spacing: 2px; opacity: .5; }

/* wormhole */
#wormhole-overlay {
    position: fixed; inset: 0; z-index: 99980;
    display: none; align-items: center; justify-content: center; flex-direction: column;
    overflow: hidden; pointer-events: none;
}
#wormhole-overlay::before { display: none; }
.wormhole-stage { position: relative; width: 200px; height: 200px; z-index: 2; transform: scale(0); transition: transform 2s cubic-bezier(0.34, 1.56, 0.64, 1); }
.wormhole-stage.active { transform: scale(1); }
.wormhole-core {
    position: absolute; inset: 20px; border-radius: 50%; background: #000; z-index: 3;
    box-shadow: 0 0 0 8px rgba(255,222,77,.3), 0 0 0 16px rgba(255,222,77,.12), 0 0 60px 20px rgba(255,222,77,.18), inset 0 0 40px #000;
    transition: transform .8s cubic-bezier(0.22, 1, 0.36, 1);
}

.wormhole-core.expanding { transform: scale(35) !important; }

.wormhole-core::after {
    content: ''; position: absolute; inset: -10px; border-radius: 50%;
    border: 4px solid var(--yellow); box-shadow: 0 0 20px var(--yellow), 0 0 40px var(--yellow);
    animation: accretionSpin 3s linear infinite;
}

@keyframes accretionSpin { to { transform: rotate(360deg) } }

.wormhole-ring { position: absolute; border-radius: 50%; border: 2px solid rgba(255,255,255,.12); }
.r1 { inset: -20px; animation: ringExpand 2s ease-out 0s infinite; }
.r2 { inset: -50px; animation: ringExpand 2s ease-out .4s infinite; }
.r3 { inset: -80px; animation: ringExpand 2s ease-out .8s infinite; }
.r4 { inset: -110px; animation: ringExpand 2s ease-out 1.2s infinite; }
@keyframes ringExpand { 0% { transform: scale(.6); opacity: 1; border-width: 3px; } 100% { transform: scale(2.5); opacity: 0; border-width: 0; } }

.wormhole-text {
    position: absolute; top: calc(50% + 140px); font-family: var(--font-display);
    font-size: 32px; color: var(--yellow); letter-spacing: 6px; z-index: 2;
    opacity: 0; animation: textGlow 1.5s ease-in-out infinite; transition: opacity 1.5s .5s;
}

.wormhole-text.active { opacity: 1; }

.wormhole-sub {
    position: absolute; top: calc(50% + 185px); font-family: var(--font-mono);
    font-size: 12px; color: rgba(255,255,255,.35); letter-spacing: 4px; z-index: 2;
    opacity: 0; transition: opacity 1.5s 1s;
}
.wormhole-sub.active { opacity: 1; }
@keyframes textGlow { 0%, 100% { text-shadow: 0 0 20px rgba(255,222,77,.3); opacity: .65; } 50% { text-shadow: 0 0 40px rgba(255,222,77,.6); opacity: 1; } }

.collapse-flash { position: fixed; inset: 0; background: #fff; z-index: 99999; opacity: 0; pointer-events: none; }

/* toasts */
.toast-container{
    position:fixed;
    top:50px;
    right:16px; display:flex;
    flex-direction:column; gap:10px;
    z-index:99999;
    pointer-events:none;
}
.toast {
    background: #fff; border-radius: 8px; box-shadow: 0 4px 20px rgba(0,0,0,.12);
    padding: 12px 16px; font-family: var(--font-body); font-size: 14px; font-weight: 500;
    display: flex; align-items: center; gap: 10px; max-width: 300px;
    animation: toastIn .35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.toast-icon{font-size:20px;}
.toast-content{line-height:1.5;}
.toast.toast-error{background:var(--red); color:#fff;}
.toast.toast-success{background:var(--green);}
.toast.toast-warning{background:var(--yellow);}
.toast.leaving{animation:toastOut .25s ease forwards;}
@keyframes toastIn{from{transform:translateX(110%) scale(.9); opacity:0;}}
@keyframes toastOut{to{transform:translateX(110%) scale(.9); opacity:0;}}

/* confirm dialog */
#confirm-overlay{
    position:fixed;inset:0;
    background:rgba(0,0,0,0.4);
    z-index:9999999;
    display:none; align-items:center;
    justify-content:center;
    backdrop-filter:blur(8px);
}
.confirm-window {
    position: relative !important; width: 360px !important; max-width: 90vw !important;
    display: flex !important; flex-direction: column !important;
    background: #fff; border: var(--border); box-shadow: 10px 10px 0 var(--black);
    border-radius: 16px; overflow: hidden;
    animation: confirmPop .35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
@keyframes confirmPop { from { transform: scale(.85) translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }

.confirm-body { padding: 24px !important; }

.confirm-content { text-align: center; }

.confirm-message { font-size: 15px; font-weight: 700; line-height: 1.5; margin-bottom: 22px; }

.confirm-actions { display: flex; gap: 12px; justify-content: center; }

.confirm-btn {
    flex: 1; padding: 12px 20px; font-family: var(--font-display); font-size: 12px;
    letter-spacing: 1px; border: var(--border); border-radius: 10px; cursor: pointer;
    box-shadow: var(--shadow-sm); transition: all .15s;
}

.confirm-btn:hover { transform: translateY(-2px); }

.confirm-btn-yes { background: var(--red); color: #fff; }

.confirm-btn-no { background: #fff; }

.confirm-btn-no:hover { background: var(--yellow); }

/* focus-timer */
.pomo-header-dark{
    background:#1c1c1e !important;
    border-bottom:1px solid rgba(255,255,255,0.07) !important;
}
.pomo-header-dark .window-title{color:rgba(255,255,255,.88);}

.pomo-header-dark .win-btn{
    background:rgba(255,255,255,0.12); 
    border-color:rgba(255,255,255,0.3); 
    color:#ffffff;
    box-shadow:none;
}

.pomo-header-dark .win-btn:hover{
    background:rgba(255,255,255,0.25); 
    transform:none;
    box-shadow:none;
}
.pomo-header-dark .btn-min:hover { background: var(--yellow); color: #000; }

.pomo-header-dark .btn-max:hover { background: var(--green); color: #000; }

.pomo-header-dark .btn-close:hover { background: var(--red); color: #fff; }

.pomo-body{
    display:flex;
    flex-direction:column; align-items:center;
    padding: 28px 24px 24px;
    gap:20px; background:#fafaf8;
    flex:1;
    overflow-y:auto;
    position:relative;
}

.window.maximized .pomo-body{
    gap:40px;
    padding:60px 80px;
    justify-content:center;
}

.pomo-modes{
    display:flex;
    width:100%;
    flex-shrink:0;
    margin-top:12px;
    border-bottom:1px solid rgba(0,0,0,0.1);
    overflow-x:auto;
    scrollbar-width:none;
}

.pomo-modes::-webkit-scrollbar{display:none;}

.pomo-mode-btn {
    flex: none;
    padding: 9px 11px;
    white-space: nowrap; 
    margin-bottom: -1px;
    font-family: var(--font-body); 
    font-size: 10px; 
    font-weight: 500;
    border: none; 
    border-bottom: 2px solid transparent;
    background: none; 
    color: rgba(0,0,0,.38); 
    cursor: pointer; 
    transition: color .2s;
}

.pomo-mode-btn:hover { color: rgba(0,0,0,.7); }

.pomo-mode-btn.active { color: #1c1c1e; font-weight: 600; border-bottom-color: #1c1c1e; }

.window.maximized .pomo-mode-btn { padding: 12px 20px; font-size: 12px; }

.pomo-timer-display {
    font-family: var(--font-display); font-size: 84px; font-weight: 900;
    letter-spacing: -4px; line-height: 1; color: #1c1c1e;
    background: none; border: none; box-shadow: none;
    padding: 8px 0; width: 100%; text-align: center;
}

.window.maximized .pomo-timer-display{
    font-size:clamp(100px, 14vw, 200px);
}

.pomo-label{
    font-family:var(--font-mono);
    font-size:10px;
    letter-spacing:4px;
    color:rgba(0,0,0,0.3);
    text-align:center;
}

.window.maximized .pomo-label{font-size:13px;}

.pomo-progress-wrap{
    height:2px;width:100%;
    background:rgba(0,0,0,0.08);
    overflow:hidden;
}

.window.maximized .pomo-progress-wrap{
    height:3px;
    width:60%;
}

.pomo-progress-bar{
    height:100%;
    width:100%;
    background:#1c1c1e;
    transition:width 1s linear;
}

.pomo-controls{display:flex; gap:10px; width:100%;}

.window.maximized .pomo-controls{width:auto;}

.pomo-btn {
    flex: 1; 
    padding: 13px 0; 
    font-family: var(--font-mono); font-size: 11px;
    letter-spacing: 2px; 
    border-radius: 4px; cursor: pointer;
    display: flex; align-items: center; 
    justify-content: center;
    transition: transform .15s;
}

.window.maximized .pomo-btn { flex: none; padding: 16px 56px; font-size: 13px; }
.pomo-btn:hover { transform: translateY(-1px); }
.pomo-btn:active { transform: translateY(1px); }
.pomo-start { background: #1c1c1e; color: #fff; border: 2px solid #1c1c1e; }
.pomo-start:hover { background: #2e2e2e; }
.pomo-reset { background: none; color: #1c1c1e; border: 2px solid rgba(0,0,0,.18); }
.pomo-reset:hover { border-color: rgba(0,0,0,.5); }
.pomo-sessions {
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    gap: 6px;
    border: 1px solid rgba(0,0,0,.1); 
    border-radius: 6px; 
    padding: 14px 0; 
    width: 100%; 
    background: #fff;
}
.window.maximized .pomo-sessions{
    width:auto;
    padding:20px 80px;
}
.pomo-session-label{
    font-family:var(--font-mono);
    font-size:8px;
    letter-spacing:2px;
    color:rgba(0,0,0,0.32);
}

.pomo-sessions-count{
    font-family:var(--font-mono);
    font-size:36px;
    color:#1c1c1e;
}
.window.maximized .pomo-sessions-count{font-size:60px;}
.pomo-custom-overlay{
    position:absolute;
    inset:0;
    background:rgba(250,250,248,0.96);
    backdrop-filter:blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display:flex;
    align-items:center;
    justify-content:center;
    z-index:10;
    padding:20px;
}

.pomo-custom-box{
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:16px;
    width:100%;
    max-width:250px;
}

.pomo-custom-title{
    font-family:var(--font-mono);
    font-size:11px;
    letter-spacing:3px;
    color:rgba(0,0,0,0.45);
    font-weight:700;
}

.pomo-custom-type-toggle{
    display:flex;
    width:100%;
    border:1px solid rgba(0,0,0,0.15);
    border-radius:6px;
    overflow:hidden;
}
.pomo-custom-type-toggle input[type=radio]{display:none;}
.pomo-custom-type-toggle label{
    flex:1;
    text-align:center;
    padding:8px 0;
    font-family:var(--font-mono);
    font-size:10px;
    letter-spacing:1px;
    cursor:pointer;
    color:rgba(0,0,0,0.4);
    transition:all .15s;
}
.pomo-custom-type-toggle input:checked + label{
    background:#1c1c1e;
    color:#fff;
}

.pomo-custom-inputs{display:flex; align-items:center; justify-content:center; gap:10px;}

.pomo-time-group{display:flex; flex-direction:column; align-items:center; gap:6px;}

.pomo-time-group input{
    font-family:var(--font-mono);
    font-size:26px;
    font-weight:700;
    width:56px;
    text-align:center;
    border:1px solid rgba(0,0,0,0.14);
    border-radius:6px;
    background:#f8f8f6;
    color:#1c1c1e;
    padding:7px 0;
    outline:none;
}

.pomo-time-group input:focus { border-color: #1c1c1e; 
    background: #fff; }
.pomo-time-group label { font-family: var(--font-mono); 
    font-size: 8px; 
    letter-spacing: 2px; 
    color: rgba(0,0,0,.36); 
    font-weight: 700; }

.pomo-time-sep { font-family: var(--font-mono); 
    font-size: 24px; 
    font-weight: 700; 
    color: rgba(0,0,0,.2); 
    margin-bottom: 20px; }

.pomo-custom-actions { display: flex; 
    gap: 10px; 
    width: 100%; }
.pomo-custom-btn { flex: 1; 
    padding: 11px 0; 
    font-family: var(--font-mono); 
    font-size: 10px; 
    letter-spacing: 1px; 
    border-radius: 4px; 
    cursor: pointer; 
    transition: all .15s; }
.btn-cancel { background: none; 
    color: rgba(0,0,0,.4); 
    border: 1px solid rgba(0,0,0,.14); }
.btn-cancel:hover { color: #1c1c1e; 
    border-color: rgba(0,0,0,.4); }
.btn-set { background: #1c1c1e; 
    color: #fff; 
    border: 1px solid #1c1c1e; }

.btn-set:hover { background: #2e2e2e; }

