@import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@400;700;900&family=Comic+Neue:wght@400;700&family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,600&family=Fondamento:ital@0;1&family=Great+Vibes&family=IM+Fell+English+SC&family=Pirata+One&family=Tangerine:wght@400;700&family=Uncial+Antiqua&display=swap');/* Scoped Game Companion layout. Reuses the site's palette, fonts and buttons. */
.modal-backdrop.gc-backdrop { padding: 10px; }
.gc-modal.admin-promo-modal { width: min(860px,100%); max-height: 94dvh; height: auto; padding: 0; overflow: hidden; display: flex; flex-direction: column; border-color: #8d6a31; }
.gc-header { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid #6b562b; flex-shrink: 0; background: radial-gradient(ellipse at 40% 0%,#27241e,#11161a 75%); }
.gc-header > div:not(.gc-radio-host) { flex: 1; min-width: 0; }
.gc-header h2 { font-family: "CMT Olde English", Georgia, serif; font-weight: 700; font-size: clamp(24px,4.5vw,40px); line-height: 1.12; margin: 0; color: #f0d28b; }
.gc-header .icon-button { flex: 0 0 44px; height: 44px; }
.gc-logo { width: 48px; height: 48px; object-fit: contain; flex-shrink: 0; }
.gc-caption { color: #aab2b8; font-size: 12px; margin: 4px 0 0; line-height: 1.4; }
.gc-body { padding: 14px 16px; overflow: auto; min-height: 0; overscroll-behavior: contain; display: grid; gap: 10px; align-content: start; }
.gc-panel { padding: 12px; background: #10161b; border: 1px solid #45525a; border-radius: 10px; min-width: 0; }
.gc-panel h3 { margin: 0 0 10px; font: 400 21px/1.2 "Uncial Antiqua", Georgia, serif; color: #f0d28b; }
.gc-panel p { line-height: 1.45; margin: 6px 0 10px; }
.gc-panel .account-field { margin: 0 0 10px; display: grid; gap: 5px; font-size: 14px; }
.gc-panel .account-field:last-child { margin-bottom: 0; }
.gc-panel input:not([type=checkbox]):not([type=radio]):not([type=range]), .gc-panel textarea, .gc-panel select { width: 100%; min-width: 0; min-height: 44px; border: 1px solid #546372; border-radius: 8px; padding: 10px; background: #090d11; color: #eee7d8; font-size: 16px; }
.gc-panel input:focus, .gc-panel textarea:focus, .gc-panel select:focus { outline: 2px solid #d7af5a; outline-offset: 1px; }
.gc-setup { width: min(100%,520px); margin: auto; }
.gc-round { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #c9bea4; }
.gc-round strong { font: 400 23px/1.2 "IM Fell English SC", Georgia, serif; color: #f0d28b; }
.gc-status-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.gc-status-grid .gc-panel { display: grid; gap: 3px; align-content: start; }
.gc-eyebrow { font: 400 15px/1.2 "IM Fell English SC", Georgia, serif; color: #e8c575; letter-spacing: .025em; }
.gc-status-grid strong { font-size: 19px; line-height: 1.2; overflow-wrap: anywhere; }
.gc-status-grid small { color: #aab2b8; font-size: 12px; }
.gc-turn { border-color: #bc9650; background: radial-gradient(ellipse at top left,#30291a,#12171b 75%); box-shadow: inset 0 0 16px rgba(215,175,90,.06); }
.gc-judge { border-color: #8d6a31; }
.gc-layout { display: grid; grid-template-columns: minmax(0,1.18fr) minmax(0,1fr); align-items: start; gap: 10px; }
.gc-work,.gc-side { display: grid; gap: 10px; min-width: 0; }
.gc-task { border-color: #8d6a31; }
.gc-checklist { display: grid; gap: 5px; }
.gc-checklist label { display: flex; align-items: center; gap: 9px; min-height: 44px; padding: 7px 9px; border: 1px solid #34414b; border-radius: 7px; font-size: 14px; line-height: 1.3; cursor: pointer; }
.gc-checklist label.gc-checked { background: #19251e; border-color: #54705a; }
.gc-checklist input { accent-color: #d7af5a; width: 19px; height: 19px; flex-shrink: 0; margin: 0; }
.gc-score { display: grid; grid-template-columns: minmax(0,1fr) minmax(76px,110px); align-items: center; gap: 8px; margin-top: 12px; padding-top: 10px; border-top: 1px solid #6b562b; }
.gc-score label { font: 400 21px/1.2 "Uncial Antiqua", Georgia, serif; color: #f0d28b; }
.gc-score label small { display: block; font: 400 12px/1.4 Inter,system-ui,sans-serif; color: #aab2b8; margin-top: 5px; }
.gc-score input#gc-score { font-size: 32px; font-weight: 700; text-align: center; min-height: 62px; color: #ffd879; border-color: #a88a4e; }
.gc-player-heading,.gc-player { display: grid; grid-template-columns: minmax(0,1fr) 54px 62px; gap: 4px; align-items: center; }
.gc-player-heading { font-size: 12px; color: #aab2b8; padding: 0 7px 5px; }
.gc-player-heading > :not(:first-child), .gc-player-score,.gc-prizes { text-align: center; }
.gc-player { margin-top: 4px; padding: 6px 7px; min-height: 43px; background: #0b1115; border: 1px solid #34414b; border-radius: 7px; }
.gc-player-active { border-color: #d7af5a; background: #292419; }
.gc-player-judge:not(.gc-player-active) { border-color: #8d6a31; }
.gc-player-name { min-width: 0; overflow-wrap: anywhere; }
.gc-player-name strong { font-size: 14px; }
.gc-player small { display: block; font-size: 10px; color: #d7af5a; }
.gc-player-score { color: #f0d28b; font-weight: 700; font-variant-numeric: tabular-nums; font-size: 21px; line-height: 1.15; }
.gc-player-score small { color: #aab2b8; font-weight: 400; }
.gc-prizes { font-variant-numeric: tabular-nums; font-size: 14px; }
.gc-tie-buttons { display: flex; flex-wrap: wrap; gap: 6px; }
.gc-tie-buttons button { min-height: 44px; overflow-wrap: anywhere; max-width: 100%; }
.gc-chronicles summary { display: flex; align-items: center; gap: 8px; justify-content: space-between; cursor: pointer; min-height: 32px; color: #f0d28b; }
.gc-chronicles summary span { font: 400 18px/1.2 "Uncial Antiqua",Georgia,serif; }
.gc-chronicles summary span::before { content: '▸ '; font-family: system-ui; }
.gc-chronicles[open] summary span::before { content: '▾ '; }
.gc-chronicles summary small { font-size: 11px; color: #aab2b8; text-align: right; }
.gc-chronicles article { padding-top: 8px; margin-top: 8px; border-top: 1px solid #34414b; overflow-wrap: anywhere; }
.gc-chronicles article p { font-size: 13px; margin: 4px 0; }
.gc-victory { text-align: center; border-color: #bc9650; background: radial-gradient(ellipse at top,#30291a,#12171b 75%); }
.gc-victory h3 { font-size: 29px; margin-top: 8px; overflow-wrap: anywhere; }
.gc-footer { flex-shrink: 0; padding: 9px 16px max(9px,env(safe-area-inset-bottom)); border-top: 1px solid #6b562b; background: #10161b; display: grid; gap: 7px; }
.gc-main-button.primary { width: 100%; min-height: 50px; font-size: 17px; font-weight: 700; color: #f0d28b; display: flex; justify-content: center; align-items: center; gap: 10px; }
.gc-main-button span { font-size: 24px; line-height: 1; }
.gc-footer-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.gc-footer-tools .secondary { min-height: 44px; font-size: 13px; }
@media(max-width:760px) {
  .modal-backdrop.gc-backdrop { padding: 0; }
  .gc-modal.admin-promo-modal { width: 100%; height: 100dvh; max-height: 100dvh; border-radius: 0; }
  .gc-header { padding: 8px 10px; gap: 8px; }
  .gc-logo { width: 36px; height: 36px; }
  .gc-body { flex: 1; padding: 10px; gap: 8px; }
  .gc-layout { grid-template-columns: minmax(0,1fr); gap: 8px; }
  .gc-work,.gc-side { gap: 8px; }
  .gc-panel { padding: 10px; }
  .gc-footer { padding-left: 10px; padding-right: 10px; }
  .gc-checklist { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .gc-checklist label { padding: 6px; font-size: 12px; }
  .gc-score label { font-size: 18px; }
}

/* The actual radio is portaled here; its playback instance stays in App. */
.gc-header .gc-radio-host { flex: 0 0 auto; min-width: 0; }
.gc-radio-host:empty { display: none; }
.gc-radio-host .secret-radio-button { width: 44px; height: 44px; min-width: 44px; font-size: 25px; }
.gc-radio-host .secret-radio-tooltip { top: calc(100% + 9px); bottom: auto; right: 0; left: auto; max-width: min(250px,calc(100vw - 80px)); }
.gc-header { position: relative; z-index: 1; }
.gc-item-actions { display: grid; align-content: center; gap: 4px; padding: 6px 7px; border: 1px solid #34414b; border-radius: 7px; min-width: 0; }
.gc-item-actions.gc-checked { background: #19251e; border-color: #54705a; }
.gc-item-heading { display: flex; justify-content: space-between; align-items: center; gap: 4px; font-size: 14px; }
.gc-item-heading strong { color: #f0d28b; font-variant-numeric: tabular-nums; }
.gc-item-boxes { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 4px; }
.gc-checklist .gc-item-boxes label { display: flex; justify-content: center; min-height: 40px; padding: 3px; gap: 3px; font-size: 12px; }
.gc-item-boxes label.gc-item-used { background: #19251e; border-color: #54705a; }
.gc-item-boxes input { width: 16px; height: 16px; }
@media(max-width:760px) {
  .gc-header h2 { font-size: clamp(19px,5.6vw,24px); }
  .gc-header .gc-caption { font-size: 11px; }
  .gc-item-heading { font-size: 12px; }
  .gc-item-actions { padding: 5px; }
  .gc-checklist .gc-item-boxes label { gap: 2px; padding: 2px; }
}
@media(max-width:350px) {
  .gc-header { gap: 5px; }
  .gc-logo { width: 28px; height: 28px; }
  .gc-checklist .gc-item-boxes label span { display: none; }
}

.gc-connected-entry { width:100%; margin-top:8px; min-height:46px; }
.gc-saved { display:grid; width:100%; gap:5px; text-align:left; margin-bottom:7px; min-height:44px; overflow-wrap:anywhere; }
.gc-saved small { color:#aab2b8; }
.gc-sound { display:flex; gap:7px; flex-wrap:wrap; align-items:center; }
.gc-sound button { min-height:44px; }
.gc-sound .account-field { flex:1; min-width:120px; margin:0; }
.gc-notice { border-color:#bc9650; color:#f0d28b; font-weight:700; margin:0; }
.gc-invite-row { display:flex; flex-wrap:wrap; align-items:center; gap:6px; padding:7px 0; border-bottom:1px solid #34414b; }
.gc-invite-row strong { flex:1; overflow-wrap:anywhere; min-width:70px; }
.gc-invite-row button { min-height:44px; padding:6px 9px; }
.gc-score input#gc-connected-score { font-size:32px; font-weight:700; text-align:center; min-height:62px; color:#ffd879; border-color:#a88a4e; }
.gc-task > button { margin-top:7px; min-height:44px; width:100%; }
.gc-footer { width:100%; max-width:none; margin:0; }

.gc-room-code { text-align:center; border-color:#8d6a31; }
.gc-code-digits { display:block; font-size:36px; color:#f0d28b; letter-spacing:.12em; font-variant-numeric:tabular-nums; }
.gc-code-buttons { display:flex; flex-wrap:wrap; gap:8px; justify-content:center; }
.gc-code-buttons button,.gc-seat-list button { min-height:44px; }
.gc-seat-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin:10px 0; }
.gc-seat-list button { overflow-wrap:anywhere; }
.gc-seat-list .gc-selected-seat { border-color:#d7af5a; background:#292419; }
.gc-panel input.gc-code-input { font-size:30px; letter-spacing:.12em; text-align:center; }
.gc-room-code a { color:#f0d28b; overflow-wrap:anywhere; }

.gc-vibration-help { flex-basis:100%; font-size:12px; color:#aab2b8; }
.gc-sound button[aria-pressed="true"] { border-color:#a88a4e; color:#f0d28b; }
.gc-modal.admin-promo-modal { position:relative; }
.gc-role-announcement { position:absolute; inset:0; z-index:25; display:grid; place-items:center; background:rgba(5,8,10,.85); padding:14px; text-align:center; cursor:pointer; overflow:auto; animation:gc-role-fade-in .22s ease-out; }
.gc-role-announcement-content { width:min(100%,460px); display:flex; flex-direction:column; align-items:center; gap:8px; color:#f4e5bd; padding:12px 8px; background:radial-gradient(ellipse at 50% 38%,rgba(139,91,34,.35),transparent 68%); }
.gc-role-art { display:block; width:min(100%,290px); max-height:46vh; object-fit:contain; filter:drop-shadow(0 0 18px #b78b4744); }
.gc-role-announcement h2 { margin:0; color:#f0d28b; font-family:"CMT Olde English","Uncial Antiqua",Georgia,serif; font-size:clamp(28px,7.4vw,46px); line-height:1.08; text-shadow:0 2px 12px #000; }
.gc-role-announcement p { margin:0 0 4px; font:400 18px/1.3 "IM Fell English SC",Georgia,serif; }
.gc-role-announcement .primary { min-width:120px; min-height:44px; }
.gc-role-preview { color:#aab2b8; font-size:11px; letter-spacing:.08em; }
.gc-power-announcement .gc-role-announcement-content { background:radial-gradient(ellipse at 28% 35%,#286ad044,transparent 66%),radial-gradient(ellipse at 76% 38%,#e76a2444,transparent 66%); }
.gc-power-announcement .gc-role-art { filter:drop-shadow(0 0 18px #697cfb55); }
@keyframes gc-role-fade-in { from {opacity:0} to {opacity:1} }
@media(prefers-reduced-motion:reduce) { .gc-role-announcement { animation:none; } }
@media(max-height:460px) { .gc-role-art { max-height:32vh; } }

.gc-emergency { border-color:#b76c38; background:radial-gradient(ellipse at 95% 0%,#51280f44,transparent 72%),#10161b; }
.gc-emergency h3 { color:#ffcc8e; }
.gc-emergency h4 { margin:12px 0 4px; color:#f0d28b; }
.gc-emergency-scores { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:5px 10px; }
.gc-emergency button.gc-main-button { width:100%; margin:6px 0; min-height:44px; }
.gc-card-photo { display:grid; grid-template-columns:76px minmax(0,1fr); align-items:start; gap:10px; border-top:1px solid #46525a; padding:10px 0; }
.gc-card-photo img { width:76px; max-height:120px; object-fit:contain; border-radius:5px; }
.gc-card-photo button,.gc-saved-photo button { min-height:44px; }
.gc-emergency-chronicle { border-left:2px solid #b76c38; padding-left:10px; }
.gc-saved-photo { display:grid; gap:6px; margin:8px 0; }
.gc-saved-photo img { width:min(100%,220px); max-height:320px; object-fit:contain; border-radius:6px; }

.gc-emergency-interrupt { min-height:44px; border-color:#c77a40 !important; color:#ffcf9b !important; background:linear-gradient(180deg,#502b20,#2a1713) !important; font-weight:700; }

.gc-session-title { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.gc-session-title h3 { overflow-wrap:anywhere; }
.gc-session-title small { color:#c8b17e; }
.gc-session-title button { min-height:44px; flex-shrink:0; }
.gc-saved-row { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:start; gap:7px; margin-bottom:7px; }
.gc-saved-row .gc-saved { margin:0; }
.gc-delete-game { min-height:44px; color:#ffb5aa; }
.gc-cinema-modes { border:0; padding:0; margin:8px 0; display:grid; gap:6px; }
.gc-cinema-modes legend { font-weight:700; margin-bottom:8px; color:#f0d28b; }
.gc-mode-choice { display:flex; align-items:center; gap:10px; min-height:48px; border:1px solid #46525a; border-radius:6px; padding:10px; cursor:pointer; }
.gc-mode-choice input { flex:0 0 auto; }
.gc-mode-choice span { min-width:0; display:grid; gap:4px; }
.gc-mode-choice small { color:#b5c0c8; font-size:12px; }
.gc-selected-mode { border-color:#c7a56d; background:#4c392522; }
.gc-cinema { border-color:#9b8050; }
.gc-cinema h4,.gc-champion h4 { margin:10px 0 5px; color:#f0d28b; }
.gc-cinema button,.gc-card-picker button { min-height:44px; }
.gc-cinema-sources { display:flex; align-items:center; flex-wrap:wrap; gap:6px; font-size:12px; margin:8px 0; color:#b5c0c8; }
.gc-champion { border:1px solid #59616b; border-radius:7px; padding:8px; margin:8px 0; background:#191d24; }
.gc-cinema-selected { display:flex; align-items:center; gap:8px; margin:6px 0; }
.gc-cinema-selected img { width:54px; height:70px; object-fit:contain; border-radius:4px; }
.gc-cinema-selected strong { flex:1; min-width:0; overflow-wrap:anywhere; }
.gc-card-picker { margin:6px 0; }
.gc-card-picker > button { width:100%; }
.gc-card-picker-inner { border:1px solid #46525a; padding:8px; margin-top:6px; border-radius:7px; }
.gc-card-results { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; max-height:300px; overflow:auto; }
.gc-card-choice { display:grid; align-content:start; gap:5px; padding:5px; overflow-wrap:anywhere; }
.gc-card-choice img { width:100%; height:96px; object-fit:contain; }
.gc-card-choice span { white-space:normal; font-size:12px; }
.gc-cinema-chronicle { display:grid; gap:4px; border-left:2px solid #aa925d; padding-left:8px; margin:8px 0; }

/* Radio buttons are controls, not full-width text fields. Keep native sizing
   even when site-wide form rules are more specific on desktop/mobile. */
.gc-panel .gc-mode-choice input[type=radio] { appearance:auto; -webkit-appearance:radio; box-sizing:border-box; width:20px; height:20px; min-width:20px; min-height:20px; max-width:20px; max-height:20px; flex:0 0 20px; padding:0; margin:0; border:0; accent-color:#d7af5a; }
.gc-mode-choice span { flex:1; }
.gc-mode-choice { align-items:center; }
.gc-panel input[type=checkbox] { width:19px; height:19px; min-height:0; min-width:0; padding:0; margin:0; accent-color:#d7af5a; flex-shrink:0; }
.gc-tie-overlay { cursor:default; z-index:30; }
.gc-tie-content { max-width:460px; width:100%; }
.gc-rps-symbols { font-size:34px; letter-spacing:.12em; }
.gc-tie-vote,.gc-tie-adjust { width:100%; border:1px solid #79623c; border-radius:8px; background:#191c1e; padding:10px; display:grid; gap:7px; }
.gc-tie-buttons { display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:8px; }
.gc-tie-buttons button { min-height:44px; flex:1 1 auto; }
.gc-tie-buttons button[aria-pressed=true] { border-color:#d7af5a; background:#594320; color:#fff2cc; }
.gc-room-radio { border-color:#78603c; }
.gc-radio-volume { display:flex; gap:10px; align-items:center; margin:10px 0; }
.gc-radio-volume input[type=range] { width:100%; min-width:0; min-height:32px; padding:0; accent-color:#d7af5a; }

.gc-video-heading {display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;min-height:32px;padding:0;border:0;background:transparent;color:#f0d28b;text-align:left;cursor:pointer;}
.gc-video-heading span {font:400 18px/1.2 'Uncial Antiqua',Georgia,serif;}
.gc-video-heading small {font:400 11px/1.3 system-ui,sans-serif;color:#aab2b8;white-space:nowrap;}
.gc-video-content {min-width:0;}

.gc-emergency-announcement {background:rgba(25,6,7,.91);z-index:28;}
.gc-emergency-announcement .gc-role-announcement-content {background:radial-gradient(ellipse at 50% 40%,#a844203f,transparent 72%);animation:gc-emergency-quake .19s ease-in-out 14;}
.gc-emergency-announcement h2 {color:#ffc079;}
.gc-emergency-art {display:block;width:min(68%,230px);max-height:35vh;filter:drop-shadow(0 0 18px #ee74294f);}
@keyframes gc-emergency-quake {0%,100%{transform:translate(0,0)}25%{transform:translate(-3px,2px) rotate(-.5deg)}75%{transform:translate(3px,-2px) rotate(.5deg)}}
@media(prefers-reduced-motion:reduce){.gc-emergency-announcement .gc-role-announcement-content{animation:none}}

/* Live scanner: reserve room for the shutter without altering crop geometry. */
.gc-group-scan {scroll-margin-top:6px;display:grid;gap:8px;}
.gc-scan-header {display:flex;align-items:center;justify-content:space-between;gap:8px;}
.gc-scan-preview {position:relative;width:100%;margin-inline:auto;background:#101014;border-radius:8px;overflow:hidden;}
.gc-scan-controls {display:grid;gap:6px;}
.gc-scan-controls p {margin:0;line-height:1.3;font-size:13px;}
.gc-scan-capture-row {display:flex;align-items:center;justify-content:space-between;gap:8px;}
.gc-scan-capture-row label {display:flex;align-items:center;gap:7px;font-size:13px;}
.gc-scan-capture-row button {min-height:44px;min-width:104px;}
.gc-scan-help {font-size:12px;color:#adb7bf;}
.gc-scan-help summary {cursor:pointer;}

.gc-prize-announcement {background:radial-gradient(ellipse at center,#533b19ed,#100d08f5 72%);}
.gc-prize-art {display:block;max-width:min(90%,360px);max-height:55dvh;width:auto;height:auto;object-fit:contain;filter:drop-shadow(0 0 24px #e3b34b66);}
.gc-prize-fallback {font-size:110px;line-height:1.1;}


/* SIL OFL derivative: CMT Olde English (single corrected lowercase k).
   The mandatory upstream license is retained in public/fonts/. */
@font-face {
  font-family: 'CMT Olde English';
  src: url('/fonts/cmt-olde-english-k.woff2') format('woff2');
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #090b0e;
  color: #eee7d8;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: radial-gradient(circle at top, #161b20 0, #090b0e 48%, #050607 100%); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .55; cursor: wait; }
.app-shell { min-height: 100vh; }
.topbar {
  height: 62px;
  min-height: 62px;
  padding: 5px 18px;
  display:grid;
  grid-template-columns: 1fr auto 1fr;
  align-items:center;
  border-bottom:1px solid #6e5427;
  background:rgba(4,6,8,.94);
  position:sticky;
  top:0;
  z-index:20;
  overflow:visible;
}
.brand-lockup {
  height:52px;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  justify-content:center;
  position:relative;
  z-index:22;
  overflow:visible;
}
.brand-home-link { cursor:pointer; }
.brand-home-link:focus-visible { outline:2px solid #d7b15f; outline-offset:4px; border-radius:6px; }
.brand-logo {
  display:block;
  position:absolute;
  left:0;
  top:50%;
  transform:translateY(-45%);
  height:96px;
  width:auto;
  max-width:min(35vw, 405px);
  object-fit:contain;
  object-position:center;
  filter:drop-shadow(0 5px 10px rgba(0,0,0,.86));
  pointer-events:none;
}
.brand-sub {
  position:absolute;
  left:118px;
  top:22px;
  letter-spacing:.32em;
  font-size:9px;
  color:#cfc6b5;
  opacity:.82;
  white-space:nowrap;
}
.topbar nav { display: flex; gap: 28px; letter-spacing: .2em; color: #d4c8b6; font-size: 12px; }
.credit-pill { justify-self: end; border: 1px solid #c58b2c; border-radius: 10px; padding: 10px 15px; color: #ffd77a; background: #17130c; }
.layout { padding: 14px; display: grid; grid-template-columns: minmax(255px, 310px) minmax(390px, 1fr) minmax(280px, 350px); gap: 14px; max-width: 1550px; margin: 0 auto; }
.panel { border: 1px solid #3d4b57; border-radius: 9px; background: linear-gradient(180deg, rgba(20,25,30,.95), rgba(12,16,20,.96)); box-shadow: 0 12px 35px rgba(0,0,0,.25); }
.left-panel, .right-panel { padding: 16px; align-self: start; }
.preview-panel {
  min-height:760px;
  padding:15px;
  display:flex;
  flex-direction:column;
  align-items:center;
  position:sticky;
  top:72px;
  align-self:start;
}
.panel-heading, .preview-heading { font-family: Georgia, serif; text-transform: uppercase; letter-spacing: .06em; font-weight: 800; color: #eadfc8; margin: 8px 0 12px; }
.panel-heading:not(:first-child) { border-top: 1px solid #35404a; padding-top: 18px; margin-top: 18px; }
.type-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.type-button { min-height: 82px; border: 1px solid #536372; border-radius: 10px; background: #111820; color: #ede8df; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px; }
.type-button span { font-size: 26px; }.type-button.selected { border-color: #ffd35b; box-shadow: 0 0 0 2px rgba(255,211,91,.16), 0 0 18px rgba(255,183,54,.18); background: #13283b; }
.type-button small { font-size: 12px; }
.designation-wrap { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.designation { min-height: 78px; border: 1px solid #4d5966; border-radius: 12px; background: #10151b; color: #eee; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; }
.designation:last-of-type { grid-column: 1 / -1; }
.designation-orb { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #263440; border: 2px solid #b7c7d8; }
.designation b { text-transform: capitalize; }.designation small { color: #b8bdc2; font-size: 10px; text-align: center; }
.designation.selected { box-shadow: inset 0 0 0 1px currentColor, 0 0 14px rgba(255,255,255,.13); }
.designation-epic.selected, .designation-epic .designation-orb { color: #ff6b4f; border-color: #ff6b4f; }
.designation-legendary.selected, .designation-legendary .designation-orb { color: #ffd152; border-color: #ffd152; }
.designation-mythic.selected, .designation-mythic .designation-orb { color: #da74ff; border-color: #da74ff; }
.designation-cursed.selected, .designation-cursed .designation-orb { color: #ff6f82; border-color: #ff6f82; }
.fine-print { grid-column: 1 / -1; font-size: 11px; line-height: 1.4; color: #aeb5bb; margin: 2px 0; }
.row-gap { display: grid; gap: 8px; }
select, input, textarea { width: 100%; background: #0e1419; border: 1px solid #53616d; color: #f2eee6; border-radius: 7px; padding: 10px 11px; outline: none; }
input:focus, textarea:focus, select:focus { border-color: #d5a23d; box-shadow: 0 0 0 2px rgba(213,162,61,.12); }
textarea { resize: vertical; }
.secondary, .primary { border-radius: 8px; padding: 10px 14px; border: 1px solid #546372; color: #eee; background: #121a22; }
.primary { border-color: #a88a4e; background: linear-gradient(180deg,#26304b,#1b213a); }
.full { width: 100%; margin-top: 8px; }
.photo-strip { display: flex; gap: 6px; margin: 10px 0; min-height: 48px; align-items: center; overflow-x: auto; }
.photo-strip img { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; border: 1px solid #67727c; }
.muted { color: #9da5ac; font-weight: 400; }
.saved-list { display: grid; gap: 6px; }.saved-card { text-align: left; padding: 9px; background: #0f151a; color: #eee; border: 1px solid #3a4751; border-radius: 6px; display: flex; justify-content: space-between; }.saved-card small { color: #9aa4ac; text-transform: capitalize; }
.card-preview { width: min(100%, 430px); position: relative; border-radius: 18px; overflow: hidden; background: #121212; box-shadow: 0 20px 50px rgba(0,0,0,.5), 0 0 0 3px #9c7133, inset 0 0 0 8px #17100a; margin: 8px auto 18px; }
.preview-frame { position: absolute; inset: 0; z-index: 4; pointer-events: none; border: 10px double #b17d38; border-radius: 18px; box-shadow: inset 0 0 0 5px #15100a, inset 0 0 28px #000; }
.preview-header { position: absolute; top: 4.3%; left: 13%; width: 74%; height: 7.5%; display: grid; place-items: center; z-index: 5; border-radius: 50%; background: linear-gradient(#f3e4b8,#b99558); color: #21150b; font-family: Georgia, serif; font-weight: 900; letter-spacing: .06em; font-size: 16px; border: 2px solid #7d561f; }
.preview-title { position: absolute; top: 12.2%; left: 10%; width: 80%; min-height: 6%; display: grid; place-items: center; z-index: 5; color: #1f130a; background: linear-gradient(90deg, transparent, rgba(241,218,166,.97) 14%, rgba(241,218,166,.97) 86%, transparent); font-family: Georgia, serif; font-weight: 800; font-size: clamp(18px, 2.3vw, 27px); text-align: center; padding: 4px 12px; }
.preview-art { position: absolute; left: 7%; top: 18%; width: 86%; height: 56%; background: #1b2026; overflow: hidden; }
.preview-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.preview-art { container-type: inline-size; }
.card-preview .art-placeholder {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 12% 14%;
  text-align: center;
  line-height: 1.4;
  font-size: clamp(8px, 5cqw, 16px);
  white-space: normal;
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
  color: #7f8991;
  background: radial-gradient(circle,#26313a,#11171d 70%);
}
.preview-text { position: absolute; left: 12%; top: 77%; width: 76%; min-height: 14%; z-index: 5; color: #1f150c; background: rgba(239,218,171,.96); border: 2px solid #765224; border-radius: 9px; padding: 12px; font-family: Georgia, serif; font-size: 14px; line-height: 1.35; overflow: hidden; }
.character-text { display: flex; flex-direction: column; justify-content: center; gap: 9px; }
.card-character .preview-frame { border-color: #bb9146; }.card-task .preview-frame { border-color: #a33e2f; }.card-effect .preview-frame { border-color: #9e602a; }
.designation-epic .preview-frame { border-color: #d4512e; }.designation-legendary .preview-frame { border-color: #edc45a; box-shadow: inset 0 0 0 5px #2a1d08, inset 0 0 38px #b17c15; }.designation-mythic .preview-frame { border-color: #a75ad0; box-shadow: inset 0 0 0 5px #180d22, inset 0 0 42px #682a91; }.designation-cursed .preview-frame { border-color: #56304f; box-shadow: inset 0 0 0 5px #150b0d, inset 0 0 45px #260826; }
.preview-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }.message { margin-top: 10px; color: #f0c66b; font-size: 13px; text-align: center; }
.history-strip { display: flex; gap: 8px; width: 100%; max-width: 520px; overflow-x: auto; padding-top: 14px; }.history-thumb { padding: 2px; width: 70px; height: 82px; border-radius: 8px; background: #0c1115; border: 1px solid #56616b; }.history-thumb.selected { border-color: #ffd45b; box-shadow: 0 0 12px rgba(255,212,91,.3); }.history-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 5px; }
.fields { display: grid; gap: 13px; }.fields label { display: grid; gap: 7px; font-size: 13px; font-weight: 650; color: #ddd8cc; }.section-title { border-top: 1px solid #35404a; padding-top: 14px; margin-top: 2px; font-family: Georgia, serif; text-transform: uppercase; font-weight: 800; letter-spacing: .05em; }.tips { background: #101820; border: 1px solid #3d4c58; border-radius: 9px; padding: 12px; color: #c5cbd0; font-size: 12px; line-height: 1.45; }
footer { max-width: 1550px; margin: 0 auto; padding: 12px 18px 18px; color: #9f9a90; border-top: 1px solid #5c4524; display: flex; justify-content: space-between; gap: 20px; font-family: Georgia, serif; font-size: 12px; }
@media (max-width: 1100px) { .layout { grid-template-columns: 280px 1fr; }.right-panel { grid-column: 1 / -1; }.topbar nav { display:none; } }
@media (max-width: 760px) { .topbar { grid-template-columns: 1fr auto; padding:10px 12px; }.brand-logo {
  display:block;
  width:clamp(210px, 25vw, 360px);
  max-height:86px;
  object-fit:cover;
  object-position:center;
  border-radius:8px;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.7));
}.brand-sub { display:none; }.layout { grid-template-columns: 1fr; }.preview-panel { order: -1; min-height: auto; }.card-preview { width: min(88vw, 390px); }.left-panel,.right-panel { width:100%; }.credit-pill { font-size: 12px; padding: 8px 10px; } footer { flex-direction: column; } }
.topbar-right { justify-self: end; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.api-pill { border: 1px solid #62484c; border-radius: 10px; padding: 8px 10px; color: #d8a6aa; background: #1a1012; font-size: 11px; white-space: nowrap; }
.api-pill.connected { border-color: #4b6c55; color: #a8dbb4; background: #0f1812; }
.api-help { margin-top: 18px; border: 1px solid #6c5529; border-radius: 9px; background: #17140d; padding: 12px; display: grid; gap: 6px; color: #d8ccb3; font-size: 12px; line-height: 1.45; }
.api-help b { color: #f0c66b; }
.api-help code { color: #f4dc9a; }
@media (max-width: 760px) {
  .topbar-right { gap: 5px; }
  .api-pill { display: none; }
}

.reference-uploader { display: grid; gap: 8px; }
.reference-uploader:focus-visible { outline: 1px dashed #9c8250; outline-offset: 3px; border-radius: 5px; }
.reference-thumb-wrap { position: relative; width: 54px; height: 54px; flex: 0 0 auto; }
.reference-thumb-wrap img { width: 100%; height: 100%; object-fit: cover; border-radius: 7px; border: 1px solid #66583f; }
.thumb-remove { position: absolute; right: -5px; top: -5px; width: 20px; height: 20px; border-radius: 50%; border: 1px solid #8f7350; background: #21160f; color: #fff1cc; padding: 0; line-height: 16px; cursor: pointer; }
.microcopy { color: #899199; font-size: 11px; line-height: 1.35; margin-top: 4px; }
.own-artwork-upload { display: grid; gap: 3px; max-width: 250px; }
.own-artwork-upload .microcopy { text-align: left; }

/* v0.4 — credits + artwork positioning */
.buy-credit-button { border: 1px solid #d4a13d; border-radius: 10px; padding: 9px 12px; color: #171006; background: linear-gradient(180deg,#f2cb72,#c68b2e); font-weight: 800; white-space: nowrap; cursor: pointer; }
.buy-credit-button:hover { filter: brightness(1.07); }
.art-position { display: grid; gap: 12px; }
.empty-control { color: #8f989f; font-size: 12px; line-height: 1.45; border: 1px dashed #46535e; border-radius: 8px; padding: 12px; }
.position-row label { display: grid; grid-template-columns: 86px 1fr 48px; align-items: center; gap: 9px; color: #dcd7cd; font-size: 12px; }
.position-row output { color: #f0c66b; text-align: right; font-variant-numeric: tabular-nums; }
.position-row input[type="range"] { padding: 0; border: 0; background: transparent; accent-color: #d5a23d; }
.secondary.compact { width: fit-content; padding: 8px 10px; font-size: 12px; }
.modal-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.72); display: grid; place-items: center; padding: 18px; backdrop-filter: blur(4px); }
.credit-modal { width: min(620px, 100%); max-height: min(780px, 90vh); overflow: auto; border: 1px solid #8d6a31; border-radius: 12px; background: linear-gradient(180deg,#171c21,#0d1115); box-shadow: 0 25px 80px rgba(0,0,0,.6); padding: 18px; }
.modal-head { display: flex; align-items: start; justify-content: space-between; gap: 18px; margin-bottom: 14px; }
.modal-title { margin: 0 0 4px; }
.icon-button { width: 36px; height: 36px; border-radius: 50%; border: 1px solid #59636c; background: #10161b; color: #eee; font-size: 24px; line-height: 28px; cursor: pointer; }
.credit-pack-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.credit-pack { min-height: 105px; border: 1px solid #9a7438; border-radius: 10px; background: radial-gradient(circle at top,#2b271b,#11161a 70%); color: #f6e5bc; display: grid; place-content: center; gap: 7px; text-align: center; cursor: pointer; }
.credit-pack strong { font-family: Georgia, serif; font-size: 18px; color: #ffd879; }
.credit-pack span { color: #bfc4c8; font-size: 11px; }
.credit-pack:hover { border-color: #e4b75a; box-shadow: 0 0 18px rgba(225,174,72,.16); }
.dev-note { margin: 14px 0; padding: 10px 12px; border: 1px solid #5b5239; border-radius: 8px; background: #17150f; color: #c9bea4; font-size: 11px; line-height: 1.45; }
.ledger-heading { margin: 18px 0 8px; font-family: Georgia, serif; text-transform: uppercase; letter-spacing: .05em; font-weight: 800; color: #eadfc8; }
.credit-ledger { display: grid; gap: 6px; }
.ledger-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 10px; border: 1px solid #34414b; border-radius: 7px; background: #0e1419; }
.ledger-row > div { display: grid; gap: 2px; }
.ledger-row b { color: #ded9cf; font-size: 12px; }
.ledger-row small { color: #858f97; font-size: 10px; }
.credit-positive { color: #9ee0ac; font-weight: 800; }
.credit-negative { color: #eaa2a2; font-weight: 800; }
.preview-art img { transform-origin: center center; transition: transform .08s linear, object-position .08s linear; }
@media (max-width: 760px) {
  .topbar { align-items: center; }
  .topbar-right { max-width: 190px; }
  .buy-credit-button { padding: 7px 8px; font-size: 11px; }
  .credit-pack-grid { grid-template-columns: 1fr; }
  .position-row label { grid-template-columns: 76px 1fr 42px; }
}

/* v0.5 — library, autosave, undo/redo */
.nav-link { background: transparent; border: 0; color: inherit; font: inherit; padding: 0; cursor: pointer; }
.nav-link:hover, .nav-active { color: #f0c66b; }
.autosave-status { color: #9da5ac; font-size: 10px; white-space: nowrap; }
.panel-heading-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.text-button { border: 0; background: transparent; color: #d7af5a; cursor: pointer; font-size: 11px; padding: 0; }
.text-button:hover { color: #f3cf7b; text-decoration: underline; }
.edit-toolbar { display: flex; justify-content: center; gap: 7px; flex-wrap: wrap; margin: -4px 0 10px; }
.secondary:disabled, .primary:disabled { opacity: .45; cursor: not-allowed; }
.library-modal { width: min(1060px, 100%); max-height: 90vh; overflow: auto; border: 1px solid #8d6a31; border-radius: 12px; background: linear-gradient(180deg,#171c21,#0d1115); box-shadow: 0 25px 80px rgba(0,0,0,.65); padding: 18px; }
.library-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.library-card { border: 1px solid #384651; border-radius: 10px; overflow: hidden; background: #0d1318; }
.library-card.active { border-color: #d4a13d; box-shadow: 0 0 16px rgba(212,161,61,.16); }
.library-preview { width: 100%; border: 0; padding: 0; background: transparent; color: #eee; text-align: left; cursor: pointer; }
.library-no-art { width: 100%; aspect-ratio: 5 / 4; display: block; background: radial-gradient(circle,#29343d,#10161b 70%); }

/* v2.6.1 — My Cards uses the full CardPreview component.
   Never apply generic thumbnail sizing to descendant <img> elements here:
   doing so overrides both the artwork image and transparent template overlay. */
.library-full-card .card-preview {
  width:min(100%, 250px);
  margin:0 auto;
}
.library-full-card .template-overlay {
  width:100%;
  height:100%;
  object-fit:fill;
}
/* CardPreview owns artwork fit; thumbnails must never force a different crop. */
.library-full-card .preview-art img {
  width:100%;
  height:100%;
  display:block;
}
.library-no-art { display: grid; place-items: center; color: #7f8991; }
.library-card-copy { display: grid; gap: 4px; padding: 10px; }
.library-card-copy strong { font-family: Georgia, serif; color: #f0e2c7; }
.library-card-copy small { color: #9ba4ac; text-transform: capitalize; }
.library-actions { display: flex; gap: 6px; padding: 0 10px 10px; flex-wrap: wrap; }
.secondary.danger { border-color: #694145; color: #e6a7aa; }
.library-empty { border: 1px dashed #46535e; border-radius: 9px; padding: 24px; color: #929ba2; text-align: center; }
.library-guest-note {
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  color:#8e979e;
  font-size:11px;
}
.library-tools {
  display:grid;
  grid-template-columns:minmax(220px,1.7fr) minmax(130px,.75fr) minmax(145px,.8fr) minmax(120px,.7fr) auto;
  gap:8px;
  align-items:center;
  margin:14px 0;
}
.library-tools input,
.library-tools select {
  width:100%;
  min-height:38px;
  border:1px solid #485662;
  border-radius:8px;
  background:#0d1419;
  color:#ece8df;
  padding:8px 10px;
}
.library-tools input:focus,
.library-tools select:focus {
  outline:none;
  border-color:#d0a13e;
  box-shadow:0 0 0 1px rgba(208,161,62,.22);
}
.library-search { min-width:0; }
.library-result-count {
  color:#8e979e;
  font-size:11px;
  white-space:nowrap;
  text-align:right;
}
@media (max-width: 760px) {
  .autosave-status { display: none; }
  .library-tools {
    grid-template-columns:1fr 1fr;
    gap:7px;
  }
  .library-search {
    grid-column:1 / -1;
  }
  .library-result-count {
    grid-column:1 / -1;
    text-align:left;
  }
  .library-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .library-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .library-actions .secondary { width: 100%; }
  .library-actions .danger { grid-column: 1 / -1; }
}

/* v0.7 — real CMT template overlays */
.card-preview { border-radius: 0; box-shadow: 0 20px 50px rgba(0,0,0,.5); background:#090909; }
.template-region { position:absolute; }
.template-overlay { position:absolute; inset:0; width:100%; height:100%; object-fit:fill; z-index:4; pointer-events:none; }
.preview-art { z-index:1; background:#111; overflow:hidden; }
.preview-art img { width:100%; height:100%; object-fit:cover; display:block; }
.preview-title { z-index:6; min-height:0; padding:0 3%; background:none; border:0; color:#21150b; font-family:Georgia,serif; font-weight:800; font-size:clamp(15px,2vw,25px); text-align:center; display:grid; place-items:center; line-height:1.05; }
.preview-text { z-index:6; min-height:0; padding:3% 4%; background:none; border:0; border-radius:0; color:#20150d; font-family:Georgia,serif; font-size:clamp(10px,1.15vw,14px); line-height:1.25; text-align:center; display:grid; place-items:center; overflow:hidden; }
.character-value { z-index:6; color:#21150b; font-family:Georgia,serif; font-size:clamp(10px,1.15vw,14px); text-align:center; display:grid; place-items:center; overflow:hidden; }
.preview-frame,.preview-header { display:none; }

/* v0.8 — manual text placement, sizing and curvature */
.text-adjustment-controls { display:grid; gap:10px; }
.text-adjustment-controls .add-description-text-box { justify-self:start; width:auto; }
.text-field-tabs { display:flex; gap:6px; flex-wrap:wrap; }
.text-field-tabs button { border:1px solid #46535e; background:#10171c; color:#cfd6db; border-radius:999px; padding:6px 10px; cursor:pointer; font-size:12px; }
.text-field-tabs button.active { border-color:#d5a23d; color:#f4d887; box-shadow:0 0 0 1px rgba(213,162,61,.25); }
.text-adjustment-actions { display:flex; justify-content:flex-start; }
.text-adjustment-note { line-height:1.35; }
.curved-text-region { display:block !important; padding:0 !important; overflow:visible !important; }
.curved-text-region svg { width:100%; height:100%; overflow:visible; }
.curved-text-region text { fill:#21150b; font-family:Georgia,serif; font-weight:800; }
.preview-text.curved-text-region text, .character-value.curved-text-region text { font-weight:500; }

/* v1.0 text controls */
.preview-title, .preview-text { white-space: pre-wrap; }
.curved-text-region { display:flex !important; align-items:center; justify-content:center; overflow:visible !important; }
.curved-lines { width:100%; height:100%; display:flex; flex-direction:column; justify-content:center; gap:0; }
.curved-line-svg { width:100%; flex:1 1 0; min-height:20px; overflow:visible; }
.curved-line-svg text { fill:#21150b; paint-order:stroke; }
.card-effect .curved-line-svg text { fill:#21150b; }
.text-adjustment-controls select { margin-top:6px; }

/* v1.1 interface refinements */
.range-with-midpoint {
  position: relative;
  width: 100%;
  height: 28px;
  display: flex;
  align-items: center;
}
.range-with-midpoint input[type="range"] {
  position: relative;
  z-index: 2;
  margin: 0;
  background: transparent;
}
.range-midpoint {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -54%);
  z-index: 3;
  pointer-events: none;
  font-size: 20px;
  line-height: 1;
  color: #e7c26e;
  text-shadow: 0 0 4px #050505;
}
.text-field-toggle {
  width: 100%;
  border: 1px solid #b58a3f;
  border-radius: 8px;
  padding: 10px 12px;
  color: #f0e7d5;
  background: linear-gradient(180deg,#1d2831,#111820);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  text-align:left;
  margin-bottom:10px;
}
.text-field-toggle span {
  color:#e4bd61;
  font-size:11px;
  white-space:nowrap;
}
@media (max-width: 1100px) {
  .preview-panel { top: 98px; }
}
@media (max-width: 760px) {
  .preview-panel { position: static; }
  .brand-lockup { margin-top:-8px; margin-bottom:-8px; }
  .brand-logo { height:88px; max-width:58vw; }
}

/* v1.2 curvature + compact header */
.curved-text-region {
  overflow: visible !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}
.curved-lines {
  width: 100%;
  height: 100%;
  overflow: visible;
  align-items: center;
}
.curved-line-svg {
  display: block;
  width: 108%;
  height: auto;
  flex: 0 0 auto;
  overflow: visible !important;
  margin-left: -4%;
}
.template-region.preview-title {
  overflow: visible !important;
}
@media (max-width: 1100px) {
  .preview-panel { top:72px; }
}
@media (max-width: 760px) {
  .topbar { height:56px; min-height:56px; padding:4px 10px; }
  .brand-lockup { height:48px; }
  .brand-logo { height:82px; max-width:60vw; transform:translateY(-44%); }
  .brand-sub { display:none; }
  .preview-panel { position:static; }
}

@media (max-width: 760px) {
  .brand-sub {
    display:block;
    left:min(54vw, 205px);
    top:20px;
    font-size:8px;
    letter-spacing:.22em;
  }
}

/* v1.8 preview + curved multiline refinements */
.preview-heading {
  max-height: 30px;
  opacity: 1;
  overflow: hidden;
  transition: max-height .12s ease, opacity .08s ease, margin .12s ease;
}
.preview-heading.scrolled-away {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
  margin-bottom: 0;
}

.curved-lines {
  justify-content: center;
  gap: 0 !important;
  line-height: 1;
}
.curved-lines-body {
  row-gap: 0 !important;
}
.curved-line-svg {
  flex: 0 0 auto !important;
  min-height: 0 !important;
  /* Keep multiline Rainbow spacing proportional to the card itself. Fixed-pixel
     overlap made small editor previews collapse their lines into each other. */
  margin-top: -0.47cqw;
  margin-bottom: -0.47cqw;
}
.curved-lines-body .curved-line-svg {
  margin-top: -1.16cqw;
  margin-bottom: -1.16cqw;
}

/* v1.9 */
.preview-art img{transform-origin:center center;transition:transform .08s linear}.border-style-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:8px}.border-style-option{padding:5px;border:1px solid #4d5966;border-radius:8px;background:#10151b;color:#ddd;cursor:pointer}.border-style-option.selected{border-color:#ffd35b;box-shadow:0 0 0 2px rgba(255,211,91,.14)}.border-style-option img{width:100%;aspect-ratio:2.5/3.5;object-fit:contain;background:#090909;display:block}.border-style-option span{display:block;padding:5px 2px 1px;font-size:11px}.library-full-card{padding:10px;display:grid;place-items:center;background:#080b0d}.library-full-card .card-preview{width:min(100%,220px);margin:0;box-shadow:0 8px 20px rgba(0,0,0,.45);pointer-events:none}.curved-lines-body .curved-line-svg{margin-top:-2.1cqw;margin-bottom:-2.1cqw}

.border-style-note { margin-top:7px; color:#8f9aa3; font-size:10px; text-align:center; }

/* v2.1 — logo visibility + template-window alignment */
.topbar {
  overflow: visible;
}
.brand-lockup {
  overflow: visible;
}
.brand-logo {
  top: 50%;
  height: 76px;
  max-height: 76px;
  transform: translateY(-38%);
  object-fit: contain !important;
  object-position: center !important;
  overflow: visible;
}
.preview-art {
  overflow: hidden;
}
/* Artwork rectangle is deliberately slightly larger than the measured alpha window.
   The PNG overlay itself defines the exact visible shape. */
.preview-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform-origin: center center;
}
@media (max-width: 760px) {
  .brand-logo {
    height: 70px;
    max-height: 70px;
    width: auto;
    max-width: 58vw;
    top: 50%;
    transform: translateY(-38%);
    object-fit: contain !important;
  }
}

/* v2.2 pending designation charge */
.pending-credit-badge {
  display:inline-block;
  margin-top:5px;
  padding:3px 7px;
  border:1px solid rgba(255,211,91,.5);
  border-radius:999px;
  color:#ffd35b;
  font-size:10px;
  line-height:1;
}
.designation small { white-space:nowrap; }

/* v2.3 — free additional text boxes */
.section-title-row { display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; }
.extra-text-section { display:grid; gap:10px; margin:4px 0 12px; }
.extra-text-editor { display:grid; gap:6px; padding:10px; border:1px solid #303a42; border-radius:10px; background:#0e1418; }
.extra-text-editor .danger { justify-self:start; }
.preview-extra-text { z-index:7; pointer-events:none; }

/* Item artwork rectangles are intentionally a little larger than each measured
   transparent center opening. The decorative PNG overlay is the final mask. */
.card-item .preview-art { overflow:hidden; }

/* v2.4 — AI dice beside each creative text field */
.fields label { position:relative; }
.dice-button {
  margin-top:6px;
  display:inline-flex;
  align-items:center;
  gap:6px;
  width:max-content;
  border:1px solid #5c6670;
  border-radius:999px;
  background:#10171c;
  color:#f1d681;
  padding:5px 9px;
  font-size:12px;
  cursor:pointer;
}
.dice-button:hover:not(:disabled) { border-color:#d5a23d; box-shadow:0 0 0 1px rgba(213,162,61,.2); }
.dice-button:disabled { opacity:.55; cursor:wait; }
.dice-button span { color:#cbd3d8; font-size:11px; }


/* v2.5 — creativity + Community Cards */
.ai-creativity-control {
  border:1px solid #47545f;
  background:#0d1419;
  border-radius:9px;
  padding:11px;
}
.ai-creativity-control select { margin-top:4px; }

.publish-modal {
  width:min(94vw, 620px);
  max-height:90vh;
  overflow:auto;
  border:1px solid #8a6830;
  border-radius:12px;
  background:#10151a;
  padding:18px;
  box-shadow:0 24px 80px rgba(0,0,0,.65);
}
.publish-warning {
  margin:12px 0;
  border:1px solid #46535e;
  border-radius:10px;
  padding:12px;
  background:#151b21;
  color:#d7dce0;
  line-height:1.45;
}
.publish-warning strong { color:#e8d7b6; }
.publish-warning p { margin:7px 0 0; }
.publish-check {
  display:flex;
  align-items:flex-start;
  gap:10px;
  margin:12px 0;
  padding:10px;
  border:1px solid #43515d;
  border-radius:8px;
  background:#0d1318;
  color:#ddd8ce;
  line-height:1.4;
}
.publish-check input { width:auto; margin-top:3px; }
.publish-actions { display:flex; justify-content:flex-end; gap:8px; margin-top:15px; }

.community-backdrop { align-items:flex-start; padding:3vh 2vw; overflow:auto; }
.community-modal {
  width:min(1500px, 96vw);
  max-height:94vh;
  overflow:auto;
  border:1px solid #66512b;
  border-radius:12px;
  background:#0c1115;
  padding:18px;
  box-shadow:0 25px 90px rgba(0,0,0,.7);
}
.community-privacy-bar {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin:12px 0;
  padding:12px;
  border:1px solid #4d5a65;
  border-radius:10px;
  background:#111920;
}
.community-master-toggle {
  display:flex;
  align-items:center;
  gap:8px;
  white-space:nowrap;
  font-size:12px;
}
.community-master-toggle input { width:auto; }
.community-controls {
  display:grid;
  grid-template-columns:minmax(220px,1fr) 180px 180px;
  gap:9px;
  margin:14px 0 18px;
}
.community-grid {
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(260px,1fr));
  gap:14px;
}
.community-card {
  border:1px solid #394752;
  border-radius:11px;
  background:#10171c;
  padding:11px;
}
.community-card-preview .card-preview {
  width:min(100%, 250px);
  margin:0 auto 10px;
}
.community-meta { display:grid; gap:7px; }
.community-meta > strong { font-family:Georgia,serif; font-size:16px; color:#f0e2c2; }
.community-stats { display:flex; gap:12px; flex-wrap:wrap; font-size:12px; color:#c8b98f; }
.community-rating { display:flex; gap:3px; }
.community-rating button {
  border:0;
  background:transparent;
  padding:0 2px;
  color:#56616a;
  font-size:20px;
}
.community-rating button.rated { color:#e9be52; }
.community-actions { display:flex; flex-wrap:wrap; gap:6px; }
.community-backend-note {
  margin-top:18px;
  border:1px dashed #5f6b74;
  border-radius:9px;
  padding:12px;
  color:#abb4ba;
  font-size:12px;
  line-height:1.45;
}
@media (max-width:760px) {
  .community-controls { grid-template-columns:1fr; }
  .community-privacy-bar { align-items:flex-start; flex-direction:column; }
  .community-grid { grid-template-columns:1fr; }
}


/* v2.6 — Accounts / Supabase foundation */
.account-pill {
  border:1px solid #5c6670;
  border-radius:10px;
  padding:9px 11px;
  color:#ddd7cc;
  background:#10161b;
  white-space:nowrap;
}
.account-pill.connected {
  border-color:#52735a;
  color:#b9e4c1;
  background:#0d1811;
}
.account-pill:hover { filter:brightness(1.09); }

.auth-modal,
.account-modal {
  width:min(94vw, 520px);
  max-height:90vh;
  overflow:auto;
  border:1px solid #70572d;
  border-radius:12px;
  background:#10151a;
  padding:18px;
  box-shadow:0 24px 80px rgba(0,0,0,.65);
}
/* Keep the Account close button reachable for long email addresses.
   The identity column may shrink, and the email wraps at any character
   (including long domain names with no convenient whitespace). */
.account-modal .modal-head {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #10151a;
  min-width: 0;
  padding-bottom: 8px;
}
.account-modal .account-header-identity {
  flex: 1 1 auto;
  min-width: 0;
}
.account-modal .account-header-email {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: normal;
  font-size: clamp(13px, 3.25vw, 15px);
  line-height: 1.4;
}
.account-modal .modal-head > .icon-button {
  flex: 0 0 36px;
}

.auth-setup-note {
  display:grid;
  gap:5px;
  margin:12px 0;
  border:1px solid #735b2f;
  border-radius:9px;
  background:#19150d;
  color:#d8c9a8;
  padding:11px;
  font-size:12px;
  line-height:1.4;
}
.auth-setup-note strong { color:#f1c86d; }
.auth-setup-note code { color:#ffe19b; }

.auth-tabs {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:7px;
  margin:14px 0;
}
.auth-tabs button {
  border:1px solid #47545f;
  border-radius:8px;
  padding:10px;
  background:#101820;
  color:#c9d0d5;
}
.auth-tabs button.selected {
  border-color:#d1a449;
  color:#ffe1a0;
  background:#1d1a12;
}
.auth-fields { display:grid; gap:11px; }
/* Native Android date pickers can refuse to open inside the auth modal.
   The signup birthday uses keyboard-friendly MM / DD / YYYY fields instead. */
.auth-birth-entry {
  display:grid;
  gap:7px;
  min-width:0;
  margin:0;
  padding:0;
  border:0;
}
.auth-birth-entry legend {
  padding:0;
  color:#ddd8ce;
  font-size:13px;
  font-weight:650;
  margin-bottom:6px;
}
.auth-birth-parts {
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1.35fr);
  gap:10px;
}
.auth-birth-parts label { min-width:0; }
.auth-birth-parts input {
  box-sizing:border-box;
  display:block;
  width:100%;
  min-width:0;
  min-height:44px;
  padding:9px 11px;
  color:#f2ede1;
  border:1px solid #56636d;
  border-radius:8px;
  background:#0c1319;
  font-size:16px;
  font-variant-numeric:tabular-nums;
  touch-action:manipulation;
}
.auth-birth-parts input:focus {
  outline:2px solid #d1a449;
  outline-offset:1px;
}

.auth-legal-check {
  display:flex !important;
  align-items:flex-start;
  gap:9px;
  padding:10px;
  border:1px solid #46545f;
  border-radius:8px;
  background:#0d1318;
  line-height:1.4;
}
.auth-legal-check input { width:auto; margin-top:3px; }
.inline-link-button {
  border:0;
  padding:0;
  background:transparent;
  color:#e4bb63;
  text-decoration:underline;
  font:inherit;
  cursor:pointer;
}
.inline-link-button:hover { color:#ffe09b; }
.auth-fields label,
.account-field {
  display:grid;
  gap:6px;
  color:#ddd8ce;
  font-size:13px;
  font-weight:650;
}
.account-actions {
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top:14px;
}
.account-roadmap {
  display:grid;
  gap:5px;
  margin-top:16px;
  padding:11px;
  border:1px solid #46545f;
  border-radius:9px;
  background:#0d151b;
  color:#b6bec5;
  font-size:12px;
  line-height:1.45;
}
.account-roadmap strong { color:#e8d6a7; }

@media (max-width:760px) {
  .account-pill { font-size:11px; padding:8px 9px; }
}


/* v2.7 — Shopping cart */
.cart-nav-button {
  color:#f0d383 !important;
}
.cart-proof-required {
  display:grid;
  gap:8px;
  margin-top:10px;
  padding:12px;
  border:1px solid rgba(190,145,58,.6);
  border-radius:10px;
  background:rgba(190,145,58,.08);
}
.cart-proof-required strong { color:#f0d383; font-size:15px; }
.cart-proof-required span { color:#e0d8c7; font-size:13px; line-height:1.4; }
.bundle-assigned-details { margin-top:10px; border:1px solid #35424b; border-radius:9px; background:#0d1317; }
.bundle-assigned-details summary { cursor:pointer; padding:11px 12px; color:#d4cfbf; font-weight:700; }
.bundle-assigned-details[open] summary { border-bottom:1px solid #2d3941; }
.bundle-assigned-details .bundle-assigned-list { max-height:280px; overflow:auto; margin:0; padding:6px 12px; }
.cart-bundle-actions { grid-template-columns:minmax(0,1fr) auto; align-items:center; }
@media (max-width:760px) {
  .cart-bundle-actions { grid-template-columns:1fr; }
  .cart-proof-required { position:relative; box-shadow:0 0 0 1px rgba(240,211,131,.08), 0 10px 30px rgba(0,0,0,.28); }
}
.cart-backdrop {
  align-items:flex-start;
  padding:3vh 2vw;
  overflow:auto;
}
.cart-modal {
  width:min(96vw, 900px);
  max-height:94vh;
  overflow:auto;
  border:1px solid #786033;
  border-radius:12px;
  background:linear-gradient(180deg,#141a1f,#0b1014);
  padding:18px;
  box-shadow:0 25px 90px rgba(0,0,0,.72);
}
.cart-items {
  display:grid;
  gap:12px;
  margin-top:14px;
}
.cart-item {
  display:grid;
  grid-template-columns:145px minmax(0,1fr);
  gap:14px;
  align-items:start;
  border:1px solid #394750;
  border-radius:11px;
  background:#0e151a;
  padding:11px;
}
.cart-card-preview .card-preview {
  width:130px;
  margin:0 auto;
  box-shadow:0 8px 22px rgba(0,0,0,.48);
}
.cart-item-copy {
  display:grid;
  align-content:start;
  gap:7px;
  min-width:0;
}
.cart-item-copy > strong {
  font-family:Georgia,serif;
  font-size:18px;
  color:#f0e1c3;
}
.cart-origin-badge {
  justify-self:start;
  border:1px solid #66512b;
  border-radius:999px;
  padding:3px 7px;
  color:#d9ba73;
  font-size:9px;
  letter-spacing:.08em;
}
.cart-quantity {
  display:flex;
  align-items:center;
  gap:6px;
  margin-top:3px;
}
.cart-quantity input {
  width:68px;
  text-align:center;
  padding:7px 5px;
}
.cart-line-price {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  border-top:1px solid #27323a;
  padding-top:8px;
  margin-top:2px;
  color:#aeb7bd;
  font-size:12px;
}
.cart-line-price strong {
  color:#f0d383;
  font-size:14px;
}
.cart-remove {
  justify-self:start;
  color:#d89ca0;
}
.cart-summary {
  display:grid;
  gap:7px;
  margin-top:16px;
  padding:13px;
  border:1px solid #46535c;
  border-radius:10px;
  background:#0b1115;
}
.cart-summary > div {
  display:flex;
  justify-content:space-between;
  gap:16px;
  color:#afb8be;
}
.cart-summary strong { color:#e9e2d4; }
.cart-summary .cart-total {
  border-top:1px solid #46535c;
  margin-top:4px;
  padding-top:10px;
  color:#f1d47f;
  font-size:16px;
}
.cart-summary .cart-total strong { color:#f1d47f; }
.cart-price-warning {
  display:grid;
  gap:4px;
  margin-top:12px;
  padding:11px;
  border:1px solid #735b2f;
  border-radius:9px;
  background:#1a160e;
  color:#c9b98f;
  font-size:11px;
  line-height:1.4;
}
.cart-price-warning strong { color:#f0cf7b; }
.cart-checkout { margin-top:14px; }
.cart-checkout-note { margin-top:8px; line-height:1.45; }

@media (max-width:760px) {
  .cart-item { grid-template-columns:105px minmax(0,1fr); gap:10px; }
  .cart-card-preview .card-preview { width:95px; }
  .cart-item-copy > strong { font-size:15px; }
}


/* v2.7.1 — preview fidelity
   Every CardPreview is now its own sizing container. Text uses cqw units in
   CardPreview.tsx, so thumbnail typography scales in exactly the same ratio
   as the full editor preview instead of hitting fixed-pixel clamp minimums. */
.card-preview {
  container-type: inline-size;
}
.library-full-card .preview-title,
.library-full-card .preview-text,
.community-card-preview .preview-title,
.community-card-preview .preview-text,
.cart-card-preview .preview-title,
.cart-card-preview .preview-text {
  letter-spacing: inherit;
}


/* v2.8 — bundles / kits */
.bundle-backdrop { align-items:flex-start; padding:3vh 2vw; overflow:auto; }
.bundle-modal {
  width:min(1200px,96vw); max-height:94vh; overflow:auto;
  border:1px solid #735a2f; border-radius:12px;
  background:linear-gradient(180deg,#141a1f,#0b1014);
  padding:18px; box-shadow:0 25px 90px rgba(0,0,0,.72);
}
.bundle-grid {
  display:grid; grid-template-columns:repeat(auto-fit,minmax(270px,1fr));
  gap:14px; margin-top:16px;
}
.bundle-card {
  display:grid; gap:10px; align-content:start;
  border:1px solid #47535c; border-radius:12px; padding:15px;
  background:linear-gradient(180deg,#121a20,#0d1318);
}
.bundle-card h3,.bundle-cart-item h3 {
  margin:0; color:#f0dfb8; font-family:Georgia,serif;
}
.bundle-card p { margin:0; color:#aeb7bd; line-height:1.45; font-size:12px; }
.bundle-kicker { color:#d7ad54; font-size:9px; letter-spacing:.16em; font-weight:800; }
.bundle-numbers { display:grid; grid-template-columns:1fr 1fr; gap:7px; }
.bundle-numbers span {
  display:grid; gap:2px; border:1px solid #34414a; border-radius:8px;
  padding:9px; color:#aeb6bc; font-size:11px; background:#0b1115;
}
.bundle-numbers b { color:#f1d486; font-size:20px; }
.bundle-ratio {
  border:1px solid #55472c; background:#17140e; border-radius:8px;
  padding:9px; color:#c8b888; font-size:11px; line-height:1.4;
}
.bundle-card ul { margin:0; padding-left:18px; color:#aeb7bd; font-size:11px; line-height:1.55; }
.bundle-footer {
  display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:auto;
}
.bundle-footer > strong { color:#f1d47f; font-size:20px; }

.bundle-cart-list { display:grid; gap:14px; margin-top:14px; }
.bundle-cart-item {
  display:grid; gap:12px; border:1px solid #66512b; border-radius:12px;
  padding:14px; background:#10171c;
}
.bundle-cart-head { display:flex; justify-content:space-between; gap:12px; align-items:flex-start; }
.bundle-cart-head > strong { color:#f1d47f; font-size:20px; }
.bundle-allocation {
  display:grid; gap:9px; border:1px solid #394750; border-radius:9px;
  padding:11px; background:#0b1115;
}
.bundle-allocation-title { display:flex; justify-content:space-between; gap:12px; }
.allocation-ok { color:#9dd7a8; }
.allocation-warning { color:#f0b56b; }
.bundle-allocation-grid {
  display:grid; grid-template-columns:repeat(4,1fr); gap:8px;
}
.bundle-allocation-grid label { display:grid; gap:5px; font-size:11px; color:#c4cbd0; }
.bundle-allocation-grid input { width:100%; }
.bundle-allocation-grid small { color:#7f8b94; }
.bundle-fill-progress { display:grid; gap:6px; }
.bundle-fill-progress > div { display:flex; justify-content:space-between; color:#c0c8cd; font-size:12px; }
.bundle-fill-progress progress { width:100%; height:12px; }
.bundle-assigned-list {
  display:grid; gap:5px; max-height:210px; overflow:auto;
  border:1px solid #303b43; border-radius:8px; padding:7px;
}
.bundle-assigned-row {
  display:flex; justify-content:space-between; gap:10px; align-items:center;
  padding:6px 7px; border-bottom:1px solid #202a31; color:#d4d8da; font-size:11px;
}
.bundle-assigned-row:last-child { border-bottom:0; }
.bundle-assigned-row small { color:#8f9aa2; }
.bundle-fill-actions { display:flex; flex-wrap:wrap; gap:7px; }
.cart-section-title {
  margin-top:18px; padding-top:14px; border-top:1px solid #47535c;
  color:#e2c77e; font-family:Georgia,serif; font-weight:800;
}
.cart-checkout:disabled { opacity:.45; cursor:not-allowed; }

@media (max-width:760px) {
  .bundle-grid { grid-template-columns:1fr; }
  .bundle-allocation-grid { grid-template-columns:1fr 1fr; }
  .bundle-footer { align-items:flex-end; }
}


/* v2.8.3 — mobile-first navigation + sticky editor preview */
.mobile-bottom-nav { display:none; }

@media (max-width:760px) {
  html, body { scroll-padding-bottom:88px; }
  body { padding-bottom:84px; }

  /* Clean mobile header: logo left, account/credits right. */
  .topbar {
    height:68px !important;
    min-height:68px !important;
    grid-template-columns:minmax(112px, 1fr) auto !important;
    padding:5px 8px !important;
    gap:6px;
    overflow:hidden !important;
  }
  .brand-lockup {
    height:58px !important;
    min-width:0;
    margin:0 !important;
    overflow:hidden !important;
  }
  .brand-logo {
    position:static !important;
    transform:none !important;
    width:auto !important;
    height:58px !important;
    max-height:58px !important;
    max-width:132px !important;
    object-fit:contain !important;
    object-position:left center !important;
  }
  .brand-sub { display:none !important; }

  .topbar-right {
    display:grid !important;
    grid-template-columns:auto auto;
    gap:4px 5px !important;
    align-items:center;
    justify-items:end;
  }
  .account-pill,
  .credit-pill,
  .buy-credit-button {
    min-height:30px;
    border-radius:9px;
    padding:6px 8px !important;
    font-size:10px !important;
    line-height:1;
  }
  .buy-credit-button { grid-column:1 / -1; justify-self:end; }
  .autosave-status, .api-pill { display:none !important; }

  /* Permanent thumb-friendly navigation for the non-editor workflows. */
  .mobile-bottom-nav {
    position:fixed;
    left:0;
    right:0;
    bottom:0;
    z-index:45;
    box-sizing:border-box;
    height:76px;
    display:grid;
    grid-template-columns:repeat(5,1fr);
    gap:0;
    /* Android Chrome can report a zero safe-area inset while still drawing its
       edge-to-edge gesture region over the page. Keep a small guaranteed floor
       so nav labels never sit beneath the system bar. */
    padding:4px max(4px, env(safe-area-inset-left)) max(12px, env(safe-area-inset-bottom)) max(4px, env(safe-area-inset-right));
    border-top:1px solid #765a2b;
    background:rgba(7,10,13,.97);
    box-shadow:0 -8px 24px rgba(0,0,0,.5);
    backdrop-filter:blur(10px);
  }
  .mobile-bottom-nav button {
    min-width:0;
    border:0;
    border-radius:8px;
    background:transparent;
    color:#c7c8c7;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:1px;
    padding:3px 1px;
  }
  .mobile-bottom-nav button.active { color:#f0c866; background:#17140d; }
  .mobile-bottom-nav span { font-size:17px; line-height:1; }
  .mobile-bottom-nav small {
    max-width:100%;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-size:8px;
    letter-spacing:.01em;
  }

  /* Editor: keep a compact live card visible while controls scroll beneath it. */
  .layout {
    display:flex !important;
    flex-direction:column;
    gap:10px;
    padding:8px !important;
  }
  .preview-panel {
    order:-1;
    position:sticky !important;
    top:68px !important;
    z-index:16;
    min-height:0 !important;
    width:100%;
    padding:7px !important;
    display:grid !important;
    grid-template-columns:minmax(138px, 43vw) 1fr;
    grid-template-areas:
      "card toolbar"
      "card actions"
      "message message";
    align-items:start;
    gap:6px 8px;
    border-color:#73582e;
    background:rgba(12,17,21,.985);
    box-shadow:0 8px 24px rgba(0,0,0,.55);
  }
  .preview-panel > .preview-heading { display:none !important; }
  .preview-panel > .card-preview {
    grid-area:card;
    width:100% !important;
    max-width:190px !important;
    margin:0 !important;
    border-radius:9px;
  }
  .preview-panel > .edit-toolbar {
    grid-area:toolbar;
    display:grid !important;
    grid-template-columns:1fr 1fr;
    gap:4px !important;
    margin:0 !important;
    align-self:start;
  }
  .preview-panel > .edit-toolbar button {
    min-height:29px;
    padding:5px 4px !important;
    font-size:9px !important;
  }
  .preview-panel > .preview-actions {
    grid-area:actions;
    display:grid !important;
    grid-template-columns:1fr;
    gap:4px !important;
    align-self:start;
  }
  .preview-panel > .preview-actions button,
  .preview-panel > .preview-actions .own-artwork-upload {
    width:100%;
    max-width:none;
  }
  .preview-panel > .preview-actions button,
  .preview-panel > .preview-actions label {
    min-height:29px;
    padding:5px 6px !important;
    font-size:9px !important;
  }
  .preview-panel > .message {
    grid-area:message;
    margin:0 !important;
    padding:3px 5px;
    font-size:9px !important;
    text-align:left;
  }
  .preview-panel > .history-strip { display:none !important; }

  .left-panel, .right-panel {
    width:100%;
    padding:12px !important;
  }

  /* Full-screen-ish libraries are easier to browse on a phone. */
  .library-modal,
  .community-modal,
  .cart-modal,
  .bundle-modal {
    width:100vw !important;
    max-width:none !important;
    max-height:calc(100dvh - 64px) !important;
    min-height:calc(100dvh - 64px);
    margin:0 !important;
    border-radius:0 !important;
    padding:12px !important;
  }
  .modal-backdrop,
  .community-backdrop,
  .cart-backdrop,
  .bundle-backdrop {
    padding:0 !important;
    align-items:start !important;
  }

  .library-grid { grid-template-columns:repeat(2,minmax(0,1fr)) !important; gap:8px !important; }
  .library-full-card { padding:5px !important; }
  .library-full-card .card-preview { width:100% !important; max-width:145px !important; }
  .library-card-copy { padding:7px !important; }
  .library-card-copy strong { font-size:11px; }
  .library-card-copy small { font-size:9px; }
  .library-actions {
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:4px !important;
    padding:6px !important;
  }
  .library-actions button { width:100%; font-size:9px !important; padding:5px 4px !important; }

  .community-grid { grid-template-columns:repeat(2,minmax(0,1fr)) !important; gap:8px !important; }
  .community-card { padding:6px !important; }
  .community-card-preview .card-preview { width:100% !important; margin:0 auto 6px !important; }
  .community-meta { gap:4px !important; }
  .community-meta > strong { font-size:11px !important; }
  .community-meta .muted, .community-stats, .community-meta .microcopy { font-size:8px !important; }
  .community-rating button { font-size:15px !important; }
  .community-actions { display:grid !important; grid-template-columns:1fr !important; }
  .community-actions button { width:100%; font-size:9px !important; padding:5px 4px !important; }

  footer { padding-bottom:76px !important; }
}


/* v2.8.4 — mobile preview fills sticky area; actions move into scroll area */
.mobile-editor-actions { display:none; }

@media (max-width:760px) {
  /* Restore the desktop-style overhanging logo on mobile. */
  .topbar {
    overflow:visible !important;
  }
  .brand-lockup {
    overflow:visible !important;
  }
  .brand-logo {
    position:absolute !important;
    left:0 !important;
    top:50% !important;
    transform:translateY(-40%) !important;
    height:76px !important;
    max-height:76px !important;
    width:auto !important;
    max-width:46vw !important;
    object-fit:contain !important;
    overflow:visible !important;
    filter:drop-shadow(0 5px 10px rgba(0,0,0,.86)) !important;
  }

  /* Use the entire sticky editor region for the live card. */
  .preview-panel {
    display:flex !important;
    flex-direction:column !important;
    align-items:center !important;
    justify-content:center !important;
    padding:6px !important;
    min-height:0 !important;
  }
  .preview-panel > .card-preview {
    width:min(92vw, 340px) !important;
    max-width:none !important;
    margin:0 auto !important;
  }
  .preview-panel > .edit-toolbar,
  .preview-panel > .preview-actions,
  .preview-panel > .message,
  .preview-panel > .history-strip,
  .preview-panel > .preview-heading {
    display:none !important;
  }

  /* Primary creation actions now sit at the very top of the scrolling controls. */
  .mobile-editor-actions {
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:7px;
    margin-bottom:12px;
    padding-bottom:12px;
    border-bottom:1px solid #35404a;
  }
  .mobile-editor-actions > .primary,
  .mobile-editor-actions > .secondary,
  .mobile-editor-actions > .own-artwork-upload {
    width:100%;
    max-width:none;
  }
  .mobile-editor-actions > .primary {
    grid-column:1 / -1;
  }
  .mobile-editor-actions .own-artwork-upload {
    display:block;
  }
  .mobile-editor-actions .own-artwork-upload button,
  .mobile-editor-actions .own-artwork-upload label,
  .mobile-editor-actions button {
    width:100%;
  }

  /* The sticky card can be taller, so start scrolling content immediately below it. */
  .left-panel {
    margin-top:0 !important;
  }
}


/* v2.8.5 — desktop sticky preview clears the viewport more comfortably */
@media (min-width:761px) {
  .preview-panel {
    top:64px !important;
  }
}


/* v2.8.6 — viewport-aware desktop preview + tighter mobile editor */
@media (min-width:761px) {
  /* Size the main editor card against viewport HEIGHT, not just column width.
     This keeps the card, toolbar, and actions visible together on shorter laptop screens. */
  .preview-panel {
    top:58px !important;
    min-height:0 !important;
    padding-top:8px !important;
  }
  .preview-panel > .card-preview {
    width:min(430px, 50vh) !important;
    margin-top:2px !important;
    margin-bottom:10px !important;
  }
  .preview-panel > .edit-toolbar {
    margin-bottom:7px !important;
  }
  .preview-panel > .history-strip {
    padding-top:8px !important;
  }
}

@media (max-width:760px) {
  /* Halfway between the tiny v2.8.3 preview and the oversized v2.8.4 preview. */
  .preview-panel {
    padding:5px !important;
  }
  .preview-panel > .card-preview {
    width:min(70vw, 255px) !important;
    max-width:255px !important;
    margin:0 auto !important;
  }

  /* Compact 2x2 action block above Card Type. */
  .mobile-editor-actions {
    grid-template-columns:1fr 1fr !important;
    gap:5px !important;
    margin-bottom:8px !important;
    padding-bottom:8px !important;
  }
  .mobile-editor-actions > .primary {
    grid-column:auto !important;
  }
  .mobile-editor-actions button,
  .mobile-editor-actions label,
  .mobile-editor-actions .own-artwork-upload button,
  .mobile-editor-actions .own-artwork-upload label {
    min-height:32px !important;
    padding:5px 6px !important;
    font-size:10px !important;
    line-height:1.1 !important;
  }
  .mobile-editor-actions .microcopy {
    display:none !important;
  }
}


/* v2.9.1 — mobile editor ergonomics */
.mobile-saved-cards { display:none; }

@media (max-width:760px) {
  /* Saved cards belong after all editor controls on phone. */
  .saved-cards-inline { display:none !important; }
  .mobile-saved-cards {
    display:block !important;
    order:20;
    width:100%;
    padding:12px !important;
    margin-bottom:8px;
  }

  /* The middle bottom-nav action is now the primary Save control. */
  .mobile-bottom-nav .mobile-save-nav {
    position:relative;
    transform:translateY(-9px);
    min-height:62px;
    margin:0 3px;
    border:1px solid #b98a38 !important;
    border-radius:16px 16px 9px 9px !important;
    background:linear-gradient(180deg,#3d3018,#171209) !important;
    color:#f5d47a !important;
    box-shadow:0 5px 18px rgba(0,0,0,.58), inset 0 0 12px rgba(240,200,102,.10);
    z-index:2;
  }
  .mobile-bottom-nav .mobile-save-nav span {
    font-size:22px !important;
    line-height:1 !important;
  }
  .mobile-bottom-nav .mobile-save-nav small {
    font-size:9px !important;
    font-weight:800;
    letter-spacing:.03em;
  }
}


/* v2.9.2 whole-card generation */
.card-generation-actions { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:7px; }
.card-generation-actions button { min-height:38px; font-size:11px; line-height:1.2; }
@media (max-width:760px) { .card-generation-actions { grid-template-columns:1fr; } }

/* Independent New Card confirmation. Previously reused the deleted AI Item
   Analyze modal styles, making Save/Discard invisible when starting a new card.
   Keep its styling separate from any optional AI feature. */
.new-card-confirmation-backdrop.grid-editor-confirmation-backdrop { z-index:240; }
.new-card-confirmation-backdrop {
  z-index:110;
  overflow-y:auto;
  align-items:center;
  justify-items:center;
}
.new-card-confirmation-modal {
  box-sizing:border-box;
  width:min(470px,100%);
  max-height:calc(100dvh - 32px);
  overflow-y:auto;
  padding:20px;
  border:1px solid #92723c;
  border-radius:13px;
  background:linear-gradient(180deg,#1a2026,#101519);
  color:#f0ece3;
  box-shadow:0 24px 84px rgba(0,0,0,.75);
  text-align:center;
}
.new-card-confirmation-kicker {
  font-size:11px;
  font-weight:800;
  letter-spacing:.13em;
  color:#d5b87d;
}
.new-card-confirmation-modal h2 { margin:8px 0; font-family:Georgia,serif; }
.new-card-confirmation-modal p { margin:8px 0 14px; font-size:13px; color:#bac4cc; line-height:1.5; }
.new-card-confirmation-modal .new-card-choice-row button { min-height:40px; }
@media (max-width:760px) {
  .new-card-confirmation-modal { max-height:calc(100dvh - 24px); padding:17px 14px; }
}
.new-card-choice-row { display:flex; gap:10px; justify-content:center; flex-wrap:wrap; margin-top:14px; }
@media (max-width:760px) { .new-card-choice-row { flex-direction:column; } .new-card-choice-row button { width:100%; } }

/* v2.9.4 — persistent creativity + mobile control ordering */
.mobile-item-name-block,
.mobile-bottom-settings { display:none; }

@media (max-width:760px) {
  /* Reference images move out of the upper mobile control stack. */
  .desktop-reference-images { display:none !important; }

  /* Item naming follows designation immediately on phones. */
  .mobile-item-name-block {
    display:grid !important;
    gap:7px;
    margin-top:12px;
    padding-top:12px;
    border-top:1px solid #35404a;
  }
  .mobile-item-name-block label {
    display:grid;
    gap:7px;
    font-size:13px;
    font-weight:650;
    color:#ddd8cc;
  }
  .right-panel .fields .item-name-field { display:none !important; }

  /* The global creativity selector is shown only once, at the bottom on mobile. */
  .right-panel .ai-creativity-control { display:none !important; }
  .mobile-bottom-settings {
    display:block !important;
    margin-top:18px;
    padding-top:4px;
  }
  .mobile-bottom-settings .panel-heading {
    margin-top:18px;
  }
  .mobile-creativity-select {
    display:grid;
    gap:7px;
    font-size:13px;
    font-weight:650;
    color:#ddd8cc;
  }
}


/* v2.9.5 — compact desktop preview controls */
@media (min-width:761px) {
  .preview-panel > .edit-toolbar {
    gap:4px !important;
    margin:-2px 0 5px !important;
  }
  .preview-panel > .edit-toolbar button {
    min-height:26px !important;
    padding:3px 7px !important;
    font-size:10px !important;
    line-height:1.05 !important;
  }
  .preview-panel > .preview-actions {
    display:grid !important;
    grid-template-columns:1fr 1fr !important;
    gap:4px !important;
    width:100% !important;
    margin-top:0 !important;
  }
  .preview-panel > .preview-actions button,
  .preview-panel > .preview-actions label,
  .preview-panel > .preview-actions .own-artwork-upload button,
  .preview-panel > .preview-actions .own-artwork-upload label {
    min-height:28px !important;
    padding:4px 6px !important;
    font-size:9.5px !important;
    line-height:1.05 !important;
  }
  .preview-panel > .preview-actions .own-artwork-upload {
    min-width:0 !important;
  }
  .preview-panel > .message { margin-top:5px !important; font-size:11px !important; }
  .preview-panel > .history-strip { padding-top:5px !important; }
}


/* v2.9.6 — mobile item flow + saved image access */
.mobile-designation-select,
.mobile-saved-images-button,
.mobile-item-info-block { display:none; }

.saved-images-modal { width:min(900px, 94vw); max-height:88vh; overflow:auto; }
.saved-images-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(120px,1fr)); gap:10px; margin-top:14px; }
.saved-image-tile { border:1px solid #465560; border-radius:8px; background:#0d1318; color:#eee; padding:6px; display:grid; gap:5px; text-align:left; }
.saved-image-tile img { width:100%; aspect-ratio:1/1; object-fit:cover; border-radius:5px; }
.saved-image-tile span { font-size:10px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

@media (max-width:760px) {
  .designation-wrap { display:block !important; }
  .designation-wrap > .designation,
  .designation-wrap > .fine-print { display:none !important; }
  .mobile-designation-select { display:grid !important; gap:5px; font-size:12px; color:#ddd8cc; }
  .mobile-designation-select span { display:none; }
  .mobile-designation-select select { padding:8px 10px; min-height:36px; }

  .mobile-item-info-block {
    display:grid !important;
    gap:7px;
    margin-top:9px;
  }
  .mobile-item-info-block label { display:grid; gap:7px; font-size:13px; font-weight:650; color:#ddd8cc; }
  .right-panel .fields .item-info-field { display:none !important; }

  .topbar-right { position:relative; padding-bottom:29px; }
  .mobile-saved-images-button {
    display:block !important;
    position:absolute;
    right:0;
    bottom:0;
    min-height:24px;
    padding:3px 8px;
    border-radius:6px;
    border:1px solid #4e5b65;
    background:#10161b;
    color:#d8d1c5;
    font-size:9px;
    white-space:nowrap;
  }
  .saved-images-modal { width:94vw; max-height:82vh; }
  .saved-images-grid { grid-template-columns:repeat(3,1fr); gap:7px; }
}

/* v3.0 mobile account row: Saved Cards sits directly below Sign In, left of Buy Credits */
@media (max-width:760px) {
  .topbar-right {
    display:grid !important;
    grid-template-columns:auto auto !important;
    grid-template-areas:
      "api api"
      "signin signin"
      "saved buy"
      "credits credits" !important;
    gap:4px 6px !important;
    padding-bottom:0 !important;
    align-items:center !important;
  }
  .topbar-right .api-pill { grid-area:api; }
  .topbar-right .account-pill { grid-area:signin; }
  .topbar-right .mobile-saved-images-button {
    grid-area:saved;
    display:block !important;
    position:static !important;
    min-height:24px;
    padding:3px 7px;
    font-size:9px;
  }
  .topbar-right .buy-credit-button { grid-area:buy; }
  .topbar-right .credit-pill { grid-area:credits; }
  .topbar-right .autosave-status { display:none !important; }
}

/* v3.1.1 — ensure publish confirmation always sits above library/community overlays */
.publish-backdrop { z-index: 90 !important; }

.community-cloud-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 10px 0 12px;
  padding: 8px 10px;
  border: 1px solid rgba(214, 174, 74, 0.28);
  border-radius: 10px;
  background: rgba(255,255,255,0.025);
  color: var(--muted, #aaa);
  font-size: 12px;
}

@media (max-width: 760px) {
  .community-cloud-status {
    align-items: stretch;
    flex-direction: column;
  }
}

/* v3.1.4 — community result scrolling + mobile touch targets */
.community-result-count {
  margin:-8px 0 10px;
  color:#9ca7ae;
  font-size:11px;
}
.community-results-scroll {
  max-height:58vh;
  overflow-y:auto;
  overscroll-behavior:contain;
  padding-right:6px;
  -webkit-overflow-scrolling:touch;
}
.community-rating button,
.community-like-button {
  touch-action:manipulation;
}
@media (max-width:760px) {
  .community-results-scroll {
    max-height:calc(100dvh - 330px);
    min-height:220px;
  }
  .community-rating button {
    min-width:28px !important;
    min-height:34px !important;
    font-size:20px !important;
  }
  .community-like-button {
    min-height:34px !important;
  }
}

/* v3.2 — cleaner mobile account/credit cluster. Keep controls above the card instead of
   letting a third row hang over the preview. */
@media (max-width:760px) {
  .topbar {
    height:82px !important;
    min-height:82px !important;
    align-items:center !important;
  }
  .topbar-right {
    grid-template-columns:minmax(92px, auto) minmax(86px, auto) !important;
    grid-template-areas:
      "signin credits"
      "saved buy" !important;
    gap:5px 6px !important;
    align-content:center !important;
    justify-content:end !important;
  }
  .topbar-right .account-pill { grid-area:signin; }
  .topbar-right .credit-pill { grid-area:credits; position:static !important; }
  .topbar-right .mobile-saved-images-button { grid-area:saved; position:static !important; }
  .topbar-right .buy-credit-button { grid-area:buy; position:static !important; grid-column:auto !important; justify-self:stretch !important; }
  .topbar-right .api-pill,
  .topbar-right .autosave-status { display:none !important; }
  .topbar-right .account-pill,
  .topbar-right .credit-pill,
  .topbar-right .mobile-saved-images-button,
  .topbar-right .buy-credit-button {
    width:100% !important;
    min-width:0 !important;
    min-height:31px !important;
    margin:0 !important;
    padding:6px 8px !important;
    justify-content:center !important;
    text-align:center !important;
    white-space:nowrap !important;
  }
  .brand-logo { max-width:42vw !important; }
}

/* v3.2.1 manual free Item analysis */
textarea:disabled { opacity:.72; cursor:not-allowed; }

/* v3.2.2 bundle composition tracker */
.composition-tracker .composition-count{display:flex;flex-direction:column;gap:6px;padding:10px 12px;border:1px solid rgba(190,205,218,.22);border-radius:8px;background:rgba(8,14,18,.35)}
.composition-tracker .composition-count strong{font-size:1.08rem;color:#b8e2c2}
/* Special Item rarity is an advisory two-column subset of deck composition. */
.bundle-allocation-grid.item-rarity-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
.item-rarity-grid .composition-count { min-width:0; }
.item-rarity-grid .composition-count span { line-height:1.3; font-size:11px; }


/* --------------------------------------------------------------------------
   v3.3 — Deck Projects, CMT Originals, promo redemption, landing story
   -------------------------------------------------------------------------- */

/* Account promo redemption */
.account-promo-box { margin:18px 0; padding:14px; border:1px solid rgba(197,139,44,.36); border-radius:10px; background:rgba(197,139,44,.055); display:grid; gap:8px; }
.account-promo-row { display:grid; grid-template-columns:1fr auto; gap:8px; }
.account-promo-row input { min-width:0; }

/* CMT Originals */
.originals-backdrop { z-index:70; }
.originals-modal { width:min(1220px,95vw); max-height:92vh; overflow:auto; padding:18px; border:1px solid #63502a; border-radius:14px; background:linear-gradient(180deg,#12171c,#090c0f); box-shadow:0 30px 90px rgba(0,0,0,.72); }
.originals-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(190px,1fr)); gap:14px; }
.original-card { border:1px solid #35404a; border-radius:10px; background:#0d1115; overflow:hidden; padding:10px; }
.original-card-preview { max-width:180px; margin:0 auto 10px; }
.original-card-meta { display:grid; gap:3px; }
.original-card-meta span { color:#96a2aa; font-size:11px; text-transform:capitalize; }
.originals-empty { padding:32px; text-align:center; border:1px dashed #46525c; border-radius:12px; color:#aab5bc; }
.originals-empty strong { color:#eadfc8; }

/* Deck Projects modal */
.projects-backdrop { z-index:75; }
.projects-modal { width:min(1500px,97vw); height:min(940px,94vh); overflow:hidden; display:flex; flex-direction:column; padding:16px; border:1px solid #6b562b; border-radius:15px; background:linear-gradient(180deg,#12171c,#080b0e); box-shadow:0 30px 100px rgba(0,0,0,.82); }
.projects-toolbar { display:flex; flex-wrap:wrap; gap:8px; margin:8px 0 12px; }
.project-redeem-strip { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:10px 12px; border:1px solid rgba(107,136,151,.3); border-radius:10px; background:rgba(91,121,139,.07); font-size:12px; }
.project-redeem-strip > div:first-child { display:flex; flex-wrap:wrap; gap:5px; }
.project-code-entry { display:flex; gap:6px; min-width:min(360px,100%); }
.project-code-entry input { flex:1; min-width:0; text-transform:uppercase; letter-spacing:.08em; }
.projects-layout { flex:1; min-height:0; display:grid; grid-template-columns:245px 1fr; gap:14px; margin-top:12px; }
.project-list { min-height:0; overflow:auto; padding-right:4px; display:flex; flex-direction:column; gap:7px; }
.project-list-row { width:100%; text-align:left; display:grid; gap:3px; padding:11px; border:1px solid #35404a; border-radius:9px; background:#0d1115; color:#e9e1d3; }
.project-list-row:hover,.project-list-row.selected { border-color:#b58c3a; background:linear-gradient(135deg,rgba(181,140,58,.12),#0d1115); }
.project-list-row span,.project-list-row small { color:#8f9ba4; text-transform:capitalize; }
.project-workspace { min-height:0; overflow:auto; padding-right:5px; }
.projects-empty-hero { min-height:420px; display:grid; place-content:center; text-align:center; padding:40px; border:1px dashed #3c4851; border-radius:12px; color:#9daab1; }
.projects-empty-hero h3 { color:#eadfc8; font-family:Georgia,serif; font-size:28px; margin:0 0 8px; }
.project-title-row { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:12px; }
.project-title-row > div:first-child { min-width:0; flex:1 1 auto; }
.project-name-input { width:min(620px,72vw); font-family:Georgia,serif; font-size:25px; font-weight:700; color:#f3e6c7; background:transparent; border:0; border-bottom:1px solid rgba(197,139,44,.35); border-radius:0; padding:3px 0 6px; }
.project-title-actions { display:flex; flex-wrap:wrap; gap:7px; flex:0 0 auto; }

.deck-hand-preview {
  position:relative;
  width:min(100%, 760px);
  margin-top:7px;
  padding:3px 2px 0;
  overflow:hidden;
}
.deck-hand-stage {
  position:relative;
  height:118px;
  width:calc(100% - 96px);
  margin-inline:auto;
  overflow:visible;
  border-bottom:1px solid rgba(175,130,52,.18);
}
.deck-hand-card {
  position:absolute;
  bottom:7px;
  width:clamp(50px, 4.7vw, 68px);
  aspect-ratio:5 / 7;
  border-radius:4px;
  overflow:hidden;
  background:#090b0d;
  border:1px solid rgba(225,185,94,.48);
  box-shadow:0 6px 14px rgba(0,0,0,.62);
  transform-origin:50% 118%;
  transition:transform .16s ease, filter .16s ease;
}
.deck-hand-card.ready:hover {
  z-index:40 !important;
  transform:translateX(-50%) translateY(-10px) rotate(0deg) scale(1.08) !important;
  filter:brightness(1.06);
}
.deck-hand-card img {
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
}
.deck-hand-card-placeholder {
  width:100%;
  height:100%;
  display:grid;
  place-items:center;
  background:
    radial-gradient(circle at 50% 38%,rgba(181,133,46,.17),transparent 28%),
    linear-gradient(145deg,#1b1209,#080a0c 58%,#17100a);
  color:#b98a38;
  font:700 9px Georgia,serif;
  letter-spacing:.08em;
}
.deck-hand-card.loading {
  opacity:.72;
}
.deck-hand-count {
  position:absolute;
  right:4px;
  bottom:5px;
  z-index:45;
  border:1px solid rgba(182,139,61,.38);
  border-radius:999px;
  background:rgba(7,11,14,.86);
  color:#c7b17e;
  padding:3px 7px;
  font-size:9px;
  line-height:1;
  pointer-events:none;
}
.deck-hand-render-host {
  position:fixed;
  left:-12000px;
  top:0;
  width:430px;
  height:602px;
  overflow:hidden;
  opacity:1;
  pointer-events:none;
  z-index:-1;
}
.deck-hand-render-node {
  width:430px;
  height:602px;
  overflow:hidden;
  background:#000;
}
.deck-hand-render-node > .card-preview {
  width:430px !important;
  max-width:none !important;
  height:602px !important;
  margin:0 !important;
  border-radius:0 !important;
  box-shadow:none !important;
}
.deck-hand-rendered-front {
  display:block;
  width:430px;
  height:602px;
  object-fit:contain;
  background:#000;
}
.project-settings-card,.project-composition-card,.party-roster,.project-fill-card,.project-selected-cards { margin:12px 0; padding:13px; border:1px solid #33414b; border-radius:11px; background:rgba(8,13,17,.58); }
.project-settings-card { display:grid; grid-template-columns:170px 210px 210px 1fr; gap:12px; align-items:end; }
.project-smartfill-guidance { grid-column:1 / -1; display:grid; gap:6px; padding-top:10px; border-top:1px solid rgba(84,99,108,.38); }
.project-smartfill-guidance > label { color:#d9cfbd; font-size:11px; text-transform:uppercase; letter-spacing:.06em; font-weight:700; }
.project-smartfill-guidance textarea { width:100%; min-height:76px; resize:vertical; }
.project-smartfill-guidance p { margin:0; color:#c7d0d5; white-space:pre-wrap; }
.project-smartfill-guidance small { color:#7f8c94; font-size:10px; line-height:1.45; }
.project-setting { display:grid; gap:5px; }
.project-setting label { color:#d9cfbd; font-size:11px; text-transform:uppercase; letter-spacing:.06em; }
.project-setting small { color:#77838b; font-size:9px; }
.project-setting input,.project-setting select { width:100%; }
.project-check { display:flex; align-items:center; gap:8px; min-height:38px; color:#c7d0d5; font-size:12px; }
.project-check input { width:auto; }
.project-composition-card .composition-tracker { margin-top:10px; }
.party-roster-head,.project-fill-head,.project-selected-head { display:flex; justify-content:space-between; gap:10px; align-items:center; }
.party-roster-head h3,.project-fill-head h3,.project-selected-head h3 { margin:0; font-family:Georgia,serif; color:#eadfc8; }
.party-participants-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:9px; margin-top:12px; }
.party-participant { padding:10px; border:1px solid #35404a; border-radius:9px; background:#0c1115; display:grid; gap:6px; cursor:pointer; }
.party-participant.active { border-color:#c9973d; box-shadow:inset 0 0 0 1px rgba(201,151,61,.24); }
.party-participant input { width:100%; }
.party-participant label { display:grid; grid-template-columns:auto 72px; align-items:center; gap:6px; color:#98a4ab; font-size:10px; }
.participant-progress { display:flex; align-items:center; justify-content:space-between; gap:8px; font-size:11px; }
.participant-code { display:grid; gap:5px; font-size:11px; }
.participant-code code { color:#f1d087; font-size:11px; letter-spacing:.04em; }
.participant-invite-actions { display:flex; flex-wrap:wrap; gap:7px; align-items:center; }
.participant-invite-detail { color:#7f8c94; line-height:1.35; }
.participant-status { display:inline-flex; align-items:center; min-height:22px; padding:3px 7px; border:1px solid #3b464d; border-radius:999px; color:#aab4ba; font-size:9px; font-weight:800; letter-spacing:.035em; text-transform:uppercase; white-space:nowrap; }
.participant-status.sent { border-color:rgba(197,139,44,.45); color:#e4c274; background:rgba(197,139,44,.08); }
.participant-status.claimed { border-color:rgba(93,156,114,.5); color:#9ed3ad; background:rgba(72,133,93,.09); }
.party-active-note { margin-top:10px; padding:8px 10px; border-radius:7px; background:rgba(197,139,44,.08); color:#cfc4ae; font-size:11px; }
/* Flip Grid shares the browser controls but keeps them folded away, leaving
   the cards prominent. Reordering search results never remounts card tiles. */
.deck-flip-filter-disclosure {
  margin:0 0 10px;
  border:1px solid rgba(134,116,80,.42);
  border-radius:9px;
  padding:5px 10px;
  background:rgba(12,17,21,.83);
  color:#d5cbb7;
}
.deck-flip-filter-disclosure > summary {
  cursor:pointer;
  padding:5px 2px;
  font-size:12px;
  font-weight:650;
  color:#d8bc7e;
}
.deck-flip-filter-disclosure[open] > summary { margin-bottom:7px; }
.deck-flip-filter-disclosure .project-browser-controls { margin-bottom:6px; }
.deck-flip-filter-disclosure .microcopy { padding:0 2px 5px; }
.deck-flip-view-count {
  margin:0 0 9px;
  font-size:11px;
  line-height:1.35;
  color:#b9ada0;
}

.deck-flip-filter-disclosure > summary:focus-visible { outline:2px solid #d7ad58; outline-offset:3px; }
.project-bulk-disclosure { margin:0 0 10px; color:#b3bdc2; }
.project-bulk-disclosure > summary { display:inline-flex; align-items:center; padding:5px 3px; color:#adbbc1; font-size:11px; cursor:pointer; }
.project-bulk-disclosure > summary:hover,.project-bulk-disclosure > summary:focus-visible { color:#f0d28b; }
.project-bulk-actions { display:flex; flex-wrap:wrap; gap:7px; margin:8px 0 12px; }
.project-browser-controls { display:grid; grid-template-columns:minmax(210px,1fr) repeat(3,minmax(125px,160px)); align-items:center; gap:7px; margin-bottom:7px; }
.project-result-count { margin:0 0 12px; font-size:11px; color:#98a6ad; }
.project-card-type-source { color:#b9a06a; font-size:10px; font-weight:650; }
.project-load-more { display:flex; justify-content:center; padding:18px 0 8px; }
.project-load-more button { min-width:170px; }
.project-browser-controls > * { min-width:0; }
.project-source-search { width:100%; margin:0; }
.project-source-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(145px,1fr)); gap:9px; max-height:500px; overflow:auto; padding-right:4px; }
.project-source-card { min-width:0; padding:8px; border:1px solid #303b44; border-radius:8px; background:#0b0f12; display:grid; gap:5px; }
.project-source-preview { width:100%; max-width:130px; margin:auto; }
.project-source-preview-button { position:relative; display:block; padding:0; border:0; background:transparent; cursor:zoom-in; color:inherit; }
.project-source-preview-button:focus-visible { outline:2px solid #d2a64d; outline-offset:3px; border-radius:6px; }
.project-preview-hint { position:absolute; right:5px; bottom:5px; padding:3px 6px; border-radius:999px; background:rgba(3,5,7,.82); border:1px solid rgba(239,211,147,.28); color:#e8d5a8; font-size:8px; font-weight:800; letter-spacing:.04em; text-transform:uppercase; opacity:0; transform:translateY(3px); transition:opacity .15s ease,transform .15s ease; pointer-events:none; }
.project-source-preview-button:hover .project-preview-hint,.project-source-preview-button:focus-visible .project-preview-hint { opacity:1; transform:none; }
.project-source-card > strong { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.project-source-card small { min-height:28px; color:#819099; font-size:9px; }
.project-selected-list { display:grid; gap:5px; max-height:320px; overflow:auto; margin-top:10px; }
.project-selected-row { display:flex; justify-content:space-between; align-items:center; gap:10px; padding:7px 9px; border:1px solid rgba(72,87,96,.45); border-radius:7px; background:rgba(10,14,18,.55); }
.project-selected-row small { color:#87949b; text-transform:capitalize; }
.projects-message { margin-top:10px; padding:9px 11px; border:1px solid rgba(197,139,44,.3); border-radius:8px; color:#d9cba8; background:rgba(197,139,44,.06); }

.project-fill-launch { margin:12px 0; padding:14px 16px; border:1px solid rgba(197,139,44,.42); border-radius:11px; background:linear-gradient(135deg,rgba(197,139,44,.1),rgba(8,13,17,.72)); display:flex; align-items:center; justify-content:space-between; gap:14px; }
.project-fill-launch h3 { margin:0 0 3px; font-family:Georgia,serif; color:#eadfc8; }
.project-fill-screen { position:fixed; inset:0; z-index:120; width:100vw; height:100dvh; display:flex; flex-direction:column; overflow:hidden; background:linear-gradient(180deg,#12171c 0%,#080b0e 100%); color:#eee7d8; }
.project-fill-screen-head { flex:0 0 auto; display:flex; align-items:center; justify-content:space-between; gap:18px; padding:14px clamp(14px,2.5vw,34px); border-bottom:1px solid #584827; background:rgba(10,14,17,.97); box-shadow:0 8px 24px rgba(0,0,0,.32); }
.project-fill-screen-head > div:first-child { min-width:0; }
.project-fill-screen-head h2 { margin:2px 0; font-family:Georgia,serif; color:#f0dfb8; font-size:clamp(22px,3vw,32px); }
.project-fill-screen-kicker { display:block; color:#c69a48; font-size:10px; font-weight:800; letter-spacing:.09em; text-transform:uppercase; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.project-fill-screen-actions { display:flex; gap:8px; align-items:center; flex:0 0 auto; }
.project-clear-selection,.project-clear-all { color:#8f999f; font-size:10px; opacity:.78; }
.project-clear-selection:hover,.project-clear-all:hover { color:#d8c8aa; opacity:1; }
.project-fill-screen-body { flex:1; min-height:0; overflow:auto; width:min(1600px,100%); margin:0 auto; padding:14px clamp(12px,2.5vw,34px) 40px; }
.project-fill-screen .project-source-grid { max-height:none; overflow:visible; grid-template-columns:repeat(auto-fill,minmax(155px,1fr)); }
.project-fill-participant-banner { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:10px; padding:10px 12px; border:1px solid rgba(197,139,44,.28); border-radius:9px; background:rgba(197,139,44,.07); color:#cfc4ae; }
.project-fill-participant-banner > div { display:grid; gap:2px; }
.project-fill-participant-banner strong { color:#f0d28b; }
.project-fill-participant-banner span { font-size:10px; }

.project-card-inspector-backdrop { position:fixed; inset:0; z-index:145; display:grid; place-items:center; padding:18px; background:rgba(0,0,0,.82); backdrop-filter:blur(5px); }
.project-card-inspector { width:min(540px,96vw); max-height:96dvh; overflow:auto; padding:14px; border:1px solid #6b562b; border-radius:14px; background:linear-gradient(180deg,#141a1f,#090c0f); box-shadow:0 30px 100px rgba(0,0,0,.9); }
.project-card-inspector-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:10px; }
.project-card-inspector-head > div { display:grid; gap:2px; min-width:0; }
.project-card-inspector-head strong { color:#f0dfb8; font-family:Georgia,serif; font-size:18px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.project-card-inspector-head span { color:#86939a; font-size:9px; letter-spacing:.08em; text-transform:uppercase; }
.project-card-inspector-preview { width:min(420px,86vw); margin:0 auto; }
.project-card-inspector-preview .card-preview,.project-card-inspector-preview .flattened-card-front { display:block; width:100% !important; max-width:100% !important; height:auto !important; margin:0 auto !important; }
.project-card-inspector-actions { display:flex; align-items:center; justify-content:center; gap:10px; margin-top:12px; }

/* Community enlarged-card browser — reuses the Deck Builder inspector shell. */
.community-card-preview-button { cursor:zoom-in; border-radius:9px; outline:none; transition:transform .14s ease, box-shadow .14s ease; }
.community-card-preview-button:hover { transform:translateY(-1px); box-shadow:0 8px 26px rgba(0,0,0,.28); }
.community-card-preview-button:focus-visible { box-shadow:0 0 0 2px #d2a54b; }
.community-card-preview-button .flattened-card-front { display:block; width:min(100%,250px); height:auto; margin:0 auto 10px; }

.community-card-zoom-backdrop { z-index:210; }
.community-card-zoom { width:min(680px,98vw); max-height:97dvh; }
.community-card-zoom-head span { text-transform:none; letter-spacing:.03em; }
.community-card-zoom-stage { position:relative; display:grid; place-items:center; min-height:0; touch-action:pan-y; }
.community-card-zoom-preview { width:min(460px,86vw); }
.community-card-zoom-preview .card-preview,
.community-card-zoom-preview .flattened-card-front { display:block; width:100% !important; max-width:100% !important; height:auto !important; margin:0 auto !important; }
.community-card-zoom-nav {
  position:static;
  width:48px;
  height:64px;
  border:1px solid rgba(206,164,80,.52);
  border-radius:14px;
  background:rgba(9,12,15,.84);
  color:#f0d28b;
  font-size:42px;
  line-height:1;
  box-shadow:0 8px 28px rgba(0,0,0,.42);
}
.community-card-zoom-nav:hover:not(:disabled) { background:#17150e; border-color:#d3a850; }
.community-card-zoom-nav:disabled { opacity:.18; cursor:default; }
.community-card-zoom-social {
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  align-items:center;
  gap:12px;
  margin-top:12px;
  padding-top:10px;
  border-top:1px solid #303a40;
}
.community-card-zoom-social-main { display:grid; justify-items:center; gap:8px; min-width:0; }
.community-card-zoom-social .community-stats { justify-content:center; }
.community-card-zoom-rating button { font-size:28px; padding:0 4px; }
.community-card-zoom-help { text-align:center; color:#87949b; }

@media (max-width:760px) {
  .community-card-zoom-backdrop { padding:0; }
  .community-card-zoom {
    width:100vw;
    height:100dvh;
    max-height:none;
    border-radius:0;
    padding:10px 10px 14px;
    display:flex;
    flex-direction:column;
  }
  .community-card-zoom-head { margin-bottom:6px; }
  .community-card-zoom-stage { flex:1 1 auto; min-height:0; }
  .community-card-zoom-preview { width:min(86vw,430px); max-height:calc(100dvh - 205px); }
  .community-card-zoom-preview .card-preview,
  .community-card-zoom-preview .flattened-card-front { max-height:calc(100dvh - 205px) !important; object-fit:contain; }
  .community-card-zoom-social { grid-template-columns:42px minmax(0,1fr) 42px; flex:0 0 auto; margin-top:7px; padding-top:7px; gap:8px; }
  .community-card-zoom-nav { width:42px; height:58px; font-size:36px; background:rgba(6,9,11,.78); }
  .community-card-zoom-rating button { font-size:26px; }
  .community-card-zoom-help { font-size:10px; }
}


/* Admin promo-code generator */
.admin-promo-backdrop { z-index:220; }
.admin-promo-modal { width:min(860px,96vw); max-height:92dvh; overflow:auto; padding:18px; border:1px solid #6b562b; border-radius:16px; background:linear-gradient(180deg,#141a1f,#090c0f); box-shadow:0 30px 100px rgba(0,0,0,.9); }
.admin-promo-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin:16px 0 12px; }
.admin-promo-grid label { display:grid; gap:6px; color:#bfc7cb; font-size:11px; font-weight:700; letter-spacing:.04em; text-transform:uppercase; }
.admin-promo-grid input { min-width:0; width:100%; min-height:42px; padding:8px 10px; border:1px solid #45525a; border-radius:9px; background:#080b0d; color:#eee7d8; font:inherit; text-transform:none; }
.admin-promo-grid input:focus { border-color:#c79845; outline:none; box-shadow:0 0 0 2px rgba(199,152,69,.12); }
.admin-promo-grid .admin-promo-description { grid-column:1 / -1; }
.admin-promo-note { margin:0 0 14px; padding:10px 12px; border:1px solid #39464e; border-radius:9px; background:#0b0f12; color:#95a1a7; font-size:12px; line-height:1.45; }
.admin-promo-generated,.admin-promo-recent { margin-top:18px; padding-top:16px; border-top:1px solid #303a40; }
.admin-promo-section-head { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:10px; }
.admin-promo-code-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.admin-promo-code { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:11px 12px; border:1px solid #536069; border-radius:9px; background:#0a0e11; color:#f0d28b; text-align:left; }
.admin-promo-code b { font-family:monospace; font-size:14px; letter-spacing:.05em; }
.admin-promo-code span { color:#9ca8ae; font-size:11px; white-space:nowrap; }
.admin-promo-row { display:grid; grid-template-columns:minmax(180px,.7fr) minmax(0,1.5fr) auto; align-items:center; gap:12px; padding:10px 0; border-top:1px solid #253038; }
.admin-promo-row:first-of-type { border-top:0; }
.admin-promo-row > div { display:grid; gap:3px; min-width:0; }
.admin-promo-row > div b { color:#e5dbc8; }
.admin-promo-row > div small { color:#7f8b91; overflow-wrap:anywhere; }
.admin-promo-copy { justify-self:start; font-family:monospace; color:#e5c675; letter-spacing:.04em; }

@media (max-width:760px){
  .admin-promo-modal { width:100vw; height:100dvh; max-height:none; border-radius:0; padding:14px; }
  .admin-promo-grid { grid-template-columns:1fr 1fr; }
  .admin-promo-grid .admin-promo-description { grid-column:1 / -1; }
  .admin-promo-code-list { grid-template-columns:1fr; }
  .admin-promo-row { grid-template-columns:1fr auto; gap:5px 10px; }
  .admin-promo-row > div { grid-column:1 / -1; grid-row:2; }
}

/* Landing / scrollytelling home */
.landing-page { position:fixed; inset:0; z-index:180; overflow-y:auto; overflow-x:hidden; background:#07090b; color:#eee7d8; scroll-behavior:smooth; }
.landing-nav { position:sticky; top:0; z-index:10; height:72px; display:flex; justify-content:space-between; align-items:center; padding:8px clamp(18px,4vw,70px); background:linear-gradient(180deg,rgba(5,7,9,.96),rgba(5,7,9,.76)); border-bottom:1px solid rgba(197,139,44,.25); backdrop-filter:blur(12px); }
.landing-brand { border:0; background:transparent; padding:0; display:flex; align-items:center; height:100%; overflow:visible; }
.landing-brand img { width:min(320px,46vw); max-height:64px; object-fit:contain; object-position:left center; filter:drop-shadow(0 6px 14px #000); display:block; }
.landing-nav nav { display:flex; gap:9px; align-items:center; }
.landing-nav nav button { border:0; background:transparent; color:#c9c1b1; padding:9px 12px; letter-spacing:.08em; font-size:11px; text-transform:uppercase; }
.landing-nav nav button:hover { color:#fff0bd; }
.landing-nav .landing-nav-cta { border:1px solid #bd8b39; border-radius:999px; color:#f6d98f; background:rgba(189,139,57,.08); }
.landing-nav .landing-cart-button { border:1px solid rgba(189,139,57,.55); border-radius:999px; color:#f0d383; background:rgba(189,139,57,.05); }
.landing-kicker { color:#c99b47; letter-spacing:.23em; font-size:11px; font-weight:800; text-transform:uppercase; }
.landing-primary,.landing-secondary { min-height:46px; padding:0 20px; border-radius:999px; text-transform:uppercase; letter-spacing:.09em; font-size:11px; font-weight:800; }
.landing-primary { border:1px solid #d7a64c; color:#171006; background:linear-gradient(180deg,#f0cf7a,#c99237); box-shadow:0 8px 30px rgba(196,141,45,.18); }
.landing-secondary { border:1px solid #69757d; color:#e7e0d4; background:rgba(255,255,255,.025); }
.landing-hero { min-height:calc(100vh - 72px); position:relative; display:grid; grid-template-columns:minmax(360px,.9fr) minmax(420px,1.1fr); align-items:center; gap:20px; padding:60px clamp(25px,7vw,120px) 80px; overflow:hidden; background:radial-gradient(circle at 72% 37%,rgba(120,66,137,.18),transparent 32%),radial-gradient(circle at 24% 25%,rgba(191,137,51,.11),transparent 30%),linear-gradient(180deg,#0a0d10,#060709); }
.landing-hero-copy { position:relative; z-index:3; max-width:690px; }
.landing-hero h1 { margin:15px 0 20px; font-family:Georgia,serif; font-size:clamp(55px,7vw,112px); line-height:.88; letter-spacing:-.045em; font-weight:700; }
.landing-hero h1 em { font-style:italic; color:#e3bd65; }
.landing-hero p { max-width:600px; color:#aeb6ba; font-size:clamp(16px,1.45vw,22px); line-height:1.5; }
.landing-hero-actions { display:flex; gap:10px; margin-top:28px; }
.landing-card-stage { position:relative; height:min(72vh,760px); min-height:520px; transform:translateY(calc(var(--landing-progress) * -55px)); transition:transform .08s linear; }
.landing-float-card,.landing-back-card { position:absolute; width:clamp(170px,17vw,270px); filter:drop-shadow(0 24px 25px rgba(0,0,0,.62)); transition:transform .08s linear; }
.landing-float-card .card-preview,.landing-float-card > div { max-width:100%; }
/* Only the four cards are interactive; the large transparent stage should
   never swallow clicks on homepage text, links, or call-to-action buttons. */
.landing-card-stage { pointer-events:none; }
.landing-float-card {
  pointer-events:auto;
  display:block;
  margin:0;
  padding:0;
  border:0;
  background:transparent;
  color:inherit;
  font:inherit;
  text-align:inherit;
  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
  touch-action:manipulation;
}
.landing-float-card:focus-visible {
  outline:3px solid #e3bd65;
  outline-offset:5px;
  border-radius:10px;
}
.landing-float-card:active .landing-flip-shell { filter:brightness(1.06); }
.landing-float-1 { left:31%; top:3%; transform:rotate(-8deg) translateY(calc(var(--landing-progress) * -90px)); }
.landing-float-2 { left:4%; top:25%; transform:rotate(-16deg) translateX(calc(var(--landing-progress) * -70px)); }
.landing-float-3 { right:0; top:27%; transform:rotate(13deg) translateX(calc(var(--landing-progress) * 90px)); }
.landing-float-4 { left:32%; bottom:0; transform:rotate(5deg) translateY(calc(var(--landing-progress) * 85px)); }
.landing-float-5 { right:21%; top:6%; transform:rotate(18deg) scale(.78); opacity:.68; }
/* Four independent card faces rotate within the existing floating layout.
   Preserve the front's intrinsic height; the physical CMT back fits behind it. */
.landing-flip-shell { position:relative; width:100%; perspective:1050px; }
.landing-flip-inner {
  position:relative;
  width:100%;
  transform-style:preserve-3d;
  transition:transform .44s cubic-bezier(.24,.72,.32,1);
  will-change:transform;
}
.landing-flip-shell.is-back .landing-flip-inner { transform:rotateY(180deg); }
.landing-flip-front,.landing-flip-reverse {
  width:100%;
  backface-visibility:hidden;
  -webkit-backface-visibility:hidden;
}
.landing-flip-front { position:relative; }
/* True two-face buffering: the next card's complete preview (including its
   signed artwork URL and fonts) is mounted and decoded BEFORE a click. Only
   toggle which layer is visible while the shared outer card is face-down. */
.landing-front-layer { width:100%; }
.landing-front-layer:not(.is-active) {
  position:absolute;
  inset:0;
  visibility:hidden;
  pointer-events:none;
}
.landing-front-layer.is-active { position:relative; visibility:visible; }
.landing-flip-reverse { position:absolute; inset:0; transform:rotateY(180deg); border-radius:10px; overflow:hidden; }
.landing-flip-reverse img { display:block; width:100%; height:100%; object-fit:fill; }
@media (prefers-reduced-motion: reduce) {
  .landing-flip-inner { transition:none; }
}
.landing-back-card { border-radius:8px; }
.landing-back-1 { left:30%; top:8%; transform:rotate(-9deg); }
.landing-back-2 { left:7%; top:33%; transform:rotate(-18deg); }
.landing-back-3 { right:5%; top:25%; transform:rotate(13deg); }
.landing-scroll-cue { position:absolute; bottom:20px; left:50%; transform:translateX(-50%); color:#747e84; letter-spacing:.22em; font-size:9px; }
.landing-story { min-height:150vh; display:grid; grid-template-columns:.8fr 1.2fr; gap:70px; padding:110px clamp(24px,7vw,120px); background:linear-gradient(180deg,#090b0d,#0d1115 55%,#080a0c); }
.landing-sticky-copy { position:sticky; top:160px; height:max-content; }
.landing-sticky-copy h2,.landing-build h2,.landing-party h2,.landing-community-section h2,.landing-products h2,.landing-final-cta h2 { font-family:Georgia,serif; font-size:clamp(38px,4.6vw,70px); line-height:1.02; margin:13px 0 18px; letter-spacing:-.03em; }
.landing-sticky-copy p,.landing-build-copy p,.landing-party-copy p,.landing-community-copy p { color:#a6b0b5; font-size:18px; line-height:1.55; max-width:650px; }
.landing-rule-cards { display:grid; gap:34px; }
.landing-rule-cards article { min-height:260px; padding:34px; border:1px solid #33404a; border-radius:20px; background:linear-gradient(145deg,rgba(23,30,36,.88),rgba(8,11,14,.95)); display:grid; align-content:center; box-shadow:0 18px 50px rgba(0,0,0,.23); transform:translateX(calc((var(--landing-progress, 0)) * -8px)); }
.landing-rule-cards article:nth-child(even){ transform:translateX(36px); }
.landing-rule-cards article > span { color:#c58b2c; font-size:12px; letter-spacing:.2em; }
.landing-rule-cards h3 { font-family:Georgia,serif; font-size:32px; margin:8px 0; }
.landing-rule-cards p { color:#9eabb2; line-height:1.45; max-width:560px; }
.landing-build,.landing-party,.landing-community-section { min-height:100vh; display:grid; grid-template-columns:1fr 1fr; align-items:center; gap:70px; padding:110px clamp(24px,7vw,120px); }
.landing-build { background:radial-gradient(circle at 20% 55%,rgba(55,105,131,.15),transparent 35%),#080a0c; }
.landing-build-visual { min-height:650px; position:relative; display:grid; place-items:center; }
.landing-deck-stack { position:relative; width:min(270px,55vw); aspect-ratio:5/7; }
.landing-deck-stack img { position:absolute; width:100%; inset:0; border-radius:12px; filter:drop-shadow(0 30px 35px rgba(0,0,0,.65)); }
.landing-deck-stack img:nth-child(1){ transform:rotate(-5deg) translate(-16px,10px); }
.landing-deck-stack img:nth-child(2){ transform:rotate(4deg) translate(14px,4px); }
.landing-deck-stack img:nth-child(3){ transform:rotate(.5deg); }
.landing-source-pill { position:absolute; padding:11px 16px; border:1px solid #65737d; border-radius:999px; background:#11171b; font-size:10px; letter-spacing:.12em; box-shadow:0 14px 30px rgba(0,0,0,.35); }
.landing-source-pill.mine { left:4%; top:18%; }
.landing-source-pill.originals { right:4%; top:25%; border-color:#8b6d34; color:#edce86; }
.landing-source-pill.community { left:12%; bottom:19%; }
.landing-feature-row { display:flex; flex-wrap:wrap; gap:7px; margin:20px 0 26px; }
.landing-feature-row span { padding:8px 11px; border:1px solid #39454d; border-radius:999px; color:#bac3c8; font-size:11px; }
.landing-party { background:radial-gradient(circle at 75% 50%,rgba(139,72,117,.18),transparent 34%),#0b0d10; }
.landing-party-status { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:25px; }
.landing-party-status span { padding:11px 13px; border:1px solid #37434b; border-radius:9px; display:flex; justify-content:space-between; color:#aab4b9; }
.landing-party-status b { color:#dcbd71; }
.landing-party-orbit { width:min(620px,80vw); aspect-ratio:1; position:relative; margin:auto; border:1px dashed rgba(154,121,66,.25); border-radius:50%; }
.landing-party-orbit img { position:absolute; width:34%; left:33%; top:26%; filter:drop-shadow(0 20px 25px #000); transform:rotate(4deg); }
.landing-party-orbit div { position:absolute; width:70px; height:70px; border-radius:50%; display:grid; place-items:center; border:1px solid #8d713c; background:#11161a; color:#e7c77d; font-weight:800; }
.landing-party-orbit div:nth-child(1){left:5%;top:44%}.landing-party-orbit div:nth-child(2){right:8%;top:10%}.landing-party-orbit div:nth-child(3){right:2%;bottom:25%}.landing-party-orbit div:nth-child(4){left:25%;bottom:0}

.landing-group-events { min-height:100vh; display:grid; grid-template-columns:minmax(0,.9fr) minmax(520px,1.1fr); align-items:start; gap:70px; padding:110px clamp(24px,7vw,120px); background:radial-gradient(circle at 18% 25%,rgba(111,57,128,.22),transparent 35%),radial-gradient(circle at 84% 70%,rgba(181,128,44,.12),transparent 32%),#090b0e; }
.landing-group-events h2 { font-family:Georgia,serif; font-size:clamp(38px,4.4vw,68px); line-height:1.03; letter-spacing:-.03em; margin:13px 0 18px; }
.landing-group-events-copy > p { color:#a6b0b5; font-size:18px; line-height:1.55; max-width:690px; }
.group-event-flow { display:grid; gap:10px; margin-top:28px; }
.group-event-flow article { display:grid; grid-template-columns:42px 1fr; gap:13px; align-items:start; padding:15px; border:1px solid #3c4650; border-radius:13px; background:rgba(15,20,24,.78); }
.group-event-flow article > b { width:38px; height:38px; border:1px solid #876c38; border-radius:50%; display:grid; place-items:center; color:#e7c779; }
.group-event-flow article div { display:grid; gap:4px; }
.group-event-flow article strong { color:#eee7d8; font-size:15px; }
.group-event-flow article span { color:#9da8ae; font-size:13px; line-height:1.45; }
.group-event-duration-note { margin-top:20px; padding:16px; border-left:3px solid #a27839; background:rgba(162,120,57,.08); display:grid; gap:5px; }
.group-event-duration-note strong { color:#ebcb82; }
.group-event-duration-note span { color:#aab4b9; font-size:13px; line-height:1.45; }

.landing-group-event-planner { position:sticky; top:96px; padding:0; border:1px solid #4d5962; border-radius:20px; background:linear-gradient(145deg,rgba(20,26,31,.98),rgba(8,11,14,.98)); box-shadow:0 25px 70px rgba(0,0,0,.35); overflow:hidden; }
.group-event-planner-summary { cursor:pointer; padding:22px 28px; color:#eee3cc; font-family:Georgia,serif; font-size:24px; font-weight:700; list-style-position:inside; }
.group-event-planner-summary:hover { background:rgba(255,255,255,.025); }
.landing-group-event-planner[open] > .group-event-planner-summary { border-bottom:1px solid #35414a; }
.group-event-planner-body { padding:26px 28px 28px; }
.group-event-planner-head h3 { margin:7px 0 5px; font-family:Georgia,serif; font-size:34px; }
.group-event-planner-head p { margin:0 0 20px; color:#8f9aa0; font-size:13px; }
.group-event-input-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.group-event-input-grid label,.group-event-notes { display:grid; gap:6px; color:#c2cbd0; font-size:12px; font-weight:700; }
.group-event-input-grid input,.group-event-input-grid select,.group-event-notes textarea { width:100%; min-width:0; border:1px solid #46535c; border-radius:9px; background:#080b0d; color:#eee7d8; padding:10px 11px; font:inherit; font-size:14px; outline:none; }
.group-event-input-grid input:focus,.group-event-input-grid select:focus,.group-event-notes textarea:focus { border-color:#bd9145; box-shadow:0 0 0 2px rgba(189,145,69,.11); }
.group-event-input-grid small { color:#78858c; font-weight:400; line-height:1.35; }
.group-event-plan-summary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin:18px 0; }
.group-event-plan-summary div { min-height:76px; padding:10px; border:1px solid #35414a; border-radius:10px; background:#0b0f12; display:grid; align-content:center; gap:3px; }
.group-event-plan-summary span { color:#7f8c93; font-size:10px; text-transform:uppercase; letter-spacing:.06em; }
.group-event-plan-summary strong { color:#ecd08d; font-size:17px; }
.group-event-includes { padding:13px 14px; border:1px solid #5a4930; border-radius:10px; background:rgba(147,103,37,.08); display:grid; gap:4px; }
.group-event-includes strong { color:#e2c27d; font-size:13px; }
.group-event-includes span { color:#98a4aa; font-size:12px; line-height:1.4; }
.group-event-application { margin-top:18px; border-top:1px solid #35414a; padding-top:15px; }
.group-event-application summary { cursor:pointer; color:#eee3cc; font-family:Georgia,serif; font-size:21px; font-weight:700; }
.group-event-form { display:grid; gap:14px; margin-top:16px; }
.group-event-notes textarea { resize:vertical; min-height:92px; }
.group-event-success { margin-top:15px; padding:15px; border:1px solid #55705d; border-radius:10px; background:rgba(62,105,72,.12); color:#cfe2d4; line-height:1.5; }
.group-event-honeypot { position:absolute !important; left:-10000px !important; width:1px !important; height:1px !important; opacity:0 !important; pointer-events:none !important; }

.landing-community-section { background:linear-gradient(135deg,#080a0c,#11151a); }
.landing-community-metrics { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.landing-community-metrics div { min-height:180px; padding:25px; border:1px solid #35424b; border-radius:17px; display:grid; align-content:center; gap:7px; background:rgba(255,255,255,.018); }
.landing-community-metrics b { font-size:37px; color:#d4a64f; }
.landing-community-metrics span { color:#aab5bb; }
.landing-products { padding:120px clamp(24px,7vw,120px); text-align:center; background:#07090b; }
.landing-products h2 { max-width:900px; margin:15px auto 50px; }
.landing-product-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:15px; text-align:left; margin-bottom:30px; }
.landing-product-grid article { min-height:280px; padding:28px; border:1px solid #35414a; border-radius:18px; background:#0d1114; }
.landing-product-grid article.featured { border-color:#a77c35; transform:translateY(-14px); background:linear-gradient(145deg,rgba(167,124,53,.1),#0d1114); }
.landing-product-grid span { color:#c99b47; font-size:10px; letter-spacing:.17em; }
.landing-product-grid h3 { font-family:Georgia,serif; font-size:31px; margin:12px 0; }
.landing-product-grid p { color:#9da8ae; line-height:1.5; }
.landing-email-list { padding:110px clamp(24px,7vw,120px); display:grid; grid-template-columns:minmax(0,1fr) minmax(360px,.8fr); gap:70px; align-items:center; background:radial-gradient(circle at 78% 45%,rgba(171,124,48,.14),transparent 34%),linear-gradient(135deg,#0b0e11,#07090b); border-top:1px solid rgba(197,139,44,.14); border-bottom:1px solid rgba(197,139,44,.14); }
.landing-email-list h2 { margin:13px 0 18px; font-family:Georgia,serif; font-size:clamp(38px,4.6vw,68px); line-height:1.02; letter-spacing:-.03em; }
.landing-email-list h2 em { color:#e0b75d; font-style:italic; }
.landing-email-list-copy > p { max-width:660px; margin:0 0 12px; color:#a6b0b5; font-size:18px; line-height:1.55; }
.landing-email-list-copy .landing-email-list-credit-note { color:#d8c08c; font-size:14px; }
.landing-email-list-card { padding:28px; border:1px solid #65502a; border-radius:18px; background:linear-gradient(145deg,rgba(21,27,32,.98),rgba(9,12,15,.98)); box-shadow:0 24px 70px rgba(0,0,0,.35); }
.landing-email-list-label { display:block; margin-bottom:8px; color:#c8d0d4; font-size:12px; font-weight:700; letter-spacing:.05em; text-transform:uppercase; }
.landing-email-list-row { display:flex; gap:10px; align-items:stretch; }
.landing-email-list-row input { flex:1 1 auto; min-width:0; min-height:48px; padding:0 14px; border:1px solid #46535c; border-radius:10px; background:#080b0d; color:#eee7d8; font:inherit; font-size:15px; outline:none; }
.landing-email-list-row input:focus { border-color:#c79845; box-shadow:0 0 0 2px rgba(199,152,69,.12); }
.landing-email-list-row .landing-primary { flex:0 0 auto; white-space:nowrap; }
.landing-email-list-consent { display:flex; align-items:flex-start; gap:9px; margin-top:15px; color:#aeb8be; font-size:12px; line-height:1.45; cursor:pointer; }
.landing-email-list-consent input { width:17px; height:17px; margin-top:1px; accent-color:#c99b47; flex:0 0 auto; }
.landing-email-list-fineprint { margin-top:11px; color:#77838a; font-size:11px; line-height:1.45; }
.landing-email-list-message { margin-top:16px; padding:11px 13px; border:1px solid #4c5c65; border-radius:9px; background:#0a0e11; color:#d6dedf; font-size:13px; line-height:1.45; }
.landing-email-list-confirm-title { margin-bottom:9px; color:#efcf83; font-family:Georgia,serif; font-size:27px; font-weight:700; }
.landing-email-list-card > p { margin:0 0 20px; color:#aeb8be; font-size:14px; line-height:1.55; }

.landing-final-cta { min-height:80vh; padding:90px 20px; display:grid; place-items:center; align-content:center; text-align:center; background:radial-gradient(circle at center,rgba(147,105,39,.16),transparent 40%),#090b0d; }
.landing-final-cta img { width:min(650px,85vw); filter:drop-shadow(0 12px 22px #000); }
.landing-final-cta h2 { max-width:950px; }
.landing-final-cta > div { display:flex; gap:10px; }
.landing-footer { display:flex; justify-content:space-between; padding:25px clamp(20px,6vw,90px); border-top:1px solid #2c353b; color:#727d83; font-size:11px; }

@media (max-width:1050px){
  .project-settings-card { grid-template-columns:1fr 1fr; }
  .landing-hero { grid-template-columns:1fr; padding-top:70px; }
  .landing-card-stage { position:absolute; inset:10% -12% auto 45%; opacity:.38; pointer-events:none; }
  .landing-hero-copy { max-width:720px; }
  .landing-story,.landing-build,.landing-party,.landing-group-events,.landing-community-section { grid-template-columns:1fr; min-height:auto; }
  .landing-group-event-planner { position:relative; top:auto; }
  .landing-product-grid { grid-template-columns:repeat(2,1fr); }
  .landing-sticky-copy { position:relative; top:auto; }
  .landing-build-visual { order:2; min-height:520px; }
  .landing-party-orbit { max-width:520px; }
}

@media (max-width:760px){
  .projects-modal { width:100vw; height:100dvh; max-height:none; border-radius:0; padding:10px; }
  .projects-layout { grid-template-columns:1fr; }
  .project-list { max-height:120px; display:grid; grid-auto-flow:column; grid-auto-columns:minmax(180px,1fr); overflow-x:auto; overflow-y:hidden; }
  .project-workspace { padding-right:0; }
  .project-redeem-strip { align-items:stretch; flex-direction:column; }
  .project-code-entry { min-width:0; }
  .project-settings-card { grid-template-columns:1fr; }
  .project-title-row { align-items:stretch; flex-direction:column; }
  .project-name-input { width:100%; font-size:21px; }
  .deck-hand-preview { width:100%; margin-top:5px; }
  .deck-hand-stage { height:90px; width:calc(100% - 44px); }
  .deck-hand-card { width:clamp(40px, 11.5vw, 52px); bottom:5px; }
  .deck-hand-count { font-size:8px; }
  .project-title-actions { width:100%; }
  .project-title-actions button { flex:1 1 42%; }
  .project-fill-launch { align-items:stretch; flex-direction:column; }
  .project-fill-launch button { width:100%; }
  .project-fill-screen-head { align-items:stretch; flex-direction:column; padding:10px 12px; gap:8px; }
  .project-fill-screen-head h2 { font-size:22px; }
  .project-fill-screen-actions { width:100%; flex-wrap:wrap; }
  .project-fill-screen-actions .primary,.project-fill-screen-actions .secondary { flex:1 1 40%; min-width:0; }
  .project-fill-screen-actions .project-clear-selection { flex:0 0 100%; order:3; text-align:center; padding:3px; }
  .project-fill-screen-body { padding:9px 10px 28px; }
  .project-fill-participant-banner { align-items:flex-start; flex-direction:column; }
  .project-card-inspector-backdrop { padding:8px; }
  .project-card-inspector { width:100%; max-height:98dvh; padding:10px; }
  .project-card-inspector-preview { width:min(390px,88vw); }
  .project-card-inspector-actions { flex-direction:column; align-items:stretch; }
  .project-card-inspector-actions button { width:100%; }
  .project-preview-hint { opacity:1; transform:none; }
  .party-participants-grid { grid-template-columns:1fr; }
  .project-fill-head { align-items:stretch; flex-direction:column; }
  .project-browser-controls { grid-template-columns:1fr 1fr; }
  .project-browser-controls .project-source-search { grid-column:1 / -1; }
  .project-browser-controls select:last-child { grid-column:1 / -1; }
  .project-source-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .project-selected-row { align-items:flex-start; }
  .originals-modal { width:100vw; max-height:100dvh; border-radius:0; }
  .originals-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }

  .landing-nav { height:82px; padding:5px 12px; overflow:visible; }
  .landing-brand { position:relative; width:42vw; max-width:170px; height:100%; overflow:visible; }
  .landing-brand img {
    position:absolute;
    left:0;
    top:50%;
    width:auto;
    height:76px;
    max-height:76px;
    max-width:42vw;
    transform:translateY(-40%);
    object-fit:contain;
    object-position:left center;
  }
  .landing-nav nav { gap:4px; }
  .landing-nav nav button:not(.landing-nav-cta):not(.landing-cart-button) { display:none; }
  .landing-nav .landing-nav-cta { font-size:9px; padding:7px 9px; }
  .landing-nav .landing-cart-button { font-size:9px; padding:7px 8px; white-space:nowrap; }
  .landing-hero { min-height:calc(100dvh - 82px); padding:54px 20px 70px; }
  .landing-hero h1 { font-size:clamp(52px,17vw,82px); }
  .landing-hero p { font-size:16px; max-width:90%; }
  .landing-card-stage { left:28%; right:-50%; top:11%; min-height:480px; opacity:.3; }
  .landing-hero-actions { flex-direction:column; width:min(300px,100%); }
  .landing-story,.landing-build,.landing-party,.landing-group-events,.landing-community-section { padding:80px 20px; gap:38px; }
  .group-event-input-grid { grid-template-columns:1fr; }
  .group-event-plan-summary { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .landing-group-event-planner { padding:0; }
  .group-event-planner-summary { padding:18px 20px; font-size:21px; }
  .group-event-planner-body { padding:20px; }
  .landing-rule-cards article,.landing-rule-cards article:nth-child(even) { transform:none; min-height:210px; padding:24px; }
  .landing-rule-cards h3 { font-size:28px; }
  .landing-build-visual { min-height:430px; }
  .landing-party-status,.landing-community-metrics { grid-template-columns:1fr; }
  .landing-party-orbit { width:92vw; }
  .landing-product-grid { grid-template-columns:1fr; }
  .landing-product-grid article.featured { transform:none; }
  .landing-products { padding:80px 20px; }
  .landing-email-list { grid-template-columns:1fr; padding:80px 20px; gap:28px; }
  .landing-email-list-row { flex-direction:column; }
  .landing-email-list-row .landing-primary { width:100%; }
  .landing-email-list-card { padding:22px; }
  .landing-final-cta > div { flex-direction:column; }
  .landing-footer { flex-direction:column; gap:6px; text-align:center; }
}

/* v3.3 flattened CMT Original fronts: legacy master card images can live in the
   first-party library without being re-composited inside a modern template. */
.flattened-card-front {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: inherit;
}

/* Scroll-story reveals. The homepage remains readable without motion, but supported
   browsers let each idea arrive as the visitor reaches it. */
.landing-reveal {
  opacity: 0;
  transform: translateY(34px) scale(.985);
  transition: opacity .72s ease, transform .9s cubic-bezier(.2,.75,.18,1);
}
.landing-reveal.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.landing-rule-cards .landing-reveal:nth-child(even) {
  transform: translate(36px,34px) scale(.985);
}
.landing-rule-cards .landing-reveal:nth-child(even).is-visible {
  transform: translate(36px,0) scale(1);
}
.landing-build-visual.is-visible .landing-source-pill.mine { animation: cmt-source-float 5.8s ease-in-out infinite; }
.landing-build-visual.is-visible .landing-source-pill.originals { animation: cmt-source-float 6.6s .45s ease-in-out infinite reverse; }
.landing-build-visual.is-visible .landing-source-pill.community { animation: cmt-source-float 5.2s .8s ease-in-out infinite; }
.landing-party-orbit.is-visible > div { animation: cmt-party-pulse 3.8s ease-in-out infinite; }
.landing-party-orbit.is-visible > div:nth-child(2) { animation-delay:.5s; }
.landing-party-orbit.is-visible > div:nth-child(3) { animation-delay:1s; }
.landing-party-orbit.is-visible > div:nth-child(4) { animation-delay:1.5s; }
@keyframes cmt-source-float { 0%,100%{translate:0 0} 50%{translate:0 -10px} }
@keyframes cmt-party-pulse { 0%,100%{box-shadow:0 0 0 rgba(205,159,75,0)} 50%{box-shadow:0 0 28px rgba(205,159,75,.18)} }
@media (prefers-reduced-motion: reduce) {
  .landing-page { scroll-behavior:auto; }
  .landing-reveal,.landing-reveal.is-visible,.landing-rule-cards .landing-reveal:nth-child(even),.landing-rule-cards .landing-reveal:nth-child(even).is-visible { opacity:1; transform:none; transition:none; }
  .landing-build-visual.is-visible .landing-source-pill,.landing-party-orbit.is-visible > div { animation:none; }
}
@media (max-width: 640px) {
  .landing-rule-cards .landing-reveal:nth-child(even),.landing-rule-cards .landing-reveal:nth-child(even).is-visible { transform:none; }
}


/* v3.3.2 — desktop header cleanup + Community vulgar moderation */
.community-vulgar-badge {
  display:inline-flex;
  width:max-content;
  align-items:center;
  padding:2px 7px;
  border:1px solid rgba(196,83,83,.55);
  border-radius:999px;
  color:#f0aaaa;
  background:rgba(120,31,31,.16);
  font-size:9px;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.community-vulgar-flag.flagged {
  border-color:#a85b5b;
  color:#efb0b0;
  background:rgba(115,35,35,.18);
}
.vulgar-self-report {
  align-items:flex-start;
  margin:12px 0 4px;
}
.vulgar-self-report input {
  margin-top:3px;
}

@media (min-width:1101px) and (max-width:1320px) {
  .topbar nav { gap:18px; letter-spacing:.12em; font-size:11px; }
}

@media (max-width:760px) {
  .community-vulgar-flag { min-height:34px !important; }
}

/* v3.3.3 — non-destructive artwork viewport + Mature terminology + CMT Classics */
.community-mature-badge {
  display:inline-flex;
  width:max-content;
  align-items:center;
  padding:2px 7px;
  border:1px solid rgba(196,83,83,.55);
  border-radius:999px;
  color:#f0aaaa;
  background:rgba(120,31,31,.16);
  font-size:9px;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.community-mature-flag.flagged {
  border-color:#a85b5b;
  color:#efb0b0;
  background:rgba(115,35,35,.18);
}
.mature-self-report { align-items:flex-start; margin:12px 0 4px; }
.mature-self-report input { margin-top:3px; }
.community-classics-toggle {
  display:flex;
  align-items:center;
  gap:7px;
  min-height:38px;
  padding:0 10px;
  border:1px solid #45515b;
  border-radius:8px;
  background:#0f151a;
  white-space:nowrap;
  font-size:12px;
}
.community-classics-toggle input { accent-color:#d8ad4b; }
.community-title-line { display:flex; align-items:center; flex-wrap:wrap; gap:7px; }
.cmt-classic-badge {
  display:inline-flex;
  width:max-content;
  padding:2px 6px;
  border:1px solid rgba(222,174,63,.55);
  border-radius:999px;
  color:#f2cf74;
  background:rgba(132,91,18,.18);
  font-size:8px;
  letter-spacing:.09em;
}
.community-card.classic-card { border-color:rgba(218,170,62,.48); }
@media (max-width:760px) {
  .community-mature-flag { min-height:34px !important; }
  .community-classics-toggle { width:100%; justify-content:center; }
}

.art-fit-row{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:8px}.art-fit-row .selected{border-color:#d6a941;color:#f4d57d;box-shadow:0 0 0 1px rgba(214,169,65,.18)}

/* v3.3.4 — Quick Start, safer Party Pack copy, and mobile Deck Project previews */
.quick-start-backdrop { z-index:95; align-items:flex-start; padding:4vh 16px; overflow:auto; }
.quick-start-modal {
  width:min(980px,96vw);
  max-height:92vh;
  overflow:auto;
  padding:20px;
  border:1px solid #6c562c;
  border-radius:16px;
  background:linear-gradient(180deg,#12181d,#080b0e);
  box-shadow:0 30px 100px rgba(0,0,0,.82);
}
.quick-start-kicker { color:#d3a84f; font-size:10px; font-weight:800; letter-spacing:.2em; margin-bottom:4px; }
.quick-start-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:16px; }
.quick-start-grid article { padding:15px; border:1px solid #33414a; border-radius:11px; background:rgba(7,11,14,.62); }
.quick-start-grid article.quick-start-wide { grid-column:1 / -1; }
.quick-start-grid h3 { margin:0 0 8px; color:#eedfbf; font-family:Georgia,serif; font-size:19px; }
.quick-start-grid p { margin:7px 0 0; color:#aab5bb; line-height:1.48; font-size:13px; }
.quick-start-grid strong { color:#e1c984; }
.quick-start-detail-link {
  display:inline-block;
  margin-top:12px;
  padding:4px 0;
  color:#e4c784;
  font-size:12px;
  text-decoration:underline;
  text-underline-offset:3px;
}
.quick-start-style-guide { border-color:rgba(196,146,59,.48) !important; }
.quick-start-themed-decks { border-color:rgba(109,155,155,.45) !important; }
.quick-start-tip { background:linear-gradient(135deg,rgba(171,125,47,.10),rgba(7,11,14,.65)) !important; border-color:rgba(196,146,59,.42) !important; }
.quick-start-footer { display:flex; align-items:center; justify-content:space-between; gap:14px; padding-top:16px; }
.quick-start-footer label { display:flex; align-items:center; gap:8px; color:#9eabb1; font-size:12px; }
.quick-start-footer input { width:auto; accent-color:#d8ad4b; }
.quick-start-open-button { font-size:11px; letter-spacing:0; text-transform:none; }
.project-dev-tools { width:100%; color:#75818a; font-size:10px; }
.project-dev-tools summary { cursor:pointer; text-align:right; }
.project-dev-tools button { margin-top:6px; float:right; }
.project-cart-button:disabled { opacity:.45; cursor:not-allowed; }

@media (max-width:760px) {
  .quick-start-backdrop { padding:0; }
  .quick-start-modal { width:100vw; max-height:100dvh; min-height:100dvh; border-radius:0; padding:14px; }
  .quick-start-grid { grid-template-columns:1fr; }
  .quick-start-grid article.quick-start-wide { grid-column:auto; }
  .quick-start-footer { position:sticky; bottom:-14px; margin:12px -14px -14px; padding:12px 14px calc(12px + env(safe-area-inset-bottom)); background:rgba(8,11,14,.96); border-top:1px solid #34404a; flex-direction:column; align-items:stretch; }
  .quick-start-footer .primary { width:100%; }

  /* The global mobile .card-preview rule is sized for the main editor. Deck tiles
     need their own contained viewport so two cards can sit side-by-side safely. */
  .project-source-grid { grid-template-columns:repeat(2,minmax(0,1fr)) !important; gap:8px !important; }
  .project-source-card { min-width:0 !important; width:100% !important; overflow:hidden; padding:6px !important; }
  .project-source-preview { width:100% !important; max-width:118px !important; min-width:0 !important; overflow:hidden; margin:0 auto !important; }
  .project-source-preview .card-preview { width:100% !important; max-width:100% !important; min-width:0 !important; margin:0 !important; border-radius:5px !important; box-shadow:0 6px 14px rgba(0,0,0,.45) !important; }
  .project-source-preview .flattened-card-front { display:block; width:100% !important; height:auto !important; max-width:100% !important; object-fit:contain; }
  .project-source-card > strong { font-size:10px; }
  .project-source-card small { min-height:22px; font-size:8px; }
  .project-source-card button { font-size:9px !important; padding:5px 4px !important; }
}

/* v3.3.5 — Party guidance, duplicate-safe Deck Projects, and mobile browse mode */
.party-organizer-guidance {
  margin:12px 0 4px;
  padding:11px;
  border:1px solid rgba(197,139,44,.28);
  border-radius:9px;
  background:rgba(197,139,44,.055);
  display:grid;
  gap:7px;
}
.party-organizer-guidance strong { color:#ead9b2; font-family:Georgia,serif; }
.party-organizer-guidance textarea { min-height:82px; width:100%; }
.party-organizer-guidance p { margin:0; white-space:pre-wrap; line-height:1.45; color:#d0c7b7; }
.mobile-project-strip,.project-mobile-options-toggle { display:none; }
.landing-flat-card { width:100%; display:block; border-radius:10px; box-shadow:0 20px 45px rgba(0,0,0,.55); }

@media (max-width:760px) {
  /* A selected project becomes a card browser as soon as the user scrolls into it. */
  .mobile-project-strip {
    display:none;
    width:100%;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    padding:9px 11px;
    margin:0 0 8px;
    border:1px solid #69542c;
    border-radius:9px;
    background:linear-gradient(135deg,#15191c,#0d1012);
    color:#eee4d0;
    text-align:left;
  }
  .mobile-project-strip span { display:grid; gap:1px; min-width:0; }
  .mobile-project-strip b { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .mobile-project-strip small { color:#9aa5ac; }
  .mobile-project-strip > strong { color:#e2bd69; font-size:10px; white-space:nowrap; }
  .projects-modal.mobile-browse-mode .mobile-project-strip { display:flex; position:sticky; top:0; z-index:9; }
  .projects-modal.mobile-browse-mode .modal-head,
  .projects-modal.mobile-browse-mode .projects-toolbar,
  .projects-modal.mobile-browse-mode .project-redeem-strip,
  .projects-modal.mobile-browse-mode .project-list { display:none !important; }
  .projects-modal.mobile-browse-mode .projects-layout { margin-top:0; }
  .projects-modal.mobile-browse-mode .project-workspace { padding-top:0; }

  .project-mobile-options-toggle {
    display:block;
    width:100%;
    margin:4px 0 8px;
    padding:8px 10px;
    border:1px solid #46525c;
    border-radius:8px;
    background:#0e1418;
    color:#d8ccb4;
    text-align:left;
  }
  .project-setup-section.mobile-hidden { display:none !important; }

  /* The project list is a compact chooser, not a second card gallery. */
  .project-list { max-height:92px !important; grid-auto-columns:minmax(145px,72vw) !important; }
  .project-list-row { padding:8px !important; }

  /* True contained thumbnail grid. CardPreview's editor-sized mobile rule must not leak in. */
  .projects-modal .project-source-grid {
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:10px !important;
    max-height:none !important;
    overflow:visible !important;
    padding:0 !important;
  }
  .projects-modal .project-source-card {
    min-width:0 !important;
    width:100% !important;
    overflow:hidden !important;
    padding:7px !important;
    align-content:start;
  }
  .projects-modal .project-source-preview {
    width:110px !important;
    max-width:110px !important;
    min-width:0 !important;
    aspect-ratio:auto !important;
    overflow:visible !important;
    margin:2px auto !important;
    contain:layout;
  }
  .projects-modal .project-source-preview .card-preview,
  .projects-modal .project-source-preview .flattened-card-front {
    display:block !important;
    width:104px !important;
    max-width:104px !important;
    min-width:0 !important;
    height:auto !important;
    margin:0 auto !important;
    object-fit:contain !important;
  }
  .projects-modal .project-source-preview .card-preview {
    border-radius:4px !important;
    box-shadow:none !important;
  }
  .projects-modal .project-source-preview .flattened-card-front {
    width:104px !important;
    height:auto !important;
    max-width:104px !important;
    display:block;
    object-fit:contain;
  }
  .projects-modal .project-source-card > strong { font-size:10px !important; text-align:center; }
  .projects-modal .project-source-card small { min-height:20px !important; font-size:8px !important; text-align:center; }
  .projects-modal .project-source-card button { font-size:9px !important; padding:6px 4px !important; }

  /* On the homepage, keep source labels readable instead of burying them behind the deck. */
  .landing-build-visual {
    min-height:500px !important;
    display:grid !important;
    grid-template-columns:max-content max-content !important;
    grid-template-rows:auto auto 1fr !important;
    justify-content:center !important;
    align-content:center !important;
    gap:10px 12px !important;
  }
  .landing-source-pill { position:static !important; transform:none !important; }
  .landing-source-pill.community { grid-column:1 / -1; justify-self:center; }
  .landing-deck-stack {
    grid-column:1 / -1;
    width:min(215px,54vw) !important;
    margin:8px auto 0;
  }
}
@media (max-width:760px) {
  .mobile-project-strip { padding:4px 5px 4px 9px !important; }
  .mobile-project-summary { flex:1; min-width:0; display:flex; align-items:center; justify-content:space-between; gap:10px; border:0; background:transparent; color:inherit; padding:5px 4px; text-align:left; }
  .mobile-project-summary span { display:grid; gap:1px; min-width:0; }
  .mobile-project-summary b { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .mobile-project-summary small { color:#9aa5ac; }
  .mobile-project-summary > strong { color:#e2bd69; font-size:10px; white-space:nowrap; }
  .mobile-project-close { flex:0 0 auto; width:34px !important; height:34px !important; font-size:24px !important; }
}


/* v3.3.6 — scalable Classic browsing */
.community-load-more {
  padding:14px;
  text-align:center;
  color:#929ca4;
  font-size:11px;
}
.auth-content-policy {
  margin-top:10px;
  padding:9px 10px;
  border:1px solid #5d4933;
  border-radius:8px;
  background:#17120e;
}


/* v3.4 — direct manipulation card editor */
.direct-edit-preview {
  user-select:none;
  -webkit-user-select:none;
}
.direct-edit-preview .preview-art,
.direct-edit-preview .preview-title,
.direct-edit-preview .preview-text {
  pointer-events:none;
}
.direct-edit-hit {
  position:absolute;
  z-index:20;
  border:1px dashed transparent;
  background:transparent;
  box-sizing:border-box;
  cursor:grab;
  touch-action:none;
  -webkit-tap-highlight-color:transparent;
  transition:border-color .12s ease, box-shadow .12s ease, background .12s ease;
}
.direct-edit-hit:active { cursor:grabbing; }
.direct-edit-hit.direct-edit-text { z-index:22; }
.direct-edit-hit.selected {
  border-color:rgba(245,199,92,.95);
  box-shadow:0 0 0 2px rgba(245,199,92,.16), inset 0 0 0 1px rgba(0,0,0,.28);
  background:rgba(232,179,60,.035);
}
.direct-edit-hit.locked { cursor:not-allowed; }
.direct-edit-hit.locked.selected { border-style:solid; border-color:rgba(158,177,188,.8); }
.direct-edit-width-handle {
  position:absolute;
  top:50%;
  width:10px;
  height:30px;
  transform:translateY(-50%);
  border:1px solid rgba(77,45,10,.8);
  border-radius:999px;
  background:#f5c75c;
  box-shadow:0 1px 5px rgba(0,0,0,.62), 0 0 0 2px rgba(245,199,92,.15);
  cursor:ew-resize;
  touch-action:none;
  z-index:3;
}
.direct-edit-width-handle::after {
  content:'';
  position:absolute;
  inset:7px 3px;
  border-left:1px solid rgba(73,44,11,.72);
  border-right:1px solid rgba(73,44,11,.72);
}
.direct-edit-width-handle-left { left:-6px; }
.direct-edit-width-handle-right { right:-6px; }
.direct-edit-height-handle {
  position:absolute;
  left:50%;
  width:30px;
  height:10px;
  transform:translateX(-50%);
  border:1px solid rgba(77,45,10,.8);
  border-radius:999px;
  background:#f5c75c;
  box-shadow:0 1px 5px rgba(0,0,0,.62), 0 0 0 2px rgba(245,199,92,.15);
  cursor:ns-resize;
  touch-action:none;
  z-index:3;
}
.direct-edit-height-handle::after {
  content:'';
  position:absolute;
  inset:3px 7px;
  border-top:1px solid rgba(73,44,11,.72);
  border-bottom:1px solid rgba(73,44,11,.72);
}
.direct-edit-height-handle-top { top:-6px; }
.direct-edit-height-handle-bottom { bottom:-6px; }

.direct-edit-lock-badge {
  position:absolute;
  right:3px;
  top:3px;
  display:grid;
  place-items:center;
  min-width:21px;
  height:21px;
  padding:0 3px;
  border:1px solid rgba(214,190,132,.55);
  border-radius:999px;
  background:rgba(6,9,11,.85);
  font-size:10px;
  box-shadow:0 2px 8px rgba(0,0,0,.6);
}
.editor-context-section {
  margin:0 -6px;
  padding:0 6px 6px;
  border-radius:9px;
  transition:background .15s ease, box-shadow .15s ease;
}
.editor-context-section.active {
  background:rgba(198,151,57,.045);
  box-shadow:inset 0 0 0 1px rgba(198,151,57,.17);
}
.landing-rule-note {
  margin-top:9px !important;
  padding-top:9px;
  border-top:1px solid rgba(193,151,73,.22);
  color:#c9b98f !important;
  font-size:.9em;
}

@media (max-width:760px) {
  .preview-panel > .card-preview.direct-edit-preview {
    margin-bottom:5px !important;
  }
}

@media (pointer:coarse) {
  .direct-edit-hit.selected {
    box-shadow:0 0 0 2px rgba(245,199,92,.22), inset 0 0 0 1px rgba(0,0,0,.22);
  }
  .direct-edit-width-handle {
    width:14px;
    height:36px;
  }
  .direct-edit-width-handle-left { left:-8px; }
  .direct-edit-width-handle-right { right:-8px; }
  .direct-edit-height-handle {
    width:36px;
    height:14px;
  }
  .direct-edit-height-handle-top { top:-8px; }
  .direct-edit-height-handle-bottom { bottom:-8px; }
}

/* v3.4.1 — compact contextual touch editor */
.contextual-editor-controls { display:none; }

@media (max-width:760px) {
  /* The card remains the editor. Only controls that cannot be replaced by touch
     appear directly beneath it, and only after an element is selected. */
  .preview-panel > .contextual-editor-controls {
    display:grid !important;
    width:min(92vw, 390px);
    margin:5px auto 0;
    padding:7px 8px;
    gap:6px;
    border-top:1px solid rgba(201,160,77,.36);
    background:rgba(10,14,17,.72);
    border-radius:0 0 8px 8px;
  }
  .contextual-editor-label {
    color:#e7c878;
    font-size:9px;
    font-weight:800;
    letter-spacing:.12em;
    text-transform:uppercase;
  }
  .contextual-text-controls {
    grid-template-columns:minmax(120px,1.15fr) minmax(0,1fr) minmax(0,1fr) auto;
    align-items:end;
  }
  .contextual-text-controls .contextual-editor-label { grid-column:1 / -1; }
  .contextual-font-control,
  .contextual-range-control {
    display:grid;
    gap:2px;
    min-width:0;
    color:#c9c4b8;
    font-size:8px;
    font-weight:700;
  }
  .contextual-font-control select {
    width:100%;
    min-width:0;
    min-height:28px;
    padding:3px 5px;
    border:1px solid #46535e;
    border-radius:6px;
    background:#0c1216;
    color:#e5e0d5;
    font-size:9px;
  }
  .contextual-range-control input[type="range"] {
    width:100%;
    min-width:0;
    margin:0;
    /* Native range tracks must not inherit the text-input padding: Chromium
       paints the track wider than the thumb's travel area when padded. */
    padding:0;
    border:0;
    background:transparent;
  }
  .contextual-reset {
    min-height:28px !important;
    padding:4px 7px !important;
    font-size:9px !important;
  }
  .contextual-art-primary {
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:5px;
  }
  .contextual-art-primary > button,
  .contextual-art-primary .own-artwork-upload,
  .contextual-art-primary .own-artwork-upload button {
    width:100%;
    max-width:none;
    min-height:30px !important;
    font-size:9px !important;
  }
  .contextual-art-primary .own-artwork-upload { display:block; }
  .contextual-art-primary .microcopy { display:none !important; }
  .contextual-quick-row {
    display:grid;
    grid-template-columns:1fr 1fr auto auto;
    gap:5px;
  }
  .contextual-quick-row button {
    min-height:27px !important;
    padding:4px 6px !important;
    font-size:8.5px !important;
  }

  /* Generate/upload are now artwork-context actions instead of permanent controls. */
  .mobile-editor-actions {
    grid-template-columns:1fr 1fr !important;
    margin-top:2px !important;
  }
  .mobile-editor-actions > .primary,
  .mobile-editor-actions > .own-artwork-upload { display:none !important; }

  /* Direct manipulation replaces the duplicated precise positioning sections on phone. */
  .right-panel > .editor-context-section { display:none !important; }
}

@media (max-width:430px) {
  .contextual-text-controls {
    grid-template-columns:minmax(0,1.25fr) minmax(0,1fr) minmax(0,1fr);
  }
  .contextual-text-controls .contextual-reset { grid-column:3; justify-self:end; }
}

/* v3.4.2 — inline text editing + mobile side undo/redo */
.preview-stage {
  width:100%;
  display:grid;
  place-items:center;
  position:relative;
}
.mobile-history-button,
.mobile-deselect-button { display:none; }

@media (min-width:761px) {
  .preview-stage > .card-preview {
    width:min(430px, 50vh) !important;
    margin:2px auto 10px !important;
  }
}

@media (max-width:760px) {
  .preview-stage {
    width:100%;
    min-width:0;
    padding:0 44px;
    box-sizing:border-box;
  }
  .preview-stage > .card-preview,
  .preview-stage > .card-preview.direct-edit-preview {
    width:min(70vw, 255px) !important;
    max-width:255px !important;
    margin:0 auto 5px !important;
  }
  .mobile-history-button {
    display:grid;
    place-items:center;
    position:absolute;
    top:50%;
    transform:translateY(-50%);
    z-index:35;
    width:36px;
    height:44px;
    padding:0;
    border:1px solid #6e5a38;
    border-radius:10px;
    background:rgba(17,22,27,.94);
    color:#efd078;
    font-size:24px;
    line-height:1;
    box-shadow:0 4px 14px rgba(0,0,0,.45);
    touch-action:manipulation;
  }
  .mobile-history-button:disabled {
    opacity:.28;
    color:#8f8b82;
  }
  .mobile-undo-button { left:3px; }
  .mobile-redo-button { right:3px; }
  .mobile-deselect-button {
    display:grid;
    place-items:center;
    position:absolute;
    right:3px;
    top:calc(50% + 30px);
    z-index:35;
    width:36px;
    height:28px;
    padding:0;
    border:1px solid #4e555a;
    border-radius:8px;
    background:rgba(12,17,21,.88);
    color:#b7b1a5;
    font-size:17px;
    font-weight:500;
    line-height:1;
    box-shadow:0 3px 10px rgba(0,0,0,.32);
    touch-action:manipulation;
  }
  .mobile-deselect-button:active {
    border-color:#8b7447;
    color:#efd078;
  }

  .contextual-text-controls {
    grid-template-columns:minmax(0,1.25fr) minmax(0,1fr) minmax(0,1fr) auto;
  }
  .contextual-text-entry {
    grid-column:1 / -1;
    display:grid;
    gap:2px;
    color:#c9c4b8;
    font-size:8px;
    font-weight:700;
  }
  .contextual-text-entry textarea {
    width:100%;
    min-height:38px;
    max-height:74px;
    resize:vertical;
    box-sizing:border-box;
    padding:5px 7px;
    border:1px solid #46535e;
    border-radius:6px;
    background:#0c1216;
    color:#f2ede1;
    font:inherit;
    font-size:11px;
    line-height:1.25;
  }
}

@media (max-width:430px) {
  .contextual-text-controls {
    grid-template-columns:minmax(0,1.25fr) minmax(0,1fr) minmax(0,1fr);
  }
  .contextual-text-entry { grid-column:1 / -1; }
}

/* v3.5 launch prep — account Credits + Community project picker */
.account-credit-summary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin:12px 0; }
.account-credit-summary > div { display:grid; gap:3px; padding:12px; border:1px solid #3a4650; border-radius:10px; background:#0b1014; }
.account-credit-summary span { color:#b8c0c6; font-size:11px; text-transform:uppercase; letter-spacing:.05em; }
.account-credit-summary strong { color:#ffd879; font-size:24px; }
.account-credit-summary small { color:#78858d; font-size:10px; line-height:1.35; }
.account-credit-ledger { margin:12px 0; padding:12px; border:1px solid #39454d; border-radius:10px; background:rgba(8,12,15,.55); }
.account-credit-ledger > strong { display:block; margin-bottom:7px; }
.credit-launch-note { display:grid; gap:5px; padding:13px; margin:10px 0 16px; border:1px solid #6c5831; border-radius:10px; background:rgba(197,139,44,.08); }
.credit-launch-note span { color:#b9c0c4; font-size:12px; line-height:1.45; }
.legal-backdrop { z-index:320; }
.legal-modal {
  width:min(820px, 95vw);
  max-height:92vh;
  overflow:auto;
  border:1px solid #745a2f;
  border-radius:12px;
  background:#0f1519;
  padding:18px;
  box-shadow:0 24px 90px rgba(0,0,0,.72);
}
.legal-review-note {
  margin:10px 0 16px;
  padding:11px 12px;
  border:1px solid #6d5830;
  border-radius:9px;
  background:#1b160d;
  color:#d9cba9;
  font-size:12px;
  line-height:1.45;
}
.legal-sections { display:grid; gap:18px; }
.legal-sections section { border-top:1px solid #303b43; padding-top:14px; }
.legal-sections section:first-child { border-top:0; padding-top:0; }
.legal-sections h3 { margin:0 0 8px; color:#edd296; font-family:Georgia,serif; }
.legal-sections p { margin:7px 0; color:#c6cdd1; line-height:1.6; }
.legal-actions { display:flex; justify-content:flex-end; margin-top:18px; }

.account-legal-links,
.app-legal-links,
.landing-legal-links { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.account-legal-links { margin:12px 0; }
.app-legal-links button,
.landing-legal-links button {
  border:0;
  background:transparent;
  color:inherit;
  text-decoration:underline;
  cursor:pointer;
  padding:0;
}
.account-danger-zone {
  margin-top:16px;
  border:1px solid #683d3d;
  border-radius:9px;
  background:#181011;
}
.account-danger-zone summary {
  cursor:pointer;
  padding:11px 12px;
  color:#d99b9b;
  font-weight:800;
}
.account-danger-zone-body {
  display:grid;
  gap:10px;
  padding:12px;
  border-top:1px solid #5a3434;
}
.account-danger-zone-body strong { color:#f0b0b0; }
.account-danger-zone-body p { margin:0; color:#bca7a7; font-size:12px; line-height:1.45; }

.credit-toast {
  position:fixed;
  top:18px;
  left:50%;
  transform:translateX(-50%);
  z-index:250;
  max-width:min(420px, calc(100vw - 28px));
  padding:10px 16px;
  border:1px solid #c89b3c;
  border-radius:999px;
  background:#17110a;
  color:#f4df9f;
  font-weight:800;
  text-align:center;
  box-shadow:0 10px 34px rgba(0,0,0,.5);
  pointer-events:none;
  animation:cmt-credit-toast-in .16s ease-out;
}
@keyframes cmt-credit-toast-in {
  from { opacity:0; transform:translate(-50%,-8px); }
  to { opacity:1; transform:translate(-50%,0); }
}

.account-private-age {
  margin:10px 0 4px;
  padding:11px 12px;
  display:grid;
  gap:3px;
  border:1px solid #3e4b54;
  border-radius:8px;
  background:#0e1419;
}
.account-private-age strong { color:#e5d09a; }
.account-private-age span { color:#eee; }
.account-private-age small { color:#9fa8ae; line-height:1.4; }

.community-age-gate {
  width:min(620px,94%);
  margin:22px auto;
  padding:20px;
  display:grid;
  gap:13px;
  border:1px solid #715a31;
  border-radius:12px;
  background:linear-gradient(180deg,rgba(38,29,17,.98),rgba(17,20,23,.98));
  box-shadow:0 18px 55px rgba(0,0,0,.42);
}
.community-age-gate > strong { font-family:Georgia,serif; font-size:20px; color:#f0d28a; }
.community-age-gate p { margin:0; color:#d6d1c7; line-height:1.5; }
.community-age-gate label { display:grid; gap:7px; color:#e2ddd2; font-weight:650; }
.community-age-actions { display:flex; gap:10px; flex-wrap:wrap; }
.community-report-dialog { display:grid; gap:12px; }
.community-report-dialog label { display:grid; gap:7px; color:#ddd8cc; font-size:13px; font-weight:650; }
.community-report-dialog textarea { min-height:105px; }

.production-proof-backdrop { z-index:345; }
.production-proof-modal {
  width:min(900px,96vw);
  max-height:94vh;
  overflow:auto;
  padding:18px;
  border:1px solid #765f32;
  border-radius:12px;
  background:#0e1418;
  box-shadow:0 24px 90px rgba(0,0,0,.72);
}
.proof-note {
  margin:10px 0 14px;
  padding:10px 11px;
  border:1px solid #46535d;
  border-radius:9px;
  background:#10171c;
  color:#c1c8cc;
  font-size:12px;
  line-height:1.5;
}
.proof-stage {
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:14px;
  align-items:start;
}
.proof-side { display:grid; gap:6px; justify-items:center; }
.proof-side > span {
  color:#9da8ae;
  font-size:10px;
  font-weight:800;
  letter-spacing:.08em;
}
.proof-card-shell {
  width:min(100%,360px);
  padding:10px;
  border-radius:12px;
  background:#000;
  box-shadow:inset 0 0 0 1px #383838;
}
.proof-card {
  position:relative;
  width:100%;
  aspect-ratio:5/7;
  overflow:hidden;
  background:#000;
}
.proof-card > img {
  display:block;
  width:100%;
  height:100%;
  object-fit:contain;
  background:#000;
}
.proof-card > .card-preview {
  width:100% !important;
  max-width:none !important;
  height:100% !important;
  margin:0 !important;
  box-shadow:none !important;
}
.production-proof-shell {
  width:min(100%,360px);
}
.production-proof-card {
  aspect-ratio:825/1125;
}
.production-proof-card--trimmed {
  background:#222b32;
}
.production-proof-card--trimmed > img {
  clip-path:inset(var(--tgc-trim-inset-pct-y) var(--tgc-trim-inset-pct-x));
}
.full-bleed-fit-modal {
  width:min(420px, 94vw);
  max-height:94dvh;
  color:#e4e0d7;
}
.full-bleed-fit-modal::backdrop { background:rgba(0,0,0,.78); }
.full-bleed-fit-proof {
  width:min(100%, 320px, 39dvh);
  margin:10px auto 0;
}
.full-bleed-fit-trim {
  position:absolute;
  inset:var(--tgc-trim-inset-pct-y) var(--tgc-trim-inset-pct-x);
}
.full-bleed-fit-trim--finished { overflow:hidden; }
.full-bleed-fit-trim > .card-preview {
  width:100%;
  height:100%;
  max-width:none;
  margin:0;
  border-radius:0;
  box-shadow:none;
  overflow:visible;
}
.full-bleed-fit-guides {
  margin:10px 0;
  text-align:center;
  font-size:13px;
}
.full-bleed-fit-guides span:first-child { color:#82d3ff; }
.full-bleed-fit-guides span:last-child { color:#ffdc75; }
.full-bleed-fit-controls { display:grid; gap:6px; margin-bottom:12px; }
.full-bleed-fit-controls label {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  font-size:14px;
}
.full-bleed-fit-controls input[type="range"] { width:100%; min-height:30px; margin:0; }
.full-bleed-fit-controls .full-bleed-fit-mirror { justify-content:flex-start; cursor:pointer; }
.full-bleed-fit-controls .full-bleed-fit-mirror input[type="checkbox"] { width:auto; flex:0 0 auto; }
.proof-print-fit-controls { width:min(100%,360px); padding-top:6px; }
.full-bleed-fit-actions {
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:8px;
}
.full-bleed-fit-actions button { min-height:40px; }
.whole-card-print-fit-button { display:block; margin:4px auto 10px; }
.production-preview-status {
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  padding:18px;
  color:#aeb7bc;
  font-size:12px;
  text-align:center;
  background:#050708;
}
.production-preview-error {
  width:min(100%,360px);
  color:#efb3b3;
  font-size:11px;
  line-height:1.4;
  text-align:center;
}
.proof-guide-toggle {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  margin:-4px 0 12px;
  color:#b9c1c6;
  font-size:11px;
}
.proof-guide-toggle input {
  width:auto;
}
.tgc-print-guides {
  position:absolute;
  inset:0;
  pointer-events:none;
  z-index:3;
}
.tgc-safe-guide,
.tgc-trim-guide {
  position:absolute;
  box-sizing:border-box;
}
.tgc-safe-guide {
  left:var(--tgc-safe-inset-pct-x);
  right:var(--tgc-safe-inset-pct-x);
  top:var(--tgc-safe-inset-pct-y);
  bottom:var(--tgc-safe-inset-pct-y);
  border:1px dashed rgba(65,180,255,.9);
}
.tgc-trim-guide {
  left:var(--tgc-trim-inset-pct-x);
  right:var(--tgc-trim-inset-pct-x);
  top:var(--tgc-trim-inset-pct-y);
  bottom:var(--tgc-trim-inset-pct-y);
  border:1px dashed rgba(255,214,79,.88);
}
.proof-watermark {
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  pointer-events:none;
  color:rgba(255,255,255,.18);
  font-size:clamp(36px,9vw,78px);
  font-weight:900;
  letter-spacing:.12em;
  transform:rotate(-28deg);
  text-shadow:0 1px 2px rgba(0,0,0,.45);
}
.proof-navigation {
  display:flex;
  justify-content:center;
  align-items:end;
  gap:9px;
  margin:14px 0;
  flex-wrap:wrap;
}
.proof-navigation label {
  display:grid;
  gap:4px;
  color:#aeb7bc;
  font-size:11px;
  text-align:center;
}
.proof-navigation input { width:84px; text-align:center; }
.proof-approval-check {
  display:flex;
  align-items:flex-start;
  gap:9px;
  margin:14px 0;
  padding:11px;
  border:1px solid #59636a;
  border-radius:9px;
  background:#0b1115;
  color:#d4d8da;
  line-height:1.4;
}
.proof-approval-check input { width:auto; margin-top:3px; }
.proof-actions {
  display:flex;
  justify-content:flex-end;
  gap:8px;
  flex-wrap:wrap;
}
.proof-asset-ok {
  margin:10px 0;
  padding:10px 11px;
  border:1px solid #526a46;
  border-radius:9px;
  background:#111a0f;
  color:#bcd5ae;
  font-size:12px;
}
.production-issue-link {
  display:block;
  width:100%;
  padding:4px 0;
  text-align:left;
  color:#efb3b3;
  white-space:normal;
}

.proof-approved {
  margin-top:10px;
  padding:10px 11px;
  border:1px solid #526a46;
  border-radius:9px;
  background:#111a0f;
  color:#bcd5ae;
  font-size:12px;
  line-height:1.45;
}
.production-admin-test {
  display:grid;
  gap:9px;
  margin-top:14px;
  padding:12px;
  border:1px dashed #8a6b2f;
  border-radius:10px;
  background:#171208;
}
.production-admin-test strong { color:#e4c36f; }
.production-admin-test p { margin:0; color:#bcb39e; font-size:12px; line-height:1.45; }
.production-download-link {
  display:block;
  text-align:center;
  text-decoration:none;
  box-sizing:border-box;
}

.production-pdf-backdrop { z-index:340; }
.production-pdf-modal {
  width:min(760px,96vw);
  max-height:92vh;
  overflow:auto;
  padding:18px;
  border:1px solid #765f32;
  border-radius:12px;
  background:#0e1418;
  box-shadow:0 24px 90px rgba(0,0,0,.72);
}
.production-spec-grid {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
  margin:12px 0;
}
.production-spec-grid > div {
  display:grid;
  gap:3px;
  padding:10px;
  border:1px solid #3d4952;
  border-radius:9px;
  background:#0b1014;
}
.production-spec-grid span { color:#909ba2; font-size:10px; text-transform:uppercase; letter-spacing:.05em; }
.production-spec-grid strong { color:#ead39b; font-size:13px; }
.production-bleed-note {
  margin:9px 0;
  padding:10px 11px;
  border:1px solid #46535d;
  border-radius:9px;
  background:#10171c;
  color:#b9c2c7;
  font-size:12px;
  line-height:1.45;
}
.production-bleed-note strong { color:#e6c77e; }
.production-preflight {
  display:grid;
  gap:5px;
  margin:10px 0;
  padding:10px 11px;
  border-radius:9px;
  font-size:12px;
  line-height:1.4;
}
.production-preflight.errors { border:1px solid #7d4444; background:#211112; color:#e9b0b0; }
.production-preflight.warnings { border:1px solid #745e32; background:#1a160d; color:#d9c69a; }
.production-preflight.warnings summary { cursor:pointer; font-weight:800; }
.production-preflight.warnings > div { display:grid; gap:4px; margin-top:8px; }
.production-progress { display:grid; grid-template-columns:1fr auto; align-items:center; gap:10px; margin:12px 0; }
.production-progress progress { width:100%; }
.production-pdf-actions { display:flex; justify-content:flex-end; gap:8px; margin-top:14px; }
.print-render-host {
  position:fixed;
  left:-12000px;
  top:0;
  width:430px;
  height:602px;
  overflow:hidden;
  pointer-events:none;
  opacity:1;
  z-index:-1;
}
.print-card-capture {
  width:430px;
  height:602px;
  overflow:hidden;
  background:#000;
}
.print-card-capture > .card-preview {
  width:430px !important;
  max-width:none !important;
  height:602px !important;
  margin:0 !important;
  border-radius:0 !important;
  box-shadow:none !important;
}
.print-card-capture .print-flattened-card {
  display:block;
  width:430px;
  height:602px;
  object-fit:cover;
  background:#000;
}
@media (max-width:700px) {
  .production-spec-grid { grid-template-columns:1fr 1fr; }
  .proof-stage { grid-template-columns:1fr; }
  .proof-back-side { display:none; }
  .production-proof-modal { padding:14px; }
  .proof-card-shell { width:min(100%,330px); }
  .proof-actions > button { flex:1 1 180px; }
}

.moderation-backdrop { z-index:330; }
.moderation-modal {
  width:min(760px,96vw);
  max-height:90vh;
  overflow:auto;
  padding:18px;
  border:1px solid #765f32;
  border-radius:12px;
  background:#0e1418;
  box-shadow:0 24px 90px rgba(0,0,0,.72);
}
.moderation-toolbar {
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:center;
  margin:12px 0;
  color:#c4ccd1;
}
.moderation-list { display:grid; gap:10px; }
.moderation-row {
  display:grid;
  gap:8px;
  padding:12px;
  border:1px solid #3d4952;
  border-radius:10px;
  background:#10181d;
}
.moderation-row-head {
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
}
.moderation-row-head > div { display:grid; gap:2px; }
.moderation-row p { margin:0; color:#c4cbd0; line-height:1.5; }
.moderation-reason {
  padding:4px 7px;
  border:1px solid #72584a;
  border-radius:999px;
  color:#e5b99f;
  font-size:10px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.05em;
}
.moderation-actions { display:flex; gap:7px; flex-wrap:wrap; }
.account-admin-link { color:#edc86f !important; }

.community-project-picker-backdrop { position:fixed; inset:0; z-index:110; display:grid; place-items:center; padding:18px; background:rgba(0,0,0,.72); }
.community-project-picker { width:min(520px,96vw); max-height:min(650px,85vh); overflow:auto; padding:14px; border:1px solid #765f32; border-radius:12px; background:#10161a; box-shadow:0 20px 70px rgba(0,0,0,.65); }
.community-project-list { display:grid; gap:7px; margin-top:10px; }
@media (max-width:700px) { .account-credit-summary { grid-template-columns:1fr; } .community-actions { flex-wrap:wrap; } }


/* v3.6 — canon rules, advanced generation, sync and flexible frames */
.generated-whole-card { aspect-ratio: 5 / 7; background:#080808; }
.generated-whole-card-image { display:block; width:100%; height:100%; object-fit:contain; }
/* A v2 11:15 Whole Card contains printer bleed. Show the central 5:7 trimmed area only. */
.generated-whole-euro-bleed > .generated-whole-card-image { position:absolute; left:50%; top:50%; width:110%; height:107.142857%; max-width:none; transform:translate(-50%, -50%); object-fit:fill; }
.task-subtype-picker { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:8px; }
.task-subtype-picker .selected { border-color:#d8ad56; color:#f2cf84; box-shadow:0 0 0 1px rgba(216,173,86,.2); }
.contextual-sidebar-priority { border:1px solid #765d31; border-radius:9px; padding:10px; margin-bottom:14px; background:rgba(34,28,18,.38); }
.contextual-sidebar-priority .panel-heading { border-top:0!important; padding-top:0!important; margin-top:0!important; }
.advanced-whole-card { margin-top:14px; border:1px solid #3e4952; border-radius:8px; background:#0d1318; overflow:hidden; }
.advanced-whole-card summary { cursor:pointer; padding:10px 12px; color:#b7aa91; font-size:12px; letter-spacing:.03em; }
.advanced-whole-card[open] summary { color:#e8d7b2; border-bottom:1px solid #303a42; }
.advanced-whole-card-body { display:grid; gap:9px; padding:12px; }
.advanced-whole-card-body .whole-card-full-bleed-toggle {
  display:flex;
  align-items:center;
  gap:8px;
  min-height:36px;
  font-size:14px;
  cursor:pointer;
}
.whole-card-full-bleed-toggle input { margin:0; }
.advanced-whole-card-warning { color:#c9a56a; font-size:11px; line-height:1.4; }
/* Recovery remains discoverable but secondary to paid Whole Card generation. */
.advanced-whole-card-body .whole-card-recover-link {
  justify-self:end;
  width:auto;
  min-height:30px;
  padding:3px 2px;
  border:0;
  border-radius:0;
  background:transparent;
  color:#919aa2;
  box-shadow:none;
  font-size:11px;
  font-weight:400;
  text-decoration:underline;
  text-underline-offset:2px;
  cursor:pointer;
}
.advanced-whole-card-body .whole-card-recover-link:hover,
.advanced-whole-card-body .whole-card-recover-link:focus-visible { color:#e0c38b; }
.advanced-whole-card-body .whole-card-recover-link:disabled { opacity:.55; cursor:default; }
.library-head-actions { display:flex; gap:8px; align-items:center; }
.bundle-count-picker { display:grid; gap:6px; margin:12px 0; color:#ded8cc; font-size:12px; }
.bundle-count-picker small { color:#919aa2; }
.landing-full-rules-link { margin:22px 0 0; text-align:center; }
.full-rules-modal { width:min(860px,100%); max-height:90vh; overflow:auto; border:1px solid #8d6a31; border-radius:12px; background:linear-gradient(180deg,#171c21,#0d1115); box-shadow:0 25px 80px rgba(0,0,0,.65); padding:20px; }
.full-rules-content { display:grid; gap:18px; }
.full-rules-content article { border-top:1px solid #38434c; padding-top:15px; }
.full-rules-content article:first-child { border-top:0; padding-top:0; }
.full-rules-content h3 { margin:0 0 8px; font-family:Georgia,serif; color:#ead8b3; }
.full-rules-content p { margin:7px 0; color:#d5d0c7; line-height:1.58; }


/* v3.6.1 — direct typing on the card preview */
.direct-edit-preview .preview-title,
.direct-edit-preview .preview-text {
  pointer-events:auto;
}
.direct-edit-preview .inline-card-text {
  cursor:text;
}
.direct-edit-preview .inline-card-text.locked {
  cursor:not-allowed;
}
.direct-edit-preview .inline-card-text-editor {
  z-index:24;
  pointer-events:auto;
  user-select:text;
  -webkit-user-select:text;
  outline:1px dashed rgba(245,199,92,.95);
  outline-offset:2px;
  cursor:text;
  caret-color:#7b3e00;
  overflow:auto;
}
.direct-edit-preview .inline-card-text-editor:empty::before {
  content:attr(data-placeholder);
  opacity:.48;
  pointer-events:none;
}
.direct-edit-preview .inline-card-text-editor:focus {
  box-shadow:0 0 0 3px rgba(245,199,92,.13);
}


/* v3.6.2 — permanent canon rules at bottom of homepage */
.landing-full-rules-section {
  padding:110px clamp(24px,7vw,120px);
  background:linear-gradient(180deg,#0b0e11,#11161a 55%,#090b0d);
  border-top:1px solid #273139;
  scroll-margin-top:84px;
}
.landing-full-rules-head {
  max-width:850px;
  margin:0 auto 46px;
  text-align:center;
}
.landing-full-rules-head h2 {
  font-family:Georgia,serif;
  font-size:clamp(42px,5vw,72px);
  line-height:1.02;
  margin:12px 0 16px;
}
.landing-full-rules-head p {
  color:#a8b1b6;
  font-size:17px;
  line-height:1.55;
}
.landing-full-rules-grid {
  max-width:1120px;
  margin:0 auto;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:18px;
}
.landing-full-rules-grid article {
  padding:24px 26px;
  border:1px solid #34414a;
  border-radius:14px;
  background:linear-gradient(145deg,rgba(24,31,36,.92),rgba(10,13,16,.96));
}
.landing-full-rules-grid h3 {
  margin:0 0 10px;
  font-family:Georgia,serif;
  color:#ead8b3;
  font-size:23px;
}
.landing-full-rules-grid p {
  margin:8px 0;
  color:#d2cec6;
  line-height:1.58;
}
@media (max-width:760px) {
  .landing-full-rules-section { padding:80px 20px; }
  .landing-full-rules-grid { grid-template-columns:1fr; }
}


/* v3.6.3 — final generator polish */
.sr-only {
  position:absolute !important;
  width:1px !important;
  height:1px !important;
  padding:0 !important;
  margin:-1px !important;
  overflow:hidden !important;
  clip:rect(0,0,0,0) !important;
  white-space:nowrap !important;
  border:0 !important;
}
.border-style-option { padding:5px; }
.border-style-option span.sr-only { padding:0; }
.simple-image-toggle {
  display:grid !important;
  gap:5px !important;
  padding:10px 11px;
  border:1px solid #46535c;
  border-radius:8px;
  background:rgba(17,23,28,.72);
}
.simple-image-toggle-row {
  display:flex;
  align-items:center;
  gap:8px;
}
.simple-image-toggle-row input {
  width:auto;
  margin:0;
  accent-color:#d6a94f;
}
.simple-image-toggle .microcopy {
  font-weight:400;
  color:#98a3aa;
  line-height:1.4;
}
/* The original green alchemy PNG has white pixels in its extreme rounded corners.
   Clip only that frame to its intended rounded silhouette so the site/print compositor
   treats those corners as transparent without affecting any other template. */
.template-overlay[src$="item-alchemist-green-v1.png"],
.border-style-option img[src$="item-alchemist-green-v1.png"] {
  clip-path: inset(0 round 3.25%);
}


/* Generator final polish — the source alchemist frame has white pixels outside
   its rounded outer border. Clip only those sacrificial outer corners; the card
   artwork window and frame itself remain untouched. */
.template-item-alchemist-green-v1 .template-overlay,
.border-style-option.template-item-alchemist-green-v1 img {
  clip-path: inset(0 round 3.8%);
}


/* Keep full-card artwork behind the gold cherub Item frame, but do not let it
   show through the transparent pixels outside the frame's rounded outer silhouette. */
.template-item-cherub-skull-gold-v1 .preview-art {
  clip-path: inset(0 round 3.8%);
}

/* Generator final polish — whole-card categorization + square artwork option */
.whole-card-type-review {
  width:min(100%, 560px);
  margin:10px auto 4px;
  padding:11px 12px;
  display:grid;
  gap:7px;
  border:1px solid #70582f;
  border-radius:9px;
  background:rgba(30,24,15,.92);
  color:#ded6c6;
  font-size:12px;
}
.whole-card-type-review > span { color:#aaa294; }
.whole-card-type-buttons {
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  align-items:center;
}
.whole-card-type-buttons .selected {
  border-color:#d7ad59;
  color:#f1cf86;
  box-shadow:0 0 0 1px rgba(215,173,89,.18);
}
.square-artwork-toggle {
  display:flex !important;
  align-items:center;
  gap:7px;
  padding:7px 9px;
  border:1px solid #3c4851;
  border-radius:7px;
  background:#0d1318;
  color:#d8d2c7;
  font-size:11px;
  cursor:pointer;
}
.square-artwork-toggle input { margin:0; }
/* Keep saved native-Euro cards' centered bleed positioning intact.
   The generic Whole Card rule must not reset the Euro image's left/top to 0. */
.generated-whole-card .generated-whole-card-image {
  position:absolute;
  z-index:1;
}
.generated-whole-card:not(.generated-whole-euro-bleed) > .generated-whole-card-image {
  inset:0;
}
.generated-whole-card .preview-title,
.generated-whole-card .preview-text {
  z-index:6;
  text-shadow:0 1px 2px rgba(255,255,255,.35), 0 0 2px rgba(255,255,255,.25);
}
@media (max-width:760px) {
  .whole-card-type-review { width:min(92vw,390px); font-size:10px; }
  .whole-card-type-buttons { gap:4px; }
}




/* Kickstarter prepaid deck setup */
.kickstarter-reward-actions {
  display:flex;
  align-items:flex-end;
  justify-content:flex-end;
  gap:8px;
  flex-direction:column;
}
.kickstarter-people-choice {
  display:flex;
  gap:8px;
  margin:14px 0;
}
.kickstarter-people-choice button { flex:1; }
.kickstarter-allocation-preview { margin-top:12px; }
.kickstarter-deck-setup { max-width:620px; }
@media (max-width:760px) {
  .kickstarter-reward-actions { align-items:stretch; }
  .kickstarter-people-choice { flex-direction:column; }
}


/* v3.9 — checkout preparation + private production order queue */
.checkout-backdrop,.admin-orders-backdrop{z-index:350}
.checkout-modal{width:min(760px,96vw);max-height:94dvh;overflow:auto;padding:18px;border:1px solid #765f32;border-radius:14px;background:linear-gradient(180deg,#141a1f,#090d10);box-shadow:0 28px 90px rgba(0,0,0,.75)}
.checkout-safety-note{display:grid;gap:6px;margin:12px 0;padding:12px;border:1px solid rgba(197,139,44,.38);border-radius:10px;background:rgba(197,139,44,.07);color:#d9cba8;font-size:12px;line-height:1.45}
.checkout-safety-note.compact{margin:8px 0 0;padding:8px 10px;font-size:10px}
.checkout-projects{display:grid;gap:8px;margin:14px 0}
.checkout-project-row{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:10px 11px;border:1px solid #394650;border-radius:9px;background:#0d1317}
.checkout-project-row>div{display:grid;gap:3px}
.checkout-project-row>div span{color:#96a1a8;font-size:11px;text-transform:capitalize}
.checkout-proof-ok{color:#acd5b3;font-size:11px;font-weight:800}
.checkout-proof-missing{color:#e0a0a0;font-size:11px;font-weight:800}
.checkout-form{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:15px 0}
.checkout-form label{display:grid;gap:6px;color:#ddd6c9;font-size:12px;font-weight:700}
.checkout-form .checkout-wide{grid-column:1/-1}
.checkout-form textarea{resize:vertical}
.checkout-success{text-align:center;display:grid;gap:12px;padding:8px 0}
.checkout-success-mark{font-size:50px;color:#9fd0a7}
.checkout-success h3{margin:0;color:#f0d28b;font-size:26px}
.checkout-success p{margin:0;color:#b7c0c5;line-height:1.5}
.checkout-status-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px;text-align:left}
.checkout-status-grid>div{display:grid;gap:3px;padding:11px;border:1px solid #394650;border-radius:9px;background:#0d1317}
.checkout-status-grid span{color:#8f9aa1;font-size:10px;text-transform:uppercase;letter-spacing:.05em}
.checkout-status-grid strong{color:#eee5d3;font-size:13px}

.admin-orders-modal{width:min(1050px,96vw);max-height:94dvh;overflow:auto;padding:18px;border:1px solid #765f32;border-radius:14px;background:linear-gradient(180deg,#141a1f,#090d10);box-shadow:0 28px 90px rgba(0,0,0,.8)}
.admin-orders-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:12px 0;color:#aeb8bd;font-size:12px}
.admin-orders-list{display:grid;gap:12px}
.admin-order-card{display:grid;gap:10px;padding:13px;border:1px solid #3a4751;border-radius:11px;background:#0c1115}
.admin-order-head{display:flex;justify-content:space-between;gap:14px;align-items:flex-start}
.admin-order-head>div:first-child{display:grid;gap:3px}
.admin-order-head>div:first-child strong{color:#f0d28b;font-size:16px}
.admin-order-head span{color:#8f9aa1;font-size:10px}
.admin-order-status{display:grid;gap:2px;text-align:right;text-transform:capitalize}
.admin-order-status b{color:#c8d5ca;font-size:11px}
.admin-order-customer{display:grid;gap:3px;padding:10px;border:1px solid #303c45;border-radius:8px;background:#0a0f12}
.admin-order-customer span,.admin-order-note span{color:#aeb8bd;font-size:11px;line-height:1.45}
.admin-order-note{display:grid;gap:4px;padding:8px 10px;border-left:2px solid #8a6b2f;background:#13110c}
.admin-order-projects{display:grid;gap:7px}
.admin-order-project{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:9px 10px;border:1px solid #34414a;border-radius:8px}
.admin-order-project>div{display:grid;gap:2px}
.admin-order-project span{color:#929ea5;font-size:10px}
.admin-order-download{text-decoration:none;text-align:center}

@media (max-width:700px){
  .checkout-modal,.admin-orders-modal{width:100vw;max-height:100dvh;border-radius:0;padding:14px}
  .checkout-form{grid-template-columns:1fr}
  .checkout-form .checkout-wide{grid-column:auto}
  .checkout-status-grid{grid-template-columns:1fr}
  .checkout-project-row,.admin-order-head,.admin-order-project{align-items:flex-start;flex-direction:column}
  .admin-order-status{text-align:left}
  .admin-order-download{width:100%}
}


/* v3.9.2 — order history + ordered Deck Project locking */
.account-order-history { margin:16px 0; display:grid; gap:8px; }
.account-order-history-head { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.account-order-row { display:grid; gap:7px; padding:11px 12px; border:1px solid #35424b; border-radius:10px; background:#0c1216; }
.account-order-title,.account-order-status { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.account-order-title span,.account-order-status span,.account-order-projects span { color:#aeb6ba; font-size:11px; }
.account-order-status span:first-child { color:#e3c16d; text-transform:capitalize; }
.account-order-projects { display:grid; gap:3px; }
.project-ordered-badge { display:inline-flex; align-items:center; min-height:32px; padding:5px 9px; border:1px solid #715d35; border-radius:8px; color:#e4c879; background:rgba(121,91,35,.13); font-size:11px; font-weight:800; }
.project-ordered-note { margin:10px 0; padding:11px 12px; border:1px solid rgba(192,151,65,.45); border-radius:9px; color:#d7cfbd; background:rgba(123,89,28,.10); font-size:12px; line-height:1.45; }
@media (max-width:760px) {
  .account-order-title,.account-order-status { align-items:flex-start; flex-direction:column; gap:3px; }
  .project-ordered-badge { width:100%; justify-content:center; }
}

.account-order-cancel { justify-self:start; margin-top:2px; }

/* v3.9.3 — clearer Community moderation controls */
.community-report-button {
  border-color:rgba(180,88,72,.55) !important;
  color:#e8b3a7 !important;
}
.community-report-button:hover {
  border-color:rgba(214,112,91,.8) !important;
  color:#f2c3b8 !important;
  background:rgba(120,45,35,.16) !important;
}
.community-mature-flag.flagged { font-weight:700; }


/* v3.9.4 — Kickstarter fulfillment + admin production workflow */
.kickstarter-submit-backdrop { z-index:360; }
.kickstarter-submit-modal { width:min(720px,95vw); max-height:92vh; overflow:auto; }
.kickstarter-submit-summary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin:12px 0; }
.kickstarter-submit-summary > div { display:grid; gap:3px; padding:10px; border:1px solid #3a4650; border-radius:9px; background:#0d1317; }
.kickstarter-submit-summary span { color:#aeb6ba; font-size:10px; text-transform:uppercase; letter-spacing:.08em; }
.kickstarter-submit-summary strong { color:#ead08a; }
.kickstarter-production-state { display:grid; gap:8px; margin:12px 0; padding:11px 12px; border:1px solid #40505a; border-radius:9px; background:#0b1115; }
.kickstarter-production-state.ready { border-color:#536d4d; }
.kickstarter-production-state.missing { border-color:#786035; }
.order-source-badge { display:inline-flex; margin-left:8px; padding:2px 6px; border-radius:999px; font-size:8px; font-weight:800; letter-spacing:.06em; text-transform:uppercase; vertical-align:middle; }
.order-source-badge.kickstarter { color:#efd27c; border:1px solid rgba(222,177,71,.55); background:rgba(115,83,24,.18); }
.admin-order-filters { display:flex; flex-wrap:wrap; gap:6px; margin:0 0 12px; }
.admin-order-fulfillment-actions { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-top:9px; }
@media (max-width:760px) {
  .kickstarter-submit-summary { grid-template-columns:1fr; }
  .kickstarter-submit-modal { width:95vw; }
}


/* v3.9.6 — admin-only reversible public card hiding */
.community-card.admin-hidden-card {
  opacity:.62;
  border-style:dashed;
}
.community-admin-hidden-badge {
  display:inline-flex;
  width:max-content;
  margin-top:2px;
  padding:2px 6px;
  border:1px dashed rgba(190,190,190,.48);
  border-radius:999px;
  color:#b9b9b9;
  font-size:9px;
  font-weight:700;
  letter-spacing:.05em;
  text-transform:uppercase;
}
.community-admin-hide-button {
  appearance:none;
  border:0;
  background:transparent;
  color:#778187;
  padding:2px 4px;
  font-size:9px;
  line-height:1;
  text-transform:lowercase;
  cursor:pointer;
  opacity:.7;
}
.community-admin-hide-button:hover { color:#c7cdd0; opacity:1; text-decoration:underline; }


/* v3.9.7 — proof overlay + non-destructive frame overflow masking */
.proof-card { isolation:isolate; }
.proof-card > .card-preview,
.proof-card > img { position:relative; z-index:1; }
.proof-watermark { z-index:1000; }

/*
  CardPreview clips only the outer artwork visibility using per-frame template
  metadata. The source image and its saved transform remain untouched, so old
  cards never move when this rendering improvement is applied.
*/
.preview-art { will-change:clip-path; }


/* v3.10 — TGC-first admin production queue */
.admin-orders-toolbar-actions{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end}
.admin-order-project.admin-order-project-tgc{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:12px;
  padding:11px 12px;
  background:#0b1115;
}
.admin-order-project.admin-order-project-tgc.ready{
  border-color:#4f6b55;
  background:rgba(61,91,67,.09);
}
.admin-order-project.admin-order-project-tgc.failed{
  border-color:#7b4848;
  background:rgba(110,51,51,.09);
}
.admin-order-project-main{display:grid;gap:7px;min-width:0}
.admin-order-project-title{display:flex;align-items:baseline;justify-content:space-between;gap:10px}
.admin-order-project-title strong{color:#eee5d3}
.admin-tgc-state{display:grid;gap:2px}
.admin-tgc-state strong{color:#d8c78f;font-size:11px;text-transform:capitalize}
.admin-tgc-state span{color:#929ea5;font-size:10px;overflow-wrap:anywhere}
.admin-tgc-state .admin-tgc-error{color:#e5a2a2}
.admin-tgc-progress{width:100%;height:7px;accent-color:#c89d49}
.admin-order-project-actions{display:flex;align-items:center;justify-content:flex-end;gap:7px;flex-wrap:wrap}
.admin-tgc-ready{color:#a9d5b0;font-size:11px;font-weight:800;white-space:nowrap}
.admin-orders-message{
  position:sticky;
  bottom:0;
  z-index:2;
  padding:10px 12px;
  border:1px solid #6a552d;
  border-radius:9px;
  background:rgba(16,15,11,.96);
  box-shadow:0 -8px 24px rgba(0,0,0,.35);
}
@media (max-width:700px){
  .admin-orders-toolbar{align-items:flex-start;flex-direction:column}
  .admin-orders-toolbar-actions{width:100%;justify-content:flex-start}
  .admin-order-project.admin-order-project-tgc{grid-template-columns:1fr}
  .admin-order-project-title{align-items:flex-start;flex-direction:column;gap:2px}
  .admin-order-project-actions{justify-content:flex-start;width:100%}
  .admin-order-project-actions .primary,.admin-order-project-actions .secondary{width:100%}
}


/* v3.10.1 — adaptive mobile editor preview
   Keep the card large for direct manipulation, collapse it while the user is
   working farther down the form, and make it extra-small while the software
   keyboard is open so focused controls remain usable. */
.mobile-preview-expand-hit { display:none; }

@media (max-width:760px) {
  .preview-panel,
  .preview-stage,
  .preview-stage > .card-preview {
    transition:width .18s ease, max-width .18s ease, padding .18s ease, margin .18s ease;
  }

  .preview-panel.mobile-preview-compact {
    padding:4px !important;
  }
  .preview-panel.mobile-preview-compact .preview-stage {
    padding:0 36px !important;
  }
  .preview-panel.mobile-preview-compact .preview-stage > .card-preview,
  .preview-panel.mobile-preview-compact .preview-stage > .card-preview.direct-edit-preview {
    width:min(46vw, 165px) !important;
    max-width:165px !important;
    margin:0 auto 3px !important;
  }
  .preview-panel.mobile-preview-compact > .contextual-editor-controls {
    display:none !important;
  }
  .preview-panel.mobile-preview-compact .mobile-history-button {
    width:32px;
    height:38px;
    font-size:20px;
  }

  /* In compact mode the first tap expands the card instead of accidentally
     moving artwork/text on a tiny target. Direct editing resumes immediately
     once the larger preview is restored. */
  .preview-panel.mobile-preview-compact .mobile-preview-expand-hit {
    display:flex;
    position:absolute;
    z-index:50;
    top:0;
    left:50%;
    transform:translateX(-50%);
    width:min(46vw, 165px);
    max-width:165px;
    aspect-ratio:5 / 7;
    align-items:flex-end;
    justify-content:center;
    padding:0 0 7px;
    border:0;
    border-radius:6px;
    background:transparent;
    color:#f0d078;
    touch-action:manipulation;
  }
  .preview-panel.mobile-preview-compact .mobile-preview-expand-hit span {
    padding:3px 7px;
    border:1px solid rgba(203,160,72,.55);
    border-radius:999px;
    background:rgba(8,11,14,.86);
    box-shadow:0 2px 8px rgba(0,0,0,.55);
    font-size:8px;
    font-weight:800;
    letter-spacing:.04em;
    text-transform:uppercase;
    pointer-events:none;
  }

  /* Android/iOS software keyboards leave little visual viewport height.
     Reclaim the bottom-nav space and reduce the sticky card to a true reference
     thumbnail while a form control is being edited. */
  .app-shell.mobile-keyboard-open .mobile-bottom-nav {
    display:none !important;
  }
  .app-shell.mobile-keyboard-open .preview-panel {
    padding:3px !important;
  }
  .app-shell.mobile-keyboard-open .preview-stage {
    padding:0 24px !important;
  }
  .app-shell.mobile-keyboard-open .preview-stage > .card-preview,
  .app-shell.mobile-keyboard-open .preview-stage > .card-preview.direct-edit-preview {
    width:min(30vw, 110px) !important;
    max-width:110px !important;
    margin:0 auto 2px !important;
  }
  .app-shell.mobile-keyboard-open .preview-panel > .contextual-editor-controls,
  .app-shell.mobile-keyboard-open .mobile-history-button,
  .app-shell.mobile-keyboard-open .mobile-preview-expand-hit {
    display:none !important;
  }

  .app-shell.mobile-keyboard-open .left-panel input:focus,
  .app-shell.mobile-keyboard-open .left-panel textarea:focus,
  .app-shell.mobile-keyboard-open .left-panel select:focus,
  .app-shell.mobile-keyboard-open .right-panel input:focus,
  .app-shell.mobile-keyboard-open .right-panel textarea:focus,
  .app-shell.mobile-keyboard-open .right-panel select:focus {
    scroll-margin-top:245px;
    scroll-margin-bottom:18px;
  }
}


/* v3.10.2 — AI artwork fill + reinterpret */
.preview-ai-art-actions {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:7px;
  width:100%;
}
.preview-ai-art-actions > button { width:100%; }

/* Free, local extension is deliberately separate from the paid AI Fill action. */
.mirror-edge-controls {
  border:1px solid #41505a;
  border-radius:7px;
  padding:6px 8px;
  background:#101821;
  min-width:0;
}
.mirror-edge-controls summary {
  cursor:pointer;
  font-size:11px;
  color:#e2d3ac;
  font-weight:650;
}
.mirror-edge-options {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(96px,1fr));
  gap:5px;
  margin-top:8px;
}
.mirror-edge-options button {
  min-width:0;
  font-size:10px;
  padding:7px 4px;
}
.mirror-edge-controls .microcopy { margin:7px 0 1px; }
.preview-manual-column .mirror-edge-controls { width:100%; }


/* v3.13.x — compact desktop action block: primary AI left, save/upload right */
@media (min-width:761px) {
  .preview-panel > .preview-actions {
    grid-template-columns:minmax(0,1.08fr) minmax(0,.92fr) !important;
    gap:7px !important;
    align-items:start;
  }
  .preview-panel > .preview-actions > .square-artwork-toggle {
    grid-column:1 / -1;
  }
  .preview-ai-column,
  .preview-manual-column {
    display:grid;
    gap:6px;
    min-width:0;
  }
  .preview-generate-artwork {
    width:100%;
    min-height:58px !important;
    padding:9px 10px !important;
    font-size:10.5px !important;
  }
  .preview-ai-art-actions {
    gap:5px;
  }
  .preview-ai-art-actions > button {
    min-height:31px !important;
    padding:5px 6px !important;
    font-size:9px !important;
  }
  .preview-save-publish-row {
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:5px;
    width:100%;
  }
  .preview-save-publish-row > button {
    width:100%;
    min-width:0;
    min-height:31px !important;
    padding:5px 5px !important;
    font-size:9px !important;
  }
  .preview-save-publish-row > button[data-testid="share-card-current"] {
    grid-column:1 / -1;
  }
  .preview-manual-column > .own-artwork-upload {
    display:grid;
    gap:5px;
    width:100%;
    min-width:0;
  }
  .preview-manual-column > .own-artwork-upload > button {
    width:100%;
    min-height:34px !important;
    padding:6px 8px !important;
    font-size:9.5px !important;
  }
  .preview-manual-column > .own-artwork-upload > .microcopy {
    margin:0;
    font-size:9px;
    line-height:1.3;
  }
}

.contextual-ai-art-row {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:5px;
}
.contextual-ai-art-row > button {
  width:100%;
  min-height:30px !important;
  padding:5px 6px !important;
  font-size:8.5px !important;
}

@media (max-width:760px) {
  .preview-ai-art-actions { display:none; }
}

/* v3.10.3 — quiet "wrong card type" recovery */
.wrong-type-tools {
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:6px;
  margin-top:5px;
}
.wrong-type-toggle {
  appearance:none;
  border:0;
  background:transparent;
  color:#69747a;
  padding:2px 1px;
  font-size:9px;
  line-height:1.1;
  cursor:pointer;
  opacity:.78;
}
.wrong-type-toggle:hover,
.wrong-type-toggle:focus-visible {
  color:#c5aa6a;
  opacity:1;
  text-decoration:underline;
}
.wrong-type-chooser {
  width:100%;
  display:grid;
  gap:7px;
  padding:8px 9px;
  border:1px solid #37434a;
  border-radius:8px;
  background:#0b1013;
}
.wrong-type-chooser > span {
  color:#c8b985;
  font-size:9px;
  font-weight:700;
}
.wrong-type-buttons {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:5px;
}
.wrong-type-buttons button {
  min-width:0;
  min-height:30px;
  padding:5px 4px;
  border:1px solid #45515a;
  border-radius:7px;
  background:#10161b;
  color:#c9ced0;
  font-size:9px;
}
.wrong-type-buttons button span {
  margin-right:3px;
}
.wrong-type-buttons button:hover:not(:disabled) {
  border-color:#a9813e;
  color:#edd391;
}
.wrong-type-buttons button.selected,
.wrong-type-buttons button:disabled {
  opacity:.38;
  cursor:default;
}
.wrong-type-chooser small {
  color:#667178;
  font-size:8px;
  line-height:1.35;
}

@media (max-width:760px) {
  .wrong-type-toggle {
    font-size:8.5px;
  }
  .wrong-type-chooser {
    padding:7px;
  }
  .wrong-type-buttons {
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}


/* v3.10.4 — optional AI Fill artwork guidance */
.artwork-fill-backdrop { z-index:365; }
.artwork-fill-modal {
  width:min(520px,94vw);
  padding:18px;
  border:1px solid #765f32;
  border-radius:14px;
  background:linear-gradient(180deg,#141a1f,#090c0f);
  box-shadow:0 28px 90px rgba(0,0,0,.82);
}
.artwork-fill-description {
  margin:14px 0 12px;
  color:#c4c9c9;
  font-size:12px;
  line-height:1.5;
}
.artwork-fill-guidance-toggle {
  display:flex;
  align-items:flex-start;
  gap:10px;
  padding:12px;
  border:1px solid #3c4850;
  border-radius:9px;
  background:#0b1013;
  cursor:pointer;
}
.artwork-fill-guidance-toggle input {
  width:17px;
  height:17px;
  margin:1px 0 0;
  flex:0 0 auto;
  accent-color:#c89d49;
}
.artwork-fill-guidance-copy {
  display:grid;
  gap:4px;
}
.artwork-fill-guidance-copy strong {
  color:#e7d59d;
  font-size:12px;
}
.artwork-fill-guidance-copy small {
  color:#89949a;
  font-size:10px;
  line-height:1.45;
}
.artwork-fill-actions {
  display:flex;
  justify-content:flex-end;
  gap:8px;
  margin-top:16px;
}
.artwork-fill-actions button { min-width:130px; }

@media (max-width:760px) {
  .artwork-fill-modal {
    width:min(94vw,520px);
    padding:14px;
  }
  .artwork-fill-actions button {
    flex:1;
    min-width:0;
  }
}


/* v3.10.5 — two-stage mobile text editing
   Form fields still get the compact keyboard layout, but direct typing on the
   card keeps the normal large preview so the text remains comfortable to edit. */
@media (max-width:760px) {
  .app-shell.mobile-keyboard-open.card-text-editing .preview-panel {
    padding:8px !important;
  }
  .app-shell.mobile-keyboard-open.card-text-editing .preview-stage {
    padding:0 44px !important;
  }
  .app-shell.mobile-keyboard-open.card-text-editing .preview-stage > .card-preview,
  .app-shell.mobile-keyboard-open.card-text-editing .preview-stage > .card-preview.direct-edit-preview {
    width:min(70vw, 255px) !important;
    max-width:255px !important;
    margin:0 auto 5px !important;
  }
}


/* v3.10.7 — first-time card-type Creator Tips */
.creator-tip-backdrop {
  z-index:96;
  align-items:flex-start;
  padding:5vh 16px;
  overflow:auto;
}
.creator-tip-modal {
  width:min(720px,96vw);
  max-height:90vh;
  overflow:auto;
  padding:20px;
  border:1px solid #725a2d;
  border-radius:16px;
  background:linear-gradient(180deg,#141a1f,#090c0f);
  box-shadow:0 30px 100px rgba(0,0,0,.84);
}
.creator-tip-kicker {
  margin-bottom:5px;
  color:#d7aa50;
  font-size:10px;
  font-weight:850;
  letter-spacing:.18em;
}
.creator-tip-copy {
  display:grid;
  gap:10px;
}
.creator-tip-copy p {
  margin:0;
  color:#c2c9cd;
  font-size:14px;
  line-height:1.55;
}
.creator-tip-emphasis {
  margin-top:2px;
  padding:12px 14px;
  border:1px solid rgba(216,173,75,.42);
  border-radius:10px;
  background:rgba(177,124,36,.10);
  color:#f0d48e;
  font-family:Georgia,serif;
  font-size:16px;
  font-weight:700;
  line-height:1.4;
}
.creator-tip-example {
  margin-top:2px;
  border:1px solid #39464f;
  border-radius:10px;
  background:#0d1317;
  overflow:hidden;
}
.creator-tip-example summary {
  cursor:pointer;
  padding:11px 13px;
  color:#e5c879;
  font-size:13px;
  font-weight:800;
  user-select:none;
}
.creator-tip-example[open] summary {
  border-bottom:1px solid #334049;
}
.creator-tip-example-body {
  display:grid;
  gap:7px;
  padding:12px 13px 13px;
}
.creator-tip-example-body strong {
  color:#f0dfb8;
  font-family:Georgia,serif;
  font-size:17px;
}
.creator-tip-example-body p {
  color:#b7c0c5;
  font-size:13px;
}
.creator-tip-footer {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin-top:18px;
  padding-top:14px;
  border-top:1px solid #303b43;
}
.creator-tip-footer .muted {
  font-size:11px;
}
.creator-tip-footer-nav {
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}
.creator-tip-back-button {
  font-size:12px;
  padding:6px 10px;
  white-space:nowrap;
}
.creator-tip-emergency {
  border-color:#7e4738;
}
.creator-tip-emergency .creator-tip-kicker {
  color:#e28b6e;
}
.creator-tip-emergency .creator-tip-emphasis {
  border-color:rgba(199,82,54,.48);
  background:rgba(143,43,25,.12);
  color:#f0b39f;
}

@media (max-width:760px) {
  .creator-tip-backdrop { padding:0; }
  .creator-tip-modal {
    width:100vw;
    max-height:100dvh;
    min-height:100dvh;
    border-radius:0;
    padding:14px;
  }
  .creator-tip-copy p { font-size:13px; }
  .creator-tip-footer {
    position:sticky;
    bottom:-14px;
    margin:16px -14px -14px;
    padding:12px 14px calc(12px + env(safe-area-inset-bottom));
    background:rgba(8,11,14,.97);
    flex-direction:column;
    align-items:stretch;
  }
  .creator-tip-footer .primary { width:100%; }
}


/* v3.10.8 — newsletter shortcuts + low-credit offer */
.account-email-list-box {
  margin:12px 0 16px;
  padding:12px 13px;
  border:1px solid rgba(208,163,74,.34);
  border-radius:10px;
  background:linear-gradient(135deg,rgba(181,129,38,.09),rgba(8,12,15,.72));
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.account-email-list-box > div { display:grid; gap:3px; }
.account-email-list-box strong { color:#ead9b0; font-family:Georgia,serif; }
.account-email-list-status { color:#a7b1b7; font-size:11px; line-height:1.35; }
.account-email-list-status.confirmed { color:#9bd6aa; }
.account-email-list-status.pending { color:#e1c278; }

.low-credit-email-backdrop { z-index:99; }
.low-credit-email-modal {
  width:min(520px,94vw);
  padding:22px;
  border:1px solid #785d2d;
  border-radius:15px;
  background:linear-gradient(180deg,#151b20,#090c0f);
  box-shadow:0 30px 100px rgba(0,0,0,.85);
}
.low-credit-email-kicker {
  margin-bottom:5px;
  color:#d8aa4e;
  font-size:10px;
  font-weight:850;
  letter-spacing:.18em;
}
.low-credit-email-modal h2 {
  margin:0 0 10px;
  color:#f1e3c5;
  font-family:Georgia,serif;
  font-size:28px;
}
.low-credit-email-modal p {
  margin:0;
  color:#b9c2c7;
  line-height:1.55;
  font-size:14px;
}
.low-credit-email-actions {
  display:flex;
  gap:9px;
  flex-wrap:wrap;
  margin-top:18px;
}
@media (max-width:760px) {
  .account-email-list-box { align-items:stretch; flex-direction:column; }
  .account-email-list-box .secondary { width:100%; }
  .low-credit-email-modal { padding:18px; }
  .low-credit-email-actions { flex-direction:column; }
  .low-credit-email-actions button { width:100%; }
}


/* v3.11 — prepaid retail commerce + launch-safe checkout */
.bundle-credit-inclusion {
  display:grid;
  gap:2px;
  margin:10px 0;
  padding:9px 10px;
  border:1px solid rgba(211,168,79,.38);
  border-radius:8px;
  background:rgba(176,124,36,.08);
}
.bundle-credit-inclusion strong { color:#efcf82; font-size:13px; }
.bundle-credit-inclusion span { color:#929da4; font-size:10px; }

.admin-checkout-control {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin:0 0 12px;
  padding:12px 14px;
  border:1px solid #6b5630;
  border-radius:10px;
  background:#101519;
}
.admin-checkout-control > div { display:grid; gap:3px; }
.admin-checkout-control strong { font-family:Georgia,serif; }
.admin-checkout-control span { color:#9ba6ac; font-size:11px; }
.admin-checkout-control.paused { border-color:#665c4a; }
.admin-checkout-control.paused strong { color:#e2c47e; }
.admin-checkout-control.live {
  border-color:rgba(91,184,116,.58);
  background:rgba(44,111,61,.10);
}
.admin-checkout-control.live strong { color:#9fe0ae; }

@media (max-width:760px) {
  .admin-checkout-control { align-items:stretch; flex-direction:column; }
  .admin-checkout-control button { width:100%; }
}


/* v3.12.1 — canonical creator incentives copy */
.creator-incentive-callout {
  display:grid;
  gap:4px;
  margin:0 0 14px;
  padding:11px 12px;
  border:1px solid rgba(210,164,75,.38);
  border-radius:10px;
  background:linear-gradient(135deg,rgba(176,124,36,.11),rgba(10,14,17,.74));
}
.creator-incentive-callout strong {
  color:#efcf82;
  font-family:Georgia,serif;
}
.creator-incentive-callout span {
  color:#c0c8cc;
  font-size:12px;
  line-height:1.45;
}
.creator-incentive-callout.compact {
  margin-top:10px;
  padding:9px 10px;
}


/* v3.12.3 — card artwork fit fidelity
   The saved artwork transform is authoritative everywhere the card is rendered.
   !important intentionally defeats old thumbnail/library object-fit overrides. */
.preview-art img.preview-art-image.art-fit-contain {
  object-fit: contain !important;
}
.preview-art img.preview-art-image.art-fit-cover {
  object-fit: cover !important;
}

/* v3.12.8 — stable mobile preview expansion
   CMT owns the extra pull-at-top gesture, so disable Chrome's competing
   pull-to-refresh behavior on the mobile editor page. */
@media (max-width:760px) {
  html,
  body {
    overscroll-behavior-y:none;
  }
}


/* Lightweight deployment-version notice. Never auto-refresh while a card is being edited. */
.cmt-update-notice {
  position:fixed;
  left:50%;
  bottom:16px;
  z-index:400;
  width:min(620px,calc(100vw - 24px));
  transform:translateX(-50%);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:11px 12px;
  border:1px solid #8b6a2d;
  border-radius:12px;
  background:rgba(13,17,20,.97);
  color:#e7dfce;
  box-shadow:0 14px 46px rgba(0,0,0,.58);
}
.cmt-update-notice span { font-size:12px; line-height:1.4; }
.cmt-update-notice strong { color:#f0d28b; }
@media (max-width:600px) {
  .cmt-update-notice { bottom:10px; align-items:stretch; }
  .cmt-update-notice span { flex:1; }
}


/* Invite-beta auth abuse protection */
.auth-captcha {
  display:grid;
  justify-items:center;
  gap:5px;
  margin:10px 0 12px;
  min-height:28px;
}
.auth-captcha .microcopy { text-align:center; }


/* v3.10.9 — stable mobile text focus
   Android's visualViewport emits multiple resize/focus transitions while the
   keyboard, spellcheck menu and selection handles settle. Keep the card at the
   exact compact/expanded size it already had instead of introducing a third
   110px keyboard-only size. This prevents the editor from jumping under the
   user's finger while selecting or correcting text. */
@media (max-width:760px) {
  .app-shell.mobile-keyboard-open .preview-panel {
    padding:8px !important;
  }
  .app-shell.mobile-keyboard-open .preview-stage {
    padding:0 44px !important;
  }
  .app-shell.mobile-keyboard-open .preview-stage > .card-preview,
  .app-shell.mobile-keyboard-open .preview-stage > .card-preview.direct-edit-preview {
    width:min(70vw, 255px) !important;
    max-width:255px !important;
    margin:0 auto 5px !important;
  }

  .app-shell.mobile-keyboard-open .preview-panel.mobile-preview-compact {
    padding:4px !important;
  }
  .app-shell.mobile-keyboard-open .preview-panel.mobile-preview-compact .preview-stage {
    padding:0 36px !important;
  }
  .app-shell.mobile-keyboard-open .preview-panel.mobile-preview-compact .preview-stage > .card-preview,
  .app-shell.mobile-keyboard-open .preview-panel.mobile-preview-compact .preview-stage > .card-preview.direct-edit-preview {
    width:min(46vw, 165px) !important;
    max-width:165px !important;
    margin:0 auto 3px !important;
  }

  /* Native selection is more reliable when the browser owns the gesture. */
  textarea,
  input[type="text"],
  input[type="search"],
  input[type="email"],
  input[type="tel"],
  .inline-card-text-editor {
    -webkit-user-select:text;
    user-select:text;
  }
}


/* v3.10.10 — mobile text keyboard layout
   Form-field typing uses the readable 165px compact card, while the focused
   contextual text controls stay mounted/visible. Direct text-on-card editing
   remains expanded and uses preventScroll in CardPreview. */
@media (max-width:760px) {
  .preview-panel.mobile-preview-compact:focus-within > .contextual-editor-controls {
    display:grid !important;
  }

  .app-shell.mobile-keyboard-open .preview-panel.mobile-preview-compact:focus-within > .contextual-editor-controls {
    width:min(94vw, 390px);
    margin:4px auto 0;
  }

  /* Remove animated resizing during keyboard focus. Chrome's visual viewport
     changes in several steps; animating each step reads as a page glitch. */
  .app-shell.mobile-keyboard-open .preview-panel,
  .app-shell.mobile-keyboard-open .preview-stage,
  .app-shell.mobile-keyboard-open .preview-stage > .card-preview {
    transition:none !important;
  }
}


/* v3.11.0 — session artwork styles + optional saved-person cameos */
.art-style-selector {
  display:grid;
  gap:8px;
  margin:4px 0 13px;
  padding:10px;
  border:1px solid #3c4850;
  border-radius:9px;
  background:#0b1013;
}
.art-style-selector-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.art-style-selector-head > span {
  color:#ddd8cc;
  font-size:13px;
  font-weight:700;
}
.art-style-selector-head .text-button {
  font-size:10px;
  color:#bda66c;
}
.art-style-selector-head .text-button.selected {
  color:#f0d078;
}
.art-style-selector > select {
  width:100%;
  min-height:36px;
  border:1px solid #46535e;
  border-radius:8px;
  background:#0c1216;
  color:#eee8db;
  padding:6px 9px;
}
.art-style-blend-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:5px;
}
.art-style-blend-grid label {
  display:flex;
  align-items:center;
  gap:7px;
  min-width:0;
  padding:6px 7px;
  border:1px solid #37434a;
  border-radius:7px;
  background:#10161b;
  color:#c9ced0;
  font-size:11px;
  cursor:pointer;
}
.art-style-blend-grid label.selected {
  border-color:#9d7a39;
  color:#efd487;
  background:rgba(166,119,40,.10);
}
.art-style-blend-name {
  min-width:0;
  overflow-wrap:anywhere;
}
.art-style-blend-role {
  margin-left:auto;
  padding:2px 4px;
  border-radius:4px;
  border:1px solid #56626a;
  color:#b9c4ca;
  font-size:9px;
  font-weight:650;
  line-height:1.2;
  white-space:nowrap;
}
.art-style-blend-role.primary {
  border-color:#b89044;
  color:#f3d78d;
  background:rgba(166,119,40,.16);
}
.art-style-blend-grid label input {
  width:auto;
  margin:0;
  accent-color:#c89d49;
}
.art-style-blend-grid label:has(input:disabled) {
  opacity:.42;
  cursor:default;
}
.art-style-blend-grid small {
  grid-column:1 / -1;
  color:#78858d;
  font-size:9px;
  line-height:1.35;
}
.art-style-people-toggle {
  display:flex !important;
  grid-template-columns:none !important;
  align-items:flex-start;
  gap:8px !important;
  padding-top:8px;
  border-top:1px solid #2e3940;
  color:#c3c9cc !important;
  font-size:11px !important;
  font-weight:600 !important;
}
.art-style-people-toggle input {
  width:16px;
  height:16px;
  margin:0;
  flex:0 0 auto;
  accent-color:#c89d49;
}
.art-style-people-toggle:has(input:disabled) {
  opacity:.45;
}
.art-style-age-note {
  color:#8d969c;
  font-size:9px;
  line-height:1.35;
}
.art-style-selector-head .text-button:disabled {
  opacity:.4;
  cursor:default;
}

.text-font-match-toggle {
  display:flex !important;
  align-items:center;
  gap:8px;
  margin:2px 0 5px;
  color:#c9ced0;
  font-size:11px;
  font-weight:600;
}
.text-font-match-toggle input {
  width:16px;
  height:16px;
  margin:0;
  accent-color:#c89d49;
}

@media (max-width:760px) {
  .art-style-selector {
    padding:8px;
    margin-bottom:10px;
  }
  .art-style-blend-grid {
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .art-style-blend-grid label {
    padding:6px;
    font-size:10px;
  }
}


/* v3.13.x — persistent Simple Item generation controls */
.simple-item-settings {
  position:relative;
  width:100%;
  margin:0;
  padding:0;
  border:0;
  background:transparent;
}
.simple-item-settings > summary {
  width:max-content;
  max-width:100%;
  padding:1px 0;
  color:#aeb6bb;
  font-size:10px;
  line-height:1.25;
  text-decoration:underline;
  text-decoration-color:rgba(174,182,187,.35);
  text-underline-offset:3px;
  cursor:pointer;
  list-style:none;
  user-select:none;
}
.simple-item-settings > summary::-webkit-details-marker { display:none; }
.simple-item-settings > summary::after {
  content:' ▸';
  color:#778188;
  text-decoration:none;
}
.simple-item-settings[open] > summary::after { content:' ▴'; }
.simple-item-settings-body {
  display:grid;
  gap:7px;
  position:absolute;
  left:0;
  bottom:calc(100% + 6px);
  top:auto;
  z-index:40;
  width:min(290px, calc(100vw - 36px));
  max-width:100%;
  margin:0;
  padding:8px;
  border:1px solid #35414a;
  border-radius:7px;
  background:#10161b;
  box-shadow:0 12px 30px rgba(0,0,0,.62);
}
.simple-item-enabled {
  display:flex !important;
  align-items:center;
  gap:7px !important;
  color:#ded8cc !important;
  font-size:10px !important;
  font-weight:600 !important;
  cursor:pointer;
}
.simple-item-enabled input,
.simple-item-surface-grid input {
  width:auto !important;
  margin:0 !important;
  accent-color:#d6a94f;
}
.simple-item-surface-label {
  color:#89949b;
  font-size:8.5px;
  font-weight:700;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.simple-item-surface-grid {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:4px;
}
.simple-item-surface-grid label {
  display:flex !important;
  align-items:center;
  justify-content:center;
  gap:4px !important;
  min-width:0;
  padding:5px 4px;
  border:1px solid #39454d;
  border-radius:6px;
  background:#10161b;
  color:#aeb6bb !important;
  font-size:8.5px !important;
  font-weight:600 !important;
  cursor:pointer;
}
.simple-item-surface-grid label.selected {
  border-color:#b98d42;
  background:rgba(185,141,66,.13);
  color:#ead49d !important;
}
.simple-item-settings .microcopy {
  margin:0;
  color:#7f8b92;
  font-size:8.5px;
  line-height:1.35;
}
/* Secondary instructions stay available without lengthening default views. */
.compact-help {
  margin:5px 0 0;
  color:#aab4bc;
  font-size:11px;
  line-height:1.45;
}
.compact-help > summary {
  cursor:pointer;
  width:fit-content;
  color:#aeb9c1;
  font-size:11px;
  text-decoration:underline;
  text-decoration-color:rgba(174,185,193,.35);
  text-underline-offset:2px;
}
.compact-help[open] { padding-bottom:5px; }
.compact-help p, .compact-help small { display:block; margin:6px 0 0; color:#a5afb7; font-size:11px; line-height:1.45; }
.publish-help { margin:4px 0 10px; }

@media (max-width:460px) {
  .simple-item-surface-grid { grid-template-columns:1fr 1fr; }
}


/* v3.9.8 — creator handle sizing + rename-policy affordance */
.account-pill {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:5px;
}
.account-handle-text {
  white-space:nowrap;
}
.account-handle-policy {
  margin-top:2px;
}
@media (max-width:760px) {
  .topbar-right {
    grid-template-columns:minmax(0,1fr) minmax(0,1fr) !important;
  }
  .topbar-right .account-pill {
    gap:4px !important;
    min-width:0 !important;
    padding-left:6px !important;
    padding-right:6px !important;
    font-size:10px !important;
    overflow:hidden !important;
  }
  .topbar-right .account-pill.long-handle {
    font-size:10px !important;
    letter-spacing:normal;
  }
  .topbar-right .account-handle-text {
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
  .topbar-right .credit-pill {
    min-width:0 !important;
    padding-left:6px !important;
    padding-right:6px !important;
    font-size:10px !important;
    letter-spacing:-0.01em;
  }
}

/* Final-sale checkout acknowledgement */
.checkout-final-sale-check {
  display:flex !important;
  align-items:flex-start;
  gap:10px;
  margin-top:4px;
  padding:12px;
  border:1px solid rgba(197,139,44,.55);
  border-radius:9px;
  background:rgba(197,139,44,.08);
  color:#ded4bf;
  line-height:1.45;
}
.checkout-final-sale-check input {
  width:auto;
  margin-top:3px;
  accent-color:#d8ad4b;
  flex:0 0 auto;
}
.checkout-final-sale-check strong { color:#f0d383; }


/* v3.6 — simplified creator header: one clickable Credits balance. */
.credit-balance-button {
  cursor:pointer;
  font:inherit;
}
@media (min-width:761px) {
  .topbar-right .credit-balance-button {
    min-height:34px;
    padding:8px 10px;
    font-size:11px;
    line-height:1;
    white-space:nowrap;
  }
  .topbar-right .api-pill {
    min-height:34px;
    box-sizing:border-box;
    display:flex;
    align-items:center;
  }
}
@media (max-width:760px) {
  .topbar-right {
    grid-template-columns:minmax(92px, auto) minmax(92px, auto) !important;
    grid-template-areas:
      "signin credits"
      "saved saved" !important;
  }
  .topbar-right .credit-balance-button {
    grid-area:credits;
    width:100% !important;
    min-width:0 !important;
    min-height:31px !important;
    margin:0 !important;
    padding:6px 8px !important;
    justify-content:center !important;
    text-align:center !important;
    white-space:nowrap !important;
  }
  .topbar-right .mobile-saved-images-button {
    grid-area:saved;
    width:100% !important;
    justify-self:stretch !important;
  }
}


/* v3.6.1 — keep desktop account controls on one row and float Simple Item
   settings into the unused toolbar space so Generate Artwork stays visible. */
@media (min-width:1101px) {
  .topbar-right {
    flex-wrap:nowrap !important;
    min-width:0;
    gap:7px !important;
  }
  .topbar-right .credit-balance-button,
  .topbar-right .api-pill,
  .topbar-right .account-pill {
    flex:0 0 auto;
  }
  .topbar-right .account-pill {
    max-width:225px;
    min-width:0;
    padding-left:9px !important;
    padding-right:9px !important;
    overflow:hidden;
  }
  .topbar-right .account-handle-text {
    display:block;
    max-width:185px;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }

  .preview-panel > .preview-actions {
    position:relative;
  }
  .preview-panel > .preview-actions .preview-ai-column > .simple-item-settings {
    position:absolute;
    left:0;
    top:-31px;
    z-index:35;
    width:auto;
    max-width:250px;
  }
  .preview-panel > .preview-actions .preview-ai-column > .simple-item-settings > summary {
    display:inline-flex;
    align-items:center;
    min-height:24px;
    padding:3px 8px;
    border:1px solid #46535e;
    border-radius:7px;
    background:#10161b;
    color:#b8c0c5;
    text-decoration:none;
    white-space:nowrap;
  }
  .preview-panel > .preview-actions .preview-ai-column > .simple-item-settings .simple-item-settings-body {
    position:absolute;
    left:0;
    top:auto;
    bottom:calc(100% + 5px);
    width:290px;
    max-width:min(290px, 44vw);
    margin:0;
    z-index:40;
    box-shadow:0 12px 30px rgba(0,0,0,.62);
  }
}


/* v3.6.2 — explicit two-row desktop header.
   Row 1: Credits / AI / account pills.
   Row 2: CREATE…CART navigation + quiet autosave status. */
@media (min-width:1101px) {
  .topbar {
    height:72px !important;
    min-height:72px !important;
    grid-template-columns:1fr auto 1fr !important;
    grid-template-rows:34px 26px !important;
    padding:4px 18px !important;
    align-items:center !important;
  }
  .topbar .brand-lockup {
    grid-column:1 !important;
    grid-row:1 / 3 !important;
    align-self:center !important;
  }
  .topbar nav {
    grid-column:2 !important;
    grid-row:2 !important;
    align-self:center !important;
    justify-self:center !important;
    white-space:nowrap;
  }
  .topbar-right {
    grid-column:2 / 4 !important;
    grid-row:1 !important;
    align-self:start !important;
    justify-self:end !important;
    display:flex !important;
    flex-wrap:nowrap !important;
    align-items:center !important;
    justify-content:flex-end !important;
    gap:7px !important;
    min-width:0;
  }
  .topbar-right .credit-balance-button,
  .topbar-right .api-pill,
  .topbar-right .account-pill {
    min-height:31px !important;
    height:31px !important;
    box-sizing:border-box !important;
    margin:0 !important;
    flex:0 0 auto !important;
  }
  .topbar-right .credit-balance-button,
  .topbar-right .api-pill {
    padding:6px 9px !important;
    font-size:11px !important;
  }
  .topbar-right .account-pill {
    max-width:260px !important;
    padding:6px 9px !important;
    font-size:11px !important;
  }
  .topbar-right .account-handle-text {
    max-width:220px !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
    white-space:nowrap !important;
  }
  .topbar-right .autosave-status {
    display:block !important;
    position:absolute !important;
    right:18px !important;
    bottom:7px !important;
    max-width:260px;
    overflow:hidden;
    text-overflow:ellipsis;
    color:#8e969c;
    font-size:9px !important;
    line-height:1;
    text-align:right;
    white-space:nowrap;
    pointer-events:none;
  }
  .preview-panel {
    top:72px !important;
  }
}


/* v3.14 — Community Creator applications */
.account-community-creator-box,
.community-creator-status-bar {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.account-community-creator-box {
  margin:14px 0;
  padding:12px;
  border:1px solid rgba(210,169,78,.42);
  border-radius:10px;
  background:rgba(210,169,78,.07);
}
.account-community-creator-box > div {
  display:grid;
  gap:4px;
}
.account-community-creator-box strong { color:#efd17e; }
.account-community-creator-box span { color:#aab2b7; font-size:11px; line-height:1.35; }

.creator-application-backdrop,
.creator-admin-backdrop { z-index:240; }

.creator-application-modal {
  width:min(760px,96vw);
  max-height:92dvh;
  overflow:auto;
  padding:20px;
  border:1px solid #735b2e;
  border-radius:15px;
  background:linear-gradient(180deg,#141a1f,#080b0e);
  box-shadow:0 30px 100px rgba(0,0,0,.82);
}
.creator-application-status {
  display:grid;
  gap:8px;
  padding:13px;
  border:1px solid #3b4851;
  border-radius:10px;
  background:#0d1317;
}
.creator-application-status > div {
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:center;
}
.creator-application-status strong { color:#ecd184; }
.creator-application-status span { color:#a3adb3; font-size:11px; }
.creator-application-status progress {
  width:100%;
  height:8px;
  accent-color:#d4a13d;
}
.creator-application-requirements {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:8px;
  margin:12px 0;
}
.creator-application-requirements > div {
  display:grid;
  gap:5px;
  padding:10px;
  border:1px solid #35414a;
  border-radius:9px;
  background:#0d1318;
}
.creator-application-requirements > div.ready { border-color:#43634c; }
.creator-application-requirements b { color:#d8d8d4; font-size:11px; }
.creator-application-requirements .ready b { color:#a9ddb3; }
.creator-application-requirements small { color:#879198; font-size:9px; line-height:1.35; }

.creator-application-approved,
.creator-application-pending,
.creator-application-review-note {
  margin:12px 0;
  padding:12px;
  border-radius:10px;
  line-height:1.45;
}
.creator-application-approved {
  border:1px solid #44674e;
  background:rgba(46,91,58,.14);
}
.creator-application-approved strong { color:#a9ddb3; }
.creator-application-pending {
  border:1px solid #665832;
  background:rgba(107,84,34,.12);
}
.creator-application-pending strong { color:#e4c77a; }
.creator-application-review-note {
  border:1px solid #704b40;
  background:rgba(103,54,43,.13);
}
.creator-application-review-note strong { color:#e8b39f; }
.creator-application-approved p,
.creator-application-pending p,
.creator-application-review-note p { margin:6px 0; color:#c8ced1; font-size:12px; }

.creator-application-form {
  display:grid;
  gap:13px;
  margin-top:14px;
}
.creator-application-form > label:not(.publish-check),
.creator-admin-note {
  display:grid;
  gap:6px;
  color:#ddd8cc;
  font-size:12px;
  font-weight:650;
}
.creator-application-form textarea,
.creator-application-form input,
.creator-admin-note textarea {
  width:100%;
}
.creator-application-form small { color:#8e979d; font-weight:400; line-height:1.4; }
.creator-agreement-check { align-items:flex-start; }
.inline-legal-button { display:inline; font-size:inherit; }

.creator-admin-modal {
  width:min(1320px,97vw);
  height:min(930px,94dvh);
  overflow:auto;
  padding:18px;
  border:1px solid #735b2e;
  border-radius:15px;
  background:linear-gradient(180deg,#12181d,#080b0e);
  box-shadow:0 30px 100px rgba(0,0,0,.86);
}
.creator-admin-toolbar,
.creator-admin-nav,
.creator-admin-app-head,
.creator-admin-card-heading {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.creator-admin-toolbar { margin-bottom:12px; }
.creator-admin-filter { display:flex; gap:6px; }
.creator-admin-nav {
  margin:8px 0 12px;
  padding:8px;
  border:1px solid #333f47;
  border-radius:9px;
}
.creator-admin-application {
  display:grid;
  gap:13px;
}
.creator-admin-app-head {
  padding:12px;
  border:1px solid #47545d;
  border-radius:10px;
  background:#0e1418;
}
.creator-admin-app-head > div { display:flex; align-items:center; gap:9px; }
.creator-admin-app-head > div > strong { color:#f0d383; font-size:18px; }
.creator-status-badge {
  padding:3px 7px;
  border:1px solid #59646b;
  border-radius:999px;
  color:#bcc5ca;
  font-size:9px;
  text-transform:uppercase;
}
.creator-status-badge.status-approved { border-color:#4e7459; color:#a9ddb3; }
.creator-status-badge.status-pending { border-color:#806a38; color:#e3c679; }
.creator-status-badge.status-rejected,
.creator-status-badge.status-revoked,
.creator-status-badge.status-suspended { border-color:#7a4646; color:#e7a6a6; }

.creator-admin-statement {
  padding:13px;
  border:1px solid #3b464e;
  border-radius:10px;
  background:#0b1115;
}
.creator-admin-statement strong { color:#e4c979; }
.creator-admin-statement p { margin:8px 0 0; color:#d5d7d6; line-height:1.55; white-space:pre-wrap; }
.creator-admin-signature {
  display:flex;
  flex-wrap:wrap;
  gap:8px 18px;
  color:#9ea8ae;
  font-size:10px;
}
.creator-admin-card-grid {
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(155px,1fr));
  gap:10px;
  max-height:430px;
  overflow:auto;
  padding:8px;
  border:1px solid #323d45;
  border-radius:10px;
  background:#090d10;
}
.creator-admin-card {
  min-width:0;
  padding:7px;
  border:1px solid #35414a;
  border-radius:9px;
  background:#10161a;
}
.creator-admin-card .card-preview {
  width:min(100%,160px);
  margin:0 auto;
  pointer-events:none;
}
.creator-admin-card > div {
  display:grid;
  gap:2px;
  margin-top:6px;
}
.creator-admin-card strong {
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:10px;
}
.creator-admin-card small { color:#8e989e; font-size:8px; }
.creator-admin-actions {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.creator-admin-note { margin-top:4px; }

@media (max-width:760px) {
  .account-community-creator-box,
  .community-creator-status-bar {
    align-items:stretch;
    flex-direction:column;
  }
  .creator-application-modal,
  .creator-admin-modal {
    width:100vw;
    max-width:none;
    height:calc(100dvh - 70px);
    max-height:none;
    border-radius:0;
    padding:12px;
  }
  .creator-application-requirements { grid-template-columns:1fr; }
  .creator-application-status > div { align-items:flex-start; flex-direction:column; }
  .creator-admin-card-grid { grid-template-columns:repeat(2,minmax(0,1fr)); max-height:none; }
  .creator-admin-toolbar { align-items:stretch; flex-direction:column; }
}


/* Terms opened from a Community Creator application should sit above the application. */
.legal-backdrop { z-index:320 !important; }

.publish-error {
  margin-top:12px;
  padding:10px 12px;
  border:1px solid #8a4f45;
  border-radius:8px;
  background:rgba(118,48,38,.18);
  color:#efb7a9;
  font-size:12px;
  line-height:1.4;
}
/* Characterizer — compact one-click surprise role/title + artwork */
.characterizer-controls {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.characterizer-gender-bubbles {
  display: flex;
  flex: 0 0 auto;
  gap: 7px;
}
.characterizer-gender-bubble {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  padding: 0;
  border: 1px solid #59636c;
  background: #10161b;
  color: #b8c0c7;
  display: grid;
  place-items: center;
  font-size: 17px;
  cursor: pointer;
}
.characterizer-gender-bubble.selected {
  border-color: #d5a23d;
  color: #ffd77a;
  background: #251b0d;
  box-shadow: 0 0 0 2px rgba(213,162,61,.10);
}
.characterizer-button {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 36px;
  margin: 0;
  border-color: #c58b2c;
  background: linear-gradient(180deg,#4b3214,#251606);
  color: #ffe08b;
  font-weight: 800;
  letter-spacing: .02em;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2px;
  min-height: 44px;
  line-height: 1.2;
  padding: 6px 8px;
  white-space: normal;
}
.characterizer-cost {
  font-size: 11px;
  font-weight: 600;
  color: #e5c786;
  letter-spacing: 0;
  white-space: nowrap;
}
.characterizer-sound-toggle {
  flex: 0 0 32px;
  min-width: 32px;
  width: 32px;
  min-height: 38px;
  padding: 4px !important;
  display: grid;
  place-items: center;
  font-size: 17px;
  line-height: 1;
}
.characterizer-sound-toggle[aria-pressed="false"] {
  opacity: .68;
}


/* Artwork mirror + selected-art prompt */
.artwork-mirror-button {
  display:inline-grid;
  place-items:center;
  width:36px;
  min-width:36px;
  padding:6px !important;
}
.artwork-mirror-button svg {
  width:18px;
  height:18px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.selected-artwork-prompt {
  display:grid;
  gap:6px;
  margin:0 0 12px;
}
.selected-artwork-prompt label {
  display:grid;
  gap:6px;
  color:#ddd8cc;
  font-size:12px;
  font-weight:650;
}
.selected-artwork-prompt textarea {
  min-height:84px;
  resize:vertical;
}
.selected-artwork-prompt .dice-button {
  justify-self:start;
}
@media (min-width:761px) {
  .right-panel.artwork-selected .artwork-concept-field { display:none; }
}
@media (max-width:760px) {
  .selected-artwork-prompt { display:none !important; }
  .contextual-quick-row .artwork-mirror-button {
    width:29px;
    min-width:29px;
    padding:4px !important;
  }
  .contextual-quick-row .artwork-mirror-button svg {
    width:15px;
    height:15px;
  }
}


/* Secret CMT radio — intentionally tiny and unlabeled */
.secret-radio-button {
  width:34px;
  height:34px;
  min-width:34px;
  padding:0;
  border:0;
  border-radius:50%;
  background:transparent;
  color:inherit;
  display:grid;
  place-items:center;
  cursor:pointer;
  opacity:.68;
  font-size:21px;
  line-height:1;
  transition:opacity .16s ease, transform .16s ease, filter .2s ease;
}
.secret-radio-button:hover {
  opacity:1;
  transform:translateY(-1px);
}

/* Song identification is deliberately hidden until hover, keyboard focus or
   a deliberate touch-and-hold. It never intercepts the radio's normal tap. */
.secret-radio-button {
  position:relative;
  -webkit-touch-callout:none;
  touch-action:manipulation;
}
.secret-radio-tooltip {
  position:absolute;
  z-index:300;
  top:calc(100% + 9px);
  right:0;
  width:max-content;
  max-width:min(320px, calc(100vw - 20px));
  padding:10px 12px;
  display:flex;
  flex-direction:column;
  gap:3px;
  border:1px solid #98783b;
  border-radius:9px;
  background:rgba(12,15,18,.97);
  box-shadow:0 9px 28px rgba(0,0,0,.72);
  color:#f5ead0;
  font-family:inherit;
  font-size:12px;
  font-weight:400;
  line-height:1.35;
  letter-spacing:normal;
  text-align:left;
  white-space:normal;
  overflow-wrap:anywhere;
  pointer-events:none;
  user-select:none;
  visibility:hidden;
  opacity:0;
  transform:translateY(-3px);
  transition:opacity .12s ease, transform .12s ease, visibility .12s ease;
}
.secret-radio-tooltip-label {
  font-size:9px;
  font-weight:700;
  color:#d5a951;
  letter-spacing:.1em;
  text-transform:uppercase;
}
.secret-radio-tooltip strong { font-size:13px; font-weight:650; color:#f8ebd4; }
.secret-radio-tooltip-favorite {
  margin-top:5px;
  padding-top:6px;
  border-top:1px solid rgba(217,179,103,.28);
  color:#d0c2a5;
  font-size:11px;
}
.secret-radio-button.show-track-tooltip .secret-radio-tooltip,
.secret-radio-button:focus-visible .secret-radio-tooltip {
  visibility:visible;
  opacity:1;
  transform:translateY(0);
}
@media (hover:hover) and (pointer:fine) {
  .secret-radio-button:hover .secret-radio-tooltip {
    visibility:visible;
    opacity:1;
    transform:translateY(0);
  }
}
@media (max-width:760px) {
  /* The ordinary mobile header radio sits near the left edge. */
  .topbar-right .secret-radio-tooltip { left:0; right:auto; }
  .public-splash-active .topbar-right .secret-radio-tooltip,
  .landing-home-active .topbar-right .secret-radio-tooltip { left:auto; right:0; }
}
/* On the public homepage the radio is pinned at the bottom-right. */
.landing-home-active .secret-radio-tooltip {
  top:auto;
  bottom:calc(100% + 9px);
}
@media (prefers-reduced-motion:reduce) {
  .secret-radio-tooltip { transition:none; transform:none; }
}

.secret-radio-button:focus-visible {
  outline:1px solid #d7ad58;
  outline-offset:2px;
}
.secret-radio-button.is-on {
  opacity:1;
  filter:
    drop-shadow(0 0 3px rgba(255,220,108,.95))
    drop-shadow(0 0 8px rgba(226,163,51,.78))
    drop-shadow(0 0 15px rgba(226,113,32,.38));
  animation:cmt-radio-glow 1.65s ease-in-out infinite alternate;
}
@keyframes cmt-radio-glow {
  from {
    filter:
      drop-shadow(0 0 2px rgba(255,220,108,.78))
      drop-shadow(0 0 6px rgba(226,163,51,.58))
      drop-shadow(0 0 11px rgba(226,113,32,.28));
  }
  to {
    filter:
      drop-shadow(0 0 4px rgba(255,235,151,1))
      drop-shadow(0 0 10px rgba(244,180,59,.9))
      drop-shadow(0 0 18px rgba(226,113,32,.5));
  }
}
@media (prefers-reduced-motion: reduce) {
  .secret-radio-button.is-on { animation:none; }
}


/* Keep the secret radio in its marked mobile-header spot instead of letting
   the account/credit grid auto-place it. Desktop placement is unchanged. */
@media (max-width:760px) {
  .topbar-right { position:static !important; }
  .topbar-right .secret-radio-button {
    position:absolute;
    left:88px;
    bottom:3px;
    z-index:24;
    width:34px;
    height:34px;
    min-width:34px;
  }
}


/* Public front door: rotating logo + radio only. */
.public-splash {
  position:fixed;
  inset:0;
  z-index:100;
  display:grid;
  place-items:center;
  overflow:hidden;
  background:#000;
}
.public-splash-logo-button {
  position:relative;
  width:min(92vw, 960px);
  aspect-ratio:16 / 9;
  padding:0;
  border:0;
  outline:0;
  background:transparent;
  display:grid;
  place-items:center;
  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
}
.public-splash-logo-button:focus-visible {
  outline:1px solid rgba(255,255,255,.35);
  outline-offset:10px;
  border-radius:18px;
}
.public-splash-fallback,
.public-splash-video {
  grid-area:1 / 1;
  width:100%;
  height:100%;
  object-fit:contain;
  object-position:center;
  user-select:none;
  pointer-events:none;
}
.public-splash-fallback {
  width:min(72%, 680px);
  height:auto;
  max-height:66vh;
  opacity:.92;
}
.public-splash-video {
  z-index:1;
  background:#000;
}
.public-splash-enter-hint {
  position:fixed;
  left:50%;
  bottom:7vh;
  transform:translateX(-50%);
  color:rgba(255,255,255,.42);
  font-size:10px;
  line-height:1;
  letter-spacing:.34em;
  text-transform:uppercase;
  white-space:nowrap;
  opacity:0;
  transition:opacity 2.5s ease;
  pointer-events:none;
}
.public-splash-enter-hint.visible { opacity:1; }

/* Keep the existing radio instance alive so playback does not restart when
   the splash is dismissed. Everything else in the header disappears. */
.public-splash-active .topbar {
  z-index:140 !important;
  background:transparent !important;
  border:0 !important;
  box-shadow:none !important;
  pointer-events:none;
}
.public-splash-active .topbar > .brand-lockup,
.public-splash-active .topbar > nav,
.public-splash-active .topbar-right > :not(.secret-radio-button) {
  visibility:hidden !important;
  pointer-events:none !important;
}
.public-splash-active .topbar-right {
  display:block !important;
  position:static !important;
  padding:0 !important;
}
.public-splash-active .topbar-right .secret-radio-button {
  visibility:visible !important;
  position:fixed !important;
  z-index:160 !important;
  left:auto !important;
  right:max(14px, env(safe-area-inset-right)) !important;
  bottom:auto !important;
  top:max(14px, env(safe-area-inset-top)) !important;
  transform:none !important;
  pointer-events:auto !important;
  opacity:.58;
}
.public-splash-active .topbar-right .secret-radio-button:hover,
.public-splash-active .topbar-right .secret-radio-button:focus-visible {
  transform:translateY(-1px) !important;
  opacity:1;
}

@media (max-width:760px) {
  .public-splash-logo-button {
    width:100vw;
    max-width:none;
  }
  .public-splash-active .topbar-right .secret-radio-button {
    left:auto !important;
    right:max(10px, env(safe-area-inset-right)) !important;
    top:max(10px, env(safe-area-inset-top)) !important;
    bottom:auto !important;
    width:32px !important;
    height:32px !important;
    min-width:32px !important;
  }
  .public-splash-enter-hint {
    bottom:5vh;
    font-size:9px;
  }
}



/* Homepage keeps the one global radio player alive and exposes only its tiny control. */
.landing-home-active .topbar {
  position:fixed !important;
  inset:0 0 auto 0;
  z-index:220 !important;
  background:transparent !important;
  border:0 !important;
  box-shadow:none !important;
  pointer-events:none;
}
.landing-home-active .topbar > .brand-lockup,
.landing-home-active .topbar > nav,
.landing-home-active .topbar-right > :not(.secret-radio-button) {
  visibility:hidden !important;
  pointer-events:none !important;
}
.landing-home-active .topbar-right {
  display:block !important;
  position:static !important;
  padding:0 !important;
}
.landing-home-active .topbar-right .secret-radio-button {
  visibility:visible !important;
  position:fixed !important;
  z-index:240 !important;
  left:auto !important;
  right:max(14px, env(safe-area-inset-right)) !important;
  top:auto !important;
  bottom:max(14px, env(safe-area-inset-bottom)) !important;
  transform:none !important;
  pointer-events:auto !important;
  opacity:.58;
}
.landing-home-active .topbar-right .secret-radio-button:hover,
.landing-home-active .topbar-right .secret-radio-button:focus-visible {
  transform:translateY(-1px) !important;
  opacity:1;
}
@media (max-width:760px) {
  .landing-home-active .topbar-right .secret-radio-button {
    right:max(10px, env(safe-area-inset-right)) !important;
    bottom:max(10px, env(safe-area-inset-bottom)) !important;
    width:32px !important;
    height:32px !important;
    min-width:32px !important;
  }
}


/* Direct artwork-prompt editing: double-tap the selected art on the card. */
.inline-artwork-prompt-editor {
  position:absolute;
  z-index:30;
  display:grid;
  grid-template-rows:auto minmax(0,1fr) auto;
  gap:6px;
  padding:8px;
  border:1px solid rgba(245,199,92,.94);
  border-radius:9px;
  background:rgba(5,8,11,.90);
  box-shadow:0 10px 32px rgba(0,0,0,.72), inset 0 0 0 1px rgba(255,255,255,.04);
  pointer-events:auto;
  touch-action:auto;
  color:#f2eadb;
}
.inline-artwork-prompt-label {
  font-size:9px;
  line-height:1;
  font-weight:800;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:#e6c66f;
}
.inline-artwork-prompt-editor textarea {
  width:100%;
  height:100%;
  min-height:74px;
  resize:none;
  padding:7px 8px;
  border:1px solid rgba(132,145,154,.72);
  border-radius:6px;
  background:rgba(4,7,9,.78);
  color:#f4f0e8;
  font-size:12px;
  line-height:1.32;
  caret-color:#f2c85e;
  -webkit-user-select:text;
  user-select:text;
}
.inline-artwork-prompt-editor textarea:focus {
  border-color:#d5a23d;
  box-shadow:0 0 0 2px rgba(213,162,61,.18);
}
.inline-artwork-prompt-editor button {
  justify-self:end;
  min-height:26px;
  padding:4px 9px;
  border:1px solid #8f7135;
  border-radius:6px;
  background:#17130c;
  color:#f0d383;
  font-size:10px;
}
@media (max-width:760px) {
  .inline-artwork-prompt-editor {
    padding:6px;
    gap:5px;
    border-radius:7px;
  }
  .inline-artwork-prompt-editor textarea {
    min-height:64px;
    font-size:12px;
  }
}


/* Square generation is a secondary option, not a primary artwork action. */
.square-artwork-toggle-compact {
  width:fit-content;
  max-width:100%;
  margin:2px 0 8px;
  padding:5px 8px;
  font-size:10px;
  opacity:.86;
}
@media (max-width:760px) {
  .square-artwork-toggle-compact {
    margin:0 0 7px;
    padding:5px 7px;
  }
}


/* Guided Creator tutorials */
.quick-start-tutorials {
  margin-top:14px;
  padding:14px;
  border:1px solid rgba(205,158,60,.42);
  border-radius:11px;
  background:linear-gradient(135deg,rgba(198,145,45,.09),rgba(7,11,14,.78));
}
.quick-start-tutorials-heading {
  display:grid;
  gap:4px;
  margin-bottom:10px;
}
.quick-start-tutorials-heading strong {
  color:#efdcae;
  font-family:Georgia,serif;
  font-size:17px;
}
.quick-start-tutorials-heading span {
  color:#9da9af;
  font-size:12px;
  line-height:1.4;
}
.quick-start-tutorial-buttons {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
}
.quick-start-tutorial-buttons button {
  min-height:44px;
  text-align:left;
}

.creator-tutorial-layer {
  position:fixed;
  inset:0;
  z-index:3600;
  pointer-events:none;
}
.creator-tutorial-ring {
  position:fixed;
  z-index:3601;
  border:2px solid #f0c35b;
  border-radius:10px;
  box-shadow:
    0 0 0 4px rgba(240,195,91,.16),
    0 0 30px rgba(240,195,91,.34),
    0 0 0 9999px rgba(0,0,0,.55);
  pointer-events:none;
  transition:top .16s ease,left .16s ease,width .16s ease,height .16s ease;
}
.creator-tutorial-arrow {
  position:fixed;
  z-index:3602;
  color:#ffd269;
  font-size:28px;
  line-height:1;
  text-shadow:0 2px 10px #000,0 0 16px rgba(255,202,85,.55);
  pointer-events:none;
  animation:cmt-tutorial-arrow-pulse .9s ease-in-out infinite alternate;
}
.creator-tutorial-arrow.bottom { transform:rotate(90deg); }
.creator-tutorial-arrow.top { transform:rotate(-90deg); }
@keyframes cmt-tutorial-arrow-pulse {
  from { opacity:.72; scale:.94; }
  to { opacity:1; scale:1.08; }
}
.creator-tutorial-card {
  position:fixed;
  z-index:3603;
  pointer-events:auto;
  max-width:calc(100vw - 24px);
  padding:13px 14px;
  border:1px solid #b88b38;
  border-radius:12px;
  background:linear-gradient(180deg,#161b1f,#090c0f);
  color:#e7e2d8;
  box-shadow:0 18px 55px rgba(0,0,0,.78),0 0 26px rgba(192,142,47,.16);
}
.creator-tutorial-progress {
  margin-bottom:5px;
  color:#c7a052;
  font-size:9px;
  font-weight:800;
  letter-spacing:.12em;
  text-transform:uppercase;
}
.creator-tutorial-card h3 {
  margin:0 0 6px;
  color:#f3dfb0;
  font-family:Georgia,serif;
  font-size:18px;
}
.creator-tutorial-card p {
  margin:0;
  color:#b9c1c5;
  font-size:12px;
  line-height:1.45;
}
.creator-tutorial-actions {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-top:10px;
}
.creator-tutorial-wait {
  color:#d8b766;
  font-size:10px;
  font-weight:700;
}
.no-credits-backdrop {
  z-index:4200;
}
.no-credits-modal {
  width:min(420px,92vw);
  padding:25px 22px;
  border:2px solid #d5a23d;
  border-radius:17px;
  background:radial-gradient(circle at 50% 0%,#332716 0%,#141414 58%,#080808 100%);
  color:#eee;
  text-align:center;
  box-shadow:0 20px 70px rgba(0,0,0,.78),0 0 34px rgba(213,162,61,.22);
}
.no-credits-modal h2 {
  margin:7px 0 8px;
  color:#f0ddb0;
  font-family:Georgia,serif;
}
.no-credits-modal p {
  margin:0 auto 18px;
  max-width:330px;
  color:#c5c2ba;
  line-height:1.5;
}
.no-credits-modal strong { color:#f0cc77; }

@media (max-width:760px) {
  .quick-start-tutorial-buttons { grid-template-columns:1fr; }
  .creator-tutorial-card {
    padding:11px 12px;
  }
  .creator-tutorial-card h3 { font-size:16px; }
  .creator-tutorial-actions {
    align-items:flex-end;
  }
  .creator-tutorial-wait {
    max-width:130px;
    text-align:right;
  }
}


/* Newsletter offer appears once per browser on the public homepage. */
.cmt-newsletter-overlay { position:fixed; inset:0; z-index:20000; display:flex; align-items:center; justify-content:center; padding:18px; background:rgba(9,8,15,.78); backdrop-filter:blur(5px); }
.cmt-newsletter-popup { position:relative; width:min(100%,480px); max-height:min(92dvh,760px); overflow-y:auto; padding:clamp(22px,5vw,38px); border:1px solid rgba(234,196,115,.6); border-radius:20px; background:#1d1826; box-shadow:0 20px 75px rgba(0,0,0,.55); color:#faf3e5; }
.cmt-newsletter-popup h2 { font-size:clamp(30px,6vw,42px); line-height:1.12; margin:14px 0; }
.cmt-newsletter-popup h2 em { color:#e9bf73; }
.cmt-newsletter-popup p { line-height:1.5; }
.cmt-newsletter-popup form { display:flex; flex-direction:column; gap:12px; margin-top:20px; }
.cmt-newsletter-popup form > input[type="email"] { box-sizing:border-box; width:100%; padding:14px; font:inherit; background:#fff; color:#16111d; border:1px solid #aa9aa7; border-radius:8px; }
.cmt-newsletter-popup .landing-email-list-consent { display:flex; align-items:flex-start; gap:10px; font-size:13px; line-height:1.4; }
.cmt-newsletter-popup .landing-email-list-consent input { flex-shrink:0; margin-top:3px; }
.cmt-newsletter-popup .landing-primary { width:100%; }
.cmt-newsletter-close { position:absolute; right:14px; top:12px; background:transparent; border:0; color:inherit; cursor:pointer; font-size:30px; line-height:1; padding:4px 9px; }
.cmt-newsletter-later { display:block; margin:14px auto 0; padding:9px; border:0; background:none; color:#ead9c1; cursor:pointer; text-decoration:underline; }
.cmt-newsletter-popup .cmt-newsletter-fineprint { font-size:12px; opacity:.8; }

/* White-text option for selected description/extra text in mobile direct-edit controls. */
.contextual-white-text-toggle {
  display:flex;
  align-items:center;
  gap:8px;
  grid-column:1 / -1;
  color:#e9e0ce;
  font-size:11px;
  font-weight:600;
  margin:2px 0;
}
.contextual-white-text-toggle input {
  width:17px;
  height:17px;
  margin:0;
  accent-color:#c89d49;
}

/* Creator Rewards: publishing milestones and earned Credits. */
.creator-rewards-callout-heading {
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:10px;
}
.creator-rewards-callout-heading button { white-space:normal; }
.community-creator-links { display:flex; flex-wrap:wrap; gap:8px; }
.community-creator-status-bar { flex-wrap:wrap; }
.creator-milestones-backdrop { z-index:260; }
.creator-milestones-modal {
  box-sizing:border-box;
  width:min(590px,calc(100vw - 24px));
  max-height:90dvh;
  overflow:auto;
  padding:20px;
  border:1px solid #816538;
  border-radius:14px;
  color:#e8e2d5;
  background:#10161a;
  box-shadow:0 20px 70px rgba(0,0,0,.72);
}
.creator-milestones-summary {
  display:flex;
  align-items:baseline;
  flex-wrap:wrap;
  gap:8px 12px;
  margin:16px 0;
  padding:13px 15px;
  border:1px solid #625135;
  border-radius:9px;
  background:rgba(196,153,70,.07);
}
.creator-milestones-summary > span { color:#b6bdc1; font-size:12px; }
.creator-milestones-summary > strong { color:#f4cf76; font-size:27px; }
.creator-milestones-summary > small { flex-basis:100%; color:#aab4b8; font-size:11px; }
.creator-milestones-note {
  padding:10px 12px;
  background:rgba(198,153,69,.09);
  border:1px solid #665335;
  border-radius:9px;
  font-size:12px;
  line-height:1.5;
}
.creator-milestones-list { display:grid; gap:11px; margin:14px 0; }
.creator-milestone {
  display:grid;
  gap:10px;
  padding:14px;
  border:1px solid #45545d;
  border-radius:11px;
  background:#0b1116;
}
.creator-milestone-head,
.creator-milestone-progressline {
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:8px;
}
.creator-milestone-head > strong { color:#e7e1d6; font-size:14px; }
.creator-milestone-payout { color:#edc36a; font-weight:800; white-space:nowrap; font-size:14px; }
.creator-milestone-progressline { color:#b8c1c5; font-size:12px; }
.creator-milestone progress {
  width:100%;
  height:12px;
  border:0;
  border-radius:999px;
  overflow:hidden;
  accent-color:#d7aa50;
}
.creator-milestone progress::-webkit-progress-bar { background:#26333d; border-radius:999px; }
.creator-milestone progress::-webkit-progress-value { background:#d7aa50; border-radius:999px; }
.creator-milestones-actions { display:flex; justify-content:flex-end; gap:8px; flex-wrap:wrap; margin-top:15px; }
@media (max-width:760px) {
  .creator-milestones-modal { padding:15px; }
  .community-creator-links { width:100%; }
  .community-creator-links .secondary { flex:1 1 145px; }
}

/* Collapsible frame selection: compact on phones, expanded on desktop by default. */
.border-frame-disclosure {
  margin-top:10px;
  border:1px solid #46545d;
  border-radius:9px;
  background:rgba(12,18,23,.72);
  overflow:hidden;
}
.border-frame-disclosure > summary {
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:11px 12px;
  color:#e4dcca;
  font-size:13px;
  font-weight:750;
  list-style:none;
  user-select:none;
}
.border-frame-disclosure > summary::-webkit-details-marker { display:none; }
.border-frame-disclosure > summary::after {
  content:'▾';
  font-size:16px;
  line-height:1;
  color:#dab461;
  transform:rotate(-90deg);
  transition:transform .15s ease;
}
.border-frame-disclosure[open] > summary::after { transform:rotate(0); }
.border-frame-disclosure > summary small {
  margin-left:auto;
  color:#aab5bc;
  font-size:11px;
  font-weight:500;
}
.border-frame-disclosure[open] > summary {
  border-bottom:1px solid #35424b;
}
.border-frame-disclosure > .border-style-grid {
  margin:0;
  padding:11px;
}

/* v3.12 — Keep the entire mobile text toolbar visible while preview shrinks.
   Previously compact preview mode hid the controls halfway through an edit. */
@media (max-width:760px) {
  .preview-panel > .contextual-text-controls {
    grid-template-columns:minmax(0,1fr) !important;
    align-items:stretch;
    gap:5px !important;
    width:min(96vw,410px) !important;
    padding:5px 7px 8px !important;
    margin:3px auto 0 !important;
  }
  .preview-panel.mobile-preview-compact > .contextual-text-controls {
    display:grid !important;
  }
  .contextual-text-topbar {
    display:flex;
    grid-column:1 / -1;
    align-items:center;
    justify-content:space-between;
    flex-wrap:wrap;
    gap:4px 8px;
    min-width:0;
  }
  .contextual-text-topbar > .contextual-editor-label {
    grid-column:auto;
    font-size:10px;
  }
  .contextual-text-topbar-actions {
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:10px;
    flex-wrap:wrap;
    min-width:0;
    margin-left:auto;
  }
  .contextual-text-topbar .contextual-white-text-toggle {
    grid-column:auto;
    margin:0;
    font-size:11px;
    font-weight:600;
    white-space:nowrap;
    gap:5px;
  }
  .contextual-text-topbar .contextual-white-text-toggle input {
    width:17px;
    height:17px;
    flex-shrink:0;
  }
  .contextual-text-topbar .contextual-reset {
    grid-column:auto;
    justify-self:auto;
    min-height:27px !important;
    padding:3px 10px !important;
    font-size:10px !important;
  }
  .preview-panel .contextual-text-entry {
    grid-column:1 / -1;
    gap:2px;
  }
  .preview-panel .contextual-text-entry textarea {
    min-height:41px;
    max-height:72px;
    font-size:13px;
    line-height:1.25;
    padding:5px 7px;
  }
  .contextual-typography-grid {
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    grid-column:1 / -1;
    align-items:end;
    gap:6px 9px;
    width:100%;
    min-width:0;
  }
  .contextual-typography-grid .contextual-font-control,
  .contextual-typography-grid .contextual-range-control {
    display:grid;
    min-width:0;
    gap:3px;
    font-size:10px;
    font-weight:650;
    line-height:1.25;
  }
  .contextual-typography-grid .contextual-font-control select {
    width:100%;
    min-width:0;
    height:30px;
    min-height:30px;
    padding:3px 5px;
    font-size:12px;
  }
  .contextual-typography-grid .contextual-range-control input[type="range"] {
    width:100%;
    height:30px;
    margin:0;
    min-width:0;
    touch-action:pan-y;
  }
  .contextual-typography-grid .contextual-font-control small {
    font-size:9px;
    line-height:1.2;
  }
  .app-shell.mobile-keyboard-open .preview-panel.mobile-preview-compact > .contextual-text-controls {
    display:none !important;
  }
  .app-shell.mobile-keyboard-open .preview-panel.mobile-preview-compact:focus-within > .contextual-text-controls {
    display:grid !important;
  }
}

/* CMT outline color eyedropper: one compact trigger, drag-release on the card. */
.outline-color-control {
  display:inline-flex;
  align-items:center;
  flex-wrap:nowrap;
  gap:7px;
  min-width:0;
}
.outline-color-control > .text-font-match-toggle,
.outline-color-control > .contextual-white-text-toggle {
  margin:0;
  grid-column:auto;
  white-space:nowrap;
}
.outline-eyedropper-trigger {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:3px;
  flex:none;
  min-width:38px;
  height:28px;
  padding:4px 6px;
  color:#e8d8b9;
  background:#171f25;
  border:1px solid #7a6743;
  border-radius:7px;
  cursor:pointer;
  touch-action:manipulation;
}
.outline-eyedropper-trigger.picking,
.outline-eyedropper-trigger:hover {
  border-color:#e7c36a;
  background:#35301e;
}
.outline-eyedropper-trigger .outline-eyedropper-swatch {
  width:10px;
  height:10px;
  flex:none;
  border-radius:3px;
  border:1px solid rgba(255,255,255,.7);
  box-shadow:0 0 0 1px rgba(0,0,0,.4);
}
.card-eyedropper-layer {
  position:absolute;
  inset:0;
  z-index:250;
  cursor:crosshair;
  touch-action:none;
  user-select:none;
  -webkit-user-select:none;
  background:rgba(5,8,12,.04);
}
.card-eyedropper-instruction {
  position:absolute;
  z-index:3;
  top:7px;
  left:50%;
  transform:translateX(-50%);
  max-width:calc(100% - 72px);
  padding:5px 8px;
  border-radius:7px;
  border:1px solid #b99a55;
  color:#f8e5b4;
  background:rgba(11,18,24,.92);
  font:600 10px/1.25 system-ui,sans-serif;
  text-align:center;
  pointer-events:none;
}
.card-eyedropper-cancel {
  position:absolute;
  right:6px;
  top:6px;
  z-index:5;
  width:28px;
  height:28px;
  padding:0;
  border:1px solid #d6b873;
  border-radius:8px;
  background:rgba(13,18,23,.96);
  color:#fff;
  font:600 23px/1 system-ui,sans-serif;
  cursor:pointer;
  touch-action:manipulation;
}
.card-eyedropper-crosshair {
  position:absolute;
  z-index:2;
  width:28px;
  height:28px;
  transform:translate(-50%,-50%);
  border:2px solid #fff;
  border-radius:50%;
  box-shadow:0 0 0 1px #141414,0 0 7px rgba(0,0,0,.75);
  pointer-events:none;
}
.card-eyedropper-crosshair::before,
.card-eyedropper-crosshair::after {
  content:'';
  position:absolute;
  background:#fff;
  box-shadow:0 0 2px #000;
}
.card-eyedropper-crosshair::before { width:1px; height:22px; left:50%; top:2px; }
.card-eyedropper-crosshair::after { height:1px; width:22px; top:50%; left:2px; }
.card-eyedropper-color-preview {
  position:absolute;
  z-index:3;
  width:30px;
  height:30px;
  transform:translate(-50%,-50%);
  border:3px solid white;
  border-radius:50%;
  box-shadow:0 0 0 1px #111,0 2px 7px rgba(0,0,0,.55);
  pointer-events:none;
}
@media(max-width:760px) {
  .outline-color-control { gap:5px; }
  .outline-eyedropper-trigger { min-width:35px; height:28px; padding:3px 5px; }
  .card-eyedropper-instruction { top:35px; font-size:9px; }
}


/* Keep promo redemption and publishing rewards easy to use inside the Credits popup. */
.credit-promo-box { margin:10px 0 14px; }
.credit-promo-row { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.credit-promo-row input { min-width:0; }
.credit-promo-prefix { width:5.5rem; flex:0 0 5.5rem; text-align:center; }
.credit-promo-suffix { flex:1 1 9rem; }
.credit-promo-row .secondary { flex:0 0 auto; }
.credit-promo-signin { display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; }
.credit-promo-success { padding:8px 10px; border:1px solid rgba(107,178,124,.5); border-radius:7px; color:#b9efc2; font-size:13px; }
.credit-rewards-box { margin:0 0 14px; }
@media (max-width:420px) {
  .credit-promo-row .secondary { flex:1 1 100%; }
}

/* Community first visit, social Creator Rewards, and Credit fanfare */
.community-modal { position:relative; }
.community-intro-overlay { position:absolute; inset:0; z-index:30; display:flex; justify-content:center; align-items:flex-start; padding:max(20px,5vh) 15px; overflow:auto; background:rgba(0,0,0,.88); }
.community-intro-card { width:min(650px,100%); padding:24px; border:1px solid #ae8948; border-radius:16px; background:linear-gradient(160deg,#202329,#11161b); color:#d5dce1; box-shadow:0 18px 50px #0009; }
.community-intro-card h2 { color:#f1d38b; margin:0 0 12px; font-family:Georgia,serif; }
.community-intro-card p { line-height:1.6; font-size:14px; }
.community-intro-card strong { color:#efd8a4; }
.community-intro-actions { display:flex; flex-wrap:wrap; gap:10px; margin-top:20px; }
.social-rewards-backdrop { z-index:120; }
.social-rewards-modal { max-height:90dvh; overflow-y:auto; width:min(760px,96vw); }
.social-reward-form { display:grid; gap:12px; margin:16px 0 24px; }
.social-reward-form label, .social-reward-row label { display:grid; gap:5px; }
.social-reward-list { display:grid; gap:12px; margin-top:12px; }
.social-reward-row { display:grid; gap:8px; padding:14px; border:1px solid #475058; border-radius:10px; background:#111820; overflow-wrap:anywhere; }
.social-reward-row a { color:#efd08a; text-decoration:underline; }
.social-reward-row small { color:#aab3bc; }
.social-reward-callout { margin:20px 0; padding:16px; border:1px solid #8f723b; border-radius:12px; background:rgba(196,141,46,.08); }
.social-reward-callout h3 { margin:0 0 8px; color:#f2d9a7; }
.social-reward-callout p { margin:0 0 12px; font-size:13px; }
.award-toast-backdrop { position:fixed; inset:auto 16px calc(16px + env(safe-area-inset-bottom)) auto; display:block; width:min(420px,calc(100vw - 32px)); padding:0; z-index:250; pointer-events:none; }
.award-toast { width:100%; pointer-events:auto; text-align:center; border:1px solid #deb96c; border-radius:20px; padding:20px; background:linear-gradient(#26252a,#141921); box-shadow:0 15px 55px #000a; color:#fff2ca; }
.award-toast-icon { font-size:48px; }
.award-toast h2 { font-family:Georgia,serif; color:#f9dc91; margin:10px 0; }
.award-toast strong { display:block; font-size:24px; margin:14px 0; }
.award-toast p { color:#d0d7da; }
.award-toast-actions { display:flex; gap:8px; justify-content:center; flex-wrap:wrap; margin-top:20px; }
@media(max-width:760px){ .community-intro-card {padding:18px} .community-intro-actions button {width:100%} .social-rewards-modal {max-height:100dvh; min-height:100dvh; width:100vw;} .award-toast-backdrop {left:12px;right:12px;bottom:calc(12px + env(safe-area-inset-bottom));width:auto;} .award-toast {padding:16px 12px;} .award-toast-icon {font-size:32px;} .award-toast strong {font-size:21px;} }

/* Discreet admin-only attention bell and review panel */
.cmt-admin-attention { position:fixed; left:16px; bottom:calc(16px + env(safe-area-inset-bottom)); z-index:240; }
.cmt-admin-attention-bell { position:relative; display:flex; justify-content:center; align-items:center; width:44px; height:44px; border:1px solid #655a45; border-radius:50%; background:#171c22; color:#dbcb9e; box-shadow:0 5px 16px #0009; }
.cmt-admin-attention-bell.has-pending { color:#f1d18a; border-color:#b68e4d; }
.cmt-admin-attention-bell:hover { background:#292b30; }
.cmt-admin-attention-count { position:absolute; display:flex; justify-content:center; align-items:center; min-width:19px; height:19px; padding:0 4px; top:-7px; right:-8px; border-radius:12px; border:1px solid #e3b76a; background:#8c4b26; color:white; font-size:11px; font-weight:800; }
.cmt-admin-attention-panel { position:absolute; bottom:54px; left:0; width:min(370px,calc(100vw - 32px)); max-height:min(70dvh,470px); overflow:auto; padding:16px; border:1px solid #937444; border-radius:14px; background:linear-gradient(150deg,#22262b,#11171d); box-shadow:0 15px 55px #000c; color:#e1d8c6; }
.cmt-admin-attention-head { display:flex; justify-content:space-between; align-items:center; }
.cmt-admin-attention-head strong { font-family:Georgia,serif; color:#f0d28e; font-size:18px; }
.cmt-admin-attention-task { display:flex; justify-content:space-between; align-items:center; gap:12px; width:100%; margin-top:8px; padding:11px 10px; border:1px solid #4e5154; border-radius:9px; background:#161b20; color:#e4e5e5; text-align:left; font-size:13px; }
.cmt-admin-attention-task:hover { border-color:#b18b4d; background:#25282c; }
.cmt-admin-attention-task b { display:grid; place-items:center; min-width:26px; height:24px; padding:0 5px; border-radius:7px; background:#3a3734; color:#f0d28e; }
.cmt-admin-attention-foot { display:flex; justify-content:space-between; align-items:center; gap:8px; margin-top:12px; }
@media(max-width:760px){ .cmt-admin-attention {left:12px;bottom:calc(12px + env(safe-area-inset-bottom));} }

/* Ask CMT: public, low-cost AI assistance drawer. Keep clear of the admin bell. */
.cmt-help-chat { position:fixed; right:16px; bottom:calc(16px + env(safe-area-inset-bottom)); z-index:170; font-family:inherit; }
.cmt-help-chat-launch { display:flex; align-items:center; justify-content:center; gap:8px; border:1px solid #a1844c;
  background:linear-gradient(145deg,#392c1e,#181d24); box-shadow:0 8px 24px #0009;
  border-radius:30px; color:#f3daa0; font-weight:700; padding:10px 17px; min-height:43px; }
.cmt-help-chat-launch span:first-child { font-size:22px; line-height:1; }
.cmt-help-chat-launch:hover { background:#37312a; border-color:#e0b769; }
.cmt-help-chat-panel { position:absolute; bottom:56px; right:0; display:flex; flex-direction:column;
  width:min(390px,calc(100vw - 24px)); height:min(580px,calc(100dvh - 115px));
  border:1px solid #8e794f; border-radius:16px; overflow:hidden;
  background:#141a21; color:#e7e7e4; box-shadow:0 15px 70px #000c; }
.cmt-help-chat-head { display:flex; align-items:center; justify-content:space-between; gap:8px;
  padding:15px 16px 12px; border-bottom:1px solid #534a3c; background:linear-gradient(120deg,#31271c,#19232d); }
.cmt-help-chat-head strong { display:block; color:#f5d18d; font-family:Georgia,serif; font-size:19px; }
.cmt-help-chat-head small { display:block; font-size:11px; color:#d5c9b4; line-height:1.4; margin-top:3px; }
.cmt-help-chat-close { border:0; background:transparent; color:#efdcaf; font-size:28px; min-width:30px; }
.cmt-help-chat-thread { flex:1; min-height:0; overflow-y:auto; padding:14px; display:flex; flex-direction:column; gap:12px; }
.cmt-help-chat-welcome p { font-size:13px; line-height:1.5; margin:0 0 10px; color:#d9e0e1; }
.cmt-help-chat-suggestions { display:flex; flex-direction:column; align-items:flex-start; gap:8px; }
.cmt-help-chat-suggestion { border:1px solid #666455; border-radius:10px; padding:9px 11px;
  background:#242b30; color:#efddba; text-align:left; font-size:12px; }
.cmt-help-chat-suggestion:hover { border-color:#e2b86a; }
.cmt-help-chat-message { display:flex; flex-direction:column; gap:4px; max-width:94%; padding:10px 11px;
  border-radius:12px; background:#25313d; white-space:pre-wrap; overflow-wrap:anywhere; }
.cmt-help-chat-message.from-user { background:#55452c; align-self:flex-end; }
.cmt-help-chat-speaker { font-size:10px; font-weight:800; letter-spacing:.025em; color:#edd39b; }
.cmt-help-chat-message p { margin:0; font-size:13px; line-height:1.5; }
.cmt-help-chat-thinking { font-size:12px; color:#d5c59f; }
.cmt-help-chat-error { margin:0; padding:7px 13px; font-size:12px; color:#ffc9be; background:#5a2626; }
.cmt-help-chat-form { padding:10px; border-top:1px solid #4d5154; display:flex; gap:8px; align-items:end; }
.cmt-help-chat-form textarea { min-width:0; flex:1; resize:vertical; max-height:100px;
  border:1px solid #64666b; border-radius:9px; color:#f1f1ed; background:#232c35;
  padding:9px; font-size:13px; line-height:1.35; }
.cmt-help-chat-form button { flex-shrink:0; min-height:38px; }
.cmt-help-chat-footer { display:flex; flex-direction:column; gap:5px; border-top:1px solid #343d42;
  padding:8px 12px 10px; color:#afbac2; font-size:10px; }
.cmt-help-chat-footer div { display:flex; gap:15px; }
.cmt-help-chat-footer button { background:transparent; border:0; padding:0; color:#f0d19a; font-size:11px; text-decoration:underline; }
.cmt-help-chat .sr-only { position:absolute!important; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
@media(max-width:700px) {
  .cmt-help-chat { right:12px; bottom:calc(12px + env(safe-area-inset-bottom)); }
  .cmt-help-chat-panel { bottom:52px; width:min(410px,calc(100vw - 24px)); height:min(620px,calc(100dvh - 92px)); }
  .cmt-help-chat-launch { padding:9px 13px; }
}


/* Help and admin notifications now live in the bottom page footer, not the viewport. */
footer.cmt-site-footer {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1550px;
  gap: 14px;
  overflow: visible;
}
.cmt-footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 20px;
}

/* Discreet social links with comfortable touch targets, including on mobile. */
.cmt-social-links{display:inline-flex;align-items:center;justify-content:center;gap:8px}
.cmt-social-links a{display:inline-flex;align-items:center;justify-content:center;width:42px;height:42px;flex:0 0 42px;border:1px solid rgba(217,180,94,.36);border-radius:12px;background:rgba(255,255,255,.04);color:#e8d8b7;text-decoration:none;transition:background-color .16s,border-color .16s,color .16s}
.cmt-social-links a:hover{background:rgba(217,180,94,.12);border-color:#d9b45e;color:#fff0c9}
.cmt-social-links a:focus-visible{outline:2px solid #e9c270;outline-offset:3px}
.cmt-social-links svg{display:block;width:21px;height:21px}
.cmt-footer-tools {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 14px;
  min-height: 44px;
  position: relative;
  z-index: 245;
}
.cmt-footer-admin-slot { display: flex; align-items: center; min-height: 44px; }
.cmt-footer-tools .cmt-help-chat,
.cmt-footer-tools .cmt-admin-attention {
  position: relative;
  inset: auto;
  bottom: auto;
  left: auto;
  right: auto;
}
.cmt-footer-tools .cmt-help-chat-panel { bottom: 56px; right: 0; }
.cmt-footer-tools .cmt-admin-attention-panel { bottom: 54px; left: 0; }
@media (max-width: 760px) {
  footer.cmt-site-footer { align-items: stretch; gap: 14px; }
  .cmt-footer-row { justify-content: center; text-align: center; }
  .cmt-footer-tools { justify-content: space-between; align-items: center; width: 100%; }
  .cmt-footer-tools .cmt-help-chat-panel { right: 0; width: min(390px, calc(100vw - 26px)); }
}

/* Keep recovery controls in the spare space beside random text actions. */
.text-field-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.text-field-actions > .dice-button { margin-top: 0; }
.text-field-actions > button { flex: 0 0 auto; }

/* Keep wild inclusion beside the gender controls, wrapping as one group on phones. */
.characterizer-controls { flex-wrap: wrap; }
.characterizer-option-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.characterizer-wild-toggle { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; font-size: 12px; cursor: pointer; }
.characterizer-wild-toggle input { width: 16px; height: 16px; margin: 0; flex: 0 0 auto; }


/* CMTAgent provenance: visually quiet badge, distinct from creator/rarity rewards. */
.community-agent-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 0.35rem;
  padding: 0.1rem 0.35rem;
  border: 1px solid currentColor;
  border-radius: 0.28rem;
  font-size: 0.61rem;
  font-weight: 700;
  letter-spacing: 0.055em;
  color: #718090;
  vertical-align: middle;
  white-space: nowrap;
}


/* Unlisted, low-resolution shared-card viewer. No editor, save or print UI. */
.share-landing {
  min-height:100vh; box-sizing:border-box;
  padding:clamp(26px,5vw,64px) 15px 52px;
  background:radial-gradient(ellipse at 50% 5%,#302717 0%,#10151a 53%,#090d11 100%);
  color:#f7eace; display:flex; justify-content:center; align-items:flex-start;
  text-align:center;
}
.share-landing-inner { width:min(100%,640px); }
.share-landing-eyebrow { color:#eac16f; font-size:13px; letter-spacing:.14em; font-weight:800; }
.share-landing h1 { font:700 clamp(27px,5.5vw,42px)/1.15 Georgia,serif; margin:18px 0 12px; }
.share-landing h2 { font:700 26px Georgia,serif; margin:25px 0 6px; }
.share-landing p { color:#d7d2ca; margin:10px auto 18px; line-height:1.5; }
.share-landing-preview { width:min(100%,420px); margin:12px auto 6px; padding:8px;
  background:#1c1811; border:1px solid #936d34; box-shadow:0 18px 55px #000a;
  border-radius:7px; user-select:none; -webkit-user-select:none;
}
.share-landing-preview img { width:100%; aspect-ratio:430/602; object-fit:contain; display:block;
  pointer-events:none; user-select:none; -webkit-user-drag:none;
}
.share-landing .share-landing-small { font-size:12px; color:#a3a8ac; margin:6px auto 17px; }
.share-landing-error { border:1px solid #b17f6d; border-radius:8px; padding:20px; }
.share-landing-cta { display:inline-block; text-decoration:none; background:#d9a650; color:#241707;
  border-radius:10px; padding:14px 20px; font-size:17px; font-weight:800; margin:8px 0;
}
.share-landing-cta:hover,.share-landing-cta:focus-visible { background:#f5cd7b; }
.card-share-backdrop { z-index:10010; }
.card-share-dialog { width:min(94vw,480px); padding:23px; box-sizing:border-box; border-radius:14px;
  background:#10171c; color:#ece3d2; border:1px solid #94703a; box-shadow:0 16px 60px #000b;
}
.card-share-dialog h2 { margin:0 0 10px; }
.card-share-dialog p { line-height:1.5; font-size:14px; color:#b8c2c8; }
.card-share-dialog input { box-sizing:border-box; width:100%; padding:11px; font-size:13px;
  background:#071015; border:1px solid #6d8390; color:#f0e5ca; border-radius:7px; }
.card-share-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:16px; }
.card-share-actions button { flex:1 1 auto; min-height:40px; }
@media print { .share-landing { display:none !important; } }


/* Shared-card invitation destination: first-card onboarding (guest AI pending). */
.first-card-entry {
  min-height:100vh;
  box-sizing:border-box;
  padding:clamp(24px,6vw,70px) 16px;
  background:radial-gradient(ellipse at top,#312413 0%,#14191e 58%,#080c0f 100%);
  display:flex;
  justify-content:center;
  align-items:center;
  color:#f7eace;
}
.first-card-entry-content {
  text-align:center;
  width:min(100%,750px);
  box-sizing:border-box;
  padding:clamp(20px,5vw,48px);
  border:1px solid #70532d;
  border-radius:18px;
  background:linear-gradient(150deg,rgba(27,32,35,.93),rgba(15,18,22,.96));
  box-shadow:0 18px 55px #0009;
}
.first-card-entry-kicker {
  color:#c5a672;
  font-size:12px;
  letter-spacing:.18em;
  font-weight:800;
  margin:22px 0 6px;
}
.first-card-entry h1 {
  font:700 clamp(28px,6vw,46px)/1.15 Georgia,serif;
  margin:12px 0 15px;
}
.first-card-entry-lede {
  color:#d9d3c6;
  font-size:clamp(16px,2.7vw,20px);
  line-height:1.5;
  max-width:570px;
  margin:0 auto 28px;
}
.first-card-entry-guide {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:13px;
  margin:0 auto 24px;
}
.first-card-entry-guide > div {
  border:1px solid #63543b;
  border-radius:10px;
  background:#11181e;
  padding:16px 11px;
  display:flex;
  flex-direction:column;
  gap:6px;
}
.first-card-entry-guide span {color:#dbb36b;font-size:25px;}
.first-card-entry-guide strong {font-size:15px;}
.first-card-entry-guide small {color:#b5bec1;line-height:1.45;font-size:12px;}
.first-card-entry-cta {display:inline-block;margin:3px 0 8px;}
.first-card-entry-note {
  color:#a7b0b1;
  font-size:12px;
  line-height:1.5;
  max-width:510px;
  margin:12px auto 0;
}
@media (max-width:620px) {
  .first-card-entry-guide {grid-template-columns:1fr;gap:8px;}
  .first-card-entry-guide > div {padding:11px 14px;display:grid;text-align:left;grid-template-columns:32px 1fr;column-gap:8px;}
  .first-card-entry-guide span {grid-row:1/3;align-self:center;}
  .first-card-entry-guide strong,.first-card-entry-guide small {grid-column:2;}
  .first-card-entry-lede {margin-bottom:18px;}
}


/* First-card Characterizer: same Person reference-image rules, mobile first. */
.first-card-entry-content.first-card-characterizer {
  width:min(100%,970px); text-align:left;
}
.first-card-characterizer > .share-landing-eyebrow,
.first-card-characterizer > .first-card-entry-kicker,
.first-card-characterizer > h1,
.first-card-characterizer > .first-card-entry-lede {
  text-align:center;
}
.first-card-characterizer-grid {
  display:grid; grid-template-columns:minmax(0,1fr) minmax(240px,0.84fr);
  align-items:start; gap:clamp(16px,3vw,38px); margin-top:26px;
}
.first-card-characterizer-controls { min-width:0; display:grid; gap:12px; }
.first-card-characterizer-controls label.first-card-name { display:grid; gap:8px; font-size:15px; font-weight:700; color:#f8e7c6; }
.first-card-name input { width:100%; box-sizing:border-box; min-height:45px; padding:12px 14px; border-radius:9px;
  border:1px solid #806940; background:#0b151b; color:#f9f3e5; font:inherit; }
.first-card-photo-heading { display:flex; justify-content:space-between; gap:8px; color:#e9d5a8; font-size:16px; margin-top:5px; }
.first-card-photo-heading span { color:#a0adb1; font-size:13px; }
.first-card-photo-help { font-size:13px; line-height:1.45; color:#d4d0c8; margin:0; }
.first-card-photo-strip { display:flex; flex-wrap:wrap; gap:9px; min-height:86px; }
.first-card-photo { position:relative; width:72px; height:89px; border-radius:9px; overflow:hidden; border:1px solid #9c7c44; background:#202a30; }
.first-card-photo img {width:100%;height:100%;object-fit:cover;display:block}
.first-card-photo button { position:absolute; top:1px; right:1px; background:rgba(10,14,18,.92);color:white;
  border:0;border-radius:5px;min-width:24px;min-height:24px;font-size:19px;cursor:pointer}
.first-card-add-photo { width:80px; height:89px; border:1px dashed #99835d; color:#e6d4aa;
  background:#111b21; border-radius:9px; display:flex; flex-direction:column; align-items:center; justify-content:center; cursor:pointer; gap:3px}
.first-card-add-photo span {font-size:28px;line-height:1}
.first-card-add-photo small {font-size:11px}
.first-card-photo-disclaimer {color:#a5b1b6;font-size:11px;line-height:1.35;margin:0}
.first-card-role-options {border-top:1px solid #4b4942;padding-top:10px;display:grid;gap:11px;color:#ddd2c1;font-size:13px}
.first-card-genders {display:flex;gap:8px}
.first-card-genders button {padding:8px 15px;border:1px solid #7d705b;background:#162128;border-radius:8px;color:#e7dfcf;cursor:pointer}
.first-card-genders button.selected {background:#63471e;border-color:#dbac55;color:#fff5d8}
.first-card-role-options label {display:flex;align-items:flex-start;gap:9px;cursor:pointer;line-height:1.4}
.first-card-role-options input {width:17px;height:17px;margin:0;accent-color:#d6a54e;flex:none}
.first-card-adult-note {color:#e7bf81;line-height:1.4}
.first-card-generation-actions {display:grid;gap:9px;margin-top:5px}
.first-card-generation-actions button {width:100%;min-height:44px;padding:10px 12px;font-size:14px}
.first-card-credit-note {font-size:12px;color:#b7c0c3;line-height:1.5;margin:0}
.first-card-error,.first-card-status {border-radius:8px;padding:10px 12px;margin:0;font-size:13px;line-height:1.4}
.first-card-error {color:#ffcfbc;background:#381e1c}
.first-card-status {color:#e9d5a9;background:#263322}
.first-card-characterizer-preview {min-width:0;text-align:center;display:grid;justify-items:center;gap:12px}
.first-card-characterizer-preview > strong {font-size:17px;color:#e9d4a7}
.first-card-characterizer-preview > .card-preview {width:min(100%,320px)!important;margin:0 auto 4px!important}
.first-card-preview-placeholder {width:min(100%,280px);aspect-ratio:2.5/3.5;display:grid;place-content:center;gap:10px;
  border:2px dashed #80673d;border-radius:14px;background:linear-gradient(155deg,#263039,#151a20);
  color:#d4c29b;padding:22px;box-sizing:border-box}
.first-card-preview-placeholder span {font-size:48px}
.first-card-preview-placeholder p {font-size:13px;line-height:1.45;margin:0}
.first-card-characterizer-preview .full {max-width:320px}
.first-card-entry-footer {text-align:center;margin-top:25px}
.first-card-entry-footer .text-button {color:#d9c08d;text-decoration:underline}
@media(max-width:740px) {
  .first-card-entry {align-items:flex-start;padding:15px 9px 45px}
  .first-card-entry-content.first-card-characterizer {padding:20px 14px}
  .first-card-characterizer-grid {grid-template-columns:minmax(0,1fr)}
  .first-card-characterizer-preview {grid-row:2}
  .first-card-characterizer-preview > .card-preview {width:min(86vw,320px)!important}
  .first-card-entry-lede {margin-bottom:15px}
}


/* Share Card is directly accessible in the mobile Creator, not only My Cards.
   Protected share links remain server-side previews; no print PNG export. */
.editor-share-mobile { display:none; }
.guided-type-controls { display:contents; }
@media(max-width:760px) {
  .mobile-editor-actions .editor-share-mobile {
    display:block !important;
    grid-column:1 / -1;
    min-height:39px;
  }
}
/* One-first-card invitation: the real editor remains visible but locked until
   the authenticated Characterizer has produced artwork. */
.first-card-editor-guide {
  width:min(100% - 30px, 970px);
  box-sizing:border-box;
  margin:14px auto 5px;
  padding:15px 18px;
  border:1px solid #9a783f;
  border-radius:12px;
  background:linear-gradient(115deg,#312712,#171e21);
  color:#f4e1b4;
  display:grid;
  gap:6px;
  text-align:center;
  line-height:1.45;
}
.first-card-editor-guide strong { font:700 20px Georgia,serif; }
.first-card-editor-guide span {font-size:14px;color:#efe3ce;}
.first-card-editor-guide small {font-size:12px;color:#b5c0c2;}
.app-shell.first-card-guided .guided-type-controls {
  display:block;
  opacity:.36;
  filter:grayscale(.8);
}
.app-shell.first-card-guided .mobile-editor-actions,
.app-shell.first-card-guided .desktop-reference-images,
.app-shell.first-card-guided .saved-cards-inline,
.app-shell.first-card-guided .right-panel,
.app-shell.first-card-guided .mobile-bottom-nav {
  opacity:.32;
  filter:grayscale(1);
}
.app-shell.first-card-guided .preview-panel {
  cursor:default;
}
.guided-person-help,.guided-photo-limit {
  padding:10px 12px;
  background:#1d2a30;
  border:1px solid #736541;
  border-radius:9px;
  font-size:13px;
  line-height:1.45;
  color:#e3d5b4;
  margin:8px 0;
}
.guided-person-name { display:grid;gap:7px; margin:10px 0; font-size:14px; font-weight:700; }
.guided-person-name input { width:100%;box-sizing:border-box; min-height:45px; padding:10px; border-radius:8px;
  border:1px solid #a28a59; color:#f9efda;background:#111a20;font:inherit; }
.characterizer-option-row .guided-mature-toggle {
  flex:1 1 100%;
  margin:7px 0 2px;
  padding:9px 8px;
  border:1px solid #74633e;
  border-radius:8px;
  color:#efdeba;
}
@media(max-width:760px) {
  .first-card-editor-guide {width:calc(100% - 16px);padding:10px 11px;margin:9px auto 2px;}
  .first-card-editor-guide strong {font-size:17px}
  .first-card-editor-guide span {font-size:12px}
  .first-card-editor-guide small {font-size:11px}
}


/* Free guest Characterizer: server-enforced single claim, voluntary signup afterward. */
.guest-trial-check {
  grid-column:1 / -1;
  padding:11px 12px;
  border:1px solid #886b34;
  border-radius:9px;
  background:linear-gradient(125deg,#272315,#182126);
  color:#f0dfbc;
  display:grid;
  gap:6px;
  margin:6px 0;
}
.guest-trial-check strong {font-size:14px;}
.guest-trial-check p {font-size:12px;line-height:1.5;margin:0;}
.guest-trial-check small {font-size:12px;color:#debc88;}
.guest-trial-check .auth-captcha {margin:5px 0;}
.guided-guest-signup {
  grid-column:1 / -1;
  font-size:13px;
  min-height:36px;
}
.guest-conversion-panel {
  width:min(100% - 30px,970px);
  margin:12px auto 2px;
  box-sizing:border-box;
  display:grid;
  gap:8px;
  padding:16px;
  border-radius:13px;
  border:1px solid #af8a46;
  background:linear-gradient(120deg,#343018,#1c2829);
  color:#f8eac5;
  line-height:1.45;
}
.guest-conversion-panel strong {font:700 20px Georgia,serif;}
.guest-conversion-panel span {font-size:14px;}
.guest-conversion-panel small {font-size:12px;color:#c1c9c4;}
.guest-conversion-actions {display:flex;flex-wrap:wrap;gap:9px;}
.guest-conversion-actions button {min-height:41px; flex:1 1 180px;}
@media(max-width:760px) {
  .guest-conversion-panel {width:calc(100% - 16px);padding:11px;}
  .guest-conversion-panel strong {font-size:16px;}
  .guest-conversion-panel span {font-size:12px;}
}


/* Owner-only first-card conversion report: counts, sources and real generation completions. */
.guest-funnel-modal { width:min(94vw,980px) !important; max-height:88vh; overflow:auto; }
.guest-funnel-controls {display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:9px 0 16px;}
.guest-funnel-controls label {display:flex;align-items:center;gap:8px;}
.guest-funnel-controls select {padding:7px;border:1px solid #76633f;border-radius:6px;background:#11191d;color:#f4e5bc;}
.guest-funnel-kpis {display:grid;grid-template-columns:repeat(auto-fit,minmax(132px,1fr));gap:9px;margin-bottom:15px;}
.guest-funnel-kpi {display:grid;gap:3px;background:rgba(20,28,33,.87);padding:10px;border:1px solid #66512f;border-radius:8px;}
.guest-funnel-kpi strong {font:700 24px Georgia,serif;color:#f4cc78;}
.guest-funnel-kpi span {font-size:12px;color:#d6d2c8;}
.guest-funnel-kpi small {font-size:10px;color:#acb7b6;}
.guest-funnel-table-wrap {max-width:100%;overflow-x:auto;}
.guest-funnel-table {width:100%;border-collapse:collapse;font-size:12px;}
.guest-funnel-table th,.guest-funnel-table td {text-align:left;padding:8px 9px;border-bottom:1px solid #38454d;}
.guest-funnel-table th {color:#f4dfb6;}
.guest-funnel-table small {color:#abb4b7;}
@media(max-width:760px){.guest-funnel-modal {max-height:calc(100dvh - 40px)}.guest-funnel-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}}


/* Ad builder lives inside admin-only first-card conversion analytics. */
.tracking-link-generator {
  border:1px solid #836335;
  border-radius:12px;
  padding:15px;
  background:linear-gradient(125deg,rgba(52,40,25,.72),rgba(20,31,35,.88));
  margin:10px 0 20px;
}
.tracking-link-title {display:flex;gap:6px 15px;align-items:baseline;flex-wrap:wrap;margin-bottom:12px;}
.tracking-link-title h3 {margin:0;font-size:19px;}
.tracking-link-title span {font-size:12px;}
.tracking-link-fields {display:grid;grid-template-columns:minmax(145px,195px) minmax(0,1fr);gap:10px 14px;align-items:center;}
.tracking-link-fields label,.tracking-link-output label {font-size:13px;font-weight:600;color:#f1dfb7;}
.tracking-link-fields input,.tracking-link-fields select,.tracking-link-output input {
  width:100%;min-width:0;box-sizing:border-box;padding:10px 12px;
  color:#f5ead2;background:#10171a;border:1px solid #756e5c;
  border-radius:7px;font-size:14px;
}
.tracking-link-fields input:focus-visible,.tracking-link-fields select:focus-visible,
.tracking-link-output input:focus-visible {outline:2px solid #d6ae62;outline-offset:1px;}
.tracking-link-note {font-size:12px;margin:12px 0;line-height:1.5;}
.tracking-link-output {display:grid;gap:8px;margin-top:12px;}
.tracking-link-output input {font-size:12px;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;}
.tracking-link-output small {font-size:12px;color:#d7c3a3;}
.tracking-link-actions {display:flex;gap:9px;flex-wrap:wrap;}
.tracking-link-actions button {flex:1 1 180px;min-height:40px;}
@media(max-width:760px) {
  .tracking-link-generator {padding:12px;}
  .tracking-link-title h3 {font-size:16px;}
  .tracking-link-fields {grid-template-columns:minmax(0,1fr);gap:6px;}
  .tracking-link-fields label {margin-top:5px;}
  .tracking-link-actions button {flex:1 1 100%;}
}

/* Meta / first-card entry only: portraits evolve into original, unchanged Character cards.
   Frame choices for the new customer trial are set separately in App.tsx. */
.first-card-welcome-backdrop {
  position:fixed; inset:0; z-index:12000; background:rgba(2,4,7,.94);
  display:grid; place-items:center; overflow:auto; padding:12px; box-sizing:border-box;
}
.first-card-welcome {
  width:min(100%,1100px); max-height:calc(100dvh - 24px); overflow-x:hidden; overflow-y:auto;
  box-sizing:border-box; position:relative;
  padding:clamp(18px,3vw,36px) clamp(14px,3vw,40px) 20px;
  border:1px solid #8d7449; border-radius:20px;
  background:radial-gradient(ellipse at 50% 40%,#243038 0%,#10171d 58%,#080b0f 100%);
  box-shadow:0 32px 95px rgba(0,0,0,.85),inset 0 0 100px rgba(167,118,45,.045);
  text-align:center; color:#f4e6cc;
}
/* Android/Chrome highlights pressed buttons and image text with a blue rectangle.
   Suppress touch-only selection while retaining focus-visible keyboard feedback. */
.first-card-welcome-portrait-button,
.first-card-welcome-card,
.first-card-welcome-navigation button,
.first-card-welcome-cta,
.first-card-welcome-close {
  -webkit-tap-highlight-color:transparent;
  -webkit-touch-callout:none;
  -webkit-user-select:none;
  user-select:none;
  touch-action:manipulation;
}
.first-card-welcome-portrait-button img,
.first-card-welcome-portrait-button video,
.first-card-welcome-card .card-preview {
  -webkit-user-select:none;
  user-select:none;
  -webkit-user-drag:none;
}
.first-card-welcome-portrait-button:focus:not(:focus-visible),
.first-card-welcome-card:focus:not(:focus-visible),
.first-card-welcome-navigation button:focus:not(:focus-visible),
.first-card-welcome-cta:focus:not(:focus-visible),
.first-card-welcome-close:focus:not(:focus-visible) { outline:none; }
.first-card-welcome-close {
  position:absolute; top:8px; right:12px; border:0; background:transparent; color:#f3e9d5;
  font:400 32px/1 sans-serif; cursor:pointer; z-index:15; padding:8px 12px;
}
.first-card-welcome-eyebrow { color:#d0ae71; font:700 10px/1.4 system-ui,sans-serif; letter-spacing:.24em; margin:0 auto 9px; padding:0 36px; }
.first-card-welcome h1 { font:700 clamp(28px,3.65vw,49px)/1.14 Georgia,serif; margin:0; color:#f7e7c9; }
.first-card-welcome-lede { color:#dae0dc; font-size:clamp(13px,1.4vw,17px); margin:12px auto 0; max-width:620px; line-height:1.45; }
.first-card-welcome-scene {
  margin:10px auto 6px; display:flex; gap:clamp(8px,1.5vw,20px);
  min-height:490px; justify-content:center; align-items:center; width:100%; isolation:isolate;
}
.first-card-welcome-scene.is-right { flex-direction:row-reverse; }
.first-card-welcome-person {
  width:clamp(235px,31vw,370px); min-width:0; align-self:stretch;
  display:flex; flex-direction:column; align-items:center; justify-content:flex-end;
}
.first-card-welcome-portrait-button {
  position:relative; width:100%; display:block; margin:0; padding:0; line-height:0;
  border:0; background:transparent; cursor:pointer; border-radius:12px;
}
.first-card-welcome-portrait-button:disabled { cursor:default; }
.first-card-welcome-portrait-button:focus-visible { outline:3px solid #f2cc84; outline-offset:5px; }
.first-card-welcome-person img {
  object-fit:contain; object-position:center bottom; display:block;
  width:100%; height:clamp(360px,42vw,475px);
  filter:drop-shadow(0 14px 20px #0008);
}
/* iPhones use true-alpha APNG media derived from the original VP9 videos,
   rather than displaying the WebM with an opaque black backing. */
/* Preserve the layout space but remove the cutout completely while alpha video plays.
   Otherwise moving transparent pixels reveal a second, static person underneath. */
.first-card-welcome-portrait-button img.reaction-still-hidden { visibility:hidden; }
.first-card-welcome-portrait-button video {
  position:absolute; inset:0; display:block; width:100%;
  height:clamp(360px,42vw,475px); object-fit:contain; object-position:center bottom;
  pointer-events:none;
}
.first-card-welcome-person strong { font:700 clamp(26px,2.5vw,33px)/1.15 Georgia,serif; color:#ffdf9f; margin:3px 0; }
.first-card-welcome-person small,.first-card-welcome-fan > small {
  font:700 10px/1.4 system-ui,sans-serif; color:#baaa88; letter-spacing:.17em;
}
.first-card-welcome-person small { font-size:14px; letter-spacing:.16em; }
.first-card-welcome-arrow { color:#eec373; width:clamp(110px,11vw,145px); flex-shrink:0; align-self:center; text-align:center; }
.first-card-welcome-arrow svg { display:block; width:100%; }
.first-card-welcome-scene.is-right .first-card-welcome-arrow svg { transform:scaleX(-1); }
.first-card-welcome-outcome {
  display:grid; justify-items:center; gap:2px; margin-top:5px;
  line-height:1.16; color:#fff1ce; text-shadow:0 1px 6px #000c;
}
.first-card-welcome-outcome > span {
  display:block; font:800 10px/1.3 system-ui,sans-serif; letter-spacing:.09em;
}
.first-card-welcome-outcome > strong {
  display:block; font:900 18px/1.1 system-ui,sans-serif; letter-spacing:.04em;
  color:#ffd67b;
}
.first-card-welcome-fan {
  position:relative; width:clamp(300px,37vw,450px); flex-shrink:0; height:390px; isolation:isolate;
}
.first-card-welcome-fan > small { position:absolute; left:0; right:0; bottom:0; }
.first-card-welcome-card {
  --offset:0px; --angle:0deg;
  position:absolute; left:50%; top:32px; width:205px; margin-left:-103px; padding:0;
  border:0; background:transparent; border-radius:12px; cursor:pointer;
  transform:translateX(var(--offset)) rotate(var(--angle));
  transition:transform .26s ease,filter .26s ease;
  filter:drop-shadow(0 10px 16px rgba(0,0,0,.7));
}
.first-card-welcome-card.card-0 { --offset:-94px; --angle:-13deg; z-index:1; }
.first-card-welcome-card.card-1 { --offset:0px; --angle:0deg; z-index:2; }
.first-card-welcome-card.card-2 { --offset:94px; --angle:13deg; z-index:3; }
.first-card-welcome-card.is-focused,
.first-card-welcome-card:focus-visible {
  z-index:10; transform:translateX(var(--offset)) translateY(-15px) rotate(var(--angle)) scale(1.105);
  filter:drop-shadow(0 15px 19px rgba(0,0,0,.9));
  outline:0;
}
.first-card-welcome-card:focus-visible .card-preview { outline:3px solid #f9d390; outline-offset:5px; }
.first-card-welcome-card .card-preview {
  margin:0; max-width:none; width:100%; pointer-events:none;
  box-shadow:0 13px 28px rgba(0,0,0,.65);
}
.first-card-welcome-missing-card {
  display:grid; place-items:center; aspect-ratio:0.65; background:#232931;
  border:2px solid #b59154; border-radius:12px; font:13px Georgia,serif; color:#d6c9b5;
}
.first-card-welcome-navigation { display:flex; flex-wrap:wrap; justify-content:center; gap:7px; margin:5px auto 17px; }
.first-card-welcome-navigation button {
  border:1px solid #5a6264; background:#152128; color:#e1ddd5;
  border-radius:100px; min-width:80px; padding:9px 13px; cursor:pointer;
  font-size:13px;
}
.first-card-welcome-navigation button.selected,
.first-card-welcome-navigation button:focus-visible { background:#5d4524; border-color:#f0c276; color:#fff0cb; }
.first-card-welcome-cta {
  display:block; width:min(100%,460px); margin:0 auto;
  background:linear-gradient(#f6cd78,#cf983f); color:#211508;
  border:1px solid #ffe09b; border-radius:11px; box-shadow:0 8px 26px #000a;
  font:800 clamp(16px,2vw,21px)/1.3 system-ui,sans-serif; padding:15px 22px; cursor:pointer;
}
.first-card-welcome-cta:hover:not(:disabled) { filter:brightness(1.12); }
.first-card-welcome-cta:disabled { opacity:.6; cursor:wait; }
.first-card-welcome-footnote {font-size:12px;line-height:1.4;color:#aebfc1;margin:11px auto 0;max-width:560px;}
@media(max-width:790px) {
  .first-card-welcome h1 { font-size:clamp(25px,6vw,32px); line-height:1.16; }
  .first-card-welcome-backdrop { padding:0; }
  .first-card-welcome {
    border-radius:0; border:0; min-height:100dvh; max-height:100dvh;
    padding:20px 10px 22px;
  }
  .first-card-welcome-scene,.first-card-welcome-scene.is-right {
    flex-direction:column; gap:1px; min-height:0; margin:12px auto 5px;
  }
  .first-card-welcome-person { width:min(52vw,210px); align-self:center; }
  .first-card-welcome-person img,.first-card-welcome-portrait-button video { height:clamp(150px,27vh,235px); }
  .first-card-welcome-person strong { font-size:20px; }
  .first-card-welcome-person small { font-size:11px; }
  /* On phones, read REAL PERSON -> arrow -> REAL PHYSICAL CARDS.
     The arrow connects the two labels; the physical-card promise stays
     clearly above the fanned cards, including their raised/tilted edges. */
  .first-card-welcome-arrow {
    width:200px; max-width:84vw; transform:none;
    margin:5px auto 26px; display:flex; flex-direction:column;
    align-items:center; gap:10px; flex-shrink:0;
  }
  .first-card-welcome-arrow svg { width:54px; height:43px; flex:none; transform:rotate(90deg); }
  .first-card-welcome-scene.is-right .first-card-welcome-arrow svg { transform:rotate(90deg); }
  .first-card-welcome-outcome { margin:0; gap:2px; }
  .first-card-welcome-outcome > span { font-size:12px; letter-spacing:.08em; }
  .first-card-welcome-outcome > strong { font-size:22px; }
  .first-card-welcome-fan { width:min(100%,370px); height:clamp(210px,32vh,295px); }
  /* This second slogan sat underneath the card edges on small phones. */
  .first-card-welcome-fan > small { display:none; }
  .first-card-welcome-card {width:clamp(132px,35vw,173px); margin-left:calc(-.5 * clamp(132px,35vw,173px)); top:12px;}
  .first-card-welcome-card.card-0 {--offset:-70px;}
  .first-card-welcome-card.card-2 {--offset:70px;}
  .first-card-welcome-lede {padding:0 7px;}
  .first-card-welcome-navigation {margin:6px auto 13px;}
  .first-card-welcome-navigation button {min-width:66px;padding:7px 10px;font-size:12px;}
  .first-card-welcome-cta {padding:13px 10px;}
}
@media(max-height:680px) and (min-width:791px) {
  .first-card-welcome-scene { min-height:300px; }
  .first-card-welcome-person { width:clamp(200px,27vw,300px); }
  .first-card-welcome-person img,.first-card-welcome-portrait-button video { height:300px; }
  .first-card-welcome-fan {height:300px;}
  .first-card-welcome-card {width:163px;margin-left:-82px;top:4px;}
}
@media(prefers-reduced-motion:reduce) {
  .first-card-welcome-card {transition:none;}
}


/* First-card advertising flow: show actions instead of a blank editor.
   This only applies to <=760px while the guided first card is unfinished.
   The normal mobile card editor and desktop styling remain intact. */
.first-card-mobile-direct-photo,
.first-card-mobile-status { display:none; }

@media (max-width:760px) {
  .app-shell.first-card-guided .guided-type-controls,
  .app-shell.first-card-guided .mobile-editor-actions,
  .app-shell.first-card-guided .mobile-bottom-nav { display:none !important; }

  /* The empty sticky card consumed nearly the entire Instagram viewport.
     Restore the full, editable card immediately after first generation. */
  .app-shell.first-card-guided .layout > .preview-panel { display:none !important; }

  /* Guest Cards and 0 Credits aren't actions needed to make the free card. */
  .app-shell.first-card-guided .topbar .credit-pill,
  .app-shell.first-card-guided .topbar .mobile-saved-images-button,
  .app-shell.first-card-guided .topbar .radio-toggle { display:none !important; }
  .app-shell.first-card-guided .topbar-right {
    display:flex !important;
    align-items:center;
    justify-content:flex-end;
    gap:5px;
  }

  /* Keep only the first-line value proposition; no repeated paragraphs. */
  .app-shell.first-card-guided .first-card-editor-guide {
    padding:8px 10px;
    margin:7px auto 3px;
    border-radius:8px;
    gap:0;
    line-height:1.2;
  }
  .app-shell.first-card-guided .first-card-editor-guide strong { font:700 16px/1.25 system-ui,sans-serif; }
  .app-shell.first-card-guided .first-card-editor-guide span,
  .app-shell.first-card-guided .first-card-editor-guide small { display:none !important; }

  .app-shell.first-card-guided .first-card-person-heading,
  .app-shell.first-card-guided .guided-person-help,
  .app-shell.first-card-guided .guided-photo-limit { display:none !important; }
  .app-shell.first-card-guided .layout { padding-top:3px !important; }
  .app-shell.first-card-guided .left-panel { padding:13px !important; }
  .app-shell.first-card-guided .guided-person-name {
    display:grid;
    gap:8px;
    margin:2px 0 10px;
    color:#ffe6ad;
    font-size:16px;
  }
  .app-shell.first-card-guided .guided-person-name input {
    min-height:54px;
    font-size:16px;
    padding:12px 13px;
  }
  .app-shell.first-card-guided .guided-person-name input:focus {
    border-color:#ffd178;
    outline:0;
  }
  .app-shell.first-card-guided .guided-person-name:focus-within {
    outline:3px solid #f4bf5d;
    outline-offset:3px;
    border-radius:8px;
  }

  .app-shell.first-card-guided .first-card-mobile-direct-photo {
    display:block;
    width:100%;
    min-height:54px;
    margin:7px 0 10px;
    padding:10px 14px;
    background:#efbc61;
    color:#20160c;
    border:2px solid #ffda8d;
    border-radius:10px;
    font-size:16px;
    font-weight:850;
    cursor:pointer;
    touch-action:manipulation;
  }
  .app-shell.first-card-guided .first-card-mobile-duplicate-upload { display:none !important; }
  .app-shell.first-card-guided .photo-strip {
    min-height:0;
    margin:0 0 5px;
  }
  .app-shell.first-card-guided .photo-strip > .muted { display:none; }
  .app-shell.first-card-guided .guest-trial-check {
    padding:10px 12px;
    gap:8px;
    margin:10px 0;
  }
  .app-shell.first-card-guided .guest-trial-check p { display:none; }
  .app-shell.first-card-guided .guest-trial-check strong { font-size:14px; }
  .app-shell.first-card-guided .characterizer-button { min-height:56px; font-weight:800; }

  /* Keep permission and failure messages visible, without lengthy guidance. */
  .app-shell.first-card-guided .left-panel .microcopy {
    font-size:11px;
    line-height:1.35;
  }
  .app-shell.first-card-guided .first-card-mobile-status {
    display:block;
    margin:12px 0;
    padding:10px;
    border:1px solid #a16c3f;
    border-radius:8px;
    background:#2a211c;
    color:#f0d4b4;
    font-size:13px;
    line-height:1.35;
  }
  .app-shell.first-card-guided .first-card-mobile-focus {
    outline:3px solid #f4bf5d !important;
    outline-offset:3px;
    border-radius:8px;
    animation:first-card-mobile-pulse 2.1s ease-in-out infinite;
  }
  @keyframes first-card-mobile-pulse {
    0%,100% { box-shadow:0 0 0 0 rgba(244,191,93,.12); }
    50% { box-shadow:0 0 0 7px rgba(244,191,93,.23); }
  }
}
@media (max-width:760px) and (prefers-reduced-motion:reduce) {
  .app-shell.first-card-guided .first-card-mobile-focus { animation:none; }
}

/* Homepage: keep the Complete Rules CTA beneath its copy rather than overlapping text. */
.landing-sticky-copy > .landing-rules-link{display:inline-flex;align-items:center;justify-content:center;
  position:relative;z-index:1;min-height:48px;margin-top:13px;padding:12px 22px;
  max-width:100%;line-height:1.4;text-align:center;text-decoration:none}
.landing-sticky-copy > p{margin-bottom:12px}
/* Keep the source labels readable around the deck image at every screen size. */
.landing-build-visual .landing-source-pill{z-index:3;white-space:nowrap}
.landing-build-visual .landing-deck-stack{z-index:1}
@media(max-width:760px){
  .landing-build-visual{display:flex!important;flex-wrap:wrap;align-content:center;align-items:center;
    justify-content:center;column-gap:12px;row-gap:13px;min-height:460px!important;padding:12px 8px}
  .landing-build-visual .landing-source-pill{position:relative!important;inset:auto!important;bottom:auto!important;
    left:auto!important;right:auto!important;top:auto!important;transform:none!important;animation:none!important;
    padding:10px 13px;font-size:10px;flex:0 0 auto}
  /* Force the image onto its own centered row without expanding it to viewport width. */
  .landing-build-visual::before{content:"";order:3;flex-basis:100%;height:0}
  .landing-build-visual .landing-source-pill.mine{order:0}
  .landing-build-visual .landing-source-pill.originals{order:1}
  .landing-build-visual .landing-source-pill.community{order:2}
  .landing-build-visual .landing-deck-stack{order:4;flex:0 0 auto;width:min(220px,52vw)!important;
    margin:10px auto 0;grid-column:auto}
  .landing-sticky-copy > .landing-rules-link{width:fit-content;margin-top:17px}
}

/* Owner's exact front/back TGC proof, available only with ?print-preview=1. */
.cmt-rules-reference-proof{max-width:1080px;margin:28px auto 40px;padding:25px;background:#131918;border-radius:18px;border:1px solid #ae8548;color:#efe3c7}
.cmt-rules-reference-proof h3{font-family:Georgia,serif;font-size:clamp(23px,3vw,33px);color:#e6c27b;margin:0 0 12px}
.cmt-rules-reference-proof p{line-height:1.6;color:#d6cdb9;margin:0 0 20px}
.cmt-rules-reference-proof-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px;align-items:start}
.cmt-rules-reference-proof-grid figure{margin:0;text-align:center;min-width:0}
.cmt-rules-reference-proof-grid img{display:block;max-width:100%;width:100%;height:auto;aspect-ratio:825/1125;object-fit:contain}
.cmt-rules-reference-proof-grid figcaption{padding-top:10px;color:#d5bd8b;font-size:13px;font-weight:700}
@media(max-width:680px){.cmt-rules-reference-proof{padding:14px}.cmt-rules-reference-proof-grid{grid-template-columns:1fr}}



/* Guest Item forge — smoky glass, brass edging, and CMT's existing Olde English type. */
.guest-item-demo-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10020;
  overflow-y: auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: max(18px, env(safe-area-inset-top)) 14px max(28px, env(safe-area-inset-bottom));
  background:
    radial-gradient(ellipse at 50% 8%, rgba(75, 55, 99, .18), transparent 65%),
    rgba(3, 6, 10, .71);
  backdrop-filter: blur(9px) saturate(85%);
  -webkit-backdrop-filter: blur(9px) saturate(85%);
}
.guest-item-demo {
  position: relative;
  isolation: isolate;
  width: min(940px, 100%);
  padding: clamp(20px, 3.4vw, 38px);
  overflow: hidden;
  color: #f2e8d5;
  font-family: "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  font-size: 16px;
  line-height: 1.5;
  background:
    radial-gradient(ellipse at 15% 0%, rgba(106, 82, 132, .2), transparent 46%),
    radial-gradient(ellipse at 95% 94%, rgba(37, 78, 94, .19), transparent 57%),
    linear-gradient(155deg, rgba(22, 29, 38, .83), rgba(8, 15, 23, .79) 64%, rgba(16, 17, 27, .86));
  border: 1px solid rgba(200, 164, 104, .65);
  border-radius: 19px;
  box-shadow: 0 26px 85px rgba(0, 0, 0, .72), inset 0 1px 0 rgba(249, 227, 168, .12);
  backdrop-filter: blur(22px) saturate(135%);
  -webkit-backdrop-filter: blur(22px) saturate(135%);
}
.guest-item-demo::before {
  content: "";
  position: absolute;
  inset: 7px;
  z-index: -1;
  pointer-events: none;
  border: 1px solid rgba(223, 190, 133, .19);
  border-radius: 13px;
}
.guest-item-demo-top {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: center;
  min-height: 78px;
}
.guest-item-demo-logo {
  grid-column: 2;
  display: block;
  justify-self: center;
  width: min(340px, 48vw);
  max-height: 104px;
  object-fit: contain;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, .7));
}
.guest-item-demo .guest-item-demo-close {
  grid-column: 3;
  justify-self: end;
  align-self: start;
  padding: 7px 12px;
  min-height: 36px;
  border: 1px solid rgba(197, 164, 114, .5);
  background: rgba(13, 21, 29, .6);
  border-radius: 8px;
  color: #e9d7b4;
  font-family: "Palatino Linotype", Palatino, Georgia, serif;
  font-size: 14px;
}
.guest-item-demo-intro { text-align: center; margin: 7px auto 26px; }
.guest-item-demo-kicker {
  display: block;
  color: #d9b779;
  font-family: "Palatino Linotype", Palatino, Georgia, serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .22em;
}
.guest-item-demo h1 {
  margin: 7px 0 8px;
  color: #f6e4b7;
  font-family: "CMT Olde English", "Palatino Linotype", Georgia, serif;
  font-size: clamp(34px, 5.7vw, 57px);
  font-weight: 700;
  line-height: 1.13;
  text-shadow: 0 3px 13px rgba(0, 0, 0, .65);
}
.guest-item-demo-intro p {
  margin: 0 auto;
  max-width: 600px;
  font-family: "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  font-size: clamp(15px, 1.9vw, 19px);
  color: #dfd3c5;
}
.guest-item-demo-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, .85fr);
  gap: clamp(20px, 4vw, 36px);
  align-items: start;
}
.guest-item-demo-fields { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.guest-item-demo-fields label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: #f3dfb3;
  font-family: "CMT Olde English", "Palatino Linotype", Georgia, serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: .015em;
}
.guest-item-demo-fields input,
.guest-item-demo-fields textarea {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 12px 14px;
  color: #f6edda;
  background: rgba(5, 13, 21, .6);
  border: 1px solid rgba(179, 154, 117, .56);
  border-radius: 9px;
  box-shadow: inset 0 2px 9px rgba(0, 0, 0, .16);
  font-family: "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.45;
}
.guest-item-demo-fields input::placeholder,
.guest-item-demo-fields textarea::placeholder { color: #b7b0a6; opacity: 1; }
.guest-item-demo-fields input:focus-visible,
.guest-item-demo-fields textarea:focus-visible,
.guest-item-demo-fields button:focus-visible,
.guest-item-demo-fields details:focus-visible {
  outline: 2px solid #eac685;
  outline-offset: 2px;
}
.guest-item-demo-fields details { padding: 0 1px; }
.guest-item-demo-fields details summary {
  color: #eddbb9;
  cursor: pointer;
  font-family: "CMT Olde English", "Palatino Linotype", Georgia, serif;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.3;
}
.guest-item-demo-fields details textarea { margin-top: 10px; }
.guest-item-demo-fields button {
  min-height: 46px;
  font-family: "CMT Olde English", "Palatino Linotype", Georgia, serif;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: .01em;
  line-height: 1.3;
}
.guest-item-demo-fields button.primary {
  background: linear-gradient(180deg, #d5ad6a, #8f663a);
  border: 1px solid #ebcc8d;
  color: #18120f;
  box-shadow: 0 2px 0 rgba(255, 235, 187, .1) inset, 0 5px 14px rgba(0, 0, 0, .25);
}
.guest-item-demo-fields button.primary:disabled { opacity: .48; cursor: not-allowed; }
.guest-item-demo-fields button.secondary {
  border: 1px solid rgba(188, 162, 122, .5);
  background: rgba(15, 27, 36, .55);
  color: #f0dbb5;
}
.guest-item-demo-fields button:not(:disabled):hover { filter: brightness(1.12); }
.guest-item-demo-generate { width: 100%; }
.guest-item-demo-remaining {
  margin: 0;
  color: #eacb8e;
  font-family: "Palatino Linotype", Palatino, Georgia, serif;
  font-size: 16px;
  font-weight: 700;
}
.guest-item-demo-notice,
.guest-item-demo-error {
  padding: 10px 12px;
  border-radius: 8px;
  font-family: "Palatino Linotype", Palatino, Georgia, serif;
}
.guest-item-demo-notice { border: 1px solid rgba(201, 169, 112, .6); background: rgba(58, 46, 39, .37); }
.guest-item-demo-error { border: 1px solid #d78578; background: rgba(68, 25, 29, .35); color: #ffe5df; }
.guest-item-demo-fields small { color: #cbbeb0; font-size: 14px; line-height: 1.45; }
.guest-item-demo-preview {
  width: min(360px, 100%);
  min-width: 0;
  justify-self: center;
  padding: clamp(10px, 1.9vw, 17px);
  background: radial-gradient(ellipse at 50% 25%, rgba(126, 91, 70, .15), rgba(8, 15, 23, .34) 76%);
  border: 1px solid rgba(205, 170, 113, .3);
  border-radius: 15px;
  box-shadow: inset 0 1px 18px rgba(0, 0, 0, .2);
}
.guest-item-demo-preview .card-preview { max-width: 100%; }
.guest-item-demo-placeholder {
  aspect-ratio: 5 / 7;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  overflow-wrap: anywhere;
  text-align: center;
  color: #d8c7ab;
  background: radial-gradient(ellipse at center, rgba(93, 68, 96, .16), rgba(5, 12, 20, .14));
  border: 1px dashed rgba(214, 175, 111, .48);
  border-radius: 9px;
}
.guest-item-demo-placeholder strong {
  font-family: "CMT Olde English", "Palatino Linotype", Georgia, serif;
  font-size: clamp(24px, 3.3vw, 34px);
  font-weight: 700;
}
.guest-item-demo-placeholder span {
  font-family: "Palatino Linotype", Palatino, Georgia, serif;
  font-size: 16px;
}
@media (max-width: 700px) {
  .guest-item-demo-layout { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .guest-item-demo-preview { width: min(320px, 90%); grid-row: 2; }
  .guest-item-demo-top { grid-template-columns: minmax(0, 1fr) auto; min-height: 62px; }
  .guest-item-demo-logo { grid-column: 1; justify-self: start; width: min(270px, 57vw); max-height: 85px; }
  .guest-item-demo .guest-item-demo-close { grid-column: 2; }
  .guest-item-demo { padding: 19px; }
  .guest-item-demo-intro { margin: 8px 0 22px; }
  .guest-item-demo-fields label { font-size: 21px; }
}
@media (prefers-reduced-transparency: reduce) {
  .guest-item-demo { background: #151d25; }
  .guest-item-demo-backdrop { background: #05080c; }
}


/* Static double-curved title lettering, inspired by CMT's Rainbow card text.
   The glyphs themselves follow an S-shaped baseline; no flag graphic or animation. */
.guest-item-demo h1.guest-item-demo-wave-heading {
  position: relative;
  display: block;
  width: min(735px, 100%);
  height: auto;
  margin: 0 auto 0;
  padding: 0;
  line-height: 1;
}
.guest-item-demo-wave-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  filter: drop-shadow(0 4px 5px rgba(0, 0, 0, .67));
}
.guest-item-demo-wave-letters {
  font-family: "CMT Olde English", "Palatino Linotype", Georgia, serif;
  font-size: 62px;
  font-weight: 700;
  letter-spacing: -.012em;
  fill: #f9e7bb;
  stroke: rgba(39, 23, 18, .48);
  stroke-width: .65px;
  paint-order: stroke fill;
}
@media (max-width: 520px) {
  .guest-item-demo h1.guest-item-demo-wave-heading { width: 100%; margin: 1px auto 0; }
  .guest-item-demo-wave-letters { font-size: 68px; letter-spacing: -.03em; }
}


/* Small, unlabeled wave amplitude control. Keep the touch target usable. */
.guest-item-demo-wave-controls {
  width: min(130px, 65%);
  margin: -8px auto 15px;
}
.guest-item-demo-wave-controls input[type="range"] {
  display: block;
  width: 100%;
  height: 32px;
  margin: 0;
  accent-color: #d9b477;
  cursor: pointer;
  touch-action: pan-y;
}
.guest-item-demo-wave-controls input[type="range"]:focus-visible {
  outline: 2px solid #eac685;
  outline-offset: 2px;
  border-radius: 5px;
}
@media (max-width: 520px) {
  .guest-item-demo-wave-controls {
    width: min(130px, 65%);
    margin-bottom: 15px;
  }
}

/* Tiny pillow runner stays inside the editor artwork aperture. */
.artwork-pillow-loading {
  position:absolute;
  z-index:5;
  width:clamp(38px,14%,58px);
  aspect-ratio:1;
  display:grid;
  place-items:center;
  transform:translate(-50%,-50%);
  border-radius:50%;
  background:radial-gradient(circle,rgba(15,16,19,.38) 0%,rgba(15,16,19,.17) 58%,transparent 75%);
  pointer-events:none;
  user-select:none;
}
.artwork-pillow-runner {
  width:100%;
  height:100%;
  object-fit:contain;
  display:block;
  animation:artwork-pillow-drift 2.72s ease-in-out infinite alternate;
}
@keyframes artwork-pillow-drift {
  from { transform:translate(-6px,1px) rotate(-3deg); }
  50% { transform:translate(0,-3px) rotate(2deg); }
  to { transform:translate(8px,1px) rotate(-1deg); }
}
@media (prefers-reduced-motion:reduce) {
  .artwork-pillow-runner { animation:none; }
}

/* Save click: a soft smoke puff, drifting up and dissipating. */
.cmt-save-puff {
  position: fixed;
  width: 0;
  height: 0;
  z-index: 2147483646;
  pointer-events: none;
  user-select: none;
}
.cmt-save-puff i {
  position: absolute;
  display: block;
  left: -13px;
  top: -13px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(246,239,220,.7) 0%, rgba(211,216,216,.42) 40%, rgba(199,211,215,0) 73%);
  filter: blur(2px);
  opacity: 0;
  animation: cmt-save-smoke 1450ms ease-out var(--puff-delay) forwards;
}
.cmt-save-puff b {
  position: absolute;
  left: -8px;
  top: -17px;
  color: rgba(255,242,208,.85);
  font: 300 28px/1 Georgia, serif;
  text-shadow: 0 0 6px rgba(255,243,214,.5);
  animation: cmt-save-wisp 1550ms ease-out forwards;
}
@keyframes cmt-save-smoke {
  0% { opacity: 0; transform: translate(0, 0) scale(.3); }
  12% { opacity: .85; }
  55% { opacity: .4; }
  100% { opacity: 0; transform: translate(var(--puff-x), var(--puff-rise)) scale(2.3); filter: blur(6px); }
}
@keyframes cmt-save-wisp {
  0% { opacity: 0; transform: translate(0, 0) scale(.65); }
  12% { opacity: .85; }
  45% { opacity: .5; }
  100% { opacity: 0; transform: translate(9px, -78px) scale(1.15); filter: blur(3px); }
}
@media (prefers-reduced-motion: reduce) {
  .cmt-save-puff { display: none; }
}

/* Contact uses the same private feedback inbox and stays in the page flow. */
.cmt-contact { box-sizing:border-box; width:calc(100% - 36px); max-width:760px; margin:32px auto; padding:24px; border:1px solid #5c4524; border-radius:14px; color:#e9e2d1; background:#11171b; }
.cmt-contact h2 { margin:0 0 10px; }
.cmt-contact p { line-height:1.6; }
.cmt-contact a { color:#f0d19a; overflow-wrap:anywhere; }
.cmt-contact summary { cursor:pointer; color:#f0d19a; padding:12px 0; }
.cmt-contact fieldset { border:0; padding:12px 0 0; margin:0; min-width:0; display:grid; gap:16px; }
.cmt-contact label { display:grid; gap:6px; }
.cmt-contact input, .cmt-contact textarea { box-sizing:border-box; width:100%; }
.cmt-contact textarea { resize:vertical; }
.cmt-contact .cmt-contact-honeypot { position:absolute; left:-99999px; opacity:0; width:1px; }
.cmt-contact button { justify-self:start; }
@media (max-width:600px) { .cmt-contact { padding:18px; } }

/* Public informational pages use the same unobtrusive footer link treatment as legal actions. */
.app-legal-links a,.landing-legal-links a{color:inherit;text-decoration:underline;text-underline-offset:2px}
.app-legal-links a:focus-visible,.landing-legal-links a:focus-visible{outline:2px solid #d9b45e;outline-offset:4px}


/* Deck Projects: alternate Flip Grid view. Ordinary picker and homepage
   floating-card geometry remain untouched. */
.project-fill-launch-buttons { display:flex; gap:8px; flex-wrap:wrap; }
/* Descriptive view-switch labels on desktop; keep the same control compact on phones. */
.deck-view-label-short { display:none; }
@media (max-width:760px) {
  .deck-view-label-long { display:none; }
  .deck-view-label-short { display:inline; }
}
.project-fill-launch-buttons button { min-width:130px; }
.project-fill-screen.is-flip-mode .project-fill-screen-head { padding-block:8px; gap:10px; }
.project-fill-screen.is-flip-mode .project-fill-screen-head h2 { font-size:20px; }
.project-fill-screen.is-flip-mode .project-fill-screen-kicker { display:none; }
.project-fill-screen.is-flip-mode .project-fill-screen-body { padding:7px clamp(7px,1vw,18px) 20px; max-width:1800px; }
.project-fill-screen.is-flip-mode .project-browser-controls { margin-bottom:7px; }
.deck-flip-zoom { display:flex; align-items:center; border:1px solid #3c474d; border-radius:7px; overflow:hidden; flex:0 0 auto; }
.deck-flip-zoom button { padding:7px 9px; min-width:30px; border:0; border-right:1px solid #303b42; background:#141b20; color:#a9b4b8; font-size:11px; cursor:pointer; }
.deck-flip-zoom button:last-child { border-right:0; }
.deck-flip-zoom button.active { background:#715526; color:#fff0c8; font-weight:800; }
.deck-flip-loading { display:block; padding:6px 0; text-align:center; color:#bba775; font-size:11px; }
.deck-flip-context-menu {
  position:fixed;
  z-index:260;
  width:min(214px,calc(100vw - 16px));
  display:flex;
  flex-direction:column;
  gap:2px;
  padding:7px;
  border:1px solid #8d744a;
  border-radius:9px;
  background:#151a1f;
  box-shadow:0 14px 42px rgba(0,0,0,.85);
  color:#efdfbd;
}
.deck-flip-context-title {
  display:block;
  font-size:11px;
  font-weight:700;
  padding:5px 7px 8px;
  border-bottom:1px solid #39414a;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.deck-flip-context-menu button {
  display:block;
  width:100%;
  padding:10px 8px;
  border:0;
  border-radius:5px;
  background:transparent;
  color:#f2e5cb;
  font-size:12px;
  text-align:left;
  cursor:pointer;
}
.deck-flip-context-menu button:hover,
.deck-flip-context-menu button:focus-visible {
  background:#453723;
  outline:none;
}
.deck-flip-grid { --deck-flip-cols:8; display:grid; grid-template-columns:repeat(var(--deck-flip-cols),minmax(0,1fr)); gap:clamp(4px,.7vw,12px); align-items:start; padding:2px 0 16px; }
.deck-flip-grid.zoom-9 { --deck-flip-cols:6; }
.deck-flip-grid.zoom-4 { --deck-flip-cols:4; }
.deck-flip-grid.zoom-1 { --deck-flip-cols:2; }
.deck-flip-cell { position:relative; display:block; min-width:0; width:100%; aspect-ratio:5/7; padding:0; border:0; border-radius:6px; background:#090d11; color:inherit; cursor:pointer; box-shadow:0 3px 12px #0007; overflow:visible; text-align:left; touch-action:pan-y; }
.deck-flip-cell:disabled { cursor:default; opacity:.78; }
.deck-flip-cell:focus-visible { outline:2px solid #e4bd6b; outline-offset:3px; }
.deck-flip-cell .landing-flip-shell,
.deck-flip-cell .landing-flip-inner,
.deck-flip-cell .landing-flip-front,
.deck-flip-cell .landing-flip-reverse { width:100%; height:100%; }
.deck-flip-cell .landing-flip-front { overflow:hidden; border-radius:6px; }
.deck-flip-cell .landing-flip-reverse { border-radius:6px; }
.deck-flip-cell .landing-flip-reverse img,
.deck-flip-cell .deck-flip-placeholder,
.deck-flip-cell .deck-flip-front-content > img { display:block; width:100%; height:100%; object-fit:fill; border-radius:6px; }
.deck-flip-front-content { width:100%; height:100%; overflow:hidden; border-radius:6px; }
.deck-flip-cell .deck-flip-front-content .card-preview,
.deck-flip-cell .deck-flip-front-content .flattened-card-front { display:block; width:100% !important; max-width:100% !important; min-width:0 !important; height:100% !important; margin:0 !important; border-radius:6px !important; box-shadow:none !important; object-fit:fill; }
@media (max-width:760px) {
  .project-fill-launch-buttons { width:100%; }
  .project-fill-launch-buttons button { flex:1 1 46%; }
  .project-fill-screen.is-flip-mode .project-fill-screen-head { flex-direction:row; align-items:center; flex-wrap:wrap; padding:6px 9px; gap:5px; }
  .project-fill-screen.is-flip-mode .project-fill-screen-head h2 { font-size:16px; margin:0; }
  .project-fill-screen.is-flip-mode .project-fill-screen-head .muted { font-size:10px; }
  .project-fill-screen.is-flip-mode .project-fill-screen-actions { width:auto; flex:1 1 auto; justify-content:flex-end; flex-wrap:wrap; gap:5px; }
  .project-fill-screen.is-flip-mode .project-fill-screen-actions .secondary { flex:0 0 auto; font-size:10px; padding:6px; }
  .project-fill-screen.is-flip-mode .project-fill-screen-body { padding:5px 6px 18px; }
  .project-fill-screen.is-flip-mode .project-browser-controls { display:flex; flex-wrap:wrap; gap:5px; }
  .project-fill-screen.is-flip-mode .project-browser-controls .project-source-search { flex:1 1 100%; min-height:30px; }
  .project-fill-screen.is-flip-mode .project-browser-controls select { flex:1 1 0; min-width:0; font-size:11px; }
  .deck-flip-grid { gap:4px; }
  .deck-flip-grid.zoom-12 { --deck-flip-cols:4; }
  .deck-flip-grid.zoom-9 { --deck-flip-cols:3; }
  .deck-flip-grid.zoom-4 { --deck-flip-cols:2; }
  .deck-flip-grid.zoom-1 { --deck-flip-cols:1; }
}
@media (prefers-reduced-motion:reduce) {
  .deck-flip-cell .landing-flip-inner { transition:none; }
}


/* Compact Community discovery: single desktop filter row and a tidy mobile grid.
   Keep creator actions, sync feedback, age gate and explicit inclusion toggles. */
.community-modal { padding:12px clamp(10px,1.5vw,16px); }
.community-modal .community-compact-head {
  align-items:center;
  margin-bottom:8px;
  gap:8px;
}
.community-compact-head .modal-title { margin:0; font-size:21px; line-height:1.2; }
.community-modal .community-privacy-bar.community-creator-status-bar {
  display:flex;
  align-items:center;
  flex-direction:row;
  flex-wrap:wrap;
  gap:5px 9px;
  margin:0 0 6px;
  padding:6px 8px;
  min-height:34px;
  border-radius:8px;
}
.community-creator-summary { min-width:0; flex:1 1 210px; }
.community-creator-summary > summary {
  display:flex;
  align-items:center;
  gap:6px;
  list-style:none;
  cursor:pointer;
  color:#e8ddc6;
  font-size:12px;
}
.community-creator-summary > summary::-webkit-details-marker { display:none; }
.community-creator-summary > summary::after {
  content:'▾';
  color:#af9b71;
  font-size:12px;
  font-weight:500;
}
.community-creator-summary[open] > summary::after { content:'▴'; }
.community-creator-summary > summary strong { font-weight:700; }
.community-creator-summary .microcopy {
  max-width:750px;
  padding:5px 0 2px;
  color:#aeb7bc;
  font-size:10px;
  line-height:1.4;
}
.community-modal .community-creator-links {
  display:flex;
  align-items:center;
  flex:0 0 auto;
  flex-wrap:wrap;
  gap:5px;
  width:auto;
}
.community-modal .community-creator-links button {
  min-height:29px;
  padding:4px 8px;
  font-size:11px;
}
.community-modal .community-cloud-status {
  display:flex;
  flex-direction:row;
  align-items:center;
  gap:8px;
  margin:0 0 6px;
  padding:2px 1px;
  min-height:29px;
  border:0;
  border-radius:0;
  background:transparent;
  font-size:11px;
}
.community-cloud-status .community-cloud-status-text {
  flex:1 1 auto;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.community-modal .community-cloud-status button {
  flex-shrink:0;
  min-height:28px;
  padding:4px 8px;
  font-size:10px;
}
.community-modal .community-controls {
  display:grid;
  grid-template-columns:minmax(220px,1fr) minmax(115px,140px) minmax(100px,125px) minmax(140px,165px) minmax(135px,157px) minmax(155px,177px);
  align-items:stretch;
  gap:6px;
  margin:4px 0 6px;
}
.community-modal .community-controls > input[type="search"],
.community-modal .community-controls > select {
  box-sizing:border-box;
  width:100%;
  min-width:0;
  min-height:35px;
  margin:0;
  padding:6px 9px;
  font-size:12px;
}
.community-modal .community-controls .community-classics-toggle {
  box-sizing:border-box;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  width:auto;
  min-width:0;
  min-height:35px;
  margin:0;
  padding:4px 6px;
  border-radius:7px;
  font-size:11px;
  font-weight:500;
  white-space:nowrap;
}
.community-controls .community-classics-toggle input[type="checkbox"] {
  flex:0 0 auto;
  width:15px;
  height:15px;
  margin:0;
}
.community-modal .community-result-count { margin:0 0 6px; font-size:10px; }
@media (min-width:761px) and (max-width:1100px) {
  .community-modal .community-controls {
    grid-template-columns:minmax(190px,1fr) minmax(105px,138px) minmax(100px,125px) minmax(135px,160px);
  }
  .community-modal .community-controls .community-classics-toggle { grid-column:span 2; }
}
@media (max-width:760px) {
  .community-modal {
    width:calc(100vw - 12px);
    max-height:calc(100dvh - 12px);
    padding:9px 9px 12px;
  }
  .community-compact-head .modal-title { font-size:18px; }
  .community-modal .community-privacy-bar.community-creator-status-bar {
    align-items:center;
    flex-direction:row;
    flex-wrap:wrap;
    padding:5px 7px;
    gap:5px;
    margin-bottom:4px;
  }
  .community-creator-summary { flex:1 1 175px; }
  .community-creator-summary > summary { font-size:11px; }
  .community-modal .community-creator-links {
    flex:0 1 auto;
    width:auto;
    gap:4px;
  }
  .community-modal .community-creator-links .secondary {
    flex:0 1 auto;
    min-height:28px;
    padding:4px 6px;
    font-size:10px;
  }
  .community-modal .community-cloud-status {
    flex-direction:row;
    align-items:center;
    gap:5px;
    margin-bottom:5px;
    font-size:10px;
  }
  .community-modal .community-cloud-status button { padding:5px 7px; }
  .community-modal .community-controls {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:5px;
    margin:3px 0 6px;
  }
  .community-modal .community-controls .community-search-input,
  .community-modal .community-controls > select:nth-of-type(3) {
    grid-column:1 / -1;
  }
  .community-modal .community-controls > input[type="search"],
  .community-modal .community-controls > select { min-height:35px; padding:6px 7px; font-size:16px; }
  .community-modal .community-controls > select { font-size:13px; }
  .community-modal .community-controls .community-classics-toggle {
    min-height:34px;
    padding:4px 3px;
    font-size:10px;
    gap:5px;
  }
  .community-modal .community-results-scroll { max-height:calc(100dvh - 250px); min-height:180px; }
}
@media (max-width:350px) {
  .community-modal .community-controls .community-classics-toggle {
    font-size:9px;
    gap:3px;
  }
  .community-modal .community-controls .community-classics-toggle input[type="checkbox"] {
    width:13px;
    height:13px;
  }
}

/* Reverse the loaded browser order instantly, without reloading thumbnails. */
.project-browser-controls .project-sort-group {
  display:flex;
  align-items:stretch;
  gap:5px;
  min-width:0;
}
.project-browser-controls .project-sort-group select {
  flex:1 1 auto;
  min-width:0;
  width:100%;
}
.project-sort-reverse {
  flex:0 0 33px;
  min-width:33px;
  padding:5px;
  border:1px solid #485660;
  border-radius:7px;
  background:#141c21;
  color:#e6d6b8;
  font-size:17px;
  cursor:pointer;
}
.project-sort-reverse.active {
  border-color:#c69b45;
  background:#624c28;
  color:#ffebbd;
}
.project-sort-reverse:focus-visible {
  outline:2px solid #efcb79;
  outline-offset:2px;
}
@media (max-width:760px) {
  .project-browser-controls .project-sort-group { grid-column:1 / -1; }
  .project-fill-screen.is-flip-mode .project-browser-controls .project-sort-group { flex:1 1 100%; }
  .project-browser-controls .project-sort-group select { min-height:34px; }
}


/* Deck picker: put card discovery ahead of rarely used controls.
   Secondary actions sit in a compact menu instead of a multi-row button wall. */
/* Contain layered card artwork beneath the header and its dropdown.
   The card preview's internal z-indices must never compete with the menu. */
.project-fill-screen-head { position:relative; z-index:3; }
.project-fill-screen-body { position:relative; z-index:0; isolation:isolate; }
.project-fill-screen .project-selected-cards-filter {
  grid-column:1/-1;
  display:flex;
  align-items:center;
  gap:7px;
  justify-self:start;
  margin:0;
  font-size:12px;
  cursor:pointer;
}
.project-fill-screen-actions { gap:7px; flex-wrap:wrap; }
.project-fill-screen-actions > button {
  min-height:36px;
  padding:7px 12px;
  font-size:13px;
  white-space:nowrap;
}
.project-fill-more { position:relative; flex:0 0 auto; min-width:0; }
.project-fill-more > summary {
  box-sizing:border-box;
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:36px;
  padding:7px 12px;
  border:1px solid #485660;
  border-radius:7px;
  background:#141c21;
  color:#e6d6b8;
  font-size:13px;
  cursor:pointer;
  list-style:none;
  user-select:none;
}
.project-fill-more > summary::-webkit-details-marker { display:none; }
.project-fill-more > summary::after { content:'⌄'; margin-left:5px; color:#bba775; }
.project-fill-more[open] > summary,
.project-fill-more > summary:focus-visible { border-color:#c69b45; outline-offset:2px; }
.project-fill-more-menu {
  position:absolute;
  z-index:5;
  right:0;
  top:calc(100% + 6px);
  display:flex;
  flex-direction:column;
  gap:6px;
  box-sizing:border-box;
  width:min(300px,calc(100vw - 20px));
  max-height:min(65dvh,540px);
  overflow-y:auto;
  padding:10px;
  border:1px solid #67583a;
  border-radius:10px;
  background:#121a20;
  box-shadow:0 16px 35px rgba(0,0,0,.65);
}
.project-fill-screen-actions .project-fill-more-menu > button {
  width:100%;
  flex:0 0 auto;
  min-height:34px;
  padding:7px 9px;
  text-align:left;
  font-size:12px;
}
.project-fill-screen-actions .project-fill-more-menu > .project-clear-selection {
  flex:0 0 auto;
  order:initial;
  text-align:left;
  opacity:1;
}
.project-fill-more-menu .project-bulk-disclosure { margin:0; border-top:1px solid #354149; padding-top:5px; }
.project-fill-more-menu .project-bulk-disclosure > summary { padding:7px 4px; }
.project-fill-more-menu .project-bulk-actions { flex-direction:column; align-items:stretch; gap:5px; margin:5px 0 0; }
.project-fill-more-menu .project-bulk-actions > button { width:100%; text-align:left; }
.project-fill-mix-disclosure { margin:0 0 8px; color:#aab5ba; font-size:11px; }
.project-fill-mix-disclosure > summary { display:inline-block; padding:4px 1px; cursor:pointer; }
.project-fill-mix-disclosure > span { display:block; padding:3px 0 5px; color:#d3bd88; }
.project-fill-locked-note { margin:0 0 8px; color:#e1b373; font-size:11px; }
.project-fill-flow-hint { margin:1px 0 7px; color:#9eaeb4; font-size:11px; }
.project-fill-screen .project-result-count { margin-bottom:7px; }

@media (max-width:760px) {
  .project-fill-screen-head,
  .project-fill-screen.is-flip-mode .project-fill-screen-head {
    flex-direction:column;
    align-items:stretch;
    gap:6px;
    padding:8px 10px;
  }
  .project-fill-screen-head .project-fill-screen-kicker { display:none; }
  .project-fill-screen-head h2 { font-size:20px; margin:0 0 2px; }
  .project-fill-screen.is-flip-mode .project-fill-screen-head h2 { font-size:18px; }
  .project-fill-screen-head .muted { font-size:11px; }
  .project-fill-screen-actions,
  .project-fill-screen.is-flip-mode .project-fill-screen-actions {
    display:grid;
    grid-template-columns:minmax(0,1.35fr) minmax(0,1fr) minmax(0,.7fr) minmax(0,.75fr);
    align-items:stretch;
    justify-content:stretch;
    width:100%;
    gap:5px;
  }
  .project-fill-screen-actions > .primary,
  .project-fill-screen-actions > .secondary,
  .project-fill-screen.is-flip-mode .project-fill-screen-actions > .secondary {
    box-sizing:border-box;
    flex:none;
    min-width:0;
    width:100%;
    min-height:38px;
    padding:7px 3px;
    font-size:12px;
    white-space:nowrap;
    text-align:center;
  }
  .project-fill-screen-actions > .project-fill-more { grid-column:4; }
  .project-fill-more > summary { padding:7px 3px; min-height:38px; font-size:12px; }
  .project-fill-more > summary::after { margin-left:3px; }
  .project-fill-screen-actions > .deck-flip-zoom { grid-column:1/-1; justify-self:start; order:1; }
  .project-fill-more-menu > button,
  .project-fill-more-menu > .project-clear-selection { padding:9px 8px; font-size:12px; }
  .project-fill-screen-body { padding:7px 10px 24px; }
  .project-fill-mix-disclosure { margin-bottom:4px; }
  .project-browser-controls { gap:5px; margin-bottom:5px; }
  .project-browser-controls .project-source-search { min-height:36px; }
  .project-browser-controls select { min-height:36px; font-size:12px; }
  .project-fill-flow-hint { line-height:1.3; }
}


/* Optional premade pools stay a small, consistent checkbox row in Community
   and the deck picker; own personally created Characters remain easy to find. */
.project-browser-controls .project-discovery-optins {
  grid-column:1/-1;
  display:flex;
  flex-wrap:wrap;
  gap:5px 15px;
  align-items:center;
  min-width:0;
  color:#abb9bd;
  font-size:11px;
}
.project-discovery-optins label {
  display:inline-flex;
  align-items:center;
  gap:5px;
  white-space:nowrap;
  cursor:pointer;
}
.project-discovery-optins input { accent-color:#d8ad4b; width:auto; margin:0; }
.project-character-reminder {
  margin:3px 0 9px;
  color:#d9bd81;
  font-size:11px;
  line-height:1.4;
}
@media (max-width:760px) {
  .project-browser-controls .project-discovery-optins {
    grid-column:1/-1;
    gap:5px 10px;
    font-size:10px;
  }
  .project-fill-screen.is-flip-mode .project-browser-controls .project-discovery-optins {
    flex:1 1 100%;
  }
}


/* Deck browser: four clear type sections. Hide advanced catalog filters in
   the existing More menu so search, sort, and the cards have priority. */
.project-card-type-tabs {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:5px;
  margin:0 0 9px;
}
.project-type-tab {
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:3px;
  box-sizing:border-box;
  min-width:0;
  min-height:52px;
  padding:8px 4px;
  border:1px solid #44525b;
  border-radius:8px;
  background:#151e24;
  color:#d2d8da;
  font-size:13px;
  font-weight:650;
  cursor:pointer;
}
.project-type-tab small {
  color:#9ba8ad;
  font-size:10px;
  font-weight:500;
}
.project-type-tab.active {
  border-color:#d3ad5e;
  background:#24251f;
  color:#f7e4b8;
  box-shadow:inset 0 -2px 0 #c49c52;
}
.project-type-tab.active small { color:#e8d1a0; }
.project-type-tab:focus-visible { outline:2px solid #e2bb71; outline-offset:2px; }
.project-fill-screen:not(.is-flip-mode) .project-browser-controls {
  grid-template-columns:minmax(0,1fr) minmax(160px,245px);
}
.project-fill-screen .project-browser-controls .project-source-search { grid-column:auto; }
.project-fill-screen:not(.is-flip-mode) .project-browser-controls .project-sort-group {
  grid-column:auto;
}
.project-advanced-browse-filters {
  display:flex;
  flex-direction:column;
  gap:7px;
  padding-bottom:8px;
  border-bottom:1px solid #344049;
}
.project-advanced-browse-filters > label { font-size:11px; color:#aebcc0; }
.project-advanced-browse-filters > select {
  box-sizing:border-box;
  width:100%;
  min-height:35px;
  font-size:12px;
}
.project-advanced-browse-filters .project-discovery-optins {
  display:flex;
  flex-wrap:wrap;
  gap:7px 11px;
  align-items:center;
  font-size:11px;
  color:#abb9bd;
}
@media (max-width:760px) {
  .project-card-type-tabs { gap:4px; margin-bottom:7px; }
  .project-type-tab { min-height:47px; padding:7px 2px; font-size:11px; }
  .project-type-tab small { font-size:10px; }
  .project-fill-screen:not(.is-flip-mode) .project-browser-controls {
    grid-template-columns:minmax(0,1fr) minmax(0,1fr);
    gap:5px;
  }
  .project-fill-screen:not(.is-flip-mode) .project-browser-controls .project-source-search {
    grid-column:1;
    min-height:36px;
  }
  .project-fill-screen:not(.is-flip-mode) .project-browser-controls .project-sort-group {
    grid-column:2;
  }
  .project-fill-screen .project-browser-controls .project-sort-group select { min-height:36px; }
}

/* Text fill uses the same card eyedropper as the outline picker. */
.text-color-control {
  display:flex;
  align-items:center;
  gap:8px;
  margin:5px 0;
  font-size:12px;
}
.contextual-typography-grid .contextual-color-control {
  display:grid;
  align-content:end;
  justify-items:start;
  gap:3px;
  min-width:0;
  font-size:10px;
  font-weight:650;
}
.contextual-typography-grid .contextual-color-control .outline-eyedropper-trigger {
  height:30px;
}


/* Owner-only Radio display-title editor (never changes MP3s or playback). */
.radio-rename-overlay {
  position:fixed;
  inset:0;
  z-index:21000;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:16px;
  box-sizing:border-box;
  background:rgba(4,7,10,.77);
  backdrop-filter:blur(3px);
}
.radio-rename-dialog {
  display:flex;
  flex-direction:column;
  gap:9px;
  box-sizing:border-box;
  width:min(430px,100%);
  max-height:calc(100dvh - 30px);
  overflow:auto;
  padding:20px;
  border:1px solid #a07b40;
  border-radius:13px;
  color:#eee3cb;
  background:#121920;
  box-shadow:0 20px 75px rgba(0,0,0,.8);
  text-align:left;
  font-family:inherit;
}
.radio-rename-kicker { color:#d9b86d; font-size:10px; font-weight:750; letter-spacing:.12em; }
.radio-rename-dialog h2 { margin:0 0 5px; font-size:21px; line-height:1.25; }
.radio-rename-dialog label { color:#ded7c8; font-size:12px; font-weight:650; }
.radio-rename-dialog input[type="text"] {
  box-sizing:border-box;
  width:100%;
  min-height:42px;
  margin:0;
  padding:9px 10px;
  border:1px solid #6e6453;
  border-radius:7px;
  outline-offset:3px;
  background:#0b1116;
  color:#fff2db;
  font:inherit;
  font-size:15px;
}
.radio-rename-dialog input[type="text"]:focus-visible { outline:2px solid #d4ab58; }
.radio-rename-source {
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:#9ca8af;
  font-size:10px;
}
.radio-rename-error { color:#ffc5bc; font-size:12px; line-height:1.4; }
.radio-rename-actions { display:flex; align-items:center; justify-content:flex-end; gap:8px; margin-top:7px; }
.radio-rename-actions button { min-height:36px; padding:8px 13px; }
@media (max-width:760px) {
  .radio-rename-dialog { padding:16px; }
  .radio-rename-dialog h2 { font-size:18px; }
}

/* Super Simple Start uses the Deck Builder and production proof card chrome. */
.simple-start-backdrop, .simple-start-proof-backdrop {
  z-index: 220;
}
.simple-start-modal {
  display: flex;
  flex-direction: column;
  width: min(100%, 760px);
  max-height: min(90dvh, 920px);
  min-height: min(350px, 85dvh);
  color: var(--text, #f7f0e5);
  background: var(--panel, #241e32);
  border: 1px solid var(--border, #695661);
  border-radius: 18px;
  box-shadow: 0 22px 70px #000a;
  overflow: hidden;
}
.simple-start-modal > .modal-head,
.simple-start-body,
.simple-start-footer {
  padding: 16px 22px;
}
.simple-start-body {
  flex: 1;
  overflow: auto;
  overscroll-behavior: contain;
}
.simple-start-body p:first-child { margin-top: 0; }
.simple-start-body label:not(.simple-start-check) {
  display: grid;
  gap: 5px;
  margin-bottom: 12px;
  max-width: 100%;
}
.simple-start-body textarea,
.simple-start-body input:not([type="checkbox"]),
.simple-start-body select {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.simple-start-body fieldset {
  border: 1px solid var(--border, #695661);
  border-radius: 10px;
  padding: 12px;
  margin: 0;
  min-width: 0;
}
.simple-start-players {
  display: grid;
  gap: 10px;
  margin-block: 10px 14px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 175px), 1fr));
}
.simple-start-body details {
  border-top: 1px solid var(--border, #695661);
  padding: 10px 0;
}
.simple-start-body summary { cursor: pointer; }
.simple-start-concept {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr) auto;
  gap: 10px;
  align-items: start;
  margin-top: 10px;
}
.simple-start-concept textarea { resize: vertical; }
.simple-start-task-default { opacity: .68; }
.simple-start-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.simple-start-footer {
  flex: 0 0 auto;
  border-top: 1px solid var(--border, #695661);
  justify-content: space-between;
}
.simple-start-footer:empty { display: none; }
.simple-start-check {
  display: flex;
  gap: 6px;
  align-items: center;
  text-align: left;
}
.simple-start-check input {
  width: 1rem;
  height: 1rem;
  flex: 0 0 1rem;
  margin: 0;
  accent-color: #e3b94f;
}
.simple-start-style-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: .875rem;
}
.simple-start-style-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px 8px;
  margin: 8px 0 12px;
}
.simple-start-style-options label {
  min-width: 0;
  min-height: 34px;
  padding: 5px 7px;
  border-radius: 6px;
  background: #ffffff0a;
  cursor: pointer;
  font-size: .875rem;
}
.simple-start-style-options span { overflow-wrap: anywhere; }
.simple-start-style-settings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.simple-start-item-match {
  grid-column: 1 / -1;
  font-size: .875rem;
}
.simple-start-item-match > button { margin-left: 8px; }
.simple-start-match-card {
  width: min(185px, 100%);
  margin: 8px 0;
}
.simple-start-notice { color: var(--yellow, #ffe285); }
.simple-start-body progress { width: 100%; }
.simple-start-print-error {
  position: fixed;
  z-index: 221;
  bottom: 1rem;
  left: 50%;
  translate: -50%;
  padding: 10px 16px;
  background: var(--panel, #241e32);
  border: 1px solid var(--border, #695661);
}
@media (max-width: 600px) {
  .simple-start-modal {
    max-height: 94dvh;
  }
  .simple-start-modal > .modal-head,
  .simple-start-body,
  .simple-start-footer { padding: 12px; }
  .simple-start-style-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .simple-start-concept {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border, #695661);
  }
}


/* Beta setup: keep the heading outside the scrolling form and distinguish the
   prefilled guidance from organizer-written instructions. Scoped to this modal. */
.account-modal.beta-welcome-modal {
  display: flex;
  flex-direction: column;
  overflow: hidden !important;
}
.beta-welcome-modal > .modal-head {
  position: static;
  flex: 0 0 auto;
  margin-bottom: 8px;
}
.beta-welcome-modal > .modal-head .muted { margin: 4px 0 0; }
.beta-welcome-body {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  overflow-wrap: anywhere;
  padding: 2px 0 8px;
}
.beta-welcome-body .account-field { margin-bottom: 12px; }
.beta-welcome-body .account-field > input,
.beta-welcome-body .account-field > textarea {
  min-width: 0;
  width: 100%;
}
.beta-welcome-body .account-field > textarea {
  min-height: 112px;
  resize: vertical;
  line-height: 1.4;
}
.beta-welcome-body .account-field > textarea.beta-guidance-default {
  color: #929aa2;
}
.beta-welcome-body .account-field > input[type="date"] { min-height: 44px; }
@media (max-width: 600px) {
  .beta-welcome-modal > .modal-head .modal-title { font-size: clamp(18px, 5.2vw, 24px); }
  .beta-welcome-body .account-field { gap: 6px; margin-bottom: 12px; }
}

/* Focused admin Classic review, independent of the Community card grid. */
.community-modal.community-classic-review-modal {width:min(960px,96vw);max-height:94dvh;overflow:auto;}
.community-review-launch {min-height:40px;margin-bottom:8px;}
.classic-review-panel {margin:0;display:grid;gap:10px;}
.classic-review-visibility {display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;padding:8px;border:1px solid #66512b;border-radius:8px;}
.classic-review-visibility button {min-height:40px;}
/* Mobile width containment. Keep the native page zoom and desktop layout intact. */
@media (max-width: 760px) {
  /* Avoid Safari inflating text in narrow columns; native pinch/page zoom
     remains available. Do not set maximum-scale or user-scalable=no. */
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  .app-shell, .topbar, .topbar-right { min-width: 0; max-width: 100%; }
  .topbar > nav { display: none !important; }
  .layout > .panel { flex-shrink: 0; }

  /* The editor radio is positioned 88px from the left edge. Hidden positioned
     content still contributes to document scrollWidth, even with opacity:0. */
  .topbar-right .secret-radio-tooltip {
    max-width: min(320px, calc(100vw - 100px));
  }
  .public-splash-active .topbar-right .secret-radio-tooltip,
  .landing-home-active .topbar-right .secret-radio-tooltip {
    max-width: min(320px, calc(100vw - 24px));
  }

  /* Keep the existing side controls and preview sizes, but allow the card
     to shrink to its actual grid track on a particularly narrow phone. */
  .layout,
  .layout > .panel {
    min-width: 0;
    max-width: 100%;
  }
  .preview-stage {
    grid-template-columns: minmax(0, 1fr);
  }
  .preview-panel .preview-stage > .card-preview,
  .preview-panel .preview-stage > .card-preview.direct-edit-preview {
    max-width: 100% !important;
  }
  /* At normal zoom, the browser already anchors fixed elements above its
     dynamic toolbar. Reserve only the actual safe area plus a small Android
     fallback, and apply visual viewport offsets only for a real pinch zoom. */
  .mobile-bottom-nav {
    left: 0;
    right: 0;
    bottom: 0;
    width: auto;
    height: calc(58px + max(6px, env(safe-area-inset-bottom)));
    padding-bottom: max(6px, env(safe-area-inset-bottom));
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .mobile-bottom-nav .mobile-save-nav {
    min-height: 54px;
    transform: translateY(-5px);
  }
  html.cmt-manual-nav-anchor .mobile-bottom-nav {
    left: var(--cmt-visible-left, 0px);
    right: auto;
    width: var(--cmt-visible-width, 100%);
    bottom: var(--cmt-visible-bottom, 0px);
  }

  .radio-rename-overlay {
    inset: auto;
    left: var(--cmt-visible-left, 0px);
    top: var(--cmt-visible-top, 0px);
    width: var(--cmt-visible-width, 100%);
    height: var(--cmt-visible-height, 100dvh);
    padding: 12px;
    pointer-events: auto;
  }
  .radio-rename-dialog {
    min-width: 0;
    max-width: 100%;
    max-height: 100%;
    overflow: auto;
    overscroll-behavior: contain;
  }
}
