:root {
  --desktop: #10251b;
  --desktop-light: #1b3829;
  --forum-cream: #f4f4ee;
  --forum-gray: #e7e7e7;
  --forum-line: #a2a69a;
  --green-dark: #003625;
  --green-mid: #006a43;
  --green: #009e4f;
  --accent: #c6ff00;
  --panel-surface: #c5c5c0;
  --link: #004934;
  --taskbar-h: 42px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  color: #111;
  background: var(--desktop);
  font-family: "Pixelated MS Sans Serif", Arial, sans-serif;
  font-size: 12px;
}

button,
input,
table,
textarea,
select {
  font-family: inherit;
}

a {
  color: var(--link);
}

.desktop {
  position: relative;
  width: 100%;
  height: calc(100dvh - var(--taskbar-h));
  overflow: hidden;
  background:
    linear-gradient(rgba(0, 0, 0, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.16) 1px, transparent 1px),
    radial-gradient(circle at 72% 30%, rgba(37, 126, 78, 0.2), transparent 34%),
    var(--desktop);
  background-size: 4px 4px, 4px 4px, auto, auto;
}

.desktop::after {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(transparent 50%, rgba(0, 0, 0, 0.08) 50%);
  background-size: 100% 3px;
  content: "";
  opacity: 0.4;
}

.wallpaper-mark {
  position: absolute;
  right: 4vw;
  bottom: 6vh;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 18px;
  color: rgba(187, 255, 211, 0.16);
  font-size: clamp(24px, 3.3vw, 54px);
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: 0.82;
}

.wallpaper-mark img {
  width: clamp(78px, 10vw, 150px);
  height: auto;
  opacity: 0.2;
}

.desktop-icons {
  position: absolute;
  top: 16px;
  left: 12px;
  z-index: 3;
  display: grid;
  width: 82px;
  gap: 14px;
}

.desktop-icon {
  display: flex;
  width: 82px;
  min-height: 72px;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  padding: 2px;
  border: 1px solid transparent;
  color: #fff;
  background: transparent;
  box-shadow: none;
  font-size: 11px;
  line-height: 1.12;
  text-align: center;
  text-shadow: 1px 1px #000;
  cursor: default;
}

.desktop-icon:hover,
.desktop-icon:focus-visible {
  border: 1px dotted #fff;
  background: rgba(0, 97, 58, 0.38);
  outline: 0;
}

.desktop-icon:active {
  padding: 2px;
}

.icon-tile {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 2px outset #d5d5d5;
  color: #000;
  background: #d9d9d9;
  font-size: 10px;
  font-weight: 700;
  text-shadow: none;
}

.icon-tile img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.icon-nft {
  color: #061a0f;
  background: var(--accent);
}

.icon-file {
  color: var(--green-dark);
  background: #fffef2;
}

.icon-disk {
  color: var(--accent);
  background: #111;
}

.icon-link {
  color: #fff;
  background: var(--green-mid);
  font-size: 22px;
}

.app-window {
  position: absolute;
  z-index: 5;
  margin: 0;
}

.app-window.is-active {
  z-index: 20;
}

.app-window.is-maximized {
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  transform: none !important;
}

.app-window.is-maximized .window-body,
.app-window.is-maximized .forum-shell {
  max-height: none;
}

.window-resizer {
  position: absolute;
  right: 3px;
  bottom: 3px;
  z-index: 4;
  width: 14px;
  height: 14px;
  cursor: nwse-resize;
  background: repeating-linear-gradient(135deg, transparent 0 3px, #555 3px 5px);
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
}

.title-bar {
  background: linear-gradient(90deg, var(--green-dark), var(--green-mid));
}

.app-window:not(.is-active) > .title-bar {
  background: linear-gradient(90deg, #666, #999);
}

.title-bar[data-drag-handle] {
  cursor: default;
  touch-action: none;
}

.forum-window {
  top: 14px;
  right: 18px;
  bottom: 12px;
  left: 108px;
  display: flex;
  min-width: 720px;
  flex-direction: column;
}

.forum-shell {
  min-height: 0;
  flex: 1;
  overflow: auto;
  padding: 8px;
  background: #d5d5d5;
  scrollbar-color: #808080 #dfdfdf;
}

.forum-header {
  display: flex;
  min-height: 88px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 12px;
  border: 1px solid #7b7f77;
  border-bottom: 3px solid var(--accent);
  background: var(--forum-cream);
}

.forum-brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.forum-brand img {
  width: 66px;
  height: 66px;
  object-fit: contain;
}

.forum-brand p,
.forum-brand span,
.network-box p,
.network-box small {
  margin: 0;
}

.forum-brand p {
  color: #59635c;
  font-size: 10px;
}

.forum-brand h1 {
  margin: 2px 0 3px;
  color: var(--green-dark);
  font-family: Tahoma, Verdana, "MS Sans Serif", sans-serif;
  font-size: clamp(24px, 2.15vw, 34px);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 1;
}

.forum-brand span {
  color: #4e544e;
}

.network-box {
  min-width: 196px;
  padding: 8px 10px;
  border: 2px inset #ddd;
  background: #f1f1e7;
  text-align: right;
}

.network-box p {
  font-size: 10px;
}

.network-box strong,
.network-box small {
  display: block;
}

.network-box strong {
  margin: 5px 0 3px;
  color: var(--green-dark);
}

.network-box small {
  color: #666;
}

.wallet-button {
  width: 100%;
  margin-top: 7px;
  color: #101510;
  background: var(--accent);
  font-weight: 700;
  white-space: nowrap;
}

.wallet-button:focus-visible {
  outline: 1px dotted #000;
  outline-offset: -4px;
}

.wallet-button.is-connected {
  background: var(--panel-surface);
  color: var(--green-dark);
  font-weight: 700;
}

.wallet-body {
  padding: 14px;
}

.wallet-provider-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 10px 0;
  max-height: 220px;
  overflow-y: auto;
}

.wallet-provider-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  text-align: left;
}

.wallet-provider-item img,
.wallet-provider-item .wallet-provider-fallback-icon {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  object-fit: contain;
}

.wallet-provider-fallback-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--green-dark);
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
}

.wallet-provider-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wallet-empty-note {
  color: #666;
  font-size: 11px;
}

.wallet-status-note {
  min-height: 14px;
  font-size: 11px;
  color: var(--green-dark);
}

.wallet-status-note.is-error {
  color: #a3241a;
}

