:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --surface-3: #eef3f8;
  --line: #d7dee8;
  --line-soft: #e8edf3;
  --text: #101418;
  --muted: #647283;
  --accent: #4fd1b5;
  --accent-dark: #173f38;
  --cyan: #5ab8d6;
  --danger: #ef6a65;
  --warning: #e8bd65;
  --shadow: 0 22px 70px rgba(32, 44, 57, .14);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
  letter-spacing: 0;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 14px;
  background: var(--surface-3);
  color: var(--text);
  cursor: pointer;
}

button:hover {
  border-color: #525c64;
}

button:disabled {
  cursor: not-allowed;
  opacity: .35;
}

button.primary,
.launch-button {
  border-color: var(--accent);
  background: var(--accent);
  color: #071310;
  font-weight: 800;
}

button.danger {
  border-color: rgba(239, 106, 101, .4);
  background: rgba(239, 106, 101, .08);
  color: #ff9c98;
}

button.back-link {
  min-height: 36px;
  border: 0;
  background: transparent;
  padding: 0;
}

input,
select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  outline: none;
  background: #ffffff;
  color: var(--text);
}

input:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79, 209, 181, .11);
}

label {
  display: block;
  margin-bottom: 8px;
  color: #1f2937;
  font-size: 14px;
  font-weight: 700;
}

.eyebrow,
.section-number {
  color: var(--accent);
  font-family: Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.status {
  min-height: 22px;
  color: var(--muted);
}

/* Login */
.login-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background: #ffffff;
}

.login-card {
  width: min(430px, 100%);
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.login-card::before {
  content: "PC / ADMIN";
  display: block;
  margin-bottom: 30px;
  color: var(--accent);
  font-family: Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
}

.login-card h1 {
  margin: 0 0 10px;
  font-size: 27px;
}

.login-card p {
  margin: 0 0 28px;
  color: var(--muted);
}

.login-card input {
  margin-bottom: 18px;
}

.login-card .actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
}

/* Shared brand */
.customer-logo,
.admin-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.customer-logo > span,
.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--accent);
  border-radius: 6px;
  color: var(--accent);
  font-family: Consolas, monospace;
  font-size: 13px;
  font-weight: 800;
}

/* Customer selection */
.customer-page {
  background: #ffffff;
}

.customer-topbar,
.gallery-topbar {
  display: flex;
  width: min(1380px, calc(100% - 48px));
  min-height: 76px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line-soft);
}

.gallery-topbar.gallery-back-only {
  justify-content: flex-end;
}

.gallery-back-only .page-back {
  min-width: 74px;
  border: 1px solid var(--line);
  padding: 0 16px;
  background: #ffffff;
}

.admin-entry,
.back-link {
  color: var(--muted);
  font-size: 14px;
}

.admin-entry:hover,
.back-link:hover {
  color: var(--text);
}

.selection-workspace {
  display: grid;
  width: min(1180px, calc(100% - 48px));
  min-height: calc(100vh - 76px);
  margin: 0 auto;
  grid-template-columns: minmax(0, .9fr) minmax(440px, 1.1fr);
  align-items: center;
  gap: 90px;
  padding: 56px 0 72px;
}

.compact-selection {
  min-height: calc(100vh - 132px);
  grid-template-columns: minmax(320px, 560px);
  justify-content: center;
}

.compact-selection .selection-panel {
  width: min(560px, 100%);
}

.selection-copy h1 {
  margin: 18px 0 22px;
  font-size: 70px;
  line-height: 1.08;
}

.selection-copy > p {
  max-width: 430px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}

.selection-stats {
  display: flex;
  gap: 36px;
  margin-top: 48px;
}

.selection-stats span {
  display: flex;
  align-items: baseline;
  gap: 9px;
  color: var(--muted);
  font-size: 13px;
}

.selection-stats strong {
  color: var(--text);
  font-family: Consolas, monospace;
  font-size: 28px;
}

.selection-panel {
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.selection-step {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin-bottom: 24px;
}

.selection-step > span {
  padding-top: 31px;
  color: var(--accent);
  font-family: Consolas, monospace;
  font-size: 13px;
}

.package-preview {
  display: flex;
  min-height: 94px;
  margin: 30px 0;
  padding: 18px 0;
  align-items: center;
  gap: 20px;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  overflow-x: auto;
}

.package-preview > span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
}

