/*
 * Doodlebari web — the app's "sticker" design system (thick ink outlines,
 * hard offset shadows, flat candy colors) from lib/core/design/*.dart.
 */

@font-face {
    font-family: "BalooLatin";
    src: url("../fonts/Baloo2-Regular.ttf") format("truetype");
    font-weight: 400 800;
    font-display: swap;
}

@font-face {
    font-family: "BalooBangla";
    src: url("../fonts/BalooDa2-Regular.ttf") format("truetype");
    font-weight: 400 800;
    font-display: swap;
}

:root {
    --ink: #2a2340;
    --ink-muted: #5e5873;
    --cream: #fff7ea;
    --paper: #ffffff;
    --sunny: #ffc83d;
    --sunny-tint: #ffe9a8;
    --sky: #6cc3ff;
    --sky-tint: #d6efff;
    --mint: #7ed48a;
    --mint-tint: #dcf5e0;
    --lavender: #b59cff;
    --lavender-tint: #eae1ff;
    --bubblegum: #ff9cc8;
    --bubblegum-tint: #ffe2ef;
    --coral: #ff6b57;
    --coral-tint: #ffdad3;
    --tangerine: #ffa040;
    --tangerine-tint: #ffe4c7;
    --night: #29223f;
    --danger: #b3261e;

    --outline: 3px;
    --shadow: 0 6px 0 var(--ink);
    --shadow-press: 0 2px 0 var(--ink);
    --radius-card: 24px;
    --radius-button: 20px;
    --gutter: 16px;
    --font: "BalooLatin", "BalooBangla", system-ui, sans-serif;
}

@font-face {
    font-family: "BalooArabic";
    src: url("../fonts/BalooBhaijaan2-Regular.ttf") format("truetype");
    font-weight: 400 800;
    font-display: swap;
}

/* Baloo 2 covers Latin (en, es, fr) and Devanagari (hi). */
:lang(bn) {
    --font: "BalooBangla", "BalooLatin", system-ui, sans-serif;
}

:lang(ar) {
    --font: "BalooArabic", "BalooLatin", system-ui, sans-serif;
}

/* Elements with their own lang (e.g. names in the language menu) use that script's font. */
[lang] {
    font-family: var(--font);
}

/* Arrows point the way you read. */
[dir="rtl"] svg[data-icon="back"],
[dir="rtl"] svg[data-icon="next"] {
    transform: scaleX(-1);
}

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

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