.wallet-network-warning {
  margin-top: 12px;
  padding: 8px 10px;
  border: 2px solid #a3241a;
  background: #fbe6e2;
}

.wallet-network-warning p {
  margin: 0 0 6px;
  font-size: 11px;
  color: #a3241a;
}

.properties-list dd {
  overflow-wrap: anywhere;
}

.online-light {
  display: inline-block;
  width: 8px;
  height: 8px;
  border: 1px solid #004d24;
  background: var(--accent);
  box-shadow: 1px 1px 0 #647d4d;
}

.system-notice {
  margin-top: 4px;
  padding: 5px 10px;
  border-right: 1px solid #aaa;
  border-bottom: 1px solid #aaa;
  border-left: 1px solid #aaa;
  background: #efefe9;
  font-size: 11px;
}

.system-notice b {
  color: var(--green-mid);
}

.forum-layout {
  display: grid;
  min-width: 830px;
  margin-top: 7px;
  grid-template-columns: 190px minmax(430px, 1fr) 210px;
  align-items: start;
  gap: 8px;
}

.forum-sidebar,
.forum-main {
  display: grid;
  gap: 8px;
}

.forum-panel,
.broadcast-panel,
.topics-panel {
  border: 1px solid var(--forum-line);
  background: var(--forum-cream);
}

.forum-panel h2,
.panel-heading {
  margin: 0;
  padding: 7px 8px;
  border-bottom: 1px solid #8b8f87;
  color: #000;
  background: var(--panel-surface);
  font-size: 12px;
}

.forum-panel h2 {
  font-weight: 700;
}

.panel-link {
  display: grid;
  width: 100%;
  min-height: 44px;
  grid-template-columns: 24px 1fr;
  align-items: center;
  gap: 4px;
  padding: 5px 6px;
  border: 0;
  border-bottom: 1px dotted #afb2aa;
  background: transparent;
  box-shadow: none;
  text-align: left;
}

.panel-link:hover,
.panel-link:focus-visible {
  color: #fff;
  background: var(--green-dark);
  outline: 0;
}

.panel-link.is-current {
  color: #101510;
  background: var(--accent);
  outline: 0;
}

.panel-link > span:first-child {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border: 1px solid #555;
  color: #000;
  background: #d8d8d3;
  font-weight: 700;
}

.panel-link b,
.panel-link small {
  display: block;
}

.panel-link small {
  margin-top: 2px;
  color: #666;
  font-size: 9px;
}

.panel-link:hover small,
.panel-link:focus-visible small {
  color: #e8e8e3;
}

.panel-link.is-current small {
  color: #263000;
}

.panel-link.is-current > span:first-child {
  color: var(--accent);
  background: #101510;
}

.users-panel dl,
.stats-panel dl {
  margin: 0;
}

.users-panel dl div,
.stats-panel dl div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  border-bottom: 1px dotted #c2c2b8;
}

.users-panel dt,
.users-panel dd,
.stats-panel dt,
.stats-panel dd {
  margin: 0;
}

.users-panel dt {
  color: var(--link);
  text-decoration: underline;
}

.users-panel dd,
.stats-panel dt {
  color: #666;
  font-size: 10px;
}

.users-panel dd.online {
  color: var(--green-mid);
  font-weight: 700;
}

.quick-panel a {
  display: block;
  padding: 6px 8px;
  border-bottom: 1px dotted #bbb;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.panel-heading span {
  color: #465149;
  font-size: 9px;
  font-weight: 400;
}

.panel-heading-cool {
  color: #fff;
  background: var(--green-mid);
}

.panel-heading-cool span {
  color: #e6e6e1;
}

.forum-post {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
}

.post-user {
  padding: 8px;
  border-right: 1px solid #c2c2ba;
  background: #f2f2e8;
  text-align: center;
}

.post-user img {
  display: block;
  width: 48px;
  height: 48px;
  margin: 0 auto 5px;
}

.post-user a,
.post-user span {
  display: block;
}

.post-user a {
  font-weight: 700;
}

.post-user span {
  margin-top: 3px;
  color: #666;
  font-size: 9px;
}

.post-body {
  min-width: 0;
  padding: 7px 8px 9px;
}

.post-body p {
  margin: 8px 0;
  line-height: 1.35;
}

.post-meta {
  padding-bottom: 5px;
  border-bottom: 1px dotted #bbb;
  color: #656b65;
  font-size: 9px;
}

.transmission-media {
  margin: 6px 0 0;
  border: 2px inset #ddd;
  background: #000;
}

.transmission-media video {
  display: block;
  width: 100%;
  max-height: 250px;
  object-fit: cover;
}

.transmission-media figcaption {
  padding: 4px 6px;
  color: var(--accent);
  background: #090d0a;
  font-family: "Courier New", monospace;
  font-size: 9px;
}

.broadcast-actions {
  display: flex;
  justify-content: flex-end;
  gap: 5px;
  padding: 6px 8px;
  border-top: 1px solid #c2c2ba;
  background: #e7e7df;
}

.topic-row {
  display: grid;
  width: 100%;
  min-height: 48px;
  grid-template-columns: 44px minmax(180px, 1fr) 80px 58px;
  align-items: center;
  gap: 8px;
  padding: 6px 7px;
  border: 0;
  border-bottom: 1px solid #c9cbc4;
  color: #111;
  background: #fbfbf2;
  box-shadow: none;
  text-align: left;
}

.topic-row:nth-child(odd) {
  background: #ebebe7;
}

.topic-row:not(.topic-header):hover,
.topic-row:not(.topic-header):focus-visible {
  background: #eff5dc;
  outline: 1px dotted #000;
  outline-offset: -3px;
}

.topic-row b,
.topic-row small {
  display: block;
}

.topic-row b {
  color: var(--link);
  text-decoration: underline;
}

.topic-row small {
  margin-top: 3px;
  color: #626862;
  font-size: 9px;
}

.topic-header {
  min-height: 26px;
  color: #111;
  background: var(--accent) !important;
  font-weight: 700;
}

.topic-icon {
  display: inline-block;
  width: fit-content;
  padding: 2px 4px;
  border: 1px solid #777;
  color: #111;
  background: #ddd;
  font-size: 8px;
  font-weight: 700;
}

.topic-icon.new {
  color: #fff;
  background: var(--green-dark);
}

.topic-icon.hot {
  color: #111;
  background: var(--accent);
}

