/* ============================================================
   PLAYMAT STUDIO — Custom Dark Theme
   Override layer for Phantom (HTML5 UP) template
   ============================================================ */

/* ---- Self-hosted: Under Subway ---- */
@font-face {
	font-family: 'Under Subway';
	src: url('../Under Subway.ttf') format('truetype');
	font-weight: normal;
	font-style: normal;
	font-display: swap;
}

/* ---- CSS Variables ---- */
:root {
	--ps-bg:           #0b0912;
	--ps-surface:      #110e1c;
	--ps-surface-2:    #181228;
	--ps-border:       rgba(220, 200, 255, 0.08);

	/* Brand palette */
	--ps-purple:       #6830BB;   /* anchor/primary */
	--ps-purple-soft:  #8565B5;   /* button hover */
	--ps-link-hover:   #a07fe0;   /* link hover — 6.7:1 contrast on dark bg, WCAG AA */
	--ps-purple-dark:  #521898;
	--ps-purple-light: #8a52d4;
	--ps-red:          #BB303E;
	--ps-green:        #83BB30;
	--ps-teal:         #30BBAD;
	--ps-teal-dark:    #22988C;

	--ps-text:         #f0eeff;
	--ps-text-muted:   #9888c0;

	/* Tool lightbox nav offset (matches sticky nav height) */
	--adv-nav-offset:  64px;
}

/* ============================================================
   BASE
   ============================================================ */

body {
	background-color: var(--ps-bg) !important;
	color: var(--ps-text) !important;
	font-family: 'Plus Jakarta Sans', Helvetica, sans-serif !important;
}

h1, h2, h3, h4, h5, h6 {
	color: var(--ps-text) !important;
	font-family: 'Plus Jakarta Sans', Helvetica, sans-serif !important;
	font-weight: 700 !important;
}

p {
	color: var(--ps-text-muted) !important;
}

a {
	color: var(--ps-teal) !important;
	border-bottom-color: rgba(48, 187, 173, 0.2) !important;
}

a:hover {
	color: var(--ps-link-hover) !important;
	border-bottom-color: rgba(160, 127, 224, 0.3) !important;
}

/* ============================================================
   HEADER — Horizontal sticky nav bar
   ============================================================ */

#wrapper {
	padding-top: calc(5.5em + 20px) !important;
}

#header {
	position: fixed !important;
	top: 0 !important;
	left: 0 !important;
	right: 0 !important;
	width: 100% !important;
	height: auto !important;
	padding: 10px 0 !important;
	background: rgba(11, 9, 18, 0.97) !important;
	border-bottom: 1px solid var(--ps-border) !important;
	backdrop-filter: blur(8px) !important;
	-webkit-backdrop-filter: blur(8px) !important;
	z-index: 9999 !important;
}

#header .inner {
	display: flex !important;
	flex-direction: row !important;
	align-items: center !important;
	justify-content: space-between !important;
	height: 100% !important;
	padding: 0 2em !important;
	max-width: none !important;
	width: 100% !important;
}

#header .logo {
	margin-bottom: 0 !important;
	display: flex !important;
	align-items: center !important;
}

#header .logo .title {
	color: var(--ps-text) !important;
	font-family: 'Under Subway', 'Plus Jakarta Sans', sans-serif !important;
	font-weight: normal !important;
	letter-spacing: 0.05em !important;
	font-size: 1.2em !important;
}

#header .logo .symbol img {
	width: 8em !important;
	height: 5.5em !important;
}

#header nav {
	position: static !important;
	display: block !important;
}

#header nav ul {
	display: flex !important;
	align-items: center !important;
	gap: 0.9em !important;
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
}

#header nav ul li {
	margin: 0 !important;
}

/* Hide hamburger on desktop */
.ps-nav-hamburger {
	display: none !important;
}

/* Desktop nav text links — pill buttons: teal bg, white text, hover shifts bg */
.ps-nav-link a {
	background-color: var(--ps-teal) !important;
	color: #ffffff !important;
	font-family: 'Plus Jakarta Sans', sans-serif !important;
	font-weight: 600 !important;
	font-size: 14px !important;
	padding: 0.45em 0.9em !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	text-align: center !important;
	border-radius: 5px !important;
	border-bottom: none !important;
	transition: background-color 0.2s !important;
	white-space: nowrap !important;
}

.ps-nav-link a:hover {
	background-color: var(--ps-teal-dark) !important;
	color: #ffffff !important;
	border-bottom: none !important;
}

/* CTA button in nav bar */
.ps-nav-cta.button.primary {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	padding: 0.45em 1.1em !important;
	font-size: 14px !important;
	background-color: var(--ps-purple) !important;
	border-color: var(--ps-purple) !important;
	color: #ffffff !important;
	border-radius: 5px !important;
}

