/* DJ panel: MyDJSongbook look (guest.css defaults) plus dashboard cards. */
.dj-panel { --bg-image: url("../img/bg.jpg"); }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand img { border-radius: 6px; }
.dj-page { max-width: 640px; }
.dj-welcome { font-size: 1.5rem; margin: 6px 0 14px; }
.card {
  background: color-mix(in srgb, var(--panel) 88%, transparent); border-radius: 14px;
  padding: 14px 16px; margin: 0 0 14px; text-align: left;
  border: 1px solid var(--box-border);
}
.card h2 { margin: 0 0 10px; font-size: 1.05rem; text-transform: uppercase; letter-spacing: .04em; opacity: .85; }
.card p { margin: 8px 0; }
.card .actions { justify-content: flex-start; }
.card .btn { margin: 0; }
.page-link { font-size: 1.25rem; font-weight: 700; overflow-wrap: anywhere; }
.page-link a { text-decoration: none; }
.status-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.status-list li { position: relative; padding-left: 22px; }
.dot { position: absolute; left: 0; top: .45em; width: 10px; height: 10px; border-radius: 50%; background: #777; }
.dot.ok { background: #3c3; box-shadow: 0 0 6px #3c3; }
.dot.warn { background: #fc3; }
.feature-chips { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.feature-chips li {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-weight: 600; font-size: .92rem;
  border: 1px solid color-mix(in srgb, var(--fg) 25%, transparent);
}
.feature-chips li.on { background: color-mix(in srgb, #3c3 22%, transparent); border-color: #3c3; }
.feature-chips li.off { opacity: .55; text-decoration: line-through; }
.feature-chips .icon { width: 1.1em; height: 1.1em; }
.menu-button {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 18px; border: 0; background: none;
  color: var(--menu-fg); font: inherit; font-weight: 600; cursor: pointer; text-align: left;
}
.menu-button:hover { background: color-mix(in srgb, var(--menu-fg) 14%, transparent); }
.notice-ok { display: inline-block; padding: 8px 14px; border-radius: 10px; background: color-mix(in srgb, #3c3 25%, transparent); border: 1px solid #3c3; }
/* --- /setup -------------------------------------------------------------- */
.switch-row, .field-row {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; /* control level with the title, not the middle of a long note */
  padding: 10px 0; border-top: 1px solid var(--box-border); cursor: pointer;
}
.card h2 + .switch-row, .card h2 + .field-row, .card h2 + div > .switch-row:first-child { border-top: 0; }
.switch-text { display: grid; gap: 2px; font-weight: 400; }
.switch-text small { opacity: .75; }
.switch {
  appearance: none; -webkit-appearance: none; flex: none; width: 52px; height: 30px; border-radius: 999px; margin: 0;
  background: #555; position: relative; cursor: pointer; transition: background .15s;
}
.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%;
  background: #fff; transition: transform .15s; box-shadow: 0 1px 3px rgb(0 0 0 / .4);
}
.switch:checked { background: #3a3; }
.switch:checked::after { transform: translateX(22px); }
.switch:disabled { opacity: .5; cursor: not-allowed; }
.field-row select { width: auto; min-height: 40px; }
.passcode-input { width: 5.5em !important; text-align: center; letter-spacing: .15em; }
.save-bar {
  position: sticky; bottom: 0; z-index: 4; padding: 10px 0 calc(10px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(transparent, color-mix(in srgb, var(--bg) 92%, transparent) 30%); text-align: center;
}
.save-bar .btn { min-width: 220px; }
.tip-admin { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 8px; }
.tip-admin li {
  display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 12px;
  background: color-mix(in srgb, var(--fg) 7%, transparent);
}
.tip-admin-text { flex: 1; min-width: 0; display: grid; }
.tip-admin-text small { opacity: .75; overflow-wrap: anywhere; }
.tip-admin li:has(.tip-edit[open]) { flex-wrap: wrap; }
.tip-edit-form { display: none; flex-basis: 100%; margin: 4px 0 2px; }
.tip-admin li:has(.tip-edit[open]) .tip-edit-form { display: grid; }
.tip-edit summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; max-width: 100%; }
.tip-edit summary::-webkit-details-marker { display: none; }
.tip-edit summary small { min-width: 0; }
.tip-edit-icon { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; flex: none;
  background: color-mix(in srgb, var(--fg) 12%, transparent); }
.tip-edit-icon .icon { width: 14px; height: 14px; }
.tip-edit summary:hover .tip-edit-icon, .tip-edit[open] .tip-edit-icon { background: color-mix(in srgb, var(--fg) 24%, transparent); }
.tip-admin-actions { display: flex; gap: 4px; }
.tip-admin-actions form { margin: 0; }
.icon-btn.small { width: 36px; height: 36px; border: 1px solid color-mix(in srgb, var(--fg) 30%, transparent); font-size: .9rem; }
.icon-btn.small:disabled { opacity: .25; }
.icon-btn.danger { color: #ff8a80; }
.tip-add { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--box-border); }
.tip-add h3 { margin: 0; font-size: 1rem; }
/* --- /profile ------------------------------------------------------------ */
.dj-page:has(.page-text) { max-width: 1100px; }
.page-text-grid { display: grid; gap: 14px; }
@media (min-width: 900px) { .page-text-grid { grid-template-columns: 1fr 390px; align-items: start; } }
.page-text textarea { font-family: ui-monospace, Consolas, monospace; font-size: .9rem; min-height: 280px; }
.token-bar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.token-bar .chip { min-height: 34px; min-width: 0; padding: 4px 10px; font-size: .85rem; }
.button-creator { display: grid; gap: 8px; padding: 10px; margin-bottom: 8px; border-radius: 10px; background: color-mix(in srgb, var(--fg) 8%, transparent); }
.button-creator .actions { justify-content: flex-start; }
.dj-preview {
  /* The DJ's theme variables are set on this box (Theme::css('.dj-preview')). */
  color: var(--fg); background: var(--bg) var(--bg-image) center / cover; font-family: var(--font);
  border-radius: 12px; padding: 16px 12px; min-height: 200px; max-height: 640px; overflow: auto; text-align: center;
  border: 1px solid var(--box-border);
}
.dj-preview a:where(:not(.btn, .my-requests-link)) { color: var(--link); } /* buttons keep their own text color, as on the real page */
.dj-preview > .topbar { margin: -16px -12px 12px; padding-top: 0; top: -16px; /* sticky counts from inside the box's padding: cancel it */ border-radius: 12px 12px 0 0; } /* the guest page's bar, as guests see it */
.dj-preview :is(a, button, input, select, label) { pointer-events: none; } /* preview only */
.dj-photo-current { border-radius: 10px; height: auto; }
.profile-form label, #password label { margin-bottom: 10px; }
/* --- QR code popup ------------------------------------------------------ */
.qr-dialog {
  width: min(92vw, 560px); max-height: 94vh; border: 0; border-radius: 18px; padding: 20px;
  background: #fff; color: #111; text-align: center; box-shadow: 0 20px 60px rgb(0 0 0 / .6);
}
.qr-dialog::backdrop { background: rgb(0 0 0 / .7); }
.qr-dialog h2 { margin: 0 0 6px; color: #111; text-transform: none; letter-spacing: 0; opacity: 1; font-size: 1.3rem; }
.qr-image { display: block; width: min(100%, 60vh, 512px); height: auto; margin: 0 auto; image-rendering: pixelated; }
.qr-choice { border: 0; margin: 6px auto 0; padding: 0; display: inline-grid; gap: 4px; text-align: left; }
.qr-choice label { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; cursor: pointer; font-weight: 400; color: #111; padding: 4px 8px; border-radius: 8px; }
.qr-choice label:has(input:checked) { background: #eef3ff; }
.qr-choice input { width: 22px; height: 22px; margin: 0; accent-color: #235e7a; }
.qr-choice small { color: #666; }
.qr-url { font-size: 1.2rem; font-weight: 700; overflow-wrap: anywhere; }
.qr-hint { margin: 2px 0 14px; color: #555; }
.qr-dialog .qr-actions { justify-content: center; }
.qr-actions .btn { margin: 0; }
@media print {
  body.qr-printing > *:not(main), body.qr-printing main > *:not(.card), body.qr-printing .card > *:not(.qr-dialog) { display: none !important; }
  body.qr-printing, body.qr-printing main, body.qr-printing .card { background: #fff !important; border: 0 !important; padding: 0 !important; margin: 0 !important; }
  body.qr-printing::before { display: none !important; }
  body.qr-printing .qr-dialog { position: static; display: block; box-shadow: none; width: 100%; max-height: none; }
  body.qr-printing .qr-actions { display: none !important; }
  body.qr-printing .qr-image { width: 70%; }
}
.card .photo-buttons, .card .photo-form .actions { justify-content: center; }
.photo-buttons .btn { margin: 0; }


.card .photo-form { margin-inline: auto; }
.editor-action { color: inherit; }
/* Live preview: desktop only (a lot of scrolling on a phone, and too narrow to judge). */
@media (max-width: 899.98px) { .page-text-preview { display: none; } }
/* --- /designer ------------------------------------------------------------- */
.dj-page:has(.designer) { max-width: 1100px; }
.designer { display: grid; gap: 18px; }
@media (min-width: 900px) {
  .designer { grid-template-columns: 380px 1fr; align-items: start; }
  .designer-phone { position: sticky; top: 70px; }
}
@media (max-width: 899.98px) { .designer-phone { display: none; } } /* on a phone, the phone is the preview */
.phone-frame {
  width: 360px; height: 680px; margin: 0 auto; padding: 14px 12px; border-radius: 42px;
  background: #111; box-shadow: 0 0 0 2px #444, 0 12px 40px rgb(0 0 0 / .6);
}
.phone-frame iframe { width: 100%; height: 100%; border: 0; border-radius: 30px; background: #000; }
.phone-label { text-align: center; font-weight: 700; margin: 0 0 8px; }
.color-grid { display: grid; gap: 10px; }
.color-row { display: grid; grid-template-columns: 48px 1fr 108px; gap: 12px; align-items: center; }
.color-row input[type=color] { width: 48px; height: 40px; padding: 2px; border-radius: 8px; border: 1px solid #555; background: #222; cursor: pointer; }
.color-text { display: grid; line-height: 1.25; }
.color-text small { opacity: .75; }
.designer .hex-input { font-family: ui-monospace, Consolas, monospace; text-transform: uppercase; padding: 8px 10px; font-size: .95rem; width: 100%; min-width: 0; }
.color-avg { color: inherit; }
.bg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; margin-bottom: 12px; }
.bg-choice { position: relative; display: grid; gap: 4px; cursor: pointer; text-align: center; margin: 0; }
.bg-choice input { position: absolute; opacity: 0; }
.bg-swatch { height: 72px; border-radius: 10px; border: 2px solid #444; background: #222 center / cover; }
.bg-choice input:checked + .bg-swatch { border-color: #4caf50; box-shadow: 0 0 0 2px #4caf50; }
.bg-choice input:focus-visible + .bg-swatch { outline: 2px solid #fff; }
.bg-name { font-size: .8rem; overflow-wrap: anywhere; text-transform: capitalize; }
.bg-remove { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; display: grid; place-items: center;
  background: #c00; color: #fff; cursor: pointer; padding: 0; }
.bg-remove .icon { width: 14px; height: 14px; }
.bg-upload { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.bg-upload .btn { margin: 0; }
.bg-mode { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; }
.bg-mode legend { font-weight: 700; margin-bottom: 4px; }
.bg-mode label { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0; }
.bg-mode small { opacity: .75; }
.designer h3 { font-size: .95rem; margin: 6px 0 8px; }
.save-bar .btn:disabled { background: #555; border-color: #555; color: #bbb; opacity: .7; cursor: default; box-shadow: none; }
.bg-group { margin: -6px 0 8px; opacity: .85; }
.bg-divider { border: 0; border-top: 1px solid var(--box-border); margin: 4px 0 12px; }
/* --- /admin ------------------------------------------------------------------ */
.dj-page:has(.admin-list) { max-width: 900px; }
.admin-summary { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: center; margin-bottom: 12px; }
.admin-tools { display: grid; gap: 8px; margin-bottom: 12px; }
.admin-tools input { width: 100%; }
.admin-chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.admin-chips .chip { min-height: 34px; padding: 4px 14px; }
.admin-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.admin-row { border: 1px solid var(--box-border); border-radius: 12px; background: color-mix(in srgb, var(--panel) 88%, transparent); }
.admin-row-link { display: grid; grid-template-columns: 100px 1fr auto; gap: 12px; padding: 8px 10px; color: inherit; text-decoration: none; align-items: center; text-align: left; }
@media (max-width: 560px) { .admin-row-link { grid-template-columns: 70px 1fr; } .admin-when { grid-column: 1 / -1; } .admin-photo { width: 70px; } }
.admin-photo { width: 100px; aspect-ratio: 4 / 3; border-radius: 8px; background: rgb(255 255 255 / .06); overflow: hidden; }
.admin-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.admin-who { min-width: 0; overflow-wrap: anywhere; line-height: 1.35; }
.admin-when { text-align: right; line-height: 1.35; white-space: nowrap; }
@media (max-width: 560px) { .admin-when { text-align: left; white-space: normal; } }
.state-expired { border-color: #c44; background: color-mix(in srgb, #c44 22%, var(--panel)); }
.state-expiring { border-color: #e9a; background: color-mix(in srgb, #e9a 14%, var(--panel)); }
.state-pending { border-color: #88f; background: color-mix(in srgb, #88f 16%, var(--panel)); }
.state-suspended, .state-closed { opacity: .65; }
.admin-tag { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: .75rem; font-weight: 800; color: #fff; background: #777; }
.tag-expired { background: #c44; } .tag-expiring { background: #c7577a; } .tag-pending { background: #5c5cd6; } .tag-old { background: #b8860b; }
.admin-summary .tag-expired, .admin-summary .tag-expiring, .admin-summary .tag-pending, .admin-summary .tag-old { padding: 2px 10px; border-radius: 999px; color: #fff; }
.live-dot, .dot-live::before { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #3c3; vertical-align: 1px; }
.dot-live::before { content: ""; margin-right: 6px; }
.admin-head { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.admin-head img { border-radius: 10px; height: auto; }
.admin-name { font-size: 1.5rem !important; text-transform: none !important; opacity: 1 !important; }
.admin-facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0 0 12px; }
.admin-facts dt { opacity: .8; } .admin-facts dd { margin: 0; }
@media (max-width: 560px) { .admin-facts { grid-template-columns: 1fr; } .admin-facts dd { margin-bottom: 6px; } }
.admin-inline { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin: 10px 0; }
.admin-inline label { margin: 0; }
.admin-inline .btn { margin: 0; }
.admin-names, .admin-log { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; }
.admin-names li { display: flex; align-items: center; gap: 8px; }
.admin-names form { margin-left: auto; }
.view-as-bar { position: sticky; top: 0; z-index: 50; display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: center;
  padding: 8px 12px; background: #b26a00; color: #fff; text-align: center; }
.view-as-bar .btn { margin: 0; min-height: 34px; padding: 4px 14px; background: #fff; color: #111; }
.admin-head-actions { justify-content: flex-start; }
.admin-head-actions form { margin: 0; }
.admin-groups { display: flex; width: fit-content; max-width: 100%; margin: 0 auto; padding: 3px; border-radius: 999px; border: 1px solid var(--box-border);
  background: color-mix(in srgb, var(--panel) 88%, transparent); }
.admin-groups button { flex: 1 1 auto; min-width: 0; white-space: nowrap; border: 0; border-radius: 999px; padding: 8px 16px; background: none;
  color: var(--fg); font: inherit; font-weight: 700; cursor: pointer; }
@media (max-width: 560px) { .admin-groups button { white-space: normal; padding: 6px 10px; line-height: 1.2; } .admin-groups small { display: block; } }
.admin-groups button[aria-pressed="true"] { background: var(--btn-bg); color: var(--btn-fg); }
.admin-groups small { opacity: .8; font-weight: 400; }
.admin-new-trial summary { cursor: pointer; }
.trial-created { border: 2px solid #4caf50; }
.trial-pw { font-size: 1.3rem; letter-spacing: .08em; padding: 2px 8px; border-radius: 6px; background: rgb(255 255 255 / .1); }
.check-inline { display: flex; align-items: center; gap: 6px; font-weight: 400; }
.pause-form { margin: 8px 0 0; }
.switch-row.is-off .switch-text { opacity: .5; }
/* Page text "Variables…" key: a help chip and its overlay (profile.php). */
.token-bar .chip-key { background: #ffd54f; color: #222; border-color: #ffd54f; }
.vars-key { position: fixed; inset: 0; margin: auto; width: min(94vw, 760px); max-height: 88vh; overflow: auto; padding: 18px 18px 14px;
  background: #2f2f33; color: #fff; border: 2px solid #fff; border-radius: 16px; box-shadow: 0 10px 40px rgb(0 0 0 / .6); text-align: left; }
.vars-key::backdrop { background: rgb(0 0 0 / .55); }
.vars-key h2 { margin: 0 36px 4px 0; font-size: 1.15rem; }
.vars-key table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.vars-key th { text-align: left; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; opacity: .7; padding: 4px 8px; }
.vars-key td { padding: 7px 8px; vertical-align: top; border-top: 1px solid rgb(255 255 255 / .15); }
.vars-key td:first-child { white-space: nowrap; font-weight: 700; }
.vars-key td:nth-child(2) code { white-space: nowrap; color: #ffd54f; font-size: .9rem; }
.vars-key td small { line-height: 1.35; opacity: .9; }
.vars-close { position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; padding: 0; border: 1px solid rgb(255 255 255 / .5);
  border-radius: 50%; background: transparent; color: #fff; display: grid; place-items: center; cursor: pointer; }
.vars-close .icon { width: 16px; height: 16px; }
@media (max-width: 560px) { /* phones: chip and variable stacked, description underneath */
  .vars-key thead { display: none; }
  .vars-key table, .vars-key tbody { display: block; }
  .vars-key tr { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; padding: 8px 0; border-top: 1px solid rgb(255 255 255 / .15); }
  .vars-key td { border: 0; padding: 0 4px; }
  .vars-key td:nth-child(3) { grid-column: 1 / -1; }
}
.field-row.field-stack { display: grid; gap: 8px; } /* a wide select: under its label */
.vars-key td small code { color: #ffd54f; font-size: .85rem; }
/* Stripe thank-you page: roomier paragraphs; "Your page:" stands out */
.subscribe-thanks p { margin: 0 0 1em; line-height: 1.5; }
.subscribe-thanks .hl { color: #ffe97a; }
.subscribe-thanks .your-page { margin-top: 1.2em; }
.name-request-admin .wants { font-size: 1.3rem; }
#name .your-page-name { font-size: 1.05rem; }
.name-warning { border: 1px solid #f9a825; border-radius: 10px; padding: 10px 14px; margin: 0 0 12px;
  background: color-mix(in srgb, #f9a825 12%, transparent); }
.name-warning p { margin: 0 0 .5em; }
.name-warning ul { margin: 0 0 .5em; padding-left: 20px; }
.name-warning li { margin: .2em 0; }
.req-badge { display: inline-block; padding: 4px 14px; border-radius: 999px; color: #fff; }
.req-badge.is-trial { background: #b26a00; } .req-badge.is-paid { background: #2e7d32; }

/* Headings in the /profile preview look as they do on the guest page, not like card titles. */
.card .dj-preview h2 { margin: .3em 0; font-size: 1.5em; text-transform: none; letter-spacing: normal; opacity: 1; }
.subscribe-thanks h3 { margin: 1.4em 0 .4em; font-size: 1.05rem; }
.subscribe-thanks .next-steps { margin: 0 0 1em; padding-left: 1.4em; line-height: 1.5; }
.subscribe-thanks .next-steps li { margin-bottom: .5em; }
.subscribe-thanks .requires-note { padding: 8px 12px; border-left: 3px solid #ffe97a; background: rgb(255 255 255 / .05); }
