/* Home shell: Portfolio explorer + placeholder overlays (ASTERRVN_OS) */

.asterrvn-home-overlay-root {
  position: fixed;
  inset: 0;
  z-index: 160;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.86);
}

.asterrvn-home-overlay-root.asterrvn-home-overlay-root--dim {
  cursor: default;
}

/* Default chrome (Skillz / Assets placeholders) */
.asterrvn-home-os-window {
  width: min(560px, 100%);
  max-height: min(78vh, 640px);
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(0, 200, 255, 0.28);
  background: linear-gradient(165deg, #0a1018 0%, #050709 55%, #020306 100%);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.9),
    0 12px 32px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(120, 220, 255, 0.04);
  font-family: var(--mono, "Departure Mono", monospace);
  color: var(--text-main, #dff8ff);
}

.asterrvn-home-os-window--wide {
  width: min(720px, 100%);
}

.asterrvn-home-os-window__titlebar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(0, 180, 255, 0.18);
  background: rgba(0, 12, 20, 0.55);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.asterrvn-home-os-window__mods {
  display: flex;
  gap: 4px;
}

.asterrvn-home-os-window__mod-bit {
  width: 7px;
  height: 7px;
  border-radius: 1px;
  background: rgba(255, 80, 120, 0.45);
}

.asterrvn-home-os-window__mod-bit:nth-child(2) {
  background: rgba(255, 200, 80, 0.4);
}

.asterrvn-home-os-window__mod-bit:nth-child(3) {
  background: rgba(80, 220, 140, 0.4);
}

.asterrvn-home-os-window__title {
  flex: 1;
  min-width: 0;
  color: var(--accent-bright, #7cf);
}

.asterrvn-home-os-window__close {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.5);
  color: rgba(200, 208, 216, 0.9);
  width: 28px;
  height: 24px;
  font-size: 14px;
  line-height: 1;
  cursor: url("refs/New-Cursor-Finger.png") 8 1, pointer;
  padding: 0;
}

.asterrvn-home-os-window__close:hover {
  border-color: rgba(255, 255, 255, 0.28);
  color: var(--text-bright, #e8edf4);
}

.asterrvn-home-os-window__path {
  padding: 6px 12px;
  font-size: 9px;
  letter-spacing: 0.1em;
  opacity: 0.72;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.asterrvn-home-os-window__body {
  padding: 12px 14px 16px;
  overflow: auto;
  flex: 1;
  min-height: 0;
}

.asterrvn-home-os-window__toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.asterrvn-home-os-window__toolbar button.asterrvn-home-btn {
  font-family: var(--pixel-en, monospace);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 7px 12px;
  border: 1px solid rgba(0, 200, 255, 0.35);
  background: rgba(0, 40, 70, 0.45);
  color: var(--accent-bright, #7cf);
  cursor: url("refs/New-Cursor-Finger.png") 8 1, pointer;
}

.asterrvn-home-os-window__toolbar button.asterrvn-home-btn:hover {
  border-color: rgba(120, 230, 255, 0.5);
}

.asterrvn-home-os-window__toolbar button.asterrvn-home-btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.asterrvn-home-placeholder-block {
  padding: 22px 16px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  background: rgba(0, 10, 18, 0.5);
  text-align: center;
}

.asterrvn-home-placeholder-block h3 {
  margin: 0 0 10px;
  font-family: var(--pixel-en, monospace);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--accent-bright, #8df);
}

.asterrvn-home-placeholder-block p {
  margin: 0;
  font-size: 10px;
  letter-spacing: 0.06em;
  line-height: 1.6;
  color: rgba(210, 235, 255, 0.72);
}

body.asterrvn-home-overlay-open {
  overflow: hidden;
}

/* ——— Portfolio explorer: strict monochrome shell ——— */

.asterrvn-home-os-window--portfolio {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #000000;
  box-shadow: 0 0 0 1px #000000, 0 10px 28px rgba(0, 0, 0, 0.75);
  color: var(--text, #c8d0db);
  /* Match .terminal-body (10a-system-illusion-hero-terminal-modal-base.css) */
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.7;
  font-weight: normal;
}

.asterrvn-home-os-window--portfolio .asterrvn-home-os-window__titlebar {
  min-height: 28px;
  padding: 6px 8px 7px;
  gap: 8px;
  background: #050505;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 12px;
  line-height: 1.7;
  letter-spacing: 0;
  text-transform: none;
  font-family: inherit;
}

/* Single static titlebar marker (Portfolio only); not interactive */
.asterrvn-home-os-window--portfolio .asterrvn-home-os-window__mod-single {
  display: block;
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  box-sizing: border-box;
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.14);
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

.asterrvn-home-os-window--portfolio .asterrvn-home-os-window__title {
  color: var(--text, #c8d0db);
  font-family: inherit;
  font-size: 12px;
  line-height: 1.7;
  letter-spacing: 0;
  font-weight: normal;
  text-shadow: none;
}

.asterrvn-home-os-window--portfolio .asterrvn-home-os-window__close {
  width: 28px;
  height: 22px;
  font-size: 12px;
  line-height: 1;
  border: 1px solid #2a2a2a;
  background: #050505;
  color: #d8d8d8;
  font-family: inherit;
}

.asterrvn-home-os-window--portfolio .asterrvn-home-os-window__close:hover {
  border-color: rgba(255, 255, 255, 0.22);
  color: #f0f0f0;
  background: #111111;
}

.asterrvn-home-os-window--portfolio .asterrvn-home-os-window__path {
  padding: 6px 10px 7px;
  font-size: 12px;
  line-height: 1.7;
  letter-spacing: 0;
  color: #777777;
  opacity: 1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: #030303;
  font-family: inherit;
}

.asterrvn-home-os-window--portfolio .asterrvn-home-os-window__body {
  padding: 10px 12px 14px;
  background: #030303;
  font-family: inherit;
  font-size: 12px;
  line-height: 1.7;
}

.asterrvn-home-os-window--portfolio .asterrvn-home-os-window__toolbar {
  gap: 6px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  position: relative;
  z-index: 3;
}

.asterrvn-home-os-window--portfolio button.asterrvn-home-btn:not(:disabled) {
  pointer-events: auto;
}

/* Apply the dark portfolio button skin to every .asterrvn-home-btn
 * inside the portfolio shell, not just inside the toolbar. The
 * APPLY_RENAME / CANCEL buttons live in .asterrvn-portfolio-rename-row
 * and were previously falling through to the user-agent default
 * (white background) because the old selector was scoped to the
 * toolbar wrapper only. */
.asterrvn-home-os-window--portfolio button.asterrvn-home-btn {
  padding: 5px 10px 6px;
  font-size: 12px;
  line-height: 1.7;
  letter-spacing: 0;
  text-transform: none;
  border: 1px solid #2a2a2a;
  background: #030303;
  color: #d8d8d8;
  box-shadow: none;
  font-family: inherit;
}

.asterrvn-home-os-window--portfolio button.asterrvn-home-btn:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.18);
  color: #f0f0f0;
  background: #111111;
}

.asterrvn-home-os-window--portfolio button.asterrvn-home-btn:disabled {
  opacity: 1;
  border-color: #222222;
  color: #333333;
  background: #030303;
}

/* Portfolio CASE view — Behance-like: chromeless hero, content full width inside .gallery-view */
.view[data-view="portfolio-case"] > .gallery-view > .gallery-controls {
  display: none !important;
}

.view[data-view="portfolio-case"] > .gallery-view {
  padding-left: 0;
  padding-right: 0;
}

.view[data-view="portfolio-case"] .asterrvn-portfolio-case-page-body {
  max-width: none;
  padding-left: 0;
  padding-right: 0;
  padding-top: 0;
  width: 100%;
  box-sizing: border-box;
}

.view[data-view="portfolio-case"] .asterrvn-portfolio-page-toolbar {
  margin-bottom: 8px;
  padding-left: 40px;
  padding-right: 40px;
}

.asterrvn-portfolio-folder-page-body {
  padding: 16px 14px 24px;
  max-width: 960px;
}

.asterrvn-portfolio-folder-page-empty,
.asterrvn-portfolio-case-page-empty {
  font-family: var(--mono, "Departure Mono", monospace);
  font-size: 12px;
  line-height: 1.55;
  color: #777777;
  margin-bottom: 16px;
}

.asterrvn-portfolio-folder-page-empty strong,
.asterrvn-portfolio-case-page-empty strong {
  color: #d8d8d8;
  font-weight: normal;
}

/* Stage B: case grid + case page chrome.
 * Reuses the dark portfolio aesthetic from the shell so the folder
 * page (case index) and case page feel like extensions of the shell
 * window, not a separate gallery view. */
.asterrvn-portfolio-page-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.asterrvn-portfolio-page-toolbar .filter-btn,
.asterrvn-portfolio-page-back,
.asterrvn-portfolio-page-action {
  font-family: var(--mono, "Departure Mono", monospace);
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
  padding: 5px 10px 6px;
  border: 1px solid #2a2a2a;
  background: #030303;
  color: #d8d8d8;
}

.asterrvn-portfolio-page-toolbar .filter-btn:hover:not(:disabled),
.asterrvn-portfolio-page-back:hover:not(:disabled),
.asterrvn-portfolio-page-action:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.18);
  color: #f0f0f0;
  background: #111111;
}

.asterrvn-portfolio-page-action--danger {
  color: #d8a0a0;
  border-color: #4a2a2a;
}
.asterrvn-portfolio-page-action--danger:hover:not(:disabled) {
  background: #1a0606;
  color: #e0b8b8;
  border-color: #6a3030;
}

.asterrvn-portfolio-case-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.asterrvn-portfolio-case-tile {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: stretch;
  text-align: left;
  padding: 10px;
  border: 1px solid #1f1f1f;
  background: #050505;
  color: #d8d8d8;
  font-family: var(--mono, "Departure Mono", monospace);
  font-size: 12px;
  cursor: url("../../refs/New-Cursor-Finger.png") 8 1, pointer;
  transition: border-color 120ms ease, background 120ms ease;
}

.asterrvn-portfolio-case-tile:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: #0a0a0a;
}

.asterrvn-portfolio-case-tile__cover {
  position: relative;
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #161616;
  background: #020202;
  overflow: hidden;
}

.asterrvn-portfolio-case-tile__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.asterrvn-portfolio-case-tile__cover-placeholder {
  font-family: var(--pixel-en, monospace);
  font-size: 9px;
  letter-spacing: 0.18em;
  color: #444444;
}

.asterrvn-portfolio-case-tile__title {
  font-size: 13px;
  color: #e8e8e8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.asterrvn-portfolio-case-tile__desc {
  font-size: 11px;
  line-height: 1.4;
  color: #888888;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Case page (single case) */
.asterrvn-portfolio-case-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid #1f1f1f;
  background: #020202;
  margin-bottom: 16px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.asterrvn-portfolio-case-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.asterrvn-portfolio-case-cover-placeholder {
  font-family: var(--pixel-en, monospace);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: #444444;
}

.asterrvn-portfolio-case-title {
  font-family: var(--mono, "Departure Mono", monospace);
  font-size: 18px;
  color: #f0f0f0;
  margin: 0 0 12px;
  letter-spacing: 0;
}

.asterrvn-portfolio-case-description {
  font-family: var(--mono, "Departure Mono", monospace);
  font-size: 13px;
  line-height: 1.6;
  color: #c8c8c8;
  margin-bottom: 18px;
  white-space: pre-wrap;
  word-break: break-word;
}

.asterrvn-portfolio-case-description--hint {
  color: #555555;
  font-size: 12px;
  font-style: italic;
}

.asterrvn-portfolio-case-blocks-stub {
  margin-top: 24px;
  padding: 22px 16px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.02);
  text-align: center;
  font-family: var(--mono, "Departure Mono", monospace);
  font-size: 12px;
  color: #777777;
  line-height: 1.6;
}

.asterrvn-portfolio-case-blocks-stub strong {
  display: block;
  color: #d8d8d8;
  font-weight: normal;
  margin-bottom: 8px;
}

/* Stage C: case blocks — Behance-style stack, zero gap between blocks */
.asterrvn-case-blocks {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 0;
}

.asterrvn-case-blocks-empty {
  font-family: var(--mono, "Departure Mono", monospace);
  font-size: 12px;
  color: #555555;
  font-style: italic;
}

.asterrvn-case-rotate-prompt {
  min-height: calc(100vh - 160px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px 18px;
  box-sizing: border-box;
  text-align: center;
  font-family: var(--mono, "Departure Mono", monospace);
  color: #d8d8d8;
  background: #000000;
}
.asterrvn-case-rotate-prompt__label {
  font-family: var(--pixel-en, monospace);
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--accent-bright);
}
.asterrvn-case-rotate-prompt__icon {
  width: 42px;
  height: 42px;
  background: var(--accent-bright);
  filter: drop-shadow(0 0 12px rgba(90, 146, 255, 0.42));
  -webkit-mask: url("../../refs/rotate.png") center / contain no-repeat;
  mask: url("../../refs/rotate.png") center / contain no-repeat;
  animation: asterrvnRotatePromptSpin 3.5s linear infinite;
}
@keyframes asterrvnRotatePromptSpin {
  to { transform: rotate(-360deg); }
}
.asterrvn-case-rotate-prompt__body {
  max-width: 320px;
  font-size: 12px;
  line-height: 1.55;
  color: #888888;
}

.asterrvn-case-block {
  position: relative;
  font-family: var(--mono, "Departure Mono", monospace);
  color: #c8c8c8;
  font-size: 13px;
  line-height: 1.6;
  margin: 0;
  padding: 0;
}

.asterrvn-case-block--video {
  line-height: 0;
  font-size: 0;
}

.asterrvn-case-block--text {
  white-space: pre-wrap;
  word-break: break-word;
  padding: 14px 16px;
  box-sizing: border-box;
}

.asterrvn-case-block--center {
  text-align: center;
}

.asterrvn-case-block__heading {
  font-family: var(--mono, "Departure Mono", monospace);
  font-size: 16px;
  color: #f0f0f0;
  margin: 0 0 10px;
  letter-spacing: 0;
}

.asterrvn-case-block__body {
  white-space: pre-wrap;
  word-break: break-word;
}

.asterrvn-case-block__image,
.asterrvn-case-block__video {
  width: 100%;
  height: auto;
  max-height: none;
  display: block;
  border: none;
  background: #000000;
  vertical-align: top;
  margin: 0;
}

.asterrvn-case-block__video-shell {
  width: 100%;
  display: block;
  line-height: 0;
  background: #000000;
  position: relative;
  overflow: hidden;
}

.asterrvn-case-hitbox-host {
  position: relative;
}

.asterrvn-case-hitbox-link,
.asterrvn-case-hitbox-shape {
  position: absolute;
  inset: 0;
  z-index: 5;
  width: 100%;
  height: 100%;
  cursor: url("../../refs/New-Cursor-Finger.png") 8 1, pointer;
}

.asterrvn-case-hitbox-link {
  display: block;
  background: transparent;
}

.asterrvn-case-hitbox-shape--admin {
  z-index: 12;
  pointer-events: none;
  background: rgba(42, 109, 255, 0.12);
  outline: 1px solid rgba(90, 146, 255, 0.65);
}

.asterrvn-case-hitbox-handle {
  position: absolute;
  z-index: 14;
  width: 10px;
  height: 10px;
  padding: 0;
  border: 1px solid var(--accent-bright);
  background: #050505;
  box-shadow: 0 0 8px rgba(90, 146, 255, 0.35);
  cursor: move;
  pointer-events: auto;
  transform: translate(-50%, -50%);
}

.asterrvn-case-hitbox-actions {
  position: relative;
  z-index: 13;
  background: rgba(0, 0, 0, 0.82);
}

@media (min-width: 1025px) {
  .asterrvn-case-block__video-shell {
    width: calc(100% + 2px);
    margin-left: -1px;
    margin-right: -1px;
  }

  .asterrvn-case-block__video,
  .asterrvn-case-block__video-poster {
    width: 100%;
    display: block;
  }
}

.asterrvn-case-block__video-poster {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
  opacity: 1;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

.asterrvn-case-block__video-shell.is-video-ready .asterrvn-case-block__video-poster {
  opacity: 0;
}

.asterrvn-case-block__video-shell.is-video-error .asterrvn-case-block__video-poster {
  opacity: 1;
}

.asterrvn-case-block__video-player-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 8px 10px;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.45);
}

.asterrvn-case-block__video-player-btn.filter-btn {
  font-family: var(--mono, "Departure Mono", monospace);
  font-size: 11px;
  padding: 4px 10px;
  border: 1px solid #3a3a3a;
  background: #0a0a0a;
  color: #b8e8ff;
}

.asterrvn-case-block__caption {
  margin-top: 0;
  padding: 10px 16px 0;
  box-sizing: border-box;
  color: #777777;
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: 0;
}

.asterrvn-case-block__actions {
  margin-top: 8px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 13px;
  line-height: 1.6;
}

.asterrvn-case-block__action {
  font-family: var(--mono, "Departure Mono", monospace);
  font-size: 11px;
  letter-spacing: 0;
  text-transform: none;
  padding: 4px 8px;
  border: 1px solid #2a2a2a;
  background: #030303;
  color: #d8d8d8;
}

.asterrvn-case-block__action:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.18);
  color: #f0f0f0;
  background: #111111;
}