.ps-nav-cta.button.primary:hover {
	background-color: var(--ps-purple-dark) !important;
	border-color: var(--ps-purple-dark) !important;
	color: #ffffff !important;
}

/* Hamburger button — transparent bg + white lines */
#header nav ul li a[href="#menu"] {
	background-color: transparent !important;
}

#header nav ul li a[href="#menu"]:after {
	background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Cline x1='2' y1='7' x2='22' y2='7' stroke='%23ffffff' stroke-width='2' stroke-linecap='round'/%3E%3Cline x1='2' y1='12' x2='22' y2='12' stroke='%23ffffff' stroke-width='2' stroke-linecap='round'/%3E%3Cline x1='2' y1='17' x2='22' y2='17' stroke='%23ffffff' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") !important;
}

#header nav ul li a[href="#menu"]:before {
	background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Cline x1='2' y1='7' x2='22' y2='7' stroke='%238565B5' stroke-width='2' stroke-linecap='round'/%3E%3Cline x1='2' y1='12' x2='22' y2='12' stroke='%238565B5' stroke-width='2' stroke-linecap='round'/%3E%3Cline x1='2' y1='17' x2='22' y2='17' stroke='%238565B5' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") !important;
}

/* ============================================================
   MENU (off-canvas)
   ============================================================ */

#menu {
	background: var(--ps-surface) !important;
	border-left: 1px solid var(--ps-border) !important;
}

#menu h2 {
	color: var(--ps-text-muted) !important;
	font-size: 0.8em !important;
	letter-spacing: 0.25em !important;
	font-weight: 600 !important;
}

#menu ul li a {
	color: var(--ps-text) !important;
	border-top-color: var(--ps-border) !important;
	font-weight: 400 !important;
}

#menu ul li a:hover {
	color: var(--ps-link-hover) !important;
}

#menu .close:before,
#menu .close:after {
	background: var(--ps-text-muted) !important;
}

/* ============================================================
   MAIN CONTENT AREA — Hero
   ============================================================ */

#main {
	background: var(--ps-bg) !important;
	padding-top: 2.5em !important;
	padding-bottom: 0 !important;
}

#main .inner {
	padding-top: 0 !important;
	padding-bottom: 0 !important;
}

#main .inner > header {
	padding: 3em 0 3.5em !important;
}

#main .inner > header h1 {
	font-size: clamp(1.8em, 3vw, 2.6em) !important;
	font-weight: 400 !important;
	line-height: 1.1 !important;
	color: var(--ps-text) !important;
	letter-spacing: -0.02em !important;
	margin-bottom: 0.5em !important;
	white-space: nowrap !important;
}

#main .inner > header p {
	color: var(--ps-text-muted) !important;
	font-size: 0.85em !important;
	line-height: 1.7 !important;
	max-width: none !important;
}

#main .inner > header .actions {
	margin-top: 1.8em !important;
}

/* ============================================================
   BUTTONS
   ============================================================ */

.button {
	font-family: 'Plus Jakarta Sans', sans-serif !important;
	font-weight: 600 !important;
	letter-spacing: 0.04em !important;
	border-radius: 6px !important;
	text-transform: none !important;
}

.button.primary {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	background-color: var(--ps-purple) !important;
	border-color: var(--ps-purple) !important;
	box-shadow: none !important;
	color: #ffffff !important;
}

.button.primary:hover {
	background-color: var(--ps-purple-dark) !important;
	border-color: var(--ps-purple-dark) !important;
	color: #ffffff !important;
}

.button:not(.primary) {
	background-color: transparent !important;
	box-shadow: inset 0 0 0 2px rgba(220, 200, 255, 0.15) !important;
	color: var(--ps-text) !important;
}

.button:not(.primary):hover {
	box-shadow: inset 0 0 0 2px var(--ps-purple-soft) !important;
	color: var(--ps-purple-soft) !important;
}

/* ============================================================
   TILES — Palette color overrides
   ============================================================ */

/* Inline SVG tile icons — uniform white, vertically centred */
.tiles article h2 .ti {
	width: 0.85em;
	height: 0.85em;
	vertical-align: -0.1em;
	fill: currentColor;
	display: inline-block;
	margin-right: 0.2em;
	flex-shrink: 0;
}

/* style1 → Brand Purple */
.tiles article.style1 > .image:before {
	background-color: var(--ps-purple) !important;
}

/* style2 → Red */
.tiles article.style2 > .image:before {
	background-color: var(--ps-red) !important;
}

/* style3 → Green */
.tiles article.style3 > .image:before {
	background-color: var(--ps-green) !important;
}

/* style4 → Teal */
.tiles article.style4 > .image:before {
	background-color: var(--ps-teal) !important;
}

/* style5 → Soft Purple */
.tiles article.style5 > .image:before {
	background-color: var(--ps-purple-soft) !important;
}

