/* Mini App styles split from app.css. */

.miniapp-shell {
    min-height: 100vh;
    overflow-x: hidden;
    background:
        radial-gradient(circle at top left, rgba(33, 118, 255, 0.34), transparent 28%),
        radial-gradient(circle at top right, rgba(29, 182, 125, 0.18), transparent 24%),
        linear-gradient(180deg, #060b14 0%, #0b1422 100%);
}

.miniapp-screen {
    width: min(100%, 520px);
    min-height: 100vh;
    margin: 0 auto;
    padding: 18px 16px 108px;
    box-sizing: border-box;
    overflow-x: clip;
}

.miniapp-topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}

.miniapp-title-wrap {
    min-width: 0;
    flex: 1 1 auto;
}

.icon-button {
    width: 48px;
    height: 48px;
    border: 1px solid rgba(164, 189, 255, 0.16);
    border-radius: 16px;
    background: rgba(12, 24, 43, 0.84);
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    overflow: hidden;
    box-shadow: 0 16px 32px rgba(1, 8, 20, 0.28);
}

.icon-button span {
    display: block;
    width: 16px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
}

.icon-button.accent {
    font-size: 1.6rem;
    font-weight: 500;
    background: linear-gradient(180deg, rgba(26, 43, 75, 0.94), rgba(12, 24, 43, 0.92));
}

.miniapp-title-wrap h1 {
    margin: 2px 0 6px;
    font-size: clamp(1.45rem, 4vw, 2rem);
    line-height: 1.1;
}

.miniapp-title-wrap p {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.45;
}

.miniapp-banner,
.miniapp-panel,
.channel-card,
.miniapp-bottom-nav,
.miniapp-copy-block {
    border: 1px solid rgba(164, 189, 255, 0.14);
    background: rgba(9, 23, 43, 0.82);
    backdrop-filter: blur(16px);
    box-shadow: 0 24px 60px rgba(1, 8, 20, 0.36);
}

.miniapp-banner {
    margin-bottom: 16px;
    padding: 14px 16px;
    border-radius: 18px;
    color: var(--text);
}

.miniapp-banner.error {
    border-color: rgba(239, 95, 103, 0.32);
}

.miniapp-banner.success {
    border-color: rgba(29, 182, 125, 0.32);
}

.miniapp-content,
.miniapp-stack,
.channel-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.miniapp-tab-stage {
    min-height: 0;
}

.miniapp-loading-panel {
    min-height: min(58vh, 520px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 22px;
    padding: 34px 22px;
    border: 1px solid rgba(125, 211, 252, 0.22);
    border-radius: 24px;
    background:
        linear-gradient(180deg, rgba(14, 27, 48, 0.96), rgba(8, 18, 34, 0.94)),
        rgba(8, 18, 34, 0.94);
    color: #f8fbff;
    box-shadow: 0 24px 60px rgba(1, 8, 20, 0.42);
    text-align: center;
    overflow: hidden;
}

.miniapp-loading-mark {
    position: relative;
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
}

.miniapp-loading-mark::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 999px;
    border: 2px solid rgba(148, 163, 184, 0.18);
    border-top-color: #38bdf8;
    border-right-color: #34d399;
    animation: miniapp-loading-spin 1.05s linear infinite;
}

.miniapp-loading-mark span {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: #e0f2fe;
    box-shadow: 0 0 18px rgba(56, 189, 248, 0.58);
    animation: miniapp-loading-pulse 1.1s ease-in-out infinite;
}

.miniapp-loading-mark span:nth-child(2) {
    width: 9px;
    height: 9px;
    animation-delay: 0.14s;
}

.miniapp-loading-mark span:nth-child(3) {
    width: 6px;
    height: 6px;
    animation-delay: 0.28s;
}

.miniapp-loading-copy {
    display: grid;
    gap: 8px;
    max-width: 280px;
}

.miniapp-loading-copy h2 {
    margin: 0;
    color: #ffffff;
    font-size: 1.08rem;
    line-height: 1.25;
    font-weight: 700;
}

.miniapp-loading-copy p {
    margin: 0;
    color: #b8c7dc;
    font-size: 0.92rem;
    line-height: 1.45;
}

@keyframes miniapp-loading-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes miniapp-loading-pulse {
    0%, 100% {
        opacity: 0.35;
        transform: scale(0.72);
    }

    50% {
        opacity: 1;
        transform: scale(1);
    }
}

.miniapp-panel,
.channel-card,
.miniapp-copy-block {
    border-radius: 24px;
    padding: 20px;
}

.miniapp-copy-block p,
.miniapp-panel p,
.channel-reference,
.channel-sync,
.channel-warning {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

.miniapp-copy-block {
    display: grid;
    gap: 14px;
}

.miniapp-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.miniapp-section-head h3 {
    margin: 0;
    font-size: 1.02rem;
    line-height: 1.3;
}

.summary-refresh-button {
    width: 44px;
    height: 44px;
    border: 1px solid rgba(164, 189, 255, 0.2);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    overflow: hidden;
    transition:
        transform 180ms cubic-bezier(.2, .8, .2, 1),
        background-color 220ms ease,
        border-color 220ms ease,
        box-shadow 220ms ease,
        opacity 180ms ease;
}

.topbar-refresh-button,
.topbar-info-button {
    flex: 0 0 auto;
    margin-top: 2px;
}

.topbar-info-button .info-glyph {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    border: 2px solid currentColor;
    color: #9df0c9;
    font-size: 1rem;
    font-weight: 800;
    font-family: Georgia, Times New Roman, serif;
    line-height: 1;
    box-shadow: 0 0 18px rgba(29, 182, 125, 0.28);
}

.summary-refresh-button:hover {
    transform: translateY(-1px);
}

.summary-refresh-button:disabled {
    opacity: 0.45;
    cursor: default;
    transform: none;
}

.summary-refresh-button img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    display: block;
    filter: brightness(0) saturate(100%) invert(57%) sepia(56%) saturate(626%) hue-rotate(111deg) brightness(92%) contrast(88%) drop-shadow(0 0 10px rgba(29, 182, 125, 0.55)) drop-shadow(0 8px 18px rgba(29, 182, 125, 0.35));
    transition: transform 180ms cubic-bezier(.2, .8, .2, 1), filter 180ms ease;
}