.topic-icon.lock {
  background: #ddd;
}

.launch-panel ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.launch-panel li {
  position: relative;
  padding: 8px 44px 8px 8px;
  border-bottom: 1px dotted #bbb;
}

.launch-panel time,
.launch-panel b {
  display: block;
}

.launch-panel time {
  color: var(--green-mid);
  font-weight: 700;
}

.launch-panel b {
  margin-top: 3px;
  font-size: 10px;
}

.launch-panel > button,
.stats-panel > button {
  display: block;
  margin: 8px auto;
}

.queue-status {
  position: absolute;
  top: 10px;
  right: 6px;
  padding: 2px 3px;
  border: 1px solid #777;
  background: #ddd;
  font-size: 8px;
  font-weight: 700;
}

.queue-status.is-next,
.queue-status.is-live {
  background: var(--accent);
}

.stats-panel dd {
  font-weight: 700;
}

.market-panel h2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.market-panel h2 small {
  padding: 2px 3px;
  color: var(--accent);
  background: var(--green-dark);
  font-size: 8px;
}

.market-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.market-grid div {
  min-width: 0;
  padding: 7px 8px;
  border-right: 1px dotted #aaa;
  border-bottom: 1px dotted #aaa;
}

.market-grid div:nth-child(even) {
  border-right: 0;
}

.market-grid span,
.market-grid strong {
  display: block;
}

.market-grid span {
  color: #666;
  font-size: 9px;
}

.market-grid strong {
  margin-top: 3px;
  color: var(--green-dark);
  font-family: "Courier New", monospace;
  font-size: 13px;
}

.market-note {
  margin: 0;
  padding: 6px 8px;
  color: #555;
  font-size: 9px;
  line-height: 1.3;
}

.terminal-output {
  min-height: 104px;
  padding: 8px;
  color: var(--accent);
  background: #06110a;
  font-family: "Courier New", monospace;
  font-size: 10px;
}

.terminal-output p {
  margin: 0 0 5px;
}

.cursor {
  animation: blink 800ms steps(1) infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.forum-window > .status-bar,
.app-window > .status-bar {
  flex: 0 0 auto;
}

.dialog-window {
  top: 12vh;
  left: 32vw;
  width: min(620px, 62vw);
}

.document-body {
  max-height: 64vh;
  overflow: auto;
  padding: 16px;
  background: #d5d5d5;
}

.document-logo {
  float: left;
  width: 100px;
  height: 100px;
  margin: 0 18px 12px 0;
}

.document-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.document-body h2 {
  margin: 0 0 14px;
  color: var(--green-dark);
  font-family: Tahoma, Verdana, "MS Sans Serif", sans-serif;
  font-size: 22px;
  letter-spacing: -0.05em;
  line-height: 0.95;
}

.document-body p {
  line-height: 1.45;
}

.document-body fieldset {
  clear: both;
  margin-top: 20px;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 14px;
}

.gallery-window {
  top: 7vh;
  left: 18vw;
  width: min(900px, 76vw);
  height: min(690px, 82vh);
  display: flex;
  flex-direction: column;
}

.gallery-toolbar {
  display: flex;
  min-height: 36px;
  align-items: center;
  gap: 5px;
  padding: 5px;
  border-bottom: 1px solid #808080;
  background: #c0c0c0;
}

.gallery-toolbar span {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  padding: 4px 7px;
  border: 2px inset #ddd;
  background: #fff;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.gallery-body {
  display: grid;
  min-height: 0;
  flex: 1;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 4px;
  margin: 4px;
  padding: 0;
  overflow: hidden;
}

.gallery-tree {
  padding: 6px 4px;
  border: 2px inset #ddd;
  background: #fff;
}

.tree-item {
  display: block;
  width: 100%;
  min-height: 25px;
  padding: 4px 6px;
  border: 0;
  background: transparent;
  box-shadow: none;
  text-align: left;
}

.tree-item:hover,
.tree-item:focus-visible,
.tree-item.is-selected {
  color: #fff;
  background: var(--green-dark);
  outline: 0;
}

.gallery-stage {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-rows: minmax(240px, 1fr) 170px;
  gap: 4px;
}

.gallery-viewer {
  position: relative;
  min-height: 0;
  overflow: hidden;
  border: 2px inset #ddd;
  background: #020603;
}

.gallery-viewer video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.gallery-file-info {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 6px 8px;
  color: var(--accent);
  background: rgba(0, 23, 12, 0.86);
  font-family: "Courier New", monospace;
  font-size: 10px;
}

.gallery-files {
  display: grid;
  grid-template-columns: repeat(5, minmax(84px, 1fr));
  gap: 2px;
  overflow: auto;
  padding: 4px;
  border: 2px inset #ddd;
  background: #fff;
}

.gallery-files button {
  display: flex;
  min-width: 0;
  min-height: 67px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid transparent;
  background: transparent;
  box-shadow: none;
  font-size: 9px;
}

.gallery-files button:hover,
.gallery-files button:focus-visible,
.gallery-files button.is-selected {
  border: 1px dotted #111;
  color: #fff;
  background: var(--green-mid);
  outline: 0;
}

.gallery-files button[hidden] {
  display: none;
}

.gallery-files button span {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border: 2px outset #ddd;
  color: #000;
  background: var(--accent);
  font-size: 9px;
  font-weight: 700;
}

.roadmap-window {
  top: 9vh;
  left: 25vw;
  width: min(780px, 70vw);
  height: min(610px, 78vh);
  display: flex;
  flex-direction: column;
}

.notepad-menu {
  display: flex;
  gap: 18px;
  padding: 4px 8px;
  background: #c0c0c0;
}

.roadmap-body {
  min-height: 0;
  flex: 1;
  margin: 3px;
  padding: 0;
  overflow: auto;
  border: 2px inset #ddd;
  background: #fff;
}

.notepad-sheet {
  padding: 20px;
  font-family: "Courier New", monospace;
  font-size: 12px;
}

.notepad-sheet > p:first-child {
  padding-bottom: 10px;
  border-bottom: 1px dashed #555;
  font-weight: 700;
}

.notepad-sheet table {
  width: 100%;
  border-collapse: collapse;
}

.notepad-sheet th,
.notepad-sheet td {
  padding: 12px 8px;
  border-bottom: 1px dashed #777;
  vertical-align: top;
  text-align: left;
  white-space: normal;
  overflow-wrap: break-word;
}

.notepad-sheet th:first-child,
.notepad-sheet td:first-child {
  width: 108px;
  color: var(--green-dark);
  font-weight: 700;
}

.notepad-sheet th:last-child,
.notepad-sheet td:last-child {
  width: 68px;
}

.file-status {
  display: inline-block;
  padding: 2px 4px;
  border: 1px solid #333;
  font-size: 9px;
  font-weight: 700;
}

.file-status.next {
  background: var(--accent);
}

.file-status.dev {
  background: var(--panel-surface);
}

.file-status.open {
  background: #ddd;
}

.notepad-note {
  margin-top: 20px;
  padding: 8px;
  border: 1px dashed #555;
  background: #efefe9;
}

.collection-window {
  top: 15vh;
  left: 34vw;
  width: min(520px, 58vw);
}

.properties-body {
  padding: 10px;
}

.properties-body menu {
  margin-bottom: -2px;
}

.properties-body [role="tab"] button {
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.properties-panel {
  width: 100%;
}

.properties-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #888;
}

.properties-heading h2,
.properties-heading p {
  margin: 0;
}

.properties-heading h2 {
  margin-bottom: 4px;
  font-size: 16px;
}

.properties-list {
  margin: 12px 0;
}

.properties-list div {
  display: grid;
  grid-template-columns: 135px 1fr;
  gap: 8px;
  padding: 4px 0;
}

.properties-list dt,
.properties-list dd {
  margin: 0;
}

.properties-list dd {
  font-weight: 700;
}

.founder-window {
  top: 18vh;
  left: 30vw;
  width: min(660px, 64vw);
}

.vault-window {
  top: 10vh;
  left: 22vw;
  width: min(820px, 74vw);
  height: min(600px, 78vh);
  display: flex;
  flex-direction: column;
}

.vault-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
}

