:root {
  --bg: #080c0d;
  --bg-soft: #101719;
  --surface: #12191b;
  --surface-strong: #172023;
  --border: #334044;
  --border-hot: #bd2848;
  --text: #f5efe3;
  --muted: #b8b1a7;
  --subtle: #7f8a8f;
  --accent: #d63454;
  --accent-dark: #81172c;
  --gold: #e0ad5a;
  --teal: #78b9b2;
  --shadow: 0 20px 70px rgba(0, 0, 0, 0.35);
  --radius: 8px;
  --font-serif: Georgia, "Times New Roman", serif;
  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 8% 0%, rgba(120, 185, 178, 0.12), transparent 28rem),
    radial-gradient(circle at 95% 18%, rgba(214, 52, 84, 0.12), transparent 24rem),
    linear-gradient(180deg, #080c0d 0%, #0c1112 46%, #070909 100%);
}

button,
input,
select {
  font: inherit;
}

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

svg {
  display: block;
}

[hidden] {
  display: none !important;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 72px;
  padding: 10px clamp(16px, 3vw, 34px);
  background: rgba(8, 12, 13, 0.94);
  border-bottom: 1px solid rgba(245, 239, 227, 0.12);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  min-width: 250px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--gold);
}

.brand-mark svg {
  width: 42px;
  height: 42px;
  fill: currentColor;
}

.brand-name {
  display: block;
  font-family: var(--font-serif);
  font-size: clamp(1.15rem, 1.6vw, 1.45rem);
  line-height: 1.05;
}

.brand-subtitle {
  display: block;
  color: var(--gold);
  font-size: 0.78rem;
  line-height: 1.3;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 2vw, 34px);
  flex: 1;
}

.nav-link {
  position: relative;
  color: var(--text);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 700;
  padding: 25px 0 23px;
}

.nav-link::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  content: "";
  background: transparent;
}

.nav-link.active,
.nav-link:hover {
  color: #ff6077;
}

.nav-link.active::after {
  background: var(--accent);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  border-left: 1px solid rgba(245, 239, 227, 0.16);
  padding-left: 22px;
}

.menu-toggle {
  display: none;
}

.icon-button,
.primary-button,
.secondary-button,
.text-button,
.icon-only {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease;
}

.icon-button svg,
.primary-button svg,
.secondary-button svg,
.text-button svg,
.icon-only svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.icon-button {
  color: var(--text);
  background: transparent;
  padding: 10px 12px;
}

.primary-button,
.secondary-button {
  min-height: 38px;
  padding: 0 18px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 750;
}

.primary-button {
  color: #fff9f5;
  border-color: #cc2f4e;
  background: linear-gradient(180deg, #a51d37, #761328);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.secondary-button {
  color: var(--text);
  border-color: rgba(214, 52, 84, 0.72);
  background: rgba(129, 23, 44, 0.58);
}

.danger-button {
  border-color: rgba(255, 117, 137, 0.72);
  background: rgba(98, 18, 31, 0.72);
}

.text-button {
  color: #ff5e76;
  background: transparent;
  border: 0;
  padding: 8px 0;
  font-size: 0.9rem;
  font-weight: 750;
}

.text-button::after {
  content: "→";
  font-size: 1.2rem;
  line-height: 1;
}

.icon-only {
  width: 40px;
  height: 40px;
  color: var(--text);
  background: transparent;
  border-radius: 999px;
}

.icon-button:hover,
.primary-button:hover,
.secondary-button:hover,
.text-button:hover,
.icon-only:hover {
  transform: translateY(-1px);
}

main {
  width: min(100%, 1640px);
  margin: 0 auto;
  padding: 14px clamp(14px, 2vw, 28px) 44px;
}

.page {
  display: none;
}

.page.active {
  display: block;
}

.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.34fr) minmax(380px, 1fr);
  gap: 18px;
  align-items: stretch;
}

.hero-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.panel,
.verification-banner,
.disclosure-strip {
  border: 1px solid rgba(245, 239, 227, 0.16);
  background: linear-gradient(180deg, rgba(18, 25, 27, 0.96), rgba(12, 18, 19, 0.96));
  box-shadow: var(--shadow);
}

.panel {
  border-radius: var(--radius);
  padding: 12px;
}

.verification-banner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(260px, 1fr);
  gap: clamp(20px, 4vw, 60px);
  min-height: 240px;
  padding: clamp(24px, 4vw, 46px);
  overflow: hidden;
  border-color: rgba(214, 52, 84, 0.78);
  border-radius: var(--radius);
}

.verification-banner::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    radial-gradient(circle at 15% 55%, rgba(224, 173, 90, 0.15), transparent 18rem),
    repeating-radial-gradient(circle at 6% 72%, rgba(245, 239, 227, 0.1) 0 1px, transparent 1px 11px);
  opacity: 0.72;
  pointer-events: none;
}

.verification-art,
.verification-copy {
  position: relative;
  z-index: 1;
}