/* style6 → Dark Teal */
.tiles article.style6 > .image:before {
	background-color: var(--ps-teal-dark) !important;
}

/* Hover: darken to reveal content */
.tiles article:hover > .image:before {
	background-color: #0f0a1a !important;
	opacity: 0.92 !important;
}

/* Disable tile links — purely informational, no accidental navigation */
.tiles article > a {
	pointer-events: none !important;
	cursor: default !important;
}

/* Tile heading */
.tiles article > a h2 {
	font-family: 'Plus Jakarta Sans', sans-serif !important;
	font-weight: 700 !important;
	font-size: 1.3em !important;
	letter-spacing: -0.01em !important;
}

/* ============================================================
   FEATURE TILES SECTION
   ============================================================ */

.ps-features {
	background: var(--ps-bg) !important;
	overflow: hidden !important;
	padding-top: 5em !important;
	border-top: 1px solid var(--ps-border) !important;
}

.ps-features .inner {
	max-width: 75em !important;
	margin: 0 auto !important;
	padding: 0 3em !important;
}

/* ============================================================
   HOW IT WORKS SECTION
   ============================================================ */

.ps-steps {
	background: var(--ps-surface) !important;
	padding: 5.5em 0 !important;
	border-top: 1px solid var(--ps-border) !important;
	border-bottom: 1px solid var(--ps-border) !important;
}

.ps-steps .inner,
.ps-about .inner {
	max-width: 75em !important;
	margin: 0 auto !important;
	padding: 0 3em !important;
}

.ps-section-header {
	text-align: center !important;
	margin-bottom: 3.5em !important;
}

.ps-section-header h2 {
	font-size: clamp(1.6em, 2.5vw, 2.2em) !important;
	font-weight: 700 !important;
	color: var(--ps-text) !important;
	margin-bottom: 0.4em !important;
	letter-spacing: -0.02em !important;
}

.ps-section-header p {
	color: var(--ps-text-muted) !important;
	font-size: 0.85em !important;
	margin: 0 !important;
}

.ps-steps-grid {
	display: flex !important;
	gap: 2em !important;
	justify-content: center !important;
	align-items: stretch !important;
}

.ps-step {
	flex: 1 !important;
	max-width: 375px !important;
	text-align: center !important;
	padding: 2.5em 1.8em !important;
	background: var(--ps-surface-2) !important;
	border-radius: 12px !important;
	border: 1px solid var(--ps-border) !important;
}

/* Step numbers hidden */
.ps-step-num {
	display: none !important;
}

.ps-step-icon {
	display: block !important;
	font-size: 2em !important;
	color: #2dd4bf !important;
	margin-bottom: 0.8em !important;
}

.ps-step h3 {
	font-size: 1.3em !important;
	font-weight: 700 !important;
	color: var(--ps-text) !important;
	margin-bottom: 0.6em !important;
	min-height: 2.8em !important;
}

.ps-step p {
	font-size: 0.85em !important;
	color: var(--ps-text-muted) !important;
	line-height: 1.65 !important;
	margin: 0 !important;
}

/* ============================================================
   TOOLS (TABBED) SECTION
   ============================================================ */

.ps-tools {
	background: var(--ps-bg) !important;
	padding: 5.5em 0 !important;
	border-top: 1px solid var(--ps-border) !important;
}

.ps-tools .inner {
	padding-left: 0 !important;
	padding-right: 0 !important;
	max-width: none !important;
	overflow: visible !important;
}

/* #designer-visibility-wrapper uses viewport-breakout in index.html <style> block */

/* (outer tab nav removed — tool has its own tab bar) */

/* Native tool embed — the designer-container-wrap fills the tools section */
.designer-container-wrap {
	margin-top: 0.5em !important;
}

/* Reduce gap between "THE TOOLS" heading and the tool embed (~75% less) */
.ps-tools .ps-section-header {
	margin-bottom: 0.75em !important;
}
.ps-tools .designer-container-wrap {
	padding-top: 8px !important;
}

/* Tool buttons — kill Phantom's pink box-shadow on hover/active */
.tool-tab-btn,
.mat-size-btn,
.action-btn,
.acc-btn {
	box-shadow: none !important;
}
.tool-tab-btn:hover,
.tool-tab-btn:active,
.mat-size-btn:hover,
.mat-size-btn:active,
.action-btn:hover,
.action-btn:active,
.acc-btn:hover,
.acc-btn:active {
	box-shadow: none !important;
}
/* Tool tab bar — palette accents */
.tool-tab-btn.active {
	color: var(--ps-teal) !important;
	border-bottom-color: var(--ps-teal) !important;
}
.tool-tab-btn:hover {
	color: var(--ps-purple-soft) !important;
}

/* ============================================================
   ABOUT SECTION
   ============================================================ */

