/* ==========================================================================
   Derech chat: messenger on the family fridge.
   Rooms are colourful fridge magnets, day separators are washi tape, pinned messages are sticky notes.
   Desktop: two panes. Mobile (<900px): list, then a full-screen conversation with a sticky composer.
   Module classes: .dcc-*. Fridge classes come from the theme (zero-specificity fallbacks below).
   ========================================================================== */

.dcc { --dcc-color: var(--dk-teal, #1F4D4A); --dcc-hand: 'Amatic SC', 'Fredoka', var(--dk-font-display, system-ui), cursive; --dcc-ok: #2E7D4F; position: relative; display: grid; grid-template-columns: minmax(280px, 350px) minmax(0, 1fr); height: max(560px, calc(100dvh - var(--dk-header-h, 64px) - 72px)); background: var(--dk-paper, #FFFDF8); border: 1px solid var(--dk-line, #E9DDCB); border-radius: var(--dk-r-lg, 26px); box-shadow: var(--dk-shadow, 0 18px 40px -26px rgba(74, 52, 30, .5)); overflow: hidden; }
.dcc button { font: inherit; }

/* ---------- fridge fallbacks (theme wins) ---------- */
:where(.dcc) :where(.dk-tape) { position: absolute; top: -9px; inset-inline-start: 50%; width: 70px; height: 20px; transform: translateX(50%) rotate(-4deg); background: repeating-linear-gradient(45deg, rgba(227, 168, 53, .55) 0 7px, rgba(255, 246, 218, .7) 7px 14px); box-shadow: 0 1px 2px rgba(74, 52, 30, .15); border-radius: 2px; pointer-events: none; }
:where(.dcc) :where(.dk-note) { position: relative; background: #FFF3B8; border-radius: 4px 4px 14px 4px; box-shadow: 0 8px 16px -12px rgba(74, 52, 30, .5); }
:where(.dcc) :where(.dk-coin) { display: inline-flex; align-items: center; gap: .25em; padding: .2em .7em; border-radius: 999px; background: radial-gradient(circle at 30% 30%, #FFE79A, var(--dk-mustard, #E3A835)); color: #4A3200; font-weight: 800; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .12), 0 3px 8px -3px rgba(160, 110, 0, .6); }
:where(.dcc) :where(.dk-polaroid) { margin: 0; background: #fff; padding: 8px 8px 22px; box-shadow: 0 10px 22px -14px rgba(0, 0, 0, .55); transform: rotate(-3deg); position: relative; }
:where(.dcc) :where(.dk-hand) { font-family: var(--dcc-hand); font-weight: 700; }
:where(.dcc) :where(.dk-wiggle-hover) { transition: transform .25s var(--dk-ease-bounce, cubic-bezier(.34, 1.56, .64, 1)); }
/* A tape strip is its own element here (the theme's .dk-tape decorates a whole card with ::before),
   so pin it absolutely and drop the theme's pseudo strip to avoid a second tape and layout shifts. */
.dcc span.dk-tape { position: absolute; z-index: 3; top: -9px; inset-inline-start: 50%; width: 70px; height: 20px; margin: 0; transform: translateX(50%) rotate(-4deg); background: var(--dk-tape, repeating-linear-gradient(45deg, rgba(227, 168, 53, .55) 0 7px, rgba(255, 246, 218, .7) 7px 14px)); border-radius: 2px; box-shadow: 0 1px 2px rgba(74, 52, 30, .15); opacity: .95; pointer-events: none; }
.dcc span.dk-tape::before { content: none; }

/* ---------- list pane ---------- */
.dcc-side { display: flex; flex-direction: column; min-height: 0; border-inline-end: 1px solid var(--dk-line, #E9DDCB); background: var(--dk-cream, #FBF4E8); background-image: radial-gradient(rgba(74, 52, 30, .05) 1px, transparent 1px); background-size: 14px 14px; }
.dcc-side__head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: 1rem 1rem .5rem; }
.dcc-side__title { margin: 0; display: flex; align-items: center; gap: .5rem; font-size: 2rem; line-height: 1; color: var(--dk-teal, #1F4D4A); }
.dcc-live { width: 10px; height: 10px; border-radius: 50%; background: #4CAF73; box-shadow: 0 0 0 0 rgba(76, 175, 115, .6); animation: dcc-pulse 2.2s infinite; }
.dcc-search { margin: 0 1rem .5rem; }
.dcc-side__scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 0 .6rem 1rem; overscroll-behavior: contain; }
.dcc-group { margin-top: .6rem; }
.dcc-group__title { margin: .4rem .4rem .35rem; font-size: .78rem; font-weight: 800; letter-spacing: .04em; color: var(--dk-muted, #7C6F66); text-transform: none; }
.dcc-group__empty { margin: .2rem .5rem; font-size: .85rem; color: var(--dk-muted, #7C6F66); }
.dcc-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .2rem; }
.dcc-item { width: 100%; display: flex; align-items: center; gap: .7rem; padding: .55rem .6rem; border: 0; border-radius: 16px; background: transparent; text-align: start; color: inherit; cursor: pointer; position: relative; transition: background .2s, box-shadow .2s, transform .25s var(--dk-ease-bounce, ease); }
.dcc-item:hover { background: rgba(255, 253, 248, .75); }
.dcc-item.is-active { background: var(--dk-paper, #fff); box-shadow: 0 6px 16px -12px rgba(74, 52, 30, .55); }
.dcc-item.is-active::before { content: ''; position: absolute; inset-inline-start: -2px; top: 18%; bottom: 18%; width: 4px; border-radius: 4px; background: var(--dcc-color); }
.dcc-item--dm.is-active::before { background: var(--dk-clay, #C8572B); }
.dcc-item.is-soon { opacity: .9; }
.dcc-item.is-soon .dcc-magnet { filter: saturate(.6); }
.dcc-item__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .1rem; }
.dcc-item__top { display: flex; align-items: center; gap: .3rem; min-width: 0; }
.dcc-item__name { font-weight: 700; color: var(--dk-ink, #2A2420); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.dcc-item.is-unread .dcc-item__name { font-weight: 900; }
.dcc-item__time { margin-inline-start: auto; flex: none; font-size: .72rem; color: var(--dk-muted, #7C6F66); }
.dcc-item.is-unread .dcc-item__time { color: var(--dk-clay, #C8572B); font-weight: 700; }
.dcc-item__lock { flex: none; display: inline-flex; color: var(--dk-muted, #7C6F66); }
.dcc-item__lock .dk-icon { width: 14px; height: 14px; }
.dcc-item__star { font-size: .8rem; }
.dcc-item__sub { display: flex; align-items: center; gap: .35rem; min-width: 0; font-size: .82rem; color: var(--dk-muted, #7C6F66); }
.dcc-item__preview { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dcc-item.is-unread .dcc-item__preview { color: var(--dk-ink-2, #4A403A); }
.dcc-item .dk-avatar-wrap { flex: none; }

/* magnets */
.dcc-emoji { flex: none; width: 46px; height: 46px; display: grid; place-items: center; font-size: 24px; border-radius: 50%; position: relative; background: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, .9) 0 10%, transparent 11%), radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--dcc-color) 70%, #fff), var(--dcc-color)); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .15), 0 6px 10px -6px rgba(0, 0, 0, .5); }
.dcc-magnet { transform: rotate(-8deg); transition: transform .3s var(--dk-ease-bounce, ease); }
.dcc-items li:nth-child(even) .dcc-magnet { transform: rotate(7deg); border-radius: 16px; }
.dcc-items li:nth-child(3n) .dcc-magnet { border-radius: 44% 56% 50% 50% / 52% 48% 52% 48%; }
.dcc-item:hover .dcc-magnet, .dcc-item.is-active .dcc-magnet { transform: rotate(0) scale(1.08); }
.dcc-emoji--sm { width: 36px; height: 36px; font-size: 19px; }
.dcc-emoji--lg { width: 72px; height: 72px; font-size: 38px; }

.dcc-badge { flex: none; min-width: 20px; height: 20px; padding: 0 6px; display: inline-grid; place-items: center; border-radius: 999px; background: var(--dk-clay, #C8572B); color: #fff; font-size: 11px; font-weight: 800; line-height: 1; }
.dcc-badge--at { background: var(--dk-teal, #1F4D4A); }
.dcc-tag { flex: none; display: inline-flex; align-items: center; padding: 0 .45em; border-radius: 999px; font-size: .66rem; font-weight: 800; line-height: 1.6; }
.dcc-tag--ai { background: #FFF1C7; color: #7A5200; border: 1px solid #F1DDA6; }
.dcc-tag--mod { background: var(--dk-teal, #1F4D4A); color: #fff; margin-inline-start: .3rem; }
.dcc-online { display: inline-flex; align-items: center; gap: .25rem; flex: none; font-weight: 700; color: #2E7D4F; font-size: .76rem; }
.dcc-pulse { width: 7px; height: 7px; border-radius: 50%; background: #4CAF73; animation: dcc-pulse 2.2s infinite; }
.dcc-soon { flex: none; font-weight: 700; color: #8A5A00; font-size: .76rem; }
.dcc-ticks { flex: none; font-size: .72rem; letter-spacing: -.25em; color: var(--dk-muted, #7C6F66); padding-inline-end: .25em; }
.dcc-ticks.is-read { color: #2F7FB5; }

.dcc-dm-empty { display: flex; flex-direction: column; align-items: center; gap: .6rem; text-align: center; padding: .8rem .6rem; }
.dcc-dm-empty p { margin: 0; }
.dcc-polaroid { width: 140px; }
.dcc-polaroid img { width: 100%; height: auto; display: block; aspect-ratio: 1; object-fit: cover; }
.dcc-polaroid figcaption { text-align: center; font-size: 1.15rem; margin-top: 4px; }
.dcc-polaroid--lg { width: 220px; }

/* ---------- conversation pane ---------- */
.dcc-pane { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--dk-paper, #FFFDF8); }
.dcc-welcome { margin: auto; display: flex; flex-direction: column; align-items: center; gap: .6rem; text-align: center; padding: 2rem; max-width: 380px; }
.dcc-welcome h2 { margin: .6rem 0 0; font-size: 2rem; }
.dcc-welcome p { margin: 0; }
.dcc-conv { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.dcc-head { display: flex; align-items: center; gap: .4rem; padding: .55rem .7rem; border-bottom: 1px solid var(--dk-line, #E9DDCB); background: color-mix(in srgb, var(--dcc-color) 7%, var(--dk-paper, #fff)); min-height: 62px; }
.dcc-back { display: none; }
.dcc-back .dk-icon { width: 24px; height: 24px; }
.dcc-head__who { flex: 1; min-width: 0; display: flex; align-items: center; gap: .6rem; border: 0; background: transparent; padding: .2rem; border-radius: 14px; cursor: pointer; text-align: start; color: inherit; }
.dcc-head__who:hover { background: rgba(255, 255, 255, .6); }
.dcc-head__text { min-width: 0; display: flex; flex-direction: column; }
.dcc-head__title { font-weight: 800; font-size: 1.05rem; color: var(--dk-ink, #2A2420); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; outline: none; }
.dcc-head__title:focus, .dcc-head__title:focus-visible { outline: none; box-shadow: none; }
.dcc-head__sub { font-size: .78rem; color: var(--dk-muted, #7C6F66); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dcc-head__actions { display: flex; align-items: center; gap: .1rem; }
.dcc-head__actions .dk-btn { font-size: 1.1rem; }

.dcc-pinned { display: flex; flex-wrap: wrap; align-items: flex-start; gap: .25rem .5rem; margin: .7rem .8rem .2rem; padding: .85rem .8rem .55rem; font-size: .86rem; line-height: 1.45; transform: rotate(-.4deg); z-index: 2; }
.dcc-pinned span.dk-tape { width: 54px; height: 16px; top: -8px; }
.dcc-pinned__icon { flex: none; }
.dcc-pinned__text { flex: 1 1 200px; min-width: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.dcc-pinned__link { flex: none; align-self: center; margin-inline-start: auto; font-weight: 700; font-size: .8rem; color: var(--dk-teal, #1F4D4A); white-space: nowrap; }
.dcc-pinned--box { transform: none; margin: 0; }
.dcc-ainote { display: flex; align-items: center; gap: .5rem; margin: .25rem .8rem; padding: .35rem .6rem; border-radius: 12px; background: #FFF8E3; border: 1px dashed #F1DDA6; font-size: .76rem; color: #6A4A00; }
.dcc-ainote img { border-radius: 50%; flex: none; }
.dcc-ainote a { color: inherit; font-weight: 700; }

.dcc-scroll { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: .6rem .8rem 1rem; display: flex; flex-direction: column; overscroll-behavior: contain; background-color: var(--dk-paper, #FFFDF8); background-image: radial-gradient(color-mix(in srgb, var(--dcc-color) 9%, transparent) 1.2px, transparent 1.3px); background-size: 18px 18px; scroll-behavior: auto; }
.dcc-scroll:focus-visible { box-shadow: inset var(--dk-ring); }
.dcc-older { display: flex; justify-content: center; align-items: center; gap: .5rem; padding: .3rem 0 .6rem; }
.dcc-sentinel { display: block; width: 1px; height: 1px; }
.dcc-row--day { display: flex; justify-content: center; }
.dcc-day { margin: .9rem 0 .5rem; padding: 0; background: transparent; align-self: center; }
.dcc span.dk-tape.dcc-day__tape { position: static; display: inline-block; width: auto; height: auto; padding: .15em 1em; transform: rotate(-2deg); font-family: var(--dcc-hand); font-size: 1.15rem; font-weight: 700; color: var(--dk-ink-2, #4A403A); }
.dcc .dcc-row--day:nth-of-type(even) span.dcc-day__tape { transform: rotate(1.5deg); }

/* messages */
.dcc-msg { position: relative; display: flex; align-items: flex-end; gap: .45rem; margin-top: 2px; padding-inline: 2px; border-radius: 14px; transition: transform .15s ease-out, background .3s; touch-action: pan-y; }
.dcc-msg.is-first { margin-top: .55rem; }
.dcc-msg.is-mine { justify-content: flex-end; }
.dcc-msg.is-highlight { background: rgba(227, 168, 53, .18); }
.dcc-msg.is-swiping::before { content: '↩'; position: absolute; inset-inline-start: -26px; top: 50%; transform: translateY(-50%); font-size: 18px; color: var(--dk-teal, #1F4D4A); }
.dcc-msg__avatar { flex: none; width: 32px; align-self: flex-end; }
.dcc-msg.is-mine .dcc-msg__avatar { display: none; }
.dcc-msg__avatar img { width: 32px; height: 32px; }
.dcc-msg__col { display: flex; flex-direction: column; align-items: flex-start; max-width: min(78%, 560px); min-width: 0; }
.dcc-msg.is-mine .dcc-msg__col { align-items: flex-end; }
.dcc-msg__name { font-size: .78rem; font-weight: 800; margin: 0 .6rem .12rem; text-decoration: none; display: inline-flex; align-items: center; }
a.dcc-msg__name:hover { text-decoration: underline; }
.dcc .dcc-bubble { white-space: normal; max-width: 100%; display: flex; flex-direction: column; gap: .3rem; padding: .5rem .8rem .35rem; border-radius: 20px; overflow-wrap: anywhere; line-height: 1.5; }
.dcc .dcc-bubble.is-first:not(.dk-bubble--me) { border-start-start-radius: 6px; }
.dcc .dcc-bubble.is-first.dk-bubble--me { border-start-end-radius: 6px; }
.dcc .dcc-bubble.is-media { padding: 4px; }
.dcc .dcc-bubble.is-media .dcc-meta { margin: -1.6rem .5rem .25rem; position: relative; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .6); }
.dcc .dcc-bubble.is-jumbo { background: transparent; box-shadow: none; padding: 0 .2rem; }
.dcc .dcc-bubble.is-jumbo .dcc-text { font-size: 2.4rem; line-height: 1.15; }
.dcc .dk-bubble--guri { background: #FFF6DA; border: 1.5px solid #F1DDA6; box-shadow: 0 6px 14px -12px rgba(160, 110, 0, .8); }
.dcc .dcc-bubble--ice { background: #FFF3B8; border: 0; border-radius: 6px 6px 18px 6px; transform: rotate(-.6deg); box-shadow: 0 8px 16px -12px rgba(74, 52, 30, .55); }
.dcc-msg.is-bot .dcc-msg__name { color: #7A5200 !important; }
.dcc-msg.is-sending .dcc-bubble { opacity: .75; }
.dcc-msg.is-failed .dcc-bubble { outline: 2px dashed var(--dk-danger, #B3261E); outline-offset: 2px; }
.dcc-text { font-size: .95rem; }
.dcc-text a { color: var(--dk-teal-600, #2B6460); text-decoration: underline; word-break: break-all; }
.dcc-aitag { align-self: flex-start; font-size: .66rem; font-weight: 800; color: #7A5200; background: #FFE9A8; border-radius: 999px; padding: 0 .55em; line-height: 1.7; }
.dcc-disclaimer { align-self: flex-start; font-size: .66rem; color: #8A6A20; text-decoration: underline dotted; }
.dcc-quote { display: flex; flex-direction: column; gap: 0; width: 100%; padding: .3rem .55rem; border: 0; border-inline-start: 3px solid var(--dk-teal-400, #4E8A84); border-radius: 8px 12px 12px 8px; background: rgba(255, 255, 255, .55); color: var(--dk-ink-2, #4A403A); text-align: start; cursor: pointer; font-size: .8rem; line-height: 1.35; }
.dcc-quote strong { color: var(--dk-teal-600, #2B6460); font-size: .76rem; }
.dcc-quote span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dcc-deleted { display: inline-flex; align-items: center; gap: .35rem; font-style: italic; color: var(--dk-muted, #7C6F66); font-size: .88rem; }
.dcc-deleted .dk-icon { width: 14px; height: 14px; }
.dcc-img { display: block; padding: 0; border: 0; background: transparent; cursor: zoom-in; border-radius: 16px; overflow: hidden; }
.dcc-img img { display: block; max-width: min(280px, 62vw); max-height: 340px; width: auto; height: auto; border-radius: 16px; margin: 0; }
.dcc-meta { display: flex; align-items: center; justify-content: flex-end; gap: .3rem; font-size: .7rem; color: #6B5F55; margin-inline-start: auto; }
.dcc-meta__sending { font-size: .7rem; }
.dcc-reacts { display: flex; flex-wrap: wrap; gap: .2rem; margin-top: -.35rem; padding-inline: .5rem; position: relative; z-index: 1; }
.dcc-react { display: inline-flex; align-items: center; gap: .2rem; padding: .05rem .45rem; border-radius: 999px; border: 1px solid var(--dk-line, #E9DDCB); background: var(--dk-paper, #fff); font-size: .78rem; font-weight: 700; color: var(--dk-ink-2, #4A403A); cursor: pointer; box-shadow: 0 2px 5px -3px rgba(0, 0, 0, .35); transition: transform .15s var(--dk-ease-bounce, ease); }
.dcc-react:hover { transform: scale(1.08); }
.dcc-react.is-mine { border-color: var(--dk-clay-400, #DE7A50); background: var(--dk-clay-50, #FDF0E9); }
.dcc-retry { margin-top: .2rem; border: 0; background: transparent; color: var(--dk-danger, #B3261E); font-weight: 700; font-size: .78rem; cursor: pointer; text-decoration: underline; }
.dcc-msg__more { flex: none; align-self: center; width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--dk-muted, #7C6F66); cursor: pointer; opacity: 0; transition: opacity .15s; }
.dcc-msg__more .dk-icon { width: 18px; height: 18px; }
.dcc-msg:hover .dcc-msg__more, .dcc-msg:focus-within .dcc-msg__more { opacity: 1; }
.dcc-msg.is-mine .dcc-msg__more { order: -1; }
@media (hover: none) { .dcc-msg__more { display: none; } }

/* voice */
.dcc-voice { display: flex; align-items: center; gap: .55rem; min-width: 210px; padding: .15rem 0; }
.dcc-voice__btn { flex: none; width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--dk-teal, #1F4D4A); color: #fff; cursor: pointer; }
.dcc-voice__btn .dk-icon { width: 18px; height: 18px; }
.dcc-voice__track { flex: 1; height: 6px; border-radius: 6px; background: rgba(31, 77, 74, .18); position: relative; cursor: pointer; overflow: hidden; }
.dcc-voice__fill { position: absolute; inset-block: 0; inset-inline-start: 0; background: var(--dk-teal, #1F4D4A); border-radius: 6px; }
.dcc-voice__time { flex: none; font-size: .74rem; font-variant-numeric: tabular-nums; color: var(--dk-ink-2, #4A403A); }

/* typing, jump, coin */
.dcc-typing { display: flex; align-items: center; gap: .45rem; margin: .5rem .2rem 0; font-size: .8rem; color: var(--dk-muted, #7C6F66); }
.dcc-typing img { border-radius: 50%; }
.dcc-dots { display: inline-flex; gap: 3px; padding: .45rem .6rem; border-radius: 14px; background: var(--dk-sky, #DDEDF1); }
.dcc-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--dk-teal-400, #4E8A84); animation: dcc-dot 1.2s infinite ease-in-out; }
.dcc-dots i:nth-child(2) { animation-delay: .15s; }
.dcc-dots i:nth-child(3) { animation-delay: .3s; }
.dcc-jump { position: absolute; inset-inline-end: 14px; bottom: 92px; z-index: 5; width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--dk-line, #E9DDCB); border-radius: 50%; background: var(--dk-paper, #fff); color: var(--dk-teal, #1F4D4A); box-shadow: var(--dk-shadow, 0 10px 20px -12px rgba(0, 0, 0, .5)); cursor: pointer; }
.dcc-jump .dcc-badge { position: absolute; top: -6px; inset-inline-start: -6px; }
.dcc-plus { position: absolute; bottom: 86px; inset-inline-start: 50%; transform: translateX(50%); z-index: 6; font-size: .95rem; pointer-events: none; animation: dcc-rise 1.4s ease-out both; }

/* footers */
.dcc-foot { padding: 1rem; border-top: 1px solid var(--dk-line, #E9DDCB); background: var(--dk-cream, #FBF4E8); text-align: center; padding-bottom: calc(1rem + var(--dk-safe-bottom, 0px)); }
.dcc-foot p { margin: 0 0 .3rem; }
.dcc-foot--soon { display: flex; align-items: center; justify-content: center; gap: 1.2rem; text-align: start; }
.dcc-foot--soon .dcc-polaroid { width: 110px; flex: none; }
.dcc-foot__big { font-size: 1.9rem; line-height: 1.1; color: var(--dk-teal, #1F4D4A); font-variant-numeric: tabular-nums; }
.dcc-foot--locked { text-align: start; }

/* composer */
.dcc .dcc-composer { flex-direction: column; align-items: stretch; gap: .35rem; padding: .5rem .6rem; padding-bottom: calc(.55rem + var(--dk-safe-bottom, 0px)); background: var(--dk-paper, #fff); }
.dcc-composer__row { display: flex; align-items: flex-end; gap: .25rem; }
.dcc-input { flex: 1; min-width: 0; min-height: 44px; max-height: 160px; padding: .62rem 1rem; border: 1.5px solid var(--dk-line-2, #DCCBB2); border-radius: 22px; background: var(--dk-cream, #FBF4E8); color: var(--dk-ink, #2A2420); font: inherit; font-size: 16px; line-height: 1.4; resize: none; overflow-y: auto; transition: border-color .2s, background .2s; }
.dcc-input:focus { outline: none; border-color: var(--dk-teal-400, #4E8A84); background: #fff; box-shadow: var(--dk-ring); }
.dcc-tool { flex: none; width: 42px; height: 42px; cursor: pointer; }
.dcc-tool .dk-icon { width: 22px; height: 22px; }
.dcc-send { flex: none; width: 46px; height: 46px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--dk-clay, #C8572B); color: #fff; cursor: pointer; box-shadow: 0 8px 16px -10px rgba(169, 67, 28, .9); transition: transform .2s var(--dk-ease-bounce, ease), background .2s; }
.dcc-send:hover { transform: scale(1.06) rotate(-6deg); }
.dcc-send:disabled { opacity: .55; cursor: wait; }
.dcc-send .dk-icon { width: 22px; height: 22px; transform: scaleX(-1); }
.dcc-send--mic { background: var(--dk-teal, #1F4D4A); box-shadow: 0 8px 16px -10px rgba(31, 77, 74, .9); }
.dcc-send--mic .dk-icon { transform: none; }
.dcc-replying, .dcc-attach { display: flex; align-items: center; gap: .5rem; padding: .35rem .6rem; border-radius: 12px; background: var(--dk-cream, #FBF4E8); border-inline-start: 4px solid var(--dk-teal-400, #4E8A84); font-size: .82rem; }
.dcc-replying .dk-icon { width: 16px; height: 16px; flex: none; color: var(--dk-teal-600, #2B6460); }
.dcc-replying__text { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dcc-attach img { width: 54px; height: 54px; object-fit: cover; border-radius: 10px; transform: rotate(-3deg); }
.dcc-attach .dk-spinner { width: 20px; height: 20px; }
.dcc-attach > :nth-last-child(1) { margin-inline-start: auto; }
.dcc-emojis { display: flex; gap: .15rem; overflow-x: auto; padding: .1rem; scrollbar-width: none; }
.dcc-emojis::-webkit-scrollbar { display: none; }
.dcc-emojis button { flex: none; width: 40px; height: 40px; border: 0; border-radius: 12px; background: transparent; font-size: 22px; cursor: pointer; transition: transform .15s var(--dk-ease-bounce, ease); }
.dcc-emojis button:hover, .dcc-emojis button:focus-visible { transform: translateY(-3px) scale(1.2); background: var(--dk-cream-2, #F5EAD6); }
.dcc-rec { display: flex; align-items: center; gap: .55rem; padding: .3rem .2rem; font-weight: 700; color: var(--dk-danger, #B3261E); font-variant-numeric: tabular-nums; }
.dcc-rec__time { min-width: 2.6em; color: var(--dk-ink, #2A2420); font-size: .95rem; }
.dcc-rec__wave { flex: 1 1 auto; min-width: 60px; height: 34px; color: var(--dk-teal, #1F4D4A); background: var(--dk-cream, #FBF4E8); border-radius: 999px; }
.dcc-rec__cancel { color: var(--dk-muted, #6F6259); }
.dcc-rec__cancel:hover, .dcc-rec__cancel:focus-visible { color: #B3261E; }
.dcc-rec__send { animation: dcc-rec-pop .3s var(--dk-ease-bounce, ease); }
@keyframes dcc-rec-pop { from { transform: scale(.6); } to { transform: none; } }
.dcc-rec__dot { width: 12px; height: 12px; border-radius: 50%; background: #E0362C; animation: dcc-pulse-red 1.2s infinite; }

/* skeleton & empty */
.dcc-skel { display: flex; flex-direction: column; gap: .7rem; padding: .6rem 0; }
.dcc-skel__row { display: flex; align-items: flex-end; gap: .45rem; }
.dcc-skel__row.is-me { justify-content: flex-end; }
.dcc-skel__row .dk-skeleton--circle { width: 32px; height: 32px; }
.dcc-skel__b { height: 38px; border-radius: 18px; }
.dcc-empty { margin: auto; display: flex; flex-direction: column; align-items: center; gap: .5rem; text-align: center; max-width: 320px; padding: 1.5rem 1rem; color: var(--dk-ink-2, #4A403A); }
.dcc-empty img { animation: dcc-bob 3s ease-in-out infinite; }
.dcc-empty p { margin: 0; font-weight: 600; }

/* sheets & lightbox */
.dcc-sheet .dk-modal__dialog { width: min(520px, 100%); }
.dcc-people { list-style: none; margin: .6rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .2rem; }
.dcc-people li { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.dcc-people .dk-user { text-decoration: none; color: inherit; display: flex; align-items: center; gap: .5rem; }
.dcc-pick { width: 100%; border: 0; background: transparent; padding: .45rem .4rem; border-radius: 12px; cursor: pointer; text-align: start; }
.dcc-pick:hover { background: var(--dk-cream, #FBF4E8); }
.dcc-pick:disabled { opacity: .6; cursor: not-allowed; }
.dcc-pick .dk-user__meta { display: block; }
.dcc-info__hero { display: flex; flex-direction: column; align-items: center; gap: .5rem; text-align: center; }
.dcc-info__hero p { margin: 0; color: var(--dk-ink-2, #4A403A); }
.dcc-info__peer { display: flex; align-items: center; gap: .8rem; }
.dcc-info__peer p { margin: .1rem 0 0; }
.dcc-react-row { display: flex; justify-content: space-between; gap: .2rem; margin-bottom: .8rem; padding: .3rem; border-radius: 999px; background: var(--dk-cream, #FBF4E8); }
.dcc-react-row button { width: 48px; height: 48px; border: 0; border-radius: 50%; background: transparent; font-size: 26px; cursor: pointer; transition: transform .15s var(--dk-ease-bounce, ease); }
.dcc-react-row button:hover, .dcc-react-row button:focus-visible { transform: translateY(-4px) scale(1.2); }
.dcc-react-row button.is-mine { background: var(--dk-paper, #fff); box-shadow: 0 3px 8px -4px rgba(0, 0, 0, .35); }
.dcc-sheet .dk-list__item.is-danger { color: var(--dk-danger, #B3261E); }
.dcc-sheet .dk-list__item .dk-icon { width: 18px; height: 18px; }
.dcc-lightbox { background: rgba(20, 16, 14, .92); cursor: zoom-out; }
.dcc-lightbox img { max-width: min(96vw, 1200px); max-height: 88dvh; border-radius: 12px; object-fit: contain; }
.dcc-lightbox__close { position: absolute; top: calc(12px + env(safe-area-inset-top, 0px)); inset-inline-end: 12px; background: rgba(255, 255, 255, .15); color: #fff; }

/* Desktop widths where the floating Guri (inline-start corner) and the accessibility button (inline-end corner)
   reach into the chat card: end the card above them so the room list and the composer are never covered. */
@media (min-width: 900px) and (max-width: 1399px) {
	.dcc { height: max(520px, calc(100dvh - var(--dk-header-h, 64px) - 140px)); }
}

/* ---------- mobile: list screen → full-screen conversation ---------- */
@media (max-width: 899px) {
	.dcc { display: block; height: auto; border: 0; border-radius: 0; box-shadow: none; background: transparent; overflow: visible; }
	.dcc-side { border: 0; background: transparent; background-image: none; }
	.dcc-side__head { padding-inline: .2rem; }
	.dcc-search { margin-inline: .2rem; }
	.dcc-side__scroll { overflow: visible; padding-inline: 0; padding-block-end: 76px; }
	.dcc-pane { display: none; }
	.dcc.has-active .dcc-pane { display: flex; position: fixed; inset: 0; z-index: 800; height: 100dvh; background: var(--dk-paper, #FFFDF8); animation: dcc-slide .26s var(--dk-ease, ease) both; }
	.dcc-welcome { display: none !important; }
	.dcc-back { display: inline-grid; }
	.dcc-head { padding-top: calc(.5rem + env(safe-area-inset-top, 0px)); }
	.dcc-msg__col { max-width: 84%; }
	.dcc-jump { bottom: calc(88px + var(--dk-safe-bottom, 0px)); }
	.dcc-sheet { padding: 0; place-items: end center; }
	.dcc-sheet .dk-modal__dialog { width: 100%; border-radius: var(--dk-r-xl, 28px) var(--dk-r-xl, 28px) 0 0; max-height: 88dvh; padding-bottom: var(--dk-safe-bottom, 0px); animation: dk-sheet-up .3s var(--dk-ease, ease); }
	.dcc-sheet .dk-modal__dialog::before { content: ''; display: block; width: 44px; height: 5px; border-radius: 9px; background: var(--dk-line-2, #DCCBB2); margin: .6rem auto 0; }
	body.dcc-open .dk-bottom-nav, body.dcc-open .dk-guri { display: none !important; }
	html.dcc-lock, html.dcc-lock body { overflow: hidden; }
}

/* ---------- guest teaser & feed widget ---------- */
.dcc-guest { display: flex; flex-direction: column; gap: 1rem; }
.dcc-guest__head h1 { margin: .1rem 0 0; }
.dcc-guest__head .dk-eyebrow { margin: 0; }
.dcc-guest__rooms { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .7rem; }
.dcc-guest__room { display: flex; align-items: center; gap: .6rem; padding: .7rem; border-radius: 18px; background: var(--dk-paper, #fff); border: 1px solid var(--dk-line, #E9DDCB); }
.dcc-guest__room > span:last-child { display: flex; flex-direction: column; }
.dcc-side-rooms { list-style: none; margin: 0 0 .5rem; padding: 0; display: flex; flex-direction: column; gap: .35rem; }
.dcc-side-rooms a { display: flex; align-items: center; gap: .55rem; padding: .35rem .4rem; border-radius: 14px; text-decoration: none; color: inherit; transition: background .2s; }
.dcc-side-rooms a:hover { background: var(--dk-cream, #FBF4E8); }
.dcc-side-rooms .dcc-emoji { transform: rotate(-6deg); }
.dcc-side-rooms li:nth-child(even) .dcc-emoji { transform: rotate(6deg); }
.dcc-side-rooms__name { flex: 1; min-width: 0; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dcc-side-rooms .is-soon a { opacity: .85; }

/* YouTube click-to-load (shared look with forums) */
.dc-yt { margin-top: .3rem; border-radius: 14px; overflow: hidden; width: min(320px, 100%); }
.dc-yt iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; display: block; }
.dc-yt__card { width: 100%; display: flex; align-items: center; gap: .6rem; padding: .55rem .7rem; border: 1px solid var(--dk-line, #E9DDCB); border-radius: 14px; background: rgba(255, 255, 255, .8); cursor: pointer; text-align: start; color: inherit; }
.dc-yt__play { flex: none; width: 40px; height: 28px; border-radius: 9px; background: #D62C1F; color: #fff; display: grid; place-items: center; font-size: 12px; }
.dc-yt__text { display: flex; flex-direction: column; font-size: .82rem; }

.dc-wall { position: relative; display: flex; align-items: center; gap: 1rem; padding: 1.2rem; }
.dc-wall__art { flex: none; width: 120px; }
.dc-wall__art img { width: 100%; height: auto; border-radius: 46% 54% 42% 58% / 52% 44% 56% 48%; transform: rotate(-3deg); }
.dc-wall__body { flex: 1; display: flex; flex-direction: column; gap: .4rem; }
.dc-wall__body h3, .dc-wall__body p { margin: 0; }
@media (max-width: 520px) { .dc-wall { flex-direction: column; text-align: center; } .dc-wall .dk-row { justify-content: center; } }

/* ---------- motion ---------- */
@keyframes dcc-pulse { 0% { box-shadow: 0 0 0 0 rgba(76, 175, 115, .55); } 70% { box-shadow: 0 0 0 7px rgba(76, 175, 115, 0); } 100% { box-shadow: 0 0 0 0 rgba(76, 175, 115, 0); } }
@keyframes dcc-pulse-red { 50% { opacity: .35; transform: scale(.8); } }
@keyframes dcc-dot { 0%, 80%, 100% { transform: translateY(0); opacity: .5; } 40% { transform: translateY(-4px); opacity: 1; } }
@keyframes dcc-rise { 0% { opacity: 0; transform: translate(50%, 10px) scale(.7); } 25% { opacity: 1; transform: translate(50%, -6px) scale(1.1); } 100% { opacity: 0; transform: translate(50%, -46px) scale(1); } }
@keyframes dcc-bob { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-6px) rotate(3deg); } }
@keyframes dcc-slide { from { transform: translateX(-24px); opacity: .4; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
	.dcc *, .dcc *::before, .dcc *::after { animation: none !important; transition: none !important; }
	.dcc-magnet, .dcc .dcc-day__tape, .dcc-pinned, .dcc .dcc-bubble--ice, .dcc-side-rooms .dcc-emoji { transform: none !important; }
}
@media (forced-colors: active) {
	.dcc-item.is-active { outline: 2px solid Highlight; }
	.dcc-badge { border: 1px solid CanvasText; }
}

/* ---------- free tier counter + Guri animations ---------- */
.dcc .dc-free { margin: 0; align-self: center; padding: .1rem .7rem; border-radius: 999px; background: var(--dk-mustard-100, #FBEBC6); color: #6A4A00; font-size: .74rem; font-weight: 700; text-align: center; }
.dcc .dc-free.is-out { background: var(--dk-clay-50, #FDF0E9); color: var(--dk-clay-600, #A9431C); }
.dcc-guri-anim { display: inline-flex; width: 64px; height: 64px; }
.dcc-guri-anim .dk-guri-media, .dcc-guri-landed .dk-guri-media { width: 100%; height: 100%; object-fit: contain; }
.dcc-guri-landed { position: absolute; inset-inline-start: 12px; bottom: 96px; width: 72px; height: 72px; z-index: 6; pointer-events: none; }

/* Transcript of a voice question to Guri, under the voice bubble. */
.dcc-text--transcript { margin-top: .35rem; padding-top: .35rem; border-top: 1px dashed currentColor; font-size: .9em; opacity: .85; }
.dcc-text--transcript::before { content: '📝 '; }