.verification-art {
  display: grid;
  place-items: center;
  min-height: 178px;
  background:
    linear-gradient(90deg, rgba(8, 12, 13, 0.7), rgba(18, 25, 27, 0.2)),
    linear-gradient(135deg, rgba(245, 239, 227, 0.06), transparent);
}

.verification-art svg {
  width: clamp(110px, 15vw, 155px);
  color: var(--gold);
  filter: drop-shadow(0 20px 24px rgba(0, 0, 0, 0.42));
}

.verification-art svg path:first-child {
  fill: rgba(224, 173, 90, 0.14);
  stroke: currentColor;
  stroke-width: 3;
}

.verification-art svg path:last-child {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 7;
}

.corner {
  position: absolute;
  width: 20px;
  height: 20px;
  border-color: var(--gold);
  border-style: solid;
}

.top-left {
  top: 0;
  left: 0;
  border-width: 2px 0 0 2px;
}

.top-right {
  top: 0;
  right: 0;
  border-width: 2px 2px 0 0;
}

.bottom-left {
  bottom: 0;
  left: 0;
  border-width: 0 0 2px 2px;
}

.bottom-right {
  right: 0;
  bottom: 0;
  border-width: 0 2px 2px 0;
}

.verification-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 460px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  color: var(--text);
}

.verification-copy h1,
.page-title-row h1 {
  margin-bottom: 12px;
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  line-height: 1.04;
}

.verification-copy p,
.page-title-row p,
.disclosure-strip p,
.media-details p,
.contract-lock p,
.upload-layout p {
  color: var(--muted);
  line-height: 1.5;
}

.verification-copy p {
  max-width: 30ch;
  font-size: clamp(1.05rem, 1.7vw, 1.25rem);
}

.rating-row {
  display: flex;
  gap: 5px;
  margin-top: 14px;
  color: var(--gold);
}

.rating-row svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
}

.verification-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 18px;
}

.disclosure-strip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  min-height: 84px;
  padding: 16px 18px;
  border-radius: var(--radius);
}

.shield-icon {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  color: var(--gold);
  border: 1px solid rgba(245, 239, 227, 0.2);
  border-radius: 50%;
  background: rgba(245, 239, 227, 0.05);
}

.shield-icon svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.disclosure-strip h2,
.section-heading h2,
.media-details h3,
.contract-lock h2,
.upload-layout h2 {
  margin-bottom: 4px;
  font-family: var(--font-serif);
  font-weight: 600;
}

.disclosure-strip h2 {
  font-size: 1.35rem;
}

.disclosure-strip p {
  margin-bottom: 0;
  font-size: 0.9rem;
}

.feature-video {
  display: flex;
  flex-direction: column;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 2px 4px 10px;
}

.section-heading h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: clamp(1.45rem, 2vw, 1.85rem);
}

.section-heading h2 svg {
  width: 24px;
  height: 24px;
  color: var(--accent);
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.video-frame {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  border: 1px solid rgba(245, 239, 227, 0.18);
  border-radius: 6px;
  background:
    radial-gradient(circle at 68% 18%, rgba(245, 239, 227, 0.16), transparent 13rem),
    linear-gradient(135deg, #030506, #172023 52%, #050607);
}

.featured-frame {
  flex: 1;
}

.stage-prop {
  position: absolute;
  right: 25%;
  bottom: 28px;
  width: 108px;
  height: 122px;
  opacity: 0.7;
}

.stage-prop::before {
  position: absolute;
  top: 0;
  left: 24px;
  width: 60px;
  height: 40px;
  content: "";
  border: 3px solid rgba(245, 239, 227, 0.45);
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
}

.stage-prop::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 80px;
  content: "";
  border: 3px solid rgba(245, 239, 227, 0.45);
  border-radius: 5px;
  background: linear-gradient(90deg, transparent 45%, rgba(245, 239, 227, 0.42) 46% 50%, transparent 51%);
}

.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  color: var(--text);
  border: 2px solid rgba(245, 239, 227, 0.86);
  border-radius: 50%;
  background: rgba(8, 12, 13, 0.35);
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition:
    background 160ms ease,
    transform 160ms ease;
}

.play-button:hover {
  background: rgba(214, 52, 84, 0.55);
  transform: translate(-50%, -50%) scale(1.04);
}

.play-button svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.media-timeline {
  position: absolute;
  right: 14px;
  bottom: 14px;
  left: 14px;
  display: grid;
  grid-template-columns: auto minmax(90px, 1fr) auto;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-size: 0.68rem;
  font-weight: 700;
}

.media-timeline div {
  height: 3px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(245, 239, 227, 0.48);
}

.media-timeline div span {
  display: block;
  width: 9%;
  height: 100%;
  background: var(--accent);
}

.media-details {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 4px 0;
}

.media-details h3 {
  margin-bottom: 3px;
  font-size: 1.02rem;
}

.media-details p {
  margin-bottom: 0;
  font-size: 0.82rem;
}