.summary-refresh-button:active img {
    transform: scale(0.96);
}

.summary-refresh-button:focus,
.summary-refresh-button:focus-visible {
    outline: none;
}

.summary-refresh-button:focus-visible {
    border-color: rgba(88, 144, 255, 0.34);
    box-shadow:
        0 10px 24px rgba(34, 96, 221, 0.18),
        0 0 0 1px rgba(88, 144, 255, 0.18);
}

.miniapp-copy-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.miniapp-kicker {
    display: inline-block;
    margin-bottom: 10px;
    font-size: 0.74rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #7ad3b3;
}

.miniapp-panel h3,
.channel-card h3,
.channel-card h4 {
    margin: 0 0 8px;
}

.empty-state {
    align-items: flex-start;
}

.channel-card {
    padding: 16px;
    position: relative;
    display: grid;
    gap: 14px;
}

.channel-card-header {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    min-width: 0;
}

.channel-avatar {
    width: 56px;
    height: 56px;
    border-radius: 999px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    color: white;
    background:
        radial-gradient(circle at 30% 20%, rgba(63, 135, 255, 0.9), transparent 38%),
        linear-gradient(145deg, #163764 0%, #0c1626 100%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.channel-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.channel-meta {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.channel-name-row {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    align-items: flex-start;
}

.channel-name-row h3,
.channel-name-row h4 {
    font-size: 1.05rem;
    line-height: 1.3;
    margin: 0;
    overflow-wrap: anywhere;
}

.channel-reference {
    font-size: 0.96rem;
    word-break: break-word;
    margin: 0;
    line-height: 1.35;
}

.channel-reference a {
    color: #a9c4ff;
}

.channel-sync {
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.35;
}

.channel-card-controls {
    display: grid;
    justify-items: end;
    align-content: start;
    gap: 8px;
    min-width: 76px;
}

.status-pill {
    width: 76px;
    min-height: 30px;
    border-radius: 12px;
    padding: 0 8px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
}

.status-pill.active {
    color: #b1ffdb;
    background: rgba(29, 182, 125, 0.18);
    border: 1px solid rgba(29, 182, 125, 0.35);
}

.status-pill.paused {
    color: #d3dceb;
    background: rgba(139, 156, 184, 0.14);
    border: 1px solid rgba(139, 156, 184, 0.24);
}

.channel-warning {
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(239, 95, 103, 0.08);
    border: 1px solid rgba(239, 95, 103, 0.18);
}

.channel-settings-button {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid rgba(164, 189, 255, 0.18);
    background: rgba(255, 255, 255, 0.04);
    color: #dbe7ff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
    transition: transform 150ms ease, border-color 150ms ease, opacity 150ms ease;
}

.channel-settings-button svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.channel-settings-button img {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    display: block;
    object-fit: contain;
    filter: brightness(0) saturate(100%) invert(57%) sepia(56%) saturate(626%) hue-rotate(111deg) brightness(92%) contrast(88%) drop-shadow(0 0 10px rgba(29, 182, 125, 0.55)) drop-shadow(0 8px 18px rgba(29, 182, 125, 0.35));
    transition: transform 180ms cubic-bezier(.2, .8, .2, 1), filter 180ms ease;
}

.channel-settings-button:hover {
    transform: translateY(-1px);
    border-color: rgba(164, 189, 255, 0.3);
}

.channel-settings-button:hover img {
    transform: translateY(-1px) scale(1.04);
    filter: brightness(0) saturate(100%) invert(71%) sepia(36%) saturate(679%) hue-rotate(103deg) brightness(100%) contrast(94%) drop-shadow(0 0 12px rgba(87, 211, 155, 0.7)) drop-shadow(0 10px 22px rgba(87, 211, 155, 0.45));
}

.channel-settings-button:disabled {
    opacity: 0.45;
    cursor: default;
    transform: none;
}

.channel-tools {
    display: grid;
}

.channel-tool {
    min-height: 42px;
    padding: 0 14px;
    border-radius: 14px;
    border: 1px solid rgba(164, 189, 255, 0.22);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    overflow: hidden;
    width: 100%;
}

.channel-tool svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.channel-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.channel-actions.compact-actions {
    margin-top: 16px;
}

.channel-action,
.primary-action,
.secondary-action,
.select-button {
    min-height: 48px;
    border-radius: 16px;
    border: 1px solid transparent;
    color: var(--text);
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    overflow: hidden;
    transition: transform 150ms ease, border-color 150ms ease, opacity 150ms ease;
}

.channel-action,
.select-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 12px;
    min-width: 0;
}

.channel-action span,
.channel-tool span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.channel-action svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.channel-action:hover,
.primary-action:hover,
.secondary-action:hover,
.bottom-nav-item:hover,
.icon-button:hover,
.channel-tool:hover {
    transform: translateY(-1px);
}