.asterrvn-case-lang-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 10px 0;
  font-family: var(--mono, "Departure Mono", monospace);
  font-size: 11px;
  color: #c8c8c8;
}

.asterrvn-case-block__action--danger {
  color: #d8a0a0;
  border-color: #4a2a2a;
}
.asterrvn-case-block__action--danger:hover:not(:disabled) {
  background: #1a0606;
  color: #e0b8b8;
  border-color: #6a3030;
}

.asterrvn-case-add-block {
  margin-top: 8px;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.asterrvn-case-add-block__label {
  font-family: var(--pixel-en, monospace);
  font-size: 9px;
  letter-spacing: 0.18em;
  color: #d8d8d8;
}

.asterrvn-case-add-block__btn {
  font-family: var(--mono, "Departure Mono", monospace);
  font-size: 11px;
  padding: 4px 10px;
  border: 1px solid #2a2a2a;
  background: #030303;
  color: #d8d8d8;
}

.asterrvn-case-add-block__btn:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.2);
  color: #f0f0f0;
  background: #111111;
}

/* ---------- Stage C.5: photo-grid + audio ---------- */

.asterrvn-case-block__grid {
  display: grid;
  gap: 0;
  width: 100%;
}
.asterrvn-case-block__grid--cols1 { grid-template-columns: 1fr; }
.asterrvn-case-block__grid--cols2 { grid-template-columns: repeat(2, 1fr); }
.asterrvn-case-block__grid--cols3 { grid-template-columns: repeat(3, 1fr); }
.asterrvn-case-block__grid--cols4 { grid-template-columns: repeat(4, 1fr); }