.package-preview strong {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.package-preview b {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--cyan);
  font-family: Consolas, monospace;
  font-size: 10px;
}

.launch-button {
  display: flex;
  width: 100%;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  font-size: 16px;
}

.launch-button b {
  font-size: 28px;
  font-weight: 400;
}

.search-select {
  position: relative;
}

.search-select-trigger {
  width: 100%;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-color: var(--line);
  background: #ffffff;
  color: var(--text);
  text-align: left;
}

.search-select-trigger::after {
  content: "⌄";
  color: var(--muted);
  font-size: 18px;
}

.search-select-panel {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.search-select-panel input {
  min-height: 40px;
  margin-bottom: 8px;
}

.search-select-options {
  max-height: 240px;
  overflow: auto;
}

.search-select-options button {
  width: 100%;
  justify-content: flex-start;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.search-select-options button:hover {
  background: #eef6ff;
}

.search-empty {
  padding: 12px;
  color: var(--muted);
  font-size: 14px;
}

.record-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 18px 20px 24px;
  color: #64748b;
  font-size: 13px;
}

.record-footer a {
  color: #2563eb;
}

.record-footer a:hover {
  text-decoration: underline;
}

.fixed-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
}

/* Admin */
.admin-page {
  background: #ffffff;
}

.admin-topbar {
  display: flex;
  min-height: 72px;
  padding: 0 28px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line-soft);
  background: #ffffff;
}