.feed-grid {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) minmax(480px, 1fr);
  gap: 18px;
  margin-top: 18px;
}

.image-row,
.bundle-grid,
.product-grid,
.video-grid,
.gallery-grid {
  display: grid;
  gap: 12px;
}

.image-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.image-card,
.gallery-card {
  position: relative;
  min-height: 168px;
  overflow: hidden;
  border: 1px solid rgba(245, 239, 227, 0.2);
  border-radius: 6px;
  background:
    radial-gradient(circle at 76% 38%, rgba(245, 239, 227, 0.28) 0 10px, transparent 11px),
    linear-gradient(135deg, #232d31, #465057);
}

.image-card::before,
.gallery-card::before {
  position: absolute;
  right: 12%;
  bottom: 0;
  left: 12%;
  height: 58%;
  content: "";
  background:
    linear-gradient(135deg, transparent 45%, rgba(8, 12, 13, 0.22) 45% 55%, transparent 55%),
    linear-gradient(135deg, transparent 37%, rgba(245, 239, 227, 0.24) 38% 65%, transparent 66%),
    linear-gradient(45deg, transparent 28%, rgba(245, 239, 227, 0.24) 29% 60%, transparent 61%);
  clip-path: polygon(0 100%, 35% 30%, 54% 60%, 70% 44%, 100% 100%);
}

.image-icon,
.lock-icon {
  position: absolute;
  display: grid;
  place-items: center;
  color: var(--text);
  z-index: 3;
}

.image-icon {
  top: 12px;
  right: 12px;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(245, 239, 227, 0.75);
  border-radius: 3px;
}

.image-icon::before {
  width: 12px;
  height: 8px;
  content: "";
  border: 1px solid currentColor;
  border-top: 0;
  transform: skewX(-15deg);
}

.lock-icon {
  right: 8px;
  bottom: 8px;
  width: 18px;
  height: 18px;
}

.lock-icon::before {
  width: 12px;
  height: 9px;
  content: "";
  border: 1.8px solid currentColor;
  border-radius: 2px;
  transform: translateY(3px);
}

.lock-icon::after {
  position: absolute;
  top: 0;
  width: 9px;
  height: 8px;
  content: "";
  border: 1.8px solid currentColor;
  border-bottom: 0;
  border-radius: 9px 9px 0 0;
}

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

.bundle-card,
.product-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  min-height: 172px;
  padding: 18px 14px 14px;
  text-align: center;
  border: 1px solid rgba(245, 239, 227, 0.22);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(245, 239, 227, 0.04), transparent),
    rgba(8, 12, 13, 0.32);
}

.bundle-card svg,
.product-card svg {
  width: 34px;
  height: 34px;
  margin-bottom: 14px;
  color: var(--gold);
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.bundle-card h3,
.product-card h2 {
  margin: 0 0 4px;
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
}

.bundle-card p,
.product-card p {
  min-height: 38px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

.price {
  display: block;
  margin-bottom: 10px;
  color: var(--gold);
  font-size: 1.1rem;
  font-weight: 800;
}

.bundle-card .primary-button,
.product-card .primary-button {
  width: 100%;
}

.page-title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 34px 2px 20px;
}

.page-title-row h1 {
  font-size: clamp(2rem, 4vw, 3.3rem);
}

.page-title-row p {
  max-width: 720px;
  margin-bottom: 0;
}

.toolbar {
  display: flex;
  gap: 12px;
  align-items: end;
  flex-wrap: wrap;
}

.toolbar label,
.password-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

select,
input[type="password"],
input[type="text"],
input[type="number"],
textarea {
  min-height: 40px;
  color: var(--text);
  border: 1px solid rgba(245, 239, 227, 0.22);
  border-radius: 6px;
  background: #101719;
  padding: 0 12px;
}

textarea {
  min-height: 90px;
  padding: 10px 12px;
  resize: vertical;
}

input[type="color"] {
  width: 100%;
  min-height: 40px;
  border: 1px solid rgba(245, 239, 227, 0.22);
  border-radius: 6px;
  background: #101719;
  padding: 4px;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

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

.product-card {
  min-height: 260px;
  align-items: flex-start;
  text-align: left;
  padding: 22px;
}

.product-card svg {
  margin-bottom: 18px;
}

.product-card h2 {
  font-size: 1.25rem;
}

.product-card p {
  min-height: 74px;
  font-size: 0.92rem;
}

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

.video-card {
  display: grid;
  gap: 9px;
}

.video-card .video-frame {
  min-height: 188px;
}

.album-frame {
  min-height: 220px;
}

.album-card {
  isolation: isolate;
}

.album-admin-actions {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 6;
  display: flex;
  gap: 6px;
}

.admin-card-button,
.editor-icon-button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--text);
  border: 1px solid rgba(245, 239, 227, 0.2);
  border-radius: 5px;
  background: rgba(8, 12, 13, 0.76);
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.admin-card-button:hover,
.editor-icon-button:hover {
  border-color: rgba(224, 173, 90, 0.7);
}

.admin-card-button.danger,
.editor-icon-button.danger {
  color: #ff9caf;
  border-color: rgba(214, 52, 84, 0.45);
}

.admin-card-button:disabled,
.editor-icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.admin-card-button svg,
.editor-icon-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.access-chip {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  color: var(--text);
  border: 1px solid rgba(224, 173, 90, 0.55);
  border-radius: 4px;
  background: rgba(8, 12, 13, 0.72);
  padding: 5px 8px;
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.01em;
  backdrop-filter: blur(12px);
}

.vip-extra-album {
  border-color: rgba(224, 173, 90, 0.58);
}

.vip-extra-album .access-chip {
  color: #1a1113;
  background: linear-gradient(180deg, #f0c36d, #d8993d);
  border-color: rgba(255, 240, 200, 0.8);
}

.album-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.album-meta strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 1.08rem;
  font-weight: 600;
}

.album-meta p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.video-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.82rem;
}