.vault-connect-prompt {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.vault-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.vault-tile {
  border: 2px solid #808080;
  background: var(--forum-gray);
  padding: 6px;
  cursor: pointer;
}

.vault-tile:hover,
.vault-tile:focus-visible {
  border-color: var(--green-mid);
}

.vault-tile {
  position: relative;
}

.vault-tile.is-legendary {
  border: 2px solid #b8860b;
  background: linear-gradient(135deg, #fff6d8, #ffe08a);
  box-shadow: 0 0 12px rgba(255, 195, 0, 0.7);
}

.vault-tile.is-legendary:hover,
.vault-tile.is-legendary:focus-visible {
  border-color: #8a5a00;
}

.vault-legendary-badge {
  position: absolute;
  top: 4px;
  left: 4px;
  z-index: 1;
  padding: 1px 6px;
  border: 1px solid #8a5a00;
  color: #6b4400;
  background: linear-gradient(135deg, #fff6d8, #ffe08a);
  box-shadow: 0 0 6px rgba(255, 195, 0, 0.8);
  font-size: 9px;
  font-weight: 700;
}

.vault-tile video {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  border: 1px solid #808080;
  background: #000;
  pointer-events: none;
}

.vault-tile-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  margin-top: 6px;
}

.vault-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border: 1px solid #808080;
}

.vault-badge.is-hidden {
  background: #e7e7e7;
  color: #555;
}

.vault-badge.is-revealed {
  background: var(--accent);
  color: var(--green-dark);
}

.vault-empty-note {
  color: #666;
  font-size: 11px;
}

.vault-status-note {
  min-height: 14px;
  font-size: 11px;
  color: var(--green-dark);
}

.vault-status-note.is-error {
  color: #a3241a;
}

.vault-viewer-window {
  top: 8vh;
  left: 14vw;
  width: min(560px, 94vw);
  height: min(640px, 82vh);
  display: flex;
  flex-direction: column;
}

.vault-viewer-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 10px;
  gap: 10px;
  overflow-y: auto;
}

.vault-viewer-main {
  flex: 0 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vault-viewer-stage {
  position: relative;
  flex: none;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #000;
  border: 1px solid #808080;
}

.vault-viewer-traits {
  width: 100%;
  flex: 0 0 auto;
  max-height: min(220px, 28vh);
  display: flex;
  flex-direction: column;
  border: 2px inset #ddd;
  background: #fff;
  padding: 8px;
  overflow-y: auto;
}

.vault-viewer-traits-title {
  font-weight: 700;
  margin-bottom: 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid #808080;
}

.vault-viewer-traits-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.vault-trait {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 8px;
  border: 1px solid #808080;
  background: #efefef;
}

.vault-trait-type {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #555;
}

.vault-trait-value {
  font-weight: 700;
}

.vault-trait.is-legendary {
  border: 1px solid #b8860b;
  background: linear-gradient(135deg, #fff6d8, #ffe08a);
  box-shadow: 0 0 10px rgba(255, 195, 0, 0.7), inset 0 0 6px rgba(255, 255, 255, 0.6);
}

.vault-trait.is-legendary .vault-trait-type {
  color: #8a5a00;
  font-weight: 700;
}

.vault-trait.is-legendary .vault-trait-value {
  color: #6b4400;
}

.vault-viewer-traits-empty {
  margin: 4px 0 0;
  font-size: 12px;
  color: #666;
}

.vault-viewer-video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: #000;
}

.vault-viewer-reveal-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
}

.vault-viewer-reveal-overlay button {
  padding: 10px 28px;
  font-size: 14px;
  font-weight: 700;
}

.vault-viewer-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 36px;
  padding: 5px;
  border-top: 1px solid #808080;
  background: #c0c0c0;
}

.vault-viewer-toolbar span {
  min-width: 64px;
  text-align: center;
  padding: 4px 7px;
  border: 2px inset #ddd;
  background: #fff;
}

.vault-viewer-toolbar button:disabled {
  opacity: 0.5;
  cursor: default;
}

/* ── Staking (local test deployment only) ──────────────────────────── */

.vault-tickets-note {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 700;
  color: var(--green-dark);
}

.vault-tile-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 4px;
}

.stake-button,
.unstake-button {
  padding: 2px 8px;
  font-size: 10px;
}

.unstake-button:disabled {
  opacity: 0.6;
}

.vault-lock-badge {
  font-size: 9px;
  color: #666;
}

.wallet-local-dev-row {
  margin-top: 12px;
  padding: 8px 10px;
  border: 2px solid var(--green-mid);
  background: #eaf5ee;
}

.wallet-local-dev-row p {
  margin: 0 0 6px;
  font-size: 11px;
  color: var(--green-dark);
}

