:root {
  --ink: #080808;
  --ink-2: #141414;
  --paper: #f7f7f2;
  --paper-2: #eeeeea;
  --white: #ffffff;
  --muted: #74746e;
  --muted-dark: rgba(255, 255, 255, .68);
  --line: rgba(8, 8, 8, .14);
  --line-dark: rgba(255, 255, 255, .18);
  --brand: #11a79c;
  --brand-2: #d9f3ef;
  --accent: #b7ffef;
  --danger: #c64a4a;
  --radius: 8px;
  --shadow: 0 22px 60px rgba(0, 0, 0, .12);
  --shadow-soft: 0 12px 34px rgba(0, 0, 0, .08);
  color-scheme: light;
  font-family: "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
}

body.dragging {
  overflow: hidden;
}

button,
input,
select {
  font: inherit;
}

button,
.button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  padding: 10px 15px;
  cursor: pointer;
  text-decoration: none;
  transition: transform .2s ease, border-color .2s ease, background .2s ease, color .2s ease, box-shadow .2s ease;
}

button:hover,
.button:hover {
  border-color: rgba(8, 8, 8, .34);
  box-shadow: var(--shadow-soft);
}

button:disabled {
  cursor: not-allowed;
  opacity: .48;
  transform: none;
  box-shadow: none;
}

button:active,
.button:active {
  transform: translateY(1px);
}

button:focus-visible,
.button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(17, 167, 156, .28);
  outline-offset: 2px;
}

.primary {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--white);
}

.primary:hover {
  border-color: var(--brand);
  background: var(--brand);
}

.ghost {
  border-color: var(--line-dark);
  background: rgba(255, 255, 255, .08);
  color: var(--white);
}

.danger {
  border-color: var(--danger);
  background: var(--danger);
  color: var(--white);
}

input,
select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  padding: 10px 12px;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

input:focus,
select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(17, 167, 156, .12);
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}

a {
  color: inherit;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  max-width: 860px;
  font-size: 76px;
  line-height: .96;
  letter-spacing: 0;
}

h1 span {
  display: block;
}

h2 {
  margin-bottom: 8px;
  font-size: 24px;
  line-height: 1.24;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 14px;
  font-size: 21px;
  line-height: 1.28;
  letter-spacing: 0;
}

.preloader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--white);
}

.preloader-mark {
  display: flex;
  gap: 9px;
  overflow: hidden;
  font-size: 52px;
  font-weight: 800;
}

.preloader-mark span {
  display: inline-block;
  border-bottom: 2px solid var(--white);
}

.preloader p {
  position: absolute;
  bottom: 38px;
  margin: 0;
  color: var(--muted-dark);
  font-size: 13px;
  text-transform: uppercase;
}

.app-shell {
  width: 100%;
  margin: 0 auto;
  padding: 18px;
}

.site-header {
  position: sticky;
  top: 12px;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  background: rgba(8, 8, 8, .82);
  color: var(--white);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand strong {
  display: block;
  font-size: 16px;
  line-height: 1.2;
}

.brand small {
  display: block;
  margin-top: 2px;
  color: var(--muted-dark);
  font-size: 12px;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 2px solid var(--white);
  border-radius: 50%;
}

.brand-mark span {
  display: block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
}

.nav-pill {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border: 1px solid var(--line-dark);
  border-radius: 999px;
  background: rgba(255, 255, 255, .06);
}

.nav-pill a,
.mobile-nav a {
  border-radius: 999px;
  color: var(--muted-dark);
  font-size: 14px;
  text-decoration: none;
  transition: background .2s ease, color .2s ease;
}

.nav-pill a {
  padding: 8px 14px;
}

.nav-pill a:hover,
.mobile-nav a:hover {
  background: rgba(255, 255, 255, .14);
  color: var(--white);
}

.hamburger {
  display: none;
  width: 42px;
  height: 42px;
  place-items: center;
  padding: 0;
  border-color: var(--line-dark);
  background: rgba(255, 255, 255, .08);
}

.hamburger span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 3px auto;
  border-radius: 999px;
  background: var(--white);
}

.mobile-nav {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
  padding: 12px;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--white);
}

.mobile-nav[hidden] {
  display: none;
}

.mobile-nav a {
  padding: 10px 12px;
}

.hero-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(520px, 1.06fr) minmax(420px, .82fr) minmax(320px, 380px);
  gap: 28px;
  min-height: calc(100vh - 112px);
  overflow: hidden;
  padding: 44px;
  border-radius: var(--radius);
  background:
    linear-gradient(100deg, rgba(8, 8, 8, .92), rgba(8, 8, 8, .72) 52%, rgba(8, 8, 8, .94)),
    var(--ink);
  color: var(--white);
  box-shadow: var(--shadow);
}

.hero-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .08) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, .65), transparent 72%);
}

.hero-bg-type {
  position: absolute;
  right: -36px;
  bottom: -28px;
  color: rgba(255, 255, 255, .045);
  font-size: 138px;
  font-weight: 900;
  line-height: .8;
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 2;
  align-self: center;
  padding-bottom: 18px;
}

.eyebrow {
  margin: 0 0 9px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-panel .eyebrow,
.account-card .eyebrow {
  color: var(--accent);
}

.shine-text {
  display: inline-block;
  background: linear-gradient(100deg, #ffffff 8%, var(--accent) 42%, #ffffff 72%);
  background-size: 220% auto;
  background-clip: text;
  color: transparent;
}

.hero-subtitle {
  max-width: 740px;
  margin-bottom: 26px;
  color: var(--muted-dark);
  font-size: 16px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.action-pill {
  border-radius: 999px;
  padding-inline: 20px;
}

.hero-stage {
  position: relative;
  z-index: 2;
  align-self: stretch;
  min-height: 640px;
}

.stage-card,
.stage-photo,
.stage-caption {
  position: absolute;
  border-radius: var(--radius);
}

.stage-card-large {
  top: 18px;
  left: 6px;
  z-index: 3;
  width: 190px;
  padding: 16px;
  border: 1px solid var(--line-dark);
  background: rgba(255, 255, 255, .92);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.stage-card span,
.stage-card small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.stage-card strong {
  display: block;
  margin: 8px 0 2px;
  font-size: 46px;
  line-height: .9;
}

.stage-photo {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .22);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .34);
  background: rgba(255, 255, 255, .03);
  opacity: 0;
  pointer-events: none;
  transition: opacity .28s ease, filter .28s ease;
}

.stage-photo.has-image {
  opacity: 1;
}

.stage-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.96) contrast(1.04);
}

.photo-a {
  top: 98px;
  right: 0;
  width: 62%;
  height: 42%;
  background: rgba(255, 255, 255, .03);
}

.photo-b {
  left: 0;
  bottom: 104px;
  width: 58%;
  height: 38%;
  background: rgba(255, 255, 255, .03);
}

.photo-c {
  right: 8px;
  bottom: 44px;
  width: 44%;
  height: 30%;
  background: rgba(255, 255, 255, .03);
}

.stage-caption {
  left: 0;
  bottom: 26px;
  padding: 8px 12px;
  border: 1px solid var(--line-dark);
  background: rgba(8, 8, 8, .62);
  color: var(--muted-dark);
  font-size: 12px;
  text-transform: uppercase;
}

.account-card {
  position: relative;
  z-index: 2;
  align-self: center;
  display: grid;
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .10);
  backdrop-filter: blur(18px);
}

.account-card p {
  margin-bottom: 0;
  color: var(--muted-dark);
  line-height: 1.65;
}

.account-card label {
  color: var(--muted-dark);
}

.account-card input {
  border-color: rgba(255, 255, 255, .24);
  background: rgba(255, 255, 255, .94);
}

.marquee-strip {
  overflow: hidden;
  margin: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.marquee-track {
  display: flex;
  width: max-content;
  gap: 38px;
  padding: 14px 0;
  color: var(--ink);
  font-size: 34px;
  font-weight: 900;
  white-space: nowrap;
}

.marquee-track span {
  display: inline-block;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.stat-card,
.workflow-panel,
.sidebar,
.content-panel,
.share-panel,
.sync-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .74);
  box-shadow: var(--shadow-soft);
}

.share-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(420px, 1.4fr);
  gap: 18px;
  align-items: end;
  margin-top: 12px;
  padding: 18px;
}

.share-copy p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.65;
}

.share-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 10px;
  align-items: end;
}

.share-metrics {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.share-metrics span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--muted);
  font-size: 13px;
}

.share-metrics strong {
  color: var(--ink);
  font-size: 18px;
}

.stat-card {
  display: grid;
  gap: 7px;
  min-height: 128px;
  padding: 16px;
}

.stat-card span,
.stat-card small {
  color: var(--muted);
  font-size: 13px;
}

.stat-card strong {
  font-size: 34px;
  line-height: .95;
}

.workflow-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-top: 12px;
  background: var(--line);
}

.workflow-panel article {
  padding: 18px;
  background: var(--paper);
}

.workflow-panel span {
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
}

.workflow-panel strong {
  display: block;
  margin: 8px 0;
  font-size: 18px;
}

.workflow-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.sync-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  gap: 16px;
  align-items: center;
  margin-top: 12px;
  padding: 18px;
}

.sync-panel p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.65;
}

.sync-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-2);
}

.sync-box span {
  overflow: hidden;
  padding-left: 8px;
  color: var(--muted);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-layout {
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  gap: 12px;
  margin-top: 12px;
  align-items: start;
}

.sidebar {
  position: sticky;
  top: 90px;
  min-height: 360px;
  padding: 14px;
}

.side-head,
.content-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.side-head {
  margin-bottom: 12px;
}

.side-head strong {
  font-size: 18px;
}

.side-head span {
  min-width: 30px;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--white);
  font-size: 13px;
  text-align: center;
}

.full-button {
  width: 100%;
}

.side-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.side-actions .full-button {
  width: auto;
}

.category-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.category-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.designer-delete {
  min-height: 30px;
  padding: 5px 8px;
  border-color: rgba(198, 74, 74, .28);
  background: transparent;
  color: var(--danger);
  font-size: 12px;
}

.category-card.active .designer-delete {
  border-color: rgba(255, 255, 255, .25);
  color: var(--white);
}

.folder-tree {
  grid-column: 1 / -1;
  display: grid;
  gap: 6px;
  margin-top: 8px;
  padding: 8px 0 0 12px;
  border-left: 1px solid rgba(255, 255, 255, .26);
}

.folder-tree.empty-tree {
  color: var(--muted-dark);
  font-size: 12px;
}

.folder-node {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
  min-height: 0;
  padding: 8px 10px;
  border-color: rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .06);
  color: var(--white);
  text-align: left;
}

.folder-node:hover,
.folder-node.active {
  border-color: var(--accent);
  background: rgba(183, 255, 239, .14);
  box-shadow: none;
}

.folder-node span,
.folder-node small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.folder-node small {
  color: var(--muted-dark);
  font-size: 11px;
}

.category-card:hover {
  transform: translateY(-2px);
  border-color: rgba(8, 8, 8, .28);
  box-shadow: var(--shadow-soft);
}

.category-card.active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--white);
}

.category-card span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-card small {
  color: var(--muted);
}

.category-card.active small {
  color: var(--muted-dark);
}

.content-panel {
  overflow: hidden;
}

.upload-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin: 14px;
  padding: 18px;
  border: 1px dashed rgba(8, 8, 8, .38);
  border-radius: var(--radius);
  background:
    linear-gradient(120deg, rgba(8, 8, 8, .06), rgba(17, 167, 156, .12)),
    var(--paper-2);
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

.upload-strip.drag-over {
  border-color: var(--brand);
  background: var(--brand-2);
  transform: translateY(-2px);
}

.upload-strip h2,
.upload-strip p {
  margin-bottom: 0;
}

.upload-strip p {
  color: var(--muted);
  line-height: 1.6;
}

.toolbar {
  margin: 0 14px 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.search {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 160px 150px 150px;
  gap: 10px;
  align-items: end;
}

.toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
}

.content-head {
  min-height: 92px;
  padding: 0 16px 16px;
  border-bottom: 1px solid var(--line);
}

#statusText {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--white);
  font-size: 13px;
}

.gallery-pagination {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  margin: 12px 16px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .08);
}

.gallery-pagination > div:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.gallery-pagination strong {
  color: var(--white);
  font-size: 16px;
}

.gallery-pagination span,
.gallery-pagination label {
  color: var(--muted-dark);
  font-size: 13px;
}

.gallery-pagination label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.gallery-pagination select {
  min-width: 96px;
}

.page-actions {
  display: inline-grid;
  grid-template-columns: auto minmax(64px, auto) auto;
  gap: 8px;
  align-items: center;
}

.page-actions span {
  text-align: center;
  color: var(--white);
  font-weight: 800;
}

.page-actions button:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.gallery {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(184px, 1fr));
  gap: 12px;
  min-height: 420px;
  padding: 16px;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.material-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.material-card.selected {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(17, 167, 156, .14), var(--shadow-soft);
}

.material-card.dragging {
  opacity: .56;
}

.selection-marquee {
  position: absolute;
  z-index: 8;
  pointer-events: none;
  border: 1px solid var(--brand);
  background: rgba(17, 167, 156, .14);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .42) inset;
}

.material-check {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  display: block;
  width: 28px;
  height: 28px;
}

.material-check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.material-check span {
  display: block;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 50%;
  background: rgba(8, 8, 8, .52);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .18);
  backdrop-filter: blur(10px);
}

.material-check input:checked + span {
  border-color: var(--brand);
  background: var(--brand);
}

.material-check input:checked + span::after {
  content: "";
  position: absolute;
  left: 10px;
  top: 7px;
  width: 7px;
  height: 12px;
  border: solid var(--white);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.material-delete {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 3;
  display: grid;
  width: 32px;
  height: 32px;
  min-height: 32px;
  place-items: center;
  padding: 0;
  border-color: rgba(255, 255, 255, .58);
  border-radius: 50%;
  background: rgba(8, 8, 8, .62);
  color: var(--white);
  font-size: 22px;
  line-height: 1;
  opacity: 0;
  transform: translateY(5px);
}

.material-card:hover .material-delete,
.material-card:focus-visible .material-delete {
  opacity: 1;
  transform: translateY(0);
}

.material-delete:hover {
  border-color: rgba(255, 255, 255, .82);
  background: var(--danger);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .22);
}