.ps-about {
	background: var(--ps-surface) !important;
	padding: 5.5em 0 !important;
	border-top: 1px solid var(--ps-border) !important;
}

.ps-about-header {
	text-align: center !important;
}

.ps-about-body {
	max-width: 850px !important;
	margin: 0 auto !important;
	text-align: center !important;
}

.ps-about-body p {
	font-size: 0.9em !important;
	line-height: 1.8 !important;
	color: var(--ps-text-muted) !important;
	margin-bottom: 1.2em !important;
}

.ps-about-body .actions {
	margin-top: 2.2em !important;
}

/* ============================================================
   CONTACT SECTION
   ============================================================ */

.ps-contact {
	background: var(--ps-bg) !important;
	padding: 5.5em 0 !important;
	border-top: 1px solid var(--ps-border) !important;
}

.ps-contact .inner {
	max-width: 75em !important;
	margin: 0 auto !important;
	padding: 0 3em !important;
}

.ps-contact-grid {
	display: flex !important;
	gap: 4em !important;
	align-items: flex-start !important;
}

.ps-contact-info {
	flex: 1 !important;
	min-width: 200px !important;
}

.ps-contact-info p {
	font-size: 0.9em !important;
	line-height: 1.75 !important;
	color: var(--ps-text-muted) !important;
}

.ps-contact-form {
	flex: 2 !important;
}

.ps-contact-form .ps-field {
	margin-bottom: 1.2em !important;
}

.ps-contact-form label {
	display: block !important;
	font-family: 'Plus Jakarta Sans', sans-serif !important;
	font-size: 0.85em !important;
	font-weight: 600 !important;
	letter-spacing: 0.1em !important;
	text-transform: uppercase !important;
	color: var(--ps-text-muted) !important;
	margin-bottom: 0.5em !important;
}

.ps-contact-form input[type="text"],
.ps-contact-form input[type="email"],
.ps-contact-form textarea {
	width: 100% !important;
	padding: 0.75em 1em !important;
	background: var(--ps-surface) !important;
	border: 1px solid var(--ps-border) !important;
	border-radius: 6px !important;
	color: var(--ps-text) !important;
	font-family: 'Plus Jakarta Sans', sans-serif !important;
	font-size: 0.9em !important;
	transition: border-color 0.2s !important;
	box-sizing: border-box !important;
}

.ps-contact-form input[type="text"]:focus,
.ps-contact-form input[type="email"]:focus,
.ps-contact-form textarea:focus {
	outline: none !important;
	border-color: var(--ps-purple) !important;
}

.ps-contact-form textarea {
	height: 130px !important;
	resize: vertical !important;
}

.ps-contact-form .ps-form-row {
	display: flex !important;
	gap: 1em !important;
}

.ps-contact-form .ps-form-row .ps-field {
	flex: 1 !important;
}

/* ============================================================
   FOOTER
   ============================================================ */

#footer {
	background: var(--ps-surface) !important;
	border-top: 1px solid var(--ps-border) !important;
}

#footer .inner {
	display: flex !important;
	flex-wrap: wrap !important;
	gap: 2em !important;
	align-items: flex-start !important;
	padding-top: 2em !important;
	padding-bottom: 1em !important;
}

.ps-footer-col {
	flex: 1 !important;
	min-width: 160px !important;
}

#footer h2 {
	color: var(--ps-text) !important;
	font-size: 0.85em !important;
	font-weight: 700 !important;
	letter-spacing: 0.2em !important;
	text-transform: uppercase !important;
	margin-bottom: 1em !important;
}

#footer h2.ps-footer-brand {
	font-family: 'Under Subway', sans-serif !important;
	font-weight: normal !important;
	font-size: 1.7em !important;
	letter-spacing: 0.05em !important;
	text-transform: none !important;
}

#footer .logo {
	display: flex !important;
	align-items: center !important;
	border-bottom: 0 !important;
	text-decoration: none !important;
	margin-bottom: 0 !important;
}

#footer .logo .symbol {
	margin-right: 0.65em !important;
	display: flex !important;
	align-items: center !important;
}

#footer .logo .symbol img {
	display: block !important;
	width: 2.5em !important;
	height: 2.5em !important;
}

#footer .logo .title {
	color: var(--ps-text) !important;
	font-family: 'Under Subway', 'Plus Jakarta Sans', sans-serif !important;
	font-weight: normal !important;
	letter-spacing: 0.05em !important;
}

#footer p {
	color: var(--ps-text-muted) !important;
	font-size: 0.85em !important;
	line-height: 1.7 !important;
}

.ps-footer-list {
	list-style: none !important;
	padding: 0 !important;
	margin: 0 !important;
}

.ps-footer-list li {
	padding: 0.4em 0 !important;
	border-top: 1px solid var(--ps-border) !important;
}

