/* Public reader activity panel */
:root {
    --primary-font: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.reader-stats-nav-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    min-height: 2.35rem;
    padding: 0.5rem 0.8rem;
    border: 1px solid rgba(139, 105, 20, 0.32);
    border-radius: var(--border-radius, 6px);
    background: #fdf6ec;
    color: var(--primary-color, #8b6914);
    font: 600 0.9rem/1.1 var(--primary-font);
    cursor: pointer;
}

.reader-stats-nav-trigger:hover,
.reader-stats-nav-trigger[aria-expanded="true"] {
    background: var(--primary-color, #8b6914);
    color: #ffffff;
}

.reader-stats-nav-trigger:focus-visible {
    outline: 3px solid var(--accent-color, #b8742a);
    outline-offset: 2px;
}

.reader-stats-nav-trigger svg {
    width: 1rem;
    height: 1rem;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.reader-stats-launcher {
    position: fixed;
    right: 0.55rem;
    bottom: 2.7rem;
    z-index: 8600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.45rem;
    height: 2.45rem;
    padding: 0;
    border: 1px solid rgba(212, 175, 55, 0.92);
    border-radius: 50%;
    background: #2c1810;
    color: #ffffff;
    box-shadow: 0 5px 15px rgba(31, 16, 10, 0.28);
    font: 700 0.88rem/1 var(--primary-font);
    cursor: pointer;
    opacity: 0.82;
    transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.reader-stats-has-nav-trigger .reader-stats-launcher {
    display: none;
}

.reader-stats-launcher svg {
    width: 1.12rem;
    height: 1.12rem;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.reader-stats-launcher span {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.reader-stats-launcher:hover,
.reader-stats-launcher[aria-expanded="true"] {
    background: #6f3519;
    box-shadow: 0 7px 18px rgba(31, 16, 10, 0.36);
    opacity: 1;
    transform: translateY(-1px);
}

.reader-stats-launcher:focus-visible,
.reader-stats-close:focus-visible,
.reader-stats-retry:focus-visible {
    outline: 3px solid #ffffff;
    outline-offset: 3px;
}

.reader-stats-panel {
    position: fixed;
    right: 1.15rem;
    bottom: 5.7rem;
    z-index: 8590;
    width: min(46rem, calc(100vw - 2rem));
    max-height: min(42rem, calc(100vh - 7rem));
    overflow: hidden;
    border: 1px solid rgba(79, 42, 24, 0.24);
    border-radius: 18px;
    background: #fffaf2;
    color: #2c1810;
    box-shadow: 0 24px 70px rgba(31, 16, 10, 0.32);
    font-family: var(--primary-font);
    animation: reader-stats-enter 0.2s ease-out;
}

.reader-stats-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1rem 0.9rem 1.15rem;
    border-bottom: 1px solid rgba(79, 42, 24, 0.15);
    background: linear-gradient(135deg, #2c1810 0%, #6f3519 100%);
    color: #ffffff;
}

.reader-stats-header h2 {
    display: flex;
    align-items: baseline;
    gap: 0.45rem;
    margin: 0.14rem 0 0;
    color: #ffffff;
    font-size: 1.36rem;
    line-height: 1.15;
}

.reader-stats-header > div {
    flex: 1 1 auto;
    min-width: 0;
}

.reader-stats-header-notes {
    display: flex;
    flex: 1 1 auto;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.8rem;
    min-width: 0;
}

.reader-stats-nonunique {
    color: rgba(255, 255, 255, 0.76);
    font-size: 0.62rem;
    font-weight: 400;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.reader-stats-header-credit {
    margin-left: auto;
    color: rgba(255, 255, 255, 0.67);
    font-size: 0.62rem;
    font-weight: 400;
    letter-spacing: 0.01em;
    text-align: right;
    white-space: nowrap;
}

.reader-stats-header-credit a {
    color: rgba(255, 255, 255, 0.88);
    text-decoration-color: rgba(255, 255, 255, 0.48);
    text-underline-offset: 0.12em;
}

.reader-stats-header-credit a:hover {
    color: #ffffff;
}

.reader-stats-header-credit a:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
    border-radius: 2px;
}

.reader-stats-header p {
    color: rgba(255, 255, 255, 0.82);
}

.reader-stats-kicker {
    margin: 0 !important;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.reader-stats-close {
    flex: 0 0 auto;
    width: 2.2rem;
    height: 2.2rem;
    border: 1px solid rgba(255, 255, 255, 0.38);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.11);
    color: #ffffff;
    font: 400 1.65rem/1 var(--primary-font);
    cursor: pointer;
}

.reader-stats-close:hover {
    background: rgba(255, 255, 255, 0.22);
}

.reader-stats-body {
    max-height: calc(min(42rem, 100vh - 7rem) - 6.15rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 1rem 1.1rem 1.1rem;
    scrollbar-width: thin;
    scrollbar-color: #b8742a transparent;
}

.reader-stats-loading {
    min-height: 12rem;
    display: grid;
    place-items: center;
    color: #6f3519;
    font-size: 0.92rem;
}

.reader-stats-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.5rem;
}

.reader-stats-metrics--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.reader-stats-metrics--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.reader-stats-metric {
    min-width: 0;
    padding: 0.62rem 0.32rem;
    border: 1px solid rgba(139, 69, 19, 0.18);
    border-radius: 10px;
    background: #f3e8d8;
    text-align: center;
}

.reader-stats-metric strong,
.reader-stats-metric span {
    display: block;
}

.reader-stats-metric strong {
    color: #6f3519;
    font-size: 1.12rem;
    line-height: 1;
}

.reader-stats-metric span {
    margin-top: 0.32rem;
    color: #573326;
    font-size: 0.66rem;
    line-height: 1.15;
}

.reader-stats-section {
    margin-top: 1rem;
}

.reader-stats-map-tabs {
    margin-top: 1rem;
}

.reader-stats-tab-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.3rem;
    padding: 0.28rem;
    border: 1px solid rgba(139, 69, 19, 0.16);
    border-radius: 11px;
    background: #eee1cf;
}

.reader-stats-tab {
    min-height: 2.35rem;
    padding: 0.5rem 0.75rem;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #65483c;
    font: 700 0.84rem/1.2 var(--primary-font);
    cursor: pointer;
}

.reader-stats-tab:hover {
    background: rgba(255, 250, 242, 0.62);
}

.reader-stats-tab[aria-selected="true"] {
    background: #fffaf2;
    color: #6f3519;
    box-shadow: 0 1px 4px rgba(79, 42, 24, 0.18);
}

.reader-stats-tab:focus-visible {
    outline: 3px solid #b8742a;
    outline-offset: 2px;
}

.reader-stats-tab-panel .reader-stats-section {
    margin-top: 0.75rem;
}

.reader-stats-tab-panel > .reader-stats-metrics {
    margin-top: 0.75rem;
}

.reader-trends-panel {
    padding-top: 0.8rem;
}

.reader-trends-view-tabs {
    display: inline-grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: min(15rem, 100%);
    margin-bottom: 0.8rem;
    padding: 0.2rem;
    border: 1px solid rgba(139, 69, 19, 0.18);
    border-radius: 9px;
    background: #f2e7d7;
}

.reader-trends-view-tab {
    min-height: 2rem;
    padding: 0.38rem 0.75rem;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #65483c;
    font: 700 0.75rem/1.2 var(--primary-font);
    cursor: pointer;
}

.reader-trends-view-tab:hover {
    background: rgba(255, 250, 242, 0.58);
}

.reader-trends-view-tab[aria-selected="true"] {
    background: #fffaf2;
    color: #6f3519;
    box-shadow: 0 1px 3px rgba(79, 42, 24, 0.18);
}

.reader-trends-view-tab:focus-visible {
    outline: 3px solid #b8742a;
    outline-offset: 2px;
}

.reader-trends-view-panel[hidden] {
    display: none;
}

.reader-trends-controls {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(0, 0.85fr));
    gap: 0.6rem;
}

.reader-playback-controls {
    grid-template-columns: minmax(0, 1.35fr) repeat(3, minmax(0, 0.78fr));
}

.reader-trends-control {
    min-width: 0;
    color: #65483c;
    font-size: 0.68rem;
    font-weight: 700;
}

.reader-trends-control span {
    display: block;
    margin: 0 0 0.25rem 0.12rem;
}

.reader-trends-control select {
    width: 100%;
    min-height: 2.25rem;
    padding: 0.42rem 1.75rem 0.42rem 0.55rem;
    border: 1px solid rgba(139, 69, 19, 0.28);
    border-radius: 8px;
    background: #fffaf2;
    color: #45261b;
    font: 400 0.76rem/1.2 var(--primary-font);
}

.reader-trends-control select:focus-visible {
    outline: 3px solid #b8742a;
    outline-offset: 2px;
}

.reader-playback-transport {
    display: grid;
    grid-template-columns: auto minmax(8rem, 1fr) auto;
    align-items: end;
    gap: 0.7rem;
    margin-top: 0.8rem;
}

.reader-playback-toggle {
    min-width: 4.6rem;
    min-height: 2.25rem;
    padding: 0.45rem 0.75rem;
    border: 0;
    border-radius: 8px;
    background: #6f3519;
    color: #ffffff;
    font: 700 0.76rem/1 var(--primary-font);
    cursor: pointer;
}

.reader-playback-toggle:hover {
    background: #8b4513;
}

.reader-playback-toggle:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.reader-playback-toggle:focus-visible,
.reader-playback-slider input:focus-visible {
    outline: 3px solid #b8742a;
    outline-offset: 2px;
}

.reader-playback-slider {
    min-width: 0;
    color: #65483c;
    font-size: 0.66rem;
    font-weight: 700;
}

.reader-playback-slider span {
    display: block;
    margin-bottom: 0.28rem;
}

.reader-playback-slider input {
    display: block;
    width: 100%;
    accent-color: #8b4513;
}

.reader-playback-date {
    min-width: 5rem;
    padding-bottom: 0.28rem;
    color: #59301f;
    font-size: 0.75rem;
    font-weight: 700;
    text-align: right;
    white-space: nowrap;
}

.reader-playback-readout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
    margin-top: 0.65rem;
}

.reader-playback-metric {
    display: flex;
    align-items: baseline;
    gap: 0.42rem;
    padding: 0.42rem 0.58rem;
    border: 1px solid rgba(139, 69, 19, 0.14);
    border-radius: 8px;
    background: #f7ecdc;
    color: #65483c;
}

.reader-playback-metric strong {
    color: #6f3519;
    font-size: 1rem;
}

.reader-playback-metric small {
    font-size: 0.64rem;
    line-height: 1.2;
}

.reader-playback-legend {
    margin-top: 0.6rem;
}

.reader-trends-legend {
    display: flex;
    justify-content: flex-end;
    gap: 0.85rem;
    margin: 0.75rem 0 0.35rem;
    color: #65483c;
    font-size: 0.68rem;
}

.reader-trends-key::before {
    display: inline-block;
    width: 0.65rem;
    height: 0.65rem;
    margin-right: 0.3rem;
    border-radius: 2px;
    content: '';
    vertical-align: -0.05rem;
}

.reader-trends-key--visits::before {
    background: #6f3519;
}

.reader-trends-key--downloads::before {
    background: #d88a2d;
}

.reader-trends-chart {
    min-height: 14.5rem;
    border: 1px solid rgba(139, 69, 19, 0.18);
    border-radius: 12px;
    background: #fffaf2;
}

.reader-trends-chart-frame {
    display: flex;
    min-width: 0;
}

.reader-trends-y-axis {
    display: flex;
    flex: 0 0 2.2rem;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    height: 10.3rem;
    margin: 0.8rem 0 2.85rem 0.35rem;
    padding-right: 0.42rem;
    border-right: 1px solid rgba(139, 69, 19, 0.24);
    color: #76584b;
    font-size: 0.58rem;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.reader-trends-chart-scroll {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0.8rem 0.65rem 0.35rem;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
    scrollbar-color: #b8742a transparent;
}

.reader-trends-chart-plot {
    position: relative;
    display: flex;
    align-items: stretch;
    height: 12.8rem;
}

.reader-trends-chart-plot::before {
    position: absolute;
    inset: 0 0 2.5rem;
    z-index: 0;
    background: repeating-linear-gradient(
        to bottom,
        rgba(139, 69, 19, 0.1) 0,
        rgba(139, 69, 19, 0.1) 1px,
        transparent 1px,
        transparent 25%
    );
    pointer-events: none;
    content: '';
}

.reader-trends-column {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-rows: minmax(0, 1fr) 2.5rem;
    flex: 1 0 0;
    min-width: 2rem;
    border-radius: 4px;
}

.reader-trends-column:hover,
.reader-trends-column:focus-visible {
    background: rgba(184, 116, 42, 0.09);
}

.reader-trends-column--current {
    background: rgba(184, 116, 42, 0.13);
    box-shadow: inset 0 0 0 1px rgba(184, 116, 42, 0.34);
}

.reader-trends-column--future .reader-trends-date {
    opacity: 0.42;
}

.reader-trends-column:focus-visible {
    outline: 2px solid #b8742a;
    outline-offset: -1px;
}

.reader-trends-bars {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 2px;
    min-height: 0;
    padding: 0 0.12rem;
}

.reader-trends-bar {
    display: block;
    width: min(0.58rem, 42%);
    min-width: 3px;
    border-radius: 3px 3px 0 0;
}

.reader-trends-bar--visits {
    background: #6f3519;
}

.reader-trends-bar--downloads {
    background: #d88a2d;
}

.reader-trends-date {
    align-self: start;
    padding-top: 0.4rem;
    color: #76584b;
    font-size: 0.58rem;
    line-height: 1.1;
    text-align: center;
    white-space: nowrap;
    transform: rotate(-38deg);
    transform-origin: center top;
}

.reader-trends-summary {
    margin: 0.65rem 0 0 !important;
    color: #65483c;
    font-size: 0.72rem;
    line-height: 1.4;
}

.reader-stats-section h3 {
    margin: 0 0 0.5rem;
    color: #59301f;
    font-size: 0.96rem;
    line-height: 1.25;
}

.reader-stats-map-help {
    margin: 0 0 0.42rem !important;
    color: #76584b;
    font-size: 0.7rem;
    line-height: 1.35;
}

.reader-stats-google-map {
    position: relative;
    display: grid;
    place-items: center;
    width: 100%;
    height: clamp(14rem, 39vw, 21.5rem);
    overflow: hidden;
    border: 1px solid rgba(139, 69, 19, 0.18);
    border-radius: 12px;
    background: #e9e5df;
}

.reader-stats-map-message {
    max-width: 24rem;
    margin: 0;
    padding: 1.5rem;
    color: #65483c;
    font-size: 0.82rem;
    line-height: 1.4;
    text-align: center;
}

.reader-stats-map-popup {
    width: max-content;
    min-width: 10rem;
    max-width: 15rem;
    padding: 0.1rem 0.35rem 0.1rem 0;
    overflow: hidden;
    color: #45261b;
    font: 400 0.82rem/1.35 var(--primary-font);
}

.reader-stats-google-map .gm-style-iw-d {
    overflow: hidden !important;
}

.reader-stats-map-popup strong,
.reader-stats-map-popup span {
    display: block;
}

.reader-stats-map-popup strong {
    margin-bottom: 0.16rem;
    color: #6f3519;
}

.reader-stats-map-popup .reader-stats-map-popup-label {
    margin-top: 0.45rem;
    font-weight: 700;
}

.reader-stats-map-popup-files {
    max-height: 8.5rem;
    margin: 0.25rem 0 0;
    padding: 0 0.2rem 0 1.1rem;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #b8742a transparent;
}

.reader-stats-map-popup-files li {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.12rem 0;
}

.reader-stats-map-popup-files li span,
.reader-stats-map-popup-files li strong {
    display: inline;
    overflow-wrap: anywhere;
}

.reader-stats-map-popup-files li strong {
    flex: 0 0 auto;
    margin: 0;
}

.reader-stats-location-section {
    margin-top: 0;
}

.reader-stats-location-list,
.reader-stats-download-list {
    margin: 0.48rem 0 0;
    padding: 0;
    list-style: none;
}

.reader-stats-location-list--scrollable {
    max-height: 10.75rem;
    overflow-y: auto;
    padding-right: 0.35rem;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #b8742a transparent;
}

.reader-stats-location-list--scrollable:focus-visible {
    outline: 3px solid #b8742a;
    outline-offset: 2px;
    border-radius: 5px;
}

.reader-stats-location-list li,
.reader-stats-download-list li {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.8rem;
    padding: 0.4rem 0.12rem;
    border-bottom: 1px solid rgba(79, 42, 24, 0.11);
    color: #45261b;
    font-size: 0.88rem;
    line-height: 1.28;
}

.reader-stats-location-list li:last-child,
.reader-stats-download-list li:last-child {
    border-bottom: 0;
}

.reader-stats-location-list strong,
.reader-stats-download-list strong {
    flex: 0 0 auto;
    color: #8b4513;
}

.reader-stats-downloads {
    padding-top: 0.85rem;
    border-top: 1px solid rgba(79, 42, 24, 0.15);
}

.reader-stats-empty,
.reader-stats-privacy,
.reader-stats-updated,
.reader-stats-error p {
    color: #65483c;
    font-size: 0.75rem;
    line-height: 1.4;
}

.reader-stats-empty {
    margin: 0;
}

.reader-stats-privacy {
    margin: 0.95rem 0 0 !important;
    padding: 0.7rem;
    border-radius: 9px;
    background: #eee1cf;
}

.reader-stats-privacy summary {
    color: #59301f;
    font-weight: 700;
    cursor: pointer;
}

.reader-stats-privacy summary:hover {
    color: #8b4513;
}

.reader-stats-privacy summary:focus-visible {
    outline: 3px solid #b8742a;
    outline-offset: 3px;
    border-radius: 3px;
}

.reader-stats-privacy p {
    margin: 0.55rem 0 0;
    color: #65483c;
    font-size: 0.72rem;
    line-height: 1.45;
}

.reader-stats-about-link {
    display: block;
    margin: 0.6rem 0 0 auto;
    padding: 0;
    border: 0;
    background: transparent;
    color: #7d3f1f;
    font: inherit;
    font-size: 0.74rem;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 0.18rem;
    cursor: pointer;
}

.reader-stats-about-link:hover {
    color: #b25b22;
}

.reader-stats-about-link:focus-visible,
.reader-stats-about-close:focus-visible {
    outline: 3px solid #b8742a;
    outline-offset: 3px;
}

.reader-stats-about-dialog {
    position: fixed;
    inset: 50% auto auto 50%;
    width: min(38rem, calc(100vw - 2rem));
    max-height: min(38rem, calc(100vh - 2rem));
    margin: 0;
    padding: 0;
    overflow: hidden;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(79, 42, 24, 0.28);
    border-radius: 15px;
    background: #fffaf2;
    color: #45261b;
    box-shadow: 0 24px 70px rgba(48, 27, 18, 0.34);
}

.reader-stats-about-dialog::backdrop {
    background: rgba(35, 21, 15, 0.56);
    backdrop-filter: blur(2px);
}

.reader-stats-about-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1rem;
    background: #5b2a18;
    color: #fffaf2;
}

.reader-stats-about-header h2 {
    margin: 0;
    color: inherit;
    font-size: 1.18rem;
    line-height: 1.2;
}

.reader-stats-about-close {
    flex: 0 0 auto;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.64);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font: inherit;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
}

.reader-stats-about-content {
    max-height: calc(min(38rem, 100vh - 2rem) - 3.8rem);
    padding: 1rem 1.1rem 1.15rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #b8742a transparent;
}

.reader-stats-about-content p {
    margin: 0 0 0.85rem;
    color: #54382e;
    font-size: 0.87rem;
    line-height: 1.55;
}

.reader-stats-about-content .reader-stats-about-closing {
    margin: 0;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(79, 42, 24, 0.16);
    color: #6f3519;
    font-weight: 700;
}

.reader-stats-updated {
    margin: 0.45rem 0 0 !important;
    color: #82685c;
    text-align: right;
    font-size: 0.66rem;
}

.reader-stats-error {
    padding: 1rem;
    border: 1px solid rgba(154, 63, 32, 0.24);
    border-radius: 12px;
    background: #f7e8e1;
}

.reader-stats-error strong {
    color: #7d2f18;
    font-size: 0.95rem;
}

.reader-stats-error p {
    margin: 0.35rem 0 0.75rem;
}

.reader-stats-retry {
    padding: 0.46rem 0.8rem;
    border: 0;
    border-radius: 8px;
    background: #6f3519;
    color: #ffffff;
    font: 700 0.78rem/1 var(--primary-font);
    cursor: pointer;
}

@keyframes reader-stats-enter {
    from { opacity: 0; transform: translateY(8px) scale(0.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 560px) {
    .reader-stats-nav-trigger {
        display: none;
    }

    .reader-stats-launcher {
        display: inline-flex;
        right: 0.45rem;
        bottom: 2.55rem;
        width: 2.3rem;
        height: 2.3rem;
    }

    .reader-stats-panel {
        right: 0.65rem;
        bottom: 5.35rem;
        width: calc(100vw - 1.3rem);
        max-height: calc(100vh - 5.7rem);
        border-radius: 14px;
    }

    .reader-stats-location-list li,
    .reader-stats-download-list li {
        font-size: 0.78rem;
    }

    .reader-stats-body {
        max-height: calc(100vh - 11.4rem);
    }

    .reader-stats-nonunique {
        margin: 0;
        white-space: normal;
    }

    .reader-stats-header h2 {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .reader-stats-header-notes {
        flex: 1 0 100%;
        flex-wrap: wrap;
        gap: 0.2rem 0.6rem;
    }

    .reader-stats-header-credit {
        white-space: normal;
    }

    .reader-stats-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .reader-trends-controls {
        grid-template-columns: 1fr 1fr;
    }

    .reader-trends-control:first-child {
        grid-column: 1 / -1;
    }

    .reader-trends-view-tabs {
        width: 100%;
    }

    .reader-playback-controls .reader-trends-control:last-child {
        grid-column: 1 / -1;
    }

    .reader-playback-transport {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .reader-playback-date {
        grid-column: 1 / -1;
        justify-self: end;
        padding: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .reader-stats-panel {
        animation: none;
    }

    .reader-stats-launcher {
        transition: none;
    }
}
