:root {
    --bg: #0e1410;
    --bg-elevated: #161e18;
    --bg-panel: #1a241c;
    --bg-soft: #222c24;
    --border: rgba(180, 210, 170, 0.12);
    --text: #e7f0e4;
    --text-muted: #9aaf9a;
    --accent: #7dcb5c;
    --accent-strong: #9fe07a;
    --accent-dim: rgba(125, 203, 92, 0.15);
    --danger: #e05a4f;
    --nether: #e06a55;
    --end: #b48cff;
    --overworld: #7dcb5c;
    --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
    --radius: 14px;
    --font: "Sora", system-ui, sans-serif;
    --mono: "IBM Plex Mono", ui-monospace, monospace;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font);
    color: var(--text);
    background:
        radial-gradient(1200px 600px at 10% -10%, rgba(125, 203, 92, 0.12), transparent 55%),
        radial-gradient(900px 500px at 90% 0%, rgba(90, 140, 80, 0.08), transparent 50%),
        linear-gradient(180deg, #101710 0%, var(--bg) 40%, #0b100d 100%);
    background-attachment: fixed;
}

a {
    color: var(--accent-strong);
    text-decoration: none;
}

a:hover {
    color: #c6f0ad;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: min(1120px, calc(100% - 2rem));
    margin: 0 auto;
}

.container.narrow {
    width: min(720px, calc(100% - 2rem));
}

/* Header */
.main-header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(14px);
    background: rgba(14, 20, 16, 0.82);
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 68px;
    gap: 1rem;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    color: var(--text);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.logo:hover {
    color: var(--text);
}

.logo-mark {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    object-fit: contain;
    flex-shrink: 0;
    box-shadow: 0 0 20px rgba(125, 203, 92, 0.2);
}

.logo-text {
    font-size: 1.15rem;
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
    padding: 0;
}

.nav-links a {
    display: inline-block;
    padding: 0.55rem 0.8rem;
    border-radius: 999px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text);
    background: var(--accent-dim);
}

.nav-cta {
    background: var(--accent) !important;
    color: #0e1410 !important;
    font-weight: 600;
}

.nav-user {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 0.4rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.profile-letter {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    color: var(--accent-strong);
    font-weight: 600;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: 0;
    padding: 0.4rem;
    cursor: pointer;
}

.hamburger-line {
    width: 22px;
    height: 2px;
    background: var(--text);
}

/* Hero */
.hero {
    position: relative;
    padding: 5.5rem 0 4rem;
    overflow: hidden;
}

.hero-glow {
    position: absolute;
    inset: 10% 15% auto;
    height: 280px;
    background: radial-gradient(circle, rgba(125, 203, 92, 0.18), transparent 70%);
    filter: blur(10px);
    pointer-events: none;
    animation: pulseGlow 6s ease-in-out infinite;
}

.hero-inner {
    position: relative;
    text-align: center;
}

.eyebrow {
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.75rem;
    margin: 0 0 1rem;
}

.hero-brand {
    margin: 0;
    font-size: clamp(3rem, 8vw, 5.5rem);
    letter-spacing: -0.04em;
    line-height: 0.95;
    background: linear-gradient(180deg, #f3ffe9 0%, #9fe07a 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: riseIn 0.8s ease both;
}

.hero-lead {
    max-width: 34rem;
    margin: 1.25rem auto 2rem;
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.6;
    animation: riseIn 0.9s ease 0.08s both;
}

.hero-cta {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    animation: riseIn 1s ease 0.14s both;
}

.feature-strip {
    padding: 1rem 0 4rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.feature-grid article {
    background: rgba(26, 36, 28, 0.8);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.4rem;
}

.feature-grid h2 {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
}

.feature-grid p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.55;
    font-size: 0.95rem;
}

/* App pages */
.app-main,
.auth-page {
    padding: 2rem 0 4rem;
    min-height: calc(100vh - 140px);
}

.page-header {
    margin-bottom: 1.5rem;
}

.page-header h1 {
    margin: 0;
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    letter-spacing: -0.03em;
}

.page-subtitle {
    margin: 0.45rem 0 0;
    color: var(--text-muted);
}

.feed-title {
    position: relative;
    display: inline-block;
    max-width: 100%;
}

.feed-title-summary {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    list-style: none;
    cursor: pointer;
    user-select: none;
    margin: 0;
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
    color: var(--text);
}

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

.feed-title-summary::marker {
    content: "";
}

.feed-title-label {
    min-width: 0;
}

.feed-title-chevron {
    flex: 0 0 auto;
    width: 0.42em;
    height: 0.42em;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-18%) rotate(45deg);
    opacity: 0.55;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.feed-title[open] .feed-title-chevron {
    transform: translateY(10%) rotate(225deg);
    opacity: 0.85;
}

.feed-title-summary:hover .feed-title-chevron,
.feed-title-summary:focus-visible .feed-title-chevron {
    opacity: 1;
}

.feed-title-summary:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
    border-radius: 4px;
}

.feed-title-menu {
    position: absolute;
    top: calc(100% + 0.35rem);
    left: 0;
    z-index: 40;
    min-width: min(100%, 16rem);
    padding: 0.35rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-panel);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.35);
    display: grid;
    gap: 0.15rem;
}