.video-meta strong {
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
}

.duration-chip {
  color: var(--text);
  background: rgba(8, 12, 13, 0.65);
  border: 1px solid rgba(245, 239, 227, 0.16);
  border-radius: 4px;
  padding: 4px 6px;
  font-size: 0.72rem;
  font-weight: 800;
}

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

.gallery-card {
  min-height: 260px;
}

.gallery-card .access-chip {
  right: auto;
}

.gallery-card footer {
  position: absolute;
  right: 10px;
  bottom: 10px;
  left: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--text);
  background: rgba(8, 12, 13, 0.72);
  border: 1px solid rgba(245, 239, 227, 0.12);
  border-radius: 6px;
  padding: 9px 10px;
  backdrop-filter: blur(12px);
  z-index: 3;
}

.gallery-card footer strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
}

.gallery-card footer small {
  display: block;
  max-width: 28ch;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.25;
}

.gallery-card footer span {
  color: var(--gold);
  font-weight: 800;
  white-space: nowrap;
}

.media-upload-panel {
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(210px, 0.55fr) minmax(260px, 0.9fr);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 18px;
}

.cloud-login-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 90;
  place-items: center;
  padding: 22px;
}

.cloud-login-overlay.open {
  display: grid;
}

.cloud-login-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background:
    radial-gradient(circle at 18% 12%, rgba(224, 173, 90, 0.12), transparent 32%),
    rgba(3, 5, 6, 0.72);
  cursor: pointer;
  backdrop-filter: blur(12px);
}

.cloud-login-panel {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 18px;
  width: min(100%, 720px);
  max-height: min(82vh, 720px);
  overflow: auto;
  padding: clamp(18px, 4vw, 30px);
}

.cloud-login-head {
  display: flex;
  gap: 16px;
  align-items: start;
  justify-content: space-between;
}

.cloud-login-head h2 {
  margin-bottom: 4px;
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 2.45rem);
  font-weight: 600;
}

.cloud-login-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

body.modal-open {
  overflow: hidden;
}

.cloud-auth-mode {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  border: 1px solid rgba(245, 239, 227, 0.14);
  border-radius: 6px;
  background: rgba(245, 239, 227, 0.04);
  padding: 5px;
}

.cloud-auth-mode button {
  min-height: 40px;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  cursor: pointer;
  font-weight: 850;
}

.cloud-auth-mode button:hover,
.cloud-auth-mode button.active {
  color: #fff;
  border-color: rgba(255, 77, 119, 0.72);
  background: rgba(166, 24, 61, 0.62);
}

.cloud-auth-mode button:disabled {
  cursor: default;
  opacity: 0.55;
}

.cloud-auth-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(160px, 1fr));
  gap: 10px;
  align-items: end;
}

.cloud-auth-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.cloud-auth-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  grid-column: 1 / -1;
}

.media-upload-panel[hidden] {
  display: none;
}

.media-editor-panel {
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
}

.media-editor-panel[hidden] {
  display: none;
}

.media-upload-panel h2 {
  margin-bottom: 6px;
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
}

.media-upload-panel p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.media-upload-controls {
  display: grid;
  gap: 12px;
  align-content: center;
}

.media-upload-controls label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.inline-check {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
}

.inline-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.media-drop-zone {
  min-height: 150px;
  padding: 18px;
}

.media-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload-status {
  grid-column: 1 / -1;
  min-height: 20px;
  color: var(--gold);
  font-size: 0.9rem;
}

.editor-head {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(360px, 1.2fr);
  gap: 18px;
  align-items: end;
}

.editor-head h2 {
  margin-bottom: 6px;
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
}

