/* =================================================
   WINDOWS — base styles + per-app variants + cat-app
   ================================================= */
.windows {
  position: absolute; inset: 0;
  z-index: 10;
  pointer-events: none;
}
.win {
  position: absolute;
  background: #050a05;
  border: 2px solid var(--c, var(--accent));
  box-shadow: 6px 6px 0 rgba(0,0,0,0.55);
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--c, var(--accent));
  pointer-events: auto;
  display: none;
  flex-direction: column;
  min-width: 240px;
  min-height: 220px;
  resize: both;
  overflow: hidden;
  transition: opacity 0.18s, transform 0.18s;
}
.win.open { display: flex; }
.win.maximized {
  left: 0 !important; top: 0 !important;
  width: 100vw !important; height: calc(100vh - var(--taskbar-h)) !important;
  box-shadow: none; border-width: 0 0 2px 0;
}
.win.focused {
  z-index: 50;
  outline: 3px solid var(--ink);
  outline-offset: 0;
  box-shadow: 8px 8px 0 rgba(0,0,0,0.75);
}
.win:focus-visible {
  outline: 3px solid var(--c, var(--accent));
  outline-offset: 2px;
}
.win.minimized {
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px) scale(0.95);
}
.win-title {
  background: var(--c, var(--accent));
  color: var(--ink);
  padding: 4px 10px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11px; font-weight: 700;
  letter-spacing: 1.2px; text-transform: uppercase;
  cursor: grab;
  user-select: none;
  flex-shrink: 0;
}
.win-title .name { display: flex; align-items: center; gap: 6px; }
.win-title .name .dot { width: 9px; height: 9px; background: var(--ink); }
.win-title .ctrls { display: flex; gap: 3px; }
.win-title .ctrls span {
  width: 18px; height: 18px;
  background: var(--ink); color: var(--c, var(--accent));
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.win-title .ctrls span svg { width: 60%; height: 60%; display: block; }
.win-title .ctrls span:hover { background: var(--paper); color: var(--ink); }
.win-body {
  padding: 10px 12px 12px;
  flex: 1; min-height: 0;
  display: flex; flex-direction: column;
  overflow: auto;
}
.win-foot {
  display: flex; justify-content: space-between; align-items: center;
  padding: 5px 8px;
  border-top: 2px solid var(--c);
  background: rgba(0,0,0,0.3);
  flex-shrink: 0;
  gap: 8px;
  white-space: nowrap;
  overflow: hidden;
}
.win-foot .open-all {
  background: var(--c);
  color: var(--ink);
  border: 0;
  padding: 4px 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}
.win-foot .open-all:hover { background: var(--paper); }
.win-foot .meta {
  font-size: 9px; opacity: 0.7; letter-spacing: 1px; text-transform: uppercase;
  overflow: hidden; text-overflow: ellipsis;
  min-width: 0;
}

/* ===== CREATE — paint window ===== */
.win.w-create { width: 290px; --c: var(--c-create); background: #f5fbe0; color: var(--ink); }
.w-create .toolbar { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; margin-bottom: 6px; }
.w-create .tool {
  background: var(--white); border: 1.5px solid var(--ink);
  height: 24px; font-size: 12px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--ink); user-select: none;
}
.w-create .tool:hover, .w-create .tool.sel { background: var(--c-create); }
.w-create #paint-canvas {
  background: #fff; border: 2px solid var(--ink);
  width: 100%; height: 200px; cursor: crosshair; display: block;
  touch-action: none;
}
.w-create .swatches {
  display: flex; gap: 3px; margin-top: 6px; padding: 3px;
  background: var(--white); border: 1.5px solid var(--ink);
}
.w-create .swatch { width: 20px; height: 20px; border: 1.5px solid var(--ink); cursor: pointer; }
.w-create .swatch.sel { box-shadow: inset 0 0 0 2px var(--white), inset 0 0 0 4px var(--ink); }
.w-create .actions { display: flex; gap: 4px; margin-top: 6px; }
.w-create .actions button {
  flex: 1; background: var(--white); color: var(--ink);
  border: 1.5px solid var(--ink); padding: 4px;
  font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
}
.w-create .actions button:hover { background: var(--c-create); }