.feed-title-option {
    display: block;
    padding: 0.55rem 0.75rem;
    border-radius: 7px;
    color: var(--text);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: -0.01em;
}

.feed-title-option:hover,
.feed-title-option:focus-visible {
    background: rgba(125, 203, 92, 0.1);
    color: var(--accent-strong);
    outline: none;
}

.feed-title-option.is-active {
    background: rgba(125, 203, 92, 0.14);
    color: var(--accent-strong);
}

.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.filter-form {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.filter-form-row {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: end;
    gap: 0.75rem 1rem;
}

.filter-form-row label {
    display: grid;
    gap: 0.35rem;
    flex: 0 1 auto;
    width: auto;
    min-width: 11rem;
}

.filter-form-row select {
    width: auto;
    min-width: 12rem;
}

.filter-form label,
.stack-form label span,
.auth-form label span {
    color: var(--text-muted);
    font-size: 0.85rem;
}

select,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="datetime-local"],
textarea {
    width: 100%;
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.75rem 0.9rem;
    font: inherit;
}

select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 2.4rem;
    background-color: var(--bg);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1.2 1.5L6 6.3L10.8 1.5' stroke='%2399a89a' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.9rem center;
    background-size: 0.8rem 0.55rem;
    cursor: pointer;
}

input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

select:focus,
input:focus,
textarea:focus {
    outline: none;
    border-color: rgba(125, 203, 92, 0.55);
    box-shadow: 0 0 0 3px rgba(125, 203, 92, 0.12);
}

textarea {
    resize: vertical;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 0.7rem 1.15rem;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}


.btn-primary {
    background: linear-gradient(180deg, var(--accent-strong), var(--accent));
    color: #102010;
}

.btn-secondary {
    background: var(--bg-soft);
    border-color: var(--border);
    color: var(--text);
}

.btn-ghost {
    background: transparent;
    border-color: var(--border);
    color: var(--text);
}

.btn-danger {
    background: rgba(224, 90, 79, 0.15);
    border-color: rgba(224, 90, 79, 0.35);
    color: #ffb1aa;
}

.btn-sm {
    padding: 0.35rem 0.7rem;
    font-size: 0.8rem;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.btn-google {
    background: #fff;
    color: #222;
}

.btn-block {
    width: 100%;
}

.btn-lg {
    padding: 0.9rem 1.4rem;
}

.panel {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.35rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.25rem;
}

.panel h2 {
    margin: 0 0 1rem;
    font-size: 1.15rem;
}

.stack-form {
    display: grid;
    gap: 0.9rem;
}

.stack-form label,
.auth-form label {
    display: grid;
    gap: 0.35rem;
}

.stack-form label[hidden],
.auth-form label[hidden] {
    display: none !important;
}

.stack-form em {
    font-style: normal;
    opacity: 0.7;
}

/* Feed */
.shot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}

.shot-card {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease;
}


