/*
  Al Dente: the Cozy layout
  Everything Midfi and Classic can do, on five tabs (Community, Recipes, +, Cookbook,
  Profile), in Bistro's look made sleeker, cozier and easier to read: Lora throughout
  (italic only for recipe names), Bistro's sizes and spacing, plum as the accent,
  high-contrast ink hairlines and round corners. Classic's screens get Bistro's own
  rules (styles.css applies them to Cozy too); this file restyles Midfi's screens to
  match and trims Bistro's flourishes (stamps, tildes, dashes, the chalkboard).
  Every rule starts with :root[data-layout="cozy"], which outranks midfi.css.
*/

/* ---------- Colors and type ---------- */

:root[data-layout="cozy"] {
  /* The accent: the palette's plum. */
  --mf-tomato: var(--mf-plum);
  --mf-tomato-ink: var(--mf-plum-ink);
  --mf-tomato-tint: var(--mf-plum-tint);
  --mf-tomato-tint-2: var(--mf-plum-tint-2);
  --accent: var(--mf-plum-ink);
  --accent-soft: var(--mf-plum-tint);
  /* High contrast: secondary text and field outlines a step darker. */
  --mf-soft: var(--mf-soft-2);
  --mf-chev: var(--mf-soft-2);
  --mf-field: var(--mf-soft-2);
  /* Bistro's Baskerville (set with Bistro's tokens) for Midfi's screens too. */
  --mf-serif: var(--serif);
  --mf-sans: var(--serif);
  --cozy-title: var(--mf-plum-ink);
  /* Ink hairlines, the plum rule inside recipe cards, and the glow under plum buttons. */
  --cozy-rule: rgb(42 33 30 / 0.78);
  --cozy-inner: rgb(115 48 72 / 0.4);
  --cozy-glow: rgb(115 48 72 / 0.22);
}
/* On dark paper: buttons keep the palette's plum (with white text), while small accent
   text (links, step numerals, eyebrows) takes the palette's mustard and titles are cream. */
@media (prefers-color-scheme: dark) {
  :root[data-layout="cozy"]:not([data-theme="light"]) {
    --mf-plum-ink: var(--mf-mustard-ink);
    --mf-soft: #cdbda4;
    --mf-chev: #cdbda4;
    --mf-field: #ad9d86;
    --cozy-title: var(--mf-ink);
    --cozy-rule: rgb(247 236 216 / 0.6);
    --cozy-inner: rgb(247 236 216 / 0.3);
    --cozy-glow: rgb(0 0 0 / 0.4);
  }
}
:root[data-layout="cozy"][data-theme="dark"] {
  --mf-plum-ink: var(--mf-mustard-ink);
  --mf-soft: #cdbda4;
  --mf-chev: #cdbda4;
  --mf-field: #ad9d86;
  --cozy-title: var(--mf-ink);
  --cozy-rule: rgb(247 236 216 / 0.6);
  --cozy-inner: rgb(247 236 216 / 0.3);
  --cozy-glow: rgb(0 0 0 / 0.4);
}

