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

:root {
    --bg: #0a0a0f;
    --bg-card: #12121a;
    --bg-elevated: #1a1a2a;
    --text: #e8dcc8;
    --text-muted: #8a7e6a;
    --accent: #c9a96e;
    --accent-dim: #8a7040;
    --border: #2a2a3a;
    --error: #c45a4a;
    --success: #6a9a5a;
    --font-display: "Cormorant Garamond", Georgia, serif;
    --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    --max-width: 480px;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--text);
}

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    color: var(--text);
}

.nav-links {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.nav-link {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-muted);
    white-space: nowrap;
    text-transform: lowercase;
    letter-spacing: 0.03em;
}

.nav-link:hover {
    color: var(--accent);
}

.main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 5rem 1rem 2rem;
    min-height: 100vh;
    overflow-x: hidden;
}

.flash {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    font-weight: 400;
}

.flash-error {
    background: rgba(196, 90, 74, 0.15);
    border: 1px solid var(--error);
    color: var(--error);
}

.flash-success {
    background: rgba(106, 154, 90, 0.15);
    border: 1px solid var(--success);
    color: var(--success);
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--accent);
    background: transparent;
    color: var(--accent);
    font-family: var(--font-body);
    font-size: 0.9rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.btn:hover {
    background: var(--accent);
    color: var(--bg);
}

.btn-primary {
    background: var(--accent);
    color: var(--bg);
    border-color: var(--accent);
}

.btn-primary:hover {
    background: var(--accent-dim);
    border-color: var(--accent-dim);
    color: var(--bg);
}

.btn-small {
    padding: 0.35rem 0.85rem;
    font-size: 0.75rem;
    border-radius: 4px;
    flex-shrink: 0;
}

input[type="text"],
input[type="number"],
input[type="password"],
input[type="file"],
textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color 0.2s;
    outline: none;
}

input:focus,
textarea:focus {
    border-color: var(--accent);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

/* Homepage */
.feature-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    list-style: none;
}

.feature-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    transition: border-color 0.2s;
}

.feature-item.unlocked {
    border-color: rgba(201, 169, 110, 0.3);
}

.feature-item.locked {
    filter: blur(4px);
    pointer-events: none;
    user-select: none;
}

.feature-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.feature-name {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--text);
}

.feature-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Unlock page */
.unlock-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 8rem);
    text-align: center;
}

.unlock-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 0.5rem;
}

.unlock-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.unlock-form {
    width: 100%;
    max-width: 280px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.code-slots {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.code-slot {
    width: 56px;
    height: 64px;
    text-align: center;
    font-size: 22px !important;
    font-family: var(--font-display) !important;
    letter-spacing: 0;
    padding: 0;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s;
    caret-color: transparent;
}

.code-slot:focus {
    border-color: var(--accent);
}

.unlock-progress {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

/* Morning report page */
.report-page {
    padding-bottom: 3rem;
}

.report-intro {
    text-align: center;
    margin-bottom: 2rem;
}

.report-intro-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--accent);
    margin-bottom: 1rem;
}

.report-intro-text {
    font-size: 0.875rem;
    line-height: 1.7;
    color: var(--text-muted);
    font-style: italic;
}

.report-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.report-tab {
    padding: 0.75rem 1.25rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
    font-family: var(--font-body);
}

.report-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.report-entry {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.report-entry img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 0.75rem;
}

.report-entry .message {
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.report-entry .timestamp {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.report-section-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--text-muted);
    text-align: center;
    margin: 2rem 0 1rem;
    font-style: italic;
}

/* Upload form */
.upload-page {
    padding-top: 1rem;
}

.upload-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.upload-form label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.report-separator {
    border: none;
    border-top: 1px solid var(--border);
    margin: 1.5rem 0;
}

/* Big Question */
.question-page {
    max-width: 420px;
    margin: 0 auto;
    padding: 1rem 0 3rem;
}

.question-title {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 300;
    color: var(--accent);
    text-align: center;
    margin-bottom: 2rem;
}

.question-body {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.question-paragraph {
    font-size: 0.925rem;
    line-height: 1.75;
    color: var(--text);
    text-align: left;
}

/* Desktop */
@media (min-width: 768px) {
    .main {
        padding-top: 6rem;
    }

    .nav-inner {
        padding: 1rem 2rem;
    }
}