body {
    margin: 0;
    background: var(--cream);
    color: var(--ink);
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.5;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

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

a {
    color: inherit;
}

h1,
h2,
h3 {
    line-height: 1.15;
    margin: 0 0 0.4em;
    font-weight: 800;
}

h1 {
    font-size: clamp(34px, 6vw, 56px);
}

h2 {
    font-size: clamp(26px, 4vw, 36px);
}

h3 {
    font-size: 21px;
}

p {
    margin: 0 0 1em;
}

.container {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.muted {
    color: var(--ink-muted);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

:focus-visible {
    outline: 3px solid var(--sky);
    outline-offset: 3px;
}

/* ---------- Header & footer ---------- */

.site-header {
    padding: 14px 0;
}

.site-header .container {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-weight: 800;
    font-size: 26px;
    letter-spacing: -0.5px;
}

.logo-mark {
    width: 44px;
    height: 44px;
    flex: none;
}

.logo-word span:nth-child(5n + 1) { color: var(--coral); }
.logo-word span:nth-child(5n + 2) { color: var(--tangerine); }
.logo-word span:nth-child(5n + 3) { color: #e0a800; }
.logo-word span:nth-child(5n + 4) { color: #2f9e52; }
.logo-word span:nth-child(5n + 5) { color: #2e6da4; }

.site-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-inline-start: auto;
}

.site-nav a {
    text-decoration: none;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 999px;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
    background: var(--sunny-tint);
}

.lang-menu {
    position: relative;
    flex: none;
}

.lang-menu > summary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 12px;
    border: var(--outline) solid var(--ink);
    border-radius: 999px;
    background: var(--paper);
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    list-style: none;
}

.lang-menu > summary::-webkit-details-marker {
    display: none;
}

.lang-menu ul {
    position: absolute;
    inset-inline-end: 0;
    top: calc(100% + 8px);
    z-index: 30;
    min-width: 180px;
    margin: 0;
    padding: 6px;
    list-style: none;
    background: var(--paper);
    border: var(--outline) solid var(--ink);
    border-radius: 16px;
    box-shadow: 0 5px 0 var(--ink);
}

.lang-menu li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
}

.lang-menu li a:hover,
.lang-menu li a[aria-current="true"] {
    background: var(--sunny-tint);
}

.site-footer {
    margin-top: auto;
    padding: 32px 0;
    border-top: var(--outline) solid var(--ink);
    background: var(--paper);
    font-size: 15px;
}

.site-footer .container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    align-items: center;
    justify-content: space-between;
}

.site-footer nav {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

@media (max-width: 720px) {
    .site-nav .nav-link {
        display: none;
    }

    .logo {
        font-size: 22px;
    }
}

/* ---------- Buttons & cards ---------- */

.btn {
    --btn-bg: var(--sunny);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 56px;
    padding: 8px 24px;
    border: var(--outline) solid var(--ink);
    border-radius: var(--radius-button);
    background: var(--btn-bg);
    color: var(--ink);
    box-shadow: var(--shadow);
    font: inherit;
    font-weight: 800;
    font-size: 19px;
    text-decoration: none;
    cursor: pointer;
    transition: transform 80ms ease, box-shadow 80ms ease;
    user-select: none;
}

.btn:hover {
    filter: brightness(1.04);
}

.btn:active {
    transform: translateY(4px);
    box-shadow: var(--shadow-press);
}

.btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-sky { --btn-bg: var(--sky); }
.btn-mint { --btn-bg: var(--mint); }
.btn-coral { --btn-bg: var(--coral); }
.btn-lavender { --btn-bg: var(--lavender); }
.btn-bubblegum { --btn-bg: var(--bubblegum); }
.btn-paper { --btn-bg: var(--paper); }

.btn-small {
    min-height: 44px;
    padding: 4px 16px;
    font-size: 16px;
    box-shadow: 0 4px 0 var(--ink);
}

.icon-btn {
    width: 52px;
    height: 52px;
    min-height: 0;
    padding: 0;
    flex: none;
    border-radius: 50%;
    --btn-bg: var(--paper);
    box-shadow: 0 4px 0 var(--ink);
}

.icon-btn svg {
    width: 26px;
    height: 26px;
}

.card {
    background: var(--paper);
    border: var(--outline) solid var(--ink);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow);
    padding: 20px;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 12px;
    border: 2px solid var(--ink);
    border-radius: 999px;
    background: var(--paper);
    font-weight: 700;
    font-size: 14px;
}

/* Color helpers keyed by the app's category color tokens. */
.bg-sunny { background: var(--sunny); }
.bg-sky { background: var(--sky); }
.bg-mint { background: var(--mint); }
.bg-lavender { background: var(--lavender); }
.bg-bubblegum { background: var(--bubblegum); }
.bg-coral { background: var(--coral); }
.bg-tangerine { background: var(--tangerine); }
.tint-sunny { background: var(--sunny-tint); }
.tint-sky { background: var(--sky-tint); }
.tint-mint { background: var(--mint-tint); }
.tint-lavender { background: var(--lavender-tint); }
.tint-bubblegum { background: var(--bubblegum-tint); }
.tint-coral { background: var(--coral-tint); }
.tint-tangerine { background: var(--tangerine-tint); }

/* ---------- Marketing ---------- */

.hero {
    padding: 32px 0 56px;
}

.hero .container {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 40px;
    align-items: center;
}

.hero-lead {
    font-size: 21px;
    color: var(--ink-muted);
    max-width: 34ch;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 24px;
}

.hero-art {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.hero-art .thumb:nth-child(odd) {
    transform: rotate(-3deg);
}

.hero-art .thumb:nth-child(even) {
    transform: rotate(2deg) translateY(16px);
}

@media (max-width: 820px) {
    .hero .container {
        grid-template-columns: 1fr;
    }
}

.section {
    padding: 48px 0;
}

.section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 24px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 20px;
}

.feature-grid .card h3 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.feature-icon {
    width: 48px;
    height: 48px;
    border: var(--outline) solid var(--ink);
    border-radius: 16px;
    display: grid;
    place-items: center;
    flex: none;
}

.feature-icon svg {
    width: 26px;
    height: 26px;
}

.stat-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

.promise {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.promise li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.promise li::before {
    content: "";
    flex: none;
    width: 28px;
    height: 28px;
    margin-top: 2px;
    border-radius: 50%;
    border: 2px solid var(--ink);
    background: var(--mint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%232a2340' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat;
}

.prose {
    max-width: 70ch;
}

.prose h2 {
    margin-top: 1.4em;
    font-size: 26px;
}

/* ---------- Packs ---------- */

.pack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

.pack-card {
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    text-decoration: none;
}

.pack-cover {
    aspect-ratio: 16 / 10;
    border-bottom: var(--outline) solid var(--ink);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 14px;
    align-items: center;
}

.pack-cover img {
    background: var(--paper);
    border: 2px solid var(--ink);
    border-radius: 12px;
    aspect-ratio: 1;
    object-fit: contain;
    padding: 4px;
}

.pack-cover.has-image {
    display: block;
    padding: 0;
}

.pack-cover.has-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 0;
    border-radius: 0;
    padding: 0;
}

.pack-body {
    padding: 16px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.pack-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
    padding-top: 8px;
}

/* ---------- Play: home tiles ---------- */

.play-home {
    padding-top: 8px;
    padding-bottom: 40px;
}

.greeting {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.tile-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 760px) {
    .tile-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

.tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 168px;
    padding: 16px;
    border: var(--outline) solid var(--ink);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow);
    text-decoration: none;
    font-weight: 800;
    font-size: 22px;
    text-align: center;
    transition: transform 80ms ease, box-shadow 80ms ease;
}

.tile:active {
    transform: translateY(4px);
    box-shadow: var(--shadow-press);
}

.tile-icon {
    width: 72px;
    height: 72px;
    display: grid;
    place-items: center;
    background: var(--paper);
    border: var(--outline) solid var(--ink);
    border-radius: 50%;
}

.tile-icon svg {
    width: 40px;
    height: 40px;
}

.todays-page {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 20px 12px 12px;
    text-decoration: none;
    margin-bottom: 24px;
}

.todays-page img {
    width: 88px;
    height: 88px;
    background: var(--paper);
    border: 2px solid var(--ink);
    border-radius: 16px;
    padding: 4px;
}

.eyebrow {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--ink-muted);
}

/* ---------- Play: pickers ---------- */

.picker-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 8px 0 20px;
}