.material-card:hover {
  transform: translateY(-4px);
  border-color: rgba(8, 8, 8, .30);
  box-shadow: var(--shadow);
}

.material-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--paper-2);
  filter: saturate(.92) contrast(1.04);
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-drag: none;
}

.material-meta {
  display: grid;
  gap: 5px;
  padding: 11px;
}

.material-title {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.material-meta small {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 4px;
}

.tag {
  max-width: 100%;
  overflow: hidden;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty {
  color: var(--muted);
  place-items: center;
}

.empty-state {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  min-height: 320px;
  padding: 28px;
  border: 1px dashed rgba(8, 8, 8, .28);
  border-radius: var(--radius);
  background: var(--paper-2);
  color: var(--muted);
  text-align: center;
}

.empty-state strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 19px;
}

dialog {
  border: 0;
  padding: 0;
  background: transparent;
}

dialog::backdrop {
  background: rgba(0, 0, 0, .64);
  backdrop-filter: blur(8px);
}

.dialog-card,
.preview-card {
  width: min(540px, calc(100vw - 28px));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .34);
}

.dialog-card {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 20px;
}

.dialog-card h3 {
  margin-bottom: 2px;
}

.dialog-card p {
  color: var(--muted);
}

.dialog-actions,
.preview-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  border-radius: 999px;
}

.preview-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: 0;
  width: min(1180px, calc(100vw - 28px));
  overflow: hidden;
  border-color: rgba(255, 255, 255, .14);
  background: #080808;
}

.preview-media {
  position: relative;
  display: grid;
  min-height: min(760px, 82vh);
  place-items: center;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, .045) 1px, transparent 1px),
    #050505;
  background-size: 74px 74px;
}

.preview-card img {
  display: block;
  width: 100%;
  max-height: 82vh;
  object-fit: contain;
}

.preview-nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 42px;
  height: 58px;
  min-height: 58px;
  padding: 0;
  border-color: rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .08);
  color: var(--white);
  font-size: 34px;
  line-height: 1;
  transform: translateY(-50%);
  backdrop-filter: blur(12px);
}

.preview-prev {
  left: 14px;
}

.preview-next {
  right: 14px;
}

.preview-info {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 26px;
  background: var(--paper);
}

.preview-info h3 {
  margin-bottom: 0;
  padding-right: 34px;
  font-size: 28px;
  line-height: 1.05;
}

.preview-info p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.preview-info label {
  gap: 6px;
  font-size: 12px;
  text-transform: uppercase;
}

.preview-info input {
  min-height: 38px;
  border-inline: 0;
  border-top: 0;
  border-radius: 0;
  background: transparent;
  padding-inline: 0;
}

.preview-actions {
  justify-content: flex-start;
  padding-top: 8px;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 50;
  max-width: min(360px, calc(100vw - 28px));
  padding: 12px 14px;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--white);
  box-shadow: var(--shadow);
  pointer-events: none;
  opacity: 0;
  transform: translateY(10px);
}

@media (max-width: 1200px) {
  .hero-panel {
    grid-template-columns: minmax(0, 1fr) 340px;
  }

  .hero-stage {
    min-height: 360px;
    grid-column: 1 / -1;
  }

  .account-card {
    align-self: stretch;
  }

  h1 {
    font-size: 54px;
  }
}

@media (max-width: 1080px) {
  .share-panel,
  .sync-panel,
  .workspace-layout {
    grid-template-columns: 1fr;
  }

  .share-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sidebar {
    position: static;
    min-height: auto;
  }

  .category-list {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .search {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .app-shell {
    padding: 10px;
  }

  .site-header {
    top: 8px;
    padding: 10px;
  }

  .brand strong {
    font-size: 14px;
  }

  .nav-pill {
    display: none;
  }

  .hamburger {
    display: block;
  }

  .hero-panel {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 18px;
  }

  .hero-bg-type {
    right: -20px;
    bottom: -10px;
    font-size: 72px;
  }

  .hero-copy {
    padding-bottom: 0;
  }

  h1 {
    font-size: 38px;
  }

  h2 {
    font-size: 20px;
  }

  .hero-subtitle {
    font-size: 15px;
  }

  .hero-stage {
    min-height: 300px;
  }

  .stage-card-large {
    width: 150px;
  }

  .stage-card strong {
    font-size: 34px;
  }

  .marquee-track {
    gap: 26px;
    font-size: 26px;
  }

  .stats-grid,
  .workflow-panel,
  .search,
  .share-controls,
  .upload-strip,
  .sync-box {
    grid-template-columns: 1fr;
  }

  .share-panel,
  .sync-panel,
  .toolbar {
    padding: 14px;
  }

  .content-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .filter-chips {
    justify-content: flex-start;
  }

  .gallery {
    grid-template-columns: repeat(auto-fill, minmax(136px, 1fr));
    gap: 10px;
    padding: 12px;
  }

  .preview-card {
    grid-template-columns: 1fr;
  }

  .preview-media {
    min-height: 260px;
  }

  .preview-info {
    padding: 18px;
  }

  .toast {
    right: 14px;
    bottom: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* App hierarchy: shared library is the primary page; overview/sync stay secondary. */
.app-shell {
  display: flex;
  flex-direction: column;
}

.site-header {
  order: 1;
}

.mobile-nav {
  order: 2;
}

.hero-panel {
  order: 3;
  min-height: auto;
  grid-template-columns: 1fr;
  overflow: visible;
  padding: 0;
  background: transparent;
  color: var(--ink);
  box-shadow: none;
}

.hero-panel::before,
.hero-bg-type,
.hero-copy,
.hero-stage,
.marquee-strip,
.workflow-panel {
  display: none;
}

.account-card {
  align-self: stretch;
  grid-template-columns: minmax(260px, 1fr) minmax(180px, 220px) minmax(180px, 220px) auto;
  align-items: end;
  padding: 16px;
  border-color: var(--line);
  background: rgba(255, 255, 255, .82);
  color: var(--ink);
  backdrop-filter: none;
}

.account-card .eyebrow {
  color: var(--brand);
}

.account-card p,
.account-card label {
  color: var(--muted);
}

.share-panel {
  order: 5;
}

.stats-grid {
  order: 6;
}

.sync-panel {
  order: 7;
}

.workspace-layout {
  order: 4;
}

.category-card.designer-folder {
  --designer-color: #111111;
  border-left: 4px solid var(--designer-color);
  background:
    linear-gradient(120deg, rgba(255, 255, 255, .96), rgba(255, 255, 255, .78)),
    var(--designer-color);
}

.category-card.designer-folder.active {
  border-color: var(--ink);
  border-left-color: var(--designer-color);
  background:
    linear-gradient(135deg, rgba(8, 8, 8, .94), rgba(8, 8, 8, .72)),
    var(--designer-color);
}

.designer-name {
  font-weight: 700;
}

.designer-actions {
  display: inline-flex;
  gap: 5px;
  align-items: center;
}

.designer-actions button {
  min-height: 30px;
  padding: 5px 8px;
  font-size: 12px;
}

.designer-color {
  display: inline-grid;
  width: 30px;
  height: 30px;
  cursor: pointer;
}

.designer-color input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.designer-color span {
  display: block;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--designer-color);
}

.folder-node {
  grid-template-columns: minmax(0, 1fr) auto;
  cursor: grab;
}

.folder-node.dragging {
  opacity: .48;
}

.folder-node.drop-target {
  border-color: var(--accent);
  background: rgba(183, 255, 239, .20);
}

.folder-open {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  box-shadow: none;
}

.folder-open:hover {
  box-shadow: none;
}

.folder-actions {
  display: inline-flex;
  gap: 4px;
}

.folder-actions button {
  min-height: 26px;
  padding: 3px 6px;
  border-color: rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .08);
  color: var(--white);
  font-size: 11px;
}

@media (max-width: 1080px) {
  .account-card {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .account-card {
    grid-template-columns: 1fr;
  }

  .designer-actions {
    grid-column: 1 / -1;
  }
}

/* Avant-garde shared-drive redesign */
:root {
  --ink: #080807;
  --ink-2: #151511;
  --paper: #ebe6d8;
  --paper-2: #d8d1bf;
  --white: #fffaf0;
  --muted: #8d887c;
  --muted-dark: rgba(255, 250, 240, .66);
  --line: rgba(255, 250, 240, .14);
  --line-dark: rgba(255, 250, 240, .22);
  --brand: #c7ff4a;
  --brand-2: rgba(199, 255, 74, .15);
  --accent: #64f0dd;
  --danger: #ff5d57;
  --radius: 7px;
  --shadow: 0 26px 80px rgba(0, 0, 0, .38);
  --shadow-soft: 0 16px 46px rgba(0, 0, 0, .24);
  color-scheme: dark;
}

html {
  background: var(--ink);
}

body {
  background:
    radial-gradient(circle at 12% 8%, rgba(199, 255, 74, .18), transparent 24rem),
    radial-gradient(circle at 88% 18%, rgba(100, 240, 221, .12), transparent 26rem),
    linear-gradient(90deg, rgba(255, 250, 240, .045) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 250, 240, .035) 1px, transparent 1px),
    #080807;
  background-size: auto, auto, 72px 72px, 72px 72px;
  color: var(--white);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(115deg, transparent 0 55%, rgba(255, 250, 240, .06) 55% 55.3%, transparent 55.3%),
    radial-gradient(circle at 50% 120%, rgba(255, 250, 240, .10), transparent 34rem);
}

button,
.button,
input,
select {
  border-color: var(--line);
  background: rgba(255, 250, 240, .06);
  color: var(--white);
}

button,
.button {
  text-transform: none;
}

button:hover,
.button:hover {
  border-color: rgba(199, 255, 74, .54);
  box-shadow: 0 0 0 1px rgba(199, 255, 74, .18), var(--shadow-soft);
}

input:focus,
select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(199, 255, 74, .13);
}

select {
  color-scheme: dark;
}

select option {
  background: #fffaf0;
  color: #10192b;
}

select option:checked {
  background: #8fbcff;
  color: #071427;
}

select:disabled {
  opacity: 1;
}

.primary {
  border-color: var(--brand);
  background: var(--brand);
  color: #080807;
  font-weight: 750;
}

.primary:hover {
  border-color: var(--accent);
  background: var(--accent);
}

.danger {
  border-color: rgba(255, 93, 87, .75);
  background: rgba(255, 93, 87, .18);
  color: #ffd9d7;
}

.app-shell {
  width: min(1760px, 100%);
  padding: 14px;
}

.app-cursor {
  display: none;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 80;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(199, 255, 74, .78);
  border-radius: 50%;
  pointer-events: none;
  mix-blend-mode: difference;
  opacity: 0;
  transform: translate(-50%, -50%);
}

.app-cursor span {
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  background: var(--brand);
}

.preloader {
  background:
    radial-gradient(circle at 50% 120%, rgba(199, 255, 74, .18), transparent 28rem),
    var(--ink);
}

.preloader-mark {
  gap: clamp(8px, 1.4vw, 22px);
  font-size: clamp(42px, 10vw, 146px);
  letter-spacing: 0;
}

.preloader-mark span {
  border-bottom-color: var(--brand);
}

.site-header {
  top: 10px;
  margin-bottom: 10px;
  border-color: rgba(255, 250, 240, .12);
  background: rgba(8, 8, 7, .74);
  box-shadow: 0 16px 46px rgba(0, 0, 0, .34);
}

.brand-mark {
  border-color: rgba(255, 250, 240, .58);
  border-radius: var(--radius);
}

.brand-mark span {
  border-radius: var(--radius);
  background: var(--brand);
}

.nav-pill {
  border-color: var(--line);
  background: rgba(255, 250, 240, .05);
}

.nav-pill a,
.mobile-nav a {
  color: var(--muted-dark);
}

.nav-pill a:hover,
.mobile-nav a:hover {
  color: var(--ink);
  background: var(--brand);
}

.command-hero {
  order: 3;
  position: relative;
  display: grid;
  grid-template-columns: minmax(360px, 1.12fr) minmax(360px, .88fr);
  gap: 12px;
  min-height: clamp(360px, 48vh, 620px);
  margin-bottom: 12px;
  overflow: hidden;
}

.command-hero::before {
  content: "MATERIAL INDEX";
  position: absolute;
  right: -1vw;
  bottom: -1.2vw;
  color: rgba(255, 250, 240, .055);
  font-size: clamp(52px, 11vw, 188px);
  font-weight: 900;
  line-height: .78;
  pointer-events: none;
}

.command-copy,
.command-board,
.account-card,
.share-panel,
.sync-panel,
.stat-card,
.sidebar,
.content-panel {
  border: 1px solid var(--line);
  background: rgba(12, 12, 10, .76);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.command-copy {
  position: relative;
  display: grid;
  align-content: end;
  padding: clamp(22px, 4vw, 56px);
  overflow: hidden;
  border-radius: var(--radius);
  background:
    linear-gradient(120deg, rgba(199, 255, 74, .16), transparent 34%, rgba(100, 240, 221, .11) 68%, transparent),
    rgba(12, 12, 10, .76);
  background-size: 180% 100%;
}

.command-copy h1 {
  max-width: 820px;
  margin: 0 0 18px;
  font-size: clamp(38px, 4.4vw, 64px);
  line-height: .96;
  text-wrap: balance;
  word-break: normal;
}

.command-copy h1 span {
  display: block;
  overflow-wrap: anywhere;
}

.command-copy p:not(.eyebrow) {
  max-width: 720px;
  margin: 0;
  color: var(--muted-dark);
  font-size: clamp(14px, 1vw, 18px);
  line-height: 1.72;
}

.command-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 26px;
}

.command-tags span {
  min-height: 32px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted-dark);
  font-size: 12px;
}

.command-board {
  display: grid;
  grid-template-rows: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--line);
}

