/* =====================================================================
   DEWDROP COLOR TOKENS
   Every Dewdrop component uses these. Defaults follow the theme's own variables
   (so the Fictioneer settings and the child theme palette flow through), and each
   one can be overridden in  Appearance > Customize > Dewdrop Colors.
   ===================================================================== */
:root {
  --dda-ink: var(--dd-navy, #0f2a66);                 /* titles / strong text on tints */
  --dda-line: var(--dd-navy, #0f2a66);                /* outlines */
  --dda-accent: var(--dd-sky, #2f93e3);               /* buttons, active tabs, progress */
  --dda-dew: var(--dd-dew, #6ec3f7);                  /* highlights, offset shadows */
  --dda-surface: color-mix(in srgb, var(--page-bg-color, #f8fbff) 60%, white);
  --dda-sky: color-mix(in srgb, var(--dda-accent) 12%, var(--dda-surface));    /* soft tint */
  --dda-soft: color-mix(in srgb, var(--dda-accent) 22%, var(--dda-surface));   /* dashed lines, tracks */
  --dda-field: color-mix(in srgb, var(--dda-accent) 8%, var(--dda-surface));   /* inputs */
  --dda-muted: color-mix(in srgb, currentColor 62%, transparent);
  --dda-ribbon: var(--dd-blush, #f4909f);
  --dda-clover: var(--dd-clover, #4f9a3a);
  --dda-ok: #1c8a4e;
  --dda-err: #c2334d;
  --dda-on-accent: #fff;
  --dda-on-drop: #0f2a66;                             /* number on the light-blue drop icon */
}
:root[data-mode=dark] {
  --dda-ink: var(--primary-400, #cfeaff);
  --dda-line: var(--primary-600, #3b78d4);
  --dda-surface: var(--page-bg-color, #121a2b);
  --dda-ok: #4cc38a;
  --dda-err: #ff7a90;
}
/* short aliases used throughout this file */
:root {
  --da-navy: var(--dda-ink); --da-blue: var(--dda-accent); --da-dew: var(--dda-dew); --da-sky: var(--dda-sky);
  --da-line: var(--dda-line); --da-bg: var(--dda-surface); --da-soft: var(--dda-soft); --da-field: var(--dda-field);
  --da-muted: var(--dda-muted); --da-ok: var(--dda-ok); --da-err: var(--dda-err); --da-clover: var(--dda-clover); --da-ribbon: var(--dda-ribbon);
}

/* Dewdrop account pages – pastel blue, matches the logo */
.dd-card, .dd-shelf, .dd-profile { font-family: inherit; color: inherit; }

.dd-card { background: var(--da-bg); border: 3px solid var(--da-line); border-radius: 22px; padding: 1.6rem; margin: 0 0 1.2rem; box-shadow: 0 6px 0 var(--da-sky); }
.dd-auth { max-width: 460px; margin: 1.5rem auto; }
.dd-title { margin: 0 0 .2rem; color: var(--da-navy); font-weight: 800; }
.dd-sub { margin: 0 0 1.1rem; color: var(--da-muted); font-size: .95em; }
.dd-card h3 { margin: 0 0 1rem; color: var(--da-navy); }

.dd-field { display: block; margin-bottom: 1rem; }
.dd-field > span:first-child { display: block; font-weight: 600; margin-bottom: .3rem; font-size: .92em; }
.dd-field small { color: var(--da-muted); font-weight: 400; }
.dd-field input, .dd-field textarea, .dd-tools input, .dd-tools select {
  width: 100%; box-sizing: border-box; padding: .7rem .85rem; background: var(--da-field); color: inherit;
  border: 2px solid transparent; border-radius: 12px; font: inherit; outline: none; transition: border-color .15s, box-shadow .15s;
}
.dd-field input:focus, .dd-field textarea:focus, .dd-tools input:focus, .dd-tools select:focus { border-color: var(--da-blue); box-shadow: 0 0 0 4px color-mix(in srgb, var(--da-blue) 22%, transparent); }
.dd-pw { position: relative; display: block; }
.dd-pw input { padding-right: 2.8rem; }
.dd-eye { position: absolute; right: .5rem; top: 50%; transform: translateY(-50%); background: none; border: 0; cursor: pointer; font-size: 1.1rem; opacity: .6; }
.dd-eye:hover { opacity: 1; }
.dd-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.1rem; font-size: .92em; }
.dd-check { display: flex; gap: .4rem; align-items: center; }
.dd-hp { position: absolute !important; left: -9999px; height: 0; width: 0; opacity: 0; }
.dd-captcha { margin-bottom: 1rem; }

.dd-btn { display: inline-block; width: 100%; padding: .8rem 1.2rem; border: 2px solid var(--da-line); border-radius: 999px; background: var(--da-blue); color: var(--dda-on-accent); font-weight: 700; font-size: 1rem; cursor: pointer; text-align: center; text-decoration: none; transition: transform .1s, box-shadow .1s; box-shadow: 0 4px 0 var(--da-navy); }
.dd-btn:hover { transform: translateY(-1px); }
.dd-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--da-navy); }
.dd-btn--ghost { width: auto; background: var(--da-sky); color: var(--da-navy); box-shadow: none; padding: .5rem 1.1rem; font-size: .9rem; }
.dd-foot { text-align: center; margin: 1.2rem 0 0; font-size: .9em; color: var(--da-muted); }

.dd-notice { padding: .7rem 1rem; border-radius: 12px; margin-bottom: 1rem; font-weight: 600; font-size: .92em; }
.dd-notice--err { background: color-mix(in srgb, var(--da-err) 12%, var(--da-bg)); color: var(--da-err); border: 2px solid var(--da-err); }
.dd-notice--ok { background: color-mix(in srgb, var(--da-ok) 12%, var(--da-bg)); color: var(--da-ok); border: 2px solid var(--da-ok); }

/* profile */
.dd-hero { display: flex; gap: 1.2rem; align-items: center; flex-wrap: wrap; }
.dd-avatar { border-radius: 50%; border: 3px solid var(--da-line); width: 96px; height: 96px; }
.dd-hero .dd-sub { margin-bottom: .6rem; }
.dd-chips { display: flex; gap: .5rem; flex-wrap: wrap; }
.dd-chips span { background: var(--da-sky); color: var(--da-navy); border-radius: 999px; padding: .25rem .8rem; font-size: .85em; }
.dd-hero-actions { margin-left: auto; display: flex; gap: .5rem; flex-wrap: wrap; }
.dd-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
@media (max-width: 760px) { .dd-grid2 { grid-template-columns: 1fr; } .dd-hero-actions { margin-left: 0; } }

/* bookshelf */
.dd-shelf-bar { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: space-between; align-items: center; margin-bottom: 1.2rem; }
.dd-tabs { display: flex; gap: .4rem; flex-wrap: wrap; }
.dd-tab { background: var(--da-sky); color: var(--da-navy); border: 2px solid transparent; border-radius: 999px; padding: .45rem 1rem; font: inherit; font-weight: 600; cursor: pointer; }
.dd-tab em { font-style: normal; opacity: .7; margin-left: .2rem; font-size: .85em; }
.dd-tab.is-on { background: var(--da-blue); color: var(--dda-on-accent); border-color: var(--da-line); }
.dd-tools { display: flex; gap: .5rem; }
.dd-tools input, .dd-tools select { width: auto; padding: .5rem .8rem; }
.dd-pane { display: none; }
.dd-pane.is-on { display: block; }
.dd-books { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 1.1rem; }
.dd-book { display: flex; flex-direction: column; gap: .3rem; text-decoration: none; color: inherit; background: var(--da-bg); border: 2px solid var(--da-line); border-radius: 16px; padding: .6rem; transition: transform .15s, box-shadow .15s; }
.dd-book:hover { transform: translateY(-3px); box-shadow: 0 6px 0 var(--da-sky); }
.dd-cover { display: block; aspect-ratio: 2 / 3; border-radius: 10px; overflow: hidden; background: var(--da-sky); }
.dd-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dd-nocover { display: grid; place-items: center; height: 100%; font-size: 2rem; }
.dd-book-title { font-weight: 700; font-size: .92em; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--da-navy); }
.dd-book-meta { font-size: .78em; color: var(--da-muted); }
.dd-bar { display: block; height: 7px; border-radius: 99px; background: var(--da-sky); overflow: hidden; }
.dd-bar i { display: block; height: 100%; background: var(--da-blue); border-radius: 99px; }
.dd-empty { text-align: center; padding: 2.5rem 1rem; color: var(--da-muted); }
.dd-bm-list { display: grid; gap: .7rem; }
.dd-bm { display: flex; flex-direction: column; gap: .4rem; padding: .8rem 1rem; border: 2px solid var(--da-line); border-radius: 14px; background: var(--da-bg); text-decoration: none; color: var(--da-navy); }

/* avatar upload */
.dd-avatar-box { display: flex; flex-direction: column; align-items: center; gap: .4rem; }
.dd-avatar-form { display: flex; flex-direction: column; align-items: center; gap: .5rem; }
.dd-avatar-pick { position: relative; display: block; cursor: pointer; border-radius: 50%; }
.dd-avatar-pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.dd-avatar { object-fit: cover; display: block; }
.dd-avatar-cam { position: absolute; right: -2px; bottom: -2px; background: var(--da-blue); border: 2px solid var(--da-line); border-radius: 50%; width: 32px; height: 32px; display: grid; place-items: center; font-size: .9rem; transition: transform .15s; }
.dd-avatar-pick:hover .dd-avatar-cam { transform: scale(1.12); }
.dd-link { background: none; border: 0; padding: 0; color: var(--da-muted); font-size: .8rem; text-decoration: underline; cursor: pointer; }
.dd-link:hover { color: var(--da-err); }

/* story page bar */
.dd-story-bar {
  display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin: 1rem 0; position: relative; z-index: 5; }
.dd-story-bar--float { position: fixed; left: 50%; transform: translateX(-50%); bottom: 14px; margin: 0; background: var(--da-bg); border: 2px solid var(--da-line); border-radius: 999px; padding: .4rem .6rem; box-shadow: 0 6px 18px color-mix(in srgb, var(--da-line) 25%, transparent); }
.dd-story-bar .dd-btn { width: auto; }
.dd-shelf-menu { position: relative; }
.dd-shelf-menu__list { position: absolute; left: 0; top: calc(100% + 6px); min-width: 190px; margin: 0; padding: .35rem; list-style: none; background: var(--da-bg); border: 2px solid var(--da-line); border-radius: 14px; box-shadow: 0 8px 20px color-mix(in srgb, var(--da-line) 20%, transparent); z-index: 20; }
.dd-story-bar--float .dd-shelf-menu__list { top: auto; bottom: calc(100% + 6px); }
.dd-shelf-menu__list[hidden] { display: none; }
.dd-shelf-menu__list button { display: block; width: 100%; text-align: left; background: none; border: 0; border-radius: 9px; padding: .5rem .7rem; font: inherit; color: inherit; cursor: pointer; }
.dd-shelf-menu__list button:hover { background: var(--da-sky); }
.dd-shelf-menu__list button.is-on { background: var(--da-blue); color: var(--dda-on-accent); font-weight: 700; }
.dd-shelf-menu__remove { border-top: 1px solid var(--da-sky); margin-top: .25rem; padding-top: .25rem; }
.dd-shelf-menu__remove button { color: var(--da-muted); font-size: .88em; }

/* shelf badges + filter */
.dd-cover { position: relative; }
.dd-badge { position: absolute; left: 6px; top: 6px; font-style: normal; font-size: .7rem; font-weight: 700; background: var(--da-blue); color: var(--dda-on-accent); border: 1.5px solid var(--da-line); border-radius: 99px; padding: .1rem .5rem; }
.dd-filter { margin-bottom: 1rem; }
.dd-filter button { border: 2px solid transparent; background: var(--da-sky); color: var(--da-navy); border-radius: 99px; padding: .25rem .8rem; font: inherit; font-size: .85em; cursor: pointer; }
.dd-filter button.is-on { background: var(--da-blue); color: var(--dda-on-accent); border-color: var(--da-line); }
.dd-hide-status { display: none !important; }

/* history */
.dd-hist-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.dd-hist-head .dd-sub { margin: 0; }
.dd-hist-head .dd-hero-actions { margin-left: 0; }
.dd-day { margin: 1.4rem 0 .6rem; color: var(--da-navy); font-size: 1rem; }
.dd-hist-row { display: flex; align-items: center; gap: .8rem; padding: .6rem .8rem; margin-bottom: .55rem; background: var(--da-bg); border: 2px solid var(--da-line); border-radius: 16px; }
.dd-hist-cover { flex: 0 0 48px; height: 64px; border-radius: 8px; overflow: hidden; background: var(--da-sky); display: grid; place-items: center; text-decoration: none; }
.dd-hist-cover img { width: 100%; height: 100%; object-fit: cover; }
.dd-hist-main { flex: 1; min-width: 0; text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: .15rem; }
.dd-hist-main b { color: var(--da-navy); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-hist-main span { font-size: .82em; color: var(--da-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-x { background: none; border: 0; color: var(--da-muted); cursor: pointer; font-size: 1rem; padding: .3rem .5rem; border-radius: 8px; }
.dd-x:hover { background: color-mix(in srgb, var(--da-err) 12%, var(--da-bg)); color: var(--da-err); }
.dd-pager { display: flex; justify-content: center; align-items: center; gap: 1rem; margin-top: 1.2rem; color: var(--da-muted); }
@media (max-width: 560px) { .dd-hist-go { display: none; } }

/* ====== Home sections (Dewdrop look: drops, waves, clover) ====== */
.dd-sec { margin: 0 0 2rem; }

.dd-sec__head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.dd-sec__title { margin: 0; display: flex; align-items: center; gap: .55rem; font-family: var(--ff-heading, inherit); font-weight: 700; font-size: clamp(1.2rem, 3.8vw, 1.6rem); color: var(--da-navy); line-height: 1.2; }
.dd-sec__drop { width: 1.15em; height: 1.15em; flex: 0 0 auto; background: var(--dd-drop-svg, none) center / contain no-repeat; filter: drop-shadow(0 2px 0 color-mix(in srgb, var(--da-line) 18%, transparent)); }
.dd-sec__wave { display: block; width: min(150px, 46%); height: 12px; margin: .25rem 0 .9rem 1.5rem; background: var(--dd-wave, none) center / 100% 100% no-repeat; }
.dd-sec__more { display: inline-flex; align-items: center; gap: .35rem; font-weight: 700; font-size: .82rem; color: var(--da-navy); background: var(--da-sky); border: 2px solid var(--da-line); border-radius: 99px; padding: .22rem .75rem; text-decoration: none; transition: transform .15s, background .15s; white-space: nowrap; }
.dd-sec__more:hover { background: var(--da-dew); transform: translateX(3px); }

/* --- Picks carousel --- */
.dd-car { position: relative; }
.dd-car__track { display: flex; gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: .5rem .3rem 1rem; -webkit-overflow-scrolling: touch; }
.dd-car__track::-webkit-scrollbar { display: none; }
.dd-pick { flex: 0 0 clamp(116px, 33vw, 150px); scroll-snap-align: start; display: flex; flex-direction: column; gap: .55rem; text-decoration: none; color: inherit; }
.dd-pick__art { position: relative; display: block; aspect-ratio: 2 / 3; border: 3px solid var(--da-line); border-radius: 14px 14px 14px 36px; overflow: hidden; background: var(--da-sky); box-shadow: 4px 5px 0 var(--da-dew); transition: transform .2s, box-shadow .2s; }
.dd-pick:hover .dd-pick__art { transform: translate(-2px, -3px); box-shadow: 6px 8px 0 var(--da-dew); }
.dd-pick__art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dd-pick__none { display: grid; place-items: center; height: 100%; font-size: 3rem; }
.dd-pick__clover { position: absolute; top: 6px; left: 6px; width: 26px; height: 26px; border-radius: 50%; background: var(--da-bg) var(--dd-clover-svg, none) center / 78% no-repeat; border: 2px solid var(--da-line); }
.dd-pick__title { font-family: var(--ff-heading, inherit); font-weight: 600; font-size: .9rem; line-height: 1.25; color: var(--da-navy); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; padding: 0 .2rem; }
.dd-pick__meta { display: flex; align-items: center; gap: .45rem; font-size: .72rem; color: var(--da-muted); padding: 0 .2rem; }
.dd-pick__meta em { font-style: normal; font-weight: 700; color: var(--da-navy); background: var(--da-soft); border-radius: 99px; padding: .08rem .55rem; }
.dd-car__btn { position: absolute; top: 38%; transform: translateY(-50%); z-index: 5; width: 44px; height: 44px; border-radius: 50% 50% 50% 10%; border: 2px solid var(--da-line); background: var(--da-dew); color: var(--da-navy); font-size: 1.6rem; line-height: 1; cursor: pointer; box-shadow: 3px 3px 0 var(--da-line); display: none; }
.dd-car__btn--prev { left: -14px; } .dd-car__btn--next { right: -14px; }
@media (hover: hover) and (min-width: 800px) { .dd-car__btn { display: grid; place-items: center; } }
.dd-car.at-start .dd-car__btn--prev, .dd-car.at-end .dd-car__btn--next { opacity: 0; pointer-events: none; }
.dd-car__prog { position: relative; height: 6px; border-radius: 99px; background: var(--da-soft); margin: 0 .3rem; overflow: hidden; }
.dd-car__prog i { position: absolute; top: 0; bottom: 0; left: 0; width: 30%; border-radius: 99px; background: var(--da-blue); transition: left .1s linear; }

/* --- Latest chapters: update stream --- */
.dd-feed { list-style: none; margin: 0; padding: 0 0 0 1.6rem; position: relative; display: grid; gap: .8rem; }
.dd-feed::before { content: ""; position: absolute; left: 7px; top: 14px; bottom: 14px; width: 0; border-left: 3px dotted var(--da-dew); }
.dd-feed__item { position: relative; margin: 0; }
.dd-feed__dot { position: absolute; left: -1.6rem; top: 18px; width: 16px; height: 16px; border-radius: 50%; background: var(--da-bg); border: 3px solid var(--da-blue); z-index: 1; }
.is-fresh > .dd-feed__dot { background: var(--da-blue); box-shadow: 0 0 0 0 color-mix(in srgb, var(--da-blue) 60%, transparent); animation: dd-ripple 2s infinite; }
@keyframes dd-ripple { 70% { box-shadow: 0 0 0 10px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .is-fresh > .dd-feed__dot { animation: none; } }
.dd-feed__card { display: flex; gap: .8rem; padding: .7rem .85rem; background: linear-gradient(135deg, var(--da-bg), color-mix(in srgb, var(--da-sky) 70%, var(--da-bg))); border: 2.5px solid var(--da-line); border-radius: 18px 18px 18px 5px; box-shadow: 3px 4px 0 var(--da-soft); }
.dd-feed__cover { flex: 0 0 58px; height: 78px; border-radius: 10px 10px 10px 20px; overflow: hidden; border: 2px solid var(--da-line); background: var(--da-sky); display: grid; place-items: center; text-decoration: none; }
.dd-feed__cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dd-feed__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .45rem; }
.dd-feed__top { display: flex; justify-content: space-between; align-items: baseline; gap: .8rem; }
.dd-feed__top h3 { margin: 0; font-family: var(--ff-heading, inherit); font-size: 1rem; line-height: 1.25; }
.dd-feed__top h3 a { color: var(--da-navy); text-decoration: none; }
.dd-feed__top time { flex: 0 0 auto; font-size: .75rem; font-weight: 600; color: var(--da-blue); }
.dd-feed__chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.dd-ch { display: inline-flex; align-items: baseline; gap: .5rem; max-width: 100%; padding: .2rem .65rem; border-radius: 99px; background: var(--da-bg); border: 2px solid var(--da-soft); color: inherit; text-decoration: none; font-size: .82rem; transition: border-color .15s, background .15s, transform .15s; }
.dd-ch:hover { border-color: var(--da-blue); background: var(--da-sky); transform: translateY(-1px); }
.dd-ch span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.dd-ch small { color: var(--da-muted); font-size: .72rem; white-space: nowrap; }
.dd-ch.is-new { border-color: var(--da-blue); }
.dd-ch.is-new span::after { content: " ●"; color: var(--da-blue); font-size: .6em; vertical-align: .15em; }

/* --- Most viewed: ranked list with bars --- */
.dd-ranks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(var(--rows, 5), auto); grid-auto-flow: column; gap: .55rem 1rem; }
.dd-rk { display: flex; align-items: center; gap: .65rem; min-width: 0; padding: .4rem .75rem .4rem .45rem; border-radius: 18px; border: 2px solid var(--da-soft); background: var(--da-bg); text-decoration: none; color: inherit; transition: border-color .15s, transform .15s; }
.dd-rk:hover { border-color: var(--da-blue); transform: translateX(3px); }
.dd-rk.is-top { border-color: var(--da-line); background: linear-gradient(135deg, var(--da-bg), color-mix(in srgb, var(--da-sky) 75%, var(--da-bg))); box-shadow: 3px 4px 0 var(--da-dew); }
.dd-rk__n { flex: 0 0 1.8rem; height: 1.8rem; border-radius: 50%; display: grid; place-items: center; background: var(--da-sky); color: var(--da-navy); font-family: var(--ff-heading, inherit); font-size: .85rem; }
.dd-rk.is-top .dd-rk__n { flex-basis: 2.1rem; height: 2.1rem; border-radius: 0; padding-top: .3rem; background: var(--dd-drop-svg, var(--da-sky)) center / contain no-repeat; color: var(--dda-on-drop); font-weight: 700; }
.dd-rk__cover { flex: 0 0 38px; height: 50px; border-radius: 8px; overflow: hidden; background: var(--da-sky); display: grid; place-items: center; }
.dd-rk.is-top .dd-rk__cover { flex-basis: 46px; height: 62px; border: 2px solid var(--da-line); }
.dd-rk__cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dd-rk__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .35rem; }
.dd-rk__title { font-weight: 700; font-size: .95rem; line-height: 1.25; color: var(--da-navy); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dd-rk__bar { display: flex; align-items: center; gap: .6rem; }
.dd-rk__track { flex: 1; min-width: 40px; height: 7px; border-radius: 99px; background: var(--da-soft); overflow: hidden; }
.dd-rk__track i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--da-dew), var(--da-blue)); }
.dd-rk__v { flex: 0 0 auto; font-weight: 700; font-size: .8rem; color: var(--da-muted); white-space: nowrap; }
.dd-rk__v small { font-weight: 500; }

@media (max-width: 760px) {
  .dd-ranks { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-auto-flow: row; gap: .5rem; }
  .dd-rk { padding: .4rem .6rem .4rem .4rem; }
  .dd-rk.is-top .dd-rk__cover { flex-basis: 42px; height: 56px; }
  .dd-feed__card { padding: .6rem; gap: .6rem; }
  .dd-feed__cover { flex-basis: 48px; height: 66px; }
  .dd-feed__top { flex-direction: column; gap: .1rem; }
  .dd-feed__top h3 { font-size: .95rem; }
  .dd-ch { font-size: .78rem; padding: .18rem .55rem; }
  .dd-ch small { display: none; }
}

/* ====== Mobile polish for account / shelf / story bar ====== */
@media (max-width: 600px) {
  .dd-card { padding: 1.1rem; border-radius: 18px; }
  .dd-auth { margin: 1rem auto; }
  .dd-field input, .dd-field textarea, .dd-tools input, .dd-tools select { font-size: 16px; min-height: 46px; } /* no iOS zoom */
  .dd-btn { min-height: 46px; }
  .dd-hero { flex-direction: column; text-align: center; }
  .dd-hero .dd-chips, .dd-hero-actions { justify-content: center; }
  .dd-hero-actions { width: 100%; margin: 0; }
  .dd-hero-actions .dd-btn { flex: 1; }
  .dd-hist-head { flex-direction: column; align-items: stretch; text-align: center; }
  .dd-hist-head .dd-hero-actions form { flex: 1; }
  .dd-hist-head .dd-hero-actions .dd-btn { width: 100%; }
  .dd-hist-row { gap: .6rem; padding: .5rem; }

  .dd-shelf-bar { flex-direction: column; align-items: stretch; }
  .dd-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .dd-tabs::-webkit-scrollbar { display: none; }
  .dd-tab { flex: 0 0 auto; white-space: nowrap; min-height: 40px; }
  .dd-tools { flex-direction: column; }
  .dd-tools input, .dd-tools select { width: 100%; }
  .dd-filter { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .dd-filter button { flex: 0 0 auto; white-space: nowrap; min-height: 36px; }
  .dd-books { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: .7rem; }
  .dd-book { padding: .45rem; border-radius: 14px; }

}

/* ====== Story bar: continue + shelf (v2, mobile-first dock) ====== */
.dd-sb-continue { display: inline-flex; align-items: center; gap: .65rem; min-width: 0; max-width: min(420px, 100%); text-align: left; padding: .5rem 1.2rem .5rem 1rem; }
.dd-sb-ico { flex: 0 0 auto; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: color-mix(in srgb, var(--dda-on-accent) 25%, transparent); font-size: .8rem; }
.dd-sb-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.dd-sb-main { font-weight: 800; }
.dd-sb-sub { font-weight: 500; font-size: .74rem; opacity: .92; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-sb-sub:empty { display: none; }
.dd-story-bar .dd-btn--ghost { display: inline-flex; align-items: center; gap: .45rem; text-decoration: none; }
.dd-tg-short, .dd-shelf-menu__head { display: none; }
.dd-sheet-backdrop { position: fixed; inset: 0; background: rgb(0 0 0 / 50%); z-index: 99998; }
.dd-sheet-backdrop[hidden] { display: none; }
html.dd-sheet-open { overflow: hidden; }

@media (max-width: 700px) {
  .dd-story-bar--dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 9999; margin: 0; display: flex; align-items: stretch; gap: .6rem; padding: .6rem .75rem calc(.6rem + env(safe-area-inset-bottom)); background: var(--da-bg); border-top: 2px solid var(--da-line); box-shadow: 0 -6px 18px color-mix(in srgb, var(--da-line) 20%, transparent); }
  .dd-story-bar--dock .dd-sb-continue { flex: 1 1 0; max-width: none; min-height: 52px; border-radius: 16px; }
  .dd-story-bar--dock .dd-shelf-menu { flex: 0 0 auto; position: static; display: flex; }
  .dd-story-bar--dock .dd-shelf-menu > .dd-btn, .dd-story-bar--dock > .dd-btn { width: auto; min-height: 52px; border-radius: 16px; padding: .4rem .95rem; gap: .35rem; justify-content: center; white-space: nowrap; }
  .dd-story-bar--dock .dd-btn--ghost { border: 2px solid var(--da-line); }
  .dd-story-bar--dock .dd-tg-full { display: none; }
  .dd-story-bar--dock .dd-tg-short { display: inline; }
  .dd-story-bar--dock .dd-tg-label { max-width: 7.5em; overflow: hidden; text-overflow: ellipsis; }
  body.dd-has-dock { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }

  .dd-shelf-menu__list { position: fixed; left: 0; right: 0; bottom: 0; top: auto; min-width: 0; z-index: 99999; margin: 0; border-radius: 22px 22px 0 0; border-width: 2px 0 0; padding: .3rem .7rem calc(.8rem + env(safe-area-inset-bottom)); max-height: 78vh; overflow-y: auto; box-shadow: 0 -12px 32px color-mix(in srgb, var(--da-line) 35%, transparent); }
  .dd-shelf-menu__head { display: block; position: relative; text-align: center; font-weight: 800; color: var(--da-navy); padding: 1.1rem 0 .6rem; }
  .dd-shelf-menu__head::before { content: ""; position: absolute; top: .45rem; left: 50%; width: 44px; height: 5px; margin-left: -22px; border-radius: 99px; background: var(--da-line); opacity: .3; }
  .dd-shelf-menu__list button { min-height: 52px; padding: .8rem 1rem; font-size: 1.02rem; border-radius: 12px; }
  .dd-shelf-menu__list button.is-on::after { content: " ✓"; }
}

/* ====== Bookshelf: grid / list view + mobile toolbar ====== */
.dd-viewbtn { flex: 0 0 auto; min-width: 42px; border: 2px solid var(--da-line); border-radius: 12px; background: var(--da-sky); color: var(--da-navy); font-size: 1.05rem; cursor: pointer; }
.dd-shelf.is-list .dd-books { grid-template-columns: 1fr; gap: .6rem; }
.dd-shelf.is-list .dd-book { display: grid; grid-template-columns: 64px minmax(0, 1fr); column-gap: .8rem; row-gap: .15rem; align-items: center; padding: .5rem; border-radius: 16px; }
.dd-shelf.is-list .dd-cover { grid-row: 1 / span 4; width: 64px; }
.dd-shelf.is-list .dd-book-title { font-size: 1rem; }
.dd-shelf.is-list .dd-bar { margin: .25rem 0; }
.dd-shelf.is-list .dd-badge { font-size: .6rem; padding: .05rem .4rem; left: 3px; top: 3px; }

@media (max-width: 700px) {
  .dd-shelf-bar { gap: .6rem; }
  .dd-tabs { gap: .4rem; padding-bottom: .2rem; }
  .dd-tab { min-height: 42px; padding: .4rem .95rem; }
  .dd-tools { flex-direction: row; flex-wrap: wrap; gap: .5rem; }
  .dd-tools input[type=search] { flex: 1 1 100%; width: 100%; }
  .dd-tools select { flex: 1 1 0; width: auto; min-width: 0; }
  .dd-viewbtn { min-height: 46px; min-width: 46px; }
  .dd-books { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
  .dd-bm { padding: .9rem 1rem; }
}

/* ====== Bookshelf hardening: theme-proof + mobile (v3) ====== */
.dd-shelf { display: block; width: 100%; max-width: 100%; min-width: 0; overflow-x: clip; }
.dd-shelf *, .dd-shelf *::before, .dd-shelf *::after { box-sizing: border-box; }
.dd-shelf a, .dd-shelf a:hover, .dd-shelf a:focus { text-decoration: none; }
.dd-shelf button { font-family: inherit; line-height: 1.2; letter-spacing: normal; text-transform: none; margin: 0; }
.dd-shelf .dd-shelf-bar { min-width: 0; }
.dd-shelf .dd-tabs { min-width: 0; max-width: 100%; }
.dd-shelf .dd-tab { color: var(--da-navy); }
.dd-shelf .dd-tab.is-on { color: var(--dda-on-accent); }
.dd-shelf .dd-tools input[type=search], .dd-shelf .dd-tools select { -webkit-appearance: none; appearance: none; height: 42px; border-radius: 12px; }
.dd-shelf .dd-book { color: inherit; min-width: 0; }
.dd-shelf .dd-book-title { color: var(--da-navy); }
.dd-shelf .dd-book-meta { color: var(--da-muted); }
.dd-shelf .dd-cover img { display: block; width: 100%; height: 100%; max-width: none; margin: 0; border-radius: 0; object-fit: cover; }
.dd-shelf .dd-books { min-width: 0; }
.dd-shelf .dd-pane { min-width: 0; }

@media (max-width: 700px) {
  .dd-shelf .dd-shelf-bar { display: flex; flex-direction: column; align-items: stretch; gap: .6rem; }
  .dd-shelf .dd-tabs { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding: .15rem 1.2rem .15rem 0; -webkit-mask-image: linear-gradient(to right, #000 88%, transparent); mask-image: linear-gradient(to right, #000 88%, transparent); }
  .dd-shelf .dd-tabs::-webkit-scrollbar { display: none; }
  .dd-shelf .dd-tab { flex: 0 0 auto; scroll-snap-align: center; white-space: nowrap; min-height: 42px; }
  .dd-shelf .dd-tools { display: flex; flex-direction: row; flex-wrap: wrap; gap: .5rem; width: 100%; }
  .dd-shelf .dd-tools input[type=search] { flex: 1 1 100%; width: 100%; min-width: 0; height: 46px; }
  .dd-shelf .dd-tools select { flex: 1 1 0; width: auto; min-width: 0; height: 46px; }
  .dd-shelf .dd-viewbtn { height: 46px; }
  .dd-shelf .dd-filter { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: .2rem; }
  .dd-shelf .dd-books { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: .65rem; }
  .dd-shelf.is-list .dd-books { grid-template-columns: minmax(0, 1fr); }
}

/* ====== Clickable status tags (Ongoing / Completed / ...) ====== */
.dd-status { position: relative; z-index: 3; color: inherit; cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; padding: 0 .2em; margin: 0 -.2em; border-radius: 6px; transition: background .15s, color .15s; }
.dd-status:hover, .dd-status:focus-visible { background: var(--dda-sky); color: var(--dda-ink); text-decoration-style: solid; outline: none; }

/* ====== Browse by status page ====== */
.dd-browse .dd-title { margin-bottom: 1rem; }
.dd-browse-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.3rem; }
.dd-browse-chips a { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .95rem; border: 2px solid var(--da-line); border-radius: 99px; background: var(--da-sky); color: var(--da-navy); font-weight: 700; text-decoration: none; transition: transform .15s, background .15s; }
.dd-browse-chips a em { font-style: normal; font-weight: 600; font-size: .78rem; opacity: .75; }
.dd-browse-chips a:hover { transform: translateY(-2px); }
.dd-browse-chips a.is-on { background: var(--da-blue); color: var(--dda-on-accent); box-shadow: 0 3px 0 var(--da-line); }
@media (max-width: 700px) { .dd-browse-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: .2rem; } .dd-browse-chips a { flex: 0 0 auto; min-height: 40px; } }

/* ====== Covers are links: never let a lightbox / image-zoom handler grab the click ====== */
.dd-sec a img, .dd-shelf a img, .dd-hist-row a img, .dd-mv img, .dd-rk img { pointer-events: none; -webkit-user-drag: none; user-select: none; }

/* ====== Translation progress ====== */
.dd-prog { display: flex; flex-direction: column; gap: .25rem; margin-top: .35rem; max-width: 100%; }
.dd-prog__bar { display: block; height: 8px; border-radius: 99px; background: var(--dda-soft); overflow: hidden; border: 1.5px solid var(--dda-line); }
.dd-prog__bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--dda-dew), var(--dda-accent)); }
.dd-prog__txt { font-size: .78rem; font-weight: 600; color: var(--dda-muted); }
.dd-prog--sm .dd-prog__bar { height: 6px; border-width: 1px; }
.dd-prog--sm .dd-prog__txt { font-size: .7rem; }
.dd-prog--card { margin: .6rem 0 .2rem; }
.dd-prog-wrap { max-width: 460px; margin: .6rem 0 .8rem; }
.dd-prog-wrap .dd-prog__bar { height: 10px; }
.dd-prog-wrap .dd-prog__txt { font-size: .85rem; }
.dd-shelf.is-list .dd-prog { margin-top: .2rem; }

/* ====== Bottom navigation (phones) ====== */
.dd-bnav { display: none; }
@media (max-width: 700px) {
  .dd-bnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 9990; display: flex; padding: .35rem .4rem calc(.35rem + env(safe-area-inset-bottom)); background: var(--dda-surface); border-top: 2px solid var(--dda-line); border-radius: 18px 18px 0 0; box-shadow: 0 -6px 18px color-mix(in srgb, var(--dda-line) 20%, transparent); }
  .dd-bnav__i { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: .15rem; padding: .35rem .2rem; min-height: 52px; border-radius: 14px; color: var(--dda-ink); text-decoration: none; font-size: .7rem; font-weight: 700; opacity: .75; transition: background .15s, opacity .15s; -webkit-tap-highlight-color: transparent; }
  .dd-bnav__i svg { width: 24px; height: 24px; }
  .dd-bnav__i.is-on { opacity: 1; background: var(--dda-sky); color: var(--dda-accent); }
  .dd-bnav__i:active { background: var(--dda-soft); }
  body.dd-has-bnav { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
}

/* ====== 404 ====== */
.dd-404 { text-align: center; padding: 2rem 1rem 2.5rem; max-width: 560px; margin: 0 auto; }
.dd-404__art { width: min(260px, 70%); margin: 0 auto .5rem; animation: dd-bob 3.2s ease-in-out infinite; }
.dd-404__art svg { display: block; width: 100%; height: auto; overflow: visible; }
@keyframes dd-bob { 50% { transform: translateY(-8px) rotate(-1.5deg); } }
@media (prefers-reduced-motion: reduce) { .dd-404__art { animation: none; } }
.dd-404__code { margin: 0; font-family: var(--ff-heading, inherit); font-weight: 800; font-size: 1rem; letter-spacing: .3em; color: var(--dda-accent); }
.dd-404__title { margin: .2rem 0 .6rem; font-family: var(--ff-heading, inherit); font-size: clamp(1.5rem, 5vw, 2.1rem); color: var(--dda-ink); }
.dd-404__text { margin: 0 auto 1.4rem; max-width: 42ch; color: var(--dda-muted); }
.dd-404__btns { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; margin-bottom: 1.3rem; }
.dd-404__btns .dd-btn { width: auto; text-decoration: none; padding: .6rem 1.3rem; }
.dd-404__search { display: flex; gap: .5rem; max-width: 420px; margin: 0 auto; }
.dd-404__search input { flex: 1; min-width: 0; padding: .65rem .9rem; border: 2px solid var(--dda-soft); border-radius: 99px; background: var(--dda-field); color: inherit; font: inherit; font-size: 16px; }
.dd-404__search input:focus { outline: none; border-color: var(--dda-accent); }
.dd-404__search .dd-btn { width: auto; padding: .6rem 1.2rem; }
@media (max-width: 480px) { .dd-404__search { flex-direction: column; } .dd-404__search .dd-btn { width: 100%; } }

/* ====== Home page: no translation progress bars in the sections ====== */
.dd-sec .dd-prog { display: none; }

/* ====== Home page: compact phone layout (v2) ====== */
@media (max-width: 820px) {
  .dd-sec { margin-bottom: 1.2rem; }
  .dd-sec__title { font-size: 1.12rem; gap: .4rem; }
  .dd-sec__drop { width: 1em; height: 1em; }
  .dd-sec__wave { width: 96px; height: 9px; margin: .1rem 0 .6rem 1.25rem; }
  .dd-sec__more { font-size: .72rem; padding: .12rem .6rem; border-width: 1.5px; }

  /* Recommended: smaller covers, more visible at once */
  .dd-car__track { gap: .6rem; padding: .3rem .2rem .6rem; }
  .dd-pick { flex-basis: clamp(88px, 27vw, 108px); gap: .35rem; }
  .dd-pick__art { border-width: 2px; border-radius: 10px 10px 10px 22px; box-shadow: 3px 3px 0 var(--da-dew); }
  .dd-pick__clover { width: 20px; height: 20px; top: 4px; left: 4px; border-width: 1.5px; }
  .dd-pick__title { font-size: .76rem; line-height: 1.2; padding: 0; }
  .dd-pick__meta { font-size: .64rem; padding: 0; gap: .3rem; }
  .dd-pick__meta em { padding: .03rem .4rem; }
  .dd-car__prog { height: 4px; }

  /* Latest chapters: slim timeline cards */
  .dd-feed { padding-left: 1.1rem; gap: .55rem; }
  .dd-feed::before { left: 4px; border-left-width: 2px; }
  .dd-feed__dot { left: -1.1rem; top: 14px; width: 11px; height: 11px; border-width: 2px; }
  .dd-feed__card { padding: .45rem .55rem; gap: .5rem; border-width: 2px; border-radius: 14px 14px 14px 4px; box-shadow: 2px 3px 0 var(--da-soft); }
  .dd-feed__cover { flex-basis: 38px; height: 52px; border-width: 1.5px; border-radius: 8px 8px 8px 14px; }
  .dd-feed__main { gap: .3rem; }
  .dd-feed__top { flex-direction: row; align-items: baseline; gap: .4rem; }
  .dd-feed__top h3 { font-size: .85rem; line-height: 1.2; min-width: 0; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
  .dd-feed__top time { font-size: .66rem; }
  .dd-feed__chips { gap: .3rem; }
  .dd-ch { font-size: .68rem; padding: .1rem .45rem; border-width: 1.5px; }
  .dd-ch small { display: none; }
  .dd-feed__chips .dd-ch:nth-child(n+3) { display: none; } /* 2 newest chapters per novel on phones */

  /* Most viewed: tight rows */
  .dd-ranks { gap: .35rem; }
  .dd-rk { gap: .45rem; padding: .3rem .5rem .3rem .35rem; border-radius: 14px; border-width: 1.5px; }
  .dd-rk.is-top { box-shadow: 2px 3px 0 var(--da-dew); }
  .dd-rk__n, .dd-rk.is-top .dd-rk__n { flex: 0 0 1.5rem; height: 1.5rem; font-size: .72rem; }
  .dd-rk.is-top .dd-rk__n { padding-top: .2rem; }
  .dd-rk__cover, .dd-rk.is-top .dd-rk__cover { flex-basis: 32px; height: 43px; border-radius: 6px; border-width: 1.5px; }
  .dd-rk__main { gap: .2rem; }
  .dd-rk__title { font-size: .8rem; line-height: 1.2; -webkit-line-clamp: 1; }
  .dd-rk__track { height: 5px; }
  .dd-rk__v { font-size: .68rem; }
}

@media (max-width: 380px) {
  .dd-pick { flex-basis: 86px; }
  .dd-rk__v small { display: none; }
}

/* ====== No translation progress bars anywhere ====== */
.dd-prog, .dd-prog-wrap, [data-dd-story-prog] { display: none !important; }

/* ====== Phones: story page, chapter lists, frame, header, footer (v1) ====== */
@media (max-width: 820px) {
  /* page frame */
  .main__background { border-width: 1.5px; }
  .header::after, .footer::before { height: 22px; }
  .header .custom-logo, .dewdrop-logo-link img { max-height: 92px; width: auto; max-width: 62vw; }

  /* story header: cover left, title right, no overlap with the header wave */
  .story__header, .story__thumbnail { margin-top: 0 !important; }
  .story__thumbnail { max-width: 110px; }
  .story__identity { padding-top: .4rem; }
  .story__identity h1, .story__title { font-size: clamp(1.15rem, 5.6vw, 1.5rem) !important; line-height: 1.2; overflow-wrap: anywhere; }
  .story__identity-meta, .story__author { font-size: .85rem; }

  /* summary text and meta lines */
  .story__summary, .story__summary p { font-size: .95rem; line-height: 1.55; }
  .story__summary summary, .story__summary details > summary { font-size: 1rem; }

  /* action buttons wrap instead of overflowing */
  .story__actions, .story__actions-wrapper, .story__after-summary { flex-wrap: wrap; gap: .5rem; }
  .story__actions .button, .story__after-summary .button { min-height: 42px; font-size: .88rem; padding-inline: .9rem; }

  /* chapter list */
  .chapter-group__list-item, .chapter-group__list li { padding: .1rem 0; }
  .chapter-group__list-item > a, .chapter-group__list-item .chapter-group__list-item-link { padding: .5rem .7rem; }
  .chapter-group__list-item-title, .chapter-group__list-item a > span:first-child { font-size: .92rem; line-height: 1.25; }
  .chapter-group__list-item-subrow, .chapter-group__list-item small { font-size: .72rem; }
  .story__chapter-list .tag-group, .story__tags { gap: .3rem; }
  .tag, .story__tags a { font-size: .74rem; padding: .1rem .5rem; }

  /* story footer meta row (Ongoing / date / words / rating) */
  .story__footer, .story__meta { flex-wrap: wrap; gap: .4rem .9rem; font-size: .8rem; justify-content: flex-start; }

  /* comments, breadcrumbs, footer */
  .comment-section__title, .comments-title { font-size: 1.05rem; }
  .breadcrumbs, .footer__menu, .footer__copyright { font-size: .78rem; }
  .footer__menu { flex-wrap: wrap; gap: .3rem .8rem; }

  /* cards on list / search pages */
  .card__title { font-size: 1rem; }
  .card__body { padding: .7rem; }
  .card__excerpt, .card__description { font-size: .85rem; }
}

/* ====== Phones & small tablets: global page frame, header, spacing (v1) ====== */
@media (max-width: 820px) {
  :root, .header { --header-height: 140px; --page-inset-top: 1.5rem; --layout-spacing-horizontal: 16px; --layout-spacing-horizontal-small: 12px; --layout-spacing-vertical: 1.25rem; }
  .main__wrapper { padding-left: 14px !important; padding-right: 14px !important; }
  .header .custom-logo { max-height: 104px; }
  .singular__header h1, .archive__heading, .page__title, .dd-page-title { font-size: clamp(1.35rem, 6vw, 1.8rem) !important; line-height: 1.2; }
  .content-section h2:not(.no-theme-style) { font-size: 1.2rem; }
  .footer__wrapper { margin-top: 20px; }
  .footer__split-row { gap: 4px; }
}

/* ====== Phones & small tablets: Profile, Bookshelf, History, login (v1) ====== */
@media (max-width: 820px) {
  .dd-card { padding: 1rem; border-radius: 16px; border-width: 2px; margin-bottom: .9rem; box-shadow: 0 4px 0 var(--da-sky); }
  .dd-title { font-size: 1.25rem; }
  .dd-sub { font-size: .85rem; margin-bottom: .7rem; }
  .dd-field { margin-bottom: .8rem; }
  .dd-field input, .dd-field textarea { padding: .6rem .75rem; font-size: 16px; }
  .dd-btn { padding: .65rem 1rem; font-size: .95rem; }
  .dd-btn--ghost { padding: .4rem .85rem; font-size: .82rem; }
  .dd-auth { margin: .5rem auto; }

  /* Profile */
  .dd-grid2 { grid-template-columns: minmax(0, 1fr); gap: .9rem; }
  .dd-hero { flex-direction: column; align-items: center; text-align: center; gap: .7rem; }
  .dd-hero > div:not(.dd-avatar-box):not(.dd-hero-actions) { width: 100%; }
  .dd-avatar { width: 80px; height: 80px; }
  .dd-avatar-cam { width: 28px; height: 28px; }
  .dd-hero .dd-title { font-size: 1.3rem; }
  .dd-chips { justify-content: center; gap: .35rem; }
  .dd-chips span { font-size: .75rem; padding: .18rem .6rem; }
  .dd-hero-actions { width: 100%; margin: 0; justify-content: center; gap: .4rem; }
  .dd-hero-actions .dd-btn { flex: 1 1 auto; text-align: center; }
  .dd-grid2 .dd-card h3 { font-size: 1.1rem; margin-bottom: .7rem; }
  .dd-grid2 textarea { min-height: 96px; }

  /* Bookshelf */
  .dd-shelf .dd-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: .35rem; }
  .dd-shelf .dd-tabs::-webkit-scrollbar { display: none; }
  .dd-tab { padding: .3rem .8rem; font-size: .85rem; min-height: 36px; }
  .dd-filter button { font-size: .78rem; padding: .2rem .65rem; }
  .dd-shelf .dd-books { grid-template-columns: repeat(auto-fill, minmax(98px, 1fr)); gap: .55rem; }
  .dd-book { padding: .35rem; gap: .2rem; border-radius: 12px; border-width: 1.5px; }
  .dd-cover { border-radius: 8px; }
  .dd-book-title { font-size: .76rem; line-height: 1.2; }
  .dd-book-meta { font-size: .65rem; }
  .dd-badge { font-size: .56rem; padding: .03rem .38rem; left: 3px; top: 3px; }
  .dd-bar { height: 5px; }
  .dd-shelf.is-list .dd-book { grid-template-columns: 52px minmax(0, 1fr); }
  .dd-shelf.is-list .dd-cover { width: 52px; }

  /* History */
  .dd-hist-head { flex-direction: column; align-items: stretch; gap: .6rem; }
  .dd-hist-head h2, .dd-hist-head .dd-title { font-size: 1.2rem; }
  .dd-hist-head .dd-hero-actions { justify-content: stretch; }
  .dd-day { margin: 1rem 0 .4rem; font-size: .9rem; }
  .dd-hist-row { gap: .55rem; padding: .4rem .5rem; margin-bottom: .4rem; border-radius: 12px; border-width: 1.5px; }
  .dd-hist-cover { flex-basis: 36px; height: 48px; border-radius: 6px; }
  .dd-hist-main b { font-size: .86rem; }
  .dd-hist-main span { font-size: .7rem; }
  .dd-hist-row .dd-btn, .dd-hist-go { padding: .28rem .7rem; font-size: .74rem; min-height: 0; }
  .dd-x { padding: .2rem .4rem; }
}
@media (max-width: 560px) { .dd-hist-go { display: none; } }

/* bottom nav is gone, in case anything is cached */
.dd-bnav { display: none !important; }
body.dd-has-bnav { padding-bottom: 0 !important; }

/* carousel dots + pause button (story page) */
.dd-car__ctl { display: flex; align-items: center; justify-content: center; gap: .45rem; margin-top: .7rem; }
.dd-car__dot { width: 10px; height: 10px; padding: 0; border-radius: 50%; border: 0; background: var(--da-soft); cursor: pointer; transition: background .15s, transform .15s; }
.dd-car__dot.is-on { background: var(--da-blue); transform: scale(1.2); }
.dd-car__pause { display: inline-flex; align-items: center; justify-content: center; gap: 3px; width: 28px; height: 28px; margin-left: .35rem; padding: 0; border-radius: 50%; border: 2px solid var(--da-line); background: var(--da-sky); cursor: pointer; }
.dd-car__pause i { width: 3px; height: 11px; border-radius: 2px; background: var(--da-navy); }
.dd-car__pause.is-paused i:first-child { width: 0; height: 0; border-radius: 0; background: none; border-left: 9px solid var(--da-navy); border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
.dd-car__pause.is-paused i:last-child { display: none; }