.ps-footer-list li:first-child {
	border-top: none !important;
}

.ps-footer-list li a {
	color: var(--ps-text-muted) !important;
	font-size: 0.85em !important;
	text-decoration: none !important;
	border: none !important;
}

.ps-footer-list li a:hover {
	color: var(--ps-purple-soft) !important;
}

.copyright {
	width: 100% !important;
	border-top-color: var(--ps-border) !important;
	margin-top: 1em !important;
}

.copyright li,
.copyright li a {
	color: var(--ps-text-muted) !important;
	font-size: 0.85em !important;
}

/* ============================================================
   BACK TO TOP BUTTON
   ============================================================ */

#back-to-top {
	position: fixed !important;
	bottom: 2em !important;
	right: 2em !important;
	width: 2.8em !important;
	height: 2.8em !important;
	background: var(--ps-purple) !important;
	color: #fff !important;
	border-radius: 50% !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	font-size: 1.3em !important;
	text-decoration: none !important;
	border: none !important;
	opacity: 0 !important;
	pointer-events: none !important;
	transition: opacity 0.25s, background 0.2s !important;
	z-index: 9000 !important;
	box-shadow: 0 4px 16px rgba(0,0,0,0.4) !important;
	line-height: 1 !important;
}

#back-to-top.visible {
	opacity: 1 !important;
	pointer-events: auto !important;
}

#back-to-top:hover {
	background: var(--ps-teal) !important;
	color: #fff !important;
	border-bottom: none !important;
}

/* ============================================================
   PRIVACY POLICY LIGHTBOX
   ============================================================ */

#privacy-modal {
	display: none;
	position: fixed;
	top: 0; left: 0;
	width: 100vw; height: 100vh;
	background: rgba(0,0,0,0.85);
	z-index: 99999;
	align-items: center;
	justify-content: center;
	padding: 1.5em;
	box-sizing: border-box;
}

#privacy-modal .privacy-box {
	background: var(--ps-surface-2);
	border: 1px solid var(--ps-border);
	border-radius: 10px;
	max-width: 720px;
	width: 100%;
	max-height: 85vh;
	display: flex;
	flex-direction: column;
	box-shadow: 0 20px 60px rgba(0,0,0,0.7);
	position: relative;
}

#privacy-modal .privacy-header {
	padding: 1.5em 2em 1em;
	border-bottom: 1px solid var(--ps-border);
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-shrink: 0;
}

#privacy-modal .privacy-header h2 {
	margin: 0 !important;
	font-size: 1.125em !important;
	color: var(--ps-text) !important;
	letter-spacing: 0.05em !important;
	text-transform: uppercase !important;
	font-weight: 700 !important;
}

#privacy-modal .privacy-close {
	background: none;
	border: none;
	color: var(--ps-text-muted);
	font-size: 1.4em;
	cursor: pointer;
	padding: 0;
	line-height: 1;
	transition: color 0.2s;
}

#privacy-modal .privacy-close:hover {
	color: var(--ps-text);
}

#privacy-modal .privacy-body {
	padding: 1.5em 2em 2em;
	overflow-y: auto;
	font-size: 0.85em;
	line-height: 1.75;
	color: var(--ps-text-muted);
}

#privacy-modal .privacy-body h3 {
	font-size: 0.95em !important;
	color: var(--ps-teal) !important;
	font-weight: 700 !important;
	text-transform: uppercase !important;
	letter-spacing: 0.08em !important;
	margin: 1.4em 0 0.4em !important;
}

#privacy-modal .privacy-body p,
#privacy-modal .privacy-body ul {
	margin: 0 0 0.8em !important;
}

#privacy-modal .privacy-body ul {
	padding-left: 1.4em !important;
}

#privacy-modal .privacy-body strong {
	color: var(--ps-text);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media screen and (max-width: 980px) {
	/* Hide all nav list items except the hamburger — covers nav links AND the CTA li */
	#header nav ul li {
		display: none !important;
	}
	#header nav ul li.ps-nav-hamburger {
		display: flex !important;
	}

	.ps-steps-grid {
		flex-wrap: wrap !important;
	}

	.ps-step {
		min-width: 220px !important;
	}

	.ps-contact-grid {
		flex-direction: column !important;
		gap: 2em !important;
	}

	.ps-contact-form .ps-form-row {
		flex-direction: column !important;
		gap: 0 !important;
	}
}

