:root {
    --gray-0: #111111;
    --gray-1: #2d2d2d;
    --gray-2: #555555;
    --gray-3: #777777;
    --gray-4: #999999;
    --gray-5: #666666;
    --gray-6: #eeeeee;
    --gray-7: #ffffff;
    --bg-color: #ffffff;
    --light-bg: #f2f2f0;
    --text-color: #111111;
    --muted-color: #555555;
    --border-color: #2c2c2c;
    --accent-color: #111111;
    --theme-font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --theme-spacing: 1rem;
    --theme-border-width: 2px;
    --theme-radius: 4px;
    --theme-scale: 1;
    --font-xxs: 0.75rem;
    --font-xs: 0.9rem;
    --font-sm: 1.08rem;
    --font-md: 1.12rem;
    --font-lg: 1.55rem;
    --font-xl: 1.7rem;
    --font-2xl: 2rem;
    --font-3xl: 2.4rem;
    --font-4xl: 3rem;
    --font-5xl: 3.6rem;
    --font-6xl: 4.2rem;
    --font-7xl: 4.8rem;
    --font-8xl: 5.6rem;
    --font-9xl: 6.4rem;
    --footer-height: 28px;
}

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

html, body {
    width: 100%;
    min-width: 100%;
    min-height: 100%;
    margin: 0;
}

body {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
    background: #e9e9e7;
    color: var(--text-color);
    font-family: var(--theme-font);
    font-size: calc(16px * var(--theme-scale));
    font-weight: 450;
    line-height: 1.35;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6, p, blockquote, ul, ol, pre {
    margin-top: 0;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-color);
    font-weight: 760;
    letter-spacing: -0.025em;
    line-height: 1.08;
    overflow-wrap: anywhere;
}

p { margin-bottom: 0.7rem; }
a { color: var(--accent-color); text-decoration-thickness: 1px; text-underline-offset: 0.16em; }
img { display: block; max-width: 100%; }
.qr-code {
    display: block;
    max-width: 100%;
    aspect-ratio: 1 / 1;
    background: #ffffff;
    shape-rendering: crispEdges;
}
hr { border: 0; border-top: 2px solid var(--border-color); margin: 0.7rem 0; }
ul, ol { padding-left: 1.35rem; margin-bottom: 0.7rem; }
li { margin-bottom: 0.3rem; }
blockquote { margin: 0; padding-left: 0.75rem; border-left: 3px solid var(--border-color); }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
code { background: var(--light-bg); padding: 0.08rem 0.25rem; }
pre { padding: 0.7rem; background: var(--light-bg); border: 1px solid var(--border-color); overflow: hidden; }

button, input, select, textarea, .spotify-auth-links a {
    font: inherit;
    color: var(--text-color);
    background: var(--bg-color);
    border: var(--theme-border-width) solid var(--border-color);
    border-radius: var(--theme-radius);
}

button, input[type="submit"], input[type="button"], .spotify-auth-links a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0.5rem 0.8rem;
    font-weight: 700;
    cursor: pointer;
}

input[type="text"], input[type="email"], input[type="password"], textarea, select {
    width: 100%;
    max-width: 560px;
    padding: 0.55rem 0.65rem;
    margin-bottom: 0.8rem;
}

label { display: block; margin-bottom: 0.25rem; font-weight: 700; }

table { width: 100%; border-collapse: collapse; background: var(--bg-color); border: 2px solid var(--border-color); }
th, td { padding: 0.48rem 0.6rem; border-bottom: 1px solid var(--border-color); text-align: left; }
th { background: var(--light-bg); font-weight: 760; }

.container {
    container: inky / size;
    position: relative;
    flex: 0 0 auto;
    width: 448px;
    height: 600px;
    overflow: hidden;
    background: var(--bg-color);
    border: 1px solid #b7b7b3;
    box-shadow: 0 18px 50px rgb(0 0 0 / 0.14);
}

.container .content {
    position: absolute;
    inset: 0;
    overflow: hidden;
    padding: 0.75rem;
    background: var(--bg-color);
}

.container:has(footer) .content { bottom: var(--footer-height); }

.container footer, .card-footer {
    position: absolute;
    z-index: 5;
    left: 0;
    right: 0;
    bottom: 0;
    height: var(--footer-height);
    min-height: var(--footer-height);
    padding: 0 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    overflow: hidden;
    border-top: 1px solid var(--border-color);
    background: var(--light-bg);
    color: var(--muted-color);
    font-size: 10px;
    font-weight: 650;
    letter-spacing: 0.015em;
    line-height: 1.1;
    text-align: center;
    white-space: nowrap;
}

