:root {
	--maxw: 1200px;
	--fg: #000;
	--bg: #fff;
	--rule: #e5e5e5;
	--muted: #666;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--fg); }

/* Helvetica-centric stack */
body {
	font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
	font-size: 8pt;
	line-height: 1.5;
}

/* Header */
header, main { max-width: var(--maxw); margin: 24px auto; padding: 0 16px; }
header { 
	display: flex; 
	gap: 16px; 
	align-items: center; 
	flex-wrap: wrap;
	border-bottom: 1px solid var(--rule);
	padding-bottom: 12px;
}
h1 { margin: 0; font-size: 10pt; font-weight: 700; letter-spacing: 0.05em; line-height: 1; }
h1 a { color: inherit; text-decoration: none; display: block; }
h1 a:hover { text-decoration: none; }
h1 .logo { height: 16px; width: auto; display: block; }
h3 { font-size: inherit; margin: 0; }

nav { 
	display: flex; 
	gap: 12px; 
	align-items: center;
	margin-left: 24px;
}
.nav-link {
	color: var(--muted);
	text-decoration: none;
	padding: 4px 0;
	border-bottom: 1px solid transparent;
}
.nav-link:hover { color: var(--fg); }
.nav-link.active { 
	color: var(--fg); 
	border-bottom-color: var(--fg);
}

/* Product cards */
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }

.product-cards {
	border-top: 1px solid var(--rule);
	padding-top: 12px;
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 16px;
}

.product-card {
	display: flex;
	flex-direction: column;
	border: 1px solid var(--rule);
	text-decoration: none;
	overflow: hidden;
	transition: border-color 0.2s;
}
.product-card:hover {
	border-color: var(--fg);
	text-decoration: none;
}

.card-text {
	padding: 16px;
}
.card-name {
	margin: 0;
	font-size: 10pt;
	font-weight: 700;
	letter-spacing: 0.02em;
}
.card-tagline {
	margin: 4px 0 0;
	font-size: 8pt;
	color: var(--muted);
	line-height: 1.5;
}
.card-meta-row {
	margin-top: 10px;
	display: flex;
	gap: 8px;
	align-items: center;
	font-size: 7pt;
}
.card-category {
	color: var(--muted);
	text-transform: uppercase;
	letter-spacing: 0.05em;
}
.card-status {
	color: #999;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}
.card-price {
	font-weight: 600;
	font-size: 8pt;
	margin-left: auto;
}

.card-visual {
	position: relative;
	min-height: 140px;
	background: var(--bg);
	overflow: hidden;
	border-top: 1px solid var(--rule);
}
.card-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	filter: grayscale(1);
	opacity: 0.15;
	display: block;
}
.card-ascii {
	position: absolute;
	inset: 0;
	margin: 0;
	padding: 8px;
	font-family: "SF Mono", "Menlo", "Courier New", monospace;
	font-size: 7pt;
	line-height: 1.3;
	color: var(--fg);
	background: none;
	border: none;
	pointer-events: none;
	white-space: pre;
}

@media (max-width: 900px) {
	.product-cards { grid-template-columns: 1fr; }
}

/* Product detail view */
.product { 
	display: grid; 
	gap: 32px; 
	grid-template-columns: 1fr; 
	border-top: 1px solid var(--rule); 
	padding-top: 12px; 
}
.product .info h2 { 
	margin: 0; 
	margin-top: 16px; 
	font-size: 11pt; 
	font-weight: 700; 
	letter-spacing: 0.01em;
}
.product .info .tagline {
	color: var(--muted);
	font-size: 8pt;
	margin-top: 4px;
}
.product .info .meta { 
	color: var(--muted); 
	margin-top: 8px;
	font-size: 7pt;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}
