/* Art Supermarket sim — interactive floor */
.sm-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.75rem 1rem 1.5rem;
  color: #e6ebe8;
}

.sm-top {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.65rem;
}

.sm-top h2 {
  margin: 0 0 0.25rem;
  font-size: 1.25rem;
  color: #b8f0c8;
}

.sm-hint {
  margin: 0;
  max-width: 40rem;
  font-size: 0.86rem;
  line-height: 1.4;
  color: rgba(200, 214, 206, 0.9);
}

.sm-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.sm-toolbar button,
.sm-side button {
  font: inherit;
  font-size: 0.78rem;
  padding: 0.35rem 0.55rem;
  border-radius: 7px;
  border: 1px solid rgba(100, 180, 130, 0.4);
  background: rgba(20, 40, 30, 0.9);
  color: #e0f0e4;
  cursor: pointer;
}

.sm-toolbar button.accent,
.sm-side button.accent {
  background: linear-gradient(180deg, #2a6b45, #1a4030);
  border-color: rgba(120, 220, 150, 0.5);
  font-weight: 700;
}

.sm-toolbar button:disabled,
.sm-side button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.sm-body {
  display: grid;
  grid-template-columns: 1fr minmax(16rem, 22rem);
  gap: 0.75rem;
}

@media (max-width: 960px) {
  .sm-body {
    grid-template-columns: 1fr;
  }
}

/* Floor + left generate orb (orb sits outside the market, mid-aisle height) */
.sm-floor-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.sm-result-orb {
  flex-shrink: 0;
  width: 4.75rem;
  height: 4.75rem;
  border-radius: 50%;
  padding: 0;
  margin: 0;
  border: 2px solid rgba(140, 220, 170, 0.55);
  background: radial-gradient(circle at 35% 30%, #1a3024, #0a100e 70%);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.35), 0 0 18px rgba(80, 180, 120, 0.25);
  cursor: pointer;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  align-self: center;
}

.sm-result-orb:hover {
  border-color: rgba(180, 255, 200, 0.85);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.4), 0 0 22px rgba(120, 230, 160, 0.4);
}

.sm-result-orb.has-image {
  border-color: rgba(255, 220, 120, 0.75);
}

.sm-result-orb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sm-result-orb-ph {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(160, 210, 180, 0.65);
  pointer-events: none;
}

.sm-result-orb.working .sm-result-orb-ph {
  color: #ffd98a;
  animation: sm-orb-pulse 1s ease-in-out infinite;
}

@keyframes sm-orb-pulse {
  0%,
  100% {
    opacity: 0.55;
  }
  50% {
    opacity: 1;
  }
}

.sm-lightbox {
  position: fixed;
  inset: 0;
  z-index: 13000;
  background: rgba(0, 0, 0, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.sm-lightbox[hidden] {
  display: none !important;
}

.sm-lightbox-panel {
  width: min(52rem, 100%);
  max-height: 90vh;
  overflow: auto;
  border-radius: 12px;
  border: 1px solid rgba(140, 220, 170, 0.4);
  background: #101816;
  padding: 0.75rem;
}

.sm-lightbox-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.sm-lightbox-panel img,
.sm-lightbox-panel video {
  display: block;
  width: 100%;
  max-height: min(78vh, 900px);
  object-fit: contain;
  border-radius: 8px;
  background: #000;
}

.sm-floor-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
  border-radius: 12px;
  border: 1px solid rgba(100, 160, 120, 0.35);
  background: #0c1210;
  overflow: hidden;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.45);
}

#sm-canvas {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(70vh, 640px);
  touch-action: none;
  cursor: crosshair;
}

.sm-hud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.85rem;
  padding: 0.4rem 0.55rem;
  font-size: 0.72rem;
  background: rgba(0, 0, 0, 0.45);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: rgba(200, 220, 210, 0.9);
}

.sm-hud strong {
  color: #9dffb8;
  font-variant-numeric: tabular-nums;
}

.sm-side {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  max-height: min(78vh, 720px);
  overflow: auto;
}

.sm-card {
  border-radius: 10px;
  border: 1px solid rgba(100, 160, 120, 0.28);
  background: linear-gradient(165deg, rgba(14, 28, 20, 0.96), rgba(8, 12, 10, 0.98));
  padding: 0.65rem 0.75rem;
}

.sm-card h3 {
  margin: 0 0 0.4rem;
  font-size: 0.88rem;
  color: #a8e0b8;
}

.sm-card h4 {
  margin: 0.45rem 0 0.25rem;
  font-size: 0.78rem;
  color: #8ec8a0;
}

.sm-muted {
  font-size: 0.75rem;
  color: rgba(170, 190, 180, 0.75);
  line-height: 1.35;
  margin: 0 0 0.4rem;
}

.sm-day-table-wrap {
  margin-top: 0.4rem;
  max-height: 22rem;
  overflow: auto;
  border-radius: 8px;
  border: 1px solid rgba(100, 160, 120, 0.28);
  background: rgba(0, 0, 0, 0.28);
}