@media screen and (max-width: 736px) {
	/* ── HEADER: shrink logo back to single line ── */
	#wrapper {
		padding-top: calc(3.7em + 20px) !important;
	}
	#header {
		height: auto !important;
	}
	#header .logo .title {
		font-size: 0.935em !important;
		white-space: nowrap !important;
	}
	#header .logo .symbol img {
		width: 5.3em !important;
		height: 3.7em !important;
	}

	#main .inner > header h1 {
		white-space: normal !important;
		font-size: clamp(1.5em, 5vw, 2em) !important;
	}

	/* ── FEATURE TILES: text contrast on colored backgrounds ── */
	.tiles article > a h2 {
		text-shadow: 0 2px 10px rgba(0,0,0,0.85), 0 0 24px rgba(0,0,0,0.5) !important;
		color: #ffffff !important;
	}
	.tiles article > a .content p {
		color: rgba(255,255,255,0.95) !important;
		text-shadow: 0 1px 6px rgba(0,0,0,0.75) !important;
	}

	/* ── HOW IT WORKS STEPS ── */
	.ps-steps-grid {
		flex-direction: column !important;
		align-items: stretch !important;
	}
	.ps-step {
		max-width: 100% !important;
	}

	/* ── INNER PADDING ── */
	.ps-steps .inner,
	.ps-about .inner,
	.ps-tools .inner,
	.ps-contact .inner,
	.ps-features .inner {
		padding: 0 1.25em !important;
	}
	.ps-steps,
	.ps-about,
	.ps-tools,
	.ps-contact,
	.ps-features {
		padding: 3em 0 !important;
	}

	/* ── TOOL TABS: 2-column grid layout on mobile ── */
	.tool-tab-bar {
		display: grid !important;
		grid-template-columns: 1fr 1fr !important;
		overflow-x: visible !important;
		flex-wrap: unset !important;
		gap: 8px !important;
		padding-bottom: 0 !important;
		border-bottom: none !important;
		margin-bottom: 20px !important;
	}
	.tool-tab-btn {
		flex: unset !important;
		min-width: 0 !important;
		width: 100% !important;
		font-size: 12px !important;
		letter-spacing: 0.8px !important;
		padding: 13px 10px !important;
		border-radius: 8px !important;
		border: 1px solid rgba(255,255,255,0.12) !important;
		border-bottom: 2px solid transparent !important;
		margin-bottom: 0 !important;
		white-space: normal !important;
		text-align: center !important;
		line-height: 1.3 !important;
	}
	.tool-tab-btn.active {
		border-color: #30BBAD !important;
		border-bottom-color: #30BBAD !important;
		background: rgba(48,187,173,0.13) !important;
		color: #30BBAD !important;
	}
	/* Last tab (5th, IMAGE HOST) spans full width */
	.tool-tab-btn:last-child {
		grid-column: 1 / -1 !important;
	}

	/* ── PREVENT HORIZONTAL OVERFLOW in tool panels ── */
	.tool-tab-panel,
	#landing-ui,
	#simple-modal,
	#simple-tools,
	#simple-canvas-wrap {
		max-width: 100% !important;
		overflow-x: hidden !important;
		box-sizing: border-box !important;
	}
	/* Keep action buttons within bounds */
	.tool-tab-panel .action-btn,
	#simple-tools .action-btn {
		max-width: 100% !important;
		box-sizing: border-box !important;
	}

	/* ── SIMPLE EDITOR: header wrap ── */
	#simple-header {
		flex-wrap: wrap !important;
		gap: 6px !important;
		padding: 10px 12px !important;
		align-items: center !important;
	}
	/* Title takes full row; shrink font */
	#simple-header > span:first-child {
		flex: 1 1 100% !important;
		font-size: 15px !important;
		letter-spacing: 0.5px !important;
	}
	/* RESTART and FULL SCREEN buttons shrink to fit the remaining row */
	#simple-header .action-btn {
		font-size: 11px !important;
		padding: 6px 10px !important;
	}

	/* ── CANVAS INFO BAR: truncate gracefully ── */
	.canvas-info-bar {
		font-size: 10px !important;
		padding: 5px 8px !important;
		overflow-x: auto !important;
		white-space: nowrap !important;
		scrollbar-width: none !important;
		text-align: left !important;
	}
	.canvas-info-bar::-webkit-scrollbar {
		display: none !important;
	}

	/* ── SIMPLE TOOL GRID: single column ── */
	.simple-tool-grid {
		grid-template-columns: 1fr !important;
		gap: 16px !important;
	}

	/* ── QUICK UPLOAD: stack all inline flex button rows vertically ── */
	#simple-tools .simple-tool-grid > div > div[style*="display:flex"] {
		flex-direction: column !important;
		align-items: stretch !important;
	}
	/* Buttons inside those rows go full width */
	#simple-tools .simple-tool-grid > div > div[style*="display:flex"] .action-btn,
	#simple-tools .simple-tool-grid > div > div[style*="display:flex"] input[type="range"] {
		flex: unset !important;
		width: 100% !important;
	}

	/* ── ADVANCED EDITOR SIDEBAR: stack button rows vertically ── */
	/* ARTWORK: upload file / paste url row */
	#acc-size > div[style*="display:flex"]:not([style*="center"]) {
		flex-direction: column !important;
		align-items: stretch !important;
	}
	#acc-size > div[style*="display:flex"]:not([style*="center"]) .action-btn {
		flex: unset !important;
		width: 100% !important;
	}
	/* RESTART / FULL SCREEN header row */
	.sidebar-header {
		flex-direction: column !important;
	}
	.sidebar-header .action-btn {
		width: 100% !important;
	}

	/* ── ADVANCED EDITOR: collapse ARTWORK content on mobile so all
	      three accordion headers are visible without scrolling ── */
	#acc-size {
		display: none !important;
	}

	/* ── DOWNLOAD + SHARE rows: stack vertically on mobile ── */
	div:has(> #simple-atc),
	div:has(> #sidebar-atc) {
		flex-direction: column !important;
	}
	#simple-atc, #simple-share-btn,
	#sidebar-atc, #sidebar-share-btn {
		flex: unset !important;
		width: 100% !important;
		height: 44px !important;
		font-size: 14px !important;
		margin: 0 !important;
	}

	/* ── FOOTER ── */
	#footer .inner {
		flex-direction: column !important;
		gap: 1.5em !important;
	}
	#footer .inner {
		padding-top: 1.5em !important;
		padding-bottom: 1em !important;
	}

	/* ── BACK TO TOP: keep clear of screen edge ── */
	#back-to-top {
		bottom: 1em !important;
		right: 1em !important;
		width: 2.4em !important;
		height: 2.4em !important;
		font-size: 1.1em !important;
	}
}

