:root {
    --accent: #e8c86c;
    --page-bg: #090c09;
    --panel: #10150f;
    --line: #334032;
    --text: #f2eee3;
    --muted: #aaa89f;
}

* { box-sizing: border-box; }

.justyou-entry-page,
.justyou-gallery-page,
.justyou-gallery-document {
    min-height: 100%;
    margin: 0;
    color: var(--text);
    background: var(--page-bg);
    font-family: Arial, Helvetica, sans-serif;
}

.justyou-entry-page { overflow-y: auto; }

.justyou-entry-shell {
    display: grid;
    width: min(calc(100% - 2rem), 72rem);
    min-height: 100vh;
    margin: 0 auto;
    padding: 1rem 0 3rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    align-content: center;
}

.justyou-entry-nav {
    display: flex;
    grid-column: 1 / -1;
    gap: 1rem;
    justify-content: space-between;
}

.justyou-entry-nav a { color: var(--accent); text-decoration: none; }

.justyou-story-panel,
.justyou-upload-panel {
    min-width: 0;
    padding: clamp(1rem, 3vw, 2rem);
    border: 1px solid var(--line);
    background: var(--panel);
}

.justyou-story-panel h1,
.justyou-upload-panel h2 {
    margin: 0 0 1rem;
    color: var(--accent);
}

.justyou-story-panel h1 { font-size: clamp(2.1rem, 5vw, 4rem); }
.justyou-story-panel p,
.justyou-upload-panel p { line-height: 1.55; }
.justyou-eyebrow { margin: 0 0 0.5rem; color: var(--muted); font-size: 0.78rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.justyou-main-command { display: inline-block; margin-top: 0.7rem; text-decoration: none; }

.justyou-upload-form { display: grid; gap: 0.9rem; }
.justyou-upload-form label { display: grid; gap: 0.35rem; }
.justyou-upload-form input[type="text"],
.justyou-upload-form input[type="file"] {
    width: 100%;
    min-width: 0;
    padding: 0.6rem;
    border: 1px solid var(--line);
    border-radius: 0;
    color: var(--text);
    background: #0b0f0b;
}
.justyou-upload-form input[type="range"] { width: 100%; accent-color: var(--accent); }
.justyou-honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; }
.justyou-message { padding: 0.7rem; border: 1px solid var(--line); }
.justyou-message.is-success { color: #d9f3ce; border-color: #55704a; background: #172016; }
.justyou-message.is-error { color: #ffd8cf; border-color: #7a4d43; background: #2a1915; }

.justyou-crop { display: grid; grid-template-columns: minmax(0, 1fr) minmax(12rem, 0.7fr); gap: 0.9rem; align-items: center; }
.justyou-crop[hidden] { display: none; }
.justyou-crop figure { min-width: 0; margin: 0; }
.justyou-crop figcaption { margin-bottom: 0.35rem; color: var(--muted); font-size: 0.78rem; }
.justyou-crop img { display: block; width: 100%; aspect-ratio: 16 / 9; border: 1px solid var(--line); background: #070907; object-fit: cover; }
.justyou-crop-controls { display: grid; gap: 0.7rem; }

.justyou-gallery-page { overflow: hidden; touch-action: none; user-select: none; }
.justyou-gallery-page::after {
    position: fixed;
    z-index: 10;
    inset: 0;
    content: "";
    pointer-events: none;
    backdrop-filter: brightness(1.15);
    -webkit-backdrop-filter: brightness(1.15);
}
.justyou-space-grid { position: fixed; inset: 0; overflow: hidden; background: radial-gradient(circle at 50% 50%, #172218 0, #0b100c 42%, #070907 100%); cursor: default; touch-action: none; }
.justyou-space-grid::before { position: absolute; inset: 0; content: ""; pointer-events: none; opacity: 0.23; background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px); background-size: 32px 32px; }
.justyou-space-grid.is-panning { cursor: grabbing; }
.justyou-tile {
    position: absolute;
    top: 50%;
    left: 50%;
    display: block;
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.24);
    border-radius: 0;
    background: #0b0d0a;
    box-shadow: 0 12px 35px rgba(0,0,0,.42);
    cursor: zoom-in;
    transform-origin: 0 0;
    will-change: transform;
}
.justyou-tile.is-central { z-index: 2; border: 3px solid var(--accent); box-shadow: 0 0 0 1px #191c15, 0 18px 50px rgba(0,0,0,.58); }
.justyou-tile img { display: block; width: 100%; height: 100%; object-fit: cover; }
.justyou-gallery-hint { position: fixed; z-index: 20; top: 0.7rem; left: 50%; transform: translateX(-50%); padding: 0.4rem 0.6rem; color: var(--muted); background: rgba(5,7,5,.8); font-size: 0.72rem; text-align: center; pointer-events: none; }
.justyou-hint-touch { display: none; }
.justyou-gallery-back { position: fixed; z-index: 30; bottom: 0.7rem; left: 0.7rem; text-decoration: none; }
.justyou-empty { display: grid; min-height: 100vh; place-items: center; padding: 2rem; color: var(--muted); text-align: center; }

.justyou-photo-modal {
    position: relative;
    width: min(calc(100% - 1rem), 76rem);
    max-width: none;
    max-height: calc(100dvh - 1rem);
    padding: 0;
    border: 1px solid var(--line);
    color: var(--text);
    background: #080a08;
}
.justyou-photo-modal::after {
    position: absolute;
    z-index: 1;
    inset: 0;
    content: "";
    pointer-events: none;
    backdrop-filter: brightness(1.15);
    -webkit-backdrop-filter: brightness(1.15);
}
.justyou-photo-modal::backdrop { background: rgba(0,0,0,.9); }
.justyou-photo-modal > button { position: absolute; z-index: 2; top: 0.65rem; right: 0.65rem; width: 2.4rem; height: 2.4rem; border: 1px solid var(--accent); color: var(--accent); background: rgba(8,10,8,.9); cursor: pointer; font-size: 1.4rem; }
.justyou-photo-modal figure { display: grid; margin: 0; place-items: center; }
.justyou-photo-modal img { display: block; max-width: 100%; max-height: calc(100dvh - 1rem); object-fit: contain; }
.justyou-photo-modal figcaption { position: absolute; z-index: 2; right: 0; bottom: 0; left: 0; padding: 2rem 1rem 0.75rem; background: linear-gradient(transparent, rgba(0,0,0,.85)); text-align: center; }
.justyou-photo-modal figcaption[hidden] { display: none; }

@media (max-width: 760px) {
    .justyou-entry-shell { grid-template-columns: 1fr; align-content: start; }
    .justyou-story-panel,
    .justyou-upload-panel { grid-column: 1; }
    .justyou-crop { grid-template-columns: 1fr; }
}

@media (hover: none), (pointer: coarse) {
    .justyou-hint-mouse { display: none; }
    .justyou-hint-touch { display: inline; }
}

@media (prefers-reduced-motion: reduce) {
    .justyou-tile { will-change: auto; }
}