.picker-head h1 {
    font-size: clamp(28px, 5vw, 40px);
    margin: 0;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 24px 16px;
    text-decoration: none;
    text-align: center;
    font-weight: 800;
    font-size: 22px;
}

.thumb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 18px;
    padding-bottom: 40px;
}

.thumb {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--paper);
    border: var(--outline) solid var(--ink);
    border-radius: 20px;
    box-shadow: 0 5px 0 var(--ink);
    text-decoration: none;
    overflow: hidden;
    transition: transform 80ms ease, box-shadow 80ms ease;
}

.thumb:active {
    transform: translateY(3px);
    box-shadow: var(--shadow-press);
}

.thumb img {
    aspect-ratio: 1;
    width: 100%;
    object-fit: contain;
    padding: 10px;
}

.thumb-label {
    padding: 4px 10px 8px;
    font-weight: 700;
    font-size: 15px;
    text-align: center;
    border-top: 2px dashed var(--sunny-tint);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.thumb.locked img {
    opacity: 0.45;
}

.lock-badge {
    position: absolute;
    top: 8px;
    inset-inline-end: 8px;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 2px solid var(--ink);
    border-radius: 50%;
    background: var(--sunny);
}

.lock-badge svg {
    width: 18px;
    height: 18px;
}

.glyph-tile {
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    font-size: clamp(34px, 6vw, 52px);
    font-weight: 800;
}

.glyph-tile.done {
    background: var(--mint-tint);
}

.glyph-tile svg {
    width: 70%;
    height: 70%;
}

.set-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    text-decoration: none;
}

.set-card .set-sample {
    width: 72px;
    height: 72px;
    display: grid;
    place-items: center;
    border: var(--outline) solid var(--ink);
    border-radius: 18px;
    font-size: 36px;
    font-weight: 800;
    background: var(--paper);
    flex: none;
}