.sm-day-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.72rem;
  line-height: 1.35;
}

.sm-day-table th,
.sm-day-table td {
  vertical-align: top;
  text-align: left;
  padding: 0.4rem 0.45rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sm-day-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(18, 32, 24, 0.97);
  color: #9ed8b0;
  font-weight: 700;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.sm-day-table td.sm-day-name {
  width: 5.5rem;
  font-weight: 700;
  color: #c8f0d4;
  white-space: nowrap;
}

.sm-day-table td.sm-day-inv {
  width: 6.5rem;
  color: rgba(210, 225, 215, 0.92);
}

.sm-day-table td.sm-day-prompt {
  color: rgba(200, 214, 206, 0.9);
  word-break: break-word;
}

.sm-day-table .sm-day-prompt-full {
  max-height: 5.5rem;
  overflow: auto;
  white-space: pre-wrap;
  font-size: 0.7rem;
}

.sm-inv-carousel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  min-width: 5.5rem;
}

.sm-inv-row {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.sm-inv-carousel button {
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  width: 1.45rem;
  height: 1.45rem;
  padding: 0;
  border-radius: 5px;
  border: 1px solid rgba(100, 160, 120, 0.45);
  background: rgba(20, 40, 30, 0.95);
  color: #c8f0d4;
  cursor: pointer;
  flex-shrink: 0;
}

.sm-inv-carousel button:hover {
  border-color: rgba(140, 220, 160, 0.7);
  color: #fff;
}

.sm-inv-one {
  width: 3.6rem;
  height: 3.6rem;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid rgba(180, 220, 200, 0.4);
  background: rgba(0, 0, 0, 0.4);
  display: block;
}

.sm-inv-one.sm-inv-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: rgba(160, 180, 170, 0.7);
}

.sm-inv-idx {
  font-size: 0.68rem;
  font-variant-numeric: tabular-nums;
  color: rgba(170, 200, 180, 0.85);
}

.sm-mod-report {
  margin-top: 0.35rem;
  padding: 0.45rem 0.5rem;
  border-radius: 6px;
  background: rgba(20, 12, 12, 0.45);
  border: 1px solid rgba(200, 100, 90, 0.25);
  font-size: 0.74rem;
  line-height: 1.4;
  color: #e8d8d4;
}

.sm-mod-report.clean {
  background: rgba(12, 24, 18, 0.45);
  border-color: rgba(100, 180, 130, 0.3);
  color: #c8e8d4;
}

.sm-mod-report ul {
  margin: 0.25rem 0 0;
  padding-left: 1.1rem;
}

.sm-mod-report li {
  margin: 0.15rem 0;
}

.sm-mod-report .sm-mod-word {
  font-weight: 700;
  color: #ffb0a0;
}

.sm-day-closed-banner {
  font-size: 0.78rem;
  color: #ffd98a;
  margin: 0.25rem 0 0.4rem;
}

.sm-receipt-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 12rem;
  overflow: auto;
  font-size: 0.74rem;
}

.sm-receipt-list-tall {
  max-height: 16rem;
}

.sm-live-list {
  max-height: 14rem;
}

.sm-receipt-list li {
  padding: 0.35rem 0.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sm-receipt-list li.sm-receipt-clickable {
  cursor: pointer;
  border-radius: 6px;
}

.sm-receipt-list li.sm-receipt-clickable:hover {
  background: rgba(60, 100, 80, 0.28);
}

.sm-receipt-list li.sm-receipt-selected {
  outline: 1px solid rgba(125, 255, 179, 0.55);
  background: rgba(40, 90, 60, 0.35);
}

.sm-receipt-list .sm-who {
  font-weight: 700;
  color: #c8f0d4;
}

.sm-sort-label {
  display: block;
  font-size: 0.72rem;
  color: rgba(170, 190, 180, 0.85);
  margin: 0.15rem 0 0.2rem;
}

.sm-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
  align-items: center;
  margin: 0.28rem 0 0.15rem;
}

.sm-thumb {
  width: 2.35rem;
  height: 2.35rem;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid rgba(180, 220, 200, 0.35);
  background: rgba(0, 0, 0, 0.35);
  vertical-align: middle;
}

.sm-thumb-empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: rgba(180, 200, 190, 0.7);
}

.sm-receipt-detail {
  margin-top: 0.55rem;
  padding: 0.55rem 0.6rem;
  border-radius: 8px;
  border: 1px solid rgba(100, 160, 120, 0.28);
  background: rgba(0, 0, 0, 0.28);
}

.sm-receipt-detail h4 {
  margin: 0 0 0.35rem;
  font-size: 0.85rem;
  color: #b8f0c8;
}