.admin-brand div,
.gallery-selection {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.admin-brand small {
  color: var(--muted);
  font-family: Consolas, monospace;
  font-size: 9px;
}

.admin-top-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.admin-top-actions a {
  color: var(--muted);
  font-size: 13px;
}

.icon-text-button {
  min-height: 34px;
  font-size: 13px;
}

.admin-layout {
  display: grid;
  min-height: calc(100vh - 72px);
  grid-template-columns: 230px minmax(0, 1fr);
}

.admin-nav {
  padding: 30px 18px;
  border-right: 1px solid var(--line-soft);
  background: #ffffff;
}

.admin-nav button {
  display: flex;
  width: 100%;
  min-height: 50px;
  margin-bottom: 8px;
  align-items: center;
  gap: 14px;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  text-align: left;
}

.admin-nav button span {
  color: #5b646b;
  font-family: Consolas, monospace;
  font-size: 11px;
}

.admin-nav button.active {
  border-color: var(--line);
  background: var(--surface-2);
  color: var(--text);
}

.admin-nav button.active span {
  color: var(--accent);
}

.admin-content {
  width: min(1240px, 100%);
  padding: 38px 42px 72px;
}

.admin-section-head {
  display: flex;
  min-height: 84px;
  margin-bottom: 32px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
}

.admin-section-head h1 {
  margin: 8px 0 0;
  font-size: 30px;
}

.admin-section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.admin-section-head p.error {
  color: var(--danger);
}

.admin-work-grid {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.admin-editor,
.photo-group-form {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.admin-editor h2,
.photo-group-form h2,
.admin-list-area h2,
.group-list-head h2 {
  margin: 8px 0 24px;
  font-size: 20px;
}

.admin-editor input:not([type="checkbox"]) {
  margin-bottom: 20px;
}

.switch-row {
  display: flex;
  min-height: 72px;
  margin: 4px 0 22px;
  padding: 12px 0;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  cursor: pointer;
}

.switch-row span {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.switch-row small {
  color: var(--muted);
  font-weight: 400;
}

.switch-row input {
  width: 42px;
  min-height: 22px;
  accent-color: var(--accent);
}

.form-actions,
.row-actions,
.group-actions {
  display: flex;
  gap: 10px;
}

.list-heading,
.group-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.list-heading h2,
.group-list-head h2 {
  margin: 0;
}

.list-heading > span,
.group-list-head > span {
  color: var(--accent);
  font-family: Consolas, monospace;
  font-size: 12px;
}

.star-list {
  margin-top: 18px;
  border-top: 1px solid var(--line);
}

.star-row {
  display: grid;
  min-height: 78px;
  grid-template-columns: 42px minmax(120px, 1fr) 60px auto;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--line-soft);
}

.star-index {
  color: #5d666d;
  font-family: Consolas, monospace;
  font-size: 11px;
}

.star-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.star-main small {
  color: var(--muted);
}

.state-pill {
  font-size: 12px;
}

.state-pill.enabled {
  color: var(--accent);
}

.state-pill.disabled {
  color: var(--muted);
}

.row-actions button,
.group-actions button {
  min-height: 34px;
  padding: 0 10px;
  font-size: 12px;
}

.group-toolbar {
  display: flex;
  margin-bottom: 22px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.group-toolbar > div {
  width: min(360px, 100%);
}

.photo-group-form {
  margin-bottom: 42px;
}

.group-form-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.group-form-head h2 {
  margin-bottom: 0;
}

.group-form-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.upload-grid {
  display: grid;
  margin: 26px 0;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.upload-slot {
  display: flex;
  min-width: 0;
  min-height: 150px;
  margin: 0;
  padding: 16px;
  flex-direction: column;
  justify-content: space-between;
  border: 1px dashed #c5ced8;
  border-radius: 6px;
  background: #ffffff;
  cursor: pointer;
  overflow: hidden;
}

.upload-slot:hover,
.upload-slot.has-file {
  border-color: var(--accent);
  background: rgba(79, 209, 181, .05);
}

.upload-slot > span {
  color: var(--accent);
  font-family: Consolas, monospace;
  font-size: 11px;
}

.upload-slot strong {
  margin-top: 22px;
  font-size: 15px;
}

.upload-slot small {
  color: var(--muted);
  font-family: Consolas, monospace;
  font-size: 9px;
  overflow-wrap: anywhere;
}

.upload-slot input {
  width: 100%;
  min-height: 28px;
  margin-top: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
}

.group-list-head {
  margin-bottom: 16px;
}

.group-list-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.photo-group-list {
  border-top: 1px solid var(--line);
}

.photo-group-row {
  display: grid;
  min-height: 178px;
  padding: 22px 0;
  grid-template-columns: 145px minmax(0, 1fr) 112px;
  align-items: center;
  gap: 22px;
  border-bottom: 1px solid var(--line-soft);
}

.photo-group-meta span {
  color: var(--accent);
  font-family: Consolas, monospace;
  font-size: 10px;
}

.photo-group-meta h3 {
  margin: 8px 0;
  font-size: 19px;
}

.photo-group-meta small {
  color: var(--muted);
}

.group-thumbnails {
  display: grid;
  grid-template-columns: repeat(5, minmax(64px, 1fr));
  gap: 8px;
}

.group-thumbnails figure {
  min-width: 0;
  margin: 0;
}

.group-thumbnails img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  background: #080a0b;
  object-fit: cover;
}

.group-thumbnails figcaption {
  margin-top: 6px;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

.group-actions {
  flex-direction: column;
}

.admin-empty {
  min-height: 130px;
  display: grid;
  place-items: center;
  color: var(--muted);
  border-bottom: 1px solid var(--line-soft);
  text-align: center;
}

/* Gallery */
.gallery-page {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f6f8fb;
  --surface-3: #edf2f7;
  --line: #d8dee8;
  --line-soft: #e8edf3;
  --text: #101418;
  --muted: #6a7480;
  --shadow: 0 22px 70px rgba(32, 44, 57, .16);
  background: #ffffff;
}

.gallery-selection {
  align-items: center;
}

.gallery-selection span {
  color: var(--accent);
  font-family: Consolas, monospace;
  font-size: 10px;
}

.gallery-selection strong {
  font-size: 14px;
}

.gallery-shell {
  width: min(1420px, 100%);
  margin: 0 auto;
  padding: 24px 24px 90px;
}

.gallery-heading {
  display: flex;
  width: min(1180px, 100%);
  margin: 0 auto 46px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
}

.gallery-heading h1 {
  margin: 8px 0 0;
  font-size: 36px;
}

.gallery-heading p {
  margin: 0;
  color: var(--muted);
}

.carousel-stack {
  display: grid;
  gap: 38px;
}

.product-carousel {
  --gallery-card-width: min(560px, 52vw);
  --gallery-card-height: min(420px, 39vw);
  --gallery-stage-height: min(464px, calc(39vw + 44px));
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 24px 26px 30px;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  outline: none;
}

.product-carousel.view-img-a4-front {
  --gallery-card-height: min(396px, 36.8vw);
  --gallery-stage-height: min(440px, calc(36.8vw + 44px));
}

.product-carousel.view-img-record {
  --gallery-card-height: min(560px, 52vw);
  --gallery-stage-height: min(604px, calc(52vw + 44px));
}

.product-carousel.view-img-stand {
  --gallery-card-width: min(420px, 40vw);
  --gallery-card-height: min(594px, 56.6vw);
  --gallery-stage-height: min(638px, calc(56.6vw + 44px));
}

.product-carousel:focus-visible {
  border-color: var(--accent);
}

.product-heading {
  display: grid;
  width: min(1040px, 100%);
  margin: 0 auto 16px;
  grid-template-columns: 46px 1fr auto;
  align-items: center;
}

.product-heading > span {
  color: var(--accent);
  font-family: Consolas, monospace;
  font-size: 12px;
}

.product-heading div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.product-heading small {
  color: var(--muted);
  font-family: Consolas, monospace;
  font-size: 9px;
}

.product-heading h2 {
  margin: 0;
  font-size: 21px;
}

.carousel-indicator {
  color: var(--muted);
  font-family: Consolas, monospace;
  font-size: 11px;
}

.carousel-stage {
  position: relative;
  width: 100%;
  height: var(--gallery-stage-height);
  overflow: hidden;
}

.carousel-track {
  --drag-x: 0px;
  position: absolute;
  inset: 0;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  transform: translateX(var(--drag-x));
  transition: transform .22s ease;
}

.carousel-track.dragging {
  cursor: grabbing;
  transition: none;
}

.gallery-slide {
  position: absolute;
  top: 22px;
  left: 50%;
  width: var(--gallery-card-width);
  height: var(--gallery-card-height);
  border: 1px solid #d5dde8;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) scale(.65);
  transition: transform .42s cubic-bezier(.2, .75, .25, 1), opacity .34s ease, filter .34s ease;
}

.gallery-slide img {
  display: block;
  width: 100%;
  height: 100%;
  background: #ffffff;
  object-fit: cover;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}

.gallery-slide.active {
  z-index: 3;
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) scale(1);
  filter: none;
}

.gallery-slide.previous-slide,
.gallery-slide.next-slide {
  z-index: 2;
  opacity: .32;
  pointer-events: auto;
  filter: blur(3px) saturate(.65);
}

.gallery-slide.previous-slide {
  transform: translateX(-124%) scale(.76);
}

.gallery-slide.next-slide {
  transform: translateX(24%) scale(.76);
}

.gallery-slide.past-slide {
  transform: translateX(-168%) scale(.64);
}

.gallery-slide.future-slide {
  transform: translateX(68%) scale(.64);
}

.slide-label {
  position: absolute;
  right: 16px;
  bottom: 16px;
  left: 16px;
  display: flex;
  min-height: 54px;
  padding: 0 16px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(16, 24, 40, .12);
  border-radius: 6px;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(14px);
}

.slide-label span {
  color: var(--accent);
  font-family: Consolas, monospace;
  font-size: 10px;
}

.slide-label strong {
  font-size: 14px;
  color: #111827;
}

.carousel-arrow {
  position: absolute;
  z-index: 5;
  top: 50%;
  display: grid;
  width: 48px;
  height: 48px;
  min-height: 48px;
  padding: 0;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  color: #111827;
  font-size: 34px;
  line-height: 1;
  transform: translateY(-50%);
}

.carousel-arrow.previous {
  left: 12px;
}

.carousel-arrow.next {
  right: 12px;
}

.custom-tail {
  display: grid;
  place-items: center;
  border-style: dashed;
  background: #f7fafc;
}

.custom-plus {
  display: flex;
  width: 170px;
  height: 170px;
  padding: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid #b9c4cf;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .3);
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.custom-plus span {
  color: #111827;
  font-size: 50px;
  font-weight: 800;
  line-height: 1;
}

.custom-plus strong {
  margin-top: 10px;
}

.custom-plus small {
  margin-top: 5px;
  color: var(--muted);
}

.custom-plus:hover {
  border-color: rgba(255, 255, 255, .78);
  background: #f9fbfd;
  box-shadow: 0 0 34px rgba(90, 184, 214, .22), 0 22px 50px rgba(32, 44, 57, .18);
  transform: translateY(-5px);
}

.save-current-image {
  display: block;
  width: var(--gallery-card-width);
  margin: 14px auto 0;
  border-color: #111827;
  background: #111827;
  color: #ffffff;
  font-weight: 800;
}

.save-current-image:disabled {
  opacity: .38;
}

.local-label span {
  color: var(--cyan);
}

.photo-preview-dialog {
  width: min(1120px, calc(100% - 40px));
  max-height: calc(100vh - 40px);
  padding: 16px;
  border: 1px solid #3a4248;
  border-radius: 8px;
  background: #0d1012;
  color: var(--text);
  box-shadow: 0 34px 100px rgba(0, 0, 0, .72);
  overflow: hidden;
}

.photo-preview-dialog::backdrop {
  background: rgba(0, 0, 0, .84);
  backdrop-filter: blur(12px);
}

.photo-preview-dialog img {
  display: block;
  width: 100%;
  height: min(76vh, 820px);
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: #07090a;
  object-fit: contain;
}

.preview-close {
  position: absolute;
  z-index: 2;
  top: 26px;
  right: 26px;
  width: 42px;
  min-height: 42px;
  padding: 0;
  border-radius: 50%;
  background: rgba(8, 10, 11, .88);
  color: #fff;
  font-size: 26px;
}

.preview-caption {
  display: flex;
  min-height: 62px;
  padding: 0 8px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.preview-caption span {
  color: var(--accent);
  font-family: Consolas, monospace;
  font-size: 11px;
}

.preview-caption strong {
  font-size: 15px;
}

.spec-dialog {
  width: min(560px, calc(100% - 32px));
  padding: 0;
  border: 1px solid #3a4248;
  border-radius: 8px;
  background: rgba(16, 20, 23, .96);
  color: var(--text);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .65);
  backdrop-filter: blur(20px);
}

.spec-dialog::backdrop {
  background: rgba(0, 0, 0, .72);
  backdrop-filter: blur(5px);
}

.spec-dialog-head {
  display: flex;
  min-height: 90px;
  padding: 20px 22px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.spec-dialog-head span {
  color: var(--accent);
  font-family: Consolas, monospace;
  font-size: 10px;
}

.spec-dialog-head h2 {
  margin: 6px 0 0;
  font-size: 20px;
}

.spec-dialog-head > button {
  width: 38px;
  min-height: 38px;
  padding: 0;
  border-radius: 50%;
  font-size: 23px;
}

.spec-options {
  display: grid;
  padding: 18px;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.spec-options button {
  display: flex;
  min-height: 156px;
  padding: 18px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  border-style: dashed;
  background: #111518;
  text-align: left;
}

.spec-options button:hover {
  border-color: var(--accent);
  background: rgba(79, 209, 181, .06);
}

.spec-options span {
  margin-bottom: auto;
  color: var(--accent);
  font-family: Consolas, monospace;
  font-size: 11px;
}

.spec-options strong {
  font-size: 16px;
}

.spec-options small {
  margin-top: 7px;
  color: var(--muted);
}

.gallery-status {
  width: min(1180px, 100%);
  min-height: 22px;
  margin: 36px auto 0;
  color: var(--muted);
  text-align: center;
}

[hidden] {
  display: none !important;
}

@media (max-width: 980px) {
  .selection-workspace {
    grid-template-columns: 1fr;
    gap: 44px;
  }

  .selection-copy h1 {
    font-size: 52px;
  }

  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-nav {
    display: flex;
    padding: 12px 20px;
    gap: 8px;
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
  }

  .admin-nav button {
    width: auto;
    margin: 0;
  }

  .admin-work-grid {
    grid-template-columns: 1fr;
  }

  .upload-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .photo-group-row {
    grid-template-columns: 120px minmax(0, 1fr);
  }

  .group-actions {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: flex-end;
  }

  .gallery-slide {
    width: var(--gallery-card-width);
  }

  .product-carousel {
    --gallery-card-width: min(540px, 66vw);
    --gallery-card-height: min(405px, 49.5vw);
    --gallery-stage-height: min(449px, calc(49.5vw + 44px));
  }

  .product-carousel.view-img-a4-front {
    --gallery-card-height: min(382px, 46.7vw);
    --gallery-stage-height: min(426px, calc(46.7vw + 44px));
  }

  .product-carousel.view-img-record {
    --gallery-card-height: min(540px, 66vw);
    --gallery-stage-height: min(584px, calc(66vw + 44px));
  }

  .product-carousel.view-img-stand {
    --gallery-card-width: min(390px, 48vw);
    --gallery-card-height: min(552px, 67.9vw);
    --gallery-stage-height: min(596px, calc(67.9vw + 44px));
  }

  .gallery-slide.previous-slide {
    transform: translateX(-112%) scale(.74);
  }

  .gallery-slide.next-slide {
    transform: translateX(12%) scale(.74);
  }
}

@media (max-width: 680px) {
  .customer-topbar,
  .gallery-topbar {
    width: calc(100% - 28px);
  }

  .customer-logo strong {
    font-size: 14px;
  }

  .selection-workspace {
    width: calc(100% - 28px);
    padding-top: 36px;
  }

  .compact-selection {
    display: block;
    min-height: auto;
    padding: 32px 0 54px;
  }

  .selection-copy h1 {
    font-size: 42px;
  }

  .selection-copy > p {
    font-size: 15px;
  }

  .selection-panel {
    width: 100%;
    padding: 22px;
  }

  .selection-step {
    display: block;
    grid-template-columns: 1fr;
    margin-bottom: 22px;
  }

  .selection-step > span {
    display: none;
  }

  .selection-step label {
    font-size: 16px;
    line-height: 1.4;
  }

  .selection-step select,
  .search-select-trigger {
    width: 100%;
    min-height: 52px;
    font-size: 16px;
  }

  .search-select-panel {
    position: fixed;
    z-index: 50;
    top: 118px;
    left: 14px;
    right: 14px;
    max-height: calc(100vh - 150px);
    overflow: auto;
  }

  .admin-topbar {
    padding: 0 14px;
  }

  .admin-top-actions a {
    display: none;
  }

  .admin-nav {
    overflow-x: auto;
  }

  .admin-nav button {
    flex: 0 0 auto;
  }

  .admin-content {
    padding: 24px 14px 60px;
  }

  .admin-section-head,
  .group-form-head,
  .gallery-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .star-row {
    grid-template-columns: 28px minmax(100px, 1fr) 52px;
    padding: 12px 0;
  }

  .star-row .row-actions {
    grid-column: 2 / -1;
  }

  .group-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .upload-grid {
    grid-template-columns: 1fr 1fr;
  }

  .upload-slot:last-child {
    grid-column: 1 / -1;
  }

  .photo-group-row {
    grid-template-columns: 1fr;
  }

  .group-thumbnails {
    overflow-x: auto;
    grid-template-columns: repeat(5, 92px);
  }

  .group-actions {
    grid-column: auto;
    justify-content: flex-start;
  }

  .gallery-selection {
    display: none;
  }

  .gallery-shell {
    padding: 18px 8px 70px;
  }

  .gallery-heading {
    padding: 0 14px;
    gap: 12px;
  }

  .gallery-heading h1 {
    font-size: 28px;
  }

  .product-carousel {
    padding: 20px 6px 24px;
    --gallery-card-width: min(82vw, 390px);
    --gallery-card-height: min(292px, 61.5vw);
    --gallery-stage-height: min(336px, calc(61.5vw + 44px));
  }

  .product-carousel.view-img-a4-front {
    --gallery-card-height: min(276px, 58vw);
    --gallery-stage-height: min(320px, calc(58vw + 44px));
  }

  .product-carousel.view-img-record {
    --gallery-card-height: min(390px, 82vw);
    --gallery-stage-height: min(434px, calc(82vw + 44px));
  }

  .product-carousel.view-img-stand {
    --gallery-card-width: min(74vw, 330px);
    --gallery-card-height: min(466px, 104.6vw);
    --gallery-stage-height: min(510px, calc(104.6vw + 44px));
  }

  .product-heading {
    padding: 0 12px;
  }

  .carousel-stage {
    height: var(--gallery-stage-height);
  }

  .gallery-slide {
    top: 18px;
    width: var(--gallery-card-width);
    height: var(--gallery-card-height);
  }

  .gallery-slide.previous-slide {
    transform: translateX(-105%) scale(.7);
  }

  .gallery-slide.next-slide {
    transform: translateX(5%) scale(.7);
  }

  .carousel-arrow {
    width: 42px;
    height: 42px;
    min-height: 42px;
  }

  .carousel-arrow.previous {
    left: 4px;
  }

  .carousel-arrow.next {
    right: 4px;
  }

  .custom-plus {
    width: 140px;
    height: 140px;
  }

  .spec-options {
    grid-template-columns: 1fr;
  }

  .spec-options button {
    min-height: 124px;
  }
}