.editor-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.editor-toolbar {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.editor-toolbar label {
  display: grid;
  gap: 7px;
  min-width: min(100%, 260px);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.editor-list {
  display: grid;
  gap: 8px;
}

.editor-item {
  display: grid;
  grid-template-columns: auto auto 70px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 78px;
  padding: 8px;
  border: 1px solid rgba(245, 239, 227, 0.13);
  border-radius: 6px;
  background: rgba(8, 12, 13, 0.42);
}

.editor-item.dragging {
  opacity: 0.58;
}

.editor-item.drag-over {
  border-color: rgba(224, 173, 90, 0.86);
  background: rgba(224, 173, 90, 0.08);
}

.editor-drag-handle {
  display: grid;
  place-items: center;
  width: 34px;
  height: 44px;
  color: var(--subtle);
  cursor: grab;
}

.editor-drag-handle svg {
  width: 18px;
  height: 24px;
  fill: currentColor;
}

.editor-check {
  display: grid;
  place-items: center;
  width: 28px;
}

.editor-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.editor-thumb {
  position: relative;
  overflow: hidden;
  width: 70px;
  height: 54px;
  border: 1px solid rgba(245, 239, 227, 0.16);
  border-radius: 5px;
  background:
    radial-gradient(circle at 70% 35%, rgba(245, 239, 227, 0.18), transparent 1.1rem),
    linear-gradient(135deg, #20292c, #454f55);
}

.editor-thumb svg {
  position: absolute;
  inset: 0;
  width: 24px;
  height: 24px;
  margin: auto;
  color: rgba(245, 239, 227, 0.8);
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.editor-thumb img,
.editor-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.editor-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.editor-copy strong,
.editor-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.editor-copy strong {
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.editor-copy span {
  color: var(--muted);
  font-size: 0.82rem;
}

.editor-name-input {
  width: 100%;
  min-height: 36px;
  color: var(--text);
  border: 1px solid rgba(245, 239, 227, 0.18);
  border-radius: 5px;
  background: rgba(16, 23, 25, 0.92);
  padding: 0 10px;
}

.editor-name-input:focus {
  border-color: rgba(224, 173, 90, 0.78);
  outline: 2px solid rgba(224, 173, 90, 0.14);
}

.editor-empty {
  border: 1px dashed rgba(245, 239, 227, 0.2);
  border-radius: 6px;
  color: var(--muted);
  padding: 18px;
}

.uploaded-video,
.uploaded-image {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #030506;
}

.uploaded-video {
  z-index: 2;
}

.gallery-card.has-upload::before {
  display: none;
}

.gallery-card.has-upload::after {
  position: absolute;
  inset: 0;
  z-index: 2;
  content: "";
  background: linear-gradient(180deg, rgba(8, 12, 13, 0.08), rgba(8, 12, 13, 0.72));
  pointer-events: none;
}

.photo-feed-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.feed-card {
  overflow: hidden;
  border: 1px solid rgba(245, 239, 227, 0.16);
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(18, 25, 27, 0.96), rgba(12, 18, 19, 0.96));
}

.feed-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #030506;
}

.feed-card-body {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.feed-card-body strong {
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
}

.feed-card-body p,
.feed-card-body small,
.feed-empty {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.feed-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.feed-empty {
  grid-column: 1 / -1;
  border: 1px dashed rgba(245, 239, 227, 0.2);
  border-radius: 6px;
  padding: 22px;
}

.photo-editor-shell {
  display: grid;
  grid-template-columns: minmax(240px, 0.58fr) minmax(420px, 1.3fr) minmax(290px, 0.72fr);
  gap: 14px;
  align-items: start;
}

.photo-panel-menu {
  display: grid;
  grid-template-columns: minmax(260px, 0.58fr) minmax(420px, 1fr);
  gap: 14px;
  margin-bottom: 14px;
  border: 1px solid rgba(245, 239, 227, 0.12);
  border-radius: 6px;
  background: rgba(8, 12, 13, 0.62);
  padding: 10px;
}

.photo-panel-menu-group {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.photo-panel-menu-group > span {
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.photo-panel-menu-buttons {
  display: flex;
  gap: 7px;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
}

.photo-panel-menu-buttons button {
  flex: 0 0 auto;
  min-height: 34px;
  color: var(--text);
  border: 1px solid rgba(245, 239, 227, 0.16);
  border-radius: 5px;
  background: rgba(245, 239, 227, 0.04);
  cursor: pointer;
  padding: 7px 12px;
  font-size: 0.78rem;
  font-weight: 850;
}

.photo-panel-menu-buttons button:hover,
.photo-panel-menu-buttons button.active {
  color: #fff;
  border-color: rgba(255, 77, 119, 0.75);
  background: rgba(166, 24, 61, 0.56);
}

.photo-tool-panel {
  display: grid;
  gap: 12px;
  align-content: start;
}

.photo-canvas-panel {
  display: grid;
  gap: 12px;
  position: sticky;
  top: 88px;
}

.tool-section {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(245, 239, 227, 0.1);
  border-radius: 6px;
  background: rgba(8, 12, 13, 0.24);
  padding: 12px;
}

.tool-section[data-panel-section] {
  display: none;
}

.tool-section[data-panel-section].active {
  display: grid;
}

.tool-section h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.12rem;
  font-weight: 600;
}

.tool-section label,
.range-control {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.range-control span {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.range-control output {
  color: var(--gold);
  font-weight: 850;
}

.photo-drop-zone {
  min-height: 144px;
  padding: 18px;
}

.button-grid,
.preset-grid,
.resize-grid {
  display: grid;
  gap: 8px;
}

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

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

.preset-grid button,
.segmented-control button {
  min-height: 34px;
  color: var(--text);
  border: 1px solid rgba(245, 239, 227, 0.16);
  border-radius: 5px;
  background: rgba(245, 239, 227, 0.04);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 800;
}

.preset-grid button:hover,
.segmented-control button:hover,
.segmented-control button.active {
  border-color: rgba(224, 173, 90, 0.72);
  background: rgba(224, 173, 90, 0.1);
}

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

.segmented-control {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.photo-canvas-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.photo-canvas-toolbar strong,
.photo-canvas-toolbar span {
  display: block;
}

.photo-canvas-toolbar strong {
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 1.05rem;
}

.photo-canvas-toolbar span {
  color: var(--muted);
  font-size: 0.82rem;
}

.photo-canvas-wrap {
  position: relative;
  display: grid;
  place-items: center;
  min-height: clamp(320px, 56vh, 700px);
  overflow: auto;
  border: 1px solid rgba(245, 239, 227, 0.14);
  border-radius: 6px;
  background:
    linear-gradient(45deg, rgba(245, 239, 227, 0.035) 25%, transparent 25% 75%, rgba(245, 239, 227, 0.035) 75%),
    linear-gradient(45deg, rgba(245, 239, 227, 0.035) 25%, transparent 25% 75%, rgba(245, 239, 227, 0.035) 75%),
    #050708;
  background-position:
    0 0,
    12px 12px;
  background-size: 24px 24px;
}

#photoCanvas {
  display: block;
  max-width: 100%;
  max-height: 76vh;
  border-radius: 4px;
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.45);
  touch-action: none;
}

.photo-empty-state {
  position: absolute;
  display: grid;
  place-items: center;
  min-width: 180px;
  min-height: 84px;
  color: var(--muted);
  border: 1px dashed rgba(245, 239, 227, 0.22);
  border-radius: 6px;
  background: rgba(8, 12, 13, 0.72);
  font-weight: 800;
}

.photo-canvas-wrap.has-photo .photo-empty-state {
  display: none;
}

.contract-lock {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 26px;
  align-items: center;
  max-width: 850px;
  padding: 28px;
}

#contracts.active {
  display: flex;
  flex-direction: column;
}

#contracts .page-title-row {
  order: 0;
}

#contractAdmin {
  order: 1;
}

#contractLock {
  order: 2;
  margin-top: 18px;
}

.lock-art {
  display: grid;
  place-items: center;
  width: 126px;
  height: 126px;
  color: var(--gold);
  border: 1px solid rgba(245, 239, 227, 0.14);
  border-radius: 50%;
  background: rgba(245, 239, 227, 0.05);
}

.lock-art svg {
  width: 72px;
  height: 72px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.password-form {
  display: flex;
  gap: 12px;
  align-items: end;
  margin-top: 18px;
  flex-wrap: wrap;
}

.password-form label {
  width: min(100%, 280px);
}

.form-message {
  min-height: 20px;
  margin: 10px 0 0;
  color: #ff8da0;
  font-size: 0.9rem;
}

.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid rgba(245, 239, 227, 0.12);
  margin-bottom: 18px;
}

.tab {
  color: var(--muted);
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 750;
}

.tab.active {
  color: #ff6077;
  border-color: var(--accent);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(245, 239, 227, 0.12);
  border-radius: 6px;
}

.document-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

.document-table th,
.document-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(245, 239, 227, 0.09);
  font-size: 0.88rem;
}

.document-table th {
  color: var(--muted);
  background: rgba(245, 239, 227, 0.04);
  font-size: 0.76rem;
  text-transform: uppercase;
}

.document-table tr:last-child td {
  border-bottom: 0;
}

.row-actions {
  display: flex;
  gap: 6px;
}

.row-actions button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: var(--text);
  border: 1px solid rgba(245, 239, 227, 0.16);
  border-radius: 5px;
  background: rgba(245, 239, 227, 0.04);
  cursor: pointer;
}

.row-actions svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.document-preview {
  min-height: 230px;
  margin-top: 16px;
  border: 1px dashed rgba(245, 239, 227, 0.22);
  border-radius: 6px;
  background: rgba(8, 12, 13, 0.34);
  padding: 18px;
}

.document-preview p {
  margin: 0;
  color: var(--muted);
}

.document-preview iframe {
  width: 100%;
  min-height: 520px;
  border: 0;
  border-radius: 4px;
  background: #fff;
}

.document-page {
  max-width: 860px;
  min-height: 460px;
  margin: 0 auto;
  color: #1a1f21;
  background: #fbf8f1;
  border-radius: 4px;
  padding: clamp(22px, 4vw, 46px);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
}

.document-page header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding-bottom: 18px;
  margin-bottom: 22px;
  border-bottom: 1px solid rgba(26, 31, 33, 0.16);
}

