:root {
  --blue: #336699;
  --blue-dark: #1d3f66;
  --blue-light: #99ccff;
  --panel: #ffffff;
  --panel-alt: #eef4fb;
  --ink: #1a1a1a;
  --muted: #667788;
  --hot: #e2221a;
  --orange: #ff8400;
  --yellow: #ffd600;
  --link: #0033cc;
  --gap: 12px;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow-x: hidden; }
body {
  font: 12px/1.4 Verdana, Tahoma, Geneva, sans-serif;
  color: var(--ink);
  background: var(--blue) repeating-linear-gradient(45deg, rgba(255,255,255,.04) 0 6px, transparent 6px 12px);
}
a { color: var(--link); }
button { font: inherit; }
[hidden] { display: none !important; }

/* the app fills the window; only the side columns scroll */
.app {
  height: 100vh;
  max-width: 1720px;
  margin: 0 auto;
  padding: var(--gap) 16px 6px;
  display: flex; flex-direction: column; gap: var(--gap);
}

/* shared beveled panel */
.box, .masthead, .art-panel {
  background: var(--panel);
  border: 2px solid; border-color: #fff var(--blue-dark) var(--blue-dark) #fff;
  box-shadow: 3px 3px 0 rgba(0,0,0,.35);
}
.box { display: flex; flex-direction: column; min-height: 0; }
.box-title {
  flex: none;
  background: linear-gradient(var(--blue), var(--blue-dark));
  color: #fff; font-weight: bold; font-size: 11px; letter-spacing: 1px;
  padding: 4px 10px;
}
.box-body { padding: 10px; }
.muted { color: var(--muted); font-weight: normal; letter-spacing: 0; }
.box-title .muted { color: var(--blue-light); }