.asterrvn-case-block__grid-cell {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #000000;
  border: none;
  overflow: hidden;
}
.asterrvn-case-block__grid-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 720px) {
  .asterrvn-case-block__grid--cols3,
  .asterrvn-case-block__grid--cols4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.asterrvn-case-block__audio-title {
  font-family: var(--mono, "Departure Mono", monospace);
  font-size: 13px;
  color: #f0f0f0;
  margin: 0 0 8px;
}

.asterrvn-case-block__audio {
  width: 100%;
  display: block;
  background: #020202;
  border: 1px solid #1f1f1f;
  padding: 6px 8px;
}

@media (orientation: landscape) and (max-height: 640px) {
  body.asterrvn-phone-landscape-blocked {
    overflow: hidden;
    background: #000000;
  }
  body.asterrvn-phone-landscape-blocked .os-window {
    visibility: hidden;
  }
  body.asterrvn-phone-landscape-blocked::after {
    content: "ROTATE_BACK_TO_PORTRAIT";
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: grid;
    place-items: center;
    padding: 20px;
    box-sizing: border-box;
    background: #000000;
    color: var(--accent-bright);
    font-family: var(--pixel-en, monospace);
    font-size: 12px;
    letter-spacing: 0.16em;
    text-align: center;
  }
  body.asterrvn-case-phone-landscape {
    overflow: hidden;
    background: #000000;
  }
  body.asterrvn-case-phone-landscape .os-window {
    height: 100svh;
    min-height: 100svh;
    display: grid;
    grid-template-rows: 1fr;
    grid-template-columns: 1fr;
    background: #000000;
  }
  body.asterrvn-case-phone-landscape .titlebar,
  body.asterrvn-case-phone-landscape .menubar,
  body.asterrvn-case-phone-landscape .sidebar,
  body.asterrvn-case-phone-landscape .scrollbar,
  body.asterrvn-case-phone-landscape .statusbar,
  body.asterrvn-case-phone-landscape .cursor,
  body.asterrvn-case-phone-landscape .coord,
  body.asterrvn-case-phone-landscape .hero-side-art,
  body.asterrvn-case-phone-landscape .head-hitbox,
  body.asterrvn-case-phone-landscape .view[data-view="portfolio-case"] .gallery-controls,
  body.asterrvn-case-phone-landscape .asterrvn-portfolio-page-toolbar,
  body.asterrvn-case-phone-landscape .asterrvn-case-block:not(.asterrvn-case-block--video):not(.asterrvn-case-block--player),
  body.asterrvn-case-phone-landscape .asterrvn-case-block__caption,
  body.asterrvn-case-phone-landscape .asterrvn-case-block__actions,
  body.asterrvn-case-phone-landscape .asterrvn-case-add-block {
    display: none !important;
  }
  body.asterrvn-case-phone-landscape .content {
    grid-column: 1;
    grid-row: 1;
    width: 100vw;
    height: 100svh;
    overflow-y: auto;
    background: #000000;
  }
  body.asterrvn-case-phone-landscape .view[data-view="portfolio-case"],
  body.asterrvn-case-phone-landscape .view[data-view="portfolio-case"] > .gallery-view,
  body.asterrvn-case-phone-landscape .asterrvn-portfolio-case-page-body,
  body.asterrvn-case-phone-landscape .asterrvn-case-blocks {
    width: 100vw;
    min-height: 100svh;
    margin: 0;
    padding: 0;
    background: #000000;
  }
  body.asterrvn-case-phone-landscape .asterrvn-case-block--video,
  body.asterrvn-case-phone-landscape .asterrvn-case-block--player,
  body.asterrvn-case-phone-landscape .asterrvn-case-block__video-shell,
  body.asterrvn-case-phone-landscape .asterrvn-case-block__video {
    width: 100vw;
    margin: 0;
    padding: 0;
    border: 0;
    background: #000000;
  }
  body.asterrvn-case-phone-landscape .asterrvn-case-block__video {
    min-height: 100svh;
    object-fit: contain;
  }
}

/* ---------- Stage E: drag-drop visual cues ---------- */

.asterrvn-case-block[draggable="true"] {
  cursor: grab;
}
.asterrvn-case-block[draggable="true"]:active {
  cursor: grabbing;
}
.asterrvn-case-block.is-dragging {
  opacity: 0.45;
  outline: 1px dashed rgba(255, 255, 255, 0.35);
}
.asterrvn-case-block.is-drop-over {
  outline: 1px solid #6cf;
  outline-offset: 2px;
}

/* ---------- Stage C.5: column-radio row inside grid editor ---------- */

.asterrvn-block-align-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Cover row inside case meta editor */
.modal-metadata-cover-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Block alignment radios */
.asterrvn-block-align-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.asterrvn-portfolio-rename-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.asterrvn-portfolio-rename-input {
  flex: 1 1 160px;
  min-width: 120px;
  padding: 6px 8px;
  border: 1px solid #2a2a2a;
  background: #050505;
  color: #e8e8e8;
  font-family: inherit;
  font-size: 12px;
}

/* Empty state (Portfolio) */
.asterrvn-portfolio-empty {
  padding: 24px 14px;
  text-align: center;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.02);
  font-size: 12px;
  line-height: 1.7;
  letter-spacing: 0;
  color: #777777;
  font-family: inherit;
}