.set-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding-bottom: 40px;
}

.tabs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 4px 2px 12px;
    margin-bottom: 8px;
    scrollbar-width: thin;
}

.tabs button {
    flex: none;
    font: inherit;
    font-weight: 800;
    padding: 6px 18px;
    border: var(--outline) solid var(--ink);
    border-radius: 999px;
    background: var(--paper);
    cursor: pointer;
}

.tabs button[aria-selected="true"] {
    background: var(--sunny);
}

/* ---------- Play: canvas screens ---------- */

body.play-screen {
    height: 100dvh;
    overflow: hidden;
}

.play-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px var(--gutter);
}

.play-bar h1 {
    font-size: clamp(20px, 3.5vw, 30px);
    margin: 0;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.play-bar .actions {
    display: flex;
    gap: 10px;
}

.play-main {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 var(--gutter);
    gap: 12px;
}

.stage {
    position: relative;
    width: min(100%, calc(100dvh - 250px));
    min-width: 240px;
    aspect-ratio: 1;
    background: var(--paper);
    border: var(--outline) solid var(--ink);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow);
    overflow: hidden;
    touch-action: none;
}

.stage > svg,
.stage > canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.stage-hint {
    font-weight: 700;
    color: var(--ink-muted);
    text-align: center;
    min-height: 1.5em;
    margin: 0;
}

.toolbar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px var(--gutter) max(16px, env(safe-area-inset-bottom));
}

.palette {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    max-width: 640px;
}

.swatch {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: var(--outline) solid var(--ink);
    background: var(--swatch);
    cursor: pointer;
    padding: 0;
    transition: transform 80ms ease;
}

.swatch[aria-pressed="true"] {
    transform: scale(1.15);
    box-shadow: 0 0 0 4px var(--cream), 0 0 0 7px var(--ink);
}

.tool-group {
    display: flex;
    gap: 8px;
    padding: 4px;
    border: var(--outline) solid var(--ink);
    border-radius: 999px;
    background: var(--paper);
}

.tool-group button {
    min-width: 44px;
    height: 44px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 12px;
}

.tool-group button svg {
    width: 22px;
    height: 22px;
}

.tool-group button[aria-pressed="true"] {
    background: var(--sunny);
}

.size-dot {
    display: block;
    border-radius: 50%;
    background: var(--ink);
}

/* Coloring page SVG */
.coloring-svg #regions path {
    fill: var(--paper);
    cursor: pointer;
    transition: fill 120ms ease;
}

.coloring-svg #outline path {
    fill: none;
    stroke: var(--ink);
    stroke-width: 10;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
}

/* Paper backgrounds for free drawing (lib/features/drawing/data/paper.dart) */
.paper-white { background: var(--paper); }
.paper-cream { background: var(--cream); }
.paper-sky { background: var(--sky-tint); }
.paper-chalkboard { background: var(--night); }
.paper-grid {
    background-color: var(--paper);
    background-image:
        linear-gradient(var(--sky-tint) 2px, transparent 2px),
        linear-gradient(90deg, var(--sky-tint) 2px, transparent 2px);
    background-size: 8% 8%;
}
.paper-lined {
    background-color: var(--paper);
    background-image: linear-gradient(transparent calc(100% - 2px), var(--coral-tint) 2px);
    background-size: 100% 8%;
}

.paper-picker {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    max-width: 560px;
    width: 100%;
}

.paper-option {
    aspect-ratio: 1;
    border: var(--outline) solid var(--ink);
    border-radius: 20px;
    box-shadow: 0 5px 0 var(--ink);
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 8px;
}

.paper-option.paper-chalkboard {
    color: var(--paper);
}

/* ---------- Dialogs & celebration ---------- */

dialog {
    border: var(--outline) solid var(--ink);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow);
    padding: 28px;
    max-width: min(440px, calc(100vw - 32px));
    background: var(--paper);
    color: var(--ink);
    text-align: center;
}

dialog::backdrop {
    background: rgb(42 35 64 / 55%);
}

dialog h2 {
    font-size: 30px;
}

.dialog-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
}

.celebrate-star {
    width: 96px;
    height: 96px;
    margin: 0 auto 8px;
    animation: pop 600ms cubic-bezier(0.2, 1.6, 0.5, 1) both;
}

.confetti {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 50;
}