.sm-receipt-prompt-edit {
  width: 100%;
  min-height: 7.5rem;
  resize: vertical;
  box-sizing: border-box;
  font: inherit;
  font-size: 0.76rem;
  line-height: 1.4;
  padding: 0.45rem;
  border-radius: 8px;
  border: 1px solid rgba(100, 160, 120, 0.35);
  background: rgba(0, 0, 0, 0.45);
  color: #e8f0ea;
  white-space: pre-wrap;
}

.sm-mod-preview {
  margin-top: 0.4rem;
  max-height: 8rem;
  overflow: auto;
  font-size: 0.74rem;
  line-height: 1.4;
  padding: 0.4rem 0.45rem;
  border-radius: 6px;
  background: rgba(8, 12, 10, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #d8e8de;
  white-space: pre-wrap;
  word-break: break-word;
}

.sm-hl-mark {
  border-radius: 2px;
  padding: 0 0.12em;
  font-weight: 700;
}

.sm-hl-mark.high {
  background: rgba(255, 80, 80, 0.45);
  color: #ffe8e8;
  box-shadow: 0 0 0 1px rgba(255, 120, 120, 0.5);
}

.sm-hl-mark.med {
  background: rgba(255, 190, 60, 0.4);
  color: #fff6e0;
  box-shadow: 0 0 0 1px rgba(255, 200, 80, 0.45);
}

.sm-mod-flags {
  font-size: 0.72rem;
  margin: 0.3rem 0 0;
  color: #ffc98a;
}

.sm-player-prompt {
  width: 100%;
  min-height: 5.5rem;
  resize: vertical;
  box-sizing: border-box;
  font: inherit;
  font-size: 0.78rem;
  line-height: 1.35;
  padding: 0.45rem;
  border-radius: 8px;
  border: 1px solid rgba(100, 160, 120, 0.35);
  background: rgba(0, 0, 0, 0.4);
  color: #e8f0ea;
}

.sm-char-count {
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  margin: 0.25rem 0 0.4rem;
}

.sm-char-count.warn {
  color: #ffc98a;
}

.sm-char-count.over {
  color: #ff8a8a;
  font-weight: 700;
}

.sm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.4rem;
}

.sm-name-edit {
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  font-size: 0.8rem;
  padding: 0.35rem 0.45rem;
  border-radius: 6px;
  border: 1px solid rgba(100, 160, 120, 0.35);
  background: rgba(0, 0, 0, 0.35);
  color: #e8f0ea;
  margin-bottom: 0.35rem;
}

.sm-status {
  font-size: 0.78rem;
  min-height: 1.2em;
  color: #9ec8f0;
  margin: 0.25rem 0 0;
}

.sm-status.err {
  color: #ffb0a8;
}

.sm-status.ok {
  color: #7dffb3;
}

.sm-chars-high {
  color: #7dffb3;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  font-size: 0.95em;
}

.sm-receipt-high {
  border-left: 3px solid #7dffb3;
  padding-left: 0.35rem !important;
  background: rgba(40, 80, 55, 0.25);
}

.sm-char-bar {
  height: 0.35rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.4);
  overflow: hidden;
  margin: 0.25rem 0 0.3rem;
}

.sm-char-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #3d9a5c, #9dffb8);
}

.sm-preview {
  margin-top: 0.4rem;
  max-width: 100%;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: none;
}

.sm-preview.show {
  display: block;
}

.sm-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.85rem;
  font-size: 0.68rem;
  color: rgba(180, 200, 190, 0.8);
  margin-top: 0.35rem;
}

.sm-legend i {
  display: inline-block;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 0.2rem;
}

.sm-legend .sm-lg-you {
  background: #5cf0a0;
}

.sm-legend .sm-lg-npc {
  background: #6ab0ff;
}

.sm-legend .sm-lg-empty {
  background: #555;
  border-radius: 2px;
}

.sm-legend .sm-lg-stock {
  background: #c9a227;
  border-radius: 2px;
}

.sm-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 12000;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.sm-modal-backdrop[hidden] {
  display: none !important;
}

.sm-modal {
  width: min(28rem, 100%);
  max-height: 80vh;
  overflow: auto;
  border-radius: 12px;
  border: 1px solid rgba(120, 200, 140, 0.4);
  background: #121a16;
  padding: 1rem;
}

.sm-modal h3 {
  margin: 0 0 0.5rem;
  color: #b8f0c8;
}

.sm-pick-list {
  list-style: none;
  margin: 0.5rem 0;
  padding: 0;
  max-height: 14rem;
  overflow: auto;
}

.sm-pick-list button {
  width: 100%;
  text-align: left;
  font: inherit;
  font-size: 0.8rem;
  padding: 0.4rem 0.5rem;
  margin-bottom: 0.25rem;
  border-radius: 6px;
  border: 1px solid rgba(100, 160, 120, 0.3);
  background: rgba(0, 0, 0, 0.35);
  color: #e0f0e4;
  cursor: pointer;
}

.sm-pick-list button:hover {
  border-color: rgba(140, 220, 160, 0.55);
}