/* ============================================================
   CHANGELOG MODAL
   ============================================================ */

#changelog-modal {
	display: none;
	position: fixed;
	top: 0; left: 0;
	width: 100vw; height: 100vh;
	background: rgba(0,0,0,0.88);
	z-index: 99999;
	align-items: center;
	justify-content: center;
	padding: 1.5em;
	box-sizing: border-box;
}

#changelog-modal .changelog-box {
	background: var(--ps-surface-2);
	border: 1px solid var(--ps-border);
	border-radius: 12px;
	max-width: 800px;
	width: 100%;
	max-height: 88vh;
	display: flex;
	flex-direction: column;
	box-shadow: 0 24px 72px rgba(0,0,0,0.75);
	position: relative;
}

#changelog-modal .changelog-header {
	padding: 1.25em 1.75em 1em;
	border-bottom: 1px solid var(--ps-border);
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-shrink: 0;
	gap: 12px;
}

#changelog-modal .changelog-header-left {
	display: flex;
	align-items: center;
	gap: 14px;
	flex-wrap: wrap;
}

#changelog-modal .changelog-header h2 {
	margin: 0 !important;
	font-size: 1.05em !important;
	color: var(--ps-text) !important;
	letter-spacing: 0.05em !important;
	text-transform: uppercase !important;
	font-weight: 700 !important;
}

#changelog-modal .changelog-beta-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 3px 11px;
	background: rgba(104,48,187,0.15);
	border: 1px solid rgba(104,48,187,0.35);
	border-radius: 100px;
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--ps-purple-light, #8a52d4);
	font-family: 'JetBrains Mono', monospace;
}

#changelog-modal .changelog-close {
	background: none;
	border: none;
	color: var(--ps-text-muted);
	font-size: 1.4em;
	cursor: pointer;
	padding: 0;
	line-height: 1;
	transition: color 0.2s;
	flex-shrink: 0;
}

#changelog-modal .changelog-close:hover {
	color: var(--ps-text);
}

#changelog-modal .changelog-body {
	padding: 1.75em 2em 2em;
	overflow-y: auto;
	scrollbar-width: thin;
	scrollbar-color: rgba(104,48,187,0.3) transparent;
}

/* Timeline spine */
#changelog-modal .cl-timeline {
	position: relative;
}

#changelog-modal .cl-timeline::before {
	content: '';
	position: absolute;
	left: 0;
	top: 14px;
	bottom: 24px;
	width: 1px;
	background: linear-gradient(to bottom, transparent, var(--ps-border) 6%, var(--ps-border) 94%, transparent);
}

/* Version entry */
#changelog-modal .cl-entry {
	position: relative;
	padding-left: 28px;
	margin-bottom: 44px;
}

#changelog-modal .cl-entry::before {
	content: '';
	position: absolute;
	left: -4px;
	top: 12px;
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--ps-surface-3, #1e1535);
	border: 2px solid var(--ps-border);
}

#changelog-modal .cl-entry.cl-latest::before {
	background: var(--ps-teal);
	border-color: var(--ps-teal);
	box-shadow: 0 0 10px rgba(48,187,173,0.4);
}