.document-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  min-height: 42px;
  color: #fff;
  background: #8f1c33;
  border-radius: 4px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.document-page h2 {
  margin-bottom: 6px;
  color: #1a1f21;
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 600;
}

.document-page header p,
.document-copy p,
.preview-note {
  color: #3d4345;
}

.document-page header p {
  margin-bottom: 0;
  font-size: 0.9rem;
}

.document-copy {
  display: grid;
  gap: 14px;
}

.document-copy p {
  margin: 0;
  line-height: 1.68;
}

.preview-note {
  margin-top: 24px;
  border-left: 3px solid #8f1c33;
  padding-left: 12px;
  font-size: 0.9rem;
}

.upload-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(300px, 1.1fr);
  gap: 28px;
  align-items: stretch;
}

.drop-zone {
  display: grid;
  place-items: center;
  min-height: 200px;
  padding: 28px;
  color: var(--gold);
  text-align: center;
  border: 1px dashed rgba(224, 173, 90, 0.72);
  border-radius: 8px;
  background: rgba(224, 173, 90, 0.05);
  cursor: pointer;
}

.drop-zone svg {
  width: 58px;
  height: 58px;
  margin-bottom: 12px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.drop-zone span {
  color: var(--text);
  font-weight: 800;
}

.drop-zone small {
  color: var(--muted);
}

#documentUpload {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.cart-drawer {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  justify-content: flex-end;
  background: rgba(0, 0, 0, 0.52);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}