.channel-action:disabled,
.channel-tool:disabled,
.primary-action:disabled,
.secondary-action:disabled,
.select-button:disabled {
    opacity: 0.45;
    cursor: default;
    transform: none;
}

.channel-action.start {
    border-color: rgba(29, 182, 125, 0.42);
    color: #8ff0c0;
}

.channel-action.stop {
    border-color: rgba(164, 189, 255, 0.26);
    color: #d5def0;
}

.channel-action.delete {
    border-color: rgba(239, 95, 103, 0.36);
    color: #ff9ba1;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(3, 8, 16, 0.68);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 20;
    padding: 24px 12px max(24px, env(safe-area-inset-bottom));
    box-sizing: border-box;
}

.subscription-modal {
    width: min(100%, 560px);
    max-height: min(82vh, 920px);
    overflow: auto;
    position: relative;
    border-radius: 28px;
    border: 1px solid rgba(164, 189, 255, 0.16);
    background: rgba(9, 23, 43, 0.95);
    box-shadow: 0 30px 90px rgba(1, 8, 20, 0.48);
    padding: 20px;
}

.settings-modal,
.bot-info-modal {
    width: min(100%, 520px);
}

.bot-info-modal {
    max-height: min(84vh, 920px);
}

.bot-info-body {
    display: grid;
    gap: 14px;
    color: #d7e2f2;
    font-size: 0.94rem;
    line-height: 1.58;
}

.bot-info-body p,
.bot-info-body ul {
    margin: 0;
}

.bot-info-body h4 {
    margin: 8px 0 0;
    color: #ffffff;
    font-size: 1.02rem;
    line-height: 1.25;
}

.bot-info-body ul {
    display: grid;
    gap: 10px;
    padding-left: 20px;
}

.bot-info-body li::marker {
    color: #57d39b;
}

.subscription-modal-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    align-items: start;
    padding-right: 58px;
    margin-bottom: 14px;
}

.subscription-modal-header h3,
.subscription-modal-header p {
    margin: 0;
}

.subscription-modal-header p {
    color: var(--muted);
    margin-top: 6px;
}

.summary-post-modal .subscription-modal-header > .icon-button {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 5;
    width: 44px;
    height: 44px;
}

.summary-post-modal .subscription-modal-header {
    padding-right: 58px;
}