/* ===== TECH terminal ===== */
.win.w-tech { width: 320px; --c: var(--c-tech); background: #1a0510; }
.w-tech .win-body { display: flex; flex-direction: column; overflow: hidden; }
.w-tech .term { font-size: 13px; line-height: 1.5; flex: 1; overflow-y: auto; }

/* Pet panel — pinned above terminal output */
.pet-panel {
  display: none; flex-shrink: 0; align-items: flex-start; gap: 10px;
  padding: 6px 10px 6px 8px;
  border-bottom: 1px solid var(--c-tech);
  background: rgba(255,46,126,0.07);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; color: var(--c-tech);
}
.pet-sprite {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; line-height: 1.3; margin: 0;
  color: var(--c-tech); flex-shrink: 0;
}
.pet-info { flex: 1; min-width: 0; }
.pet-toprow { display: flex; gap: 6px; align-items: baseline; margin-bottom: 3px; }
.pet-name-lbl { font-weight: 700; font-size: 11px; color: var(--paper); }
.pet-mood-lbl { font-size: 9px; opacity: 0.65; letter-spacing: 1px; text-transform: uppercase; }
.pet-stats {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px; line-height: 1.5; margin: 0;
  color: var(--c-tech); opacity: 0.9;
}
.w-tech .term .prompt::before { content: "▸ "; opacity: 0.7; }
.w-tech .term .blink::after { content: "▌"; opacity: 0.35; }
.win.w-tech.focused .term .blink::after { animation: blink 1s steps(2) infinite; opacity: 1; }
.w-tech .term .out { padding-left: 12px; font-size: 10.5px; opacity: 0.95; white-space: pre-wrap; }
.w-tech .term .out a { color: var(--c-tech); border-bottom: 1px dotted var(--c-tech); cursor: pointer; }
.w-tech .term .out a:hover { background: var(--c-tech); color: var(--ink); }
.w-tech .term .prompt-line { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.w-tech .term .prompt-line .ps { opacity: 0.7; }
.w-tech #term-input { position: absolute; left: -9999px; opacity: 0; }
.w-tech .term .err { color: var(--white); }
.w-tech .term b { color: var(--white); font-weight: 700; }

/* ===== ARCADE — RetroBoy ===== */
.win.w-arcade { width: 360px; --c: var(--c-arcade); background: #2e1c00; }
.w-arcade .gb-screen {
  background: #1a4d1f; border: 3px solid var(--c-arcade);
  height: 185px; position: relative; overflow: hidden;
}
.w-arcade #game-canvas,
.w-arcade #flappy-canvas,
.w-arcade #breakout-canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; }
.w-arcade .game-tabs {
  display: flex; border-bottom: 2px solid var(--c-arcade); margin-bottom: 4px;
}
.w-arcade .game-tab {
  flex: 1; background: transparent; border: 0; border-right: 1px solid var(--c-arcade);
  color: var(--c-arcade); font-family: 'JetBrains Mono', monospace;
  font-size: 9px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; padding: 4px 0; cursor: pointer;
}
.w-arcade .game-tab:last-child { border-right: 0; }
.w-arcade .game-tab.active { background: var(--c-arcade); color: var(--ink); }
.w-arcade .game-tab:hover:not(.active) { background: rgba(255,184,0,0.18); }
.w-arcade .gb-screen::after {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(0deg, transparent 0 2px, rgba(0,0,0,0.18) 2px 3px);
  pointer-events: none;
}
.w-arcade .gb-hud {
  position: absolute; top: 4px; left: 6px; right: 6px;
  display: flex; justify-content: space-between;
  font-family: 'Press Start 2P', monospace; font-size: 8px;
  color: #c9ff8a;
  text-shadow: 0 0 3px var(--c-arcade);
  pointer-events: none; z-index: 5;
}
.w-arcade .gb-controls {
  display: grid; grid-template-columns: 60px 1fr 70px; gap: 8px;
  align-items: center;
  background: var(--ink); padding: 8px; margin: 6px 0;
  border: 2px solid var(--c-arcade);
}
.w-arcade .dpad-grid {
  display: grid; grid-template-columns: repeat(3, 14px); grid-template-rows: repeat(3, 14px);
  gap: 1px; margin: 0 auto;
}
.w-arcade .dpad-btn { background: var(--c-arcade); border: 0; padding: 0; }
.w-arcade .dpad-btn.empty { background: var(--ink); }
.w-arcade .dpad-btn:active { background: var(--hover); }
.w-arcade .startsel { display: flex; justify-content: center; gap: 5px; }
.w-arcade .startsel span {
  font-family: 'JetBrains Mono', monospace; font-size: 8px;
  color: var(--c-arcade); background: rgba(255,184,0,0.1);
  padding: 2px 6px; border: 1px solid var(--c-arcade);
}
.w-arcade .ab { display: flex; gap: 6px; align-items: center; justify-content: flex-end; }
.w-arcade .ab .btn {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--hover); color: var(--ink);
  border: 2px solid var(--c-arcade);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Press Start 2P', monospace; font-size: 9px;
}
.w-arcade .ab .btn:active { background: var(--c-arcade); }

/* ===== WEB — Mosaic browser / fact reader ===== */
.win.w-web { width: 340px; --c: var(--c-web); background: #0a0420; }
.w-web .urlbar { display: flex; align-items: center; gap: 4px; margin-bottom: 6px; font-size: 10px; }
.w-web .urlbar button {
  background: var(--ink); border: 1.5px solid var(--c-web);
  color: var(--c-web); padding: 2px 6px; cursor: pointer;
}
.w-web .urlbar button:hover { background: var(--c-web); color: var(--ink); }
.w-web .urlbar .input {
  flex: 1; background: var(--ink); border: 1.5px solid var(--c-web);
  padding: 3px 6px; color: var(--c-web); font-size: 10px;
}
.w-web .page {
  background: var(--paper); border: 2px solid var(--c-web);
  padding: 10px 12px; color: var(--ink);
  font-size: 13px; line-height: 1.5;
  flex: 1; min-height: 0;
}
.w-web .page .kicker {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--c-web); margin-bottom: 4px;
}
.w-web .page h5 {
  font-family: 'Geologica', sans-serif; font-weight: 900;
  font-size: 16px; color: var(--ink);
  margin-bottom: 6px; line-height: 1.1;
}
.w-web .page p {
  font-family: 'Inter', sans-serif; font-size: 13px; margin-bottom: 5px;
}
.w-web .page a { color: var(--c-web); text-decoration: underline; font-weight: 700; }
.w-web .page a:hover { background: var(--c-web); color: var(--paper); }
.w-web .page .web-footer {
  margin-top: 8px; padding-top: 6px;
  border-top: 1.5px dashed var(--c-web);
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px; letter-spacing: 1px; text-transform: uppercase;
  opacity: 0.7; display: flex; justify-content: space-between;
}

/* ===== BLOCK builder ===== */
.win.w-block { width: 300px; --c: var(--c-block); background: #1f0a02; }
.w-block .win-body { display: flex; flex-direction: column; gap: 4px; }
.bb-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 1px;
  background: rgba(0,0,0,0.4);
  border: 2px solid var(--c-block);
  flex: 1; min-height: 0;
}
.bb-cell {
  background: #2a1408;
  cursor: pointer;
  aspect-ratio: 1;
  image-rendering: pixelated;
  background-size: cover;
}
.bb-cell:hover { outline: 2px solid var(--c-block); outline-offset: -2px; }
.bb-palette {
  display: flex; gap: 3px; flex-wrap: wrap;
  background: var(--ink); padding: 4px;
  border: 2px solid var(--c-block);
}
.bb-tex {
  width: 24px; height: 24px;
  cursor: pointer; border: 2px solid transparent;
  image-rendering: pixelated; background-size: cover;
}
.bb-tex.sel { border-color: var(--white); box-shadow: 0 0 0 1px var(--c-block); }
.bb-tools {
  display: flex; gap: 4px;
}
.bb-tools button {
  flex: 1; background: var(--ink); border: 1.5px solid var(--c-block);
  color: var(--c-block); padding: 3px; font-size: 10px; font-weight: 700;
  letter-spacing: 1px;
}
.bb-tools button:hover { background: var(--c-block); color: var(--ink); }
.bb-tools button.active { background: var(--c-block); color: var(--ink); }

/* ===== CATEGORY APP (full link list) ===== */
.cat-app {
  position: fixed;
  top: 0; left: 0; right: 0;
  bottom: var(--taskbar-h);
  background: var(--ink);
  border: 3px solid var(--c, var(--accent));
  box-shadow: 10px 10px 0 rgba(0,0,0,0.55);
  z-index: 70;
  display: none;
  flex-direction: column;
  color: var(--paper);
}
.cat-app.open { display: flex; }
.cat-app.focused { z-index: 75; }
.cat-app.minimized { display: none; }
.cat-app-title {
  background: var(--c);
  color: var(--ink);
  padding: 3px 10px;
  display: flex; align-items: center; justify-content: space-between;
  font-family: 'Geologica', sans-serif; font-weight: 900;
  font-size: 15px; letter-spacing: 0.02em;
  cursor: grab; user-select: none;
  min-height: 24px;
}
.cat-app-title .ctrls { display: flex; align-items: center; gap: 3px; }
.cat-app-title .ctrls span {
  width: 22px; height: 22px;
  background: var(--ink); color: var(--c);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; margin-left: 0;
}
.cat-app-title .ctrls span svg { width: 60%; height: 60%; display: block; }
.cat-app-title .meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 2px; text-transform: uppercase;
  font-weight: 700;
}
.cat-app-toolbar {
  display: flex; gap: 8px; padding: 10px 14px;
  background: rgba(0,0,0,0.5);
  border-bottom: 2px solid var(--c);
  align-items: center;
}
.cat-app-toolbar input {
  flex: 1; background: rgba(255,255,255,0.06);
  border: 1.5px solid var(--c); color: var(--paper);
  padding: 6px 10px;
  font: inherit; font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 1px; outline: 0;
}
.cat-app-toolbar input::placeholder { color: rgba(255,255,255,0.4); }
.cat-app-toolbar .chip {
  background: transparent; border: 1.5px solid var(--c); color: var(--c);
  padding: 5px 10px;
  font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
}
.cat-app-toolbar .chip.sel { background: var(--c); color: var(--ink); }
.cat-app-body { flex: 1; min-height: 0; overflow-y: auto; padding: 14px; scrollbar-width: thin; }

/* Per-category scrollbar tinting — overrides the global lime accent */
.cat-app[data-cat="create"], .cat-app[data-cat="create"] * { scrollbar-color: var(--c-create) var(--ink); }
.cat-app[data-cat="create"] ::-webkit-scrollbar-thumb { background: var(--c-create); }
.cat-app[data-cat="tech"],   .cat-app[data-cat="tech"]   * { scrollbar-color: var(--c-tech)   var(--ink); }
.cat-app[data-cat="tech"]   ::-webkit-scrollbar-thumb { background: var(--c-tech); }
.cat-app[data-cat="arcade"], .cat-app[data-cat="arcade"] * { scrollbar-color: var(--c-arcade) var(--ink); }
.cat-app[data-cat="arcade"] ::-webkit-scrollbar-thumb { background: var(--c-arcade); }
.cat-app[data-cat="web"],    .cat-app[data-cat="web"]    * { scrollbar-color: var(--c-web)    var(--ink); }
.cat-app[data-cat="web"]    ::-webkit-scrollbar-thumb { background: var(--c-web); }
.cat-app[data-cat="block"],  .cat-app[data-cat="block"]  * { scrollbar-color: var(--c-block)  #1E1E1F; }
.cat-app[data-cat="block"]  ::-webkit-scrollbar-thumb { background: var(--c-block); }
.cat-app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.cat-site {
  background: var(--paper); color: var(--ink);
  border: 2px solid var(--c);
  padding: 0; position: relative; cursor: pointer;
  text-align: left;
  display: flex; flex-direction: column;
  transition: transform .12s;
}
.cat-site:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--c); }
.cat-site .thumb {
  background: var(--c); height: 80px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Geologica', sans-serif; font-weight: 900;
  font-size: 32px; color: var(--ink);
  border-bottom: 2px solid var(--c);
}
.cat-site .info { padding: 8px 10px; }
.cat-site .info .nm {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.5px; line-height: 1.2;
}
.cat-site .info .meta { font-size: 10px; opacity: 0.6; margin-top: 3px; letter-spacing: 1px; }
.cat-site .fav {
  position: absolute; top: 4px; right: 4px;
  background: var(--ink); color: var(--c);
  border: 1.5px solid var(--ink);
  width: 22px; height: 22px;
  font-size: 12px;
  display: flex; align-items: center; justify-content: center; z-index: 2;
}
.cat-site .fav:hover, .cat-site .fav.faved { background: var(--hover); color: var(--ink); }
.cat-empty {
  grid-column: 1 / -1;
  text-align: center; padding: 40px 20px;
  font-size: 13px; opacity: 0.5; letter-spacing: 1px;
}