.cart-drawer.open {
  opacity: 1;
  pointer-events: auto;
}

.cart-panel {
  display: flex;
  flex-direction: column;
  width: min(420px, 100%);
  min-height: 100%;
  padding: 22px;
  background: #101719;
  border-left: 1px solid rgba(245, 239, 227, 0.14);
  box-shadow: var(--shadow);
  transform: translateX(24px);
  transition: transform 160ms ease;
}

.cart-drawer.open .cart-panel {
  transform: translateX(0);
}

.cart-head,
.cart-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cart-head h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.8rem;
}

.cart-items {
  display: grid;
  gap: 10px;
  margin: 24px 0;
  flex: 1;
}

.cart-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(245, 239, 227, 0.12);
  border-radius: 6px;
}

.cart-line strong {
  display: block;
  margin-bottom: 2px;
}

.cart-line span,
.empty-cart {
  color: var(--muted);
}

.cart-total {
  padding: 18px 0;
  border-top: 1px solid rgba(245, 239, 227, 0.14);
}

.cart-total strong {
  color: var(--gold);
  font-size: 1.35rem;
}

.checkout-status {
  display: grid;
  gap: 8px;
  margin: 0 0 14px;
  color: var(--muted);
  border: 1px solid rgba(245, 239, 227, 0.14);
  border-radius: 6px;
  background: rgba(245, 239, 227, 0.04);
  padding: 12px;
  font-size: 0.86rem;
  line-height: 1.45;
}

.checkout-status[hidden] {
  display: none;
}

.checkout-status strong {
  color: var(--text);
  font-size: 0.92rem;
}

.checkout-status span,
.checkout-status small {
  display: block;
}

.checkout-status code {
  color: var(--gold);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}

.checkout-status-warning {
  border-color: rgba(224, 173, 90, 0.42);
  background: rgba(224, 173, 90, 0.08);
}

.checkout-status-error {
  border-color: rgba(214, 52, 84, 0.62);
  background: rgba(214, 52, 84, 0.1);
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.full-width {
  width: 100%;
}

.checkout-page {
  min-height: 100vh;
}

.checkout-result {
  display: grid;
  align-content: center;
  gap: 24px;
  width: min(100%, 820px);
  min-height: 100vh;
  padding-block: 48px;
}

.result-panel {
  border: 1px solid rgba(245, 239, 227, 0.16);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(18, 25, 27, 0.96), rgba(12, 18, 19, 0.96));
  box-shadow: var(--shadow);
  padding: clamp(28px, 6vw, 58px);
}

.result-icon {
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  margin-bottom: 24px;
  border-radius: 50%;
}