.command-board article {
  display: grid;
  align-content: end;
  gap: 8px;
  padding: clamp(18px, 3vw, 34px);
  background:
    linear-gradient(135deg, rgba(255, 250, 240, .08), rgba(255, 250, 240, .02)),
    rgba(8, 8, 7, .94);
}

.command-board span {
  color: var(--brand);
  font-size: 12px;
  font-weight: 900;
}

.command-board strong {
  font-size: clamp(20px, 2vw, 32px);
  line-height: 1;
}

.command-board small {
  color: var(--muted-dark);
  line-height: 1.55;
}

.hero-panel {
  margin-bottom: 12px;
}

.account-card {
  border-radius: var(--radius);
  background: rgba(235, 230, 216, .08);
}

.account-card h2,
.account-card p,
.account-card label {
  color: var(--white);
}

.account-card p {
  color: var(--muted-dark);
}

.account-card input {
  border-color: var(--line);
  background: rgba(255, 250, 240, .08);
  color: var(--white);
}

.workspace-layout {
  grid-template-columns: minmax(286px, 340px) minmax(0, 1fr);
  gap: 12px;
  margin-top: 0;
}

.sidebar,
.content-panel {
  border-radius: var(--radius);
}

.sidebar {
  top: 86px;
  max-height: calc(100vh - 104px);
  overflow: auto;
}

.side-head strong,
.content-head h2,
.upload-strip h2,
.share-copy h2,
.sync-panel h2 {
  color: var(--white);
}

.side-head span {
  background: var(--brand);
  color: var(--ink);
}

.side-actions {
  grid-template-columns: 1fr;
}

.side-actions .full-button,
.side-actions button {
  width: 100%;
}

.category-card {
  border-color: var(--line);
  background: rgba(255, 250, 240, .055);
  color: var(--white);
}

.category-card:hover {
  border-color: rgba(199, 255, 74, .48);
  box-shadow: var(--shadow-soft);
}

.category-card.active {
  border-color: var(--brand);
  background: rgba(199, 255, 74, .12);
  color: var(--white);
}

.category-card small,
.category-card.active small {
  color: var(--muted-dark);
}

.category-card.designer-folder {
  background:
    linear-gradient(125deg, rgba(255, 250, 240, .09), rgba(255, 250, 240, .025)),
    var(--designer-color);
}

.category-card.designer-folder.active {
  background:
    linear-gradient(135deg, rgba(199, 255, 74, .16), rgba(8, 8, 7, .72)),
    var(--designer-color);
}

.designer-actions {
  grid-column: 1 / -1;
  justify-self: start;
}

.designer-actions button,
.designer-delete {
  border-color: var(--line);
  background: rgba(255, 250, 240, .055);
  color: var(--muted-dark);
}

.designer-color span {
  border-color: rgba(255, 250, 240, .46);
}

.folder-tree {
  border-left-color: rgba(199, 255, 74, .32);
}

.folder-node {
  border-color: rgba(255, 250, 240, .12);
  background: rgba(255, 250, 240, .045);
}

.folder-node:hover,
.folder-node.active {
  border-color: var(--brand);
  background: rgba(199, 255, 74, .12);
}

.content-panel {
  overflow: hidden;
}

.upload-strip {
  margin: 0;
  border-width: 0 0 1px;
  border-color: var(--line);
  border-radius: 0;
  background:
    linear-gradient(90deg, rgba(199, 255, 74, .10), transparent 62%),
    rgba(255, 250, 240, .035);
}

.upload-strip.drag-over {
  border-color: var(--brand);
  background: rgba(199, 255, 74, .16);
}

.upload-strip p,
.share-copy p,
.sync-panel p,
#statusText {
  color: var(--muted-dark);
}

.toolbar {
  margin: 0;
  border-width: 0 0 1px;
  border-color: var(--line);
  border-radius: 0;
  background: rgba(255, 250, 240, .035);
}

.search {
  grid-template-columns: minmax(260px, 1fr) minmax(150px, .35fr) minmax(140px, .3fr) minmax(140px, .3fr);
}

.content-head {
  min-height: 84px;
  padding: 16px;
  border-bottom-color: var(--line);
}

.chip,
.tag,
.share-metrics span {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 250, 240, .07);
  color: var(--muted-dark);
}

.gallery {
  grid-template-columns: repeat(auto-fill, minmax(174px, 1fr));
  gap: 10px;
  min-height: 520px;
  padding: 12px;
}

.material-card {
  border-color: rgba(255, 250, 240, .10);
  background: rgba(255, 250, 240, .055);
  color: var(--white);
  will-change: transform, opacity;
}

.material-card:hover {
  border-color: rgba(199, 255, 74, .52);
  box-shadow: 0 22px 66px rgba(0, 0, 0, .42);
}

.material-card img {
  background: rgba(255, 250, 240, .06);
  filter: saturate(.92) contrast(1.08);
}

.material-meta {
  background: rgba(8, 8, 7, .52);
}

.material-title {
  color: var(--white);
}

.material-meta small {
  color: var(--muted-dark);
}

.material-check span {
  border-color: rgba(255, 250, 240, .72);
  background: rgba(8, 8, 7, .68);
}

.material-check input:checked + span {
  border-color: var(--brand);
  background: var(--brand);
}

.empty-state {
  border-color: rgba(255, 250, 240, .16);
  background: rgba(255, 250, 240, .04);
  color: var(--muted-dark);
}

.empty-state strong {
  color: var(--white);
}

.share-panel,
.sync-panel,
.stats-grid {
  margin-top: 12px;
}

.share-controls {
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(150px, auto);
}

.stat-card {
  min-height: 116px;
}

.stat-card span,
.stat-card small {
  color: var(--muted-dark);
}

.stat-card strong {
  color: var(--white);
}

.sync-box {
  border-color: var(--line);
  background: rgba(255, 250, 240, .05);
}

.sync-box span {
  color: var(--muted-dark);
}

dialog::backdrop {
  background: rgba(8, 8, 7, .78);
  backdrop-filter: blur(14px);
}

.dialog-card,
.preview-card {
  border-color: rgba(255, 250, 240, .16);
  background: #0b0b09;
  color: var(--white);
}

.preview-card {
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 420px);
  width: min(1240px, calc(100vw - 24px));
}

.preview-media {
  background:
    linear-gradient(90deg, rgba(255, 250, 240, .055) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 250, 240, .045) 1px, transparent 1px),
    #050504;
  background-size: 64px 64px;
}

.preview-info {
  background:
    linear-gradient(180deg, rgba(199, 255, 74, .08), transparent 38%),
    #ebe6d8;
  color: #080807;
}

.preview-info .eyebrow {
  color: #3a3428;
  font-weight: 900;
}

.preview-info h3 {
  color: #080807;
  font-size: clamp(24px, 2.4vw, 34px);
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.preview-info p,
.preview-info label {
  color: #383329;
  font-weight: 650;
}

.preview-info input {
  color: #080807;
  border-bottom: 1px solid rgba(8, 8, 7, .18);
  font-size: 16px;
  font-weight: 650;
}

.preview-info input::placeholder {
  color: #746f62;
}

.preview-info .preview-actions > button:not(.primary):not(.danger),
.preview-info .preview-actions > .button {
  border-color: rgba(8, 8, 7, .15);
  background: rgba(255, 252, 240, .72);
  color: #171610;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .52);
}

.preview-info .preview-actions > button:not(.primary):not(.danger):hover,
.preview-info .preview-actions > .button:hover {
  border-color: rgba(8, 8, 7, .26);
  background: rgba(255, 252, 240, .94);
  color: #080807;
}

.preview-info .preview-actions > .danger {
  border-color: rgba(255, 98, 82, .72);
  background: rgba(255, 98, 82, .16);
  color: #8f1f17;
}

.preview-nav {
  border-color: rgba(255, 250, 240, .18);
  background: rgba(8, 8, 7, .50);
}

.dialog-close {
  border-color: rgba(255, 250, 240, .18);
  background: rgba(8, 8, 7, .58);
  color: var(--white);
}

.preview-info .dialog-close,
.preview-card > .dialog-close {
  z-index: 4;
}

.toast {
  border-color: var(--brand);
  background: rgba(8, 8, 7, .92);
}

@media (max-width: 1180px) {
  .command-hero,
  .workspace-layout,
  .share-panel,
  .sync-panel {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    top: 0;
    max-height: none;
  }

  .category-list {
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  }
}

@media (max-width: 760px) {
  .app-shell {
    padding: 10px;
  }

  .app-cursor {
    display: none;
  }

  .command-hero {
    min-height: auto;
  }

  .command-copy,
  .command-board article,
  .account-card,
  .share-panel,
  .sync-panel {
    padding: 14px;
  }

  .command-copy h1 {
    font-size: 40px;
  }

  .account-card,
  .share-controls,
  .search,
  .upload-strip,
  .sync-box,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .gallery {
    grid-template-columns: repeat(auto-fill, minmax(138px, 1fr));
    min-height: 360px;
  }

  .preview-card {
    grid-template-columns: 1fr;
  }
}

/* Gate page, material stack, and theme switching */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--muted-dark);
}

body:not(.theme-blue) .theme-toggle {
  color: rgba(255, 250, 240, .86);
}

body:not(.theme-blue) .theme-toggle strong {
  color: rgba(255, 250, 240, .92);
}

.theme-toggle span {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f8fbff 0 50%, #2f6dff 50% 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .36);
}

.theme-toggle strong {
  font-size: 12px;
}

.library-page[hidden] {
  display: none !important;
}

.library-page {
  display: grid;
  gap: 12px;
  order: 4;
}

body.library-unlocked #gatePage {
  display: none;
}

.library-page .sync-panel {
  order: 1;
}

.library-page .display-entry-panel {
  order: 2;
}

.library-page .library-hero {
  order: 3;
}

.library-page .stats-grid {
  order: 4;
}

.library-page .workspace-layout {
  order: 5;
}

.library-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(420px, 1.08fr) minmax(340px, .92fr);
  gap: 12px;
}

.library-hero-copy,
.library-hero-aside,
.session-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(12, 12, 10, .76);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.library-hero-copy {
  min-height: 420px;
  display: grid;
  align-content: end;
  padding: clamp(22px, 4vw, 52px);
  overflow: hidden;
  background:
    linear-gradient(120deg, rgba(199, 255, 74, .13), transparent 38%, rgba(100, 240, 221, .10) 72%, transparent),
    rgba(12, 12, 10, .76);
  background-size: 180% 100%;
}

.library-hero-copy h1 {
  max-width: 1000px;
  margin: 0 0 18px;
  color: var(--white);
  font-size: clamp(38px, 4.8vw, 74px);
  line-height: .96;
  text-wrap: balance;
  word-break: normal;
}

.library-hero-copy h1 span {
  display: block;
}

.library-hero-copy p:not(.eyebrow) {
  max-width: 760px;
  color: var(--muted-dark);
  font-size: clamp(14px, 1vw, 18px);
  line-height: 1.72;
}

.library-hero-aside {
  display: grid;
  grid-template-rows: auto minmax(260px, 1fr);
  gap: 12px;
  padding: 12px;
  background: rgba(255, 250, 240, .035);
}

.session-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 12px;
  align-items: center;
  padding: 14px;
}

.session-card span {
  grid-column: 1 / -1;
  color: var(--brand);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.session-card strong {
  min-width: 0;
  overflow: hidden;
  color: var(--white);
  font-size: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-card small {
  color: var(--muted-dark);
}

.session-card button {
  grid-row: 2 / span 2;
  grid-column: 2;
}

.library-recent-frame {
  min-height: 300px;
}

.gate-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
  max-width: 720px;
  margin-top: clamp(22px, 4vw, 54px);
}

.gate-form .primary {
  grid-column: 1 / -1;
}

.gate-form label {
  color: var(--muted-dark);
}

.gate-form input {
  border-color: rgba(255, 250, 240, .16);
  background: rgba(255, 250, 240, .08);
  color: var(--white);
}

.command-side {
  display: grid;
  grid-template-rows: minmax(220px, .95fr) minmax(240px, 1fr);
  gap: 12px;
  min-height: 0;
}

.recent-material-frame {
  position: relative;
  min-height: 260px;
  overflow: visible;
  border: 0;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 68% 36%, rgba(100, 240, 221, .18), transparent 12rem),
    linear-gradient(145deg, rgba(255, 250, 240, .08), rgba(255, 250, 240, .018));
}

.recent-copy {
  position: absolute;
  left: 20px;
  top: 20px;
  z-index: 4;
}

.recent-copy strong {
  display: block;
  color: var(--white);
  font-size: clamp(20px, 2vw, 32px);
  line-height: 1;
}

.recent-photo {
  position: absolute;
  margin: 0;
  overflow: hidden;
  border: 0;
  border-radius: 6px;
  background:
    linear-gradient(135deg, rgba(255, 250, 240, .20), rgba(255, 250, 240, .04)),
    #191915;
  box-shadow: 0 28px 76px rgba(0, 0, 0, .38);
}

.recent-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.recent-photo span {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: rgba(8, 8, 7, .62);
  color: var(--brand);
  font-size: 11px;
  font-weight: 900;
  backdrop-filter: blur(10px);
}

.recent-photo.photo-a {
  right: 8%;
  top: 18px;
  z-index: 3;
  width: min(54%, 330px);
  aspect-ratio: 4 / 5;
  transform: rotate(3deg);
}

.recent-photo.photo-b {
  left: 10%;
  bottom: 16px;
  z-index: 2;
  width: min(48%, 292px);
  aspect-ratio: 1;
  transform: rotate(-5deg);
}

.recent-photo.photo-c {
  right: 2%;
  bottom: -10px;
  z-index: 1;
  width: min(42%, 240px);
  aspect-ratio: 5 / 4;
  transform: rotate(8deg);
  opacity: .86;
}

.library-commandbar {
  display: grid;
  grid-template-columns: minmax(160px, .4fr) minmax(160px, .38fr) minmax(150px, .32fr) auto;
  gap: 10px;
  align-items: end;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(100, 240, 221, .08), transparent 60%),
    rgba(255, 250, 240, .035);
}