:root[data-layout="cozy"] {
  & body { line-height: 1.5; }

  /* ---------- Type, at Bistro's sizes ---------- */

  /* Page titles in bold Baskerville: Bistro's script read poorly. */
  & .mf-title { color: var(--cozy-title); font: 700 32px/1.15 var(--serif); letter-spacing: -0.01em; }
  & .mf-display { font: 700 31px/1.18 var(--serif); letter-spacing: -0.01em; }
  & .mf-recipe-title { font: 700 34px/1.15 var(--serif); text-align: center; }
  & .mf-h1 { font: 700 28px/1.2 var(--serif); }
  & .mf-h2 { font: italic 400 24px/1.25 var(--serif); }
  & .mf-shelf .mf-h2 { font-size: 22px; }
  & .mf-h3 { font: 700 19px/1.25 var(--serif); }
  & .mf-h4 { font: 700 17px/1.3 var(--serif); }
  & :is(.mf-promo-title, .mf-event-strip-title, .mf-feature-title, .mf-party-title) { font-weight: 700; }
  & :is(.mf-sub, .mf-desc, .mf-prose, .mf-steps li, .mf-ing) { font-size: 17px; line-height: 1.5; }
  & :is(.mf-small, .mf-host-line, .mf-byline) { font-size: 14px; }
  & :is(.mf-muted, .mf-empty) { font-size: 15px; }
  & :is(.mf-label, .mf-eyebrow, .mf-stats4 span, .mf-plank span, .mf-pill, .mf-status) {
    font: 400 14px/1.2 var(--serif);
    font-variant: small-caps;
    letter-spacing: 0.1em;
    text-transform: lowercase;
  }
  & :is(.mf-pill, .mf-status) { font-size: 13px; }
  & .mf-eyebrow { color: var(--mf-plum-ink); }
  & .mf-promo-text .mf-eyebrow { color: var(--mf-mustard-on-plum); }
  & .mf-stats3 span { font-size: 14px; }
  & :is(.mf-chip, .mf-seg button) { font: italic 400 15px var(--serif); }
  & .mf-btn { font: italic 600 17px/1 var(--serif); }
  & .mf-btn-sm { font-size: 15px; }
  & :is(.mf-link, .mf-see) { font-style: italic; }
  & :is(.mf-input, .mf-search input) { font-size: 17px; }
  & .mf-av { font-family: var(--serif); font-style: italic; font-weight: 400; }

  /* ---------- Spacing, at Bistro's ---------- */

  & .mf-section-head { margin: 36px 0 16px; }
  & .mf-shelf .mf-section-head { margin: 32px 0 14px; }
  & :is(.mf-stats3, .mf-stats4) { gap: 12px; margin-top: 24px; }
  & .mf-list-row { min-height: 64px; }
  & .mf-shelf-cards { gap: 14px; }
  /* A hairline under the page header and the top bar, as on Bistro's pages. */
  & .mf-head:not(.cozy-head) { margin-bottom: 20px; padding-bottom: 14px; border-bottom: 1px solid var(--cozy-rule); }
  /* The header: a slim bar (logo left, buttons right) that stays at the top as you
     scroll, with a hairline under it; the page title scrolls away beneath it. */
  & .cozy-topbar { position: sticky; top: 0; z-index: 20; min-height: 60px; margin: -12px calc(-1 * var(--mf-gutter)) 0; padding: 8px var(--mf-gutter); border-bottom: 1px solid var(--cozy-rule); background: color-mix(in srgb, var(--mf-bg) 94%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
  & .cozy-head-logo { display: block; width: 88px; height: 40px; }
  & .cozy-topbar .mf-head-actions { gap: 8px; margin-left: auto; }
  & .cozy-head { margin-bottom: 18px; padding: 18px 0 0; border-bottom: 0; }

  /* Direct messages. */
  & .dm-row.is-unread .mf-h4::after { content: ""; display: inline-block; width: 8px; height: 8px; margin-left: 8px; border-radius: 50%; background: var(--mf-tomato); vertical-align: middle; }
  & .dm-preview { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  & .dm-list { display: flex; flex-direction: column; gap: 10px; padding: 8px 0 120px; }
  & .dm-msg { display: flex; flex-direction: column; gap: 6px; max-width: 78%; padding: 10px 14px; border-radius: 20px 20px 20px 6px; background: var(--mf-sand); color: var(--mf-ink); align-self: flex-start; }
  & .dm-msg.is-you { border-radius: 20px 20px 6px 20px; background: var(--mf-tomato); color: #fff; align-self: flex-end; }
  & .dm-msg p { font-size: 16px; line-height: 1.4; }
  & .dm-time { font-size: 12px; opacity: 0.8; }
  & .dm-photo { width: 220px; max-width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 14px; }
  & .dm-composer { position: fixed; z-index: 25; left: 0; right: 0; bottom: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px var(--mf-gutter) calc(10px + var(--safe-b)); border-top: 1px solid var(--cozy-rule); background: var(--mf-bg); }
  & .dm-composer .mf-input { flex: 1; min-width: 0; min-height: 44px; }
  & .dm-attach { cursor: pointer; }
  & .dm-preview-photo { display: flex; align-items: center; gap: 10px; width: 100%; }
  & .dm-preview-photo[hidden] { display: none; }
  & .dm-preview-photo img { width: 64px; height: 48px; object-fit: cover; border-radius: 10px; }
  /* A heading that opens a card or a section needs no space above it. */
  & :is(.mf-card-box, .mf-section) > .mf-section-head:first-child { margin-top: 0; }
  /* Two buttons share the bar at the bottom, so they split it evenly. */
  & .mf-sticky > .mf-btn { flex: 1 1 0; min-width: 0; padding: 0 12px; font-size: 16px; }
  & .mf-top { border-bottom: 1px solid var(--cozy-rule); }

  /* ---------- Recipe cards: Bistro's library cards, bigger, with round corners ---------- */

  & .mf-card {
    width: 124px;
    gap: 8px;
    padding: 9px 9px 12px;
    align-items: center;
    border: 1px solid var(--cozy-rule);
    border-radius: 22px;
    background: var(--mf-card);
    box-shadow: inset 0 0 0 4px var(--mf-card), inset 0 0 0 5px var(--cozy-inner);
    text-align: center;
  }
  & .mf-card-photo { align-self: stretch; }
  & .mf-card-photo .mf-photo { height: 88px; border-radius: 50%; }
  & .mf-card-title { min-height: 36px; font: italic 400 14.5px/1.25 var(--serif); }
  & .mf-card-meta { justify-content: center; font-size: 13px; font-variant: small-caps; letter-spacing: 0.08em; text-transform: lowercase; }
  & .mf-card-meta .ic { display: none; }
  & .mf-grid .mf-card { width: calc((100% - 14px) / 2); max-width: 220px; }
  & .mf-grid .mf-card-photo .mf-photo { height: auto; aspect-ratio: 4 / 3; }

  /* ---------- Boxes: one ink hairline, round corners ---------- */

  & :is(.mf-card-box, .mf-info, .mf-stats3 > div, .mf-stats4 > div, .mf-event-row, .mf-empty-card, .mf-option, .mf-found, .mf-upload, .mf-step-box, .mf-feature, .cozy-dinners) {
    border: 1px solid var(--cozy-rule);
    border-radius: 22px;
    box-shadow: none;
  }
  & :is(.mf-callout, .mf-note, .mf-map) { border-radius: 20px; }
  & :is(.mf-promo, .mf-party) { border-radius: 24px; }
  & :is(.mf-body, .mf-sheet) { border-radius: 32px 32px 0 0; }
  & .mf-tile { border-radius: 50%; }
  & :is(.mf-row-photo .mf-photo, .mf-menu-photo) { border-radius: 50%; }
  & :is(.mf-promo-photo .mf-photo, .mf-date-badge, .mf-date-tile) { border-radius: 16px; }

  /* ---------- Buttons, chips and fields: outlined in ink, fully rounded ---------- */

  & :is(.mf-btn, .mf-btn-outline, .mf-btn-light) { border: 1.5px solid var(--mf-ink); border-radius: 999px; background: transparent; color: var(--mf-ink); box-shadow: none; }
  & :is(.mf-btn-primary, .mf-btn-plum) { border-color: var(--mf-tomato); background: var(--mf-tomato); color: #fff; box-shadow: 0 4px 12px var(--cozy-glow); }
  & .mf-btn-outline.is-on { border-color: var(--mf-plum-ink); color: var(--mf-plum-ink); }
  & :is(.mf-rsvp, .mf-promo-go, .mf-party-go) { border-radius: 999px; }
  & .mf-chip { border-color: var(--cozy-rule); }
  & .mf-chip.is-on { border-color: var(--mf-tomato); background: var(--mf-tomato); color: #fff; }
  & .mf-seg { padding: 3px; border: 1.5px solid var(--mf-ink); border-radius: 999px; background: transparent; }
  & .mf-seg button { border-radius: 999px; color: var(--mf-ink); }
  & .mf-seg button.is-on { background: var(--mf-tomato); color: #fff; box-shadow: none; }
  & :is(.mf-head-actions, .mf-top, .mf-head-row) .mf-round { border: 1px solid var(--cozy-rule); background: transparent; }
  & :is(.mf-input, .mf-search) { border: 1.5px solid var(--mf-field); border-radius: 18px; background: var(--mf-card); }
  & :is(.mf-filter, .mf-create) { border-radius: 50%; }
  & :is(.mf-filter, .mf-create, .tile-solid) { box-shadow: 0 4px 12px var(--cozy-glow); }

  /* The light/dark toggle: a sun in light mode, a moon in dark. */
  & .cozy-theme { cursor: pointer; }
  & .cozy-theme .ic-moon { display: none; }
  &[data-theme="dark"] .cozy-theme .ic-sun { display: none; }
  &[data-theme="dark"] .cozy-theme .ic-moon { display: block; }
  @media (prefers-color-scheme: dark) {
    &:not([data-theme="light"]) .cozy-theme .ic-sun { display: none; }
    &:not([data-theme="light"]) .cozy-theme .ic-moon { display: block; color: var(--mf-mustard-ink); }
  }
  &[data-theme="dark"] .cozy-theme .ic-moon { color: var(--mf-mustard-ink); }

  /* ---------- Tab bar: a hairline, and the current tab in a plum pill ---------- */

  & .mf-nav { border-top: 1px solid var(--cozy-rule); box-shadow: none; }
  & .mf-tab { font: italic 400 12.5px/1.2 var(--serif); }
  & .mf-tab.is-active { color: var(--mf-plum-ink); font-weight: 700; }
  & .mf-tab .ic { box-sizing: content-box; padding: 3px 14px; border-radius: 999px; }
  & .mf-tab.is-active .ic { background: var(--mf-plum-tint); }

  /* ---------- A recipe opens like a menu ---------- */

  & :is(.mf-tags, .mf-byline) { justify-content: center; }
  & .mf-desc { font-style: italic; text-align: center; }
  /* No photo: one round plate. */
  & .mf-hero-photo:not(:has(img)) { --plate: var(--mf-photo); background: radial-gradient(circle at 50% 45%, var(--plate) 0 92px, transparent 92.5px), var(--mf-bg); }
  & .mf-hero-plum .mf-hero-photo:not(:has(img)) { --plate: var(--mf-plum-tint-2); }
  & .mf-hero-photo:not(:has(img)) .ic { margin-bottom: 30px; }
  /* Steps numbered I, II, III in plum italic. The digits stay for screen readers. */
  & #steps { counter-reset: etape; }
  & .mf-steps > li { grid-template-columns: 40px 1fr; counter-increment: etape; }
  & .mf-steps > li > .mf-num { width: auto; justify-content: start; background: none; color: var(--mf-plum-ink); font-size: 0; }
  & .mf-steps > li > .mf-num::before { content: counter(etape, upper-roman) "."; font: italic 400 19px/1 var(--serif); }
  & .mf-steps .amt { border-bottom: 1px solid var(--mf-plum-ink); color: var(--mf-ink); font-style: italic; font-weight: 400; }

  /* ---------- The Community home: one search, one quiet row of choices, calm posts ---------- */

  & .cozy-home .mf-search { margin-top: 0; }
  & .cozy-filters { margin-top: 14px; }
  & .cozy-dinner-row { margin-top: 14px; }
  & .cozy-dinner-row > .mf-label { margin-bottom: 6px; }
  & .cozy-chip-all { border-style: dashed; }
  & .mf-bring-ideas { display: block; margin-top: 2px; }
  & .cozy-pick { width: 100%; padding: 0 2px; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
  & .cozy-pick + .cozy-pick { border-top: 1px solid var(--mf-line); }
  & .cozy-pick-search { margin: 12px 0; }
  & .cozy-pick-list { max-height: 55vh; overflow-y: auto; }
  & .start-title { color: var(--cozy-title); }
  & .cozy-share { width: 100%; margin: 0 0 14px; white-space: normal; line-height: 1.25; }
  & .cozy-dinner-about { margin-top: 14px; }
  & .cozy-dinner-label { margin-top: 22px; }
  & .cozy-dishes { display: flex; flex-direction: column; margin-top: 8px; }
  & .cozy-dishes li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--mf-line); }

  /* Posts, wherever they show: plain first letters, quiet bylines, likes and comments
     as text, and a thin line between posts. */
  & .community :is(.post, #post) > .caption:not(.h3)::first-letter { float: none; margin: 0; color: inherit; font-size: inherit; line-height: inherit; }
  & .community :is(.post, #post) > .caption { font-size: 18px; line-height: 1.5; }
  /* A post that's only words (a kitchen thought) reads upright; italic is for recipe names. */
  & .community :is(.post, #post) > .caption.h3 { font-size: 20px; font-style: normal; line-height: 1.4; text-align: left; }
  & .community :is(.post, #post) > .caption.h3::before { content: none; }
  /* Every post looks the same: flush with the page's edges, with a thin line between posts. */
  & .community .posts { gap: 0; }
  & .community .post { gap: 12px; padding: 20px 0; border: 0; border-bottom: 1px solid var(--mf-line); border-radius: 0; }
  & .community .post:first-child { padding-top: 6px; }
  & .community .post:last-child { border-bottom: 0; }
  & .community .author .row-title { font: 700 16px/1.3 var(--serif); font-variant: normal; letter-spacing: 0; text-transform: none; }
  & .community .post .pill { padding: 0; border: 0; background: none; color: var(--mf-soft); }
  & .community .post > .row:last-child .btn { min-height: 36px; padding: 0 2px; border: 0; background: none; color: var(--mf-soft); font-style: italic; box-shadow: none; }
  & .community .post > .row:last-child { gap: 18px; }
  & .community .post > .row:last-child .btn.is-on { color: var(--mf-plum-ink); }
  & .community :is(.mini-card, .box-card) { border: 1px solid var(--cozy-rule); border-radius: 18px; }

  /* ---------- A recipe's collection, set by hand ---------- */

  & .mf-logout { width: 100%; margin-top: 24px; }
  & .cozy-category { width: 100%; margin-top: 18px; padding: 10px 16px; border: 1px solid var(--cozy-rule); border-radius: 22px; background: var(--mf-card); text-align: left; cursor: pointer; }

  /* Midfi's phone tab bar has room for five; Cozy's Cookbook and Profile take the last two. */
  @media (min-width: 768px) {
    & .mf-nav { border-top: 0; border-right: 1px solid var(--cozy-rule); }
    & .mf-tab .ic { padding: 0; }
    & .mf-tab { border-radius: 999px; font-size: 16px; }
    & .mf-tab.is-active .ic { background: none; }
    & .mf-create { border-radius: 999px; }
    & .cozy-topbar { margin-top: -28px; }
    & .cozy-topbar .cozy-head-logo { display: none; }
    & .mf-card { width: 140px; }
    & .mf-card-photo .mf-photo { height: 100px; }
    & .cards { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px 14px; }
  }

  /* ---------- Bistro's Classic screens, trimmed for a sleeker look ---------- */

  & :is(.page-title, .display) { color: var(--cozy-title); font-family: var(--serif); font-weight: 700; letter-spacing: -0.01em; }
  & .page-title { font-size: 30px; }
  & .eyebrow { color: var(--accent); font: 400 14px/1.2 var(--serif); font-variant: small-caps; letter-spacing: 0.1em; text-transform: lowercase; }
  & .thumb::before { font-family: var(--serif); font-style: italic; }
  & .post .author .row-title { font: 700 15px/1.3 var(--serif); font-variant: small-caps; letter-spacing: 0.12em; text-transform: lowercase; }
  /* Filled buttons and chosen chips are plum with white text in both modes. */
  & :is(.btn-primary, .chip.is-active, .chip:has(input:checked), .seg > .is-active, .avatar.is-you, .fab) { border-color: var(--mf-tomato); background: var(--mf-tomato); color: #fff; }
  & .card-meta::before,
  & .card-meta::after { content: none; }
  & .card { border-color: var(--cozy-rule); border-radius: 22px; outline-color: var(--cozy-inner); }
  /* Library cards at about three-quarters size: three across on phones, four on tablets, five on desktops. */
  & .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 10px; }
  & .card { padding: 8px 8px 12px; border-radius: 18px; outline-offset: -5px; }
  & .card-title { font-size: 14.5px; }
  & .card-meta { font-size: 11.5px; }
  & .thumb-card::before { font-size: 40px; }
  & .detail .section > .h2 { font: italic 400 24px/1.25 var(--serif); }
  & .detail .section > .h2::before,
  & .detail .section > .h2::after { content: none; }
  & .steps li.done { padding-right: 12px; }
  & .steps li.done::after { content: none; }
  & :is(.box-card, .mini-card, .stats, .notes) { border-radius: 18px; }
  & :is(.callout, .check-row, .dropzone, .source-option, .unsure) { border-radius: 16px; }
  & .banner { border: 1px solid var(--accent); border-radius: 18px; }
  & .input { border-radius: 18px; }
  & .topbar { border-bottom-color: var(--cozy-rule); }
  & .community :is(.mini-card, .box-card, .stats) { border-radius: 18px; }
  & .community :is(.post, #post) > a > .thumb-card,
  & .community #post > .thumb-card { border-radius: 18px; }
  & .community :is(.thumbs .thumb, .mini-card .thumb, .box-card .thumb) { border-radius: 14px; }
  /* No chalkboard: cook mode and the welcome screen keep the page's colors. */
  & :is(.cook, .screen:has(.hero-art)) {
    --bg: inherit; --surface: inherit; --surface-2: inherit; --ink: inherit; --ink-soft: inherit; --line: inherit;
    --line-strong: inherit; --accent: inherit; --accent-ink: inherit; --accent-soft: inherit; --herb: inherit; --herb-soft: inherit; --brass: inherit;
  }
  & .cook :is(.cook-step p, .step-num, .page-title, .display),
  & .screen:has(.hero-art) .display { font-family: var(--serif); }
  & .cook .cook-step { border: 1px solid var(--cozy-rule); border-radius: 22px; background: var(--surface); }
  & .cook .cook-step p { font-size: 24px; line-height: 1.4; }
  & .cook .step-num { border: 1.5px solid var(--accent); background: none; color: var(--accent); }
  @media (min-width: 768px) {
    & .detail-cols > :first-child { border-color: var(--cozy-rule); border-radius: 24px; outline: none; }
  }

  /* ---------- Motion: a quiet fade instead of wiggles and page turns ---------- */

  @media (prefers-reduced-motion: no-preference) {
    & :is(.btn, .card, .chip):hover,
    & .tab:hover svg { animation: none; }
    &::view-transition-new(root) { animation: cozy-fade 0.25s ease both; }
    & .entering :is(.card, .post, .cook-step, .stat, .mf-card) { animation: cozy-rise 0.35s ease both; }
  }
}
/* ---------- Readable type ----------
   Lora, a warm book serif that reads easily on screens, in place of Bistro's
   Baskerville. Italic is kept for recipe names only; everything you tap, headings
   and labels are upright, and labels are plain spaced capitals instead of small caps. */

:root[data-layout="cozy"] {
  --serif: "Lora", ui-serif, Georgia, serif;

  & :is(.mf-h2, .mf-btn, .mf-chip, .mf-seg button, .mf-link, .mf-see, .mf-tab, .mf-desc, .cozy-toggle button, .cozy-select select,
        .btn, .chip, .seg > button, .link, .tab, .h2, .h3, .topbar-title, .toast, .lead, .feed-note, .banner,
        .detail .section > .h2, .community :is(.post, #post) > .caption) { font-style: normal; }
  & :is(.mf-h2, .h2, .detail .section > .h2) { font-weight: 600; }
  & .mf-tab.is-active { font-weight: 700; }
  & .input::placeholder { font-style: normal; }
  & .mf-steps > li > .mf-num::before { font-style: normal; font-weight: 700; }
  & .mf-steps .amt { font-style: normal; font-weight: 600; }
  & :is(.mf-label, .mf-eyebrow, .mf-stats4 span, .mf-plank span, .mf-pill, .mf-status, .mf-card-meta,
        .label, .eyebrow, .group-name, .card-meta, .pill, .tag, .tag-check, .stat > span, .post .author .row-title) {
    font-size: 12px;
    font-weight: 600;
    font-variant: normal;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }
  /* Names stay names: a person's name in a post isn't a label. */
  & .community .author .row-title { font-size: 16px; font-weight: 700; letter-spacing: 0; text-transform: none; }
}

/* In dark mode, plum is too dark for marks drawn straight on the page (a saved
   bookmark, the unread dot, an on switch, the focus ring), so they take mustard. */
@media (prefers-color-scheme: dark) {
  :root[data-layout="cozy"]:not([data-theme="light"]) :is(.mf-round.is-on, .mf-badge-saved) { color: var(--mf-mustard-ink); }
  :root[data-layout="cozy"]:not([data-theme="light"]) :is(.mf-dot, .mf-red-dot, .mf-switch:checked) { background: var(--mf-mustard-ink); }
  :root[data-layout="cozy"]:not([data-theme="light"]) :focus-visible { outline-color: var(--mf-mustard-ink); }
}
:root[data-layout="cozy"][data-theme="dark"] :is(.mf-round.is-on, .mf-badge-saved) { color: var(--mf-mustard-ink); }
:root[data-layout="cozy"][data-theme="dark"] :is(.mf-dot, .mf-red-dot, .mf-switch:checked) { background: var(--mf-mustard-ink); }
:root[data-layout="cozy"][data-theme="dark"] :focus-visible { outline-color: var(--mf-mustard-ink); }

@keyframes cozy-fade { from { opacity: 0; } }
@keyframes cozy-rise { from { opacity: 0; transform: translateY(8px); } }

/* The layout menu's sample for Cozy. */
.layout-sample-cozy { border: 1px solid currentColor; border-radius: 18px; color: var(--mf-plum-ink); font: 600 25px/1 "Lora", ui-serif, Georgia, serif; }

/* Library cards stay about three-quarters size on wide screens: five across. */
@media (min-width: 1024px) {
  :root[data-layout="cozy"] .cards { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