.shot-media-wrap {
    position: relative;
}

.shot-media-wrap > .shot-icon-btn,
.shot-media-wrap > .shot-delete-form {
    z-index: 3;
}

.shot-gallery {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #0a0f0c;
    overflow: hidden;
}

.shot-media {
    display: none;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    overflow: hidden;
    cursor: zoom-in;
}

.shot-media.is-active {
    display: block;
}

.shot-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.shot-gallery-nav {
    position: absolute;
    top: 50%;
    z-index: 2;
    transform: translateY(-50%);
    width: 2rem;
    height: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: rgba(10, 15, 12, 0.72);
    color: #f2f7f0;
    cursor: pointer;
    line-height: 1;
    font-size: 1.25rem;
    backdrop-filter: blur(6px);
}

.shot-gallery-prev { left: 0.45rem; }
.shot-gallery-next { right: 0.45rem; }

.shot-gallery-count {
    position: absolute;
    left: 50%;
    bottom: 0.45rem;
    z-index: 2;
    transform: translateX(-50%);
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    background: rgba(10, 15, 12, 0.72);
    color: #f2f7f0;
    font-size: 0.75rem;
    font-family: "IBM Plex Mono", monospace;
    pointer-events: none;
}

.shot-icon-btn {
    position: absolute;
    top: 0.55rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: rgba(10, 15, 12, 0.72);
    color: #f2f7f0;
    cursor: pointer;
    backdrop-filter: blur(6px);
    transition: background 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}


.shot-icon-edit {
    left: 0.55rem;
}

.shot-icon-add {
    left: 2.85rem;
    text-decoration: none;
}

.shot-icon-edit:hover,
.shot-icon-edit.is-active,
.shot-icon-add:hover {
    border-color: rgba(125, 203, 92, 0.45);
    color: var(--accent-strong);
}

.shot-delete-form {
    position: absolute;
    top: 0.55rem;
    right: 0.55rem;
    z-index: 2;
    margin: 0;
}

.shot-delete-form .shot-icon-btn {
    position: static;
}

.shot-icon-delete:hover {
    border-color: rgba(224, 90, 79, 0.5);
    color: #ffb1aa;
    background: rgba(60, 16, 14, 0.85);
}

.shot-body {
    padding: 0.95rem 1rem 1.1rem;
    display: grid;
    gap: 0.45rem;
}

.shot-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0;
    padding: 0;
}

.dim-tag,
.world-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.2rem 0.55rem;
    font-size: 0.75rem;
    font-weight: 600;
    margin: 0;
}

.dim-overworld {
    background: rgba(125, 203, 92, 0.16);
    color: var(--overworld);
}

.dim-nether {
    background: rgba(224, 106, 85, 0.16);
    color: var(--nether);
}

.dim-end {
    background: rgba(180, 140, 255, 0.16);
    color: var(--end);
}

.world-chip {
    background: var(--bg-soft);
    color: var(--text-muted);
}

.coords {
    display: block;
    width: fit-content;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0;
    font-family: var(--mono);
    font-size: 0.82rem;
    color: #d7ecd0;
    background: rgba(0, 0, 0, 0.25);
    padding: 0.4rem 0.55rem;
    border-radius: 8px;
}

.shot-desc,
.shot-view time {
    margin: 0;
    padding: 0 0.55rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    box-sizing: border-box;
}

.shot-desc {
    color: var(--text);
}

.shot-view {
    display: grid;
    gap: 0.45rem;
    justify-items: start;
}

.shot-view[hidden] {
    display: none !important;
}

.shot-edit-form {
    display: grid;
    gap: 0.55rem;
}

.shot-edit-form[hidden] {
    display: none !important;
}

.shot-edit-form label {
    display: grid;
    gap: 0.3rem;
}

.shot-edit-form label > span {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.shot-edit-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
}

.shot-edit-coords {
    gap: 0.45rem;
}

.shot-edit-form select,
.shot-edit-form textarea,
.shot-edit-form input[type="number"],
.shot-edit-form input[type="datetime-local"] {
    width: 100%;
    min-width: 0;
    padding: 0.55rem 0.65rem;
    font-size: 0.9rem;
}