.selection-tools {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.selection-tools span {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 250, 240, .07);
  color: var(--muted-dark);
}

.category-card.designer-folder:not(.active) .designer-color {
  display: none;
}

.category-card.designer-folder.active .designer-color {
  display: inline-grid;
}

body.theme-blue {
  --ink: #10213f;
  --ink-2: #dce8ff;
  --paper: #f7fbff;
  --paper-2: #e9f1ff;
  --white: #ffffff;
  --muted-dark: rgba(16, 33, 63, .82);
  --line: rgba(38, 83, 153, .16);
  --brand: #2f6dff;
  --brand-2: rgba(47, 109, 255, .12);
  --accent: #6cc8ff;
  --shadow-soft: 0 18px 48px rgba(47, 109, 255, .13);
  --shadow: 0 26px 70px rgba(47, 109, 255, .18);
  color-scheme: light;
  background:
    radial-gradient(circle at 14% 6%, rgba(108, 200, 255, .30), transparent 30rem),
    radial-gradient(circle at 88% 10%, rgba(47, 109, 255, .16), transparent 34rem),
    linear-gradient(180deg, #f8fbff 0%, #edf5ff 48%, #f9fcff 100%);
  color: var(--ink);
}

body.theme-blue::before {
  background:
    linear-gradient(90deg, rgba(47, 109, 255, .08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(47, 109, 255, .07) 1px, transparent 1px);
  background-size: 72px 72px;
}

body.theme-blue .site-header,
body.theme-blue .command-copy,
body.theme-blue .command-board,
body.theme-blue .library-hero-copy,
body.theme-blue .library-hero-aside,
body.theme-blue .session-card,
body.theme-blue .stat-card,
body.theme-blue .sync-panel,
body.theme-blue .sidebar,
body.theme-blue .content-panel,
body.theme-blue .recent-material-frame {
  border-color: rgba(47, 109, 255, .16);
  background: rgba(255, 255, 255, .76);
  box-shadow: var(--shadow-soft);
}

body.theme-blue .command-copy {
  background:
    linear-gradient(120deg, rgba(47, 109, 255, .16), transparent 34%, rgba(108, 200, 255, .20) 68%, transparent),
    rgba(255, 255, 255, .82);
  background-size: 180% 100%;
}

body.theme-blue .library-hero-copy {
  background:
    linear-gradient(120deg, rgba(47, 109, 255, .16), transparent 36%, rgba(108, 200, 255, .18) 72%, transparent),
    rgba(255, 255, 255, .82);
  background-size: 180% 100%;
}

body.theme-blue .command-board {
  background: rgba(47, 109, 255, .14);
}

body.theme-blue .command-board article {
  background:
    linear-gradient(135deg, rgba(47, 109, 255, .10), rgba(255, 255, 255, .80)),
    #ffffff;
}

body.theme-blue .site-header,
body.theme-blue .nav-pill,
body.theme-blue .mobile-nav {
  background: rgba(255, 255, 255, .78);
}

body.theme-blue .brand,
body.theme-blue .command-copy h1,
body.theme-blue .library-hero-copy h1,
body.theme-blue .command-board strong,
body.theme-blue .recent-copy strong,
body.theme-blue .session-card strong,
body.theme-blue .side-head strong,
body.theme-blue .content-head h2,
body.theme-blue .upload-strip h2,
body.theme-blue .sync-panel h2,
body.theme-blue .stat-card strong,
body.theme-blue .material-title,
body.theme-blue .empty-state strong {
  color: var(--ink);
}

body.theme-blue .command-copy p:not(.eyebrow),
body.theme-blue .library-hero-copy p:not(.eyebrow),
body.theme-blue .command-board small,
body.theme-blue .command-tags span,
body.theme-blue .session-card small,
body.theme-blue .gate-form label,
body.theme-blue .nav-pill a,
body.theme-blue .mobile-nav a,
body.theme-blue .upload-strip p,
body.theme-blue .sync-panel p,
body.theme-blue #statusText,
body.theme-blue .category-card small,
body.theme-blue .material-meta small,
body.theme-blue .stat-card span,
body.theme-blue .stat-card small,
body.theme-blue .selection-tools span {
  color: var(--muted-dark);
}

body.theme-blue input,
body.theme-blue select,
body.theme-blue .gate-form input,
body.theme-blue button,
body.theme-blue .button {
  border-color: rgba(47, 109, 255, .18);
  background: rgba(255, 255, 255, .82);
  color: var(--ink);
}

body.theme-blue select {
  color-scheme: light;
}

body.theme-blue select option {
  background: #f8fbff;
  color: #10213f;
}

body.theme-blue select option:checked {
  background: #2f6dff;
  color: #ffffff;
}

body.theme-blue .primary {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

body.theme-blue .brand-mark {
  border-color: rgba(47, 109, 255, .30);
}

body.theme-blue .brand-mark span,
body.theme-blue .side-head span,
body.theme-blue .material-check input:checked + span {
  background: var(--brand);
  color: #fff;
}

body.theme-blue .nav-pill a:hover,
body.theme-blue .mobile-nav a:hover {
  background: var(--brand);
  color: #fff;
}

body.theme-blue .upload-strip,
body.theme-blue .toolbar,
body.theme-blue .library-commandbar {
  border-color: rgba(47, 109, 255, .14);
  background:
    linear-gradient(90deg, rgba(47, 109, 255, .08), transparent 60%),
    rgba(255, 255, 255, .54);
}

body.theme-blue .category-card,
body.theme-blue .folder-node,
body.theme-blue .material-card,
body.theme-blue .gallery-pagination,
body.theme-blue .empty-state,
body.theme-blue .selection-tools span,
body.theme-blue .chip,
body.theme-blue .tag {
  border-color: rgba(47, 109, 255, .14);
  background: rgba(255, 255, 255, .70);
  color: var(--ink);
}

body.theme-blue .gallery-pagination strong,
body.theme-blue .page-actions span {
  color: var(--ink);
}

body.theme-blue .gallery-pagination span,
body.theme-blue .gallery-pagination label {
  color: var(--muted-dark);
}

body.theme-blue .category-card.active,
body.theme-blue .folder-node:hover,
body.theme-blue .folder-node.active {
  border-color: var(--brand);
  background: rgba(47, 109, 255, .10);
}

body.theme-blue .category-card.designer-folder {
  --designer-color: rgba(47, 109, 255, .18);
  background:
    linear-gradient(125deg, rgba(255, 255, 255, .82), rgba(219, 234, 255, .76)),
    var(--designer-color);
}

body.theme-blue .category-card.designer-folder.active {
  background:
    linear-gradient(135deg, rgba(47, 109, 255, .20), rgba(255, 255, 255, .76)),
    var(--designer-color);
}

body.theme-blue .material-meta {
  background: rgba(255, 255, 255, .86);
}

body.theme-blue .preview-card,
body.theme-blue .dialog-card {
  border-color: rgba(47, 109, 255, .18);
  background: #ffffff;
  color: var(--ink);
}

body.theme-blue .preview-media {
  background:
    linear-gradient(90deg, rgba(47, 109, 255, .08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(47, 109, 255, .07) 1px, transparent 1px),
    #f5f9ff;
  background-size: 64px 64px;
}

body.theme-blue .preview-info {
  background:
    linear-gradient(180deg, rgba(47, 109, 255, .10), transparent 38%),
    #ffffff;
  color: var(--ink);
}

body.theme-blue .preview-info h3 {
  color: var(--ink);
}

body.theme-blue .dialog-close,
body.theme-blue .preview-nav,
body.theme-blue .toast {
  border-color: rgba(47, 109, 255, .18);
  background: rgba(255, 255, 255, .86);
  color: var(--ink);
}

@media (max-width: 1180px) {
  .library-hero,
  .command-side,
  .gate-form,
  .library-commandbar {
    grid-template-columns: 1fr;
  }

  .command-side {
    grid-template-rows: minmax(260px, auto) auto;
  }
}

@media (max-width: 760px) {
  .site-header {
    grid-template-columns: 1fr auto auto;
  }

  .nav-pill {
    display: none;
  }

  .theme-toggle {
    min-height: 34px;
    padding: 6px 8px;
  }

  .command-copy h1 {
    font-size: 36px;
  }

  .library-hero-copy {
    min-height: auto;
    padding: 18px;
  }

  .library-hero-copy h1 {
    font-size: 36px;
  }

  .session-card {
    grid-template-columns: 1fr;
  }

  .session-card button {
    grid-row: auto;
    grid-column: auto;
  }

  .recent-material-frame {
    min-height: 250px;
  }

  .library-commandbar,
  .gate-form {
    grid-template-columns: 1fr;
  }

}

/* Designer cloud directory refinement */
.workspace-layout {
  grid-template-columns: minmax(330px, 390px) minmax(0, 1fr);
}

.sidebar {
  padding: 16px;
}

.side-head {
  align-items: flex-start;
}

.side-head strong {
  font-size: 22px;
  line-height: 1.12;
}

.side-actions {
  gap: 10px;
  margin-bottom: 14px;
}

.category-list {
  gap: 12px;
}

.category-card.designer-folder {
  position: relative;
  overflow: hidden;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 18px;
  border-color: rgba(255, 250, 240, .13);
  border-left: 0;
  background:
    linear-gradient(135deg, rgba(255, 250, 240, .10), rgba(255, 250, 240, .035)),
    rgba(255, 250, 240, .045);
}

.category-card.designer-folder::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, var(--brand), var(--accent));
  opacity: .78;
}

.category-card.designer-folder.active {
  border-color: rgba(199, 255, 74, .48);
  background:
    linear-gradient(145deg, rgba(199, 255, 74, .15), rgba(100, 240, 221, .06) 42%, rgba(255, 250, 240, .045)),
    rgba(255, 250, 240, .055);
}

.designer-card-main {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.designer-kicker {
  color: var(--brand);
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
  text-transform: uppercase;
}

.designer-name {
  overflow: hidden;
  color: var(--white);
  font-size: 20px;
  font-weight: 850;
  line-height: 1.16;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.designer-subline {
  overflow: hidden;
  color: var(--muted-dark);
  font-size: 12px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.designer-meta {
  display: grid;
  justify-items: end;
  min-width: 74px;
  color: var(--muted-dark);
  font-size: 12px;
  line-height: 1.15;
}

.designer-meta strong {
  color: var(--white);
  font-size: 24px;
  line-height: .95;
}

.designer-meta span {
  color: var(--brand);
  font-weight: 800;
}

.designer-meta small {
  margin-top: 5px;
  color: var(--muted-dark);
  white-space: nowrap;
}

.designer-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 2px;
}

.designer-actions button {
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 760;
}

.designer-color,
.designer-color span {
  width: 38px;
  height: 38px;
}

.designer-color span {
  border: 1px solid rgba(17, 24, 39, .42);
  border-radius: 8px;
  box-shadow: inset 0 0 0 5px rgba(255, 250, 240, .30), 0 0 0 1px rgba(17, 24, 39, .14);
}

.folder-tree {
  position: relative;
  gap: 8px;
  margin-top: 4px;
  padding: 12px 0 0 14px;
  border-left: 1px solid rgba(199, 255, 74, .28);
}

.folder-tree.empty-tree {
  min-height: 48px;
  align-content: center;
  padding-left: 14px;
  color: var(--muted-dark);
}

.folder-node {
  position: relative;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 62px;
  padding: 10px;
  border: 1px solid rgba(255, 250, 240, .12);
  border-radius: 6px;
  background: rgba(8, 8, 7, .24);
  color: var(--white);
  box-shadow: none;
}

.folder-node::before {
  content: "";
  position: absolute;
  left: -18px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--brand);
  box-shadow: 0 0 0 4px rgba(199, 255, 74, .12);
  transform: translateY(-50%);
}

.folder-node:hover,
.folder-node.active,
.folder-node.drop-target {
  border-color: rgba(199, 255, 74, .58);
  background: rgba(199, 255, 74, .10);
}

.folder-open {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.folder-name {
  overflow: hidden;
  font-size: 17px;
  font-weight: 760;
  line-height: 1.18;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.folder-meta {
  color: var(--muted-dark);
  font-size: 12px;
}

.folder-actions {
  display: inline-flex;
  gap: 6px;
}

.folder-actions button {
  width: 38px;
  min-width: 38px;
  min-height: 38px;
  padding: 0;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 780;
}

.category-card.designer-folder.has-custom-color {
  border-left-color: color-mix(in srgb, var(--designer-color) 78%, var(--brand));
  border-left-width: 5px;
  background:
    linear-gradient(135deg, rgba(8, 8, 7, .82), rgba(8, 8, 7, .50) 58%, rgba(255, 250, 240, .05)),
    var(--designer-color);
}

.category-card.designer-folder.active.has-custom-color {
  background:
    linear-gradient(135deg, rgba(8, 8, 7, .72), rgba(8, 8, 7, .46) 50%, rgba(199, 255, 74, .10)),
    var(--designer-color);
}

.designer-actions button,
.folder-actions button {
  border-color: rgba(255, 250, 240, .50);
  background: rgba(255, 250, 240, .90);
  color: #111827;
  text-shadow: none;
  box-shadow: none;
}

.designer-actions button:hover,
.folder-actions button:hover {
  border-color: rgba(199, 255, 74, .70);
  background: #fffaf0;
  color: #080807;
}

.designer-delete,
.folder-delete {
  color: #761d1b;
}

.category-card.designer-folder.active .designer-actions button,
.category-card.designer-folder.active .folder-actions button {
  border-color: rgba(255, 250, 240, .56);
  background: rgba(255, 250, 240, .92);
  color: #111827;
}

.category-card.designer-folder.active .designer-delete,
.category-card.designer-folder.active .folder-delete {
  color: #761d1b;
}

body.theme-blue .category-card.designer-folder {
  border-color: rgba(47, 109, 255, .18);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .90), rgba(226, 238, 255, .76)),
    var(--designer-color);
}

body.theme-blue .category-card.designer-folder.active {
  border-color: rgba(47, 109, 255, .58);
  background:
    linear-gradient(135deg, rgba(47, 109, 255, .15), rgba(255, 255, 255, .84) 52%, rgba(108, 200, 255, .14)),
    var(--designer-color);
}

body.theme-blue .category-card.designer-folder.has-custom-color {
  border-left-color: color-mix(in srgb, var(--designer-color) 70%, #2f6dff);
  box-shadow: inset 1px 0 0 rgba(16, 33, 63, .18);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .70), rgba(255, 255, 255, .46) 54%, rgba(47, 109, 255, .10)),
    var(--designer-color);
}

body.theme-blue .category-card.designer-folder.active.has-custom-color {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .64), rgba(255, 255, 255, .40) 48%, rgba(47, 109, 255, .12)),
    var(--designer-color);
}