.asterrvn-portfolio-empty strong {
  display: block;
  margin-bottom: 8px;
  font-family: inherit;
  font-size: 12px;
  line-height: 1.7;
  letter-spacing: 0;
  color: #d8d8d8;
  font-weight: normal;
}

.asterrvn-portfolio-empty p {
  margin: 0;
}

/* Inline error strip for worker failures (CREATE/RENAME/DELETE).
 * Appears just below the toolbar, only visible to admins. */
.asterrvn-portfolio-error {
  margin: 6px 0 8px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 92, 92, 0.45);
  background: rgba(255, 60, 60, 0.08);
  color: #ff8a8a;
  font-family: var(--pixel-en, monospace);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Finder-like folder grid */
.asterrvn-portfolio-folder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(124px, 1fr));
  gap: 24px 20px;
  padding: 4px 2px 8px;
  list-style: none;
}

.asterrvn-portfolio-folder-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
  min-height: 0;
  padding: 6px 4px 8px;
  margin: 0;
  border: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #d8d8d8;
  font-family: inherit;
  font-size: 12px;
  line-height: 1.7;
  letter-spacing: 0;
  text-align: center;
  cursor: url("refs/New-Cursor-Finger.png") 8 1, pointer;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

.asterrvn-portfolio-folder-tile:hover:not(.is-selected) {
  background: rgba(255, 255, 255, 0.025);
}

