.wt_msg .wt_msg_body {
    font-size: calc(1em * var(--wt-reading-scale, 1));
    overflow-wrap: anywhere;
}

.wtc-section .wtc-card h2 { font-size: calc(19px * var(--wt-reading-scale, 1)); }
.wtc-section .wtc-card.is-latest h2 { font-size: calc(clamp(21px, 2.5vw, 27px) * var(--wt-reading-scale, 1)); }
.wtc-section .wtc-video-card.is-latest h2 { font-size: calc(19px * var(--wt-reading-scale, 1)); }
.wtc-section .wtc-excerpt { font-size: calc(13px * var(--wt-reading-scale, 1)); }
.wtc-section .wtc-excerpt { -webkit-line-clamp: var(--wt-reading-lines, 3); }
@media (max-width: 640px) {
    .wtc-section .wtc-card.is-latest h2 { font-size: calc(22px * var(--wt-reading-scale, 1)); }
    .wtc-section .wtc-video-card.is-latest h2 { font-size: calc(19px * var(--wt-reading-scale, 1)); }
}

#wt-reading-settings {
    margin: 14px auto;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid #9cadbe;
    border-radius: 9px;
    background: #f3f7fb;
    color: #162b40;
    font: 600 15px system-ui, sans-serif;
    cursor: pointer;
}

#wt-reading-controls {
    position: fixed;
    z-index: 2147482999;
    right: max(12px, env(safe-area-inset-right));
    bottom: calc(82px + env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: 44px minmax(50px, auto) 44px 44px;
    gap: 5px;
    align-items: center;
    padding: 7px;
    border: 1px solid #647990;
    border-radius: 14px;
    background: #112538;
    box-shadow: 0 6px 28px #0007;
    color: #fff;
    font: 600 15px/1.35 system-ui, sans-serif;
    text-align: center;
}

#wt-reading-controls [hidden], #wt-reading-controls[hidden], #wt-reading-settings[hidden] { display: none; }
#wt-reading-controls button {
    min-height: 44px;
    margin: 0;
    border: 0;
    border-radius: 8px;
    background: #29445d;
    color: inherit;
    font: inherit;
    cursor: pointer;
}
#wt-reading-controls button:disabled { opacity: .5; cursor: default; }
#wt-reading-controls button:focus-visible { outline: 2px solid #a3d2ff; }
#wt-reading-controls .wt-reading-status, #wt-reading-controls .wt-reading-retry { grid-column: 1 / -1; }
#wt-reading-controls .wt-reading-status { margin: 2px 0; max-width: 195px; font-size: 13px; }

.wt-reading-enabled .wtm-viewer {
    height: 100vh;
    max-height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    background: rgba(7, 15, 25, var(--wt-photo-shade, .95));
}
.wt-reading-enabled .wtm-viewer::backdrop { background: transparent; }
.wt-reading-enabled .wtm-viewer-content img { touch-action: none; }
.wt-photo-source { visibility: hidden; }
.wt-photo-preview, .wt-reading-enabled .wtm-viewer {
    --wt-photo-controls: 1;
}
.wt-photo-preview {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    overflow: hidden;
    pointer-events: none;
    background: rgba(7, 15, 25, var(--wt-photo-shade, 0));
}
.wt-photo-preview img, .wt-reading-enabled .wtm-viewer img.wt-photo-positioned {
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    max-width: none;
    max-height: none;
    margin: 0;
    border: 0;
    border-radius: 7px;
    box-shadow: 0 8px 35px rgba(0, 0, 0, var(--wt-photo-shade, 0));
    user-select: none;
    -webkit-user-select: none;
}
.wt-photo-preview-close {
    position: absolute;
    top: calc(8px + env(safe-area-inset-top));
    right: 18px;
    display: grid;
    place-items: center;
    box-sizing: border-box;
    width: 44px;
    height: 44px;
    border: 1px solid #ffffff44;
    border-radius: 50%;
    background: #172433;
    color: white;
    font: 400 31px/1 system-ui, sans-serif;
}
.wt-photo-preview-close, .wt-reading-enabled .wtm-viewer-bar,
.wt-reading-enabled .wtm-pagination {
    opacity: var(--wt-photo-controls);
}
.wt-photo-preview.wt-photo-settling, .wt-reading-enabled .wtm-viewer.wt-photo-settling {
    transition: background-color .22s ease-out;
}
.wt-photo-settling img { transition: transform .22s ease-out, width .22s ease-out, height .22s ease-out, box-shadow .22s ease-out; }
.wt-photo-settling .wt-photo-preview-close, .wt-photo-settling .wtm-viewer-bar,
.wt-photo-settling .wtm-pagination { transition: opacity .22s ease-out; }
@media (prefers-reduced-motion: reduce) {
    .wt-photo-settling, .wt-photo-settling * { transition-duration: 0s !important; }
}