body.theme-blue .designer-name,
body.theme-blue .designer-meta strong,
body.theme-blue .folder-name {
  color: var(--ink);
}

body.theme-blue .designer-actions button,
body.theme-blue .folder-actions button {
  border-color: rgba(47, 109, 255, .24);
  background: rgba(255, 255, 255, .92);
  color: #10213f;
}

body.theme-blue .designer-actions button:hover,
body.theme-blue .folder-actions button:hover {
  border-color: rgba(47, 109, 255, .48);
  background: #ffffff;
  color: #06142c;
}

body.theme-blue .designer-delete,
body.theme-blue .folder-delete {
  color: #8f1d28;
}

body.theme-blue .category-card.designer-folder.active .designer-actions button,
body.theme-blue .category-card.designer-folder.active .folder-actions button {
  border-color: rgba(47, 109, 255, .28);
  background: rgba(255, 255, 255, .94);
  color: #10213f;
}

body.theme-blue .category-card.designer-folder.active .designer-delete,
body.theme-blue .category-card.designer-folder.active .folder-delete {
  color: #8f1d28;
}

body.theme-blue .category-card.designer-folder.active .designer-color span {
  border-color: rgba(16, 33, 63, .38);
  box-shadow: inset 0 0 0 5px rgba(255, 255, 255, .38), 0 0 0 1px rgba(16, 33, 63, .16);
}

body.theme-blue .designer-kicker,
body.theme-blue .designer-meta span {
  color: var(--brand);
}

body.theme-blue .designer-subline,
body.theme-blue .designer-meta small,
body.theme-blue .folder-meta {
  color: rgba(16, 33, 63, .62);
}

body.theme-blue .folder-tree {
  border-left-color: rgba(47, 109, 255, .24);
}

body.theme-blue .folder-node {
  border-color: rgba(47, 109, 255, .15);
  background: rgba(255, 255, 255, .68);
}

body.theme-blue .folder-node::before {
  background: var(--brand);
  box-shadow: 0 0 0 4px rgba(47, 109, 255, .12);
}

body.theme-blue .folder-node:hover,
body.theme-blue .folder-node.active,
body.theme-blue .folder-node.drop-target {
  border-color: rgba(47, 109, 255, .50);
  background: rgba(47, 109, 255, .09);
}

@media (max-width: 1180px) {
  .workspace-layout {
    grid-template-columns: 1fr;
  }

  .category-list {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

@media (max-width: 760px) {
  .category-card.designer-folder {
    grid-template-columns: 1fr;
  }

  .designer-meta {
    justify-items: start;
  }

  .folder-node {
    grid-template-columns: 1fr;
  }

  .folder-actions {
    justify-content: flex-start;
  }
}

/* ===== 浮动批量操作栏 & 撤销条（素材整理交互优化）===== */
.selection-bar {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 60;
  transform: translate(-50%, 18px);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 14px;
  width: max-content;
  max-width: calc(100vw - 32px);
  padding: 10px 12px;
  border: 1px solid var(--line-dark, rgba(8,8,8,.18));
  border-radius: 14px;
  background: var(--ink, #10213F);
  color: var(--white, #fff);
  box-shadow: 0 10px 34px rgba(8, 20, 45, .28);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.selection-bar.visible {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}
.selection-bar-count {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  font-size: 14px;
  white-space: nowrap;
}
.selection-bar-count strong { font-size: 15px; }
.selection-bar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.selection-bar-actions button {
  min-width: 82px;
  min-height: 42px;
  padding: 8px 14px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 9px;
  background: rgba(255,255,255,.10);
  color: var(--white, #fff);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}
.selection-bar-actions button:hover { background: rgba(255,255,255,.20); transform: translateY(-1px); }
.selection-bar-actions button.archive-filter {
  border-color: rgba(183, 255, 239, .38);
  background: rgba(183, 255, 239, .18);
  color: #f7fffb;
}
.selection-bar-actions button.archive-filter:hover {
  background: rgba(183, 255, 239, .28);
}
.selection-bar-actions button.danger { background: rgba(229,72,77,.85); border-color: transparent; }
.selection-bar-actions button.danger:hover { background: rgba(229,72,77,1); }

.undo-bar {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 70;
  transform: translate(-50%, 18px);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 16px;
  border-radius: 14px;
  background: var(--ink, #10213F);
  color: var(--white, #fff);
  box-shadow: 0 10px 34px rgba(8, 20, 45, .28);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.undo-bar.visible { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.undo-bar-text { font-size: 14px; white-space: nowrap; }
.undo-bar-btn {
  padding: 7px 16px;
  border: 1px solid rgba(255,255,255,.30);
  border-radius: 9px;
  background: transparent;
  color: var(--white, #fff);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.undo-bar-btn:hover { background: rgba(255,255,255,.16); }

@media (max-width: 640px) {
  .selection-bar, .undo-bar { left: 12px; right: 12px; transform: translateY(18px); width: auto; }
  .selection-bar.visible, .undo-bar.visible { transform: translateY(0); }
  .selection-bar { flex-wrap: wrap; justify-content: center; }
  .selection-bar-actions { width: 100%; }
  .selection-bar-actions button { flex: 1 1 112px; }
}

/* ===== 资料展示大屏 / DataRoom MCP View ===== */
.display-toggle {
  min-height: 38px;
  border-color: rgba(183, 255, 239, .4);
  background: rgba(183, 255, 239, .12);
  color: var(--white);
  padding-inline: 14px;
}

.display-toggle:hover {
  border-color: rgba(183, 255, 239, .78);
  background: rgba(183, 255, 239, .2);
}

.display-entry-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr);
  gap: 18px;
  align-items: center;
  margin: 14px 0 16px;
  padding: 18px 20px;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  background:
    linear-gradient(120deg, rgba(183, 255, 239, .12), transparent 42%, rgba(255, 190, 92, .10)),
    rgba(8, 8, 8, .78);
  color: var(--white);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.display-entry-panel h2 {
  margin: 4px 0 6px;
  color: var(--white);
  font-size: clamp(24px, 2.4vw, 38px);
  line-height: 1.05;
}

.display-entry-panel p:not(.eyebrow),
.display-entry-actions span {
  color: var(--muted-dark);
}

.display-entry-actions {
  display: grid;
  justify-items: end;
  gap: 10px;
}

.display-entry-actions .display-toggle {
  min-height: 48px;
  padding-inline: 22px;
  font-weight: 800;
}

.mobile-nav button {
  width: 100%;
  justify-content: flex-start;
  border-color: var(--line-dark);
  background: rgba(255, 255, 255, .08);
  color: var(--white);
}

.site-footer {
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: center;
  width: calc(100% - 36px);
  margin: 18px auto 22px;
  padding: 14px 18px;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  background: rgba(8, 8, 8, .82);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px);
}

.site-footer a {
  color: var(--white);
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--accent);
}

body.display-mode {
  overflow: hidden;
}

.display-screen {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 16px;
  overflow: hidden;
  padding: 18px;
  background:
    linear-gradient(135deg, #070a0c, #0d1718 54%, #080808),
    #070a0c;
  color: #f4fffb;
}

.display-screen[hidden] {
  display: none;
}

.display-gridlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .18;
  background-image:
    linear-gradient(rgba(183, 255, 239, .14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(183, 255, 239, .12) 1px, transparent 1px);
  background-size: 72px 72px;
}

.display-header,
.display-stage-layout,
.display-ticker {
  position: relative;
  z-index: 1;
}

.display-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 74px;
  padding: 12px 14px 12px 20px;
  border: 1px solid rgba(183, 255, 239, .2);
  border-radius: var(--radius);
  background: rgba(12, 22, 23, .92);
  backdrop-filter: blur(20px);
}

.display-title h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 46px);
  line-height: 1;
}

.display-title span {
  display: inline-block;
  margin-top: 8px;
  color: rgba(244, 255, 251, .58);
  font-size: 12px;
}

.display-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.display-header-actions button,
.display-control-actions button {
  border-color: rgba(183, 255, 239, .26);
  background: rgba(255, 255, 255, .08);
  color: #f4fffb;
}

.display-header-actions button:hover,
.display-control-actions button:hover {
  border-color: rgba(183, 255, 239, .7);
  background: rgba(183, 255, 239, .16);
}

.display-header-actions button.active {
  border-color: rgba(17, 167, 156, .9);
  background: rgba(17, 167, 156, .32);
}

.display-status {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid rgba(183, 255, 239, .22);
  border-radius: 999px;
  color: rgba(244, 255, 251, .76);
  font-size: 12px;
}

.display-gesture-light {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid rgba(183, 255, 239, .18);
  border-radius: 999px;
  color: rgba(244, 255, 251, .68);
  font-size: 12px;
  white-space: nowrap;
}

.display-gesture-light i {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: rgba(244, 255, 251, .32);
  box-shadow: 0 0 0 4px rgba(244, 255, 251, .05);
}

.display-gesture-light.is-active i {
  background: var(--display-cyan, #6debd8);
  box-shadow: 0 0 16px rgba(109, 235, 216, .72);
}

.display-gesture-light.is-success {
  border-color: rgba(184, 244, 98, .48);
  color: #f7fff7;
}

.display-gesture-light.is-success i {
  background: var(--display-green, #b8f462);
  box-shadow: 0 0 18px rgba(184, 244, 98, .82);
}

.display-gesture-light.is-error i {
  background: #ff796d;
  box-shadow: 0 0 16px rgba(255, 121, 109, .72);
}

.display-stage-layout {
  display: grid;
  grid-template-columns: minmax(146px, 180px) minmax(0, 1fr) minmax(260px, 320px);
  gap: 16px;
  min-height: 0;
}

.display-metrics,
.display-control-panel {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 0;
}

.display-metrics article {
  min-height: 96px;
  padding: 16px;
  border: 1px solid rgba(183, 255, 239, .18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .055);
}

.display-metrics article.wide {
  min-height: 78px;
}

.display-metrics span,
.display-stage-meta p,
.display-progress,
.display-control-panel label,
.display-gesture-card span {
  color: rgba(244, 255, 251, .62);
}

.display-metrics strong {
  display: block;
  margin-top: 8px;
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1;
}

.display-stage {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(183, 255, 239, .2);
  border-radius: var(--radius);
  background: #071011;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .28);
}

.display-stage-media {
  position: relative;
  display: grid;
  min-height: 0;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(17, 167, 156, .1), rgba(255, 190, 92, .08)),
    #091314;
}

.display-stage-media img {
  width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
}

.display-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(244, 255, 251, .7);
  font-size: 22px;
}

.display-empty[hidden] {
  display: none;
}

.display-stage-meta {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px 12px;
  border-top: 1px solid rgba(183, 255, 239, .16);
}

.display-stage-meta h3 {
  margin: 0 0 6px;
  max-width: 780px;
  overflow-wrap: anywhere;
  font-size: clamp(22px, 2.3vw, 38px);
  line-height: 1.1;
}

.display-stage-meta p {
  margin: 0;
}

.display-progress {
  display: grid;
  gap: 6px;
  flex: 0 0 auto;
  text-align: right;
  font-size: 13px;
}

.display-thumb-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(78px, 8vw);
  gap: 8px;
  overflow-x: auto;
  padding: 10px 12px 14px;
  scrollbar-width: thin;
}

.display-thumb {
  aspect-ratio: 4 / 3;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  border-color: rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .06);
}

.display-thumb.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(183, 255, 239, .2);
}

.display-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.display-control-panel {
  overflow: auto;
  padding: 14px;
  border: 1px solid rgba(183, 255, 239, .18);
  border-radius: var(--radius);
  background: rgba(12, 22, 23, .94);
}

.display-control-panel input,
.display-control-panel select {
  border-color: rgba(183, 255, 239, .24);
  background: rgba(5, 8, 10, .72);
  color: #f4fffb;
}

.display-control-panel select option {
  background: #0b1113;
  color: #f4fffb;
}

.display-control-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.display-gesture-card {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  align-items: center;
  margin-top: 4px;
  padding: 10px;
  border: 1px solid rgba(183, 255, 239, .18);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, .22);
}

.display-gesture-card video {
  width: 96px;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .08);
  object-fit: cover;
  transform: scaleX(-1);
}

.display-gesture-card strong {
  display: block;
  margin-top: 5px;
  color: #f4fffb;
}

.display-ticker {
  min-height: 42px;
  overflow: hidden;
  padding: 11px 14px;
  border: 1px solid rgba(183, 255, 239, .16);
  border-radius: var(--radius);
  background: rgba(12, 22, 23, .94);
  color: rgba(244, 255, 251, .72);
  white-space: nowrap;
  text-overflow: ellipsis;
}

@media (max-width: 1180px) {
  .display-screen {
    overflow: auto;
  }

  .display-stage-layout {
    grid-template-columns: 1fr;
  }

  .display-metrics {
    grid-template-columns: repeat(5, minmax(120px, 1fr));
    overflow-x: auto;
  }

  .display-control-panel {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .display-gesture-card {
    grid-column: span 2;
  }
}

@media (max-width: 760px) {
  .display-toggle {
    display: none;
  }

  .display-screen {
    padding: 10px;
    gap: 10px;
  }

  .display-header,
  .display-stage-meta {
    align-items: stretch;
    flex-direction: column;
  }

  .display-title h2 {
    font-size: 26px;
  }

  .display-header-actions {
    justify-content: flex-start;
  }

  .display-stage {
    min-height: 68vh;
  }

  .display-metrics {
    grid-template-columns: repeat(2, minmax(130px, 1fr));
  }

  .display-control-panel {
    grid-template-columns: 1fr;
  }

  .display-gesture-card {
    grid-column: auto;
  }
}

/* ===== Display Screen v2: brand view, data/material modes, gestures ===== */
.display-screen {
  --display-panel: #0b1415;
  --display-panel-2: #101a1b;
  --display-line: rgba(197, 255, 238, .18);
  --display-line-strong: rgba(197, 255, 238, .36);
  --display-green: #b8f462;
  --display-cyan: #6debd8;
  --display-gold: #ffcf74;
  background:
    linear-gradient(112deg, rgba(184, 244, 98, .08), transparent 24%),
    linear-gradient(248deg, rgba(109, 235, 216, .08), transparent 34%),
    linear-gradient(135deg, #060908, #0c1516 48%, #080807);
  background-color: #060908;
  isolation: isolate;
}

.display-header {
  min-height: 88px;
  border-color: var(--display-line);
  background:
    linear-gradient(90deg, rgba(184, 244, 98, .08), rgba(109, 235, 216, .05)),
    rgba(8, 14, 15, .96);
  box-shadow: 0 18px 60px rgba(0, 0, 0, .28);
}

.display-title {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.display-title h2 {
  color: #f7fff7;
  font-size: clamp(30px, 3.1vw, 54px);
  font-weight: 850;
}

.display-title .eyebrow,
.display-card-head .eyebrow {
  color: var(--display-green);
}

.display-mode-switch {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(86px, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--display-line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .055);
}

.display-mode-switch button {
  min-height: 34px;
  padding: 7px 10px;
  border-color: transparent;
  background: transparent;
  color: rgba(247, 255, 247, .68);
  box-shadow: none;
}

.display-mode-switch button[aria-pressed="true"] {
  background: linear-gradient(90deg, rgba(184, 244, 98, .26), rgba(109, 235, 216, .18));
  color: #f7fff7;
}

.display-stage-layout {
  grid-template-columns: minmax(172px, 220px) minmax(0, 1fr) minmax(300px, 360px);
}

.display-metrics article,
.display-stage,
.display-control-panel,
.display-data-view > article,
.display-gesture-guide {
  border-color: var(--display-line);
  background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .025)), var(--display-panel);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 18px 56px rgba(0, 0, 0, .22);
}

.display-metrics article {
  display: grid;
  align-content: space-between;
  min-height: 112px;
}

.display-metrics strong {
  color: #f7fff7;
  font-size: clamp(34px, 3.2vw, 50px);
  line-height: .96;
  font-weight: 830;
}

.display-metrics article.wide strong {
  font-size: clamp(28px, 2.5vw, 42px);
}

.display-data-view {
  display: none;
  grid-column: 2 / 4;
  grid-template-columns: minmax(280px, .95fr) minmax(340px, 1.2fr) minmax(300px, .9fr);
  grid-template-rows: minmax(0, 1fr) minmax(132px, auto);
  gap: 16px;
  min-width: 0;
  min-height: 0;
}

.display-screen.view-data .display-data-view {
  display: grid;
}

.display-screen.view-data .display-stage,
.display-screen.view-data .display-control-panel {
  display: none;
}

.display-screen.view-materials .display-data-view {
  display: none;
}

.display-brand-card,
.display-chart-card {
  min-width: 0;
  overflow: hidden;
  padding: 18px;
  border: 1px solid var(--display-line);
  border-radius: var(--radius);
}

.display-brand-card {
  display: grid;
  align-content: space-between;
  min-height: 0;
  background:
    linear-gradient(130deg, rgba(184, 244, 98, .16), transparent 40%),
    linear-gradient(35deg, rgba(255, 207, 116, .12), rgba(109, 235, 216, .08));
}

.display-brand-card h3 {
  max-width: 680px;
  margin: 8px 0 16px;
  color: #f7fff7;
  font-size: clamp(30px, 2.75vw, 46px);
  line-height: 1.04;
}

.display-brand-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.display-brand-metrics span {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--display-line);
  border-radius: var(--radius);
  background: rgba(4, 8, 8, .42);
  color: rgba(247, 255, 247, .66);
}

.display-brand-metrics strong {
  display: block;
  margin-bottom: 4px;
  color: #f7fff7;
  font-size: clamp(24px, 1.9vw, 30px);
}

.display-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.display-card-head strong {
  color: #f7fff7;
  font-size: 18px;
}

.display-chart-card {
  min-height: 0;
}

.display-feed-card {
  grid-column: 1 / -1;
}

.display-bar-list,
.display-rank-list,
.display-feed-list {
  display: grid;
  gap: 10px;
  min-height: 0;
}

.display-bar-row,
.display-rank-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  overflow: hidden;
  padding: 10px 12px;
  border: 1px solid rgba(197, 255, 238, .12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .045);
}

.display-rank-row {
  grid-template-columns: 34px minmax(0, 1fr) auto;
}

.display-bar-row span,
.display-rank-row span {
  position: relative;
  z-index: 1;
  overflow: hidden;
  color: rgba(247, 255, 247, .78);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.display-bar-row strong,
.display-rank-row strong,
.display-rank-row em {
  position: relative;
  z-index: 1;
  color: #f7fff7;
  font-style: normal;
}

.display-bar-row i,
.display-rank-row i {
  position: absolute;
  inset: auto 0 0 0;
  width: var(--bar-width);
  height: 3px;
  background: linear-gradient(90deg, var(--display-green), var(--display-cyan));
}

.display-feed-list {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.display-feed-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
  min-height: 88px;
  padding: 8px;
  border-color: rgba(197, 255, 238, .13);
  background: rgba(255, 255, 255, .045);
  text-align: left;
}

.display-feed-row img {
  width: 72px;
  height: 72px;
  border-radius: var(--radius);
  object-fit: cover;
}

.display-feed-row span {
  min-width: 0;
}

.display-feed-row strong,
.display-feed-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.display-feed-row strong {
  color: #f7fff7;
  white-space: nowrap;
}

.display-feed-row small,
.display-list-empty {
  color: rgba(247, 255, 247, .58);
}

.display-stage-media {
  min-height: 0;
  background:
    linear-gradient(135deg, rgba(184, 244, 98, .08), transparent 40%),
    linear-gradient(25deg, rgba(109, 235, 216, .07), transparent 42%),
    #080d0e;
}

.display-stage-media img {
  padding: 10px;
}

.display-screen.view-materials .display-stage-media {
  display: block;
  overflow: auto;
  cursor: grab;
  touch-action: none;
  scrollbar-width: thin;
}

.display-screen.view-materials .display-stage-media.dragging {
  cursor: grabbing;
}

.display-screen.view-materials .display-stage-media img {
  display: block;
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  padding: 0;
  object-fit: unset;
  user-select: none;
  -webkit-user-drag: none;
}

.display-screen.view-materials .display-stage-meta {
  padding: 10px 16px 8px;
}

.display-screen.view-materials .display-stage-meta h3 {
  margin-bottom: 4px;
  font-size: clamp(20px, 1.8vw, 30px);
}

.display-screen.view-materials .display-stage-meta p,
.display-screen.view-materials .display-progress {
  font-size: 12px;
}

.display-screen.view-materials .display-thumb-rail {
  grid-auto-columns: minmax(56px, 5.8vw);
  gap: 7px;
  padding: 8px 10px 10px;
}

.display-zoom-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 5px 10px;
  border: 1px solid rgba(197, 255, 238, .28);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, .68);
  color: #f7fff7;
  font-size: 12px;
  font-weight: 800;
  pointer-events: none;
}

.display-control-panel {
  gap: 12px;
}

.display-gesture-card {
  background: rgba(5, 9, 9, .72);
}

.display-gesture-guide {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(240px, .9fr) minmax(0, 2.6fr);
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--display-line);
  border-radius: var(--radius);
}