.asterrvn-portfolio-folder-tile.is-selected {
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: none;
}

.asterrvn-portfolio-folder-tile__label {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  max-width: 100%;
  color: #d8d8d8;
  font-family: inherit;
  font-size: 12px;
  line-height: 1.7;
  letter-spacing: 0;
}

.asterrvn-portfolio-folder-tile.is-selected .asterrvn-portfolio-folder-tile__label {
  color: #f0f0f0;
}

/* Folder icon: refs/folder-4.png (grid gap unchanged) */
.portfolio-folder-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 87px;
  height: 74px;
  flex-shrink: 0;
}

.portfolio-folder-icon__img {
  display: block;
  width: 87px;
  height: auto;
  max-height: 80px;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  user-select: none;
  pointer-events: none;
}

/* Portfolio shell open/close — mechanical, no scanlines */
.asterrvn-home-overlay-root--portfolio-anim > .asterrvn-home-os-window--portfolio {
  opacity: 0;
  transform: scale(0.985, 0.96);
  transform-origin: 50% 10%;
  filter: brightness(0.9);
}

.asterrvn-home-overlay-root--portfolio-anim > .asterrvn-home-os-window--portfolio.asterrvn-home-os-window--is-open {
  animation: asterrvn-portfolio-win-in 230ms steps(3, end) forwards;
}

