:root {
  --ink: #18151b;
  --muted: #716b75;
  --paper: #f7f1e5;
  --surface: #fffdf8;
  --chrome: #ededE8;
  --line: #c9c5c8;
  --strong-line: #242027;
  --acid: #d7ff3f;
  --pink: #ff73a8;
  --cyan: #58d6ed;
  --violet: #8064f4;
  --danger: #c92d55;
  --shadow: 5px 5px 0 #18151b;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  color: var(--ink);
  background: #deded8;
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: 0;
}

body,
button,
input,
textarea,
select {
  font: 14px/1.35 Arial, Helvetica, sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
}

button,
.button-link {
  min-height: 36px;
  border: 1px solid var(--strong-line);
  border-radius: 4px;
  background: var(--acid);
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
  text-decoration: none;
}

button {
  padding: 0 12px;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
}

button:hover:not(:disabled),
.button-link:hover {
  filter: brightness(0.97);
  transform: translateY(-1px);
}

button:focus-visible,
.button-link:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 2px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.38;
}

.quiet-button {
  background: #fff;
  border-color: var(--line);
}

.icon-button {
  width: 36px;
  min-width: 36px;
  padding: 0;
  background: #fff;
  border-color: var(--line);
  font-size: 20px;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid #aaa5aa;
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  padding: 9px 10px;
}

textarea {
  min-height: 78px;
  resize: vertical;
}

label {
  display: grid;
  gap: 6px;
  color: #514b53;
  font-size: 12px;
  font-weight: 800;
}

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

.brand-mark {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0;
  text-decoration: none;
}

.brand-mark img {
  display: block;
  width: auto;
  height: 28px;
  object-fit: contain;
}

.marketing-header,
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 12px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--strong-line);
}

.marketing-header nav,
.site-header nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-weight: 800;
}

.marketing-header nav form,
.site-header nav form,
.studio-logout {
  display: contents;
  margin: 0;
}

.nav-button {
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  text-decoration: underline;
}

.header-cta {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  background: var(--acid);
  border: 1px solid var(--strong-line);
  border-radius: 4px;
  text-decoration: none;
}

/* Landing */

.landing-body {
  background: var(--surface);
}

.landing-shell {
  min-height: 100vh;
}

.landing-hero {
  position: relative;
  display: grid;
  min-height: max(520px, calc(100svh - 196px));
  overflow: hidden;
  background: #17171a url("/assets/hero-zines.jpg") center / cover no-repeat;
  border-bottom: 2px solid var(--strong-line);
}

.landing-hero::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 54%;
  background: rgba(17, 16, 20, 0.9);
}

.landing-hero-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(51%, 760px);
  padding: 54px 5vw 58px;
  color: #fff;
}

.hero-kicker,
.landing-process header > p,
.landing-proof > div > p {
  margin: 0 0 13px;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.landing-hero h1 {
  margin: 0;
  font-size: 72px;
  line-height: 0.9;
  overflow-wrap: anywhere;
}

.hero-summary {
  max-width: 610px;
  margin: 24px 0 0;
  font-size: 18px;
  font-weight: 650;
  line-height: 1.48;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.hero-actions a,
.landing-cta a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 45px;
  padding: 0 16px;
  border: 1px solid #fff;
  border-radius: 4px;
  font-weight: 900;
  text-decoration: none;
}

.hero-primary {
  background: var(--acid);
  color: var(--ink);
  border-color: var(--acid) !important;
}

.hero-secondary {
  background: rgba(17, 16, 20, 0.72);
  color: #fff;
}

.landing-hero-copy > small {
  margin-top: 14px;
  color: #d8d3da;
}

.landing-process {
  padding: 64px 5vw 70px;
  background: var(--surface);
}

.landing-process header {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(420px, 1.3fr);
  gap: 30px;
  align-items: end;
  margin-bottom: 36px;
}

.landing-process header > p {
  margin: 0;
}

.landing-process h2,
.landing-proof h2,
.landing-cta h2 {
  margin: 0;
  font-size: 42px;
  line-height: 1;
}

.landing-process ol {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--strong-line);
  border-bottom: 1px solid var(--strong-line);
  list-style: none;
}

.landing-process li {
  min-height: 220px;
  padding: 24px 26px 30px;
  border-right: 1px solid var(--strong-line);
}

.landing-process li:last-child {
  border-right: 0;
}

.landing-process li span {
  font-size: 11px;
  font-weight: 900;
}

.landing-process li h3 {
  margin: 46px 0 10px;
  font-size: 27px;
}

.landing-process li p {
  max-width: 350px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.landing-proof {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.6fr);
  gap: 60px;
  align-items: center;
  padding: 62px 5vw;
  background: var(--pink);
  border-top: 2px solid var(--strong-line);
  border-bottom: 2px solid var(--strong-line);
}

.landing-proof ul {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--strong-line);
  list-style: none;
}

.landing-proof li {
  padding: 12px 0;
  border-bottom: 1px solid var(--strong-line);
  font-weight: 850;
}

.landing-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 54px 5vw;
  background: var(--acid);
}

.landing-cta h2 {
  max-width: 780px;
}

.landing-cta a {
  flex: 0 0 auto;
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

/* Premium collections */

.premium-body {
  min-height: 100vh;
  background: #f5f2ec;
}

.premium-shell {
  min-height: 100vh;
}

.premium-hero {
  padding: 64px max(24px, 7vw) 72px;
  background: #18151b;
  color: #fff8ea;
  border-bottom: 2px solid var(--strong-line);
}

.premium-hero > p:first-child,
.premium-pack > div > p,
.premium-offer > div > p {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.premium-hero h1 {
  max-width: 920px;
  margin: 0 0 20px;
  font-size: 68px;
  line-height: 0.95;
}

.premium-hero > p:not(:first-child) {
  max-width: 720px;
  margin: 0 0 24px;
  font-size: 18px;
  line-height: 1.55;
}

.premium-hero > strong,
.plan-active {
  display: inline-block;
  padding: 9px 12px;
  background: var(--acid);
  color: var(--ink);
  border: 1px solid #fff;
}

.premium-price-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 14px;
  max-width: 760px;
}

.price-option {
  min-height: 150px;
  padding: 18px;
  background: #fff8ea;
  color: var(--ink);
  border: 2px solid #fff;
  box-shadow: 8px 8px 0 #000;
}

.price-option-monthly {
  background: var(--acid);
}

.price-option span {
  display: block;
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.price-option strong {
  display: block;
  margin: 0 0 10px;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 0.95;
}

.price-option small {
  display: block;
  max-width: 28ch;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
}

.price-option form {
  margin-top: 16px;
}

.price-option button,
.price-option > a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  margin-top: 16px;
  padding: 0 13px;
  background: var(--ink);
  color: #fff;
  border: 1px solid var(--ink);
  border-radius: 4px;
  font-weight: 900;
  text-decoration: none;
}

.price-option form button {
  margin-top: 0;
}

.premium-member-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.premium-member-actions form {
  margin: 0;
}

.premium-packs {
  display: grid;
  gap: 0;
}

.premium-pack {
  display: grid;
  grid-template-columns: minmax(260px, 34vw) minmax(0, 1fr);
  min-height: 380px;
  border-bottom: 2px solid var(--strong-line);
}

.premium-pack:nth-child(even) .pack-preview {
  order: 2;
}

.premium-pack > div:not(.pack-preview) {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px max(24px, 7vw);
}

.premium-pack h2 {
  margin: 0 0 18px;
  font-size: 48px;
  line-height: 0.98;
}

.premium-pack > div > p:not(:first-child) {
  max-width: 620px;
  margin: 0 0 22px;
  font-size: 17px;
  line-height: 1.5;
}

.premium-pack span {
  font-weight: 850;
}

.pack-preview {
  display: grid;
  place-items: center;
  min-height: 380px;
  background-position: center;
  background-size: cover;
  border-right: 2px solid var(--strong-line);
}

.premium-pack:nth-child(even) .pack-preview {
  border-right: 0;
  border-left: 2px solid var(--strong-line);
}

.premium-midnight .pack-preview {
  background-image: url("/assets/library/textures/midnight-signal/midnight-halftone.webp");
}

.premium-copyshop .pack-preview {
  background-image: url("/assets/library/textures/copy-shop/red-newsprint.webp");
}

.premium-garden .pack-preview {
  background-image: url("/assets/library/textures/garden-press/forest-riso.webp");
}

.premium-almanac .pack-preview {
  background-image: url("/assets/library/textures/occult-almanac/star-map-black.webp");
}

.premium-desktop .pack-preview {
  background-image: url("/assets/library/textures/desktop-2002/silver-checker.webp");
}

.premium-soft .pack-preview {
  background-image: url("/assets/library/textures/soft-archive/burgundy-lace.webp");
}

.premium-roadside .pack-preview {
  background-image: url("/assets/library/textures/roadside-romance/motel-wallpaper.webp");
}

.premium-laboratory .pack-preview {
  background-image: url("/assets/library/textures/field-laboratory/xray-contact-sheet.webp");
}

.pack-preview img {
  width: min(56%, 250px);
  max-height: 280px;
  object-fit: contain;
}

.premium-offer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.55fr);
  gap: 60px;
  align-items: center;
  padding: 64px max(24px, 7vw);
  background: var(--acid);
}

.premium-offer h2 {
  margin: 0 0 12px;
  font-size: 44px;
}

.premium-offer a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  background: var(--ink);
  color: #fff;
  border: 1px solid var(--ink);
  border-radius: 4px;
  font-weight: 900;
  text-decoration: none;
}

.checkout-pending p {
  margin: 6px 0 16px;
}

/* Authentication */

.auth-body {
  min-height: 100vh;
  background: var(--surface);
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(400px, 1.05fr) minmax(440px, 0.95fr);
  min-height: 100vh;
}

.auth-art {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  overflow: hidden;
  background: #18151b url("/assets/hero-zines.jpg") center / cover no-repeat;
  color: #fff;
  border-right: 2px solid var(--strong-line);
}

.auth-art::before {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 48%;
  background: rgba(17, 16, 20, 0.88);
}

.auth-art > * {
  position: relative;
  z-index: 1;
}

.auth-art .brand-mark {
  align-self: flex-start;
  padding: 7px 9px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--strong-line);
}

.auth-art > div {
  padding: 34px 24px;
}

