.streaks-chat-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.streaks-chat-heading .list-heading { flex: 1; min-width: 0; }
.streaks-indicator { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-width: 44px; min-height: 44px; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--accent-strong); font: inherit; font-weight: 650; font-variant-numeric: tabular-nums; cursor: pointer; }
.streaks-indicator[hidden], .streaks-celebration[hidden] { display: none; }
.streaks-indicator svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.streaks-indicator:active { background: var(--accent-soft); }
.streaks-dialog { width: min(540px, calc(100vw - 24px)); max-height: 88dvh; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius-dialog); background: var(--ground); color: var(--ink); overflow-y: auto; overscroll-behavior: contain; font-family: var(--font-ui); }
.streaks-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.streaks-heading h2 { margin: 0; font-size: 1.5rem; letter-spacing: -.025em; }
.streaks-heading button, .streaks-celebration button { min-width: 44px; min-height: 44px; border: 0; background: transparent; color: var(--muted); font-size: 1.5rem; border-radius: var(--radius-sm); cursor: pointer; }
.streaks-summary { text-align: center; padding: 20px 0 12px; }
.streaks-summary strong { display: block; color: var(--accent-strong); font-size: 3rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.streaks-summary p { margin: 7px 0; }
.streaks-muted, .streaks-dialog small { color: var(--muted); font-size: .875rem; line-height: 1.5; }
.streaks-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); padding: 0; margin: 18px 0 8px; list-style: none; gap: 4px; }
.streaks-week li { display: grid; justify-items: center; gap: 8px; color: var(--muted); font-size: .875rem; }
.streaks-day-mark { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 50%; font-size: 1rem; }
.streaks-week [data-status="active"] .streaks-day-mark { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.streaks-week [data-status="protected"] .streaks-day-mark, .streaks-preview-day[data-status="protected"] .streaks-day-mark { background: var(--accent-soft); border-color: var(--accent-strong); color: var(--accent-strong); }
.streaks-week [aria-current="date"] > span:first-child { color: var(--ink); font-weight: 750; }
.streaks-section { margin-top: 16px; padding: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-md); }
.streaks-section h3, .streaks-section p { margin: 0 0 8px; }
.streaks-section h3 { font-size: 1rem; }
.streaks-section p { line-height: 1.5; }
.streaks-section progress { display: block; width: 100%; height: 8px; accent-color: var(--accent); }
.streaks-reward { border-top: 1px solid var(--line); }
.streaks-reward:first-of-type { border-top: 0; }
.streaks-reward summary { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; min-height: 48px; cursor: pointer; font-weight: 600; }
.streaks-reward summary span { color: var(--muted); font-size: .8125rem; font-weight: 400; text-align: end; }
.streaks-reward summary [data-unlocked="true"] { color: var(--accent-strong); }
.streaks-preview { min-width: 0; margin: 0 0 16px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--panel-2); }
.streaks-preview figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; margin-bottom: 12px; color: var(--muted); font-size: .8125rem; line-height: 1.5; }
.streaks-preview-state[data-unlocked="true"] { color: var(--accent-strong); }
.streaks-preview-badge { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 12px; color: var(--accent-strong); overflow-wrap: anywhere; }
.streaks-preview-badge .streaks-celebration-mark { display: grid; place-items: center; flex: none; width: 2.5rem; height: 2.5rem; border: 1px solid var(--accent-strong); border-radius: 50%; background: var(--accent-soft); font-size: 1.375rem; }
.streaks-crown { display: block; width: 1.5rem; height: 1.5rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.streaks-preview-day { display: flex; align-items: center; gap: 8px; font-size: .875rem; line-height: 1.5; }
.streaks-preview-day .streaks-day-mark { flex: none; }
.streaks-preview-bubbles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 7rem), 1fr)); gap: 12px; }
.streaks-preview-sample { min-width: 0; }
.streaks-preview-sample > span { display: block; margin-bottom: 6px; color: var(--muted); font-size: .8125rem; line-height: 1.5; }
.streaks-styles { border: 0; margin: 0; padding: 0; }
.streaks-styles legend { margin-bottom: 8px; font-weight: 650; }
.streaks-styles label { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.streaks-styles input { flex: none; accent-color: var(--accent); width: 18px; height: 18px; }
.streaks-style-content { display: flex; flex: 1; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; min-width: 0; padding: 6px 0; }
.streaks-style-content > span:first-child { flex: 1; min-width: min(100%, 8rem); overflow-wrap: anywhere; }
.streaks-style-sample { flex: none; }
.streaks-style-sample .bubble { display: block; min-height: 0; padding: 7px 12px; font-size: .875rem; }
.streaks-styles input:disabled + span { color: var(--muted); }
.streaks-notice { min-height: 1.5em; margin: 10px 0 0; color: var(--muted); font-size: .875rem; }
.streaks-celebration { position: fixed; z-index: 1100; top: max(18px, env(safe-area-inset-top)); left: 50%; width: min(380px, calc(100vw - 32px)); transform: translateX(-50%); padding: 10px 8px 10px 16px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--panel); color: var(--ink); box-shadow: var(--soft-shadow); pointer-events: none; }
.streaks-celebration button { pointer-events: auto; flex-shrink: 0; }
.streaks-celebration p { margin: 0; font-size: .9375rem; line-height: 1.4; }
.streaks-celebration-mark { color: var(--accent-strong); font-size: 1.5rem; }
.streaks-celebration .streaks-crown, .streaks-celebration[data-reward="legend"] .streaks-celebration-spark { display: none; }
.streaks-celebration[data-reward="legend"] .streaks-crown { display: block; }
.streaks-particles { position: absolute; inset: 0; pointer-events: none; overflow: hidden; border-radius: inherit; }
.streaks-particles i { position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; border-radius: 50%; background: var(--accent-strong); opacity: 0; }
.streaks-celebration:not([hidden]) { animation: streaks-appear 220ms var(--ease-ui); }
.streaks-celebration[data-reward="spark"]:not([hidden]) i { animation: streaks-spark 900ms ease-out both; }
.streaks-particles i:nth-child(1) { --x: -90px; --y: -24px; }.streaks-particles i:nth-child(2) { --x: 100px; --y: -26px; }.streaks-particles i:nth-child(3) { --x: -110px; --y: 20px; }.streaks-particles i:nth-child(4) { --x: 80px; --y: 24px; }.streaks-particles i:nth-child(5) { --x: 8px; --y: -30px; }
@keyframes streaks-appear { from { opacity: 0; } to { opacity: 1; } }
@keyframes streaks-spark { 0% { opacity: 0; transform: translate(0, 0); } 25% { opacity: .75; } 100% { opacity: 0; transform: translate(var(--x), var(--y)); } }
body.pin-locked .streaks-celebration, body.privacy-covered .streaks-celebration { display: none; }
body[data-streak-bubble="ice"] .mine .bubble, :is(.streaks-preview, .streaks-styles) .mine[data-preview-bubble="ice"] .bubble { --streak-fill: var(--accent-soft); background: var(--streak-fill); color: var(--ink); border: 0; box-shadow: none; }
body[data-streak-bubble="deep"] .mine .bubble, :is(.streaks-preview, .streaks-styles) .mine[data-preview-bubble="deep"] .bubble { --streak-fill: #18263d; background: var(--streak-fill); color: #fff; border: 0; box-shadow: none; }
body[data-streak-bubble="luminous"] .mine .bubble, :is(.streaks-preview, .streaks-styles) .mine[data-preview-bubble="luminous"] .bubble { --streak-fill: #2058bb; background: var(--streak-fill); color: #fff; border: 0; box-shadow: inset 0 0 0 1px var(--accent-strong); }
body[data-streak-bubble="halo"] .mine .bubble, :is(.streaks-preview, .streaks-styles) .mine[data-preview-bubble="halo"] .bubble { --streak-fill: #18263d; background: var(--streak-fill); color: #fff; border: 2px solid #a8caff; box-shadow: none; }
body[data-streak-bubble="crystal"] .mine .bubble, :is(.streaks-preview, .streaks-styles) .mine[data-preview-bubble="crystal"] .bubble { --streak-fill: #eaf1ff; background: linear-gradient(to bottom, #fff, #eaf1ff); color: #18263d; border: 1px solid #a8caff; box-shadow: none; }
body[data-streak-bubble="midnight"] .mine .bubble, :is(.streaks-preview, .streaks-styles) .mine[data-preview-bubble="midnight"] .bubble { --streak-fill: #101217; background: linear-gradient(to bottom, #18263d, #101217); color: #fff; border: 1px solid #596678; box-shadow: none; }
/* An inset frame preserves half-pixel thickness in browsers that round CSS borders. */
body[data-streak-bubble="royal"] .mine .bubble, :is(.streaks-preview, .streaks-styles) .mine[data-preview-bubble="royal"] .bubble { --streak-fill: #18263d; background: linear-gradient(to bottom, #245fc9, #18263d); color: #fff; border: 0 solid #a8caff; box-shadow: inset 0 0 0 1.5px #a8caff; }
body[data-streak-bubble]:not([data-streak-bubble="default"]) .mine .message-lifetime { background: conic-gradient(currentColor var(--life-angle), transparent 0); }
body[data-streak-bubble]:not([data-streak-bubble="default"]) .mine .message-lifetime::after { background: var(--streak-fill); }
body[data-streak-bubble]:not([data-streak-bubble="default"]) .mine .voice-time { color: inherit; }
body[data-streak-bubble]:not([data-streak-bubble="default"]) .mine .reply-quote { background: transparent; }
body[data-streak-bubble]:not([data-streak-bubble="default"]) .mine .reply-quote span { opacity: 1; }
body:is([data-streak-bubble="ice"], [data-streak-bubble="crystal"]) .mine .voice-play { background: var(--panel); color: var(--accent-strong); }
body[data-streak-bubble="ice"] .mine .voice-wave i { background: var(--muted); }
body[data-streak-bubble="ice"] .mine .voice-wave i.played { background: var(--ink); }
body[data-streak-bubble="ice"] .mine .reply-quote { background: var(--panel); }
body[data-streak-bubble="crystal"] .mine .voice-wave i { background: #596678; }
body[data-streak-bubble="crystal"] .mine .voice-wave i.played { background: #18263d; }
@media (max-width: 360px) { .streaks-dialog { padding: 16px; }.streaks-day-mark { width: 28px; height: 28px; } }
@media (prefers-reduced-motion: reduce) { .streaks-particles { display: none; }.streaks-celebration:not([hidden]) { animation-duration: 120ms; } }
@media (forced-colors: active) { .streaks-indicator, .streaks-section, .streaks-day-mark, body[data-streak-bubble] .mine .bubble { border: 1px solid CanvasText; }.streaks-particles { display: none; } }
@media (forced-colors: active) { .streaks-preview, .streaks-preview-badge .streaks-celebration-mark, :is(.streaks-preview, .streaks-styles) .mine[data-preview-bubble] .bubble { border: 1px solid CanvasText; box-shadow: none; } }