@keyframes asterrvn-portfolio-win-in {
  0% {
    opacity: 0;
    transform: scale(0.985, 0.96);
    filter: brightness(0.88);
  }
  40% {
    filter: brightness(1.04);
  }
  100% {
    opacity: 1;
    transform: scale(1, 1);
    filter: none;
  }
}

.asterrvn-home-overlay-root--portfolio-anim.asterrvn-home-overlay-root--closing > .asterrvn-home-os-window--portfolio {
  pointer-events: none;
  animation: asterrvn-portfolio-win-out 200ms steps(2, end) forwards;
}

@keyframes asterrvn-portfolio-win-out {
  0% {
    opacity: 1;
    transform: scale(1, 1);
    filter: none;
  }
  100% {
    opacity: 0;
    transform: scale(0.99, 0.94);
    filter: brightness(0.86);
  }
}

@media (prefers-reduced-motion: reduce) {
  .asterrvn-home-overlay-root--portfolio-anim > .asterrvn-home-os-window--portfolio {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }

  .asterrvn-home-overlay-root--portfolio-anim.asterrvn-home-overlay-root--closing > .asterrvn-home-os-window--portfolio {
    animation: none !important;
    opacity: 0 !important;
    transition: opacity 80ms ease-out;
  }
}

.asterrvn-portfolio-folder-workspace__path {
  font-family: var(--mono, "Departure Mono", monospace);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-main, #dff8ff);
  margin: 0 0 12px;
  opacity: 0.92;
}

