/* Art is loud only inside the window body. Shell chrome and reading text stay canonical. */
html[data-skin] #os > .win[data-art] {
  position: absolute;
}

.win[data-art] > .body.art-body {
  overflow: hidden;
  background: var(--rvls-color-canvas);
}

.art-app {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  background: var(--rvls-color-canvas);
}

.art-tools {
  display: flex;
  min-height: 28px;
  flex: none;
  align-items: center;
  gap: 4px;
  padding: 3px 4px;
  border-bottom: 1px solid var(--rvls-color-chrome-edge);
  background: var(--rvls-color-chrome);
  color: var(--rvls-color-chrome-text);
  font: 13px/1.15 var(--rvls-font-interface);
}

.art-tools button {
  min-height: 22px;
  padding: 0 7px;
  border: var(--rvls-window-border);
  border-radius: var(--rvls-radius);
  background: var(--rvls-color-chrome);
  color: var(--rvls-color-chrome-text);
  box-shadow: var(--rvls-bevel-raised);
  font: inherit;
}

.art-tools button:active {
  box-shadow: var(--rvls-bevel-sunken);
}

.art-file {
  min-width: 0;
  margin-left: auto;
  overflow: hidden;
  color: var(--rvls-color-paper-muted-text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.art-mount,
.art-surface {
  position: relative;
  display: flex;
  min-height: 0;
  flex: 1;
}

.art-surface {
  isolation: isolate;
  overflow: hidden;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--rvls-color-field-raised) 90%, black), var(--rvls-color-canvas));
  box-shadow:
    inset 1px 1px 0 var(--rvls-relief-light),
    inset -1px -1px 0 var(--rvls-relief-shadow);
}

.art-stage {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 0;
  flex: 1;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  place-items: stretch;
  overflow: hidden;
}

.art-image,
.art-procedure {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  filter: drop-shadow(0 0 10px color-mix(in srgb, var(--rvls-relief-glow) 22%, transparent));
}

.art-sigil-host {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  overflow: hidden;
}

.art-sigil-host canvas {
  display: block;
  max-width: 100%;
  max-height: 100%;
  filter: drop-shadow(0 0 8px color-mix(in srgb, var(--rvls-color-accent-cyan) 35%, transparent));
}

.art-life {
  position: absolute;
  right: 4px;
  bottom: 4px;
  z-index: 2;
  padding: 2px 5px;
  border: 1px solid var(--rvls-color-chrome-edge);
  background: var(--rvls-color-chrome);
  color: var(--rvls-color-chrome-text);
  font: 10px/1.15 var(--rvls-font-data);
  text-transform: none;
}

.art-surface[data-awake="false"] .art-life {
  color: var(--rvls-color-paper-muted-text);
  background: var(--rvls-color-paper);
}

.art-slot {
  display: grid;
  width: 100%;
  height: 100%;
  place-content: center;
  gap: 6px;
  padding: 14px;
  color: var(--rvls-color-text-on-dark);
  background:
    repeating-linear-gradient(135deg, transparent 0 11px, color-mix(in srgb, var(--rvls-color-fire-violet) 16%, transparent) 11px 12px),
    var(--rvls-color-field);
  font: 13px/1.35 var(--rvls-font-reading);
  text-align: center;
}

.art-slot strong {
  color: var(--rvls-color-fire-violet);
  font: 22px/1 var(--rvls-font-interface);
}

.art-slot small {
  color: var(--rvls-color-chrome);
  font-size: 11px;
}

.art-missing {
  margin: 0;
  padding: 12px;
  color: var(--rvls-color-paper);
  font: 13px/1.45 var(--rvls-font-reading);
}

.art-index {
  display: grid;
  gap: 8px;
  padding: 8px;
  background: var(--rvls-color-canvas);
}

.art-index-card {
  display: grid;
  gap: 3px;
  margin: 0;
  color: var(--rvls-color-paper);
  font: 11px/1.3 var(--rvls-font-data);
}

.art-index-card button {
  display: grid;
  width: 100%;
  min-height: 180px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--rvls-color-chrome-edge);
  background: var(--rvls-color-field);
  box-shadow: inset 1px 1px 0 var(--rvls-relief-light);
}

.art-index-card img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 50vh;
  object-fit: contain;
}

.art-index-slot {
  color: var(--rvls-color-fire-violet);
  font: 18px/1 var(--rvls-font-interface);
}

.art-surface[data-mobile="true"] {
  min-height: 240px;
}

html[data-mode="phone"] .win[data-art] > .body.art-body {
  margin: 0;
}

html[data-mode="phone"] .art-app {
  min-height: 100%;
  overflow: auto;
}

html[data-mode="phone"] .art-tools {
  position: sticky;
  top: 0;
  z-index: 3;
  flex-wrap: wrap;
}

html[data-mode="phone"] .art-file {
  width: 100%;
  margin: 2px 0 0;
  white-space: normal;
}

@media (max-width: 640px) {
  .art-surface {
    min-height: min(62vh, 420px);
  }

  .art-image,
  .art-procedure {
    max-height: 62vh;
  }
}

@media (prefers-reduced-motion: reduce) {
  .art-surface .art-sigil-host canvas {
    filter: none;
  }
}

.art-twinkle {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