.display-gesture-map {
  display: grid;
  grid-template-columns: repeat(8, minmax(92px, 1fr));
  gap: 8px;
}

.display-gesture-map span {
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid rgba(197, 255, 238, .13);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .045);
  color: rgba(247, 255, 247, .62);
  font-size: 12px;
}

.display-gesture-map span.active {
  border-color: rgba(184, 244, 98, .72);
  background: rgba(184, 244, 98, .16);
  color: #f7fff7;
}

.display-gesture-map strong {
  display: block;
  margin-bottom: 3px;
  color: #f7fff7;
  font-size: 13px;
}

.preview-zoom-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 3;
  display: none;
  min-height: 30px;
  align-items: center;
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, .6);
  color: #fff;
  font-size: 12px;
}

#previewDialog.detail-zoom .preview-card {
  width: min(96vw, 1500px);
  height: min(92vh, 920px);
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
}

#previewDialog.detail-zoom .preview-media {
  align-items: flex-start;
  justify-items: flex-start;
  overflow: auto;
  background: #050707;
}

#previewDialog.detail-zoom .preview-media img {
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  object-fit: unset;
}

#previewDialog.detail-zoom .preview-zoom-badge {
  display: inline-flex;
}

body.theme-blue .display-entry-panel {
  border-color: rgba(47, 109, 255, .16);
  background:
    linear-gradient(120deg, rgba(47, 109, 255, .13), transparent 44%, rgba(108, 200, 255, .16)),
    rgba(255, 255, 255, .78);
  color: var(--ink);
  box-shadow: var(--shadow-soft);
}

body.theme-blue .display-entry-panel h2,
body.theme-blue .display-entry-panel .eyebrow {
  color: var(--ink);
}

body.theme-blue .display-entry-panel p:not(.eyebrow),
body.theme-blue .display-entry-actions span {
  color: var(--muted-dark);
}

body.theme-blue .site-footer {
  border-color: rgba(47, 109, 255, .16);
  background: rgba(255, 255, 255, .82);
  box-shadow: var(--shadow-soft);
}

body.theme-blue .site-footer a {
  color: var(--ink);
}

body.theme-blue .display-screen:not(.display-theme-blue) button,
body.theme-blue .display-screen:not(.display-theme-blue) .button,
body.theme-blue .display-screen:not(.display-theme-blue) input,
body.theme-blue .display-screen:not(.display-theme-blue) select,
body.theme-blue .display-screen:not(.display-theme-blue) .display-feed-row {
  border-color: var(--display-line);
  background: rgba(255, 255, 255, .055);
  color: #f7fff7;
}

body.theme-blue .display-screen:not(.display-theme-blue) .display-control-panel input,
body.theme-blue .display-screen:not(.display-theme-blue) .display-control-panel select {
  background: rgba(5, 8, 10, .72);
  color: #f4fffb;
}

body.theme-blue .display-screen:not(.display-theme-blue) .display-feed-row strong,
body.theme-blue .display-screen:not(.display-theme-blue) .display-feed-row small {
  color: #f7fff7;
}

.display-screen.display-theme-blue {
  --display-panel: rgba(255, 255, 255, .84);
  --display-panel-2: #eef5ff;
  --display-line: rgba(47, 109, 255, .18);
  --display-line-strong: rgba(47, 109, 255, .34);
  --display-green: #2f6dff;
  --display-cyan: #25a8e8;
  --display-gold: #f4a735;
  background:
    linear-gradient(112deg, rgba(47, 109, 255, .13), transparent 24%),
    linear-gradient(248deg, rgba(108, 200, 255, .18), transparent 34%),
    linear-gradient(135deg, #f8fbff, #eef5ff 48%, #ffffff);
  background-color: #f8fbff;
  color: #10213f;
}

.display-theme-blue .display-gridlines {
  opacity: .22;
  background-image:
    linear-gradient(rgba(47, 109, 255, .12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47, 109, 255, .10) 1px, transparent 1px);
}

.display-theme-blue .display-header,
.display-theme-blue .display-metrics article,
.display-theme-blue .display-stage,
.display-theme-blue .display-control-panel,
.display-theme-blue .display-data-view > article,
.display-theme-blue .display-gesture-guide {
  border-color: var(--display-line);
  background: linear-gradient(180deg, rgba(255, 255, 255, .88), rgba(239, 246, 255, .74)), var(--display-panel);
  box-shadow: 0 18px 50px rgba(47, 109, 255, .13);
}

.display-theme-blue .display-title h2,
.display-theme-blue .display-metrics strong,
.display-theme-blue .display-brand-metrics strong,
.display-theme-blue .display-brand-card h3,
.display-theme-blue .display-card-head strong,
.display-theme-blue .display-bar-row strong,
.display-theme-blue .display-rank-row strong,
.display-theme-blue .display-rank-row em,
.display-theme-blue .display-bar-row span,
.display-theme-blue .display-rank-row span,
.display-theme-blue .display-feed-row strong,
.display-theme-blue .display-stage-meta h3,
.display-theme-blue .display-gesture-card strong,
.display-theme-blue .display-gesture-map strong {
  color: #10213f;
}

.display-theme-blue .display-title .eyebrow,
.display-theme-blue .display-card-head .eyebrow {
  color: #2f6dff;
}

.display-theme-blue .display-title span,
.display-theme-blue .display-status,
.display-theme-blue .display-gesture-light,
.display-theme-blue .display-metrics span,
.display-theme-blue .display-brand-metrics span,
.display-theme-blue .display-stage-meta p,
.display-theme-blue .display-progress,
.display-theme-blue .display-control-panel label,
.display-theme-blue .display-gesture-card span,
.display-theme-blue .display-feed-row small,
.display-theme-blue .display-list-empty,
.display-theme-blue .display-ticker,
.display-theme-blue .display-gesture-map span {
  color: rgba(16, 33, 63, .66);
}

.display-theme-blue .display-mode-switch,
.display-theme-blue .display-status,
.display-theme-blue .display-gesture-light,
.display-theme-blue .display-ticker,
.display-theme-blue .display-bar-row,
.display-theme-blue .display-rank-row,
.display-theme-blue .display-feed-row,
.display-theme-blue .display-gesture-map span,
.display-theme-blue .display-brand-metrics span {
  border-color: rgba(47, 109, 255, .16);
  background: rgba(255, 255, 255, .82);
}

.display-theme-blue .display-brand-card {
  background:
    linear-gradient(135deg, rgba(47, 109, 255, .13), transparent 46%),
    rgba(255, 255, 255, .90);
}

.display-theme-blue .display-chart-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .94), rgba(239, 246, 255, .84)),
    #ffffff;
}