.asterrvn-portfolio-folder-workspace__empty {
  font-family: var(--mono, "Departure Mono", monospace);
  font-size: 10px;
  line-height: 1.55;
  color: var(--text-dim, rgba(220, 240, 255, 0.55));
  margin-bottom: 16px;
}

.asterrvn-portfolio-folder-workspace__empty strong {
  color: var(--text-main, #dff8ff);
  letter-spacing: 0.06em;
}

/* ─────────────────────────────────────────────────────────────────
 * SOON placeholder chrome (Skillz / Assets / About_me-guest)
 *
 * Visual contract: 1:1 with .asterrvn-soon-gate body. The window chrome
 * mirrors .asterrvn-home-os-window--portfolio (solid #000, thin white
 * borders, mono 12px / 1.7, single static titlebar marker), and the body
 * contents reuse the gate's .asterrvn-soon-gate__* element classes.
 * ─────────────────────────────────────────────────────────────── */

.asterrvn-home-os-window--soon {
  width: min(560px, 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #000;
  box-shadow:
    0 0 0 1px #000,
    0 10px 28px rgba(0, 0, 0, 0.75);
  color: var(--text, #c8d0db);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.7;
  font-weight: normal;
}

.asterrvn-home-os-window--soon .asterrvn-home-os-window__titlebar {
  min-height: 28px;
  padding: 6px 8px 7px;
  gap: 8px;
  background: #050505;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 12px;
  line-height: 1.7;
  letter-spacing: 0;
  text-transform: none;
  font-family: inherit;
}

/* Single static titlebar marker (matches portfolio shell). The chrome
 * itself renders this when openShell({ titlebarMarker: "single" }) is
 * passed; we just style its color to fit the soon window. */
.asterrvn-home-os-window--soon .asterrvn-home-os-window__mod-single {
  display: block;
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  box-sizing: border-box;
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.14);
  pointer-events: none;
  user-select: none;
}

.asterrvn-home-os-window--soon .asterrvn-home-os-window__title {
  color: var(--text, #c8d0db);
  font-family: inherit;
  font-size: 12px;
  line-height: 1.7;
  letter-spacing: 0;
  font-weight: normal;
  text-shadow: none;
}

.asterrvn-home-os-window--soon .asterrvn-home-os-window__close {
  width: 28px;
  height: 22px;
  font-size: 12px;
  line-height: 1;
  border: 1px solid #2a2a2a;
  background: #050505;
  color: #d8d8d8;
  font-family: inherit;
}

.asterrvn-home-os-window--soon .asterrvn-home-os-window__close:hover {
  border-color: rgba(255, 255, 255, 0.22);
  color: #f0f0f0;
  background: #111;
}

.asterrvn-home-os-window--soon .asterrvn-home-os-window__path {
  padding: 6px 10px 7px;
  font-size: 12px;
  line-height: 1.7;
  letter-spacing: 0;
  color: #777;
  opacity: 1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: #030303;
  font-family: inherit;
  text-transform: none;
}

.asterrvn-home-os-window--soon .asterrvn-home-os-window__body {
  padding: 0;
  background: #030303;
  font-family: inherit;
  font-size: 12px;
  line-height: 1.7;
}

/* The body content is .asterrvn-soon-gate__body (rendered by JS), which
 * already brings its own padding/gap/background. We just need to make
 * sure the inner block stretches naturally inside the OS window body. */
.asterrvn-home-os-window--soon .asterrvn-soon-gate__body--in-card {
  background: #030303;
}

.asterrvn-case-block--pending {
  position: relative;
  opacity: 0.88;
}

.asterrvn-case-block__pending-shell {
  position: relative;
  overflow: hidden;
  min-height: 180px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #030303;
}

.asterrvn-case-block__pending-media {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: saturate(0.55) contrast(0.82);
}

.asterrvn-case-block__pending-overlay {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.74);
  color: var(--text-dim, #9aa);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.4;
}

.asterrvn-case-block__pending-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asterrvn-case-block__pending-progress {
  height: 5px;
  margin-top: 6px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #000;
}

.asterrvn-case-block__pending-progress-fill {
  width: 0;
  height: 100%;
  background: var(--accent-bright, #72f7ff);
  transition: width 0.18s linear;
}

.asterrvn-case-block__pending-error {
  margin-top: 5px;
  color: #ff4b8a;
}