.home-btn {
    display: none;
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 20;
    padding: 0.45rem 0.7rem;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: var(--bg-color);
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
}

.articles { display: flex; flex-direction: column; gap: var(--gap, 0.7rem); min-height: 0; }
.articles article, .articles > .underline { padding-bottom: 0.65rem; border-bottom: 1px solid var(--border-color); }
.article-content { width: 100%; min-width: 0; }
.article-snippet { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 0.7rem; }
.article-snippet > img { width: 110px; height: 82px; object-fit: cover; }
.article-snippet blockquote { min-width: 0; }
.article-snippet svg { width: 104px; height: 104px; }
.footer-cell { max-height: 34px; overflow: hidden; }
.footer-cell img { max-height: 28px; width: auto; }
.underline { display: block; }
.center { width: 100%; margin: 0 auto; }
.muted { color: var(--muted-color); }

.fs-xxs { font-size: var(--font-xxs); }
.fs-xs { font-size: var(--font-xs); }
.fs-sm { font-size: var(--font-sm); }
.fs-md { font-size: var(--font-md); }
.fs-lg { font-size: var(--font-lg); }
.fs-xl { font-size: var(--font-xl); }
.fs-2xl { font-size: var(--font-2xl); }
.fs-3xl { font-size: var(--font-3xl); }
.fs-4xl { font-size: var(--font-4xl); }
.fs-5xl { font-size: var(--font-5xl); }
.fs-6xl { font-size: var(--font-6xl); }
.fs-7xl { font-size: var(--font-7xl); }
.fs-8xl { font-size: var(--font-8xl); }
.fs-9xl { font-size: var(--font-9xl); }

.for-600-448, .for-825-1200, .for-1200-825 { display: none !important; }
.for-448-600 { display: var(--display-mode, revert) !important; }

@media (min-width: 600px) and (max-width: 824px) and (min-height: 448px) and (max-height: 1199px) {
    .container { width: 600px; height: 448px; }
    .for-448-600 { display: none !important; }
    .for-600-448 { display: var(--display-mode, revert) !important; }
}

@media (min-width: 825px) and (max-width: 1199px) and (min-height: 1200px) {
    :root { --footer-height: 34px; }
    .container { width: 825px; height: 1200px; }
    .for-448-600, .for-600-448 { display: none !important; }
    .for-825-1200 { display: var(--display-mode, revert) !important; }
}

/* Keep the landscape device canvas readable inside shorter desktop browser windows. */
@media (min-width: 1000px) and (max-height: 824px) {
    :root { --footer-height: 34px; }
    .container { width: 1200px; height: 825px; zoom: 0.8; }
    .for-448-600, .for-600-448, .for-825-1200 { display: none !important; }
    .for-1200-825 { display: var(--display-mode, revert) !important; }
}

@media (min-width: 1350px) and (max-height: 824px) {
    .container { zoom: 0.9; }
}

@media (min-width: 1200px) and (min-height: 825px) {
    :root { --footer-height: 34px; }
    .container { width: 1200px; height: 825px; }
    .for-448-600, .for-600-448, .for-825-1200 { display: none !important; }
    .for-1200-825 { display: var(--display-mode, revert) !important; }
}

@media (min-width: 1250px) and (min-height: 875px) {
    .home-btn { display: block; }
}

@container inky (width <= 700px) {
    :root {
        --font-xxs: 0.62rem;
        --font-xs: 0.76rem;
        --font-sm: 0.9rem;
        --font-md: 0.96rem;
        --font-lg: 1.2rem;
        --font-xl: 1.3rem;
        --font-2xl: 1.55rem;
        --font-3xl: 1.85rem;
        --font-4xl: 2.25rem;
        --font-5xl: 2.7rem;
        --font-6xl: 3.2rem;
        --font-7xl: 3.7rem;
        --font-8xl: 4.2rem;
        --font-9xl: 4.8rem;
    }
    .container .content { padding: 0.5rem; }
    .container footer, .card-footer { padding-inline: 0.45rem; font-size: 8px; }
    .article-snippet > img { width: 68px; height: 56px; }
    .article-snippet svg { width: 96px; height: 96px; }
    .articles { gap: var(--gap, 0.4rem); }
}

@media print {
    body { background: #ffffff; }
    .container { border: 0; box-shadow: none; }
    .home-btn { display: none; }
}