.settings-modal .miniapp-kicker {
    margin-bottom: 12px;
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.settings-modal .subscription-modal-header h3 {
    font-size: 1.32rem;
    font-weight: 700;
    line-height: 1.15;
}

.subscription-modal .modal-close-button {
    position: sticky;
    top: 0;
    float: right;
    z-index: 4;
    width: 44px;
    height: 44px;
    margin: 0 0 -44px auto;
    border-radius: 14px;
    border-color: rgba(164, 189, 255, 0.2);
    background: rgba(12, 24, 43, 0.94);
    color: #9df0c9;
    box-shadow: 0 12px 28px rgba(1, 8, 20, 0.26);
    backdrop-filter: blur(10px);
}

.subscription-modal .modal-close-button:hover {
    border-color: rgba(164, 189, 255, 0.3);
    background: rgba(255, 255, 255, 0.05);
}

.subscription-modal .close-glyph {
    display: block;
    width: 22px !important;
    height: 22px !important;
    object-fit: contain;
    filter: brightness(0) saturate(100%) invert(57%) sepia(56%) saturate(626%) hue-rotate(111deg) brightness(92%) contrast(88%) drop-shadow(0 0 10px rgba(29, 182, 125, 0.55)) drop-shadow(0 8px 18px rgba(29, 182, 125, 0.35));
    transition: transform 180ms cubic-bezier(.2, .8, .2, 1), filter 180ms ease;
}

.subscription-modal .modal-close-button:active .close-glyph {
    transform: scale(0.96);
}

.modal-subscription-list {
    padding-bottom: 4px;
}

.settings-sheet {
    display: grid;
    gap: 14px;
}

.settings-card {
    display: grid;
    gap: 10px;
    padding: 18px;
}

.settings-accordion-card {
    padding: 0;
    overflow: hidden;
}

.settings-accordion-header {
    width: 100%;
    padding: 18px;
    border: 0;
    background: transparent;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    text-align: left;
    cursor: pointer;
}

.settings-accordion-header h3 {
    margin: 0;
    font-size: 1.06rem;
}

.settings-accordion-header .miniapp-kicker {
    margin-bottom: 8px;
}

.settings-accordion-body {
    display: grid;
    gap: 14px;
    padding: 0 18px 18px;
}

.settings-accordion-chevron {
    flex: 0 0 auto;
    color: #7ad3b3;
    font-size: 1.15rem;
    line-height: 1;
    transform: rotate(0deg);
    transition: transform 180ms ease;
}

.settings-accordion-chevron.open {
    transform: rotate(180deg);
}

.settings-label {
    color: var(--muted);
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.settings-value-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.settings-row strong {
    text-align: right;
}

.settings-email-button {
    appearance: none;
    border: 0;
    background: transparent;
    color: #a9c4ff;
    font: inherit;
    font-weight: 700;
    line-height: 1.35;
    max-width: min(100%, 220px);
    padding: 0;
    text-align: right;
    text-decoration: underline;
    text-underline-offset: 3px;
    overflow-wrap: anywhere;
    touch-action: manipulation;
}

.settings-email-button:active {
    color: #dbe8ff;
}

.settings-copy-feedback {
    margin: -4px 0 0;
    color: #93f2c2;
    font-size: 0.82rem;
    text-align: right;
}

.settings-link {
    color: #a9c4ff;
    word-break: break-word;
}

.settings-toggle {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    color: var(--muted);
    line-height: 1.5;
}

.settings-toggle input {
    margin: 3px 0 0;
    accent-color: #3f87ff;
}

.settings-warning {
    margin-top: 0;
}

.settings-actions {
    display: flex;
    justify-content: flex-start;
}

.settings-history-list {
    display: grid;
    gap: 12px;
}

.settings-history-card {
    display: grid;
    gap: 10px;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid rgba(164, 189, 255, 0.14);
    background: rgba(255, 255, 255, 0.03);
}

.settings-history-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.settings-history-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    color: var(--muted);
    font-size: 0.9rem;
}

.settings-history-context {
    margin: 0;
    color: var(--text);
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

.settings-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: 0.92rem;
}

.settings-pagination span {
    flex: 1 1 auto;
    text-align: center;
}

.nested-card {
    padding: 16px;
}

.compact.empty-state {
    padding: 18px;
}

.close-glyph {
    display: block;
    width: 22px !important;
    height: 22px !important;
    object-fit: contain;
    filter: brightness(0) saturate(100%) invert(57%) sepia(56%) saturate(626%) hue-rotate(111deg) brightness(92%) contrast(88%) drop-shadow(0 0 10px rgba(29, 182, 125, 0.55)) drop-shadow(0 8px 18px rgba(29, 182, 125, 0.35));
}

.primary-action {
    padding: 0 18px;
    background: linear-gradient(135deg, #3479ff, #2554d9);
}

.primary-action.wide,
.secondary-action.wide {
    width: 100%;
}

.secondary-action {
    padding: 0 18px;
    border-color: rgba(164, 189, 255, 0.22);
}

.secondary-action.slim {
    min-height: 40px;
    border-radius: 12px;
    padding: 0 14px;
}

.segmented-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.segment {
    min-height: 48px;
    border-radius: 14px;
    border: 1px solid rgba(164, 189, 255, 0.16);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
}

.segment.active {
    background: linear-gradient(135deg, #3479ff, #2b60dd);
    border-color: transparent;
}

.form-panel,
.placeholder-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
}

.panel-label {
    color: var(--muted);
    font-size: 0.9rem;
}

.select-button {
    justify-content: space-between;
    padding: 0 16px;
    border-color: rgba(164, 189, 255, 0.18);
}

.select-arrow {
    color: var(--muted);
}

.summary-checklist {
    display: grid;
    gap: 12px;
    color: var(--text);
}

.summary-checklist label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.summary-checklist input {
    accent-color: #3479ff;
}

.summary-block-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.summary-metrics {
    display: grid;
    gap: 6px;
}

.summary-preview-grid {
    display: grid;
    gap: 16px;
}

.faq-list {
    display: grid;
    gap: 12px;
}

.faq-item {
    padding: 16px;
    border-radius: 18px;
    border: 1px solid rgba(164, 189, 255, 0.14);
    background: rgba(255, 255, 255, 0.03);
}

.faq-item h4 {
    margin: 0 0 8px;
    font-size: 0.98rem;
}

.faq-item p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.placeholder-list {
    margin: 0;
    padding-left: 18px;
    color: var(--muted);
}

.placeholder-list.ordered {
    padding-left: 20px;
}

.summary-preview-grid h4 {
    margin: 0 0 8px;
}

.summary-stack {
    padding-bottom: 132px;
    overflow-x: clip;
}

.summary-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
}

.summary-panel-head h3,
.summary-list-head h3 {
    margin: 0 0 6px;
    font-size: 1.28rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.summary-panel-head p,
.summary-list-head p,
.summary-helper {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

.summary-range-pill,
.summary-loading-pill {
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border: 1px solid rgba(164, 189, 255, 0.2);
    background: rgba(255, 255, 255, 0.04);
    color: #cddcff;
}

.summary-loading-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.summary-loading-dots {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-width: 24px;
}

.summary-loading-dots span {
    opacity: 0.2;
    animation: summary-loading-dot 1.2s infinite ease-in-out;
}

.summary-loading-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.summary-loading-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes summary-loading-dot {
    0%, 80%, 100% {
        opacity: 0.2;
        transform: translateY(0);
    }

    40% {
        opacity: 1;
        transform: translateY(-1px);
    }
}

.summary-channel-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.summary-channel-chip {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(164, 189, 255, 0.18);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    cursor: pointer;
    box-shadow: none;
    overflow: hidden;
    transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.summary-channel-chip::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(52, 121, 255, 0.18), transparent 58%);
    opacity: 0;
    transition: opacity 140ms ease;
    pointer-events: none;
}

.summary-channel-chip:hover {
    transform: translateY(-1px);
    border-color: rgba(164, 189, 255, 0.28);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: none;
}

.summary-channel-chip:active::after {
    opacity: 1;
}

.summary-channel-chip.selected {
    border-color: rgba(63, 135, 255, 0.4);
    background: rgba(52, 121, 255, 0.16);
    box-shadow: none;
}

.summary-channel-chip input {
    margin: 0;
    width: auto;
    height: auto;
    accent-color: #3479ff;
}

.summary-channel-chip span {
    display: inline;
    min-width: 0;
    font-weight: 400;
    line-height: 1.2;
}

.summary-date-grid,
.summary-metrics-grid {
    display: grid;
    gap: 12px;
}

.summary-selected-range {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    color: var(--muted);
}

.summary-selected-range strong {
    color: var(--text);
}

.summary-date-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.summary-calendar-shell {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.summary-calendar-nav,
.summary-calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
    align-items: center;
}

.summary-calendar-nav {
    grid-template-columns: 84px minmax(0, 1fr) 84px;
}

.summary-calendar-nav strong {
    text-align: center;
}

.summary-calendar-weekdays span {
    text-align: center;
    font-size: 0.78rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.summary-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
    min-width: 0;
}

.summary-calendar-day {
    min-height: 44px;
    border-radius: 14px;
    border: 1px solid rgba(164, 189, 255, 0.12);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    cursor: pointer;
    transition: transform 150ms ease, border-color 150ms ease, background-color 150ms ease, opacity 150ms ease;
}

.summary-calendar-day:hover {
    transform: translateY(-1px);
    border-color: rgba(164, 189, 255, 0.22);
}

.summary-calendar-day.outside {
    color: rgba(158, 176, 205, 0.52);
}

.summary-calendar-day.in-range {
    background: rgba(52, 121, 255, 0.12);
    border-color: rgba(63, 135, 255, 0.2);
}

.summary-calendar-day.selected,
.summary-calendar-day.anchor {
    background: linear-gradient(135deg, #3479ff, #2554d9);
    border-color: transparent;
    color: #fff;
}

.summary-calendar-day.disabled {
    opacity: 0.35;
    cursor: default;
    transform: none;
}

.summary-date-field {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 0.88rem;
}

.summary-date-field input,
.summary-search-input {
    display: block;
    width: min(100%, 488px);
    margin: 0 auto;
    min-height: 48px;
    border-radius: 16px;
    border: 1px solid rgba(164, 189, 255, 0.18);
    background: #0f1f37;
    color: var(--text);
    padding: 0 14px;
    font: inherit;
    box-sizing: border-box;
}

.summary-date-field input:focus,
.summary-search-input:focus {
    outline: none;
    border-color: rgba(63, 135, 255, 0.45);
}

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

.summary-metric-card {
    min-height: 84px;
    border-radius: 18px;
    border: 1px solid rgba(164, 189, 255, 0.12);
    background: rgba(255, 255, 255, 0.03);
    padding: 14px;
    display: grid;
    gap: 8px;
}

.summary-metric-card span {
    color: var(--muted);
    font-size: 0.82rem;
}

.summary-metric-card strong {
    font-size: 1.4rem;
}

.summary-posts-panel {
    display: grid;
    gap: 14px;
    min-width: 0;
}

.summary-list-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
}

.summary-export-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    min-width: 0;
}

.summary-export-button.ai {
    background: #18345d;
    border-color: rgba(164, 189, 255, 0.24);
}

.summary-post-list {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.summary-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
    color: var(--muted);
    min-width: 0;
    flex-wrap: wrap;
}

.summary-post-card {
    border-radius: 20px;
    border: 1px solid rgba(164, 189, 255, 0.14);
    background: rgba(255, 255, 255, 0.04);
    padding: 16px;
    display: grid;
    gap: 10px;
    cursor: pointer;
    min-width: 0;
    transition: transform 160ms ease, border-color 160ms ease, opacity 160ms ease;
}

.summary-post-card:hover {
    transform: translateY(-1px);
    border-color: rgba(164, 189, 255, 0.26);
}

.summary-post-card.excluded {
    opacity: 0.58;
    background: rgba(255, 255, 255, 0.02);
}

.summary-post-card h4 {
    margin: 0;
    font-size: 1rem;
}

.summary-post-card p {
    margin: 0;
    color: var(--text);
    line-height: 1.55;
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.summary-post-channel,
.summary-post-fulltext {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.summary-post-topline,
.summary-post-meta,
.summary-post-detail-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.summary-post-topline,
.summary-post-meta,
.summary-post-detail-meta,
.summary-post-channel {
    color: var(--muted);
}

.summary-post-score {
    color: #9bc8ff;
    font-weight: 600;
}

.summary-post-actions {
    display: flex;
    justify-content: flex-end;
}

.summary-toggle-button {
    min-width: 108px;
}

.summary-inline-notice {
    margin: 0 0 18px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(118, 196, 255, 0.22);
    background: rgba(17, 40, 72, 0.92);
    display: grid;
    gap: 12px;
    min-width: 0;
}

.summary-inline-notice p {
    margin: 0;
    color: var(--text);
    line-height: 1.5;
}

.summary-inline-notice.error {
    border-color: rgba(255, 121, 148, 0.28);
    background: rgba(60, 17, 34, 0.92);
}

.summary-inline-notice.success {
    border-color: rgba(101, 211, 168, 0.28);
    background: rgba(13, 44, 34, 0.92);
}

.summary-search-dock {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    pointer-events: none;
}

.summary-search-toggle {
    width: 56px;
    height: 56px;
    border: 1px solid rgba(164, 189, 255, 0.22);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.06);
    color: #8ff0c0;
    box-shadow: 0 10px 24px rgba(34, 96, 221, 0.14);
    display: grid;
    place-items: center;
    cursor: pointer;
    pointer-events: auto;
    appearance: none;
    -webkit-appearance: none;
    outline: none;
    transform: translateZ(0);
    transition:
        transform 180ms cubic-bezier(.2, .8, .2, 1),
        background-color 220ms ease,
        border-color 220ms ease,
        box-shadow 220ms ease;
}

.summary-search-toggle:active {
    transform: scale(0.96);
}

.summary-search-toggle:focus-visible {
    border-color: rgba(88, 144, 255, 0.34);
    box-shadow:
        0 10px 24px rgba(34, 96, 221, 0.18),
        0 0 0 1px rgba(88, 144, 255, 0.18);
}

.summary-search-dock.open .summary-search-toggle {
    transform: translateY(-1px) scale(1.04);
    border-color: rgba(87, 211, 155, 0.36);
    box-shadow: 0 10px 24px rgba(34, 96, 221, 0.18);
}

.summary-search-icon {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.summary-search-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    filter: brightness(0) saturate(100%) invert(57%) sepia(56%) saturate(626%) hue-rotate(111deg) brightness(92%) contrast(88%) drop-shadow(0 0 10px rgba(29, 182, 125, 0.55)) drop-shadow(0 8px 18px rgba(29, 182, 125, 0.35));
    transition: transform 180ms cubic-bezier(.2, .8, .2, 1), filter 180ms ease;
}

.summary-search-dock.open .summary-search-icon img {
    transform: translateY(-1px) scale(1.04);
    filter: brightness(0) saturate(100%) invert(71%) sepia(36%) saturate(679%) hue-rotate(103deg) brightness(100%) contrast(94%) drop-shadow(0 0 12px rgba(87, 211, 155, 0.7)) drop-shadow(0 10px 22px rgba(87, 211, 155, 0.45));
}

.summary-search-field-shell {
    width: min(calc(100vw - 96px), 488px);
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateX(28px);
    transition:
        max-width 280ms cubic-bezier(.2, .8, .2, 1),
        opacity 180ms ease,
        transform 280ms cubic-bezier(.2, .8, .2, 1);
    pointer-events: none;
}

.summary-search-dock.open .summary-search-field-shell {
    max-width: min(calc(100vw - 96px), 488px);
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.summary-search-field-shell .summary-search-input {
    width: 100%;
    margin: 0;
}


/* Restored bottom navigation styles */
.miniapp-bottom-nav {
    position: fixed;
    left: max(12px, env(safe-area-inset-left));
    right: max(12px, env(safe-area-inset-right));
    bottom: max(16px, env(safe-area-inset-bottom));
    width: auto;
    max-width: 408px;
    margin: 0 auto;
    border-radius: 20px;
    padding: 6px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    z-index: 10;
    overflow: visible;
}

.bottom-nav-item {
    min-height: 56px;
    border: 1px solid transparent;
    border-radius: 18px;
    background: transparent;
    color: var(--muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    cursor: pointer;
    padding: 0;
    text-align: center;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
    outline: none;
    position: relative;
    overflow: visible;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    tap-highlight-color: transparent;
    transition:
        transform 180ms cubic-bezier(.2, .8, .2, 1),
        background-color 220ms ease,
        border-color 220ms ease,
        color 220ms ease,
        box-shadow 220ms ease;
}

.bottom-nav-item.selected {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(164, 189, 255, 0.22);
    color: #8cb6ff;
    box-shadow: 0 10px 24px rgba(34, 96, 221, 0.14);
    animation: miniapp-nav-select 240ms cubic-bezier(.2, .8, .2, 1);
}

.bottom-nav-item:active {
    transform: scale(0.96);
}

.bottom-nav-item:focus,
.bottom-nav-item:focus-visible {
    outline: none;
}

.bottom-nav-item:focus-visible {
    border-color: rgba(88, 144, 255, 0.34);
    box-shadow:
        0 10px 24px rgba(34, 96, 221, 0.18),
        0 0 0 1px rgba(88, 144, 255, 0.18);
}

.nav-icon {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.nav-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    filter: brightness(0) saturate(100%) invert(57%) sepia(56%) saturate(626%) hue-rotate(111deg) brightness(92%) contrast(88%) drop-shadow(0 0 10px rgba(29, 182, 125, 0.55)) drop-shadow(0 8px 18px rgba(29, 182, 125, 0.35));
    transition: transform 180ms cubic-bezier(.2, .8, .2, 1), filter 180ms ease, opacity 180ms ease;
}

.bottom-nav-item.selected .nav-icon img {
    transform: translateY(-1px) scale(1.04);
    filter: brightness(0) saturate(100%) invert(71%) sepia(36%) saturate(679%) hue-rotate(103deg) brightness(100%) contrast(94%) drop-shadow(0 0 12px rgba(87, 211, 155, 0.7)) drop-shadow(0 10px 22px rgba(87, 211, 155, 0.45));
}


/* Mini app UI tuning */
.channel-card-header {
    grid-template-columns: 76px minmax(0, 1fr);
}

.channel-identity {
    display: grid;
    justify-items: start;
    align-content: start;
    gap: 8px;
}

.channel-identity .status-pill {
    font-size: 0.68rem;
    padding: 4px 8px;
    line-height: 1;
    white-space: nowrap;
}

.summary-stack .miniapp-panel,
.summary-posts-panel,
.summary-post-card,
.summary-inline-notice {
    gap: 8px;
}

.summary-stack .form-panel,
.summary-posts-panel {
    padding: 14px;
}

.summary-metric-card {
    min-height: 66px;
    padding: 10px 12px;
    gap: 4px;
}

.summary-post-card {
    padding: 12px;
    gap: 7px;
}

.summary-post-card p {
    line-height: 1.34;
}

.summary-post-topline,
.summary-post-meta,
.summary-post-detail-meta {
    gap: 6px;
}

.summary-list-head {
    gap: 8px;
}

.summary-search-dock {
    position: fixed;
    left: max(12px, env(safe-area-inset-left));
    right: max(12px, env(safe-area-inset-right));
    bottom: calc(max(16px, env(safe-area-inset-bottom)) + 74px);
    width: auto;
    max-width: 408px;
    margin: 0 auto;
    z-index: 11;
}

.summary-search-toggle {
    width: 62px;
    height: 62px;
    border-radius: 19px;
}

.summary-search-icon,
.nav-icon {
    width: 34px;
    height: 34px;
}

.summary-search-icon img,
.nav-icon img {
    filter: brightness(0) saturate(100%) invert(57%) sepia(56%) saturate(626%) hue-rotate(111deg) brightness(92%) contrast(88%) drop-shadow(0 0 12px rgba(29, 182, 125, 0.7)) drop-shadow(0 10px 22px rgba(29, 182, 125, 0.45));
}

.summary-search-dock.open .summary-search-icon img,
.bottom-nav-item.selected .nav-icon img {
    filter: brightness(0) saturate(100%) invert(71%) sepia(36%) saturate(679%) hue-rotate(103deg) brightness(100%) contrast(94%) drop-shadow(0 0 14px rgba(87, 211, 155, 0.78)) drop-shadow(0 12px 26px rgba(87, 211, 155, 0.52));
}

/* Requested fine tuning */
.channel-identity {
    transform: translateY(-8px);
    gap: 6px;
}

.channel-action.delete {
    min-width: 0;
    gap: 5px;
    padding: 0 8px;
    white-space: nowrap;
}

.channel-action.delete span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.86rem;
}

.channel-action.delete svg {
    width: 16px;
    height: 16px;
}

.summary-search-toggle {
    overflow: visible;
}

.summary-search-icon {
    width: 42px;
    height: 42px;
    position: relative;
    border-radius: 999px;
}

.summary-search-icon::before {
    content: ;
    position: absolute;
    inset: -8px;
    border-radius: inherit;
    background: radial-gradient(circle, rgba(87, 211, 155, 0.35), rgba(87, 211, 155, 0.12) 42%, transparent 70%);
    filter: blur(6px);
    opacity: 0.95;
    pointer-events: none;
}

.summary-search-icon img {
    position: relative;
    z-index: 1;
    transform: scale(1.12);
    filter: brightness(0) saturate(100%) invert(71%) sepia(36%) saturate(679%) hue-rotate(103deg) brightness(106%) contrast(96%) drop-shadow(0 0 10px rgba(87, 211, 155, 0.95)) drop-shadow(0 0 22px rgba(87, 211, 155, 0.72)) drop-shadow(0 12px 28px rgba(29, 182, 125, 0.52));
}

.summary-search-dock.open .summary-search-icon img {
    transform: translateY(-1px) scale(1.2);
    filter: brightness(0) saturate(100%) invert(78%) sepia(44%) saturate(602%) hue-rotate(92deg) brightness(110%) contrast(98%) drop-shadow(0 0 14px rgba(87, 211, 155, 1)) drop-shadow(0 0 30px rgba(87, 211, 155, 0.9)) drop-shadow(0 14px 32px rgba(29, 182, 125, 0.62));
}

/* Search/button sizing correction */
.channel-actions {
    grid-template-columns: 0.82fr 0.82fr 1.36fr;
}

.channel-action.start,
.channel-action.stop {
    padding: 0 7px;
    gap: 5px;
}

.channel-action.start span,
.channel-action.stop span,
.channel-action.delete span {
    white-space: nowrap;
}

.channel-action.delete {
    padding: 0 10px;
    gap: 6px;
}

/* Channel tile symmetry and button text containment */
.channel-card-header {
    grid-template-columns: 56px minmax(0, 1fr) auto;
    align-items: center;
}

.channel-identity {
    transform: none;
}

.channel-action,
.channel-tool {
    height: auto;
    min-height: 52px;
    padding-block: 8px;
    line-height: 1.15;
    text-align: center;
}

.channel-tool {
    min-height: 44px;
}

.channel-action.start,
.channel-action.stop,
.channel-action.delete {
    padding-inline: 8px;
    gap: 6px;
    white-space: normal;
}

.channel-action span,
.channel-tool span,
.channel-action.start span,
.channel-action.stop span,
.channel-action.delete span {
    min-width: 0;
    max-width: 100%;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
    font-size: 0.86rem;
    line-height: 1.15;
}

.channel-action.delete span {
    overflow: visible;
    text-overflow: clip;
    font-size: 0.9rem;
}

/* Subscription modal action layout */
.modal-subscription-list .compact-actions {
    grid-template-columns: 0.85fr 0.85fr 1.3fr;
    gap: 8px;
    margin-top: 14px;
}

.modal-subscription-list .compact-actions .channel-action {
    min-height: 50px;
    padding: 8px 6px;
    border-radius: 14px;
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: center;
    justify-items: center;
    column-gap: 5px;
    line-height: 1.12;
}

.modal-subscription-list .compact-actions .channel-action svg {
    width: 17px;
    height: 17px;
}

.modal-subscription-list .compact-actions .channel-action span {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
    font-size: 0.82rem;
    line-height: 1.12;
    text-align: left;
}

.summary-search-toggle {
    overflow: visible !important;
    box-shadow:
        0 10px 24px rgba(34, 96, 221, 0.18),
        0 0 22px rgba(87, 211, 155, 0.28) !important;
}

.summary-search-toggle::before {
    content: ;
    position: absolute;
    inset: 5px;
    border-radius: 16px;
    background: radial-gradient(circle, rgba(87, 211, 155, 0.28), transparent 68%);
    filter: blur(10px);
    opacity: 1;
    pointer-events: none;
}

.summary-search-icon {
    width: 34px !important;
    height: 34px !important;
    position: relative;
    z-index: 1;
    overflow: visible;
}

.summary-search-icon::before {
    content: ;
    position: absolute;
    inset: -11px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(87, 211, 155, 0.58), rgba(87, 211, 155, 0.22) 45%, transparent 72%);
    filter: blur(7px);
    opacity: 1;
    pointer-events: none;
}

.summary-search-icon img {
    width: 34px !important;
    height: 34px !important;
    max-width: none !important;
    max-height: none !important;
    position: relative;
    z-index: 2;
    transform: none !important;
    filter: brightness(0) saturate(100%) invert(71%) sepia(36%) saturate(679%) hue-rotate(103deg) brightness(110%) contrast(98%) drop-shadow(0 0 8px rgba(87, 211, 155, 1)) drop-shadow(0 0 18px rgba(87, 211, 155, 0.95)) drop-shadow(0 8px 20px rgba(29, 182, 125, 0.65)) !important;
}

.summary-search-dock.open .summary-search-icon img {
    transform: translateY(-1px) scale(1.04) !important;
    filter: brightness(0) saturate(100%) invert(78%) sepia(44%) saturate(602%) hue-rotate(92deg) brightness(116%) contrast(100%) drop-shadow(0 0 10px rgba(87, 211, 155, 1)) drop-shadow(0 0 24px rgba(87, 211, 155, 1)) drop-shadow(0 10px 24px rgba(29, 182, 125, 0.75)) !important;
}

/* Make search SVG fill the search button */
.summary-search-icon {
    width: 52px !important;
    height: 52px !important;
}

.summary-search-icon img {
    width: 52px !important;
    height: 52px !important;
    transform: scale(1.08) !important;
}

.summary-search-dock.open .summary-search-icon img {
    transform: translateY(-1px) scale(1.12) !important;
}

/* Match search icon size to navigation icons */
.summary-search-icon {
    width: 34px !important;
    height: 34px !important;
}

.summary-search-icon img {
    width: 34px !important;
    height: 34px !important;
    transform: none !important;
}

.summary-search-dock.open .summary-search-icon img {
    transform: translateY(-1px) scale(1.04) !important;
}


.subscription-plan-list { display: grid; gap: 10px; margin-top: 10px; }
.subscription-plan-card { border: 1px solid rgba(164,189,255,.14); border-radius: 16px; padding: 12px; display: grid; gap: 10px; }
.subscription-plan-card.selected { border-color: rgba(87,211,155,.35); background: rgba(87,211,155,.06); }
.subscription-plan-card div { display: grid; gap: 4px; }
.subscription-plan-card span { color: var(--muted); font-size: .86rem; }


/* Keep the report tab on the same visual background as Channels/Settings. */
.summary-stack .miniapp-panel,
.summary-posts-panel,
.summary-post-card,
.summary-metric-card,
.summary-channel-chip,
.summary-date-field input,
.summary-search-input {
    background: rgba(9, 23, 43, 0.82);
    border-color: rgba(164, 189, 255, 0.14);
    backdrop-filter: blur(16px);
}

.summary-channel-chip.selected {
    background: rgba(9, 23, 43, 0.82);
    border-color: rgba(63, 135, 255, 0.42);
}

/* Force report tab full-screen background; avoids transient/default tab background after Blazor render. */
.miniapp-shell:has(.miniapp-screen.summary-tab) {
    background:
        radial-gradient(circle at top left, rgba(33, 118, 255, 0.34), transparent 28%),
        radial-gradient(circle at top right, rgba(29, 182, 125, 0.18), transparent 24%),
        linear-gradient(180deg, #060b14 0%, #0b1422 100%) !important;
}

.miniapp-screen.summary-tab::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(circle at top left, rgba(33, 118, 255, 0.34), transparent 28%),
        radial-gradient(circle at top right, rgba(29, 182, 125, 0.18), transparent 24%),
        linear-gradient(180deg, #060b14 0%, #0b1422 100%);
}

/* Report tab background overlay: visible above shell background, below content. */
.miniapp-screen {
    position: relative;
    isolation: isolate;
}

.miniapp-screen.summary-tab::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at top left, rgba(33, 118, 255, 0.34), transparent 28%),
        radial-gradient(circle at top right, rgba(29, 182, 125, 0.18), transparent 24%),
        linear-gradient(180deg, #060b14 0%, #0b1422 100%) !important;
}

.miniapp-screen.summary-tab > * {
    position: relative;
    z-index: 1;
}

/* Restore bottom tab navigation and report search button placement. */
.miniapp-bottom-nav {
    position: fixed !important;
    left: max(12px, env(safe-area-inset-left)) !important;
    right: max(12px, env(safe-area-inset-right)) !important;
    bottom: max(16px, env(safe-area-inset-bottom)) !important;
    width: auto !important;
    max-width: 408px !important;
    margin: 0 auto !important;
    z-index: 40 !important;
}

.summary-search-dock {
    position: fixed !important;
    left: max(12px, env(safe-area-inset-left)) !important;
    right: max(12px, env(safe-area-inset-right)) !important;
    bottom: calc(max(16px, env(safe-area-inset-bottom)) + 74px) !important;
    width: auto !important;
    max-width: 408px !important;
    margin: 0 auto !important;
    z-index: 41 !important;
}

/* Fix report card interactions after background overlay changes. */
.miniapp-screen.summary-tab .modal-backdrop {
    position: fixed;
    z-index: 100 !important;
}

.summary-post-card {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    -webkit-tap-highlight-color: transparent;
    tap-highlight-color: transparent;
    outline: none;
}

.summary-post-card:focus,
.summary-post-card:focus-visible,
.summary-post-card:active {
    outline: none;
    border-radius: 20px;
}

/* Channel settings modal close button in the top-right corner. */
.settings-modal .subscription-modal-header > .icon-button {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 5;
    width: 44px;
    height: 44px;
}

.settings-modal .subscription-modal-header {
    padding-right: 58px;
}