.product .info .price-block {
	margin-top: 12px;
	font-size: 10pt;
	font-weight: 700;
}
.product .info .buy-links {
	margin-top: 12px;
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}
.product .info .buy-link {
	display: inline-block;
	padding: 8px 16px;
	background: var(--fg);
	color: var(--bg);
	text-decoration: none;
	font-size: 8pt;
	font-weight: 500;
	letter-spacing: 0.02em;
	border: 1px solid var(--fg);
	transition: background 0.15s, color 0.15s;
}
.product .info .buy-link:hover {
	background: var(--bg);
	color: var(--fg);
	text-decoration: none;
}
.product .info .buy-link.secondary {
	background: var(--bg);
	color: var(--fg);
}
.product .info .buy-link.secondary:hover {
	background: var(--fg);
	color: var(--bg);
}

/* Coming soon state */
.product .info .coming-soon-notice {
	margin-top: 20px;
	padding: 12px 16px;
	background: #f7f7f7;
	border: 1px solid var(--rule);
	font-size: 8pt;
	color: var(--muted);
}

/* Features list */
.product .info .features {
	margin-top: 20px;
	padding: 0;
	list-style: none;
}
.product .info .features li {
	padding: 4px 0;
	font-size: 8pt;
	border-bottom: 1px solid var(--rule);
}
.product .info .features li:last-child {
	border-bottom: none;
}

/* Detail column (description + media) */
.product .detail .description {
	white-space: pre-wrap;
	font-size: 8pt;
	line-height: 1.5;
	column-count: 3;
	column-gap: 24px;
	column-rule: 1px solid var(--rule);
}
.product .detail .description .desc-rule {
	border: none;
	border-top: 1px solid var(--rule);
	margin: 4px 0;
}
.product .detail .description .desc-heading {
	display: block;
	font-size: 9pt;
	margin-top: 12px;
}