/* ===== THEME: CREATIVE CANVAS — "Design Your Link Page" paint app ===== */
/* The paint app provides its own header/toolbox; the OS toolbar + body padding are hidden,
   mirroring the tech/web/block themes. All paint styles live in css/creative-canvas.css. */
[data-cat="create"] .cat-app-toolbar { display: none; }
[data-cat="create"] .cat-app-body { padding: 0; overflow: hidden; }

/* ===== THEME: TECH TERMINAL — Code.org Blockly ===== */
[data-cat="tech"] .cat-app-title {
  background: #0e0a12; border-bottom: 2px solid var(--c-tech); padding: 6px 14px;
}
[data-cat="tech"] .cat-app-title #cat-app-name {
  color: var(--c-tech);
}
[data-cat="tech"] .cat-app-title .ctrls span {
  background: var(--c-tech); color: var(--ink);
}
[data-cat="web"] .cat-app-title .ctrls span {
  background: var(--c-web); color: var(--ink);
}
[data-cat="tech"] .cat-app-toolbar { display: none; }
[data-cat="tech"] .cat-app-body { background: #0a0a0f; padding: 0; overflow: hidden; }
.theme-tech { display: flex !important; flex-direction: column; gap: 0; padding: 0 !important; height: 100%; overflow: hidden; }

.tt-instructions {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 16px; background: linear-gradient(90deg, #1a0510 0%, #120818 100%);
  border-bottom: 2px solid var(--c-tech);
  flex-shrink: 0;
}
.tt-inst-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px; color: var(--paper); letter-spacing: 0.3px;
}
.tt-inst-text::before { content: '> '; color: var(--c-tech); font-weight: 900; }
.tt-inst-text b { color: var(--c-tech); }
.tt-mode-toggle {
  background: rgba(255,46,126,0.08); border: 2px solid var(--c-tech);
  color: var(--c-tech); padding: 6px 16px;
  font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 700;
  cursor: pointer; letter-spacing: 0.5px;
  transition: all 0.12s;
}
.tt-mode-toggle:hover { background: var(--c-tech); color: var(--ink); }

.tt-layout {
  flex: 1; display: grid;
  grid-template-columns: 340px 1fr;
  min-height: 0; overflow: hidden;
}

.tt-left {
  background: #0e0a12;
  border-right: 2px solid rgba(255,46,126,0.25);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.tt-stage-screen {
  aspect-ratio: 4/3; width: 100%;
  background:
    linear-gradient(135deg, rgba(255,46,126,0.04) 0%, transparent 50%),
    repeating-linear-gradient(0deg, transparent 0 15px, rgba(255,255,255,0.015) 15px 16px),
    repeating-linear-gradient(90deg, transparent 0 15px, rgba(255,255,255,0.015) 15px 16px),
    #12101a;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; position: relative;
  border-bottom: 2px solid rgba(255,46,126,0.15);
  user-select: none;
}
.tt-stage-placeholder {
  color: rgba(255,255,255,0.12);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; text-align: center; line-height: 2;
  text-transform: uppercase; letter-spacing: 1.5px;
  position: relative; z-index: 2;
}
.tt-stage-placeholder::after {
  content: '▌'; display: inline;
  animation: blink 1s steps(2) infinite;
  color: var(--c-tech); opacity: 0.4;
}
.tt-stage-screen::before {
  content: ''; position: absolute; inset: 0;
  background: repeating-linear-gradient(0deg,
    transparent 0, transparent 2px,
    rgba(255,46,126,0.02) 2px, rgba(255,46,126,0.02) 3px);
  pointer-events: none; z-index: 1;
}
.tt-stage-img {
  width: 100%; height: 100%;
  background-size: cover; background-position: center;
}
.tt-visit-btn {
  background: var(--c-tech); color: var(--white); border: 0;
  font-family: 'Geologica', sans-serif; font-weight: 900;
  font-size: 18px; letter-spacing: 3px;
  padding: 16px; cursor: pointer;
  flex-shrink: 0;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
  transition: filter 0.12s, transform 0.12s;
}
.tt-visit-btn:hover:not(:disabled) { filter: brightness(1.2); transform: scale(1.01); }
.tt-visit-btn:disabled { background: #2a1020; color: rgba(255,255,255,0.2); cursor: default; }
.tt-stage-info {
  padding: 10px 12px; display: flex; justify-content: space-between; align-items: center;
  border-top: 1px solid rgba(255,46,126,0.1);
  flex-shrink: 0; background: rgba(0,0,0,0.2);
}
.tt-info-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px; font-weight: 700; color: var(--paper);
  text-transform: uppercase; letter-spacing: 0.5px;
}
.tt-info-cat { font-size: 10px; color: var(--c-tech); opacity: 0.5; letter-spacing: 1.5px; }

.tt-site-desc {
  flex: 1; padding: 12px 14px;
  font-family: 'Inter', sans-serif; font-size: 13px;
  color: rgba(255,255,255,0.5); line-height: 1.5;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  background: rgba(0,0,0,0.15);
}
.tt-site-desc.has-desc {
  color: var(--paper); opacity: 0.85;
  animation: tt-msg-in 0.2s ease-out;
}

.tt-right { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }

.tt-blockly-wrap {
  flex: 1; display: flex; flex-direction: column; min-height: 0;
}
.tt-blockly-container {
  flex: 1; position: relative; min-height: 0; overflow: hidden;
  touch-action: none;
}
.tt-blockly-container .injectionDiv {
  position: absolute !important;
  inset: 0 !important;
}
.tt-blockly-container * { will-change: auto; }
.tt-blockly-container .blocklyDragging { transition: none !important; }
.tt-loading {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; background: #110d18;
  font-family: 'JetBrains Mono', monospace; font-size: 12px;
  color: var(--c-tech); letter-spacing: 1.5px; text-transform: uppercase;
}
.tt-loading-spinner {
  width: 36px; height: 36px;
  border: 3px solid rgba(255,46,126,0.2);
  border-top-color: var(--c-tech);
  animation: tt-spin 0.8s linear infinite;
}
@keyframes tt-spin { to { transform: rotate(360deg); } }
.tt-loading-err {
  color: var(--hover); font-size: 12px; text-align: center; padding: 20px;
  font-family: 'JetBrains Mono', monospace;
}
.tt-stage-msg {
  font-family: 'Geologica', sans-serif; font-weight: 900;
  font-size: 24px; color: var(--white); text-align: center;
  padding: 20px; word-break: break-word;
  text-shadow: 0 0 20px rgba(255,46,126,0.4), 0 2px 4px rgba(0,0,0,0.5);
  animation: tt-msg-in 0.3s ease-out;
  position: relative; z-index: 2;
}
@keyframes tt-msg-in {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

/* Blockly overrides for Tech Terminal branding */
.tt-blockly-container .blocklyToolboxDiv {
  border-right: 2px solid rgba(255,46,126,0.2) !important;
  padding-top: 6px !important;
}
/* Toolbox label styling — minimal overrides to avoid breaking Blockly click handlers */
.tt-blockly-container .blocklyToolboxDiv {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}
/* Force font + dark text on bright blocks */
.tt-blockly-container .blocklyText {
  font-family: 'JetBrains Mono', monospace !important;
  font-weight: 700 !important;
  fill: #0a0a0a !important;
}
.tt-blockly-container .blocklyEditableText .blocklyText {
  fill: #0a0a0a !important;
}
.tt-blockly-container .blocklyHtmlInput {
  font-family: 'JetBrains Mono', monospace !important;
  font-weight: 700 !important;
  color: #0a0a0a !important;
}
.tt-blockly-container .blocklyDropDownContent {
  font-family: 'JetBrains Mono', monospace !important;
}
.tt-blockly-container .blocklyDropdownText {
  fill: #0a0a0a !important;
}
.tt-blockly-container .blocklyFlyoutBackground {
  fill: #160c20 !important;
  fill-opacity: 0.98 !important;
}
.tt-blockly-container .blocklyMainBackground {
  fill: #110d18 !important;
}
.tt-blockly-container .blocklyTrash image {
  opacity: 0.3;
  transition: opacity 0.2s;
}
.tt-blockly-container .blocklyTrash:hover image {
  opacity: 0.6;
}
.tt-blockly-container .blocklyScrollbarVertical .blocklyScrollbarHandle,
.tt-blockly-container .blocklyScrollbarHorizontal .blocklyScrollbarHandle {
  fill: var(--c-tech) !important;
  fill-opacity: 0.3 !important;
}
.tt-blockly-container .blocklyScrollbarVertical .blocklyScrollbarHandle:hover,
.tt-blockly-container .blocklyScrollbarHorizontal .blocklyScrollbarHandle:hover {
  fill-opacity: 0.5 !important;
}

/* VISIT button running state */
.tt-visit-btn.running {
  background: repeating-linear-gradient(90deg,
    var(--c-tech) 0 12px, rgba(0,0,0,0.2) 12px 16px);
  background-size: 200% 100%;
  animation: tt-run-stripe 0.6s linear infinite;
  pointer-events: none;
}
@keyframes tt-run-stripe { to { background-position: -32px 0; } }

/* Legacy block palette (kept for list-view fallback) */
.tt-right-header { flex: 1; display: grid; grid-template-columns: 220px 1fr; min-height: 0; }

.tt-blocks-col {
  background: #0e0a12;
  border-right: 2px solid rgba(255,46,126,0.15);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.tt-cat-select {
  padding: 8px 10px;
  border-bottom: 2px solid rgba(255,46,126,0.15);
  flex-shrink: 0;
}
.tt-cat-select select {
  width: 100%; background: #1a0510; color: var(--c-tech);
  border: 2px solid var(--c-tech); padding: 7px 12px;
  font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase;
  cursor: pointer; outline: 0; appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--c-tech) 50%),
                    linear-gradient(135deg, var(--c-tech) 50%, transparent 50%);
  background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%;
  background-size: 5px 5px; background-repeat: no-repeat;
}
.tt-block-list {
  flex: 1; overflow-y: auto; padding: 8px;
  display: flex; flex-direction: column; gap: 3px;
}
.tt-site-block {
  padding: 8px 12px 8px 16px;
  background: var(--c-tech);
  color: var(--white);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px; font-weight: 700;
  cursor: grab; user-select: none;
  border-left: 4px solid rgba(0,0,0,0.25);
  border-top: 1px solid rgba(255,255,255,0.15);
  border-bottom: 3px solid rgba(0,0,0,0.3);
  border-right: 1px solid rgba(0,0,0,0.1);
  flex-shrink: 0;
  position: relative;
  transition: transform 0.1s, box-shadow 0.1s;
}
.tt-site-block:hover { transform: translateX(3px); box-shadow: 2px 2px 8px rgba(255,46,126,0.2); }
.tt-site-block.tt-dragging { opacity: 0.4; transform: scale(0.95); }
.tt-site-block.tt-active { box-shadow: 0 0 0 2px var(--accent), 0 0 12px rgba(198,245,66,0.2); }

.tt-ws-col { display: flex; flex-direction: column; min-height: 0; }
.tt-ws-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 14px; background: #0e0a12;
  border-bottom: 2px solid var(--c-tech);
  font-family: 'JetBrains Mono', monospace; font-size: 10px; font-weight: 700;
  color: var(--c-tech); letter-spacing: 1.5px; text-transform: uppercase;
  flex-shrink: 0;
}
.tt-ws-bar span::before { content: '// '; opacity: 0.4; }
.tt-ws-reset {
  background: transparent; border: 1.5px solid rgba(255,46,126,0.3);
  color: rgba(255,255,255,0.45); padding: 4px 10px;
  font: inherit; font-size: 9px; cursor: pointer;
  transition: all 0.12s;
}
.tt-ws-reset:hover { color: var(--c-tech); border-color: var(--c-tech); background: rgba(255,46,126,0.1); }

.tt-workspace {
  flex: 1;
  background:
    radial-gradient(circle, rgba(255,46,126,0.04) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(135deg, #110d18 0%, #0c0812 100%);
  position: relative; overflow: hidden;
}

.tt-script {
  position: absolute;
  cursor: grab; z-index: 5;
  filter: drop-shadow(3px 3px 6px rgba(0,0,0,0.5));
}
.tt-script:active { cursor: grabbing; }
.tt-block-event {
  background: #d4a017; color: #1a1400;
  padding: 10px 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px; font-weight: 700;
  position: relative;
  border-left: 4px solid rgba(0,0,0,0.2);
  border-top: 1px solid rgba(255,255,255,0.2);
  border-bottom: 0;
  border-right: 1px solid rgba(0,0,0,0.1);
  display: flex; align-items: center; gap: 6px;
}
.tt-hat {
  position: absolute; top: -10px; left: 12px;
  width: 44px; height: 14px; background: #d4a017;
  clip-path: polygon(0 100%, 8% 0, 92% 0, 100% 100%);
}
.tt-block-open {
  background: var(--c-tech); color: var(--white);
  padding: 10px 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px; font-weight: 700;
  display: flex; align-items: center; gap: 10px;
  border-left: 4px solid rgba(0,0,0,0.2);
  border-top: 0;
  border-bottom: 5px solid rgba(0,0,0,0.3);
  border-right: 1px solid rgba(0,0,0,0.1);
  position: relative;
}
.tt-drop-zone {
  background: rgba(0,0,0,0.35);
  border: 2px dashed rgba(255,255,255,0.4);
  padding: 6px 16px; font-size: 12px;
  color: rgba(255,255,255,0.4);
  min-width: 140px; text-align: center;
  animation: tt-pulse 2.5s ease-in-out infinite;
}
@keyframes tt-pulse {
  0%, 100% { border-color: rgba(255,255,255,0.4); }
  50% { border-color: rgba(198,245,66,0.6); }
}
.tt-drop-zone.tt-drop-hover {
  border-color: var(--accent); background: rgba(198,245,66,0.2);
  color: var(--accent); animation: none;
}
.tt-drop-zone.tt-filled {
  border-style: solid; border-color: rgba(255,255,255,0.15);
  color: var(--white); background: rgba(0,0,0,0.2);
  animation: none; font-size: 13px;
}

.tt-list-view {
  flex: 1; overflow-y: auto; padding: 10px;
  display: flex; flex-direction: column; gap: 3px;
}
.tt-list-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; background: rgba(255,46,126,0.05);
  border: 1.5px solid rgba(255,46,126,0.1);
  cursor: pointer;
  font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--paper);
  transition: all 0.12s;
}
.tt-list-row:hover { background: rgba(255,46,126,0.15); border-color: var(--c-tech); transform: translateX(2px); }
.tt-list-name { font-weight: 700; }
.tt-list-open { font-size: 10px; color: var(--c-tech); letter-spacing: 1px; }
.theme-tech .fav { display: none; }

/* ===== THEME: AVERY ARCADE — game portal ===== */
[data-cat="arcade"] .cat-app-body {
  background: #0c0816;
  padding: 0;
}
[data-cat="arcade"] .cat-app-body::after {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(0deg, transparent 0 2px, rgba(0,0,0,0.08) 2px 3px);
  pointer-events: none;
}
.theme-arcade {
  display: flex !important; flex-direction: column; gap: 0;
  padding: 0 !important;
}
.arc-top { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 2px solid var(--c); min-height: 280px; }
.arc-hero {
  display: flex; height: 100%; cursor: pointer;
  background: linear-gradient(135deg, #1a0a30 0%, #0c0816 100%);
  overflow: hidden; position: relative;
}
.arc-right { background: rgba(0,0,0,0.6); border-left: 2px solid var(--c); display: flex; flex-direction: column; padding: 0; overflow-y: auto; }
.arc-panel-head { font-family: "Geologica", sans-serif; font-weight: 900; font-size: 13px; color: var(--paper); padding: 10px 12px 6px; letter-spacing: 0.02em; }
.arc-panel-empty { padding: 8px 12px; font-size: 11px; opacity: 0.4; color: var(--paper); }
.arc-recent { border-bottom: 1px solid rgba(255,224,0,0.15); }
.arc-recent-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 0 12px 10px; }
.arc-recent-card { cursor: pointer; text-align: center; }
.arc-recent-card:hover { opacity: 0.8; }
.arc-recent-img { height: 50px; background: #1a1a2e; background-size: cover; background-position: center; border: 1.5px solid rgba(255,255,255,0.1); }
.arc-recent-name { font-size: 9px; font-weight: 700; color: var(--paper); padding: 3px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: 'JetBrains Mono', monospace; text-transform: uppercase; letter-spacing: 0.3px; }
.arc-popular { flex: 1; }
.arc-pop-list { padding: 0 12px 8px; }
.arc-pop-row { display: flex; align-items: center; gap: 10px; padding: 5px 0; border-bottom: 1px dotted rgba(255,224,0,0.1); cursor: pointer; color: var(--paper); }
.arc-pop-row:hover { color: var(--c); }
.arc-pop-rank { font-family: 'Geologica', sans-serif; font-weight: 900; font-size: 16px; color: var(--c); width: 22px; text-align: center; }
.arc-pop-name { font-family: 'Inter', sans-serif; font-weight: 700; font-size: 12px; }
.arc-cat-jump { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px 12px; border-top: 1px solid rgba(255,224,0,0.15); }
.arc-cat-btn { background: rgba(255,255,255,0.04); border: 1.5px solid rgba(255,224,0,0.25); color: var(--paper); font-family: 'JetBrains Mono', monospace; font-size: 9px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; padding: 5px 8px; cursor: pointer; }
.arc-cat-btn:hover { background: rgba(255,224,0,0.15); border-color: var(--c); color: var(--c); }
.arc-hero-img { position: absolute; inset: 0; background-size: cover; background-position: center; filter: brightness(0.7); }
.arc-hero-info {
  position: absolute; bottom: 16px; left: 20px; z-index: 2;
}
.arc-hero-badge {
  display: inline-block;
  background: var(--c); color: var(--ink);
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px; font-weight: 700; letter-spacing: 2px;
  padding: 3px 8px; margin-bottom: 6px;
}
.arc-hero-title {
  font-family: 'Geologica', sans-serif; font-weight: 900;
  font-size: 28px; color: var(--paper);
  text-shadow: 2px 2px 0 rgba(0,0,0,0.8);
}
.arc-hero-btn {
  display: inline-block; margin-top: 8px;
  background: var(--c); color: var(--ink); border: 0;
  font-family: 'Geologica', sans-serif; font-weight: 900;
  font-size: 13px; padding: 6px 20px; letter-spacing: 1px;
  cursor: pointer;
}
.arc-hero-btn:hover { background: var(--paper); }
.arc-hero-dots {
  position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 6px; z-index: 3;
}
.arc-dot {
  width: 10px; height: 10px;
  background: rgba(255,255,255,0.3); cursor: pointer;
}
.arc-dot.active { background: var(--c); }
.arc-dot:hover { background: var(--paper); }
.arc-hero-prev, .arc-hero-next {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(0,0,0,0.5); border: 0; color: var(--paper);
  font-size: 16px; padding: 8px 10px; cursor: pointer; z-index: 3;
}
.arc-hero-prev { left: 8px; }
.arc-hero-next { right: 8px; }
.arc-hero-prev:hover, .arc-hero-next:hover { background: var(--c); color: var(--ink); }
.arc-section { padding: 12px 16px 4px; }
.arc-section-head {
  font-family: 'Geologica', sans-serif; font-weight: 900;
  font-size: 15px; color: var(--paper);
  margin-bottom: 10px; letter-spacing: 0.02em;
}
.arc-row {
  display: flex; gap: 10px;
  overflow-x: auto; padding-bottom: 10px;
  scrollbar-width: thin; scrollbar-color: var(--c) transparent;
}
.arc-row::-webkit-scrollbar { height: 6px; }
.arc-row::-webkit-scrollbar-thumb { background: var(--c); }
.arc-card {
  flex-shrink: 0; width: 140px;
  cursor: pointer; position: relative;
}
.arc-card:hover .arc-thumb { transform: scale(1.04); }
.arc-card:hover .arc-play { opacity: 1; }
.arc-thumb {
  width: 140px; height: 95px;
  background: #1a1a2e; background-size: cover; background-position: center;
  border: 2px solid rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
  transition: transform .15s;
}
.arc-sym { font-size: 28px; color: var(--c); }
.arc-play {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Geologica', sans-serif; font-weight: 900;
  font-size: 14px; color: var(--paper); letter-spacing: 2px;
  opacity: 0; transition: opacity .15s;
}
.arc-name {
  font-family: 'Inter', sans-serif; font-weight: 600;
  font-size: 11px; color: var(--paper);
  padding: 5px 2px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.theme-arcade .fav {
  position: absolute; top: 4px; right: 4px;
  width: 26px; height: 26px; padding: 0;
  background: rgba(0,0,0,0.75); color: var(--paper);
  border: 1.5px solid rgba(255,255,255,0.35);
  font-size: 14px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
  z-index: 3;
}
.theme-arcade .fav.faved { color: var(--c-arcade); border-color: var(--c-arcade); background: rgba(0,0,0,0.85); }
.theme-arcade .fav:hover { color: var(--hover); border-color: var(--hover); background: rgba(0,0,0,0.9); }
.arc-back-top {
  position: sticky; bottom: 10px; float: right;
  margin: 10px 16px;
  background: var(--c); color: var(--ink); border: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; font-weight: 700; letter-spacing: 1px;
  padding: 6px 14px; cursor: pointer;
  box-shadow: 2px 2px 0 rgba(0,0,0,0.5);
}
.arc-back-top:hover { background: var(--paper); }

/* ===== THEME: WEB WONDERS — Browser ===== */
[data-cat="web"] .cat-app-title {
  background: #1a1a24; border-bottom: 0; padding: 0 0 0 0;
  display: flex; align-items: stretch;
}
[data-cat="web"] .cat-app-title #cat-app-name {
  background: #121218; color: var(--paper);
  font-size: 13px; font-weight: 700;
  padding: 7px 18px 7px 12px;
  border-right: 1px solid rgba(255,255,255,0.06);
  border-top-right-radius: 8px;
  display: flex; align-items: center; gap: 6px;
}
[data-cat="web"] .cat-app-title #cat-app-name::before { content: '🔭'; }
[data-cat="web"] .cat-app-title .meta { display: none; }
[data-cat="web"] .cat-app-title .ctrls {
  margin-left: auto; display: flex; align-items: center; padding-right: 6px;
}
[data-cat="web"] .cat-app-title .ctrls span {
  background: transparent; color: rgba(255,255,255,0.5);
  border: 0; font-size: 13px;
}
[data-cat="web"] .cat-app-title .ctrls span:hover {
  color: var(--paper); background: rgba(255,255,255,0.1);
}
[data-cat="web"] .cat-app-toolbar { display: none; }
[data-cat="web"] .cat-app-body { background: #121218; padding: 0; }
.theme-web { display: flex !important; flex-direction: column; gap: 0; padding: 0 !important; }

/* Tab bar */
/* Address bar */
.wb-addr {
  display: flex; align-items: center; gap: 4px;
  background: #121218; padding: 6px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.wb-nav {
  width: 30px; height: 30px; border: 0; border-radius: 50%;
  background: transparent; color: rgba(255,255,255,0.5);
  font-size: 14px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.wb-nav:hover:not(:disabled) { color: var(--paper); background: rgba(255,255,255,0.08); }
.wb-nav:disabled { opacity: 0.25; cursor: default; }
.wb-url {
  flex: 1; background: #1e1e2a; border: 0; border-radius: 18px;
  padding: 7px 14px; color: rgba(255,255,255,0.6);
  font-family: 'Inter', sans-serif; font-size: 13px;
  display: flex; align-items: center; gap: 6px;
}
.wb-url:hover { background: #262636; }
.wb-lock { font-size: 11px; opacity: 0.5; }
.wb-ext-row {
  display: flex; align-items: center; gap: 2px; margin-left: 4px;
}
.wb-ext {
  width: 30px; height: 30px; border: 0; border-radius: 50%;
  background: transparent; color: rgba(255,255,255,0.5);
  font-size: 14px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.wb-ext:hover { background: rgba(255,255,255,0.08); color: var(--paper); }
.wb-omni {
  background: transparent; border: 0; outline: 0;
  color: rgba(255,255,255,0.6); font-family: 'Inter', sans-serif;
  font-size: 13px; width: 100%;
}
.wb-omni:focus { color: var(--paper); }
.wb-waffle {
  font-size: 18px !important; letter-spacing: -1px;
}
.wb-ext-popup {
  position: absolute; z-index: 10;
  background: #1e1e2a; border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px; padding: 10px 14px;
  color: var(--paper); font-family: 'Inter', sans-serif;
  font-size: 13px; max-width: 260px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}
.wb-waffle-menu {
  position: absolute; z-index: 10;
  background: #1e1e2a; border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px; padding: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  width: 200px;
}
.wm-head {
  font-family: 'Inter', sans-serif; font-size: 11px; font-weight: 700;
  color: rgba(255,255,255,0.4); text-transform: uppercase; letter-spacing: 1px;
  padding: 4px 8px 8px; border-bottom: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 4px;
}
.wm-app {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 6px;
  cursor: pointer; color: var(--paper);
  font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 500;
}
.wm-app:hover { background: rgba(255,255,255,0.08); }
.wm-dot {
  width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0;
}
.wb-bookmarks {
  display: flex; align-items: center; gap: 2px;
  background: #121218; padding: 4px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0; overflow-x: auto;
}
.wb-bm {
  padding: 4px 10px; border-radius: 4px;
  font-family: 'Inter', sans-serif; font-size: 12px;
  color: rgba(255,255,255,0.65); white-space: nowrap;
  cursor: pointer; text-decoration: none;
}
.wb-bm:hover { background: rgba(255,255,255,0.08); color: var(--paper); }

/* NTP content */
.wb-ntp {
  flex: 1; overflow-y: auto; padding: 0;
  background:
    radial-gradient(ellipse at 50% 20%, rgba(138,108,255,0.08) 0%, transparent 50%),
    #121218;
}
.wb-search-wrap {
  text-align: center; padding: 20px 20px 16px;
}
.wb-logo {
  font-family: 'Geologica', sans-serif; font-weight: 900;
  font-size: 28px; color: var(--paper);
  letter-spacing: 0.02em; margin-bottom: 14px;
}
.wb-logo img { max-height: 48px; display: block; margin: 0 auto; }
.wb-search {
  max-width: 560px; margin: 0 auto;
  display: flex; align-items: center;
  background: #1e1e2a; border: 2px solid #3a3a4a;
  border-radius: 10px;
}
.wb-search:focus-within { border-color: var(--c-web); }
.wb-search-icon { padding: 0 14px; font-size: 16px; color: rgba(255,255,255,0.4); }
.wb-search-input {
  flex: 1; background: transparent; border: 0; outline: 0;
  color: var(--paper); font-family: 'Inter', sans-serif;
  font-size: 15px; font-weight: 500; padding: 12px 14px 12px 0;
}
.wb-search-input::placeholder { color: rgba(255,255,255,0.3); }

/* Daily cards */
.wb-daily {
  display: flex; gap: 12px; justify-content: center;
  padding: 0 20px 24px; max-width: 600px; margin: 0 auto;
}
.wb-daily-card {
  flex: 1; background: rgba(138,108,255,0.08);
  border: 1.5px solid rgba(138,108,255,0.2);
  padding: 12px 14px;
}
.wb-daily-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--c-web); margin-bottom: 4px;
}
.wb-daily-text {
  font-family: 'Inter', sans-serif;
  font-size: 13px; color: var(--paper); line-height: 1.4;
}

/* Section headers */
.wb-section { padding: 0 28px 12px; max-width: 960px; margin: 0 auto; width: 100%; }
.wb-section-head {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; color: rgba(255,255,255,0.3);
  margin-bottom: 8px; padding-bottom: 4px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

/* Shortcut grid — Opera speed-dial style */
.wb-shortcut-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px 10px;
}
.wb-shortcut-grid .wb-shortcut { max-width: 140px; }
.wb-shortcut {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; cursor: pointer;
  position: relative;
}
.wb-shortcut:hover .wb-sc-icon {
  border-color: var(--c-web);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(138,108,255,0.25);
}
.wb-sc-icon {
  width: 100%; aspect-ratio: 16/10;
  background: rgba(138,108,255,0.1);
  border: 1.5px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 900; color: var(--paper);
  margin-bottom: 8px;
  background-size: cover; background-position: center;
  overflow: hidden;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.wb-sc-name {
  font-family: 'Inter', sans-serif; font-size: 11px; font-weight: 600;
  color: var(--paper); opacity: 0.7;
  overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; max-width: 100%;
}
.wb-shortcut:hover .wb-sc-name { opacity: 1; }
.wb-sc-fav {
  position: absolute; top: 6px; right: 6px; z-index: 2;
  background: rgba(0,0,0,0.5); border: 0;
  color: rgba(255,255,255,0.3); font-size: 14px;
  cursor: pointer; padding: 3px 4px;
  border-radius: 6px; line-height: 1;
}
.wb-sc-fav:hover { color: var(--c-web); background: rgba(0,0,0,0.7); }
.wb-sc-fav.faved { color: var(--c-web); }

/* Block Breakers fonts */
@font-face {
  font-family: 'Raster Forge';
  src: url('../fonts/RasterForge.ttf') format('truetype');
  font-weight: normal; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Retro Byte';
  src: url('../fonts/RetroByte.ttf') format('truetype');
  font-weight: normal; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Ithaca';
  src: url('../fonts/Ithaca.ttf') format('truetype');
  font-weight: normal; font-style: normal; font-display: swap;
}

/* ===== THEME: BLOCK BREAKERS — Minecraft Launcher ===== */
[data-cat="block"] .cat-app-body {
  background: url('../img/mc/dirt-texture.png') repeat;
  background-size: 64px;
  image-rendering: pixelated;
  padding: 12px !important;
  overflow: hidden;
}
[data-cat="block"] .cat-app-toolbar { display: none; }
[data-cat="block"] .cat-app-title .ctrls span { background: var(--c-block); color: var(--ink); }
.theme-block {
  display: flex !important; flex-direction: column; gap: 0;
  padding: 0 !important;
  font-family: 'Retro Byte', monospace;
  color: #D0D1D4;
  background: #313233;
  box-shadow: inset 2px 2px 0 #5A5B5C, inset -2px -2px 0 #1E1E1F;
  height: 100%; overflow: hidden;
  position: relative;
  scrollbar-color: #2ECC71 #1E1E1F;
}
.theme-block::after {
  content: ''; position: absolute; inset: 0;
  border: 3px solid #2ECC71;
  pointer-events: none; z-index: 50;
}
.theme-block .fav { display: none; }

/* Hero banner row */
.mc-hero {
  display: grid; grid-template-columns: 1fr 1fr;
  flex-shrink: 0; border-bottom: 3px solid #1E1E1F;
  position: relative; z-index: 2;
}
.mc-hero-card {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 12px 18px; min-height: 100px;
  background: #48494A; cursor: pointer;
  transition: filter 0.1s;
  border: 1px solid #2ECC71;
  box-shadow: inset 2px 2px 0 rgba(255,255,255,0.08), inset -2px -2px 0 rgba(0,0,0,0.3);
}
.mc-hero-card:first-child { border-right: 1px solid #2ECC71; }
.mc-hero-card:hover { filter: brightness(1.1); }
.mc-hero-card:hover .mc-btn-green {
  background: #4a9c32;
  box-shadow: inset -2px -2px 0 #1D4D13, inset 2px 2px 0 rgba(79,145,60,0.75);
}
.mc-hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  image-rendering: pixelated; opacity: 1; z-index: 0;
}
.mc-hero-card::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(30,30,31,0.9) 0%, rgba(30,30,31,0.3) 50%, transparent 100%);
  z-index: 1;
}
.mc-hero-content {
  position: relative; z-index: 4;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.mc-hero-icon {
  width: clamp(44px, 3.6vw, 60px); height: clamp(44px, 3.6vw, 60px);
  aspect-ratio: 1 / 1;
  background: #313233; border: 2px solid #1E1E1F;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.mc-hero-icon svg { width: 60% !important; height: 60% !important; }
.mc-hero-text { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.mc-hero-title {
  font-family: 'Raster Forge', 'Press Start 2P', monospace;
  font-size: clamp(20px, 1.9vw, 32px); color: #fff; letter-spacing: -0.5px;
  text-shadow: 2px 2px 0 #000, 0 0 10px rgba(0,0,0,0.5);
  line-height: 1; margin-bottom: 2px;
}
.mc-hero-content .mc-btn-green {
  font-size: clamp(15px, 1.3vw, 22px) !important;
  padding: 12px 26px 16px !important;
}
.mc-hero-title .accent { color: #2ECC71; }
.mc-hero-desc {
  font-size: clamp(15px, 1.2vw, 22px); color: #D0D1D4;
  line-height: 1.05; text-shadow: 1px 1px 0 #000;
}

/* MC buttons (green / stone) */
.mc-btn {
  font-family: 'Raster Forge', 'Press Start 2P', monospace; cursor: pointer;
  border: none; outline: none;
  text-shadow: 2px 2px 0 rgba(0,0,0,0.4);
  transition: background-color 0.05s;
}
.mc-btn-green {
  background: #3C8527; color: #fff;
  border: 3px solid #1E1E1F;
  box-shadow: inset -3px -3px 0 #1D4D13, inset 3px 3px 0 rgba(79,145,60,0.75);
  padding: 8px 18px 12px; letter-spacing: 1px;
}
.mc-btn-green:hover {
  background: #4a9c32;
  box-shadow: inset -2px -2px 0 #1D4D13, inset 2px 2px 0 rgba(79,145,60,0.75);
}
.mc-btn-green:active {
  position: relative; top: 2px;
  box-shadow: inset -1px -1px 0 #1D4D13, inset 1px 1px 0 rgba(79,145,60,0.75);
}
.mc-btn-stone {
  background: #48494A; color: #D0D1D4;
  border: 3px solid #1E1E1F;
  box-shadow: inset -3px -3px 0 #3a3a3b, inset 3px 3px 0 #5A5B5C;
  padding: 8px 18px 12px; letter-spacing: 1px;
}
.mc-btn-stone:hover { background: #555658; }
.mc-btn-stone:active { position: relative; top: 2px; }

/* Tabs */
.mc-tabs {
  display: flex; gap: 0; flex-shrink: 0;
  background: #313233; border-bottom: 3px solid #1E1E1F;
}
.mc-tab {
  font-family: 'Raster Forge', 'Press Start 2P', monospace;
  font-size: clamp(12px, 1.15vw, 20px); color: #8A8B8C;
  padding: clamp(7px, 0.7vw, 13px) clamp(18px, 1.5vw, 28px); cursor: pointer;
  background: transparent; border: none;
  border-right: 2px solid #1E1E1F;
  letter-spacing: 1px; outline: none; position: relative;
  transition: color 0.1s, background 0.1s;
}
.mc-tab:hover { color: #D0D1D4; background: rgba(255,255,255,0.03); }
.mc-tab.active {
  color: #2ECC71; background: #48494A;
  text-shadow: 1px 1px 0 #000, 0 0 8px rgba(46,204,113,0.25);
  box-shadow: inset 0 2px 0 #5A5B5C;
}
.mc-tab.active::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0;
  height: 3px; background: #2ECC71;
  box-shadow: 0 0 8px rgba(46,204,113,0.5);
}

/* Master-detail grid */
.mc-detail {
  flex: 1; display: grid; grid-template-columns: 1fr 380px;
  min-height: 0; overflow: hidden;
}

/* MC scrollbar */
.mc-scroll { scrollbar-color: #2ECC71 #1E1E1F; scrollbar-width: thin; }
.mc-scroll::-webkit-scrollbar { width: 10px; }
.mc-scroll::-webkit-scrollbar-track { background: #1E1E1F; border-left: 2px solid #111; }
.mc-scroll::-webkit-scrollbar-thumb {
  background: #2ECC71; border: 2px solid #1E1E1F;
  box-shadow: inset 1px 1px 0 rgba(255,255,255,0.15);
}
.mc-scroll::-webkit-scrollbar-thumb:hover { background: #4ae08a; }

/* Left: item list */
.mc-list {
  overflow-y: auto; background: #313233;
  border-right: 3px solid #1E1E1F;
  box-shadow: inset -2px 0 0 #5A5B5C;
}
.mc-list-empty {
  padding: 40px 20px; text-align: center;
  font-size: clamp(9px, 0.75vw, 13px); color: #5A5B5C;
}
.mc-item {
  display: flex; align-items: center; gap: 16px;
  padding: 8px 18px;
  border-bottom: 2px solid #1E1E1F;
  cursor: pointer; background: #48494A;
  transition: background 0.05s; position: relative;
}
.mc-item:hover { background: #5A5B5C; }
.mc-item.selected {
  background: #48494A;
  border-left: 4px solid #2ECC71;
  box-shadow: inset 0 0 12px rgba(46,204,113,0.08);
}
.mc-item.selected .mc-item-name {
  color: #2ECC71;
  text-shadow: 0 0 6px rgba(46,204,113,0.3);
}
.mc-item-thumb {
  width: 64px; height: 64px; flex-shrink: 0;
  background-size: cover; background-position: center;
  background-color: #242425;
  border: 2px solid #1E1E1F;
  image-rendering: pixelated;
}
.mc-item-info { flex: 1; min-width: 0; }
.mc-item-name {
  font-family: 'Raster Forge', 'Press Start 2P', monospace;
  font-size: clamp(15px, 1.45vw, 25px); color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-shadow: 1px 1px 0 #000;
}
.mc-item-sub {
  font-size: clamp(15px, 1.3vw, 20px); color: #8A8B8C; margin-top: 6px;
}
.mc-item-mods {
  display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px;
}
.mc-mod {
  font-size: clamp(11px, 0.9vw, 14px); color: #2ECC71;
  background: rgba(46,204,113,0.1);
  padding: 3px 8px;
  border: 1px solid rgba(46,204,113,0.2);
  letter-spacing: 0.5px;
}
.mc-item-dl {
  display: flex; align-items: center; justify-content: center;
  background: #3C8527; color: #fff;
  border: 2px solid #1E1E1F;
  box-shadow: inset -2px -2px 0 #1D4D13, inset 2px 2px 0 rgba(79,145,60,0.75);
  cursor: pointer; padding: 10px 12px 12px;
  font-family: 'Raster Forge', 'Press Start 2P', monospace; font-size: 0;
  flex-shrink: 0;
  text-shadow: 1px 1px 0 rgba(0,0,0,0.4);
  transition: background 0.05s;
}
.mc-item-dl svg { width: 22px; height: 22px; stroke-width: 2.5; }
.mc-item-dl:hover {
  background: #4a9c32;
  box-shadow: inset -1px -1px 0 #1D4D13, inset 1px 1px 0 rgba(79,145,60,0.75);
}
.mc-item-dl:active { position: relative; top: 1px; }

/* Right: preview panel (static) */
.mc-preview {
  display: flex; flex-direction: column;
  background: #313233; overflow: hidden;
}
.mc-preview-empty {
  flex: 1; display: flex; align-items: center; justify-content: center;
  font-size: 8px; color: #5A5B5C; text-align: center; padding: 20px;
}
.mc-prev-img {
  aspect-ratio: 2 / 1; flex-shrink: 0;
  background-size: cover; background-position: center;
  background-color: #242425;
  margin: 0;
  border-bottom: 3px solid #1E1E1F;
}
.mc-prev-meta { padding: 10px 12px 6px; flex: 1; min-height: 0; }
.mc-prev-title {
  font-family: 'Raster Forge', 'Press Start 2P', monospace;
  font-size: clamp(22px, 2.0vw, 36px); color: #fff;
  text-shadow: 1px 1px 0 #000; margin-bottom: 2px; line-height: 1;
}
.mc-prev-info-row { display: flex; gap: 24px; margin-bottom: 6px; }
.mc-prev-label {
  font-size: clamp(11px, 0.9vw, 14px); color: #8A8B8C;
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: 2px;
}
.mc-prev-value { font-size: clamp(13px, 1.1vw, 18px); color: #D0D1D4; }
.mc-prev-exp { color: #f39c12; }
.mc-prev-mods-label {
  font-size: clamp(11px, 0.9vw, 14px); color: #8A8B8C;
  text-transform: uppercase; letter-spacing: 1px;
  margin-top: 6px; margin-bottom: 4px;
}
.mc-prev-mods { display: flex; flex-wrap: wrap; gap: 6px; }
.mc-prev-mods .mc-mod { font-size: clamp(11px, 0.9vw, 14px); padding: 3px 8px; }
.mc-prev-desc {
  font-size: clamp(13px, 1.1vw, 18px); color: #8A8B8C; line-height: 1.15;
  margin-top: 6px; padding-top: 4px;
  border-top: 2px solid #1E1E1F;
}
.mc-prev-actions {
  padding: 10px 10px 4px;
  display: flex; gap: 8px; flex-shrink: 0;
}
.mc-prev-actions .mc-btn {
  flex: 1; text-align: center; line-height: 1; white-space: nowrap;
  font-size: clamp(14px, 1.25vw, 20px) !important;
  padding: 10px 12px 14px !important;
}
.mc-prev-actions .mc-btn svg {
  width: clamp(14px, 1.2vw, 20px) !important;
  height: clamp(14px, 1.2vw, 20px) !important;
}

/* Add-ons grid */
.mc-addon-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px; padding: 14px;
}
.mc-addon-card {
  background: #48494A; border: 2px solid #1E1E1F;
  box-shadow: inset -2px -2px 0 #3a3a3b, inset 2px 2px 0 #5A5B5C;
  padding: 12px; cursor: pointer; transition: background 0.05s;
}
.mc-addon-card:hover { background: #5A5B5C; }
.mc-addon-icon { font-size: 24px; margin-bottom: 8px; }
.mc-addon-name {
  font-family: 'Raster Forge', 'Press Start 2P', monospace;
  font-size: clamp(11px, 0.95vw, 16px); color: #fff;
  text-shadow: 1px 1px 0 #000; margin-bottom: 4px;
}
.mc-addon-desc { font-size: clamp(8px, 0.7vw, 12px); color: #8A8B8C; line-height: 1.5; }

/* Links list */
.mc-links-list {
  padding: 14px; display: flex; flex-direction: column; gap: 6px;
}
.mc-link-item {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 14px; background: #48494A;
  border: 2px solid #1E1E1F;
  box-shadow: inset -2px -2px 0 #3a3a3b, inset 2px 2px 0 #5A5B5C;
  cursor: pointer; text-decoration: none;
  transition: background 0.05s;
}
.mc-link-item:hover { background: #5A5B5C; }
.mc-link-icon {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: #313233; border: 2px solid #1E1E1F;
  box-shadow: inset 0px 3px 0px #1a1a1b; flex-shrink: 0;
}
.mc-link-name {
  font-family: 'Raster Forge', 'Press Start 2P', monospace;
  font-size: clamp(11px, 0.95vw, 16px); color: #fff; text-shadow: 1px 1px 0 #000;
}
.mc-link-desc { font-size: clamp(8px, 0.7vw, 12px); color: #8A8B8C; margin-top: 3px; }
.mc-link-arrow { margin-left: auto; color: #8A8B8C; }

/* Tab content visibility */
.mc-tab-content { display: none; flex: 1; min-height: 0; overflow: hidden; }
.mc-tab-content.active { display: flex; }
.mc-tab-worlds.active { display: grid; grid-template-columns: 1fr 380px; }
.mc-tab-addons.active, .mc-tab-links.active { display: block; overflow-y: auto; flex: 1; }

/* Footer strip */
.mc-footer {
  display: flex; align-items: center; justify-content: center;
  gap: 24px; padding: 6px 28px;
  background: #242425;
  border-top: 3px solid #1E1E1F;
  box-shadow: inset 0 2px 0 #3a3a3b;
  flex-shrink: 0; font-size: clamp(14px, 1.3vw, 22px); color: #8A8B8C;
}
.mc-footer span { display: inline-flex; align-items: center; gap: 6px; line-height: 1; }
.mc-footer svg {
  width: clamp(18px, 1.5vw, 26px) !important;
  height: clamp(18px, 1.5vw, 26px) !important;
  vertical-align: middle !important;
}
.mc-footer b { color: #2ECC71; }
.mc-footer-sep { color: #2ECC71; }