.display-theme-blue .display-mode-switch button,
.display-theme-blue .display-header-actions button,
.display-theme-blue .display-control-actions button,
.display-theme-blue .display-control-panel input,
.display-theme-blue .display-control-panel select {
  border-color: rgba(47, 109, 255, .18);
  background: rgba(255, 255, 255, .78);
  color: #10213f;
}

.display-theme-blue .display-mode-switch button[aria-pressed="true"],
.display-theme-blue .display-header-actions button.active {
  background: linear-gradient(90deg, rgba(47, 109, 255, .22), rgba(108, 200, 255, .20));
  color: #10213f;
}

.display-theme-blue .display-stage-media {
  background:
    linear-gradient(135deg, rgba(47, 109, 255, .08), transparent 40%),
    linear-gradient(25deg, rgba(108, 200, 255, .10), transparent 42%),
    #f7fbff;
}

.display-theme-blue .display-gesture-card {
  background: rgba(255, 255, 255, .72);
}

.display-theme-blue .display-gesture-map span.active {
  border-color: rgba(47, 109, 255, .44);
  background: rgba(47, 109, 255, .12);
  color: #10213f;
}

@media (max-width: 1380px) {
  .display-data-view {
    grid-template-columns: minmax(0, 1fr) minmax(320px, .95fr);
  }

  .display-brand-card,
  .display-feed-card {
    grid-column: 1 / -1;
  }

  .display-feed-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .display-gesture-map {
    grid-template-columns: repeat(4, minmax(120px, 1fr));
  }
}

@media (max-width: 1180px) {
  .display-data-view {
    grid-column: auto;
    grid-template-columns: 1fr;
  }

  .display-feed-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .display-gesture-guide {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .display-mode-switch {
    width: 100%;
  }

  .display-brand-card h3 {
    font-size: 34px;
  }

  .display-brand-metrics,
  .display-feed-list,
  .display-gesture-map {
    grid-template-columns: 1fr;
  }

  #previewDialog.detail-zoom .preview-card {
    grid-template-columns: 1fr;
    height: 92vh;
  }
}

@media (max-width: 900px) {
  .gallery-pagination {
    grid-template-columns: 1fr;
  }

  .gallery-pagination label,
  .page-actions {
    width: 100%;
  }

  .page-actions {
    grid-template-columns: 1fr auto 1fr;
  }
}

/* Material viewing refinements */
.material-card img {
  object-fit: contain;
  padding: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .08), rgba(17, 167, 156, .05)),
    var(--paper-2);
}

.material-meta {
  min-height: 112px;
  align-content: start;
}

.material-title {
  display: -webkit-box;
  min-height: 38px;
  overflow: hidden;
  line-height: 1.35;
  text-overflow: clip;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.material-meta small {
  display: -webkit-box;
  overflow: hidden;
  line-height: 1.35;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.recent-photo img,
.display-thumb img,
.display-feed-row img {
  object-fit: contain;
  background: rgba(255, 255, 255, .08);
}

.display-screen.view-materials .display-stage-media {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, .035) 1px, transparent 1px),
    #070b0c;
  background-size: 56px 56px;
}

.display-screen.view-materials .display-stage-media img {
  filter: saturate(.98) contrast(1.02);
}

.display-screen.view-materials .display-stage-meta {
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
}

.display-screen.view-materials .display-stage-meta h3 {
  max-width: min(980px, 72vw);
  line-height: 1.18;
}

.display-screen.view-materials .display-stage-meta p {
  max-width: min(980px, 72vw);
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.display-screen.view-materials .display-progress {
  min-width: 112px;
}

.gallery-pagination-bottom {
  margin: 0 16px 16px;
}

.display-entry-actions .display-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.site-footer {
  position: static;
  z-index: auto;
  width: 100%;
  margin: 36px 0 2px;
  padding: 18px;
  border-width: 1px 0 0;
  border-color: var(--line);
  border-radius: 0;
  background: rgba(8, 8, 8, .72);
  box-shadow: none;
  backdrop-filter: none;
}

body.theme-blue .site-footer {
  border-color: rgba(47, 109, 255, .16);
  background: rgba(255, 255, 255, .78);
  box-shadow: none;
}

/* Immersive display carousel */
.display-screen.view-materials .display-stage-media {
  display: grid;
  overflow: hidden;
  cursor: default;
  touch-action: pan-y;
}

.display-carousel {
  display: grid;
  grid-template-columns: minmax(120px, .34fr) minmax(340px, 1.36fr) minmax(120px, .34fr);
  gap: clamp(14px, 2vw, 28px);
  width: 100%;
  height: 100%;
  min-height: 0;
  align-items: center;
  padding: 24px 78px;
}

.display-carousel[hidden] {
  display: none;
}

.display-current-frame {
  display: grid;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  margin: 0;
  place-items: center;
  overflow: hidden;
}

.display-screen.view-materials .display-current-frame #displayStageImage {
  display: block;
  max-width: 100%;
  max-height: 100%;
  padding: 0;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.display-side-preview {
  position: relative;
  display: grid;
  width: 100%;
  height: min(62vh, 560px);
  min-height: 220px;
  place-items: center;
  overflow: hidden;
  padding: 0;
  border-color: rgba(197, 255, 238, .12);
  background: rgba(255, 255, 255, .035);
  box-shadow: none;
  opacity: .42;
  transform: scale(.88);
  transition: opacity .2s ease, transform .2s ease, border-color .2s ease, background .2s ease;
}

.display-side-preview:hover,
.display-side-preview:focus-visible {
  border-color: rgba(197, 255, 238, .32);
  background: rgba(255, 255, 255, .06);
  opacity: .72;
  transform: scale(.92);
}

.display-side-preview.is-empty {
  visibility: hidden;
}

.display-screen.view-materials .display-side-preview img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  padding: 12px;
  object-fit: contain;
  filter: saturate(.58) brightness(.68) contrast(.92);
  user-select: none;
  -webkit-user-drag: none;
}

.display-side-preview span {
  position: absolute;
  left: 12px;
  bottom: 12px;
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid rgba(197, 255, 238, .18);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, .58);
  color: rgba(247, 255, 247, .72);
  font-size: 12px;
  font-weight: 800;
}

.display-nav-button {
  position: absolute;
  top: 50%;
  z-index: 4;
  display: grid;
  width: 48px;
  height: 72px;
  min-height: 72px;
  place-items: center;
  padding: 0;
  border-color: rgba(197, 255, 238, .22);
  border-radius: var(--radius);
  background: rgba(4, 10, 10, .74);
  color: #f7fff7;
  font-size: 42px;
  line-height: 1;
  transform: translateY(-50%);
  backdrop-filter: blur(14px);
}

.display-nav-button:hover,
.display-nav-button:focus-visible {
  border-color: rgba(184, 244, 98, .56);
  background: rgba(184, 244, 98, .16);
  box-shadow: 0 16px 38px rgba(0, 0, 0, .26);
}

.display-nav-button:disabled {
  opacity: .28;
}

.display-nav-prev {
  left: 16px;
}

.display-nav-next {
  right: 16px;
}

.display-quick-archive {
  min-height: 34px;
  padding: 7px 10px;
  border-color: rgba(184, 244, 98, .36);
  background: rgba(184, 244, 98, .12);
  color: #f7fff7;
  font-size: 12px;
  font-weight: 800;
}

.display-theme-blue .display-side-preview {
  border-color: rgba(47, 109, 255, .14);
  background: rgba(255, 255, 255, .56);
}

.display-theme-blue .display-side-preview span,
.display-theme-blue .display-nav-button,
.display-theme-blue .display-quick-archive {
  border-color: rgba(47, 109, 255, .18);
  background: rgba(255, 255, 255, .82);
  color: #10213f;
}

@media (max-width: 1180px) {
  .display-carousel {
    grid-template-columns: minmax(90px, .24fr) minmax(0, 1fr) minmax(90px, .24fr);
    padding-inline: 58px;
  }

  .display-side-preview {
    min-height: 180px;
  }
}

@media (max-width: 760px) {
  .display-carousel {
    grid-template-columns: minmax(54px, .2fr) minmax(0, 1fr) minmax(54px, .2fr);
    gap: 8px;
    padding: 14px 48px;
  }

  .display-side-preview {
    min-height: 140px;
    transform: scale(.82);
  }

  .display-side-preview span {
    display: none;
  }

  .display-nav-button {
    width: 38px;
    height: 58px;
    min-height: 58px;
    font-size: 32px;
  }

  .display-nav-prev {
    left: 8px;
  }

  .display-nav-next {
    right: 8px;
  }
}

/* Final display/responsive polish */
.display-screen {
  min-width: 0;
}

.display-header {
  flex-wrap: wrap;
}

.display-title {
  flex: 1 1 360px;
}

.display-header-actions {
  flex: 1 1 520px;
}

.display-stage-layout {
  grid-template-columns: minmax(148px, 210px) minmax(0, 1fr) minmax(258px, 340px);
  align-items: stretch;
}

.display-screen.view-materials .display-stage {
  grid-column: 2;
  min-height: 0;
}

.display-screen.view-materials .display-stage-media {
  min-height: 0;
  place-items: center;
}

.display-carousel {
  grid-template-columns: minmax(84px, .2fr) minmax(360px, 1.6fr) minmax(84px, .2fr);
  padding: clamp(18px, 3vw, 64px);
  place-items: center;
}

.display-current-frame {
  width: min(100%, 1060px);
  height: min(100%, 72vh);
  justify-self: center;
}

.display-side-preview {
  height: min(56vh, 500px);
  opacity: .32;
}

.display-screen.view-materials .display-current-frame #displayStageImage {
  margin: 0 !important;
}

.display-screen.view-materials .display-stage-meta {
  min-width: 0;
}

.display-screen.view-materials .display-thumb-rail {
  min-height: 74px;
}