.auth-art p,
.auth-kicker {
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.auth-art h1 {
  margin: 0;
  font-size: 52px;
  line-height: 0.94;
}

.auth-panel {
  display: grid;
  place-items: center;
  padding: 42px 8vw;
}

.auth-form-wrap {
  width: min(100%, 430px);
}

.auth-form-wrap > h1 {
  margin: 0;
  font-size: 38px;
  line-height: 1;
}

.auth-form-wrap > p:not(.auth-kicker):not(.auth-error):not(.auth-switch) {
  margin: 15px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.auth-error {
  margin: 18px 0 0;
  padding: 11px 12px;
  background: #fff0f3;
  color: #8f1737;
  border: 1px solid #d7486d;
  font-weight: 750;
}

.auth-form {
  display: grid;
  gap: 15px;
  margin-top: 26px;
}

.auth-form input {
  min-height: 44px;
}

.auth-form button {
  min-height: 46px;
  margin-top: 4px;
}

.auth-form > small {
  margin-top: -7px;
  color: var(--muted);
}

.auth-switch {
  margin: 20px 0 0;
}

.auth-switch a,
.auth-home {
  font-weight: 850;
}

.auth-home {
  display: inline-block;
  margin-top: 28px;
  color: var(--muted);
  font-size: 12px;
}

.owner-setup-art::before {
  height: 58%;
  background: rgba(20, 16, 24, 0.9);
}

/* Account and information */

.info-body {
  min-height: 100vh;
  background: #e7e7e1;
}

.info-shell {
  min-height: calc(100vh - 150px);
}

.info-content {
  width: min(100% - 40px, 920px);
  margin: 0 auto;
  padding: 64px 0 84px;
}

.info-kicker {
  margin: 0 0 10px;
  color: #5f5963;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.info-content > h1 {
  max-width: 760px;
  margin: 0 0 30px;
  font-size: 58px;
  line-height: 0.96;
}

.info-intro {
  max-width: 690px;
  margin: -12px 0 34px;
  font-size: 18px;
  line-height: 1.55;
}

.info-section {
  padding: 28px 0 32px;
  border-top: 1px solid var(--strong-line);
}

.info-section h2 {
  margin: 0 0 10px;
  font-size: 23px;
}

.info-section p {
  max-width: 760px;
  margin: 0 0 18px;
  color: #4f4951;
  font-size: 15px;
  line-height: 1.65;
}

.account-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 0 34px;
  background: #fff;
  border: 1px solid var(--strong-line);
}

.account-summary > div {
  min-width: 0;
  padding: 18px;
  border-right: 1px solid var(--strong-line);
}

.account-summary > div:last-child {
  border-right: 0;
}

.account-summary span,
.account-summary strong {
  display: block;
}

.account-summary span {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.account-summary strong {
  overflow: hidden;
  text-overflow: ellipsis;
}

.danger-section {
  margin-top: 20px;
  padding: 28px;
  background: #fff0f3;
  border: 1px solid #d7486d;
}

.account-delete-form,
.info-form {
  display: grid;
  gap: 16px;
  width: min(100%, 640px);
}

.account-delete-form button,
.info-form button {
  justify-self: start;
  min-height: 44px;
}

.info-form input,
.info-form select,
.info-form textarea,
.account-delete-form input {
  min-height: 44px;
}

.support-direct {
  margin-top: 24px;
  font-weight: 750;
}

.honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.site-flash {
  margin: 0 0 24px;
  padding: 12px 14px;
  background: #c9f5ff;
  border: 1px solid #168aa0;
  font-weight: 800;
}

.site-flash.is-error {
  background: #fff0f3;
  color: #8f1737;
  border-color: #d7486d;
}

.landing-flash {
  margin: 0;
  border-width: 0 0 1px;
}

.site-footer {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  min-height: 86px;
  padding: 18px 24px;
  background: var(--ink);
  color: #fff;
  border-top: 2px solid var(--strong-line);
}

.site-footer .brand-mark {
  padding: 6px 8px;
  background: #fff;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 12px;
  font-weight: 850;
}

.site-footer > span {
  color: #bbb5bd;
  font-size: 11px;
}

/* Administrator */

.admin-body {
  min-height: 100vh;
  background: #e8e8e3;
}

.admin-shell {
  min-height: 100vh;
}

.admin-header {
  position: sticky;
  z-index: 30;
  top: 0;
}

.admin-hero {
  display: grid;
  grid-template-columns: minmax(250px, 0.7fr) minmax(480px, 1.3fr);
  gap: 40px;
  align-items: end;
  padding: 48px max(24px, 5vw);
  background: var(--ink);
  color: #fff;
  border-bottom: 2px solid var(--strong-line);
}

.admin-hero p,
.admin-section > header p {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-hero h1 {
  margin: 0 0 10px;
  font-size: 54px;
  line-height: 0.92;
}

.admin-hero span {
  color: #cbc5cd;
  font-size: 12px;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(90px, 1fr));
  margin: 0;
  border: 1px solid #716a74;
}

.admin-stats div {
  min-width: 0;
  padding: 18px;
  border-right: 1px solid #716a74;
}

.admin-stats div:last-child {
  border-right: 0;
}

.admin-stats dt {
  color: #cbc5cd;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-stats dd {
  margin: 5px 0 0;
  color: var(--acid);
  font-size: 30px;
  font-weight: 900;
}

.admin-flash {
  margin: 0;
  padding: 12px max(24px, 5vw);
  background: #c9f5ff;
  border-bottom: 1px solid #168aa0;
  font-weight: 800;
}

.admin-flash.is-error {
  background: #fff0f3;
  color: #8f1737;
  border-color: #d7486d;
}

.admin-section {
  padding: 38px max(24px, 5vw) 52px;
  background: var(--surface);
  border-bottom: 2px solid var(--strong-line);
}

.admin-section:nth-of-type(odd) {
  background: #f3f3ef;
}

.admin-section > header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.admin-section > header h2 {
  margin: 0;
  font-size: 30px;
}

.admin-section > header > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.admin-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--strong-line);
}

.admin-table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
  background: #fff;
}

.admin-table th,
.admin-table td {
  padding: 13px 14px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.admin-table th:last-child,
.admin-table td:last-child {
  border-right: 0;
}

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

.admin-table th {
  background: #efefeb;
  font-size: 10px;
  text-transform: uppercase;
}

.admin-table td > strong,
.admin-table td > small {
  display: block;
}

.admin-table td > small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.admin-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 8px;
  background: #ece8ef;
  border: 1px solid var(--line);
  border-radius: 3px;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-badge.is-owner {
  background: var(--acid);
  border-color: var(--strong-line);
}

.admin-badge.is-public {
  background: #c9f5ff;
  border-color: #168aa0;
}

.admin-plan-form {
  display: grid;
  grid-template-columns: 120px 145px auto;
  gap: 7px;
  align-items: end;
}

.admin-plan-form label {
  gap: 3px;
  font-size: 9px;
}

.admin-plan-form input,
.admin-plan-form select {
  min-height: 34px;
  padding: 5px 7px;
  font-size: 11px;
}

.admin-plan-form button,
.admin-row-actions button {
  min-height: 34px;
  padding: 0 9px;
  font-size: 11px;
}

.admin-row-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.admin-row-actions form {
  display: contents;
}

.admin-row-actions > a {
  font-size: 11px;
  font-weight: 850;
}

.admin-delete {
  background: #fff0f3;
  color: #9c1f40;
  border-color: #d7486d;
}

.admin-empty {
  margin: 0;
  padding: 28px;
  background: #fff;
  border: 1px dashed var(--line);
  color: var(--muted);
}

.admin-pack-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--strong-line);
}

.admin-pack-list article {
  min-width: 0;
  padding: 18px;
  background: #fff;
  border-right: 1px solid var(--strong-line);
}

.admin-pack-list article:last-child {
  border-right: 0;
}

.admin-pack-list article > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: start;
}