.confetti i {
    position: absolute;
    top: -20px;
    width: 12px;
    height: 18px;
    border: 2px solid var(--ink);
    border-radius: 3px;
    animation: fall 1.8s ease-in forwards;
}

@keyframes pop {
    from { transform: scale(0.2) rotate(-30deg); opacity: 0; }
    to { transform: scale(1) rotate(0); opacity: 1; }
}

@keyframes fall {
    to { transform: translateY(110vh) rotate(540deg); }
}

@media (prefers-reduced-motion: reduce) {
    .confetti { display: none; }
    .celebrate-star { animation: none; }
    .btn, .tile, .thumb { transition: none; }
}

/* ---------- My Art ---------- */

.art-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 20px;
    padding-bottom: 40px;
}

.art-item {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.art-item img {
    aspect-ratio: 1;
    width: 100%;
    object-fit: cover;
    border-bottom: 2px solid var(--ink);
}

.art-item .art-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 10px;
    font-size: 14px;
    font-weight: 700;
}

.art-item .art-meta button {
    border: 0;
    background: none;
    cursor: pointer;
    padding: 6px;
    color: var(--ink-muted);
}

.empty-state {
    text-align: center;
    padding: 48px 16px;
    max-width: 420px;
    margin: 0 auto;
}

.empty-state svg {
    width: 120px;
    height: 120px;
    margin: 0 auto 16px;
}

.notice {
    background: var(--sunny-tint);
    border-bottom: var(--outline) solid var(--ink);
    padding: 8px var(--gutter);
    text-align: center;
    font-weight: 700;
}

/* ---------- Blog ---------- */

.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.post-card {
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    text-decoration: none;
    transition: transform 80ms ease, box-shadow 80ms ease;
}

.post-card:active {
    transform: translateY(4px);
    box-shadow: var(--shadow-press);
}

.post-cover {
    aspect-ratio: 16 / 9;
    background: var(--sunny-tint);
    border-bottom: var(--outline) solid var(--ink);
    display: grid;
    place-items: center;
    overflow: hidden;
}

.post-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-cover-mark {
    width: 72px;
    height: 72px;
}

.post-card-body {
    padding: 16px 20px 20px;
}

.post-card-body h3 {
    margin: 4px 0 6px;
}

.post-card-body p {
    margin: 0;
}

.notice-inline {
    background: var(--sky-tint);
    border: 2px solid var(--ink);
    border-radius: 14px;
    padding: 8px 14px;
    font-weight: 700;
}

.pager {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 32px;
}

.post-container {
    max-width: 760px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    text-decoration: none;
    margin-bottom: 16px;
}

.post-header h1 {
    font-size: clamp(32px, 5vw, 48px);
}

.post-hero {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border: var(--outline) solid var(--ink);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow);
    margin: 8px 0 32px;
}

.post-body {
    font-size: 19px;
    line-height: 1.7;
}

.post-body h2,
.post-body h3 {
    margin-top: 1.5em;
}

.post-body img {
    border: 2px solid var(--ink);
    border-radius: 16px;
    margin: 1em 0;
    height: auto;
}

.post-body a {
    color: #2e6da4;
    font-weight: 700;
}

.post-body blockquote {
    margin: 1.2em 0;
    padding: 12px 20px;
    border-inline-start: 6px solid var(--sunny);
    background: var(--paper);
    border-radius: 12px;
}

.post-body blockquote > :last-child {
    margin-bottom: 0;
}

.post-body ul,
.post-body ol {
    padding-inline-start: 1.4em;
}

.post-body li {
    margin: 0.3em 0;
}

.post-body code {
    background: var(--paper);
    border: 1px solid var(--sunny-tint);
    border-radius: 6px;
    padding: 1px 6px;
    font-size: 0.9em;
}

.post-body pre {
    overflow-x: auto;
    background: var(--paper);
    border: 2px solid var(--ink);
    border-radius: 12px;
    padding: 14px;
}

.post-body hr {
    border: 0;
    border-top: 3px dashed var(--sunny);
    margin: 2em 0;
}

.post-body table {
    border-collapse: collapse;
    width: 100%;
    display: block;
    overflow-x: auto;
}

.post-body th,
.post-body td {
    border: 2px solid var(--ink);
    padding: 6px 10px;
}