#changelog-modal .cl-entry.cl-major::before {
	background: var(--ps-purple-light, #8a52d4);
	border-color: var(--ps-purple, #6830BB);
	box-shadow: 0 0 10px rgba(104,48,187,0.35);
}

/* Version header row */
#changelog-modal .cl-vheader {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	margin-bottom: 12px;
}

#changelog-modal .cl-vnum {
	font-family: 'JetBrains Mono', monospace;
	font-size: 15px;
	font-weight: 500;
	color: var(--ps-text);
	letter-spacing: -0.01em;
}

#changelog-modal .cl-entry.cl-latest .cl-vnum { color: var(--ps-teal); }
#changelog-modal .cl-entry.cl-major  .cl-vnum { color: var(--ps-purple-light, #8a52d4); }

#changelog-modal .cl-vdate {
	font-family: 'JetBrains Mono', monospace;
	font-size: 11px;
	color: var(--ps-text-dim);
	margin-left: auto;
}

/* Tags */
#changelog-modal .cl-tag {
	font-family: 'JetBrains Mono', monospace;
	font-size: 9.5px;
	font-weight: 500;
	padding: 2px 8px;
	border-radius: 4px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

#changelog-modal .cl-tag-latest  { background: rgba(48,187,173,0.12);   color: var(--ps-teal);               border: 1px solid rgba(48,187,173,0.25); }
#changelog-modal .cl-tag-major   { background: rgba(104,48,187,0.15);   color: var(--ps-purple-light,#8a52d4); border: 1px solid rgba(104,48,187,0.3);  }
#changelog-modal .cl-tag-minor   { background: rgba(152,136,192,0.1);   color: var(--ps-text-muted);          border: 1px solid rgba(152,136,192,0.2); }
#changelog-modal .cl-tag-patch   { background: rgba(152,136,192,0.07);  color: var(--ps-text-dim);            border: 1px solid rgba(152,136,192,0.12);}
#changelog-modal .cl-tag-initial { background: rgba(152,136,192,0.07);  color: var(--ps-text-dim);            border: 1px solid rgba(152,136,192,0.12);}

/* Card */
#changelog-modal .cl-card {
	background: var(--ps-surface, #110e1c);
	border: 1px solid var(--ps-border);
	border-radius: 10px;
	overflow: hidden;
	transition: border-color 0.2s;
}

#changelog-modal .cl-entry.cl-latest .cl-card { border-color: rgba(48,187,173,0.2); }
#changelog-modal .cl-entry.cl-major  .cl-card { border-color: rgba(104,48,187,0.25); }

#changelog-modal .cl-summary {
	padding: 13px 18px;
	font-size: 13px;
	color: var(--ps-text-muted);
	font-style: italic;
	border-bottom: 1px solid rgba(220,200,255,0.05);
	background: rgba(255,255,255,0.02);
	margin: 0 !important;
}

/* Change groups */
#changelog-modal .cl-groups {
	padding: 4px 0 8px;
}

#changelog-modal .cl-group {
	padding: 9px 18px;
}

#changelog-modal .cl-group + .cl-group {
	border-top: 1px solid rgba(220,200,255,0.05);
}

#changelog-modal .cl-label {
	font-size: 9.5px !important;
	font-weight: 600 !important;
	letter-spacing: 0.12em !important;
	text-transform: uppercase !important;
	margin: 0 0 7px !important;
	display: flex !important;
	align-items: center !important;
	gap: 7px !important;
}

#changelog-modal .cl-label::after {
	content: '';
	flex: 1;
	height: 1px;
	background: currentColor;
	opacity: 0.12;
}

#changelog-modal .cl-label-added    { color: var(--ps-teal) !important; }
#changelog-modal .cl-label-improved { color: var(--ps-purple-light, #8a52d4) !important; }
#changelog-modal .cl-label-fixed    { color: #BBA030 !important; }
#changelog-modal .cl-label-security { color: #BB303E !important; }

#changelog-modal .cl-list {
	list-style: none !important;
	padding: 0 !important;
	margin: 0 !important;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

#changelog-modal .cl-list li {
	font-size: 13px !important;
	color: var(--ps-text-muted) !important;
	padding-left: 14px !important;
	position: relative !important;
	line-height: 1.55 !important;
	margin: 0 !important;
}

#changelog-modal .cl-list li::before {
	content: '–';
	position: absolute;
	left: 0;
	color: var(--ps-text-dim);
}

#changelog-modal .cl-list li strong {
	color: var(--ps-text);
}

@media (max-width: 600px) {
	#changelog-modal .changelog-body { padding: 1.25em 1.25em 1.5em; }
	#changelog-modal .cl-timeline::before { display: none; }
	#changelog-modal .cl-entry { padding-left: 0; }
	#changelog-modal .cl-entry::before { display: none; }
	#changelog-modal .cl-vdate { display: none; }
	#changelog-modal .changelog-header { padding: 1em 1.25em 0.75em; }
}