.admin-pack-list p {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.admin-report-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.admin-report {
  min-width: 0;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.admin-report.is-open {
  border-color: var(--strong-line);
  box-shadow: 4px 4px 0 var(--cyan);
}

.admin-report > header,
.admin-report > header > div,
.admin-report-actions {
  display: flex;
  align-items: center;
}

.admin-report > header {
  justify-content: space-between;
  gap: 12px;
}

.admin-report > header > div,
.admin-report-actions {
  flex-wrap: wrap;
  gap: 8px;
}

.admin-report-status {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-report > p {
  margin: 18px 0;
  line-height: 1.55;
}

.admin-report dl {
  display: grid;
  gap: 6px;
  margin: 0 0 18px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.admin-report dl div {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 8px;
}

.admin-report dt,
.admin-report dd {
  margin: 0;
  font-size: 11px;
}

.admin-report dt {
  color: var(--muted);
  font-weight: 850;
}

.admin-report dd {
  overflow-wrap: anywhere;
}

.admin-report-actions button {
  min-height: 34px;
  font-size: 11px;
}

.launch-readiness {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 22px;
  background: #fff;
  border: 1px solid var(--strong-line);
}

.launch-readiness > div {
  min-width: 0;
  padding: 16px;
  border-right: 1px solid var(--strong-line);
  border-top: 5px solid var(--pink);
}

.launch-readiness > div:last-child {
  border-right: 0;
}

.launch-readiness > div.is-ready {
  border-top-color: #00a66f;
}

.launch-readiness span,
.launch-readiness strong {
  display: block;
}

.launch-readiness span {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-settings-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.admin-settings-form fieldset {
  display: grid;
  align-content: start;
  gap: 13px;
  min-width: 0;
  margin: 0;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--strong-line);
}

.admin-settings-form legend {
  padding: 0 6px;
  font-size: 12px;
  font-weight: 900;
}

.admin-settings-form label > span {
  justify-self: end;
  margin-top: -22px;
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
}

.admin-settings-form > button {
  justify-self: start;
  min-height: 42px;
}

.admin-clear-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.admin-clear-setting {
  display: flex !important;
  gap: 7px !important;
  align-items: center;
  font-size: 10px;
}

.admin-clear-setting input {
  width: 15px;
  min-height: 15px;
  margin: 0;
}

.admin-webhook-url {
  min-width: 0;
  margin: 2px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.admin-webhook-url span,
.admin-webhook-url code {
  display: block;
}

.admin-webhook-url span {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-webhook-url code {
  overflow-wrap: anywhere;
  font-size: 11px;
}

.admin-backup-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-top: 24px;
  padding: 16px 0 0;
  border-top: 1px solid var(--strong-line);
}

.admin-backup-row strong,
.admin-backup-row span {
  display: block;
}

.admin-backup-row span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

/* Studio */

.studio-body {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.studio-shell {
  display: grid;
  grid-template-rows: 58px minmax(0, 1fr);
  height: 100%;
  background: var(--chrome);
}

.studio-topbar {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: 210px minmax(160px, 1fr) auto;
  align-items: center;
  gap: 20px;
  min-width: 0;
  padding: 9px 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--strong-line);
}

.studio-topbar .brand-mark {
  justify-self: start;
}

.document-title {
  display: grid;
  justify-items: start;
  min-width: 0;
  line-height: 1.1;
}

.document-title strong {
  max-width: 250px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.document-title span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.topbar-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.plan-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 900;
  text-decoration: none;
}

.plan-chip.is-premium {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.user-chip {
  max-width: 120px;
  overflow: hidden;
  padding: 6px 8px;
  background: #ece8ef;
  border-radius: 4px;
  color: #514b53;
  font-size: 11px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.studio-logout button {
  min-height: 34px;
}

.studio-workspace {
  display: grid;
  grid-template-columns: 198px minmax(0, 1fr) 344px;
  grid-template-areas: "pages canvas inspector";
  min-height: 0;
  overflow: hidden;
}

.page-sidebar {
  grid-area: pages;
  display: grid;
  grid-template-rows: 58px minmax(0, 1fr) 52px;
  min-width: 0;
  min-height: 0;
  background: #f7f7f3;
  border-right: 1px solid var(--line);
}

.page-sidebar > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px 8px 14px;
  border-bottom: 1px solid var(--line);
}

.page-sidebar > header div {
  display: grid;
  line-height: 1.1;
}

.page-sidebar > header span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.page-sidebar > header strong {
  font-size: 16px;
}

.page-sidebar > header small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
}

.page-sidebar .page-list {
  align-content: start;
  overflow-y: auto;
  scrollbar-width: thin;
}

.page-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  padding: 8px;
  background: #efefeb;
  border-top: 1px solid var(--line);
}

.page-actions .icon-button {
  width: 100%;
  min-width: 0;
}

.danger-button {
  color: var(--danger);
}

.tool-rail {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 9px 7px;
  gap: 4px;
  background: #29252c;
  border-right: 1px solid var(--strong-line);
}

.tool-rail button {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  min-height: 61px;
  padding: 5px 2px;
  border: 0;
  background: transparent;
  color: #cbc5cd;
  font-size: 11px;
}

.tool-rail button span {
  display: grid;
  place-items: center;
  width: 27px;
  height: 25px;
  border: 1px solid #77717b;
  border-radius: 3px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.tool-rail button:hover,
.tool-rail button.is-active {
  background: #413b46;
  color: #fff;
  transform: none;
}

.tool-rail button.is-active span {
  background: var(--acid);
  border-color: var(--acid);
  color: var(--ink);
}

.control-panel {
  grid-area: inspector;
  display: grid;
  grid-template-rows: 48px minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--surface);
  border-left: 1px solid var(--line);
  scrollbar-width: thin;
}

.inspector-tabs {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0;
  background: #f1f0ec;
  border-bottom: 1px solid var(--line);
}

.inspector-tabs button {
  min-width: 0;
  min-height: 48px;
  padding: 0 5px;
  background: transparent;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  color: var(--muted);
  font-size: 11px;
}

.inspector-tabs button:last-child {
  border-right: 0;
}

.inspector-tabs button:hover,
.inspector-tabs button.is-active {
  background: #fff;
  color: var(--ink);
  box-shadow: inset 0 -4px 0 var(--cyan);
  transform: none;
}

.panel-view {
  display: none;
  min-height: 0;
  overflow-y: auto;
  height: 100%;
  scrollbar-width: thin;
}

.panel-view.is-active {
  display: block;
}

.panel-heading {
  padding: 17px 18px 15px;
  border-bottom: 1px solid var(--line);
}

.panel-heading p {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.panel-heading h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.05;
}

.panel-section {
  display: grid;
  gap: 13px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
}

.art-target-row {
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  background: #f7f7f3;
}

.art-target-row span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.art-target-row strong {
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.art-tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.art-tool-grid button {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  min-width: 0;
  min-height: 72px;
  padding: 7px 3px;
  background: #fff;
  border-color: var(--line);
  font-size: 11px;
}

.art-tool-grid button > span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  font-size: 13px;
  font-weight: 900;
}

.art-tool-grid button.is-selected {
  border-color: var(--strong-line);
  box-shadow: inset 0 0 0 2px var(--cyan);
}

.marker-glyph::before {
  content: "";
  width: 8px;
  height: 24px;
  background: linear-gradient(to bottom, var(--ink) 0 72%, #ff2f92 72% 100%);
  clip-path: polygon(18% 0, 82% 0, 100% 86%, 50% 100%, 0 86%);
  transform: rotate(28deg);
}

.cutout-glyph {
  border: 2px dashed var(--ink);
  border-radius: 50%;
  transform: rotate(-14deg) scaleX(0.82);
}

.marker-color-control > span,
.marker-range {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px;
  align-items: center;
  gap: 8px;
}

.marker-color-control input[type="color"] {
  min-height: 42px;
  padding: 3px;
  cursor: pointer;
}

.marker-color-control output,
.marker-range output {
  color: var(--muted);
  font-family: "Courier New", monospace;
  font-size: 11px;
  text-align: right;
}

.marker-range input[type="range"] {
  padding: 0;
  accent-color: #ff2f92;
}

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

.marker-swatches button {
  min-width: 0;
  min-height: 34px;
  padding: 0;
  background: var(--marker-swatch);
  border-color: var(--strong-line);
}

.marker-swatches button.is-selected {
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--ink);
}

.artwork-summary > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.art-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.art-action-grid button {
  min-width: 0;
  padding: 0 6px;
  font-size: 11px;
}

.text-target-grid,
.text-style-grid,
.text-align-grid {
  display: grid;
  gap: 7px;
}

.arrange-add-text {
  width: 100%;
  min-height: 42px;
  background: var(--acid);
  border-color: var(--strong-line);
}

.layer-stack {
  display: grid;
  gap: 7px;
}

.layer-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  min-width: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.layer-row.is-selected {
  border-color: var(--strong-line);
  box-shadow: inset 3px 0 0 var(--cyan);
}

.layer-row.is-hidden {
  background: #f2f1ed;
  color: #777177;
}

.layer-select {
  display: grid;
  grid-template-columns: 31px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 56px;
  padding: 7px 8px;
  background: transparent;
  border: 0;
  border-radius: 0;
  text-align: left;
}

.layer-select:hover,
.layer-select:focus-visible {
  background: #effcff;
  transform: none;
}

.layer-select > span:first-child {
  display: grid;
  place-items: center;
  width: 29px;
  height: 31px;
  background: var(--paper);
  border: 1px solid var(--line);
  font-family: "Courier New", monospace;
  font-size: 9px;
  font-weight: 900;
}

.layer-select > span:last-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.layer-select b,
.layer-select small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.layer-select b {
  font-size: 11px;
}

.layer-select small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.layer-row-actions {
  display: grid;
  grid-template-columns: repeat(2, 28px);
  grid-template-rows: repeat(2, 28px);
  align-content: center;
  gap: 3px;
  padding: 5px;
  border-left: 1px solid var(--line);
}

.layer-row-actions > button {
  width: 28px;
  min-width: 28px;
  min-height: 28px;
  padding: 0;
  background: #fff;
  border-color: var(--line);
  font-size: 12px;
}

.layer-row-actions label {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 3px;
  cursor: pointer;
}

.layer-row-actions label span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.layer-row-actions input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--cyan);
}

.object-number-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.object-number-grid label {
  min-width: 0;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.object-number-grid input {
  min-width: 0;
  margin-top: 4px;
  padding: 8px 5px;
  font-family: "Courier New", monospace;
  font-size: 11px;
}

.object-align-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.object-align-grid button {
  min-width: 0;
  min-height: 36px;
  padding: 0 5px;
  background: #fff;
  border-color: var(--line);
  font-size: 10px;
}

.art-action-grid .is-selected,
.object-align-grid .is-selected {
  border-color: var(--strong-line);
  box-shadow: inset 0 0 0 2px var(--cyan);
}

.restore-objects {
  width: 100%;
}

.arrange-replace-image {
  width: 100%;
  min-height: 42px;
  background: var(--cyan);
  border-color: var(--strong-line);
}

.image-fit-grid,
.image-mask-grid {
  display: grid;
  gap: 7px;
}

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

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

.image-fit-grid button,
.image-mask-grid button {
  min-width: 0;
  min-height: 38px;
  padding: 0 5px;
  background: #fff;
  border-color: var(--line);
  font-size: 10px;
}

.image-fit-grid button.is-selected,
.image-mask-grid button.is-selected {
  border-color: var(--strong-line);
  box-shadow: inset 0 0 0 2px var(--cyan);
}

#customTextContentWrap textarea {
  margin-top: 6px;
  resize: vertical;
}

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

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

.text-target-grid button,
.text-style-grid button,
.text-align-grid button {
  min-width: 0;
  min-height: 40px;
  padding: 0 6px;
  background: #fff;
  border-color: var(--line);
  font-size: 11px;
}

.text-target-grid button.is-selected,
.text-style-grid button.is-selected,
.text-align-grid button.is-selected {
  border-color: var(--strong-line);
  box-shadow: inset 0 0 0 2px var(--cyan);
}

.text-color-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.text-color-row input[type="color"] {
  min-height: 40px;
  padding: 3px;
  cursor: pointer;
}

.compact-toggle {
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.compact-toggle input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.section-heading {
  display: grid;
  gap: 2px;
}

.section-heading strong {
  font-size: 13px;
}

.section-heading span,
.help-copy,
.upload-zone p,
.media-empty p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

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

.template-picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 68px;
  gap: 8px;
}

.template-picker button {
  padding: 0 10px;
}

.design-selects {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.account-zines {
  display: grid;
  gap: 7px;
}

.account-zines > p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.account-zines article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px 34px;
  gap: 6px;
}

.account-zines article > button {
  display: grid;
  justify-items: start;
  gap: 3px;
  min-height: 52px;
  padding: 8px 10px;
  overflow: hidden;
  background: #fff;
  border-color: var(--line);
  text-align: left;
}

.account-zines article > button b {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-zines article > button small {
  color: var(--muted);
  font-size: 10px;
}

.account-zines article > a {
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 17px;
  font-weight: 900;
  text-decoration: none;
}

.account-zine-delete {
  width: 34px;
  min-width: 34px;
  padding: 0;
  background: #fff0f3;
  color: var(--danger);
  border-color: #d7486d;
  font-size: 18px;
}

.page-list {
  display: grid;
  gap: 7px;
  padding: 12px;
}

.page-list-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  min-height: 60px;
  padding: 8px 10px;
  background: #fff;
  border-color: var(--line);
  text-align: left;
}

.page-list-item > span {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 26px;
  height: 34px;
  background: var(--paper);
  border: 1px solid var(--line);
  font-size: 10px;
}

.page-list-item b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-list-item small {
  color: var(--muted);
  font-size: 10px;
  text-transform: capitalize;
}

.page-list-item.is-active {
  background: #effcff;
  border-color: #168aa0;
  box-shadow: inset 3px 0 0 var(--cyan);
}

.page-list-item[draggable="true"] {
  cursor: grab;
}

.page-list-item.is-dragging {
  opacity: 0.45;
}

.page-list-item.is-drop-target {
  border-color: var(--strong-line);
  box-shadow: inset 0 -4px 0 var(--pink);
}

.compact-actions {
  grid-template-columns: 1fr 1fr;
}

.compact-actions #addPage {
  grid-column: 1 / -1;
}

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

.choice-grid,
.swatch-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

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

.font-grid button {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 1px;
  min-height: 62px;
  padding: 5px;
  background: #fff;
  border-color: var(--line);
}

.font-grid button b {
  font-size: 21px;
}

.font-grid button span {
  color: var(--muted);
  font-size: 9px;
}

.font-grid button[data-font="serif"] b { font-family: Georgia, serif; }
.font-grid button[data-font="mono"] b { font-family: "Courier New", monospace; }
.font-grid button[data-font="grotesk"] b { font-family: Impact, sans-serif; }
.font-grid button[data-font="editorial"] b { font-family: Didot, Georgia, serif; font-style: italic; }
.font-grid button[data-font="machine"] b { font-family: "American Typewriter", "Courier New", monospace; }
.font-grid button[data-font="poster"] b { font-family: Impact, "Arial Black", sans-serif; }
.font-grid button[data-font="stencil"] b { font-family: Impact, "Arial Black", sans-serif; }
.font-grid button[data-font="seamstress"] b { font-family: Baskerville, Georgia, serif; font-style: italic; }
.font-grid button[data-font="souvenir"] b { font-family: "Cooper Black", Georgia, serif; }
.font-grid button[data-font="research"] b { font-family: "American Typewriter", "Courier New", monospace; }

.asset-library-section {
  gap: 12px;
}

[data-library-item][hidden] {
  display: none !important;
}

.asset-library-pagination {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 36px;
  align-items: center;
  gap: 8px;
}

.asset-library-pagination button {
  width: 36px;
  min-width: 36px;
  padding: 0;
  background: #fff;
  border-color: var(--line);
  font-size: 18px;
}

.asset-library-pagination > span {
  display: grid;
  place-items: center;
  line-height: 1.1;
}

.asset-library-pagination b {
  font-size: 11px;
}

.asset-library-pagination small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

[data-premium="1"] {
  position: relative;
}

#zineStudio[data-premium="0"] [data-premium="1"] {
  border-style: dashed;
}

