:root {
    --bg: #202020;
    --card: #121212;
    --text: #ffffff;
    --muted: #a1a1aa;
    --primary: #ffffff;
    --primary-dark: #e4e4e7;
    --primary-text: #000000;
    --danger: #ef4444;
    --border: #27272a;
    --shadow: none;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    font-family:
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        'Segoe UI',
        Roboto,
        sans-serif;
    background: var(--bg);
    color: var(--text);
}

body {
    display: flex;
    flex-direction: column;
}

.hidden {
    display: none !important;
}

.view {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
    max-width: 640px;
    margin: 0 auto;
    width: 100%;
}

header {
    margin-bottom: 16px;
}

h1 {
    font-size: 22px;
    margin: 0;
}

p {
    margin: 0 0 12px;
    line-height: 1.5;
}

input[type='password'] {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    background: #18181b;
    color: var(--text);
    margin-bottom: 14px;
}

button {
    padding: 14px 18px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

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

button.primary {
    background: var(--primary);
    color: var(--primary-text);
    width: 100%;
}

button.primary:hover:not(:disabled) {
    background: var(--primary-dark);
}

.error {
    color: var(--danger);
    font-size: 14px;
    margin-top: 8px;
}

.hint {
    color: var(--muted);
    font-size: 14px;
    text-align: center;
    margin: 16px 0;
}

#authView {
    justify-content: center;
    text-align: center;
}

#authView h1 {
    margin-bottom: 8px;
}

.feed {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.photo-card {
    background: var(--card);
    overflow: hidden;
    cursor: pointer;
    margin-bottom: 100px;
}

.photo-card:last-child {
    margin-bottom: 0;
}

.photo-card img {
    display: block;
    width: 100%;
    height: auto;
    min-height: 120px;
    background: var(--bg);
    pointer-events: none;
}

.date-header {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 70px;
}

.loading,
.empty {
    text-align: center;
    color: var(--muted);
    padding: 40px 20px;
}

.install-banner {
    background: #18181b;
    padding: 14px;
    margin-bottom: 16px;
    font-size: 14px;
}

.install-banner p {
    margin: 4px 0 0;
    color: var(--muted);
}

.install-banner button {
    margin-top: 10px;
    width: 100%;
}

/* Never offer install on desktop-like devices */
@media (pointer: fine) {
    .install-banner {
        display: none !important;
    }
}

#pswLoading {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.55);
    color: white;
    font-size: 18px;
    z-index: 100001;
}

/* Hide PhotoSwipe's zoom button and page counter.
   Arrows are hidden on touch devices by PhotoSwipe's own CSS. */
.pswp__button--zoom,
.pswp__counter {
    display: none !important;
}

noscript {
    padding: 20px;
    text-align: center;
    color: var(--danger);
}

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