/* Audio player */
.audiolist { display: grid; gap: 6px; margin-top: 12px; }
.audioitem {
	border: 1px solid var(--rule);
	padding: 6px 8px;
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	user-select: none;
	background: var(--bg);
	font-size: 8pt;
}
.audioitem:hover { background: #f9f9f9; }
.audioitem.playing { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.audioitem .state { font-weight: 700; min-width: 34px; }
.audioitem .name { overflow-wrap: anywhere; }
.audioitem .dur { color: inherit; opacity: 0.7; }
.audiolist audio[data-minimal="1"] { display: none; }

/* Product videos */
.product .product-videos {
	margin-top: 12px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.product .product-video {
	width: 100%;
	height: auto;
	display: block;
	background: #000;
}

/* Media gallery */
.product .media {
	margin-top: 12px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.product .media img {
	width: 100%;
	height: auto;
	display: block;
	background: #f2f2f2;
	cursor: pointer;
}
.product .media .featured-image {
	grid-column: 1 / -1;
}

/* About page */
.about {
	border-top: 1px solid var(--rule);
	padding-top: 12px;
	max-width: 640px;
}
.about h2 {
	margin: 0;
	margin-top: 16px;
	font-size: 10pt;
	font-weight: 700;
}
.about p {
	font-size: 8pt;
	line-height: 1.5;
	margin: 12px 0;
}
.about .contact {
	margin-top: 24px;
	padding-top: 16px;
	border-top: 1px solid var(--rule);
}
.about .contact a {
	text-decoration: underline;
}
.about-footer {
	margin-top: 48px;
	padding-top: 16px;
	border-top: 1px solid var(--rule);
	font-size: 7pt;
	color: var(--muted);
	line-height: 1.6;
}
.about-footer .corporate-name {
	font-weight: 700;
	letter-spacing: 0.05em;
	margin-bottom: 4px;
}

/* Back link */
.back-link {
	display: inline-block;
	color: var(--muted);
	font-size: 8pt;
	margin-bottom: 8px;
}
.back-link:hover {
	color: var(--fg);
}

/* Responsive */
@media (max-width: 900px) {
	.product-list.cols { grid-template-columns: 1fr; row-gap: 0; }
	.product .media { grid-template-columns: 1fr; }
	.product .detail .description { column-count: 1; }
}
@media (min-width: 900px) {
	header { margin-top: 32px; }
	.product { grid-template-columns: 200px 1fr; align-items: start; }
}
@media (min-width: 900px) and (max-width: 1100px) {
	.product .detail .description { column-count: 2; }
}

/* Lightbox */
.lightbox { 
	position: fixed; 
	inset: 0; 
	background: rgba(0,0,0,.92); 
	display: none; 
	align-items: center; 
	justify-content: center; 
	z-index: 9999;
	cursor: pointer;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 95vw; max-height: 95vh; }

/* Auth forms */
.auth-form {
	max-width: 320px;
	border-top: 1px solid var(--rule);
	padding-top: 12px;
}
.auth-form h2 {
	margin: 0;
	margin-top: 16px;
	font-size: 10pt;
	font-weight: 700;
}
.auth-form form {
	margin-top: 16px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="text"] {
	font: inherit;
	color: inherit;
	border: 1px solid var(--rule);
	padding: 8px;
	background: #fff;
}
.auth-form input:focus {
	outline: none;
	border-color: var(--fg);
}
.auth-form button {
	font: inherit;
	padding: 8px 16px;
	background: var(--fg);
	color: var(--bg);
	border: 1px solid var(--fg);
	cursor: pointer;
	font-weight: 500;
	letter-spacing: 0.02em;
}
.auth-form button:hover { background: var(--bg); color: var(--fg); }
.auth-form button:disabled { opacity: 0.5; cursor: default; }
.auth-error { color: #c00; font-size: 8pt; min-height: 1.2em; }
.auth-notice { font-size: 8pt; color: var(--muted); margin: 12px 0 0; padding: 10px 12px; background: #f7f7f7; border: 1px solid var(--rule); }
.auth-alt { font-size: 8pt; color: var(--muted); margin-top: 12px; }
.auth-alt a { text-decoration: underline; }
.auth-form p { font-size: 8pt; line-height: 1.5; margin: 12px 0; }

/* Account page */
.account-page {
	border-top: 1px solid var(--rule);
	padding-top: 12px;
	max-width: 480px;
}
.account-page h2 {
	margin: 0;
	margin-top: 16px;
	font-size: 10pt;
	font-weight: 700;
}
.account-page h3 {
	margin-top: 24px;
	font-size: 9pt;
}
.account-info { margin-top: 8px; font-size: 8pt; color: var(--muted); }
.account-info p { margin: 0; }
.licenses-list { margin-top: 8px; }
.license-card {
	border: 1px solid var(--rule);
	padding: 12px;
	margin-bottom: 8px;
}
.license-product { font-weight: 700; font-size: 8pt; margin-bottom: 6px; }
.license-bubbles {
	font-family: "SF Mono", "Menlo", "Courier New", monospace;
	font-size: 8pt;
	line-height: 1.4;
	color: var(--fg);
	margin: 0;
	padding: 12px 8px;
	background: #fafafa;
	border: 1px solid var(--rule);
	overflow-x: auto;
}
.license-key-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.license-key {
	font-family: "SF Mono", "Menlo", monospace;
	font-size: 9pt;
	letter-spacing: 0.05em;
	background: #f7f7f7;
	padding: 4px 8px;
	border: 1px solid var(--rule);
}
.copy-btn {
	font: inherit;
	font-size: 7pt;
	padding: 3px 8px;
	background: var(--bg);
	border: 1px solid var(--rule);
	cursor: pointer;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}
.copy-btn:hover { border-color: var(--fg); }
.license-meta { font-size: 7pt; color: var(--muted); margin-top: 6px; }
.muted { color: var(--muted); }
.logout-btn {
	font: inherit;
	font-size: 8pt;
	margin-top: 24px;
	padding: 6px 12px;
	background: var(--bg);
	color: var(--muted);
	border: 1px solid var(--rule);
	cursor: pointer;
}
.logout-btn:hover { color: var(--fg); border-color: var(--fg); }

/* Buy checkout button (styled like buy-link) */
button.buy-link {
	font: inherit;
	cursor: pointer;
}

/* Product ASCII signature */
.ascii-signature {
	font-family: "SF Mono", "Menlo", "Courier New", monospace;
	font-size: 7pt;
	line-height: 1.2;
	color: var(--muted);
	margin: 32px 0 0;
	padding: 0;
	background: none;
	border: none;
	min-height: 10em;
	grid-column: 1 / -1;
}