.asset-tier,
.font-grid button em,
.texture-grid button span em,
.collage-grid button em {
  margin-left: auto;
  color: #6b3150;
  font-size: 8px;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.font-grid button em {
  position: absolute;
  top: 3px;
  right: 4px;
}

.texture-grid button span em {
  float: right;
}

.collage-grid button em {
  position: absolute;
  right: 3px;
  bottom: 3px;
  padding: 2px 3px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 2px;
}

.element-settings {
  gap: 14px;
}

.premium-dialog {
  width: min(440px, calc(100vw - 32px));
  padding: 28px;
  background: var(--surface);
  border: 2px solid var(--strong-line);
  border-radius: 5px;
  box-shadow: 8px 8px 0 var(--ink);
}

.premium-dialog::backdrop {
  background: rgba(24, 21, 27, 0.7);
}

.premium-dialog > p:first-of-type {
  margin: 0 0 8px;
  color: #8b2953;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.premium-dialog h2 {
  margin: 0 34px 12px 0;
  font-size: 30px;
  line-height: 1;
}

.premium-dialog > p:not(:first-of-type) {
  margin: 0 0 22px;
  color: var(--muted);
  line-height: 1.5;
}

.premium-dialog > div {
  display: flex;
  gap: 8px;
}

.premium-dialog > div a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  background: var(--acid);
  border: 1px solid var(--strong-line);
  border-radius: 4px;
  font-weight: 900;
  text-decoration: none;
}

.dialog-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  min-width: 34px;
  padding: 0;
  background: #fff;
  border-color: var(--line);
  font-size: 20px;
}

.font-grid button.is-selected,
.element-grid button.is-selected,
.texture-grid button.is-selected,
.collage-grid button.is-selected {
  border-color: var(--strong-line);
  box-shadow: inset 0 0 0 2px var(--acid);
}

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

.texture-grid button {
  position: relative;
  min-width: 0;
  min-height: 76px;
  overflow: hidden;
  padding: 0;
  background: var(--paper);
  border-color: var(--line);
}

.texture-grid button img,
.texture-grid button i {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.texture-grid button i {
  background: var(--paper);
}

.texture-grid button span {
  position: absolute;
  right: 4px;
  bottom: 4px;
  left: 4px;
  padding: 4px 5px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  font-size: 9px;
  text-align: left;
}

.collage-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.collage-grid button {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  min-width: 0;
  min-height: 0;
  padding: 5px;
  overflow: hidden;
  background: #f2f1ed;
  border-color: var(--line);
}

.collage-grid button img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.collage-grid button span {
  color: var(--muted);
  font-size: 9px;
}

.element-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}

.element-grid button {
  min-width: 0;
  min-height: 46px;
  padding: 0;
  background: #fff;
  border-color: var(--line);
  font-size: 20px;
}

.element-grid button:first-child {
  font-size: 10px;
}

.choice-grid button,
.swatch-grid button {
  min-height: 44px;
  background: #fff;
  border-color: var(--line);
  font-size: 12px;
}

.choice-grid button.is-selected,
.swatch-grid button.is-selected {
  border-color: var(--strong-line);
  box-shadow: inset 0 0 0 2px var(--acid);
}

.layout-choices button:last-child {
  grid-column: 1 / -1;
}

.swatch-grid button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}

.swatch-grid i {
  width: 22px;
  height: 22px;
  border: 1px solid var(--strong-line);
  border-radius: 3px;
}