.shot-edit-form select {
    font-size: 0.78rem;
    padding: 0.45rem 2rem 0.45rem 0.5rem;
    background-position: right 0.65rem center;
    background-size: 0.65rem;
}

.shot-edit-form textarea {
    resize: vertical;
}

.shot-edit-actions {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-top: 0.15rem;
}

.world-edit-form textarea,
.world-edit-form input[type="text"] {
    width: 100%;
    resize: vertical;
}

/* Worlds */
.world-list {
    display: grid;
    gap: 1rem;
}

.world-card {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.2rem;
}

.world-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.world-head h3 {
    margin: 0 0 0.3rem;
}

.world-public-badge {
    display: inline-flex;
    align-items: center;
    margin-left: 0.35rem;
    padding: 0.12rem 0.45rem;
    border-radius: 999px;
    background: rgba(125, 203, 92, 0.16);
    color: var(--accent-strong);
    font-size: 0.72rem;
    font-weight: 600;
    vertical-align: middle;
}

.world-head p,
.muted,
.hint {
    color: var(--text-muted);
    margin: 0;
}

.world-stats {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.world-shot-count {
    margin-right: 0.25rem;
}

.world-stats .btn {
    white-space: nowrap;
    min-height: 2.15rem;
    padding: 0.4rem 0.9rem;
    box-sizing: border-box;
    line-height: 1.2;
}

.ip-block {
    margin-top: 1.35rem;
}

.ip-block + .ip-block {
    margin-top: 1.6rem;
    padding-top: 1.35rem;
    border-top: 1px solid var(--border);
}

.ip-block h4 {
    margin: 0 0 0.65rem;
    font-size: 0.95rem;
}

.ip-list {
    list-style: none;
    padding: 0;
    margin: 0 0 0.85rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.ip-list code,
.token-box code,
.code-hint code {
    font-family: var(--mono);
    font-size: 0.85rem;
}

.ip-list code {
    display: inline-block;
    padding: 0.3rem 0.55rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.chip-item {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    max-width: 100%;
    padding: 0.15rem 0.2rem 0.15rem 0.15rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.chip-item code {
    border: 0;
    background: transparent;
    padding: 0.2rem 0.4rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chip-remove-form {
    margin: 0;
    display: inline-flex;
}

.chip-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.45rem;
    height: 1.45rem;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1;
    cursor: pointer;
}

.chip-remove:hover,
.chip-remove:focus-visible {
    color: #ffb1aa;
    background: rgba(224, 90, 79, 0.16);
    outline: none;
}

.inline-form {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.inline-form input {
    flex: 1 1 220px;
}

.world-edit-panel {
    margin: 0.85rem 0 0;
    padding: 1rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.world-edit-panel[hidden] {
    display: none !important;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 180;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal[hidden] {
    display: none !important;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(6, 10, 8, 0.72);
    backdrop-filter: blur(6px);
}

.modal-panel {
    position: relative;
    z-index: 1;
    width: min(100%, 420px);
    max-height: calc(100vh - 2rem);
    overflow: auto;
    margin: 0;
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.modal-head h2 {
    margin: 0;
}

.modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: rgba(10, 15, 12, 0.72);
    color: #f2f7f0;
    cursor: pointer;
    font-size: 1.35rem;
    line-height: 1;
}

body.modal-open {
    overflow: hidden;
}

.world-edit-form {
    margin-top: 0;
}

.world-edit-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.world-stats .btn.is-active {
    border-color: rgba(125, 203, 92, 0.45);
    color: var(--accent-strong);
}

.world-footer {
    margin-top: 1rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
}

/* Upload */
.dropzone {
    position: relative;
    border: 1.5px dashed rgba(125, 203, 92, 0.35);
    border-radius: var(--radius);
    background: rgba(0, 0, 0, 0.18);
    min-height: 180px;
    overflow: hidden;
}

.dropzone.dragover {
    border-color: var(--accent);
    background: var(--accent-dim);
}

.dropzone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.dropzone-inner {
    display: grid;
    place-content: center;
    gap: 0.35rem;
    min-height: 180px;
    text-align: center;
    color: var(--text-muted);
    pointer-events: none;
}

.dropzone-inner[hidden] {
    display: none !important;
}

.upload-preview {
    display: none;
    width: 100%;
    max-height: 420px;
    object-fit: contain;
    background: #0a0f0c;
}

.upload-preview.is-visible {
    display: block;
}

.upload-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.5rem;
    padding: 0.75rem;
    background: #0a0f0c;
}

.upload-preview-grid[hidden] {
    display: none !important;
}

.upload-preview-thumb {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 4px;
    background: #0a0f0c;
}

.dropzone.has-preview {
    min-height: 0;
}

.stack-form label.check-row,
.auth-form label.check-row,
.check-row {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin: 0;
    padding: 0.8rem 0.95rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg);
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.stack-form label.check-row:hover,
.auth-form label.check-row:hover,
.check-row:hover {
    border-color: rgba(125, 203, 92, 0.35);
    background: rgba(125, 203, 92, 0.04);
}

.check-row input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 1.15rem;
    height: 1.15rem;
    margin: 0.12rem 0 0;
    flex-shrink: 0;
    border: 1.5px solid rgba(125, 203, 92, 0.45);
    border-radius: 5px;
    background: rgba(10, 15, 12, 0.65);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.check-row input[type="checkbox"]:checked {
    border-color: var(--accent);
    background-color: var(--accent);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23102010' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round' d='M3.5 8.5l2.8 2.8 6.2-6.2'/%3E%3C/svg%3E");
    background-size: 0.85rem;
    background-position: center;
    background-repeat: no-repeat;
    box-shadow: 0 0 0 3px rgba(125, 203, 92, 0.14);
}

.check-row input[type="checkbox"]:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(125, 203, 92, 0.22);
}

.check-row > span {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.4;
}

.upload-attach-hint {
    margin: 0;
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(0, 0, 0, 0.18);
    color: var(--text-muted);
    font-size: 0.92rem;
}

.stack-form-inner {
    display: grid;
    gap: 0.85rem;
}

.stack-form-inner[hidden] {
    display: none !important;
}

.coord-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

/* Profile */
.kv {
    margin: 0;
    display: grid;
    gap: 0.75rem;
}

.kv > div {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 0.75rem;
}

.kv dt {
    color: var(--text-muted);
    margin: 0;
}

.kv dd {
    margin: 0;
}

.token-box {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.token-box code {
    flex: 1 1 240px;
    word-break: break-all;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.8rem;
}

.code-hint {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.code-hint h3 {
    margin: 0 0 0.5rem;
    font-size: 0.95rem;
}

/* Auth */
.auth-card {
    width: min(420px, 100%);
    margin: 1rem auto;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) + 4px);
    padding: 1.6rem;
    box-shadow: var(--shadow);
}

.auth-brand {
    text-align: center;
    margin-bottom: 1.25rem;
}

.auth-brand .logo-mark {
    display: inline-block;
    width: 48px;
    height: 48px;
    margin-bottom: 0.6rem;
}

.auth-brand h1 {
    margin: 0;
    font-size: 1.7rem;
}

.auth-brand p {
    margin: 0.4rem 0 0;
    color: var(--text-muted);
}

.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem;
    margin-bottom: 1rem;
    background: var(--bg);
    padding: 0.25rem;
    border-radius: 999px;
}

.auth-tabs a {
    text-align: center;
    padding: 0.55rem;
    border-radius: 999px;
    color: var(--text-muted);
}

.auth-tabs a.active {
    background: var(--bg-soft);
    color: var(--text);
}

.auth-form {
    display: grid;
    gap: 0.85rem;
}

.auth-divider {
    display: grid;
    place-items: center;
    margin: 1.1rem 0;
    color: var(--text-muted);
    position: relative;
}

.auth-divider::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border);
}

.auth-divider span {
    position: relative;
    background: var(--bg-panel);
    padding: 0 0.6rem;
    font-size: 0.85rem;
}

/* Empty / flash / footer */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    background: rgba(26, 36, 28, 0.45);
}

.empty-state h2 {
    margin: 0 0 0.4rem;
}

.empty-state p {
    color: var(--text-muted);
    margin: 0 0 1.2rem;
}

.empty-actions {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.flash {
    padding: 0.8rem 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    border: 1px solid var(--border);
}

.flash-success {
    background: rgba(125, 203, 92, 0.12);
    border-color: rgba(125, 203, 92, 0.35);
}

.flash-error {
    background: rgba(224, 90, 79, 0.12);
    border-color: rgba(224, 90, 79, 0.35);
}

.flash-info {
    background: rgba(255, 255, 255, 0.04);
}

.main-footer {
    border-top: 1px solid var(--border);
    padding: 1.4rem 0;
    margin-top: auto;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-brand {
    font-weight: 600;
    color: var(--text);
}

.footer-links {
    display: flex;
    gap: 1rem;
}

.footer-links a {
    color: var(--text-muted);
}

.legal p {
    color: var(--text-muted);
    line-height: 1.6;
}

@keyframes riseIn {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulseGlow {
    0%, 100% { opacity: 0.65; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}

@media (max-width: 800px) {
    .feature-grid {
        grid-template-columns: 1fr;
    }

    .hamburger {
        display: flex;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 68px;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        background: #0e1410;
        border-bottom: 1px solid var(--border);
        padding: 0.75rem;
    }

    .nav-links.open {
        display: flex;
    }

    .kv > div {
        grid-template-columns: 1fr;
    }

    .shot-edit-row {
        grid-template-columns: 1fr;
    }

    .shot-icon-btn,
    .shot-gallery-nav {
        width: 2.5rem;
        height: 2.5rem;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        background: rgba(10, 15, 12, 0.88);
        border-color: rgba(255, 255, 255, 0.22);
    }

    .shot-icon-add {
        left: 3.35rem;
    }

    .shot-gallery-count {
        background: rgba(10, 15, 12, 0.88);
    }
}

/* Fullscreen image lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(6, 10, 8, 0.94);
    backdrop-filter: blur(8px);
}

.lightbox[hidden] {
    display: none;
}

.lightbox-img {
    max-width: min(100%, 1400px);
    max-height: calc(100vh - 2rem);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.lightbox-close,
.lightbox-nav {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    background: rgba(10, 15, 12, 0.78);
    color: #f2f7f0;
    cursor: pointer;
    backdrop-filter: blur(6px);
}

.lightbox-close {
    top: 1rem;
    right: 1rem;
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.5rem;
    line-height: 1;
}

.lightbox-nav {
    top: 50%;
    transform: translateY(-50%);
    width: 2.75rem;
    height: 2.75rem;
    font-size: 1.75rem;
    line-height: 1;
}

.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }

.lightbox-nav[hidden],
.lightbox-count[hidden] {
    display: none !important;
}

.lightbox-count {
    position: absolute;
    left: 50%;
    bottom: 1rem;
    transform: translateX(-50%);
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    background: rgba(10, 15, 12, 0.78);
    color: #f2f7f0;
    font-size: 0.8rem;
    font-family: "IBM Plex Mono", monospace;
}

.lightbox-close:focus-visible,
.lightbox-nav:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

body.lightbox-open {
    overflow: hidden;
}

/* Hover motion only on devices that support true hover (not phones/iPads) */
@media (hover: hover) and (pointer: fine) {
    .btn:hover {
        transform: translateY(-1px);
    }

    .shot-card:hover {
        transform: translateY(-3px);
        border-color: rgba(125, 203, 92, 0.35);
    }

    .shot-icon-btn:hover {
        transform: scale(1.06);
        background: rgba(10, 15, 12, 0.9);
    }

    .shot-gallery-nav:hover {
        background: rgba(10, 15, 12, 0.9);
        border-color: rgba(125, 203, 92, 0.45);
    }

    .lightbox-close:hover,
    .lightbox-nav:hover {
        background: rgba(10, 15, 12, 0.95);
        border-color: rgba(125, 203, 92, 0.45);
    }
}