.stake-tier-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 10px 0;
}

/* ── Raffles (local test deployment only) ──────────────────────────── */

.raffles-window {
  top: 10vh;
  left: 20vw;
  width: min(760px, 76vw);
  height: min(560px, 78vh);
  display: flex;
  flex-direction: column;
}

.raffles-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
}

.raffles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
}

.raffle-tile {
  border: 2px solid #808080;
  background: var(--forum-gray);
  padding: 6px;
  cursor: pointer;
}

.raffle-tile:hover,
.raffle-tile:focus-visible {
  border-color: var(--green-mid);
}

.raffle-tile-media img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  border: 1px solid #808080;
  background: #000;
}

.raffle-tile-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  margin-top: 6px;
}

.raffle-badge {
  align-self: flex-start;
  padding: 1px 6px;
  border: 1px solid #808080;
  font-size: 10px;
  font-weight: 700;
}

.raffle-badge.is-open {
  background: var(--accent);
  color: var(--green-dark);
}

.raffle-badge.is-awaiting {
  background: #fff3c4;
  color: #7a5b00;
}

.raffle-badge.is-drawn {
  background: #e7e7e7;
  color: #555;
}

.raffle-badge.is-void {
  background: #fbe6e2;
  color: #a3241a;
}

.raffle-prize-badge {
  background: #e2ecfb;
  color: #1a4b9c;
}

.raffle-viewer-media img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid #808080;
  background: #000;
}

.raffle-viewer-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.raffle-viewer-title {
  font-size: 15px;
}

.raffle-viewer-description {
  margin: 0;
  line-height: 1.45;
  white-space: pre-line;
}

.raffle-viewer-links a {
  margin-right: 10px;
  font-size: 12px;
}

.raffle-viewer-eta {
  margin: 4px 0 0;
  font-size: 11px;
  color: #666;
}

.raffle-viewer-winners {
  margin-top: 10px;
  font-size: 12px;
}

.raffle-viewer-winners ul {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  max-height: 140px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 4px;
}

.raffle-viewer-winners li {
  font-family: monospace;
  font-size: 11px;
  color: #444;
}

.raffle-enter-button {
  padding: 8px 22px;
  font-weight: 700;
}

.raffle-tasks-window {
  top: 16vh;
  left: 30vw;
  width: min(380px, 92vw);
}

.raffle-tasks-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
}

.raffle-tasks-intro {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
}

.raffle-tasks-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.raffle-task {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
}

.raffle-task.is-done .raffle-task-label {
  color: #2a7a2a;
}

.raffle-task-button {
  flex-shrink: 0;
  min-width: 74px;
  font-size: 11px;
  padding: 2px 8px;
}

.raffle-wallet-link {
  margin: 0;
}

.raffle-wallet-link-label {
  margin: 0 0 8px;
  font-size: 12px;
  line-height: 1.4;
}

.raffle-wallet-link-input {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 4px;
}

.profile-body {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 18px;
  padding: 14px;
}

.profile-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px;
  border: 2px inset #ddd;
  background: #eee;
  text-align: center;
}

.profile-card img {
  width: 110px;
  height: 110px;
  object-fit: contain;
}

.profile-card strong {
  font-size: 14px;
}

.profile-card span {
  color: #666;
  font-size: 10px;
}

.profile-copy h2 {
  margin: 0 0 10px;
  color: var(--green-dark);
  font-size: 18px;
}

.profile-copy p {
  line-height: 1.45;
}

.start-menu {
  position: absolute;
  bottom: 0;
  left: 2px;
  z-index: 9999;
  display: grid;
  width: 260px;
  min-height: 260px;
  grid-template-columns: 34px 1fr;
  padding: 2px;
}

.start-menu[hidden] {
  display: none;
}

.start-rail {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 8px 6px;
  color: var(--accent);
  background: var(--green-dark);
  font-weight: 700;
  letter-spacing: 0.08em;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.start-items {
  display: flex;
  flex-direction: column;
  padding: 4px;
}

.start-items button,
.start-items a {
  display: grid;
  min-height: 50px;
  grid-template-columns: 38px 1fr;
  align-items: center;
  gap: 8px;
  padding: 5px;
  border: 0;
  color: #111;
  background: transparent;
  box-shadow: none;
  text-align: left;
  text-decoration: none;
}

.start-items button:hover,
.start-items button:focus-visible,
.start-items a:hover,
.start-items a:focus-visible {
  color: #fff;
  background: var(--green-dark);
  outline: 0;
}

.start-items span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 2px outset #ddd;
  color: #000;
  background: var(--accent);
  font-size: 9px;
  font-weight: 700;
}

.start-items hr {
  width: 100%;
  border-top: 1px solid #777;
  border-bottom: 1px solid #fff;
}

.raffle-notify-balloon {
  position: fixed;
  right: 48px;
  top: 16px;
  z-index: 250;
  max-width: 340px;
  background: #ffffe1;
  border: 1px solid #808080;
  box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.4);
  padding: 16px 26px 16px 18px;
  font-size: 16px;
  cursor: pointer;
  animation: raffle-notify-in 0.2s ease-out;
}

.raffle-notify-balloon p {
  margin: 0;
  color: #111;
  font-weight: 600;
  line-height: 1.4;
}

.raffle-notify-close {
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  position: absolute;
  top: 3px;
  right: 3px;
  width: 12px;
  height: 12px;
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  font-size: 9px;
  line-height: 1;
  padding: 0;
  margin: 0;
  cursor: pointer;
  color: #555;
}

@keyframes raffle-notify-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.taskbar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 200;
  display: flex;
  height: var(--taskbar-h);
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-top: 2px solid #fff;
  background: #c0c0c0;
}

.start-button {
  display: flex;
  min-width: 78px;
  height: 32px;
  align-items: center;
  gap: 5px;
  padding: 2px 6px;
  font-size: 12px;
}

.theme-button {
  display: flex;
  min-width: 92px;
  height: 32px;
  align-items: center;
  gap: 6px;
  padding: 2px 7px;
  white-space: nowrap;
}

.theme-button > span {
  display: block;
  width: 12px;
  height: 12px;
  border: 1px solid #263000;
  background: var(--accent);
}

.theme-button[aria-pressed="true"] {
  color: var(--accent);
  background: #090b09;
}