/* masthead */
.masthead {
  flex: none;
  display: flex; align-items: center; gap: 10px 18px;
  padding: 8px 12px;
  background: linear-gradient(#ffffff, #dde9f6);
}
.logo { flex: none; display: flex; align-items: center; gap: 4px; font: 900 28px/1 "Arial Black", Impact, sans-serif; letter-spacing: -1px; }
.logo img { width: 34px; height: 34px; image-rendering: pixelated; margin-right: 4px; }
.logo-hot { color: var(--hot); text-shadow: 2px 2px 0 var(--yellow); }
.logo-or { font: italic bold 15px Georgia, serif; color: var(--blue); margin: 0 4px; letter-spacing: 0; }
.logo-mint { color: var(--blue); text-shadow: 2px 2px 0 var(--blue-light); }
.tabs { flex: none; display: flex; gap: 4px; }
.tab {
  padding: 7px 12px; font-weight: bold; font-size: 11px; color: #fff; cursor: pointer;
  background: linear-gradient(var(--blue), var(--blue-dark));
  border: 2px solid; border-color: var(--blue-light) #000 #000 var(--blue-light);
}
.tab.active { background: var(--yellow); color: var(--blue-dark); border-color: #fff8b0 #8a7400 #8a7400 #fff8b0; }
.tagline { flex: 1; min-width: 0; color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.opts { flex: none; display: flex; align-items: center; gap: 12px; font-size: 11px; color: var(--blue-dark); }
.opts label { display: flex; align-items: center; gap: 4px; }
.opts select { font: inherit; font-size: 11px; }
.counter { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.counter-label { font-size: 9px; color: var(--muted); letter-spacing: 1px; }
.counter-digits {
  font: bold 16px/1 "Courier New", monospace; letter-spacing: 3px;
  background: #000; color: #39ff14; padding: 4px 6px; border: 2px inset #888;
}
.close {
  flex: none; width: 30px; height: 30px; padding: 0;
  font-weight: bold; color: #fff; background: var(--hot); cursor: pointer;
  border: 2px solid; border-color: #ff9a8a #6b0c06 #6b0c06 #ff9a8a;
}

/* three columns: history | art | artist + rating */
.rate-layout {
  flex: 1; min-height: 0;
  display: grid; grid-template-columns: 230px minmax(0, 1fr) 360px; gap: var(--gap);
}
.col { min-height: 0; display: flex; flex-direction: column; gap: var(--gap); }
.left { overflow-y: auto; }

/* left column */
.prev.empty { color: var(--muted); font-size: 11px; }
.prev img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; border: 1px solid #999; background: #ddd; }
.prev-name { font-weight: bold; margin-top: 6px; overflow-wrap: anywhere; }
.prev-score { font: 900 28px/1 "Arial Black", Impact, sans-serif; color: var(--hot); margin: 4px 0 2px; }
.prev-score small { font: 11px Verdana, sans-serif; color: var(--muted); }
.prev-note { font-size: 11px; color: var(--blue-dark); }
.stats { display: grid; gap: 4px; }
.stats div { display: flex; justify-content: space-between; border-bottom: 1px dotted #c9d8ea; padding-bottom: 2px; }
.keys .box-body { display: grid; gap: 4px; font-size: 11px; }
kbd {
  font: bold 10px Verdana, sans-serif; padding: 0 4px;
  background: #eee; border: 1px solid; border-color: #fff #888 #888 #fff;
}

/* live sales feed: a little CRT that scrolls real objkt sales */
.live-box { flex: 1 0 220px; }
.live-dot {
  display: inline-block; width: 8px; height: 8px; margin-right: 6px; vertical-align: 0;
  background: #ff2a1a; border-radius: 50%; box-shadow: 0 0 6px #ff2a1a;
  animation: blink 1.2s steps(1) infinite;
}
.live-screen {
  flex: 1; min-height: 0; position: relative; overflow: hidden;
  background: radial-gradient(ellipse at center, #06200c 0%, #000 85%);
  border: 3px inset #555; margin: 6px;
  font: 11px/1.3 "Courier New", monospace; color: #39ff14;
}
.live-screen::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(rgba(0,0,0,.28) 0 1px, transparent 1px 3px);
}
.live-track { animation: live-scroll var(--dur, 60s) linear infinite; }
.live-screen:hover .live-track { animation-play-state: paused; }
@keyframes live-scroll { from { transform: translateY(0); } to { transform: translateY(-50%); } }
.live-wait { padding: 10px; }
.live-row {
  display: flex; gap: 8px; align-items: center; width: 100%;
  padding: 7px 8px; border: 0; border-bottom: 1px dashed rgba(57,255,20,.25);
  background: none; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.live-row:hover { background: rgba(57,255,20,.12); }
.live-row img { width: 36px; height: 36px; flex: none; object-fit: cover; border: 1px solid #1f6b14; background: #031; filter: saturate(.85) contrast(1.05); }
.live-row .lr-text { min-width: 0; flex: 1; }
.live-row .lr-artist { color: var(--yellow); font-weight: bold; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-row .lr-piece { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-row .lr-price { color: #9cff8a; opacity: .75; }
.live-row.new { animation: live-flash 1.6s steps(2) 3; }
@keyframes live-flash { 50% { background: rgba(255,214,0,.25); } }

/* the art */
.art-panel {
  flex: 1; min-height: 0;
  position: relative; overflow: hidden;
  background: #111 repeating-conic-gradient(#1b1b1b 0 25%, #111 0 50%) 0 0 / 16px 16px;
  touch-action: pan-y; user-select: none;
}
.art-panel.leaving-left { transform: translateX(-120%) rotate(-12deg) !important; opacity: 0; transition: transform .3s ease-in, opacity .3s; }
.art-panel.leaving-right { transform: translateX(120%) rotate(12deg) !important; opacity: 0; transition: transform .3s ease-in, opacity .3s; }
.art-panel.snap { transition: transform .2s; }
.loading, .error { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: #aab; font-size: 14px; padding: 16px; text-align: center; }
.blink { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.feature {
  position: absolute; inset: 0; bottom: 30px;
  display: flex; align-items: center; justify-content: center;
  padding: 12px; cursor: pointer;
}
.feature img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; pointer-events: none; box-shadow: 0 6px 24px rgba(0,0,0,.6); }
.piece-title {
  position: absolute; left: 0; right: 0; bottom: 0; height: 30px;
  display: flex; align-items: center; gap: 8px; padding: 0 10px;
  background: linear-gradient(var(--blue), var(--blue-dark)); color: #fff; font-size: 11px;
  white-space: nowrap;
}
.piece-title a { color: var(--yellow); font-weight: bold; overflow: hidden; text-overflow: ellipsis; }
.piece-title .ask { flex: none; }
.piece-title .open-hint { flex: none; margin-left: auto; color: var(--blue-light); }
.stamp {
  position: absolute; top: 24px; padding: 4px 12px; z-index: 2;
  font: 900 40px/1 "Arial Black", Impact, sans-serif; letter-spacing: 2px;
  border: 5px solid; opacity: 0; pointer-events: none; transform: rotate(-12deg);
}
.stamp.hot { right: 24px; color: var(--orange); border-color: var(--orange); }
.stamp.pass { left: 24px; color: var(--blue-light); border-color: var(--blue-light); transform: rotate(12deg); }
.stamp.score { left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-8deg); font-size: 80px; color: var(--yellow); border-color: var(--yellow); background: rgba(0,0,0,.55); }

/* right column: the artist */
.artist-box { flex: 1; }
.info { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; }
.artist-head { display: flex; align-items: center; gap: 10px; padding: 10px; background: var(--panel-alt); border-bottom: 1px solid #c9d8ea; }
.avatar { width: 52px; height: 52px; flex: none; object-fit: cover; border: 1px solid #999; background: #ccd; }
.artist-meta { min-width: 0; flex: 1; }
.artist-name { font-weight: bold; font-size: 16px; overflow-wrap: anywhere; color: var(--ink); text-decoration: none; }
a.artist-name:hover { text-decoration: underline; }
.artist-sub { font-size: 11px; color: var(--muted); overflow-wrap: anywhere; margin-top: 2px; }
.price-tag {
  display: inline-block; margin-top: 5px;
  font-weight: bold; font-size: 11px; color: #fff; padding: 2px 7px;
  background: var(--hot); border: 1px solid #6b0c06; transform: rotate(-2deg);
}
.section-label { font-size: 10px; font-weight: bold; letter-spacing: 1px; color: var(--blue-dark); padding: 10px 10px 6px; }
.strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 0 10px; }
.strip button { aspect-ratio: 1; padding: 0; cursor: pointer; border: 2px solid #ccc; background: #ddd; overflow: hidden; }
.strip button:hover { border-color: var(--blue); }
.strip button.on { border-color: var(--hot); }
.strip img { width: 100%; height: 100%; object-fit: cover; display: block; }
.all-works { display: block; padding: 6px 10px 0; font-size: 11px; text-align: right; }
.bio { padding: 0 10px 10px; font-size: 11px; color: #444; overflow-wrap: anywhere; white-space: pre-line; }

/* right column: rating */
.rate-box { flex: none; }
.scale { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; }
.scale button {
  padding: 10px 0; font: 900 18px/1 "Arial Black", Impact, sans-serif; color: #fff; cursor: pointer;
  border: 2px solid; border-color: rgba(255,255,255,.7) rgba(0,0,0,.5) rgba(0,0,0,.5) rgba(255,255,255,.7);
  text-shadow: 1px 1px 0 rgba(0,0,0,.5);
}
.scale button:hover { filter: brightness(1.15); }
.scale button:active { border-color: rgba(0,0,0,.5) rgba(255,255,255,.7) rgba(255,255,255,.7) rgba(0,0,0,.5); }
.scale-ends { display: flex; justify-content: space-between; font-size: 10px; color: var(--muted); margin-top: 4px; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.btn {
  padding: 10px 12px; font-weight: bold; font-size: 13px; cursor: pointer; color: #fff;
  border: 2px solid; border-color: rgba(255,255,255,.7) rgba(0,0,0,.5) rgba(0,0,0,.5) rgba(255,255,255,.7);
}
.btn.pass { background: linear-gradient(#6d8fb5, var(--blue-dark)); }
.btn.hot { background: linear-gradient(var(--orange), var(--hot)); }
.btn:disabled, .scale button:disabled { opacity: .5; cursor: wait; }

/* hot list */
.hot-layout { flex: 1; min-height: 0; display: flex; }
.hot-box { flex: 1; }
.hot-grid { flex: 1; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); align-content: start; gap: 12px; }
.hot-item { border: 1px solid #c9d8ea; background: var(--panel-alt); min-width: 0; }
.hot-item img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; background: #ddd; }
.hot-item .hi-body { padding: 6px 8px; }
.hot-item .hi-name { font-weight: bold; overflow-wrap: anywhere; }
.hot-item .hi-score { color: var(--hot); font-weight: bold; }
.hot-item .hi-links { display: flex; justify-content: space-between; margin-top: 4px; font-size: 11px; }
.hot-item .hi-links button { background: none; border: 0; padding: 0; color: var(--muted); cursor: pointer; font-size: 11px; text-decoration: underline; }
.hot-empty { color: var(--muted); }

.foot { flex: none; color: #dce8f5; font-size: 10px; text-align: center; }

/* mid widths: drop the history column, keep art + artist side by side */
@media (max-width: 1150px) {
  .tagline { display: none; }
  .rate-layout { grid-template-columns: minmax(0, 1fr) 330px; }
  .left { display: none; }
}
@media (max-width: 900px) {
  .masthead { flex-wrap: wrap; }
  .opts { order: 5; }
}

/* phones: one scrolling column, art first */
@media (max-width: 760px) {
  .app { height: auto; min-height: 100vh; padding: 10px 16px 12px; }
  .logo { font-size: 22px; }
  .logo img { width: 28px; height: 28px; }
  .counter-label { display: none; }
  .tabs { order: 4; width: 100%; }
  .tab { flex: 1; }
  .rate-layout { display: flex; flex-direction: column; }
  .right { display: contents; }
  .center { order: 1; }
  .art-panel { flex: none; height: 54vh; }
  .rate-box { order: 2; }
  .artist-box { order: 3; }
  .left { display: flex; overflow: visible; order: 4; }
  .keys { display: none; }
  .info { overflow: visible; }
  .live-box { flex: none; height: 280px; }
}

/* ---------- website additions ---------- */
.logo-mint { color: #12a86b; text-shadow: 2px 2px 0 #b8f5d6; }
.logo-hot { color: var(--hot); text-shadow: 2px 2px 0 var(--yellow); }
.wallet-btn {
  flex: none; padding: 8px 12px; font-weight: bold; font-size: 11px; cursor: pointer; color: #fff;
  background: linear-gradient(#2fd38a, #0f8a55);
  border: 2px solid; border-color: #c9ffe4 #064d2e #064d2e #c9ffe4;
  box-shadow: 2px 2px 0 rgba(0,0,0,.4); text-shadow: 1px 1px 0 #064d2e;
}
.wallet-btn.on { background: linear-gradient(#ffffff, #dde9f6); color: var(--blue-dark); text-shadow: none; border-color: #fff var(--blue-dark) var(--blue-dark) #fff; font-family: "Courier New", monospace; }
.wallet-btn:disabled { opacity: .7; cursor: wait; }
.collect {
  flex: none; padding: 3px 10px; font-weight: bold; font-size: 11px; cursor: pointer; color: #fff; text-decoration: none;
  background: linear-gradient(#2fd38a, #0f8a55);
  border: 2px solid; border-color: #c9ffe4 #064d2e #064d2e #c9ffe4;
}
.piece-title .collect.done { color: #fff; background: #0f8a55; }
.collect:disabled { opacity: .7; cursor: wait; }
.board-intro { font-size: 11px; color: var(--muted); padding-bottom: 0; }
.board-grid { flex: 1; overflow-y: auto; display: grid; gap: 6px; align-content: start; }
.board-row {
  display: grid; grid-template-columns: 44px 64px minmax(0, 1fr) auto auto; gap: 12px; align-items: center;
  padding: 6px 10px; background: var(--panel-alt); border: 1px solid #c9d8ea;
}
.board-row:nth-child(1) { background: #fff6c2; border-color: #e5c300; }
.board-row .rank { font: 900 26px/1 "Arial Black", Impact, sans-serif; color: var(--blue-dark); text-align: center; }
.board-row:nth-child(-n+3) .rank { color: var(--hot); }
.board-row img { width: 64px; height: 64px; object-fit: cover; display: block; border: 1px solid #999; background: #ddd; }
.board-name { font-weight: bold; font-size: 14px; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.board-name:hover { text-decoration: underline; }
.votes { font: 900 22px/1 "Arial Black", Impact, sans-serif; color: var(--hot); white-space: nowrap; }
.votes small { font: 11px Verdana, sans-serif; color: var(--muted); }
.board-rate {
  padding: 6px 10px; font-weight: bold; font-size: 11px; cursor: pointer; color: #fff;
  background: linear-gradient(var(--blue), var(--blue-dark));
  border: 2px solid; border-color: var(--blue-light) #000 #000 var(--blue-light);
}
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 10;
  max-width: min(520px, calc(100vw - 32px)); padding: 10px 14px;
  background: #000; color: #39ff14; font: 12px/1.4 "Courier New", monospace;
  border: 2px solid #39ff14; box-shadow: 3px 3px 0 rgba(0,0,0,.5);
}
@media (max-width: 760px) {
  .wallet-btn { order: 3; margin-left: auto; }
  .board-row { grid-template-columns: 30px 48px minmax(0, 1fr) auto; gap: 8px; }
  .board-row img { width: 48px; height: 48px; }
  .board-rate { display: none; }
  .piece-title .open-hint { display: none; }
}
/* short screens: the info boxes keep their size, only the live feed gives way */
.left > .box:not(.live-box) { flex: none; }
.live-box { flex: 1 0 160px; }
/* buy states */
.collect { font-size: 12px; padding: 4px 12px; }
.collect.mint { background: linear-gradient(#ffb02e, #e2551a); border-color: #ffe0a8 #6b2306 #6b2306 #ffe0a8; }
.piece-title .collect.view { color: #fff; background: linear-gradient(#6d8fb5, var(--blue-dark)); border-color: var(--blue-light) #000 #000 var(--blue-light); font-weight: bold; }
.strip button { position: relative; }
.sale-dot {
  position: absolute; right: 3px; bottom: 3px; padding: 1px 4px;
  font: bold 9px/1.2 Verdana, sans-serif; color: #fff; background: #0f8a55; border: 1px solid #064d2e;
}