.result-icon svg {
  width: 38px;
  height: 38px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.success-icon {
  color: #7ee0a0;
  background: rgba(126, 224, 160, 0.12);
  border: 1px solid rgba(126, 224, 160, 0.35);
}

.cancel-icon {
  color: #ff8799;
  background: rgba(214, 52, 84, 0.14);
  border: 1px solid rgba(214, 52, 84, 0.42);
}

.result-panel h1 {
  margin-bottom: 14px;
  font-family: var(--font-serif);
  font-size: clamp(2.25rem, 6vw, 4rem);
  line-height: 1.02;
}

.result-panel p {
  max-width: 58ch;
  margin-bottom: 28px;
  color: var(--muted);
  line-height: 1.6;
}

@media (min-width: 1181px) {
  #photo-editor.active {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    height: calc(100vh - 130px);
    overflow: hidden;
  }

  #photo-editor .page-title-row {
    align-items: center;
    padding: 18px 2px 12px;
  }

  #photo-editor .page-title-row h1 {
    margin-bottom: 6px;
    font-size: clamp(2rem, 3vw, 2.65rem);
  }

  #photo-editor .page-title-row p {
    font-size: 0.95rem;
  }

  #photo-editor .photo-panel-menu {
    grid-template-columns: minmax(232px, 300px) minmax(0, 1fr);
    min-height: 0;
    margin-bottom: 10px;
    padding: 8px 10px;
  }

  #photo-editor .photo-panel-menu-buttons {
    padding-bottom: 0;
  }

  #photo-editor .photo-panel-menu-buttons button {
    min-height: 30px;
    padding-block: 5px;
  }

  #photo-editor .photo-editor-shell {
    grid-template-columns: minmax(232px, 300px) minmax(420px, 1fr) minmax(260px, 340px);
    min-height: 0;
    height: 100%;
    align-items: stretch;
    overflow: hidden;
  }

  #photo-editor .photo-tool-panel {
    min-height: 0;
    max-height: 100%;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 10px;
  }

  #photo-editor .photo-canvas-panel {
    position: static;
    grid-template-rows: auto minmax(0, 1fr) auto;
    min-height: 0;
    max-height: 100%;
    overflow: hidden;
    padding: 10px;
  }

  #photo-editor .photo-canvas-wrap {
    min-height: 0;
    height: 100%;
    max-height: none;
    overflow: auto;
  }

  #photo-editor #photoCanvas {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
  }

  #photo-editor .tool-section {
    gap: 8px;
    padding: 10px;
  }
}

@media (max-width: 1180px) {
  .home-grid,
  .feed-grid {
    grid-template-columns: 1fr;
  }

  .product-grid,
  .video-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .photo-editor-shell {
    grid-template-columns: minmax(220px, 0.72fr) minmax(420px, 1fr);
  }

  .photo-canvas-panel {
    position: static;
    order: -1;
  }

  .photo-tool-panel:last-child {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .photo-feed-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 920px) {
  .site-header {
    flex-wrap: wrap;
  }

  .brand {
    flex: 1;
  }

  .menu-toggle {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: var(--text);
    border: 1px solid rgba(245, 239, 227, 0.14);
    border-radius: 6px;
    background: rgba(245, 239, 227, 0.04);
  }

  .menu-toggle svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-width: 2;
  }

  .main-nav,
  .header-actions {
    display: none;
    width: 100%;
    border-left: 0;
    padding-left: 0;
  }

  .site-header.menu-open .main-nav,
  .site-header.menu-open .header-actions {
    display: flex;
  }

  .main-nav {
    justify-content: flex-start;
    flex-wrap: wrap;
    order: 3;
  }

  .header-actions {
    order: 4;
  }

  .nav-link {
    padding: 12px 0;
  }

  .verification-banner,
  .disclosure-strip,
  .cloud-auth-form,
  .upload-layout,
  .media-upload-panel,
  .editor-head,
  .photo-panel-menu,
  .photo-editor-shell,
  .contract-lock {
    grid-template-columns: 1fr;
  }

  .editor-toolbar {
    justify-content: flex-start;
  }

  .photo-tool-panel:last-child {
    grid-column: auto;
    grid-template-columns: 1fr;
  }

  .disclosure-strip .secondary-button {
    justify-self: start;
  }
}

@media (max-width: 700px) {
  main {
    padding-inline: 12px;
  }

  .verification-banner {
    padding: 20px;
  }

  .image-row,
  .bundle-grid,
  .product-grid,
  .video-grid,
  .gallery-grid,
  .photo-feed-grid {
    grid-template-columns: 1fr;
  }

  .page-title-row,
  .media-details {
    align-items: flex-start;
    flex-direction: column;
  }

  .toolbar {
    width: 100%;
  }

  .toolbar label,
  .toolbar select {
    width: 100%;
  }

  .editor-toolbar,
  .editor-toolbar label,
  .editor-toolbar select,
  .editor-toolbar button {
    width: 100%;
  }

  .editor-item {
    grid-template-columns: auto auto minmax(0, 1fr) auto;
  }

  .editor-thumb {
    display: none;
  }

  .button-grid,
  .preset-grid,
  .resize-grid {
    grid-template-columns: 1fr;
  }

  .photo-canvas-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .photo-canvas-wrap {
    min-height: 300px;
  }

  .stage-prop {
    right: 16%;
  }

  .contract-lock {
    padding: 20px;
  }

  .lock-art {
    width: 90px;
    height: 90px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