.start-button[aria-expanded="true"] {
  box-shadow: inset -1px -1px #fff, inset 1px 1px #0a0a0a, inset -2px -2px #dfdfdf, inset 2px 2px grey;
}

.start-button img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.task-buttons {
  display: flex;
  min-width: 0;
  flex: 1;
  gap: 3px;
  overflow: hidden;
}

.task-button {
  display: flex;
  width: min(230px, 21vw);
  min-width: 120px;
  height: 32px;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.task-button.is-active {
  font-weight: 700;
  box-shadow: inset -1px -1px #fff, inset 1px 1px #0a0a0a, inset -2px -2px #dfdfdf, inset 2px 2px grey;
}

.task-button-icon {
  display: grid;
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--accent);
  background: #111;
  font-size: 7px;
}

.task-button-label {
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-buttons.is-compact .task-button {
  width: auto;
  min-width: 0;
  padding: 0 8px;
  justify-content: center;
}

.task-buttons.is-compact .task-button-label {
  display: none;
}

.task-status {
  display: flex;
  min-width: 86px;
  height: 32px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 8px;
  border: 2px inset #ddd;
}

.task-led {
  width: 8px;
  height: 8px;
  border: 1px solid #315a42;
  background: var(--accent);
}

body[data-theme="acid"] {
  --desktop: #000;
  --desktop-light: #070707;
  --forum-cream: #080808;
  --forum-gray: #101010;
  --forum-line: #364700;
  --green-dark: #050505;
  --green-mid: #111900;
  --green: #c6ff00;
  --panel-surface: #111;
  --link: #c6ff00;
  color: #c6ff00;
  background: #000;
}

body[data-theme="acid"] .desktop {
  background:
    linear-gradient(rgba(198, 255, 0, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(198, 255, 0, 0.055) 1px, transparent 1px),
    radial-gradient(circle at 72% 30%, rgba(198, 255, 0, 0.08), transparent 34%),
    #000;
  background-size: 4px 4px, 4px 4px, auto, auto;
}

body[data-theme="acid"] .window,
body[data-theme="acid"] .app-window,
body[data-theme="acid"] .start-menu {
  background: #090909;
  box-shadow: inset -1px -1px #000, inset 1px 1px var(--accent), inset -2px -2px #1c1c1c, inset 2px 2px #344400;
}

body[data-theme="acid"] .title-bar {
  border-bottom: 1px solid var(--accent);
  background: linear-gradient(90deg, #020202, #182100);
}

body[data-theme="acid"] .app-window:not(.is-active) > .title-bar {
  background: linear-gradient(90deg, #171717, #292929);
}

body[data-theme="acid"] .title-bar-text {
  color: var(--accent);
}

body[data-theme="acid"] .gallery-toolbar button,
body[data-theme="acid"] .vault-viewer-toolbar button,
body[data-theme="acid"] .vault-viewer-reveal-overlay button,
body[data-theme="acid"] .dialog-actions button,
body[data-theme="acid"] .wallet-button,
body[data-theme="acid"] .wallet-provider-item {
  color: #101510;
  background: var(--accent);
}

body[data-theme="acid"] .vault-viewer-toolbar {
  background: #050505;
  border-color: #333;
}

body[data-theme="acid"] .vault-viewer-toolbar span {
  color: #101510;
  background: #fff;
}

body[data-theme="acid"] .wallet-button.is-connected {
  background: var(--panel-surface);
}

body[data-theme="acid"] .title-bar-controls button {
  background-color: var(--accent);
}

body[data-theme="acid"] .forum-shell,
body[data-theme="acid"] .document-body,
body[data-theme="acid"] .properties-body,
body[data-theme="acid"] .profile-body,
body[data-theme="acid"] .vault-body {
  color: #c6ff00;
  background: #050505;
}

body[data-theme="acid"] .vault-tile {
  background: #111;
  border-color: #333;
}

body[data-theme="acid"] .vault-tile.is-legendary {
  background: linear-gradient(135deg, #2a1e00, #4a3300);
  border-color: #b8860b;
  box-shadow: 0 0 14px rgba(255, 195, 0, 0.55);
}

body[data-theme="acid"] .vault-legendary-badge {
  background: linear-gradient(135deg, #2a1e00, #4a3300);
  border-color: #b8860b;
  color: #ffcf4d;
}

body[data-theme="acid"] .vault-viewer-traits {
  background: #050505;
  border-color: #333;
  color: #c6ff00;
}

body[data-theme="acid"] .vault-viewer-traits-title {
  border-bottom-color: #333;
}

body[data-theme="acid"] .vault-trait {
  background: #111;
  border-color: #333;
}

body[data-theme="acid"] .vault-trait-type {
  color: #8fae00;
}

body[data-theme="acid"] .vault-trait.is-legendary {
  border-color: #b8860b;
  background: linear-gradient(135deg, #2a1e00, #4a3300);
  box-shadow: 0 0 12px rgba(255, 195, 0, 0.55), inset 0 0 6px rgba(255, 200, 0, 0.25);
}

body[data-theme="acid"] .vault-trait.is-legendary .vault-trait-type {
  color: #ffcf4d;
}

body[data-theme="acid"] .vault-trait.is-legendary .vault-trait-value {
  color: #ffe08a;
}

body[data-theme="acid"] .vault-viewer-traits-empty {
  color: #6d8a00;
}

body[data-theme="acid"] .forum-header,
body[data-theme="acid"] .forum-panel,
body[data-theme="acid"] .broadcast-panel,
body[data-theme="acid"] .topics-panel,
body[data-theme="acid"] .network-box,
body[data-theme="acid"] .post-user,
body[data-theme="acid"] .properties-panel,
body[data-theme="acid"] .profile-card {
  color: #c6ff00;
  background: #080808;
}

body[data-theme="acid"] .forum-header {
  border-color: #3d5000;
  border-bottom-color: var(--accent);
}

body[data-theme="acid"] .forum-brand h1,
body[data-theme="acid"] .document-body h2,
body[data-theme="acid"] .profile-copy h2,
body[data-theme="acid"] .network-box strong {
  color: var(--accent);
}

body[data-theme="acid"] .forum-brand p,
body[data-theme="acid"] .forum-brand span,
body[data-theme="acid"] .network-box small,
body[data-theme="acid"] .panel-heading span,
body[data-theme="acid"] .post-meta,
body[data-theme="acid"] .post-user span,
body[data-theme="acid"] .topic-row small,
body[data-theme="acid"] .market-grid span,
body[data-theme="acid"] .market-note {
  color: #999;
}

body[data-theme="acid"] .system-notice,
body[data-theme="acid"] .topic-row,
body[data-theme="acid"] .topic-row:nth-child(odd),
body[data-theme="acid"] .notepad-note {
  color: #dcdcd5;
  background: #0b0b0b;
}

body[data-theme="acid"] .forum-panel h2,
body[data-theme="acid"] .panel-heading {
  color: var(--accent);
  background: #121212;
  border-bottom-color: #425600;
}

body[data-theme="acid"] .panel-heading-cool,
body[data-theme="acid"] .topic-header {
  color: #101510;
  background: var(--accent) !important;
}

body[data-theme="acid"] .panel-heading-cool span,
body[data-theme="acid"] .topic-header span {
  color: #253000;
}

body[data-theme="acid"] .panel-link,
body[data-theme="acid"] .tree-item,
body[data-theme="acid"] .gallery-files button {
  color: #c6ff00;
}

body[data-theme="acid"] .panel-link:hover,
body[data-theme="acid"] .panel-link:focus-visible,
body[data-theme="acid"] .panel-link.is-current,
body[data-theme="acid"] .tree-item:hover,
body[data-theme="acid"] .tree-item:focus-visible,
body[data-theme="acid"] .tree-item.is-selected,
body[data-theme="acid"] .gallery-files button:hover,
body[data-theme="acid"] .gallery-files button:focus-visible,
body[data-theme="acid"] .gallery-files button.is-selected {
  color: #101510;
  background: var(--accent);
}

body[data-theme="acid"] .panel-link:hover small,
body[data-theme="acid"] .panel-link:focus-visible small,
body[data-theme="acid"] .panel-link.is-current small {
  color: #253000;
}

body[data-theme="acid"] .topic-row:not(.topic-header):hover,
body[data-theme="acid"] .topic-row:not(.topic-header):focus-visible {
  color: #101510;
  background: var(--accent);
}

body[data-theme="acid"] .topic-row:not(.topic-header):hover b,
body[data-theme="acid"] .topic-row:not(.topic-header):focus-visible b,
body[data-theme="acid"] .topic-row:not(.topic-header):hover small,
body[data-theme="acid"] .topic-row:not(.topic-header):focus-visible small {
  color: #101510;
}

body[data-theme="acid"] .topic-icon,
body[data-theme="acid"] .panel-link > span:first-child {
  border-color: var(--accent);
  color: var(--accent);
  background: #080808;
}

body[data-theme="acid"] .topic-icon.new,
body[data-theme="acid"] .topic-icon.hot {
  color: #101510;
  background: var(--accent);
}

body[data-theme="acid"] .post-user,
body[data-theme="acid"] .broadcast-actions {
  border-color: #344400;
  background: #0b0b0b;
}

body[data-theme="acid"] .market-grid strong,
body[data-theme="acid"] .launch-panel time,
body[data-theme="acid"] .users-panel dd.online {
  color: var(--accent);
}

body[data-theme="acid"] .gallery-toolbar,
body[data-theme="acid"] .notepad-menu,
body[data-theme="acid"] .gallery-tree,
body[data-theme="acid"] .gallery-files,
body[data-theme="acid"] .roadmap-body,
body[data-theme="acid"] .notepad-sheet {
  color: #c6ff00;
  background: #090909;
}

body[data-theme="acid"] .gallery-toolbar span {
  color: var(--accent);
  background: #050505;
}

body[data-theme="acid"] fieldset {
  border-color: #4a6000;
}

body[data-theme="acid"] legend {
  color: var(--accent);
  background: #090909;
}

body[data-theme="acid"] .queue-status,
body[data-theme="acid"] .file-status {
  border-color: #607c00;
  color: var(--accent);
  background: #101010;
}

body[data-theme="acid"] .queue-status.is-next,
body[data-theme="acid"] .queue-status.is-live,
body[data-theme="acid"] .file-status.next {
  color: #101510;
  background: var(--accent);
}

body[data-theme="acid"] .taskbar {
  border-top-color: var(--accent);
  background: #080808;
}

body[data-theme="acid"] .start-button,
body[data-theme="acid"] .theme-button,
body[data-theme="acid"] .task-button,
body[data-theme="acid"] .task-status,
body[data-theme="acid"] .status-bar-field {
  color: #c6ff00;
  background: #111;
}

body[data-theme="acid"] .task-button.is-active,
body[data-theme="acid"] .theme-button {
  color: var(--accent);
  border-color: var(--accent);
}

body[data-theme="acid"] .start-items button,
body[data-theme="acid"] .start-items a {
  color: #c6ff00;
}

body[data-theme="acid"] .start-items button:hover,
body[data-theme="acid"] .start-items button:focus-visible,
body[data-theme="acid"] .start-items a:hover,
body[data-theme="acid"] .start-items a:focus-visible {
  color: #101510;
  background: var(--accent);
}

body[data-theme="acid"] .window-resizer {
  background: repeating-linear-gradient(135deg, transparent 0 3px, var(--accent) 3px 5px);
}

@media (max-width: 900px) {
  :root {
    --taskbar-h: calc(42px + env(safe-area-inset-bottom));
  }

  .desktop-icons,
  .wallpaper-mark {
    display: none;
  }

  .window-resizer {
    display: none;
  }

  .forum-window,
  .app-window,
  .dialog-window,
  .gallery-window,
  .roadmap-window,
  .collection-window,
  .founder-window {
    top: 4px !important;
    right: 4px !important;
    bottom: 4px !important;
    left: 4px !important;
    width: auto !important;
    height: auto !important;
    min-width: 0;
    transform: none !important;
  }

  .forum-layout {
    min-width: 680px;
    grid-template-columns: 170px minmax(390px, 1fr);
  }

  .forum-sidebar-right {
    display: none;
  }

  .forum-header {
    min-width: 680px;
  }

  .system-notice {
    min-width: 680px;
  }

  .title-bar[data-drag-handle] {
    touch-action: auto;
  }

  .title-bar-controls {
    gap: 6px;
  }

  .title-bar-controls button {
    min-width: 28px;
    min-height: 28px;
  }

  .title-bar-controls button[aria-label] {
    background-position: center;
  }

  .properties-body menu[role="tablist"] li[role="tab"] button {
    min-width: 0;
    padding-left: 10px;
    padding-right: 10px;
  }

  .task-buttons {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .taskbar {
    padding-bottom: env(safe-area-inset-bottom);
  }

  .desktop {
    padding-right: env(safe-area-inset-right);
    padding-left: env(safe-area-inset-left);
  }
}

@media (max-width: 640px) {
  :root {
    --taskbar-h: calc(44px + env(safe-area-inset-bottom));
  }

  .forum-window,
  .app-window {
    border-width: 1px;
  }

  .forum-shell {
    padding: 4px;
  }

  .forum-header {
    min-width: 0;
    min-height: 72px;
    padding: 6px;
  }

  .forum-brand img {
    width: 48px;
    height: 48px;
  }

  .forum-brand h1 {
    font-size: 23px;
  }

  .forum-brand p,
  .forum-brand span {
    display: none;
  }

  .network-box {
    min-width: 122px;
    padding: 5px;
  }

  .network-box strong {
    font-size: 9px;
  }

  .network-box small {
    display: none;
  }

  .system-notice {
    min-width: 0;
  }

  .forum-layout {
    display: flex;
    min-width: 0;
    flex-direction: column;
  }

  .forum-main {
    order: 1;
  }

  .forum-sidebar-left {
    order: 2;
    width: 100%;
  }

  .forum-sidebar-right {
    display: grid;
    order: 3;
    width: 100%;
  }

  .forum-post {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .post-user {
    padding: 6px 4px;
  }

  .post-user img {
    width: 40px;
    height: 40px;
  }

  .transmission-media video {
    max-height: 230px;
  }

  .topic-row {
    grid-template-columns: 38px minmax(150px, 1fr) 52px;
  }

  .topic-row > span:last-child,
  .topic-header > span:last-child {
    display: none;
  }

  .forum-sidebar {
    grid-template-columns: 1fr;
  }

  .panel-link small,
  .topic-row small,
  .market-grid span,
  .post-user span,
  .launch-panel b,
  .queue-status,
  .file-status,
  .vault-badge,
  .raffle-badge,
  .raffle-viewer-deadline,
  .terminal-output,
  .gallery-files button {
    font-size: 11px;
  }

  .raffles-grid {
    grid-template-columns: 1fr;
  }

  .gallery-body {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .gallery-tree {
    display: flex;
    overflow-x: auto;
  }

  .tree-item {
    width: auto;
    white-space: nowrap;
  }

  .gallery-stage {
    grid-template-rows: minmax(240px, 1fr) 144px;
  }

  .gallery-files {
    grid-template-columns: repeat(4, minmax(76px, 1fr));
  }

  .gallery-toolbar span {
    display: none;
  }

  .gallery-file-info {
    display: block;
  }

  .gallery-file-info span {
    display: none;
  }

  .notepad-sheet {
    padding: 12px;
  }

  .notepad-sheet th:first-child,
  .notepad-sheet td:first-child {
    width: 84px;
  }

  .notepad-sheet th:last-child,
  .notepad-sheet td:last-child {
    width: 52px;
  }

  .roadmap-body {
    overflow: auto;
  }

  .properties-body {
    overflow: auto;
  }

  .properties-list div {
    grid-template-columns: 112px 1fr;
  }

  .profile-body {
    display: block;
    overflow: auto;
  }

  .profile-card {
    display: grid;
    grid-template-columns: 72px 1fr;
    margin-bottom: 12px;
    text-align: left;
  }

  .profile-card img {
    width: 68px;
    height: 68px;
    grid-row: span 3;
  }

  .document-body h2 {
    font-size: 18px;
  }

  .document-logo {
    width: 70px;
    height: 70px;
  }

  .task-button {
    width: auto;
    min-width: 46px;
    max-width: 150px;
  }

  .theme-button {
    min-width: 66px;
    padding-inline: 5px;
  }

  .task-status {
    min-width: 66px;
    padding: 0 5px;
  }

  .start-menu {
    width: min(280px, calc(100vw - 8px));
    min-height: 280px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cursor {
    animation: none;
  }
}

/* ---- contract link in properties ---- */
.contract-link {
  font-family: "Courier New", monospace;
  font-size: 11px;
  letter-spacing: 0.02em;
  word-break: break-all;
}


/* ---- volume box ---- */
.volume-box {
  margin-top: 8px;
  padding: 8px 10px;
  background: #0d1a14;
  border: 1px solid #2f5f47;
  box-shadow: inset 1px 1px 0 #06100b;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.volume-box span {
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #7fd6a5;
}
.volume-box strong {
  font-size: 18px;
  line-height: 1.1;
  color: #b8f5d2;
}
body[data-theme="acid"] .volume-box { background: #1a0f22; border-color: #6b3f8f; }
body[data-theme="acid"] .volume-box span { color: #e2a6ff; }
body[data-theme="acid"] .volume-box strong { color: #f2d4ff; }

/* ---- widen General tab ---- */
.properties-body menu[role="tablist"] li[role="tab"] button {
  min-width: 76px;
  padding-left: 14px;
  padding-right: 14px;
}


/* ---- acid: единый кислотный текст + читаемая шапка таблицы ---- */
body[data-theme="acid"] .notepad-sheet table th {
  background: #1a2200;
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
body[data-theme="acid"] .notepad-sheet th,
body[data-theme="acid"] .notepad-sheet td {
  border-bottom-color: #4a6000;
}
body[data-theme="acid"] .notepad-sheet > p:first-child {
  border-bottom-color: #4a6000;
  color: var(--accent);
}
body[data-theme="acid"] .notepad-sheet b,
body[data-theme="acid"] .notepad-sheet td {
  color: var(--accent);
}
/* приглушённый оттенок того же кислотного - для второстепенного текста */
body[data-theme="acid"] .notepad-sheet td br + *,
body[data-theme="acid"] .properties-list dt,
body[data-theme="acid"] .market-grid span {
  color: #8fb300;
}


/* 98.css задаёт table{background-color:#fff} прямо на элементе -
   перекрываем, иначе белый фон таблицы бьёт по кислотной теме */
body[data-theme="acid"] .notepad-sheet table,
body[data-theme="acid"] .properties-body table {
  background-color: transparent;
}
body[data-theme="acid"] .notepad-sheet tbody tr:nth-child(even) td {
  background-color: #0d1400;
}
body[data-theme="acid"] .notepad-sheet td:first-child {
  color: #d8ff4d;
}
body[data-theme="acid"] .notepad-note {
  background: #0d1400;
  border-color: #4a6000;
}