.display-data-view {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.display-code-waterfall {
  position: absolute;
  inset: 10px;
  z-index: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  overflow: hidden;
  pointer-events: none;
  mask-image: linear-gradient(180deg, transparent 0, #000 12%, #000 82%, transparent 100%);
  opacity: .58;
}

.display-data-view > article {
  position: relative;
  z-index: 1;
}

.code-stream {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
  animation: displayCodeFall 18s linear infinite;
}

.code-stream:nth-child(2) {
  animation-duration: 22s;
  animation-delay: -9s;
}

.code-stream:nth-child(3) {
  animation-duration: 16s;
  animation-delay: -4s;
}

.code-stream:nth-child(4) {
  animation-duration: 24s;
  animation-delay: -13s;
}

.code-stream:nth-child(5) {
  animation-duration: 20s;
  animation-delay: -7s;
}

.code-stream span {
  min-width: 0;
  overflow: hidden;
  padding: 8px 10px;
  border: 1px solid rgba(197, 255, 238, .12);
  border-left-color: rgba(184, 244, 98, .34);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, .22);
  color: rgba(197, 255, 238, .34);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 11px;
  line-height: 1.35;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.display-theme-blue .code-stream span {
  border-color: rgba(47, 109, 255, .12);
  border-left-color: rgba(47, 109, 255, .32);
  background: rgba(255, 255, 255, .48);
  color: rgba(47, 109, 255, .38);
}

@keyframes displayCodeFall {
  from {
    transform: translateY(-46%);
  }

  to {
    transform: translateY(8%);
  }
}

@media (min-width: 1680px) {
  .display-stage-layout {
    grid-template-columns: minmax(176px, 230px) minmax(0, 1fr) minmax(292px, 360px);
  }

  .display-current-frame {
    width: min(100%, 1240px);
    height: min(100%, 74vh);
  }

  .code-stream span {
    font-size: 12px;
  }
}

@media (max-width: 1440px) {
  .display-screen {
    gap: 12px;
    padding: 12px;
  }

  .display-header {
    min-height: 0;
    padding: 10px 12px;
  }

  .display-title h2 {
    font-size: 34px;
  }

  .display-stage-layout {
    grid-template-columns: minmax(128px, 176px) minmax(0, 1fr) minmax(234px, 300px);
    gap: 12px;
  }

  .display-metrics article {
    min-height: 86px;
    padding: 12px;
  }

  .display-control-panel {
    padding: 12px;
  }

  .display-carousel {
    grid-template-columns: minmax(76px, .18fr) minmax(320px, 1.64fr) minmax(76px, .18fr);
    padding: 18px 52px;
  }

  .display-side-preview {
    min-height: 170px;
  }
}

@media (max-width: 1180px) {
  .display-stage-layout {
    grid-template-columns: 1fr;
    overflow: auto;
    padding-bottom: 6px;
  }

  .display-screen.view-materials .display-stage {
    grid-column: auto;
    min-height: 640px;
  }

  .display-current-frame {
    height: min(100%, 62vh);
  }

  .display-code-waterfall {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  body.display-mode {
    overflow: hidden;
  }

  .display-screen {
    display: flex;
    flex-direction: column;
    width: 100vw;
    height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .display-screen[hidden] {
    display: none;
  }

  .display-title,
  .display-header-actions {
    flex-basis: 100%;
  }

  .display-header {
    flex: 0 0 auto;
    max-height: none;
  }

  .display-header-actions {
    align-items: stretch;
  }

  .display-header-actions > span,
  .display-header-actions > button,
  .display-mode-switch {
    flex: 1 1 140px;
  }

  .display-stage-layout {
    flex: 1 0 auto;
    width: 100%;
    overflow: visible;
  }

  .display-screen.view-materials .display-stage {
    width: 100%;
    min-height: 520px;
  }

  .display-carousel {
    grid-template-columns: minmax(34px, .14fr) minmax(0, 1fr) minmax(34px, .14fr);
    width: 100%;
    padding: 12px 36px;
  }

  .display-current-frame {
    width: 100%;
    height: min(100%, 54vh);
  }

  .display-side-preview {
    min-width: 0;
  }

  .display-gesture-guide {
    flex: 0 0 auto;
  }

  .display-code-waterfall {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    opacity: .42;
  }
}

@media (prefers-reduced-motion: reduce) {
  .code-stream {
    animation: none;
    transform: translateY(-10%);
  }
}

/* Resolution and display-stage hardening */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

.app-shell,
.library-page,
.workspace-layout,
.content-panel,
.gallery,
.display-screen,
.display-stage-layout,
.display-stage,
.display-stage-media {
  min-width: 0;
}

.app-shell {
  max-width: 1920px;
  padding-inline: clamp(10px, 1.5vw, 28px);
}

.display-screen {
  width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
}

.display-screen.view-materials .display-stage-layout {
  position: relative;
  grid-template-columns: minmax(0, 1fr);
}

.display-screen.view-materials .display-stage {
  grid-column: 1;
  min-height: 0;
}

.display-screen.view-materials .display-metrics,
.display-screen.view-materials .display-control-panel {
  position: absolute;
  top: 0;
  bottom: 180px;
  z-index: 5;
  max-height: none;
  overflow: auto;
  backdrop-filter: blur(18px);
}

.display-screen.view-materials .display-metrics {
  left: 0;
  width: clamp(132px, 11vw, 190px);
  opacity: .92;
}

.display-screen.view-materials .display-control-panel {
  right: 0;
  width: clamp(236px, 20vw, 318px);
  opacity: .96;
}

.display-screen.view-materials .display-carousel {
  grid-template-columns: minmax(70px, .18fr) minmax(0, min(72vw, 1180px)) minmax(70px, .18fr);
  padding: clamp(16px, 3vh, 48px) clamp(84px, 15vw, 300px);
}

.display-current-frame {
  isolation: isolate;
}

.display-screen.view-materials .display-current-frame {
  width: min(100%, 1180px);
  height: min(100%, calc(100dvh - 228px));
}

.display-screen.view-materials .display-current-frame #displayStageImage {
  will-change: transform, width, height;
  transition: transform .14s ease-out, width .14s ease-out, height .14s ease-out;
}

.display-screen.view-materials .display-stage-media.dragging #displayStageImage {
  transition: none;
}

.display-code-waterfall::before,
.display-code-waterfall::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.display-code-waterfall::before {
  background: linear-gradient(90deg, transparent, rgba(184, 244, 98, .08), transparent);
  animation: displayDataScan 7s ease-in-out infinite;
}

.display-code-waterfall::after {
  background:
    linear-gradient(180deg, rgba(197, 255, 238, .08), transparent 20%),
    linear-gradient(0deg, rgba(0, 0, 0, .32), transparent 36%);
  mix-blend-mode: screen;
}

.code-stream {
  will-change: transform;
  animation-name: displayCodeRain;
}

.code-stream span {
  animation: displayCodePulse 4.8s ease-in-out infinite;
  animation-delay: calc(var(--stream-delay, 0s) - .2s);
}

.code-stream:nth-child(2) span { --stream-delay: -1.4s; }
.code-stream:nth-child(3) span { --stream-delay: -2.1s; }
.code-stream:nth-child(4) span { --stream-delay: -3s; }
.code-stream:nth-child(5) span { --stream-delay: -3.6s; }

@keyframes displayCodeRain {
  0% {
    transform: translateY(-58%);
  }

  100% {
    transform: translateY(34%);
  }
}

@keyframes displayCodePulse {
  0%, 100% {
    opacity: .36;
  }

  48% {
    opacity: .82;
  }
}

@keyframes displayDataScan {
  0%, 100% {
    transform: translateX(-68%);
    opacity: .18;
  }

  50% {
    transform: translateX(68%);
    opacity: .46;
  }
}

@media (max-width: 1380px) {
  .display-screen.view-materials .display-stage-layout {
    overflow: auto;
  }

  .display-screen.view-materials .display-metrics,
  .display-screen.view-materials .display-control-panel {
    position: static;
    width: auto;
    max-height: none;
  }

  .display-screen.view-materials .display-metrics {
    grid-template-columns: repeat(5, minmax(108px, 1fr));
    order: 1;
  }

  .display-screen.view-materials .display-stage {
    order: 2;
    min-height: 600px;
  }

  .display-screen.view-materials .display-control-panel {
    order: 3;
    grid-template-columns: repeat(3, minmax(160px, 1fr));
  }

  .display-screen.view-materials .display-carousel {
    grid-template-columns: minmax(62px, .14fr) minmax(0, 1fr) minmax(62px, .14fr);
    padding-inline: 56px;
  }

  .display-screen.view-materials .display-current-frame {
    height: min(100%, 58vh);
  }
}

@media (max-height: 820px) and (min-width: 1181px) {
  .display-screen {
    gap: 10px;
    padding: 10px;
  }

  .display-header {
    min-height: 0;
    padding-block: 8px;
  }

  .display-title h2 {
    font-size: 30px;
  }

  .display-metrics article {
    min-height: 72px;
    padding: 10px;
  }

  .display-metrics strong {
    font-size: clamp(24px, 2.4vw, 36px);
  }

  .display-screen.view-materials .display-current-frame {
    height: min(100%, calc(100dvh - 188px));
  }

  .display-screen.view-materials .display-thumb-rail {
    min-height: 58px;
    padding-block: 6px;
  }
}

@media (max-width: 980px) {
  .library-commandbar,
  .sync-box,
  .display-entry-panel {
    grid-template-columns: 1fr;
  }

  .display-entry-actions {
    justify-items: stretch;
  }

  .display-entry-actions .display-toggle {
    width: 100%;
  }
}

@media (max-width: 760px) {
  .display-screen .display-header {
    display: grid;
    gap: 10px;
    padding: 12px;
  }

  .display-screen .display-title,
  .display-screen .display-header-actions {
    flex-basis: auto;
    width: 100%;
  }

  .display-screen .display-title h2 {
    font-size: 28px;
    line-height: 1.05;
  }

  .display-screen .display-title span {
    margin-top: 6px;
  }

  .display-screen .display-header-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .display-screen .display-mode-switch,
  .display-screen .display-status,
  .display-screen .display-gesture-light {
    grid-column: 1 / -1;
  }

  .display-screen .display-header-actions button,
  .display-screen .display-status,
  .display-screen .display-gesture-light {
    min-height: 32px;
    justify-content: center;
    padding: 6px 8px;
    font-size: 12px;
  }

  .display-screen.view-materials .display-stage {
    order: 1;
    min-height: 500px;
  }

  .display-screen.view-materials .display-metrics,
  .display-screen.view-materials .display-control-panel {
    grid-template-columns: 1fr;
  }

  .display-screen.view-materials .display-metrics {
    order: 2;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .display-screen.view-materials .display-control-panel {
    order: 3;
  }

  .display-screen.view-materials .display-carousel {
    grid-template-columns: minmax(0, 1fr);
    padding-inline: 36px;
  }

  .display-screen.view-materials .display-side-preview {
    display: none;
  }

  .display-screen.view-materials .display-current-frame {
    grid-column: 1;
    width: 100%;
    height: min(100%, 54vh);
  }
}

@media (prefers-reduced-motion: reduce) {
  .display-code-waterfall::before,
  .code-stream,
  .code-stream span {
    animation: none;
  }
}

/* 2026-06-22 web workspace polish */
.library-page {
  gap: 14px;
}

.library-page .sync-panel {
  margin-top: 0;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
  padding: 14px 16px;
}

.library-page .sync-panel h2 {
  margin-bottom: 4px;
  font-size: 22px;
}

.library-page .sync-panel p {
  max-width: 760px;
  font-size: 14px;
  line-height: 1.6;
}

.sync-box {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 10px;
  background: rgba(255, 250, 240, .06);
}

.sync-box small {
  grid-column: 1 / -1;
  padding-left: 8px;
  color: var(--brand);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.library-hero {
  grid-template-columns: minmax(0, .92fr) minmax(360px, .62fr);
  align-items: stretch;
}

.library-hero-copy {
  min-height: 318px;
  padding: clamp(22px, 3vw, 40px);
}

.library-hero-copy h1 {
  max-width: 760px;
  margin-bottom: 14px;
  font-size: clamp(34px, 4.1vw, 58px);
}

.library-hero-copy p:not(.eyebrow) {
  max-width: 660px;
  font-size: 15px;
}

.library-hero-copy .command-tags {
  margin-top: 22px;
}

.library-hero-aside {
  grid-template-rows: auto minmax(228px, 1fr);
  gap: 10px;
  padding: 10px;
}

.session-card {
  min-height: 86px;
  padding: 12px;
  background:
    linear-gradient(120deg, rgba(100, 240, 221, .09), transparent 62%),
    rgba(12, 12, 10, .76);
}

.session-card strong {
  font-size: 18px;
}

.session-card small {
  font-size: 12px;
}

.library-recent-frame,
.recent-material-frame {
  min-height: 236px;
}

.recent-material-frame {
  background:
    radial-gradient(circle at 70% 32%, rgba(100, 240, 221, .16), transparent 11rem),
    linear-gradient(145deg, rgba(255, 250, 240, .075), rgba(255, 250, 240, .018));
}

.recent-copy {
  left: 18px;
  top: 18px;
}

.recent-copy strong {
  font-size: clamp(20px, 1.8vw, 28px);
}

.recent-photo {
  border-radius: 7px;
  box-shadow: 0 18px 46px rgba(0, 0, 0, .30);
}

.recent-photo.photo-a {
  right: 4%;
  top: 18px;
  width: min(58%, 330px);
  aspect-ratio: 16 / 10;
  transform: rotate(1.5deg);
}

.recent-photo.photo-b {
  left: 8%;
  bottom: 20px;
  width: min(52%, 300px);
  aspect-ratio: 4 / 3;
  transform: rotate(-3deg);
}

.recent-photo.photo-c {
  right: 5%;
  bottom: 12px;
  width: min(42%, 240px);
  aspect-ratio: 4 / 3;
  transform: rotate(5deg);
  opacity: .92;
}

.stats-grid {
  gap: 10px;
}

.stat-card {
  min-height: 96px;
  padding: 13px 14px;
  align-content: center;
}

.stat-card strong {
  font-size: clamp(24px, 2.4vw, 38px);
  line-height: 1;
}

.stat-card span,
.stat-card small {
  font-size: 12px;
}

.workspace-layout {
  margin-top: 0;
}

.material-thumb {
  position: relative;
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 250, 240, .08), transparent),
    #22231f;
}

.material-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.material-fallback {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  color: var(--muted-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.material-card.image-missing .material-thumb img {
  display: none;
}

.material-card.image-missing .material-fallback {
  display: grid;
}

body.theme-blue .library-page .sync-panel,
body.theme-blue .library-hero-copy,
body.theme-blue .library-hero-aside,
body.theme-blue .session-card,
body.theme-blue .recent-material-frame,
body.theme-blue .stat-card {
  border-color: rgba(47, 109, 255, .14);
  background: rgba(255, 255, 255, .80);
}

body.theme-blue .library-hero-copy {
  background:
    linear-gradient(120deg, rgba(47, 109, 255, .14), transparent 38%, rgba(108, 200, 255, .16) 74%, transparent),
    rgba(255, 255, 255, .86);
}

body.theme-blue .session-card {
  background:
    linear-gradient(120deg, rgba(47, 109, 255, .10), transparent 62%),
    rgba(255, 255, 255, .84);
}

body.theme-blue .sync-box {
  border-color: rgba(47, 109, 255, .16);
  background: rgba(239, 246, 255, .86);
}

body.theme-blue .sync-box span,
body.theme-blue .material-fallback {
  color: rgba(16, 33, 63, .70);
}

body.theme-blue .recent-material-frame {
  background:
    radial-gradient(circle at 70% 32%, rgba(47, 109, 255, .14), transparent 11rem),
    linear-gradient(145deg, rgba(255, 255, 255, .76), rgba(239, 246, 255, .46));
}

body.theme-blue .recent-photo {
  background:
    linear-gradient(135deg, rgba(47, 109, 255, .10), rgba(255, 255, 255, .72)),
    #eef5ff;
  box-shadow: 0 18px 42px rgba(47, 109, 255, .18);
}

body.theme-blue .material-thumb {
  background:
    linear-gradient(135deg, rgba(47, 109, 255, .08), transparent),
    #f3f7ff;
}

@media (max-width: 1180px) {
  .library-page .sync-panel,
  .library-hero {
    grid-template-columns: 1fr;
  }

  .library-hero-copy {
    min-height: 260px;
  }
}

@media (max-width: 760px) {
  .library-page {
    gap: 10px;
  }

  .library-page .sync-panel {
    padding: 12px;
  }

  .library-hero-copy {
    min-height: auto;
    padding: 18px;
  }

  .library-hero-copy h1 {
    font-size: 32px;
  }

  .library-hero-aside {
    padding: 8px;
  }

  .library-recent-frame,
  .recent-material-frame {
    min-height: 220px;
  }

  .recent-photo.photo-a {
    width: 62%;
  }

  .recent-photo.photo-b {
    width: 54%;
  }

  .recent-photo.photo-c {
    width: 44%;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat-card {
    min-height: 84px;
    padding: 12px;
  }
}

/* 2026-06-24 archive bar and display-stage finish */
.display-screen.display-theme-blue.view-materials .display-stage-media {
  background:
    linear-gradient(90deg, rgba(47, 109, 255, .08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(108, 200, 255, .07) 1px, transparent 1px),
    linear-gradient(135deg, rgba(47, 109, 255, .10), transparent 38%),
    #f7fbff;
  background-size: 56px 56px, 56px 56px, auto, auto;
}

.display-screen.display-theme-blue.view-materials .display-current-frame {
  background: rgba(255, 255, 255, .64);
}

.display-screen.view-materials .display-carousel {
  position: relative;
  z-index: 7;
}

.display-screen.view-materials .display-metrics,
.display-screen.view-materials .display-control-panel {
  z-index: 4;
}

.display-screen.view-materials .display-current-frame,
.display-screen.view-materials .display-current-frame #displayStageImage {
  max-width: 100%;
  max-height: 100%;
}
