/* Green INK V2.1 — unified electric-green accents */

:root {
    color-scheme: dark;
    --ink: #15121c;
    --white: #f8f6fc;
    --muted: #c9c5d3;
    --edge: #ffffff35;
    --electric-green: #39ff14;
    --accent: var(--electric-green);
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

body {
    margin: 0;
    color: var(--white);
    font-family: system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
    background: #15121c;
    min-height: 100vh;
    isolation: isolate;
}

/* The two random neon colors are supplied by gradient.php. */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background: linear-gradient(to bottom, var(--gradient-top, #8f123e), var(--gradient-bottom, #781a0c));
    pointer-events: none;
}

main {
    max-width: 720px;
    margin: auto;
    padding: 24px max(16px,env(safe-area-inset-right)) max(25px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));
}

.hero {
    padding: 22px 3px 28px;
}

.brand {
    font-size: 11px;
    letter-spacing: .23em;
    font-weight: 800;
    max-width: 100%;
    min-width: 0;
}

/* Keep the original logo proportions and prevent mobile overflow. */
.brand img {
    display: block;
    max-width: 100%;
    height: auto;
}

.hero h1 {
    font-size: clamp(42px,11vw,77px);
    letter-spacing: -.085em;
    line-height: .95;
    margin: 12px 0 14px;
    font-weight: 950;
}

.hero h1 span {
    color: var(--accent);
}

sup {
    font-size: 12px;
    vertical-align: top;
    letter-spacing: 0;
    margin-left: 8px;
}

.hero p {
    margin: 0 0 14px;
    font-size: 17px;
}

.privacy {
    font-size: 11px;
    color: var(--accent);
    font-weight: 700;
}

.step {
    border: 1px solid var(--edge);
    border-top: 3px solid var(--accent);
    background: #17141eea;
    border-radius: 18px;
    padding: 18px;
    margin-bottom: 16px;
    box-shadow: 0 8px 30px #08051038;
}

.step-head {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 18px;
}

.number {
    background: var(--accent);
    color: #17121c;
    padding: 7px 9px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 900;
    line-height: 1.1;
}

.step h2 {
    font-size: 20px;
    margin: 0 0 4px;
    letter-spacing: -.04em;
}

.step p {
    color: var(--muted);
    margin: 0;
    font-size: 13px;
    line-height: 1.45;
}

.file-control {
    display: block;
    position: relative;
    border: 1px dashed var(--accent);
    border-radius: 10px;
    padding: 14px;
    text-align: center;
    color: var(--accent);
    font-weight: 800;
    cursor: pointer;
}

.file-control input {
    position: absolute;
    inset: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-control:focus-within {
    outline: 2px solid white;
}

.step .status {
    margin-top: 12px;
    overflow-wrap: anywhere;
}

.view {
    position: relative;
    background: #0c0b10;
    border-radius: 11px;
    overflow: hidden;
    min-height: 200px;
    display: grid;
    place-items: center;
    border: 1px solid #ffffff21;
}

.view canvas {
    display: block;
    width: 100%;
    height: auto;
    max-height: 62vh;
    object-fit: contain;
    touch-action: manipulation;
}

.view:not(.active) canvas {
    height: 240px;
}

.placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #b2acbf;
    font-size: 11px;
    letter-spacing: .12em;
    pointer-events: none;
}

.target {
    font-size: 50px;
    color: var(--accent);
    line-height: 1;
}

.placeholder small {
    letter-spacing: 0;
}

.view-badge,.record-badge {
    position: absolute;
    left: 10px;
    top: 10px;
    background: #15121cce;
    padding: 7px 9px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 800;
    pointer-events: none;
}

.record-badge {
    left: auto;
    right: 10px;
    color: #ff7793;
}

.buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.buttons>* {
    flex: 1 1 auto;
}

button,.button {
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    border: 1px solid #ffffff36;
    border-radius: 9px;
    padding: 12px;
    color: var(--white);
    background: #ffffff0b;
    min-height: 44px;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

button.primary,.button.primary {
    background: var(--accent);
    color: #17121c;
    border-color: var(--accent);
}

button:disabled,.disabled {
    opacity: .4;
    cursor: not-allowed;
    pointer-events: none;
}

button:focus-visible,a:focus-visible,summary:focus-visible,input:focus-visible {
    outline: 2px solid white;
    outline-offset: 3px;
}

.audio {
    padding: 13px 0;
    border-bottom: 1px solid var(--edge);
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.audio label {
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.audio input {
    width: 20px;
    height: 20px;
    accent-color: var(--accent);
}

.audio span,.sample small {
    font-size: 12px;
    color: var(--muted);
}

.sample {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 0;
    border-bottom: 1px solid var(--edge);
}

.sample div {
    flex: 1;
}

.sample strong,.sample small {
    display: block;
}

.sample strong {
    font-size: 14px;
}

.swatch {
    width: 32px;
    height: 32px;
    flex: none;
    background: #25ad45;
    border: 1px solid white;
    border-radius: 50%;
}

.sample button {
    padding: 8px;
    min-height: 36px;
}

details {
    padding-top: 14px;
}

summary {
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
}

.sliders {
    display: grid;
    gap: 9px;
    margin-top: 14px;
}

.sliders label {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 5px;
    font-size: 12px;
}

.sliders input {
    grid-column: 1/-1;
    width: 100%;
    accent-color: var(--accent);
    margin: 0;
    min-height: 24px;
}

.sliders output {
    font-variant-numeric: tabular-nums;
    color: var(--muted);
}

#record:not(:disabled) {
    background: #ff4d77;
    color: #19101a;
    border-color: #ff4d77;
}

.dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    background: currentColor;
    border-radius: 50%;
    margin-right: 5px;
}

#result {
    width: 100%;
    max-height: 58vh;
    background: #0c0b10;
    border-radius: 10px;
}

footer {
    font-size: 10px;
    letter-spacing: .1em;
    font-weight: 800;
    color: #e7dfec;
    display: flex;
    gap: 6px;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 10px 2px;
}

footer span {
    font-weight: 400;
    letter-spacing: 0;
}

@media (min-width:600px) {
    .step {
        padding: 24px;
    }

    .sliders {
        grid-template-columns: 1fr 1fr;
        column-gap: 20px;
    }
}

/* Three fixed-position controls, immediately below the live preview. */

.camera-controls {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 6px;
}

.camera-controls button {
    min-width: 0;
    min-height: 48px;
    padding: 9px 5px;
    line-height: 1.2;
    overflow-wrap: normal;
}

.camera-controls #record .dot {
    margin-right: 4px;
}

.camera-controls #record.recording .dot {
    border-radius: 2px;
}

.camera-controls #record.recording:not(:disabled) {
    background: #ff4d77;
    color: #19101a;
    border-color: #ff4d77;
}

@media (max-width:380px) {
    .camera-controls button {
        font-size: 12px;
        padding-inline: 3px;
    }

    .camera-controls #record .dot {
        width: 7px;
        height: 7px;
        margin-right: 3px;
    }
}
