/* ---------- nanoweb v6: seven more nani-net sites (nanosites.js) ---------- */
/* every rule is scoped to .web-page so nothing leaks into the rest of nani-os */

/* themes, one per new banner art */
.web-page.theme-tube { --bg: #1c1420; --pat: rgba(255, 79, 79, 0.06); --card: #2a2030; --ink: #f4ecf0; --soft: #b8a8b8; --accent: #ff6a6a; --shade: #ff4f4f; --head: #f4ecf0; }
.web-page.theme-gallery { --bg: #e9e1d0; --pat: rgba(138, 90, 60, 0.08); --card: #fffbe8; --ink: #1a1030; --soft: #6e6884; --accent: #8a5a3c; --shade: #c9a86a; }
.web-page.theme-space { --bg: #070a1c; --pat: rgba(94, 242, 214, 0.06); --card: #141a36; --ink: #e6f0ff; --soft: #9aa8d0; --accent: #5ef2d6; --shade: #ff9a3c; --head: #e6f0ff; }
.web-page.theme-maps { --bg: #e8dcb8; --pat: rgba(44, 122, 57, 0.1); --card: #fbf5e0; --ink: #1a1030; --soft: #5f5a48; --accent: #2c7a39; --shade: #d9a43a; }
.web-page.theme-jokes { --bg: #3a1020; --pat: rgba(255, 209, 102, 0.07); --card: #fff3e0; --ink: #2a1020; --soft: #7a5060; --accent: #c0392b; --shade: #ffd166; --head: #fff3e0; }
.web-page.theme-market { --bg: #0e1f17; --pat: rgba(125, 255, 138, 0.06); --card: #e9f5e6; --ink: #13261a; --soft: #4a6a52; --accent: #2c7a39; --shade: #7dff8a; --head: #e9f5e6; }
.web-page.theme-guestbook { --bg: #f3e3c8; --pat: rgba(138, 90, 60, 0.07); --card: #fffaf0; --ink: #1a1030; --soft: #6e6884; --accent: #7a4fc4; --shade: #d38b5f; }

/* on the dark themes, plain buttons keep their own dark text */
.web-page.theme-tube .btn, .web-page.theme-space .btn { --ink: #1a1030; }

/* nanotube */
.web-page .nt-player { display: grid; gap: 8px; }
.web-page .nt-screen { display: block; width: 100%; max-width: 480px; height: auto; aspect-ratio: 4 / 3; image-rendering: pixelated; background: #000; border: 3px solid var(--ink); }
.web-page .nt-controls { display: flex; gap: 8px; align-items: center; max-width: 480px; }
.web-page .nt-bar { flex: 1; min-width: 0; height: 12px; image-rendering: pixelated; border: 2px solid var(--ink); }
.web-page .nt-time { font-size: 18px; color: var(--soft); white-space: nowrap; }
.web-page .nt-title { margin: 10px 0 0; color: var(--ink); font-size: 13px; }
.web-page .nt-thumb canvas { width: 100%; height: auto; aspect-ratio: 4 / 3; padding: 0; background: #000; }
.web-page .nt-thumb b { font-size: 19px; font-weight: normal; line-height: 1.1; }
.web-page .nt-thumb[aria-current='true'] { outline: 3px solid var(--accent); outline-offset: 2px; }
.web-page .nt-comments { list-style: none; padding: 0; margin: 6px 0; display: grid; gap: 8px; }
.web-page .nt-comment { display: flex; gap: 10px; align-items: flex-start; padding: 6px 10px; background: var(--card); color: var(--ink); border: 3px solid var(--ink); box-shadow: 3px 3px 0 var(--shade); }
.web-page .nt-comment b { font: 400 10px/1.6 var(--pixel); color: var(--accent); }
.web-page .nt-comment p { margin: 0; }
.web-page .nt-avatar { flex: none; width: 27px; height: 36px; image-rendering: pixelated; }

/* pixel gallery */
.web-page .gl-where { font: 400 11px/1.6 var(--pixel); color: var(--accent); }
.web-page .gl-room { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 18px; margin: 10px 0; }
.web-page .gl-piece { margin: 0; text-align: center; }
.web-page .gl-frame { display: block; padding: 8px; background: #8a5a3c; border: 3px solid #3a2414; box-shadow: inset 0 0 0 3px #c9a86a, 4px 4px 0 var(--shade); }
.web-page .gl-frame canvas { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; image-rendering: pixelated; border: 2px solid #3a2414; }
.web-page .gl-plaque { display: inline-grid; gap: 2px; margin-top: 10px; padding: 4px 10px; font-size: 18px; line-height: 1.1; color: var(--ink); background: var(--card); border: 2px solid var(--ink); }
.web-page .gl-plaque b { font: 400 10px/1.5 var(--pixel); color: var(--accent); }
.web-page .gl-plaque small { font-size: 16px; color: var(--soft); }
.web-page .gl-big { max-width: 340px; margin: 8px 0; }
.web-page .gl-seed { font: 400 11px var(--pixel); color: var(--accent); }
.web-page .gl-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.web-page .gl-input { width: 110px; height: 30px; padding: 0 6px; font: 20px var(--mono); color: #1a1030; background: #fff; border: 3px solid var(--ink); }

/* nani space agency */
.web-page .sp-tile canvas { width: 48px; height: 48px; padding: 0; image-rendering: pixelated; background: #070a1c; }
.web-page .sp-tile[aria-pressed='true'] { outline: 3px solid var(--accent); outline-offset: 2px; }
.web-page .sp-detail { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.web-page .sp-facts { flex: 1; min-width: 220px; }
.web-page .sp-facts h3 { margin-top: 0; }
.web-page .sp-big { flex: none; width: 128px; height: 128px; image-rendering: pixelated; background: #070a1c; border: 3px solid var(--ink); }
.web-page .sp-launch { display: block; width: 100%; max-width: 480px; height: auto; aspect-ratio: 3 / 2; image-rendering: pixelated; border: 3px solid var(--ink); }
.web-page .sp-status { color: var(--accent); }
.web-page .sp-log { list-style: square; padding-left: 22px; margin: 6px 0; display: grid; gap: 4px; font-size: 19px; }
.web-page .sp-log li::marker { color: var(--accent); }

/* room maps */
.web-page .mp-wrap { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 16px; align-items: start; margin: 10px 0; }
.web-page .mp-map { display: block; width: 100%; height: auto; aspect-ratio: 1; image-rendering: pixelated; border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--shade); cursor: pointer; }
.web-page .mp-info { min-height: 90px; }
.web-page .mp-info h3 { margin-top: 0; }
.web-page .mp-list { list-style: none; padding: 0; margin: 10px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px; }
.web-page .mp-list button { display: flex; gap: 8px; align-items: center; width: 100%; padding: 2px 6px; text-align: left; font: 18px/1.1 var(--mono); color: var(--ink); background: var(--card); border: 2px solid var(--ink); cursor: pointer; }
.web-page .mp-list button:hover { background: #fff; }
.web-page .mp-list button[aria-pressed='true'] { color: var(--card); background: var(--accent); }
.web-page .mp-num { flex: none; min-width: 22px; padding: 1px 2px; text-align: center; font: 400 9px/1.6 var(--pixel); color: #fff; background: #1a1030; }
.web-page .mp-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 19px; }
.web-page .mp-legend span { display: inline-flex; gap: 6px; align-items: center; }
.web-page .mp-swatch { width: 16px; height: 16px; image-rendering: pixelated; border: 2px solid var(--ink); }

/* the joke box */
.web-page .jk-stage { padding: 10px 4px; text-align: center; }
.web-page .jk-setup { margin: 6px 0 10px; font-size: 27px; line-height: 1.2; color: var(--ink); }
.web-page .jk-punch { min-height: 1.3em; margin: 0; font-size: 25px; color: var(--accent); }
.web-page .jk-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 12px; }
.web-page .jk-top { padding-left: 26px; margin: 6px 0; }
.web-page .jk-top li { margin: 6px 0; }
.web-page .jk-score { margin-right: 8px; font: 400 10px var(--pixel); color: var(--accent); }
.web-page .jk-mine { color: var(--soft); }

/* snack exchange */
.web-page .mk-wallet { font-size: 22px; color: var(--ink); }
.web-page .mk-msg { min-height: 1.2em; margin: 0; }
.web-page .mk-ticker { overflow: hidden; margin: 12px 0; padding: 3px 0; white-space: nowrap; font-size: 20px; color: #7dff8a; background: #06120c; border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--shade); }
.web-page .mk-ticker span { display: inline-block; padding-left: 100%; animation: mk-scroll 60s linear infinite; }
@keyframes mk-scroll { from { transform: translateX(0); } to { transform: translateX(-100%); } }
.web-page .mk-chart { display: block; width: 100%; max-width: 480px; height: auto; aspect-ratio: 160 / 60; image-rendering: pixelated; border: 3px solid var(--ink); }
.web-page .mk-table { display: grid; gap: 6px; margin: 12px 0; }
.web-page .mk-row { display: grid; grid-template-columns: 24px minmax(110px, 1.6fr) 72px 76px 80px 40px auto auto; gap: 8px; align-items: center; padding: 4px 8px; font-size: 20px; color: var(--ink); background: var(--card); border: 2px solid var(--ink); }
.web-page .mk-row[aria-current='true'] { box-shadow: 4px 4px 0 var(--shade); }
.web-page .mk-head { font: 400 9px var(--pixel); color: var(--head, var(--ink)); background: transparent; border-color: transparent; padding-bottom: 0; }
.web-page .mk-icon { width: 24px; height: 18px; image-rendering: pixelated; }
.web-page .mk-name { padding: 0; text-align: left; font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.web-page .mk-name b { font: 400 10px var(--pixel); color: var(--accent); }
.web-page .mk-name:hover { text-decoration: underline; }
.web-page .mk-price, .web-page .mk-own { text-align: right; }
.web-page .mk-spark { width: 80px; height: 24px; image-rendering: pixelated; border: 1px solid var(--ink); }
.web-page .mk-up { color: #2c7a39; }
.web-page .mk-down { color: #c0392b; }
@media (max-width: 620px) {
  .web-page .mk-row { grid-template-columns: 24px minmax(0, 1fr) 64px 32px auto auto; gap: 6px; }
  .web-page .mk-hide-sm { display: none; }
  .web-page .mp-wrap { grid-template-columns: minmax(0, 1fr); }
}

/* guestbook */
.web-page .gb-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); gap: 6px; margin: 8px 0; }
.web-page .gb-pick { padding: 3px; background: #fff; border: 2px solid var(--ink); cursor: pointer; }
.web-page .gb-pick:hover { background: #efe9f7; }
.web-page .gb-pick[aria-pressed='true'] { background: var(--accent); }
.web-page .gb-pick canvas { display: block; width: 27px; height: 36px; margin: 0 auto; image-rendering: pixelated; }
.web-page .gb-preview { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 8px 0; }
.web-page .gb-preview p { margin: 4px 0 0; }
.web-page .gb-big { margin: 0; }
.web-page .gb-select { max-width: 100%; height: 34px; padding: 0 6px; font: 20px var(--mono); color: #1a1030; background: #fff; border: 3px solid var(--ink); }
.web-page .gb-entries { display: grid; gap: 10px; margin: 8px 0 12px; }
.web-page .gb-entry { display: flex; gap: 12px; align-items: center; padding: 8px 12px; color: var(--ink); background: var(--card); border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--shade); }
.web-page .gb-entry .web-sprite { flex: none; width: 36px; height: 48px; margin: 0; }
.web-page .gb-msg { margin: 0 0 2px; font-size: 22px; }
.web-page .gb-mine { box-shadow: 4px 4px 0 var(--accent); }

@media (prefers-reduced-motion: reduce) {
  .web-page .mk-ticker { white-space: normal; padding: 3px 8px; }
  .web-page .mk-ticker span { display: inline; padding-left: 0; animation: none; }
}
