* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
}

body {
    font-family: 'DM Sans', sans-serif;
    background: #F5F0EB;
    color: #1a1a1a;
    min-height: 100vh;
    padding: 40px 20px;
    letter-spacing: -0.01em;
}

::selection {
    background: #1a1a1a;
    color: #F5F0EB;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

h1 {
    font-size: 2.1em;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.02em;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo {
    width: 32px;
    height: 32px;
    border: 2px solid #1a1a1a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'DM Mono', monospace;
    font-size: 10px;
    font-weight: 500;
    color: #1a1a1a;
    flex-shrink: 0;
}

h1 .logo-text {
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.hero {
    text-align: center;
    margin: 40px 0 24px;
}

.hero__label {
    font-family: 'DM Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #595959;
    margin-bottom: 16px;
}

.hero__headline {
    font-family: 'Playfair Display', serif;
    font-size: clamp(40px, 8vw, 72px);
    font-weight: 900;
    color: #1a1a1a;
    letter-spacing: -0.03em;
    line-height: 1;
    margin: 0 0 20px;
}

.hero__headline em {
    font-weight: 400;
    font-style: italic;
}

.hero__sub {
    color: #595959;
    font-size: 15px;
    font-weight: 300;
    line-height: 1.7;
    max-width: 440px;
    margin: 0 auto;
}

.hero__marquee-wrap {
    margin-top: 32px;
    overflow: hidden;
    border-top: 1px solid rgba(0,0,0,0.08);
    border-bottom: 1px solid rgba(0,0,0,0.08);
    padding: 10px 0;
    /* Full-width breakout */
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    position: relative;
    /* Fade left & right */
    -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
    mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}

.hero__marquee {
    display: flex;
    gap: 40px;
    animation: marquee 20s linear infinite;
    white-space: nowrap;
    font-family: 'DM Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #767676;
}

.hero__marquee span::before {
    content: '●';
    font-size: 5px;
    opacity: 0.4;
    margin-right: 10px;
    vertical-align: middle;
}

@keyframes marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

.floating-glyph {
    position: absolute;
    font-family: 'Playfair Display', serif;
    color: transparent;
    -webkit-text-stroke: 1px rgba(0,0,0,0.05);
    pointer-events: none;
    user-select: none;
    line-height: 1;
    z-index: 0;
}

/* Main card */
.input-section {
    margin-bottom: 40px;
    background: #FFFFFF;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.tab {
    flex: 1;
    padding: 14px 20px;
    background: transparent;
    border: none;
    border-bottom: none;
    color: #767676;
    font-family: 'DM Mono', monospace;
    font-size: 10px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    border-radius: 0;
    margin-bottom: 0;
}

.tab:hover:not(.disabled) {
    color: #1a1a1a;
    background: transparent;
}

.tab.active {
    color: #F5F0EB;
    background: #1a1a1a;
}

.tab.disabled {
    color: #8b8b8b;
    cursor: not-allowed;
}

.tab.disabled:hover {
    color: #8b8b8b;
    background: none;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    padding: 28px;
}

.input-hint {
    color: #595959;
    font-size: 0.82em;
    margin-bottom: 14px;
}

/* Textarea */
.textarea-wrap {
    position: relative;
}

.btn-clear {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    padding: 0;
    background: none;
    border: none;
    color: #767676;
    font-size: 22px;
    cursor: pointer;
    display: none;
    line-height: 1;
}

.btn-clear:hover {
    color: #1a1a1a;
}

textarea {
    width: 100%;
    padding: 0 0 16px 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    color: #1a1a1a;
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    font-style: italic;
    transition: border-color 0.3s;
    resize: none;
    min-height: 60px;
    max-height: 200px;
    line-height: 1.6;
    border-radius: 0;
}

textarea:focus {
    outline: none;
    border-bottom-color: #1a1a1a;
}

textarea::placeholder {
    color: #767676;
    font-style: italic;
}

/* Buttons */
button {
    padding: 14px 25px;
    background: #1a1a1a;
    color: #F5F0EB;
    border: none;
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    border-radius: 0;
}

button:hover:not(:disabled) {
    background: #333;
    color: #F5F0EB;
}

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

.btn-generate {
    width: 100%;
    padding: 16px 28px;
    background: #1a1a1a;
    color: #F5F0EB;
    border: none;
}

.btn-generate:hover:not(:disabled) {
    background: #333;
    color: #F5F0EB;
}

.btn-refine {
    background: transparent;
    color: #1a1a1a;
    border: 1.5px solid #1a1a1a;
}

.btn-refine:hover:not(:disabled) {
    background: #1a1a1a;
    color: #F5F0EB;
}

.btn-refine:disabled {
    background: transparent;
    color: #8b8b8b;
    border-color: #E0D9D1;
    cursor: not-allowed;
}

.btn-new {
    background: transparent;
    color: #595959;
    border: 1px solid #E0D9D1;
}

.btn-new:hover:not(:disabled) {
    color: #1a1a1a;
    border-color: #1a1a1a;
    background: transparent;
}

.button-group {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn-generate,
.btn-refine,
.btn-new {
    flex: 1;
}

/* Loading overlay */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(245, 240, 235, 0.85);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 100;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
    padding: 20px;
}

.loading-text {
    color: #595959;
    margin-top: 20px;
    font-size: 0.85em;
    letter-spacing: 0.1em;
    font-weight: 500;
    font-family: 'DM Mono', monospace;
}

.loading-comment {
    color: #595959;
    margin-top: 15px;
    font-size: 0.8em;
    letter-spacing: 0;
    min-height: 1.2em;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.loading-comment.dots::after {
    content: '';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%   { content: ''; }
    25%  { content: '.'; }
    50%  { content: '..'; }
    75%  { content: '...'; }
}

.loading-comment.visible {
    opacity: 1;
}

/* SVG Loader */
.loader {
    width: 60px;
    height: 60px;
    margin: 0 auto;
}

.loader circle {
    fill: none;
    stroke: #1a1a1a;
    stroke-width: 2;
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}

@keyframes dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

/* Audio player */
.audio-player {
    margin-bottom: 20px;
}

.audio-player h3 {
    color: #595959;
    font-size: 0.75em;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 500;
}

/* Wave Player Component */
.wave-player {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #FFFFFF;
    padding: 15px;
    border: 1px solid #E0D9D1;
    margin-bottom: 15px;
    border-radius: 0;
}

.wave-player__btn {
    width: 44px;
    height: 44px;
    padding: 0;
    background: transparent;
    border: 2px solid #1a1a1a;
    border-radius: 50%;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.wave-player__btn:hover {
    background: #1a1a1a;
    color: #F5F0EB;
}

.wave-player__waveform {
    flex: 1;
    height: 60px;
    cursor: pointer;
}

.wave-player__canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.wave-player__time {
    font-size: 11px;
    font-family: 'DM Mono', monospace;
    color: #595959;
    white-space: nowrap;
    flex-shrink: 0;
}

.wave-player__separator {
    margin: 0 3px;
    color: #8b8580;
}

.audio-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.download-btn {
    display: inline-block;
    background: transparent;
    color: #1a1a1a;
    padding: 10px 20px;
    text-decoration: none;
    border: 1.5px solid #1a1a1a;
    transition: all 0.2s;
    font-family: 'DM Mono', monospace;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 500;
    border-radius: 0;
}

.download-btn:hover {
    background: #1a1a1a;
    color: #F5F0EB;
    border-color: #1a1a1a;
}

.drag-handle {
    display: none;
    padding: 10px 20px;
    border: 1.5px dashed #C8C0B8;
    color: #595959;
    font-family: 'DM Mono', monospace;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 500;
    cursor: grab;
    transition: all 0.2s;
    user-select: none;
}

.drag-handle:hover {
    border-color: #1a1a1a;
    color: #1a1a1a;
}

.drag-handle:active {
    cursor: grabbing;
}

/* Presets label */
.presets-label {
    font-family: 'DM Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #767676;
    margin-top: 20px;
    margin-bottom: 12px;
}

/* Presets grid */
.examples {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.examples::-webkit-scrollbar {
    display: none;
}

.examples .examples-label {
    display: none;
}

.example-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 6px;
    background: transparent;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 0;
    color: #555;
    font-family: 'DM Mono', monospace;
    font-size: 9px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: none;
    letter-spacing: 0.03em;
    white-space: nowrap;
    text-align: center;
}

.example-pill:hover {
    background: #1a1a1a;
    color: #F5F0EB;
    border-color: #1a1a1a;
}

.example-pill .preset-icon {
    font-size: 16px;
    margin-bottom: 3px;
    transition: transform 0.3s;
    font-style: normal;
}

.example-pill:hover .preset-icon {
    transform: scale(1.3);
}

/* Refine toggle */
.refine-toggle {
    all: unset;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid rgba(0,0,0,0.06);
    color: #595959;
    font-family: 'DM Mono', monospace;
    font-size: 10px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    width: 100%;
    box-sizing: border-box;
}

.refine-toggle:hover,
.refine-toggle:hover:not(:disabled) {
    color: #1a1a1a;
    background: transparent;
}

.refine-toggle .chevron {
    transition: transform 0.2s;
    font-size: 10px;
}

.refine-toggle.open .chevron {
    transform: rotate(90deg);
}

/* Refine section (inside tab 2) */
.refine-area {
    display: none;
    margin-top: 20px;
}

.refine-area.open {
    display: block;
}

.suggestions {
    margin-top: 8px;
}

#suggestionButtons {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    align-items: center;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

#suggestionButtons::-webkit-scrollbar {
    display: none;
}

.suggestion-btn {
    display: inline-block;
    background: transparent;
    color: #1a1a1a;
    padding: 6px 14px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid rgba(0,0,0,0.12);
    font-size: 10px;
    letter-spacing: 0.03em;
    font-family: 'DM Mono', monospace;
    font-weight: 400;
    border-radius: 0;
    text-transform: none;
    white-space: nowrap;
    flex-shrink: 0;
}

.suggestion-btn:hover {
    background: #1a1a1a;
    color: #F5F0EB;
    border-color: #1a1a1a;
}

/* Error */
.error {
    background: #FFF5F5;
    color: #D32F2F;
    padding: 15px;
    margin-top: 20px;
    display: none;
    border: 1px solid #FFCDD2;
    font-size: 0.9em;
    border-radius: 0;
}

/* FAQ */
.faq {
    margin-top: 60px;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

.faq__header {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 36px;
}

.faq__header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 32px;
    font-weight: 900;
    letter-spacing: -0.03em;
    margin: 0;
    color: #1a1a1a;
    text-transform: none;
}

.faq__header span {
    font-family: 'DM Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #767676;
}

.faq details {
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.faq details:first-of-type {
    border-top: 1px solid rgba(0,0,0,0.1);
}

.faq details:last-of-type {
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.faq summary {
    padding: 16px 0;
    cursor: pointer;
    color: #1a1a1a;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: -0.01em;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: padding-left 0.3s;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
    content: '+';
    font-family: 'Playfair Display', serif;
    color: #1a1a1a;
    font-size: 22px;
    flex-shrink: 0;
    margin-left: 12px;
    font-weight: 300;
    transition: transform 0.3s;
}

.faq details[open] summary::after {
    transform: rotate(45deg);
}

.faq summary:hover {
    color: #1a1a1a;
    padding-left: 8px;
}

.faq .faq-answer {
    padding: 0 0 16px 0;
    color: #595959;
    font-size: 13px;
    line-height: 1.8;
    letter-spacing: 0;
    font-weight: 300;
}

/* Demo showcase — list layout */
.demo {
    margin-top: 40px;
    padding: 0;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

.demo__header {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 24px;
}

.demo__header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 32px;
    font-weight: 900;
    letter-spacing: -0.03em;
    margin: 0;
    color: #1a1a1a;
}

.demo__header span {
    font-family: 'DM Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #767676;
}

.demo__title {
    display: none;
}

.demo__slider {
    display: flex;
    flex-direction: column;
}

.demo__slider::-webkit-scrollbar { display: none; }

.demo__card {
    display: grid;
    grid-template-columns: 40px 1fr 120px 44px;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(0,0,0,0.07);
    cursor: pointer;
    transition: all 0.3s;
}

.demo__card:hover {
    background: rgba(0,0,0,0.02);
}

.demo__player {
    display: contents;
}

.demo__canvas {
    width: 100%;
    height: 48px;
    display: block;
}

.demo__play {
    width: 38px;
    height: 38px;
    background: transparent;
    border: 1.5px solid rgba(0,0,0,0.12);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    padding: 0;
}

.demo__play:hover {
    border-color: #1a1a1a;
    background: transparent;
    transform: none;
}

.demo__play svg {
    width: 14px;
    height: 14px;
    fill: #1a1a1a;
    margin-left: 2px;
    transition: fill 0.2s;
}

.demo__play:hover svg { fill: #1a1a1a; }

.demo__play.playing {
    border-color: #1a1a1a;
    border-width: 2px;
    background: #1a1a1a;
}
.demo__play.playing svg {
    margin-left: 0;
    fill: #F5F0EB;
}

.demo__info {
    overflow: hidden;
}

.demo__tag {
    font-family: 'DM Mono', monospace;
    font-size: 8px;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #767676;
}

.demo__prompt {
    margin: 0;
    font-family: 'Playfair Display', serif;
    font-size: 15px;
    font-style: italic;
    color: #1a1a1a;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.demo__prompt::before { content: '\201C'; color: #767676; }
.demo__prompt::after { content: '\201D'; color: #767676; }

.demo__duration {
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    color: #767676;
    text-align: right;
}

.demo__dots {
    display: none;
}

.demo__dot {
    display: none;
}

/* Browse section */
.browse {
    margin-top: 60px;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

.browse--page {
    max-width: 800px;
}

.browse--page .browse__header h2 {
    font-size: 42px;
}

.browse__header {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 24px;
}

.browse__header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 32px;
    font-weight: 900;
    letter-spacing: -0.03em;
    margin: 0;
    color: #1a1a1a;
}

.browse__header span {
    font-family: 'DM Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #767676;
}

.browse__filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.browse__filter {
    font-family: 'DM Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 6px 14px;
    border: 1px solid rgba(0,0,0,0.12);
    background: transparent;
    color: #555;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.browse__filter:hover,
.browse__filter.active {
    background: #1a1a1a;
    color: #F5F0EB;
    border-color: #1a1a1a;
}

.browse__grid {
    display: flex;
    flex-direction: column;
}

.browse__card {
    display: grid;
    grid-template-columns: 40px 1fr 120px 44px;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(0,0,0,0.07);
    cursor: pointer;
    transition: all 0.3s;
}

.browse__card:hover {
    background: rgba(0,0,0,0.02);
}

.browse__canvas {
    width: 100%;
    height: 48px;
    display: block;
}

.browse__play {
    width: 38px;
    height: 38px;
    background: transparent;
    border: 1.5px solid rgba(0,0,0,0.12);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    padding: 0;
}

.browse__play:hover {
    border-color: #1a1a1a;
}

.browse__play svg {
    width: 14px;
    height: 14px;
    fill: #1a1a1a;
    margin-left: 2px;
    transition: fill 0.2s;
}

.browse__play.playing {
    border-color: #1a1a1a;
    border-width: 2px;
    background: #1a1a1a;
}

.browse__play.playing svg {
    margin-left: 0;
    fill: #F5F0EB;
}

.browse__info {
    overflow: hidden;
}

.browse__tag {
    font-family: 'DM Mono', monospace;
    font-size: 8px;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #767676;
}

.browse__prompt {
    margin: 0;
    font-family: 'Playfair Display', serif;
    font-size: 15px;
    font-style: italic;
    color: #1a1a1a;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none;
    display: block;
}

.browse__prompt::before { content: '\201C'; color: #767676; }
.browse__prompt::after { content: '\201D'; color: #767676; }

.browse__duration {
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    color: #767676;
    text-align: right;
}

.browse__more {
    display: block;
    margin: 24px auto 0;
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 10px 28px;
    border: 1px solid rgba(0,0,0,0.12);
    background: transparent;
    color: #1a1a1a;
    cursor: pointer;
    transition: all 0.2s;
}

.browse__more:hover {
    background: #1a1a1a;
    color: #F5F0EB;
    border-color: #1a1a1a;
}

.browse__link {
    display: block;
    text-align: center;
    margin-top: 16px;
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.1em;
    color: #555;
    text-decoration: none;
}

.browse__link:hover {
    color: #1a1a1a;
}

.browse__empty {
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    color: #767676;
    text-align: center;
    padding: 40px 0;
}

.browse__pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 32px;
}

.browse__page-btn {
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.1em;
    color: #1a1a1a;
    text-decoration: none;
}

.browse__page-btn:hover {
    text-decoration: underline;
}

.browse__page-info {
    font-family: 'DM Mono', monospace;
    font-size: 10px;
    color: #767676;
    letter-spacing: 0.1em;
}

/* Sample detail page */
.sample-detail {
    margin-top: 40px;
}

.sample-detail__back {
    margin-bottom: 24px;
}

.sample-detail__back a {
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.1em;
    color: #555;
    text-decoration: none;
}

.sample-detail__back a:hover {
    color: #1a1a1a;
}

.sample-detail__title {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    font-weight: 700;
    font-style: italic;
    color: #1a1a1a;
    margin: 0 0 16px;
    line-height: 1.3;
}

.sample-detail__meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.sample-detail__tag {
    font-family: 'DM Mono', monospace;
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #F5F0EB;
    background: #1a1a1a;
    padding: 4px 10px;
}

.sample-detail__meta-item {
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    color: #555;
    letter-spacing: 0.05em;
}

.sample-detail__player {
    margin-bottom: 24px;
}

.sample-detail__actions {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
}

.sample-detail__actions .btn-generate,
.sample-detail__actions .btn-refine {
    flex: 1;
    width: auto;
    padding: 14px 24px;
    text-align: center;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sample-detail__tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 24px;
}

.sample-detail__tag-pill {
    font-family: 'DM Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.1em;
    padding: 4px 12px;
    border: 1px solid rgba(0,0,0,0.1);
    color: #555;
}

/* 404 page */
.error-page {
    text-align: center;
    padding: 80px 0;
}

.error-page__title {
    font-family: 'Playfair Display', serif;
    font-size: 72px;
    font-weight: 900;
    color: #8b8580;
    margin: 0 0 16px;
}

.error-page__text {
    font-family: 'DM Sans', sans-serif;
    font-size: 16px;
    color: #555;
    margin: 0 0 32px;
}

/* Footer */
.footer-wrap {
    margin-top: 60px;
    padding: 32px 0;
    border-top: 1px solid rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.version {
    font-family: 'DM Mono', monospace;
    color: #767676;
    font-size: 9px;
    letter-spacing: 0.1em;
}

.footer-tagline {
    font-family: 'Playfair Display', serif;
    font-size: 13px;
    font-style: italic;
    color: #767676;
}

.footer-credit {
    font-family: 'DM Mono', monospace;
    color: #767676;
    font-size: 9px;
    letter-spacing: 0.1em;
}

.footer-credit a {
    color: #595959;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-credit a:hover {
    color: #1a1a1a;
}

/* Auth Modal */
.auth-modal {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 200;
    justify-content: center;
    align-items: center;
}

.auth-modal.visible { display: flex; }

.auth-modal__backdrop {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(245, 240, 235, 0.85);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.auth-modal__card {
    position: relative;
    background: #FFFFFF;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 0;
    padding: 40px;
    max-width: 420px;
    width: 90%;
    text-align: center;
}

.auth-modal__card h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5em;
    margin-bottom: 8px;
    color: #1a1a1a;
}

.auth-modal__subtitle {
    color: #595959;
    font-size: 0.9em;
    margin-bottom: 24px;
}

.auth-input {
    width: 100%;
    padding: 14px 15px;
    background: #FFFFFF;
    border: 1px solid #E0D9D1;
    color: #1a1a1a;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    border-radius: 0;
    margin-bottom: 12px;
    transition: border-color 0.3s;
}

.auth-input:focus {
    outline: none;
    border-color: #1a1a1a;
}

.auth-btn {
    width: 100%;
    padding: 14px;
    background: #1a1a1a;
    color: #F5F0EB;
    border: none;
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 0;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.auth-btn:hover { background: #333; }
.auth-btn:disabled { opacity: 0.3; cursor: not-allowed; }

.auth-modal__status {
    color: #595959;
    font-size: 0.85em;
    margin-top: 16px;
    min-height: 1.2em;
}

.auth-modal__note {
    color: #767676;
    font-size: 0.75em;
    margin-top: 12px;
}

/* Refine auth prompt (inline, just a button) */
.refine-auth {
    text-align: center;
    padding: 16px 0;
}

.refine-auth__text {
    color: #595959;
    font-size: 0.85em;
    margin-bottom: 12px;
}

.btn-login-inline {
    background: none;
    border: 1px solid #E0D9D1;
    color: #1a1a1a;
    padding: 10px 24px;
    font-family: 'DM Mono', monospace;
    font-size: 10px;
    cursor: pointer;
    border-radius: 0;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.btn-login-inline:hover {
    color: #F5F0EB;
    background: #1a1a1a;
    border-color: #1a1a1a;
}

/* User bar (always visible) */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.user-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.8em;
    color: #595959;
}

.btn-login {
    background: none;
    border: 1px solid #1a1a1a;
    color: #1a1a1a;
    padding: 6px 16px;
    font-family: 'DM Mono', monospace;
    font-size: 10px;
    cursor: pointer;
    border-radius: 0;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.btn-login:hover {
    color: #F5F0EB;
    background: #1a1a1a;
}

.btn-logout {
    background: none;
    border: 1px solid #1a1a1a;
    color: #1a1a1a;
    padding: 6px 16px;
    font-family: 'DM Mono', monospace;
    font-size: 10px;
    cursor: pointer;
    border-radius: 0;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.btn-logout:hover {
    color: #F5F0EB;
    background: #1a1a1a;
}

/* Responsive */
@media (min-width: 901px) {
    body { zoom: 1.1; }
    .input-section { box-shadow: 6px 6px 0 #C8C0B8; }
}

@media (max-width: 768px) {
    body {
        padding: 24px 16px;
    }

    h1 {
        font-size: 1.8em;
        justify-content: center;
    }

    .hero {
        margin: 24px 0 20px;
    }

    .hero__headline {
        font-size: clamp(32px, 7vw, 48px);
    }

    .tab-content.active {
        padding: 20px;
    }

    .examples {
        grid-template-columns: repeat(2, 1fr);
    }

    .button-group {
        flex-direction: column;
    }

    .demo__card {
        grid-template-columns: 40px 1fr 44px;
    }

    .demo__canvas {
        display: none;
    }

    .browse__card {
        grid-template-columns: 40px 1fr 44px;
    }

    .browse__canvas {
        display: none;
    }

    .browse__prompt {
        white-space: normal;
    }

    .footer-wrap {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}