.swatch-ink { background: #f6f0e4; }
.swatch-acid { background: var(--acid); }
.swatch-paper { background: #fff6d5; }
.swatch-night { background: #20192b; }
.swatch-signal { background: #1554c7; box-shadow: inset 8px 0 0 #ff4caa; }
.swatch-copyshop { background: #ef3028; box-shadow: inset 8px 0 0 #f0bc31; }
.swatch-garden { background: #28583c; box-shadow: inset 8px 0 0 #f0cf51; }
.swatch-margin { background: #fff3c9; box-shadow: inset 8px 0 0 #1746d1; }
.swatch-photobooth { background: #171717; box-shadow: inset 8px 0 0 #f4eee1; }
.swatch-almanac { background: #101726; box-shadow: inset 8px 0 0 #c49a45; }
.swatch-desktop { background: #72e7e2; box-shadow: inset 8px 0 0 #dfe2e5; }
.swatch-street { background: #1454a1; box-shadow: inset 8px 0 0 #ff3b30; }
.swatch-softarchive { background: #6c2235; box-shadow: inset 8px 0 0 #f4eadc; }
.swatch-roadside { background: #299d9b; box-shadow: inset 8px 0 0 #e24d50; }
.swatch-laboratory { background: #145a75; box-shadow: inset 8px 0 0 #d63b34; }

.upload-zone {
  justify-items: stretch;
  background: #eefbfe;
  border: 2px dashed transparent;
  transition: background 120ms ease, border-color 120ms ease;
}

.upload-zone.is-premium-locked {
  background: #fff7dd;
  border-color: #e5bd42;
}

.upload-zone-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.upload-zone-heading span {
  padding: 3px 6px;
  background: var(--ink);
  color: #fff;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.upload-zone.is-dragging {
  background: #ddf9ff;
  border-color: #168aa0;
}

.media-target {
  grid-template-columns: 1fr auto;
  gap: 3px 8px;
  align-items: center;
}

.media-target span {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.media-target strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-target small {
  color: var(--muted);
  font-size: 10px;
}

.media-target button {
  grid-column: 2;
  grid-row: 1 / 4;
}

.media-library {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.media-item {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) 30px;
  gap: 9px;
  align-items: start;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.media-item.is-used {
  border-color: #168aa0;
  box-shadow: inset 3px 0 0 var(--cyan);
}

.media-item-preview {
  grid-row: 1 / 3;
  width: 78px;
  min-width: 78px;
  height: 78px;
  min-height: 78px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #f4f1e9;
}

.media-item-preview img {
  display: block;
  width: 78px;
  height: 78px;
  object-fit: cover;
}

.media-item-details {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.media-item-details strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.media-item-details small {
  color: var(--muted);
  font-size: 9px;
}

.media-item label {
  font-size: 10px;
}

.media-item input {
  padding: 6px 7px;
  font-size: 11px;
}

.media-item-actions {
  grid-column: 2 / 4;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.media-item-actions:has(> :only-child) {
  grid-template-columns: 1fr;
}

.media-item-actions button {
  min-height: 32px;
  padding: 0 7px;
  font-size: 11px;
}

.media-item > .icon-button {
  grid-column: 3;
  grid-row: 1;
  width: 30px;
  min-width: 30px;
  min-height: 30px;
  padding: 0;
  background: #fff;
  color: var(--danger);
  font-size: 17px;
}

.media-empty {
  padding: 28px 20px;
  text-align: center;
}

.toggle-row {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  color: var(--ink);
  font-size: 13px;
}

.toggle-row input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
}

.toggle-row span {
  display: grid;
  gap: 5px;
}

.toggle-row small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.45;
}

.primary-wide {
  width: 100%;
  min-height: 44px;
}

.publish-status {
  min-height: 19px;
  margin: 0;
  color: #4d4750;
  font-size: 12px;
  font-weight: 700;
}

.share-box {
  display: grid;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.share-box[hidden] {
  display: none;
}

.export-actions {
  display: grid;
  gap: 7px;
}

.recovery-list {
  display: grid;
  gap: 7px;
}

.recovery-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 9px;
  background: #f7f7f3;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.recovery-item > div:first-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.recovery-item strong,
.recovery-item span,
.recovery-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recovery-item strong {
  font-size: 11px;
}

.recovery-item span,
.recovery-item small,
.recovery-empty {
  color: var(--muted);
  font-size: 9px;
}

.recovery-item > div:last-child {
  display: grid;
  grid-template-columns: auto 30px;
  gap: 5px;
  align-items: center;
}

.recovery-item button {
  min-height: 30px;
  padding: 0 8px;
  background: #fff;
  border-color: var(--line);
  font-size: 10px;
}

.recovery-item .icon-button {
  width: 30px;
  min-width: 30px;
  padding: 0;
  color: var(--danger);
  font-size: 16px;
}

.recovery-empty {
  margin: 0;
  line-height: 1.45;
}

/* Canvas */

.canvas-workspace {
  grid-area: canvas;
  display: grid;
  grid-template-rows: 54px minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  background: #d7d7d2;
}

.canvas-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 8px 16px;
  background: #f4f4f0;
  border-bottom: 1px solid var(--line);
}

.canvas-toolbar > div:first-child {
  display: grid;
  min-width: 0;
}

.canvas-toolbar span {
  font-weight: 850;
}

.canvas-toolbar small {
  max-width: 280px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.canvas-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.canvas-actions > span {
  min-width: 48px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.canvas-viewport {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  padding: 18px 24px;
  background-color: #d6d6d1;
  background-image:
    linear-gradient(#c9c9c3 1px, transparent 1px),
    linear-gradient(90deg, #c9c9c3 1px, transparent 1px);
  background-size: 24px 24px;
}

.preview-canvas {
  position: relative;
  min-width: 240px;
  max-width: calc(100% - 20px);
  max-height: calc(100vh - 148px);
  background: transparent;
  border: 1px solid var(--strong-line);
  box-shadow: 9px 10px 0 rgba(24, 21, 27, 0.22);
  container-type: inline-size;
}

.preview-canvas.shape-portrait {
  width: min(500px, calc((100vh - 148px) * 0.75));
  aspect-ratio: 3 / 4;
}

.preview-canvas.shape-square {
  width: min(590px, calc(100vh - 148px));
  aspect-ratio: 1;
}

.preview-canvas.shape-landscape {
  width: min(720px, calc((100vh - 148px) * 1.333));
  aspect-ratio: 4 / 3;
}

.canvas-page-strip {
  display: none;
  justify-content: center;
  align-items: center;
  gap: 7px;
  min-width: 0;
  overflow-x: auto;
  padding: 9px 16px;
  background: #f4f4f0;
  border-top: 1px solid var(--line);
}

.canvas-page-strip button {
  display: grid;
  grid-template-columns: 20px 26px;
  align-items: center;
  gap: 4px;
  min-width: 57px;
  min-height: 46px;
  padding: 4px;
  background: #fff;
  border-color: var(--line);
}

.canvas-page-strip button span {
  font-size: 9px;
}

.canvas-page-strip button i {
  width: 24px;
  height: 32px;
  background: var(--paper);
  border: 1px solid var(--line);
}

.canvas-page-strip button.is-active {
  border-color: var(--strong-line);
  box-shadow: 0 0 0 2px var(--cyan);
}

/* Shared zine page styling */

.zine-theme-ink {
  --page-bg: #f7f0e3;
  --page-color: #18151b;
  --page-border: #18151b;
  --page-shadow: #18151b;
}

.zine-theme-acid {
  --page-bg: #d7ff3f;
  --page-color: #18151b;
  --page-border: #18151b;
  --page-shadow: #ff73a8;
}

.zine-theme-paper {
  --page-bg: #fff5cf;
  --page-color: #2d261c;
  --page-border: #5a4b34;
  --page-shadow: #58d6ed;
}

.zine-theme-night {
  --page-bg: #20192b;
  --page-color: #fff8ea;
  --page-border: #fff8ea;
  --page-shadow: #ff73a8;
}

.zine-theme-signal {
  --page-bg: #121119;
  --page-color: #fff8ea;
  --page-border: #58d6ed;
  --page-shadow: #ff4caa;
}

.zine-theme-copyshop {
  --page-bg: #f5e7cb;
  --page-color: #171417;
  --page-border: #171417;
  --page-shadow: #ef3028;
}

.zine-theme-garden {
  --page-bg: #f3ecd9;
  --page-color: #21362b;
  --page-border: #36523f;
  --page-shadow: #e9b94d;
}

.zine-theme-margin {
  --page-bg: #fff4cf;
  --page-color: #17171b;
  --page-border: #1746d1;
  --page-shadow: #ef3e36;
}

.zine-theme-photobooth {
  --page-bg: #171717;
  --page-color: #fff8ea;
  --page-border: #fff8ea;
  --page-shadow: #bf3030;
}

.zine-theme-almanac {
  --page-bg: #e8d8b7;
  --page-color: #17130f;
  --page-border: #2b2117;
  --page-shadow: #b78a3b;
}

.zine-theme-desktop {
  --page-bg: #dfe2e5;
  --page-color: #11151a;
  --page-border: #142cc5;
  --page-shadow: #23d9d0;
}

.zine-theme-street {
  --page-bg: #f2e8ce;
  --page-color: #151515;
  --page-border: #1454a1;
  --page-shadow: #ff3b30;
}

.zine-theme-softarchive {
  --page-bg: #f4eadc;
  --page-color: #38212b;
  --page-border: #6c2235;
  --page-shadow: #274c77;
}

.zine-theme-roadside {
  --page-bg: #f7e3c4;
  --page-color: #2b1514;
  --page-border: #a72628;
  --page-shadow: #299d9b;
}

.zine-theme-laboratory {
  --page-bg: #e8e1c8;
  --page-color: #10283b;
  --page-border: #145a75;
  --page-shadow: #d63b34;
}

.zine-font-sans {
  --display-font: Arial, Helvetica, sans-serif;
  --body-font: Arial, Helvetica, sans-serif;
}

.zine-font-serif {
  --display-font: Georgia, "Times New Roman", serif;
  --body-font: Georgia, "Times New Roman", serif;
}

.zine-font-mono {
  --display-font: "Courier New", Courier, monospace;
  --body-font: "Courier New", Courier, monospace;
}

.zine-font-grotesk {
  --display-font: "Arial Black", Arial, sans-serif;
  --body-font: Arial, Helvetica, sans-serif;
}

.zine-font-editorial {
  --display-font: Didot, Bodoni 72, Georgia, serif;
  --body-font: Arial, Helvetica, sans-serif;
}

.zine-font-machine {
  --display-font: "American Typewriter", "Courier New", monospace;
  --body-font: "Courier New", Courier, monospace;
}

.zine-font-poster {
  --display-font: Impact, "Arial Black", Arial, sans-serif;
  --body-font: Arial, Helvetica, sans-serif;
}

.zine-font-archive {
  --display-font: Baskerville, Georgia, "Times New Roman", serif;
  --body-font: "American Typewriter", "Courier New", monospace;
}

.zine-font-marker {
  --display-font: "Marker Felt", "Comic Sans MS", Arial, sans-serif;
  --body-font: "Trebuchet MS", Arial, sans-serif;
}

.zine-font-caption {
  --display-font: "Helvetica Neue", Arial, sans-serif;
  --body-font: "Courier New", Courier, monospace;
}

.zine-font-oracle {
  --display-font: "Palatino Linotype", Palatino, Georgia, serif;
  --body-font: Baskerville, Georgia, "Times New Roman", serif;
}

.zine-font-pixel {
  --display-font: Monaco, "Courier New", monospace;
  --body-font: "Courier New", Courier, monospace;
}

.zine-font-stencil {
  --display-font: Impact, "Arial Black", Arial, sans-serif;
  --body-font: "Arial Narrow", Arial, sans-serif;
}

.zine-font-seamstress {
  --display-font: Baskerville, Georgia, "Times New Roman", serif;
  --body-font: Georgia, "Times New Roman", serif;
}

.zine-font-souvenir {
  --display-font: "Cooper Black", Georgia, serif;
  --body-font: "Trebuchet MS", Arial, sans-serif;
}

.zine-font-research {
  --display-font: "American Typewriter", "Courier New", monospace;
  --body-font: "Courier New", Courier, monospace;
}

.reader-page {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--page-bg, var(--paper));
  color: var(--page-color, var(--ink));
  border: 2px solid var(--page-border, var(--ink));
  font-family: var(--body-font, Arial, sans-serif);
  container-type: inline-size;
  -webkit-mask-image: var(--paper-mask, none);
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-image: var(--paper-mask, none);
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: 100% 100%;
}

[data-positioned-object] {
  position: absolute !important;
  right: auto !important;
  bottom: auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  box-sizing: border-box;
  transform-origin: center;
}

[data-positioned-object].page-copy,
[data-positioned-object].cover-copy {
  overflow: auto;
  padding: 3%;
}

.preview-canvas.art-tool-select [data-canvas-object] {
  cursor: move;
  pointer-events: auto !important;
}

.preview-canvas.art-tool-select [data-text-target] {
  cursor: move;
}

.preview-canvas.art-tool-select [data-object-locked] {
  cursor: not-allowed;
}

.preview-canvas.art-tool-select [data-inline-text] {
  cursor: text;
}

.custom-canvas-layer {
  position: absolute;
  z-index: 8;
  left: 22%;
  top: 38%;
  width: 64%;
  height: 20%;
  min-width: 0;
  min-height: 0;
  margin: 0;
  box-sizing: border-box;
  transform-origin: center;
}

.custom-text-layer {
  overflow: hidden;
}

.custom-text-layer p {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.custom-text-layer [contenteditable="true"]:focus {
  outline: 2px dashed var(--cyan);
  outline-offset: 2px;
}

.custom-image-layer img,
.custom-decoration-layer {
  display: block;
  width: 100%;
  height: 100%;
}

.custom-image-layer img {
  object-fit: var(--image-fit, cover);
}

.custom-image-layer {
  overflow: hidden;
  background: rgba(255, 255, 255, 0.5);
}

.custom-decoration-layer {
  object-fit: contain;
}

.custom-stamp-layer {
  display: grid;
  place-items: center;
  background: var(--pink);
  color: var(--ink);
  border: 2px solid var(--page-border);
  border-radius: 50%;
  box-shadow: 3px 3px 0 var(--page-shadow);
  font: 900 8cqw/1 Arial, sans-serif;
}

.object-selection-box {
  position: absolute;
  z-index: 40;
  border: 2px solid #1295af;
  box-shadow: 0 0 0 1px #fff;
  pointer-events: none;
  transform-origin: center;
}

.object-selection-box::before {
  content: attr(data-label);
  position: absolute;
  left: -2px;
  bottom: calc(100% + 5px);
  padding: 3px 6px;
  background: #111;
  color: #fff;
  font: 800 10px/1 Arial, sans-serif;
  white-space: nowrap;
}

.object-selection-box.is-locked {
  border-style: dashed;
  border-color: #5f5b60;
}

.object-selection-box.is-locked::before {
  content: attr(data-label) " / locked";
}

.object-move-handle {
  position: absolute;
  left: 50%;
  top: -15px;
  width: 25px;
  min-width: 25px;
  height: 25px;
  min-height: 25px;
  padding: 0;
  translate: -50% 0;
  background: #111;
  color: #fff;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px #1295af;
  font-size: 16px;
  line-height: 1;
  pointer-events: auto;
  cursor: move;
}

.object-resize-handle {
  position: absolute;
  width: 13px;
  min-width: 13px;
  height: 13px;
  min-height: 13px;
  padding: 0;
  background: #fff;
  border: 2px solid #1295af;
  border-radius: 50%;
  pointer-events: auto;
}

.object-resize-handle[data-resize-handle="nw"] { left: -7px; top: -7px; cursor: nwse-resize; }
.object-resize-handle[data-resize-handle="ne"] { right: -7px; top: -7px; cursor: nesw-resize; }
.object-resize-handle[data-resize-handle="se"] { right: -7px; bottom: -7px; cursor: nwse-resize; }
.object-resize-handle[data-resize-handle="sw"] { left: -7px; bottom: -7px; cursor: nesw-resize; }

.reader-page::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  background-image: var(--texture-image, none);
  background-position: center;
  background-size: cover;
  pointer-events: none;
}

.texture-xerox-cyan::before { background-image: url("/assets/library/textures/xerox-cyan.webp"); }
.texture-torn-pink::before { background-image: url("/assets/library/textures/torn-pink.webp"); }
.texture-graph-blue::before { background-image: url("/assets/library/textures/graph-blue.webp"); }
.texture-xerox-night::before { background-image: url("/assets/library/textures/xerox-night.webp"); }
.texture-newsprint-red::before { background-image: url("/assets/library/textures/open-studio/newsprint-red.webp"); }
.texture-yellow-copy::before { background-image: url("/assets/library/textures/open-studio/yellow-copy.webp"); }
.texture-midnight-halftone::before { background-image: url("/assets/library/textures/midnight-signal/midnight-halftone.webp"); }
.texture-electric-violet::before { background-image: url("/assets/library/textures/midnight-signal/electric-violet.webp"); }
.texture-chrome-grid::before { background-image: url("/assets/library/textures/midnight-signal/chrome-grid.webp"); }
.texture-red-newsprint::before { background-image: url("/assets/library/textures/copy-shop/red-newsprint.webp"); }
.texture-yellow-pasteboard::before { background-image: url("/assets/library/textures/copy-shop/yellow-pasteboard.webp"); }
.texture-blue-carbon::before { background-image: url("/assets/library/textures/copy-shop/blue-carbon.webp"); }
.texture-flyer-wall::before { background-image: url("/assets/library/textures/street-ephemera/flyer-wall.webp"); }
.texture-transit-map-paper::before { background-image: url("/assets/library/textures/street-ephemera/transit-map-paper.webp"); }
.texture-utility-stripes::before { background-image: url("/assets/library/textures/street-ephemera/utility-stripes.webp"); }
.texture-faded-floral-fabric::before { background-image: url("/assets/library/textures/soft-archive/faded-floral-fabric.webp"); }
.texture-sewing-pattern-paper::before { background-image: url("/assets/library/textures/soft-archive/sewing-pattern-paper.webp"); }
.texture-burgundy-lace::before { background-image: url("/assets/library/textures/soft-archive/burgundy-lace.webp"); }
.texture-motel-wallpaper::before { background-image: url("/assets/library/textures/roadside-romance/motel-wallpaper.webp"); }
.texture-postcard-stock::before { background-image: url("/assets/library/textures/roadside-romance/postcard-stock.webp"); }
.texture-night-route::before { background-image: url("/assets/library/textures/roadside-romance/night-route.webp"); }
.texture-lab-graph-paper::before { background-image: url("/assets/library/textures/field-laboratory/lab-graph-paper.webp"); }
.texture-xray-contact-sheet::before { background-image: url("/assets/library/textures/field-laboratory/xray-contact-sheet.webp"); }
.texture-specimen-card::before { background-image: url("/assets/library/textures/field-laboratory/specimen-card.webp"); }

.texture-xerox-night,
.texture-midnight-halftone,
.texture-electric-violet,
.texture-blue-carbon,
.texture-forest-riso,
.texture-darkroom-black,
.texture-faded-contact-sheet,
.texture-star-map-black,
.texture-midnight-blueprint,
.texture-pixel-noise-wallpaper,
.texture-utility-stripes,
.texture-burgundy-lace,
.texture-night-route,
.texture-xray-contact-sheet {
  --page-color: #fff8ea;
  --page-border: #fff8ea;
  --page-shadow: #ff73a8;
}

.preview-canvas > .reader-page {
  width: 100%;
  height: 100%;
  border: 0;
}

.page-marker-layer,
.page-gesture-layer {
  position: absolute;
  z-index: 12;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
}

.page-marker-layer {
  opacity: 0.84;
}

.zine-page-brand {
  position: absolute;
  z-index: 30;
  right: 3%;
  bottom: 2.5%;
  display: inline-flex;
  align-items: center;
  width: 20%;
  max-width: 116px;
  padding: 5px 7px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(24, 21, 27, 0.68);
  box-shadow: 2px 2px 0 rgba(24, 21, 27, 0.5);
}

.zine-page-brand img {
  display: block;
  width: 100%;
  height: auto;
}

.zine-reader.is-unbranded .reader-mode {
  margin-left: auto;
}

.page-gesture-layer {
  z-index: 20;
}

.page-gesture-layer .gesture-cutout {
  fill: rgba(88, 214, 237, 0.3);
  stroke: #0d6172;
  stroke-width: 7;
  stroke-dasharray: 18 12;
  stroke-linejoin: round;
}

.preview-canvas:is(.art-tool-marker, .art-tool-cutout) [data-art-surface] {
  cursor: crosshair;
  touch-action: none;
  user-select: none;
}

.preview-canvas.art-tool-cutout [data-art-surface] {
  cursor: cell;
}

.page-copy,
.cover-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  padding: 8%;
}

.page-copy {
  overflow: auto;
}

.page-copy > span {
  margin-bottom: auto;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 11px;
  font-weight: 900;
}

.page-copy h2 {
  margin: 12px 0;
  font-family: var(--display-font, Arial, sans-serif);
  font-size: 2.7rem;
  line-height: 0.98;
  overflow-wrap: anywhere;
}

.page-copy p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.align-center .page-copy {
  text-align: center;
}

.align-right .page-copy {
  text-align: right;
}

.page-media,
.cover-media {
  position: relative;
  z-index: 1;
  margin: 0;
  overflow: hidden;
}

.page-media img,
.cover-media img,
.custom-image-layer img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: var(--image-fit, cover);
  object-position: var(--image-x, 50%) var(--image-y, 50%);
  transform: scale(var(--image-zoom, 1));
  transform-origin: var(--image-x, 50%) var(--image-y, 50%);
  filter: var(--image-preset, brightness(1)) brightness(var(--image-brightness, 100%)) contrast(var(--image-contrast, 100%)) saturate(var(--image-saturation, 100%)) blur(var(--image-blur, 0));
}

.filter-mono { --image-preset: grayscale(1) contrast(1.45); }
.filter-contrast { --image-preset: grayscale(1) contrast(2.05) brightness(1.08); }
.filter-duotone { --image-preset: grayscale(1) sepia(1) hue-rotate(145deg) saturate(5) contrast(1.35); }
.filter-soft { --image-preset: saturate(0.65) contrast(0.84) brightness(1.08); }

.image-mask-rounded { border-radius: 8%; }
.image-mask-circle { border-radius: 50%; }
.image-mask-arch { border-radius: 50% 50% 7% 7%; }
.image-mask-diamond { clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.image-mask-star { clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 94%, 50% 72%, 21% 94%, 32% 57%, 2% 35%, 39% 35%); }

.layout-text .page-media {
  display: none;
}

.layout-image-top {
  display: grid;
  grid-template-rows: 45% 55%;
}

.layout-image-top .page-media {
  grid-row: 1;
}

.layout-image-top .page-copy {
  grid-row: 2;
  padding: 6%;
}

.layout-image-top .page-copy h2 {
  font-size: 2.2rem;
}

.layout-split {
  display: grid;
  grid-template-columns: 46% 54%;
}

.layout-split .page-media {
  grid-column: 1;
}

.layout-split .page-copy {
  grid-column: 2;
  padding: 9%;
}

.layout-split .page-copy h2 {
  font-size: 2rem;
}

.layout-full-image .page-media {
  position: absolute;
  inset: 0;
}

.layout-full-image .page-copy {
  align-self: flex-end;
  flex: 0 1 auto;
  margin: auto 5% 5%;
  padding: 5%;
  background: color-mix(in srgb, var(--page-bg) 90%, transparent);
  border: 1px solid var(--page-border);
  max-height: 70%;
}

.layout-full-image:not(:has(.page-media)) .page-copy {
  align-self: stretch;
  flex: 1;
  margin: 0;
  padding: 8%;
  border: 0;
}

.layout-quote .page-media {
  display: none;
}

.layout-quote .page-copy {
  justify-content: center;
  text-align: center;
}

.layout-quote .page-copy > span {
  margin-bottom: 20px;
}

.layout-quote .page-copy h2 {
  margin: auto 0 18px;
  font-size: 3.4rem;
}

.accent-pink { box-shadow: inset 0 12px 0 var(--pink); }
.accent-cyan { box-shadow: inset 0 12px 0 var(--cyan); }
.accent-acid { box-shadow: inset 0 12px 0 var(--acid); }
.accent-violet { box-shadow: inset 0 12px 0 var(--violet); }

.page-stamp {
  position: absolute;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  background: var(--pink);
  color: var(--ink);
  border: 2px solid var(--page-border);
  border-radius: 50%;
  box-shadow: 3px 3px 0 var(--page-shadow);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 32px;
  line-height: 1;
  transform: rotate(8deg);
}

.page-decoration {
  position: absolute;
  z-index: 5;
  width: clamp(68px, 27%, 145px);
  height: auto;
  max-height: 32%;
  object-fit: contain;
  pointer-events: none;
  transform: rotate(5deg);
}

.page-decoration[src$="tape.webp"] {
  width: clamp(110px, 44%, 220px);
  max-height: 20%;
  transform: rotate(-4deg);
}

.page-decoration[src$="barcode.webp"],
.page-decoration[src$="torn-label.webp"] {
  width: clamp(120px, 46%, 240px);
  max-height: 24%;
}

.page-decoration[src$="safety-pin.webp"],
.page-decoration[src$="scribble-arrow.webp"],
.page-decoration[src$="scissors.webp"] {
  width: clamp(90px, 34%, 180px);
  max-height: 38%;
}

.page-decoration[src$="masking-tape-strip.webp"],
.page-decoration[src$="torn-red-scrap.webp"] {
  width: clamp(130px, 50%, 260px);
  max-height: 22%;
}

.page-decoration[src$="clear-tape-cross.webp"] {
  width: clamp(100px, 38%, 200px);
  max-height: 38%;
}

.page-decoration[src$="blue-note-scrap.webp"],
.page-decoration[src$="newspaper-clipping.webp"],
.page-decoration[src$="receipt-fragment.webp"] {
  width: clamp(76px, 24%, 135px);
  max-height: 48%;
}

.page-decoration[src$="pressed-daisy.webp"],
.page-decoration[src$="wildflower-sprig.webp"],
.page-decoration[src$="fern-frond.webp"],
.page-decoration[src$="ivy-stem.webp"],
.page-decoration[src$="red-poppy.webp"],
.page-decoration[src$="dried-seed-head.webp"] {
  width: clamp(70px, 24%, 138px);
  max-height: 54%;
}

.page-decoration[src$="ginkgo-leaf.webp"] {
  width: clamp(82px, 30%, 160px);
  max-height: 44%;
}

.page-decoration[src$="marker-underline.webp"],
.page-decoration[src$="date-stamp.webp"],
.page-decoration[src$="moon-phases.webp"],
.page-decoration[src$="browser-window.webp"],
.page-decoration[src$="error-dialog.webp"] {
  width: clamp(130px, 48%, 250px);
  max-height: 24%;
}

.page-decoration[src$="hand-drawn-frame.webp"],
.page-decoration[src$="polaroid-frame.webp"],
.page-decoration[src$="contact-sheet-frame.webp"],
.page-decoration[src$="photo-corners.webp"],
.page-decoration[src$="tarot-frame.webp"] {
  width: clamp(82px, 30%, 165px);
  max-height: 54%;
}

.page-decoration[src$="film-strip.webp"],
.page-decoration[src$="palmistry-hand.webp"],
.page-decoration[src$="ritual-candle.webp"],
.page-decoration[src$="cursor-arrow.webp"] {
  width: clamp(68px, 22%, 122px);
  max-height: 56%;
}

.page-decoration[src$="red-circle.webp"],
.page-decoration[src$="loop-arrow.webp"],
.page-decoration[src$="rough-heart.webp"],
.page-decoration[src$="grease-pencil-circle.webp"],
.page-decoration[src$="celestial-sun.webp"],
.page-decoration[src$="coiled-snake.webp"],
.page-decoration[src$="crystal-cluster.webp"],
.page-decoration[src$="cd-disc.webp"],
.page-decoration[src$="pixel-heart.webp"],
.page-decoration[src$="file-folder.webp"],
.page-decoration[src$="chrome-star.webp"] {
  width: clamp(78px, 28%, 150px);
  max-height: 42%;
}

.decoration-top-left { top: 5%; left: 5%; }
.decoration-top-right { top: 5%; right: 5%; }
.decoration-bottom-left { bottom: 5%; left: 5%; }
.decoration-bottom-right { right: 5%; bottom: 5%; }

.stamp-top-left { top: 5%; left: 5%; }
.stamp-top-right { top: 5%; right: 5%; }
.stamp-bottom-left { bottom: 5%; left: 5%; }
.stamp-bottom-right { right: 5%; bottom: 5%; }

.reader-cover {
  display: flex;
}

.cover-copy {
  justify-content: flex-end;
}

.cover-copy > p:first-child {
  margin: 0 0 16px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.cover-copy h1 {
  margin: 0;
  font-family: var(--display-font, Arial, sans-serif);
  font-size: 3.4rem;
  line-height: 0.9;
  overflow-wrap: anywhere;
  text-transform: uppercase;
}

.reader-summary {
  margin: 18px 0 0;
  font-size: 1rem;
  font-weight: 750;
  line-height: 1.35;
}

.has-cover-image .cover-media {
  position: absolute;
  inset: 0;
}

.has-cover-image .cover-media::after {
  content: "";
  position: absolute;
  inset: 35% 0 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.76));
}

.has-cover-image .cover-copy {
  color: #fff;
  text-shadow: 0 1px 2px #000;
}

/* Published reader */

.reader-body {
  min-height: 100vh;
  background: #d9d9d4;
}

.zine-reader {
  width: 100%;
  max-width: 1320px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px 26px 24px;
}

.reader-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
}

.reader-actions button {
  min-height: 34px;
  background: #fff;
  border-color: var(--line);
}

.reader-actions button.is-active {
  background: var(--acid);
  border-color: var(--strong-line);
}

.reader-report {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.reader-brand {
  margin-right: auto;
  padding: 0 7px;
  font-weight: 900;
  text-decoration: none;
}

.reader-mode {
  display: flex;
  gap: 4px;
}

.flipbook {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 52px;
  gap: 16px;
  align-items: center;
}

.flip-stage {
  position: relative;
  justify-self: center;
  max-width: 100%;
  perspective: 1500px;
}

.zine-shape-portrait .flip-stage {
  width: min(610px, calc(100vw - 220px), calc((100vh - 188px) * 0.75));
  aspect-ratio: 3 / 4;
}

.zine-shape-square .flip-stage {
  width: min(690px, calc(100vw - 220px), calc(100vh - 188px));
  aspect-ratio: 1;
}

.zine-shape-landscape .flip-stage {
  width: min(850px, calc(100vw - 220px), calc((100vh - 188px) * 1.333));
  aspect-ratio: 4 / 3;
}

.flip-page {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  box-shadow: 8px 8px 0 var(--page-shadow);
  transform: translateX(24px) rotateY(-18deg) scale(0.97);
  transform-origin: left center;
  transition: transform 340ms ease, opacity 220ms ease;
  backface-visibility: hidden;
}

.flip-page.is-current {
  opacity: 1;
  transform: translateX(0) rotateY(0) scale(1);
}

.flip-page.is-past {
  opacity: 0;
  transform: translateX(-32px) rotateY(18deg) scale(0.96);
  transform-origin: right center;
}

.flip-nav {
  width: 52px;
  height: 72px;
  padding: 0;
  background: #fff;
  border-color: var(--line);
  font-size: 20px;
}

.flip-status {
  grid-column: 2;
  justify-self: center;
  padding: 7px 11px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.reader-thumbs {
  display: flex;
  justify-content: center;
  gap: 7px;
  overflow-x: auto;
  margin-top: 14px;
  padding: 4px 0 8px;
}

.reader-thumbs button {
  min-width: 100px;
  max-width: 160px;
  min-height: 47px;
  overflow: hidden;
  background: #fff;
  border-color: var(--line);
  font-size: 11px;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reader-thumbs button.is-active {
  border-color: var(--strong-line);
  box-shadow: inset 0 -3px 0 var(--cyan);
}

.reader-thumbs span {
  display: block;
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
}

.zine-reader[data-mode="scroll"] .flipbook {
  display: block;
}

.zine-reader[data-mode="scroll"] .flip-stage {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  width: min(100%, 1100px);
  aspect-ratio: auto;
  perspective: none;
}

.zine-reader[data-mode="scroll"] .flip-page {
  position: relative;
  inset: auto;
  opacity: 1;
  transform: none;
}

.zine-shape-portrait[data-mode="scroll"] .flip-page { aspect-ratio: 3 / 4; }
.zine-shape-square[data-mode="scroll"] .flip-page { aspect-ratio: 1; }
.zine-shape-landscape[data-mode="scroll"] .flip-page { aspect-ratio: 4 / 3; }

.zine-reader[data-mode="scroll"] .flip-nav,
.zine-reader[data-mode="scroll"] .flip-status,
.zine-reader[data-mode="scroll"] .reader-thumbs {
  display: none;
}

/* Directory */

.directory-body {
  min-height: 100vh;
  background: var(--surface);
}

.directory-shell {
  min-height: 100vh;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 62px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--strong-line);
}

.site-header nav a {
  font-weight: 800;
}

.directory-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 520px);
  gap: 28px;
  align-items: end;
  padding: 48px 5vw 34px;
  background: var(--cyan);
  border-bottom: 2px solid var(--strong-line);
}

.directory-hero > p {
  grid-column: 1 / -1;
  margin: 0 0 -14px;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.directory-hero h1 {
  margin: 0;
  font-size: 50px;
  line-height: 0.95;
}

.directory-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 10px;
}

.directory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
  padding: 28px 5vw 60px;
}

.zine-card {
  display: flex;
  flex-direction: column;
  min-height: 280px;
  padding: 18px;
  background: var(--page-bg);
  color: var(--page-color);
  border: 2px solid var(--strong-line);
  border-radius: 4px;
  box-shadow: var(--shadow);
  text-decoration: none;
}

.zine-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0 var(--ink);
}

.zine-card > span,
.zine-card small {
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.zine-card h2 {
  margin: auto 0 12px;
  font-size: 30px;
  line-height: 0.95;
  overflow-wrap: anywhere;
}

.zine-card p {
  margin: 0 0 18px;
  line-height: 1.45;
}

.zine-card[hidden],
.filter-empty[hidden] {
  display: none;
}

.directory-empty,
.filter-empty {
  grid-column: 1 / -1;
  padding: 36px;
  background: #fff0f5;
  border: 1px solid var(--line);
  text-align: center;
}

.directory-empty h2 {
  margin: 0 0 8px;
  font-size: 28px;
}

.directory-empty p {
  margin: 0 auto 20px;
  color: var(--muted);
}

.not-found-body {
  min-height: 100vh;
  background: var(--cyan);
}

.not-found {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: 100vh;
  padding: 8vw;
}

.not-found > p {
  margin: 50px 0 8px;
  font-weight: 900;
}

.not-found h1 {
  max-width: 760px;
  margin: 0 0 28px;
  font-size: 54px;
  line-height: 0.95;
}

@media (max-width: 1120px) {
  .studio-workspace {
    grid-template-columns: 174px minmax(0, 1fr) 320px;
  }

  .studio-topbar {
    grid-template-columns: 190px minmax(130px, 1fr) auto;
    gap: 10px;
  }

  .landing-hero-copy {
    width: 58%;
  }

  .landing-hero::before {
    width: 61%;
  }

  .preview-canvas.shape-portrait {
    width: min(450px, calc((100vh - 148px) * 0.75));
  }

  .cover-copy h1 {
    font-size: 3rem;
  }

  .page-copy h2 {
    font-size: 2.3rem;
  }
}

@media (max-width: 920px) {
  .landing-hero-copy {
    width: 69%;
  }

  .landing-hero::before {
    width: 72%;
  }

  .landing-hero h1 {
    font-size: 62px;
  }

  .landing-process header,
  .landing-proof {
    grid-template-columns: 1fr;
  }

  .landing-process header {
    gap: 12px;
  }

  .auth-shell {
    grid-template-columns: minmax(320px, 0.8fr) minmax(420px, 1.2fr);
  }

  .auth-art h1 {
    font-size: 42px;
  }

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

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

  .admin-pack-list article:nth-child(2n) {
    border-right: 0;
  }

  .admin-pack-list article:nth-child(n + 3) {
    border-top: 1px solid var(--strong-line);
  }

  .admin-report-list,
  .admin-settings-form {
    grid-template-columns: 1fr;
  }

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

  .launch-readiness > div:nth-child(2n) {
    border-right: 0;
  }

  .launch-readiness > div:nth-child(n + 3) {
    border-top-width: 5px;
  }

  .studio-body {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
  }

  .studio-shell {
    height: 100%;
    min-height: 0;
  }

  .studio-topbar {
    position: relative;
    grid-template-columns: 1fr auto;
  }

  .document-title {
    display: none;
  }

  .topbar-actions .icon-button,
  #newZine {
    display: none;
  }

  .user-chip,
  .studio-logout {
    display: none;
  }

  .studio-workspace {
    grid-template-columns: 154px minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) 300px;
    grid-template-areas:
      "pages canvas"
      "inspector inspector";
    overflow: hidden;
  }

  .control-panel {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .canvas-workspace {
    grid-template-rows: 48px minmax(0, 1fr);
  }

  .preview-canvas {
    max-height: max(230px, calc(100dvh - 430px));
  }

  .preview-canvas.shape-portrait {
    width: min(430px, calc((100dvh - 430px) * 0.75));
  }

  .preview-canvas.shape-square {
    width: min(470px, calc(100dvh - 430px));
  }

  .preview-canvas.shape-landscape {
    width: min(600px, calc((100dvh - 430px) * 1.333));
  }

  .directory-hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .marketing-header,
  .site-header {
    padding: 10px 12px;
  }

  .marketing-header nav,
  .site-header nav {
    gap: 10px;
    font-size: 12px;
  }

  .marketing-header a[href="#how-it-works"],
  .marketing-header a[href="/directory"],
  .marketing-header a[href="/premium"],
  .premium-shell .site-header a[href="/directory"],
  .directory-shell .site-header a[href="/premium"] {
    display: none;
  }

  .premium-hero {
    padding: 46px 22px 52px;
  }

  .premium-hero h1 {
    font-size: 46px;
  }

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

  .price-option {
    min-height: 0;
    box-shadow: 5px 5px 0 #000;
  }

  .price-option strong {
    font-size: 34px;
  }

  .premium-pack,
  .premium-offer {
    grid-template-columns: 1fr;
  }

  .premium-pack:nth-child(even) .pack-preview {
    order: 0;
  }

  .premium-pack .pack-preview,
  .premium-pack:nth-child(even) .pack-preview {
    min-height: 290px;
    border: 0;
    border-bottom: 2px solid var(--strong-line);
  }

  .premium-pack > div:not(.pack-preview) {
    padding: 38px 22px 44px;
  }

  .premium-pack h2,
  .premium-offer h2 {
    font-size: 36px;
  }

  .premium-offer {
    gap: 24px;
    padding: 44px 22px;
  }

  .admin-header a[href="/directory"] {
    display: none;
  }

  .admin-hero {
    gap: 28px;
    padding: 34px 18px;
  }

  .admin-hero h1 {
    font-size: 44px;
  }

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

  .admin-stats div:nth-child(2n) {
    border-right: 0;
  }

  .admin-stats div:nth-child(-n + 2) {
    border-bottom: 1px solid #716a74;
  }

  .admin-stats div:nth-child(n + 3) {
    border-top: 1px solid #716a74;
  }

  .admin-stats div:last-child {
    grid-column: 1 / -1;
    border-right: 0;
  }

  .admin-section {
    padding: 30px 18px 38px;
  }

  .admin-section > header h2 {
    font-size: 26px;
  }

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

  .admin-pack-list article,
  .admin-pack-list article:nth-child(2n) {
    border-right: 0;
    border-top: 1px solid var(--strong-line);
  }

  .admin-pack-list article:first-child {
    border-top: 0;
  }

  .launch-readiness {
    grid-template-columns: 1fr;
  }

  .launch-readiness > div,
  .launch-readiness > div:nth-child(2n) {
    border-right: 0;
  }

  .admin-backup-row,
  .site-footer {
    align-items: flex-start;
  }

  .admin-backup-row {
    flex-direction: column;
  }

  .info-content {
    width: min(100% - 32px, 920px);
    padding: 42px 0 58px;
  }

  .info-content > h1 {
    font-size: 42px;
  }

  .account-summary {
    grid-template-columns: 1fr;
  }

  .account-summary > div {
    border-right: 0;
    border-bottom: 1px solid var(--strong-line);
  }

  .account-summary > div:last-child {
    border-bottom: 0;
  }

  .danger-section {
    padding: 20px;
  }

  .site-footer {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 24px 18px;
  }

  .site-footer .brand-mark {
    justify-self: start;
  }

  .landing-hero {
    min-height: max(560px, calc(100svh - 170px));
    background-position: 62% center;
  }

  .landing-hero::before {
    width: 100%;
    background: rgba(17, 16, 20, 0.84);
  }

  .landing-hero-copy {
    width: 100%;
    padding: 54px 22px 58px;
  }

  .landing-hero h1 {
    font-size: 48px;
  }

  .hero-summary {
    font-size: 16px;
  }

  .hero-actions {
    display: grid;
  }

  .landing-process {
    padding: 48px 22px;
  }

  .landing-process header {
    grid-template-columns: 1fr;
  }

  .landing-process h2,
  .landing-proof h2,
  .landing-cta h2 {
    font-size: 34px;
  }

  .landing-process ol {
    grid-template-columns: 1fr;
  }

  .landing-process li {
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--strong-line);
  }

  .landing-process li:last-child {
    border-bottom: 0;
  }

  .landing-process li h3 {
    margin-top: 28px;
  }

  .landing-proof,
  .landing-cta {
    grid-template-columns: 1fr;
    padding: 44px 22px;
  }

  .landing-cta {
    align-items: flex-start;
    flex-direction: column;
  }

  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-art {
    display: none;
  }

  .auth-panel {
    min-height: 100vh;
    padding: 36px 22px;
  }

  .auth-form-wrap > h1 {
    font-size: 34px;
  }

  .studio-topbar {
    gap: 6px;
    padding: 9px 8px;
  }

  .studio-topbar .brand-mark img {
    height: 23px;
  }

  .topbar-actions {
    gap: 5px;
  }

  .topbar-actions .button-link {
    display: none;
  }

  .studio-workspace {
    grid-template-columns: 1fr;
    grid-template-rows: 62px minmax(0, 1fr) 292px;
    grid-template-areas:
      "pages"
      "canvas"
      "inspector";
  }

  .page-sidebar {
    grid-template-columns: 42px minmax(0, 1fr) 134px;
    grid-template-rows: 1fr;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .page-sidebar > header {
    padding: 5px;
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }

  .page-sidebar > header div {
    display: none;
  }

  .page-sidebar .page-list {
    display: flex;
    gap: 5px;
    padding: 7px;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .page-sidebar .page-list-item {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    flex: 0 0 42px;
    min-height: 46px;
    padding: 4px;
  }

  .page-sidebar .page-list-item > span {
    grid-row: auto;
    width: 100%;
    height: 100%;
  }

  .page-sidebar .page-list-item b,
  .page-sidebar .page-list-item small {
    display: none;
  }

  .page-actions {
    grid-template-columns: repeat(4, 1fr);
    align-content: center;
    padding: 5px;
    border-top: 0;
    border-left: 1px solid var(--line);
  }

  .page-actions .icon-button {
    min-height: 36px;
    font-size: 15px;
  }

  .canvas-workspace {
    grid-template-rows: 42px minmax(0, 1fr);
  }

  .canvas-toolbar {
    padding: 5px 10px;
  }

  .preview-canvas {
    max-height: max(170px, calc(100dvh - 486px));
  }

  .preview-canvas.shape-portrait {
    width: min(320px, calc((100dvh - 486px) * 0.75));
  }

  .preview-canvas.shape-square {
    width: min(340px, calc(100dvh - 486px));
  }

  .preview-canvas.shape-landscape {
    width: min(370px, calc((100dvh - 486px) * 1.333));
  }

  .panel-heading,
  .panel-section {
    padding-left: 16px;
    padding-right: 16px;
  }

  .field-row,
  .directory-tools {
    grid-template-columns: 1fr;
  }

  .design-selects {
    grid-template-columns: 1fr;
  }

  .canvas-viewport {
    padding: 16px 10px;
  }

  .cover-copy h1 {
    font-size: 1.9rem;
  }

  .page-copy h2,
  .layout-quote .page-copy h2 {
    font-size: 2rem;
  }

  .page-stamp {
    width: 48px;
    height: 48px;
    font-size: 24px;
  }

  .zine-reader {
    padding: 10px;
  }

  .reader-actions {
    flex-wrap: wrap;
  }

  .reader-brand {
    flex: 1 0 calc(100% - 16px);
  }

  .reader-thumbs {
    justify-content: flex-start;
  }

  .flipbook {
    grid-template-columns: 38px minmax(0, 1fr) 38px;
    gap: 5px;
  }

  .flip-nav {
    width: 38px;
    height: 56px;
  }

  .zine-shape-portrait .flip-stage {
    width: min(calc(100vw - 104px), calc((100vh - 240px) * 0.75));
  }

  .zine-shape-square .flip-stage {
    width: min(calc(100vw - 104px), calc(100vh - 240px));
  }

  .zine-shape-landscape .flip-stage {
    width: min(calc(100vw - 104px), calc((100vh - 240px) * 1.333));
  }

  .zine-reader[data-mode="scroll"] .flip-stage {
    grid-template-columns: 1fr;
  }

  .directory-hero {
    padding: 34px 18px 24px;
  }

  .directory-hero h1 {
    font-size: 38px;
  }

  .directory-grid {
    grid-template-columns: 1fr;
    padding: 20px 18px 50px;
  }
}

@media (max-width: 400px) {
  .marketing-header,
  .site-header {
    padding: 8px;
  }

  .marketing-header .brand-mark img,
  .site-header .brand-mark img {
    height: 21px;
  }

  .marketing-header nav,
  .site-header nav {
    gap: 6px;
    font-size: 11px;
    white-space: nowrap;
  }

  .header-cta {
    min-height: 32px;
    padding: 0 8px;
  }
}

@media print {
  body {
    background: #fff;
  }

  .reader-actions,
  .reader-thumbs,
  .flip-nav,
  .flip-status {
    display: none !important;
  }

  .zine-reader {
    padding: 0;
  }

  .flipbook,
  .flip-stage {
    display: block !important;
    width: 100% !important;
    aspect-ratio: auto !important;
  }

  .flip-page {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    min-height: 9in;
    margin: 0 0 0.25in;
    opacity: 1 !important;
    overflow: visible;
    box-shadow: none;
    transform: none !important;
    break-after: page;
  }

  .page-copy {
    overflow: visible;
  }
}
