/* Shared web presentation. Confirmed waitlist tokens live in danmuji-tokens.css;
   card, form and status recipes here are derived for the current app. */
:root { color-scheme: light; }
:root[data-dm-theme="dark"] { color-scheme: dark; }
body, .shell, .danmuji-shell, .danmuji-shell .main { background: var(--dm-ui-canvas); color: var(--dm-ui-text-primary); font-family: var(--dm-ui-font-family); }
a, .text-link, .link-button { color: var(--dm-ui-text-primary); text-decoration-color: var(--dm-ui-border-strong); }
:focus-visible { outline: 2px solid var(--dm-ui-focus); outline-offset: 3px; }

/* Shell and navigation */
.danmuji-shell .rail { background: var(--dm-ui-surface-soft); border-right: 1px solid var(--dm-ui-border); }
.danmuji-shell .brand { min-height: 44px; }
.danmuji-shell .brand, .mobile-brand { color: var(--dm-ui-text-primary); }
.brand-wordmark { display: block; width: 126px; height: auto; max-height: 42px; object-fit: contain; object-position: left center; }
.danmuji-shell .account .ui-icon { color: var(--dm-ui-text-secondary); }
.rail-nav-label, .danmuji-shell .head-title p { color: var(--dm-ui-text-muted); }
.danmuji-shell .nav button, .rail-extra, .danmuji-shell .account, .danmuji-shell .logout, .head-actions button, .head-actions .head-back { color: var(--dm-ui-text-secondary); }
.danmuji-shell .nav button:hover, .rail-extra:hover, .head-actions button:hover { background: var(--dm-ui-surface); color: var(--dm-ui-text-primary); }
.danmuji-shell .nav button.active { background: var(--dm-ui-surface); color: var(--dm-ui-text-primary); box-shadow: inset 0 0 0 1px var(--dm-ui-border); }
.danmuji-shell .nav button.active .ui-icon, .mobile-nav button.active { color: var(--dm-ui-text-primary); }
.account-line, .danmuji-shell .main-head { border-color: var(--dm-ui-border); }
.danmuji-shell .main-head { background: var(--dm-ui-canvas); }
.danmuji-shell .head-title h1, .mobile-brand { color: var(--dm-ui-text-primary); }
.danmuji-shell .account .avatar { background: var(--dm-ui-surface); color: var(--dm-ui-text-primary); border: 1px solid var(--dm-ui-border); }

/* Content type and shared surfaces */
.section-kicker, .home-date { color: var(--dm-ui-text-secondary); }
.section-intro h2, .chat-welcome h2, .home-intro h2, .profile-hero h2, .login-card h1 { color: var(--dm-ui-text-primary); }
.section-intro p, .chat-welcome p, .home-intro p, .profile-hero p, .login-card p, .muted, .row small, .result-row small, .result-row time, .empty-note, .home-note, .status, .section-heading > span { color: var(--dm-ui-text-secondary); }
.panel, .row, .explore-card, .library-summary button, .question-card, .places-card, .job-card, .artifact-card, .product-preview-card, .artifact-body, .artifact-viewer-head .file-chip, .chat-approvals .approval-card { border: 1px solid var(--dm-ui-border); background: var(--dm-ui-surface); box-shadow: none; }
.panel, .explore-card, .question-card, .places-card, .job-card, .artifact-body { border-radius: 18px; }
.row, .library-summary button { border-radius: 12px; }
.panel h2, .section-heading h3, .row strong, .result-row strong, .setting-row strong, .explore-card strong, .question-card > strong, .place-row strong, .markdown h1, .markdown h2, .markdown h3, .markdown h4 { color: var(--dm-ui-text-primary); }
.explore-card small, .setting-row small, .place-row small, .watch-last, .file-chip small, .job-card-foot, .progress-meta { color: var(--dm-ui-text-secondary); }
.result-row, .setting-row, .text-link, .place-row, .home-agenda-row { border-color: var(--dm-ui-border); }
.setting-row { background: transparent; }
.setting-icon, .explore-icon, .home-insight, .connection-safe, .artifact-preview, .node, .markdown code, .markdown pre, .progress-toggle, .watch-badge, .routine-kind { background: var(--dm-ui-surface-soft); color: var(--dm-ui-text-primary); }
.explore-icon.orange, .explore-icon.lime, .explore-icon.pink, .explore-icon.blue { background: var(--dm-ui-surface-soft); color: var(--dm-ui-text-primary); }
.explore-card:hover, .library-summary button:hover, .setting-row:hover { background: var(--dm-ui-surface-soft); box-shadow: none; }
.suggestions span { color: var(--dm-ui-text-primary); }
.welcome-mascot { background: var(--dm-ui-surface-soft); }
.library-summary strong, .home-card-head h3, .home-agenda-row strong, .home-empty strong, .home-work-item strong { color: var(--dm-ui-text-primary); }
.library-summary span, .home-card-head p, .home-agenda-row small, .home-time, .home-empty, .home-work-empty, .home-status, .home-approval-label, .home-approval p { color: var(--dm-ui-text-secondary); }
.result-dot, .result-dot.scheduled, .home-status-dot { background: var(--dm-ui-text-muted); }
.text-link, .link-button, .setting-row b, .explore-card b, .home-link, .home-work-footer button, .home-approval button, .section-heading button { color: var(--dm-ui-text-primary); }
.profile-hero { background: var(--dm-ui-surface-soft); border-radius: 18px; }
.profile-hero > .mascot { width: 88px; height: 92px; object-fit: contain; }
.signout { color: var(--dm-ui-text-secondary); }

/* The appearance control is shared by desktop and mobile settings. */
.appearance-setting { min-width: 0; margin: 0 0 34px; padding: 0; border: 0; }
.appearance-setting legend { margin-bottom: 8px; color: var(--dm-ui-text-primary); font-size: 16px; font-weight: 700; }
.appearance-setting > p { margin: 0 0 14px; color: var(--dm-ui-text-secondary); font-size: 13px; }
.appearance-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.appearance-option { display: flex; align-items: center; gap: 10px; min-height: 74px; padding: 14px; border: 1px solid var(--dm-ui-border); border-radius: 14px; background: var(--dm-ui-surface); color: var(--dm-ui-text-primary); cursor: pointer; }
.appearance-option:has(input:checked) { border-color: var(--dm-ui-border-strong); background: var(--dm-ui-surface-soft); }
.appearance-option:focus-within { outline: 2px solid var(--dm-ui-focus); outline-offset: 2px; }
.appearance-option input { flex: none; margin: 0; accent-color: var(--dm-ui-text-primary); }
.appearance-option span { display: grid; gap: 4px; min-width: 0; }
.appearance-option strong { font-size: 13px; }
.appearance-option small { color: var(--dm-ui-text-secondary); font-size: 11px; }
:root[data-dm-theme="dark"] .brand-wordmark { filter: invert(1); }
@media (max-width: 700px) { .appearance-options { grid-template-columns: 1fr; } }

/* Forms, decisions and chat controls */
.primary, .send-button, .home-composer button { background: var(--dm-ui-action-primary-bg); color: var(--dm-ui-action-primary-text); border: 0; }
.primary { min-height: 44px; border-radius: 12px; }
.secondary, .row button, .chip, .pill, .question-option, .browser-tools button { border: 1px solid var(--dm-ui-border); background: var(--dm-ui-surface); color: var(--dm-ui-text-primary); }
.secondary:hover, .row button:hover, .chip:hover, .pill:hover, .question-option:not(:disabled):hover { background: var(--dm-ui-surface-soft); }
.form label { color: var(--dm-ui-text-secondary); }
.form input, .form textarea, .form select, .memory-edit input, .browser-tools input, .question-card input { background: var(--dm-ui-surface); border-color: var(--dm-ui-border); color: var(--dm-ui-text-primary); }
.form input:focus, .form textarea:focus, .form select:focus, .memory-edit input:focus, .browser-tools input:focus, .question-card input:focus { border-color: var(--dm-ui-border-strong); box-shadow: 0 0 0 3px var(--dm-ui-surface-soft); }
.form input::placeholder, .form textarea::placeholder, .composer textarea::placeholder, .home-composer input::placeholder { color: var(--dm-ui-text-muted); }
.badge, .watch-badge, .routine-kind { background: var(--dm-ui-surface-soft); color: var(--dm-ui-text-secondary); }
.danger, .error, .job-card.is-failed .job-card-meta, .progress-steps li.failed { color: var(--dm-ui-danger) !important; }
.toast { background: var(--dm-ui-text-primary); color: var(--dm-ui-canvas); }
.composer, .home-composer { border: 1px solid var(--dm-ui-border); background: var(--dm-ui-surface); border-radius: 28px; box-shadow: none; }
.composer:focus-within, .home-composer:focus-within { border-color: var(--dm-ui-border-strong); box-shadow: none; }
.composer textarea, .home-composer input, .attach-button { color: var(--dm-ui-text-primary); }
.home-composer button { border-radius: 50%; }
.home-composer > span { color: var(--dm-ui-text-secondary); }
.bubble.user { background: var(--dm-ui-surface-soft); color: var(--dm-ui-text-primary); }
.bubble.assistant, .markdown, .product-preview-card figcaption, .job-card { color: var(--dm-ui-text-primary); }
.bubble.assistant { background: var(--dm-ui-surface-soft); }
.suggestions button, .chat-toolbar button { background: var(--dm-ui-surface); border-color: var(--dm-ui-border); color: var(--dm-ui-text-primary); }
.suggestions button:hover, .chat-toolbar button:hover { background: var(--dm-ui-surface-soft); border-color: var(--dm-ui-border-strong); }
.chat-toolbar, .composer-note, .bubble.pending { color: var(--dm-ui-text-secondary); }
.progress-toggle, .progress-steps, .markdown blockquote, .markdown th, .markdown td, .markdown hr { border-color: var(--dm-ui-border); }
.progress-toggle, .turn-progress, .progress-steps, .progress-steps li.running, .is-running .progress-icon { color: var(--dm-ui-text-primary); }
.markdown a { color: var(--dm-ui-text-primary); text-decoration: underline; }
.file-badge { background: var(--dm-ui-text-primary); color: var(--dm-ui-canvas); }
.artifact-card, .product-preview-card img { background: var(--dm-ui-surface-soft); }
.artifact-preview, .artifact-body { background: var(--dm-ui-surface); }
.artifact-preview::after { background: linear-gradient(transparent, var(--dm-ui-surface)); }
.product-preview-card small, .product-preview-card span, .job-card-meta, .place-reviews > span, .place-review small, .place-source { color: var(--dm-ui-text-secondary); }
.attach-chip, .graph-card, .connection-search, .connection-more button { border-color: var(--dm-ui-border); background: var(--dm-ui-surface); color: var(--dm-ui-text-primary); }
.attach-chip .attach-meta, .attach-remove, .connection-safe strong, .connection-safe small, .connection-linked, .connection-linked b, .connection-open strong, .connection-open small, .connection-add, .connection-soon, .connection-state, .connection-field small { color: var(--dm-ui-text-secondary); }
.attach-chip.is-failed .attach-meta { color: var(--dm-ui-danger); }
.attach-thumb, .connection-icon, .connection-field, .node.completed, .node.failed { background: var(--dm-ui-surface-soft); }
.connection-icon.letter { color: var(--dm-ui-text-primary); }
.connection-chips .chip.active, .question-option.is-chosen, .question-send { border-color: var(--dm-ui-action-primary-bg); background: var(--dm-ui-action-primary-bg); color: var(--dm-ui-action-primary-text); }
.connection-open em, .node.failed { color: var(--dm-ui-danger); }
.connection-cleanup { background: var(--dm-ui-surface-soft); }
.question-card small, .place-row small { color: var(--dm-ui-text-secondary); }
.question-input input { border-color: var(--dm-ui-border); background: var(--dm-ui-surface); color: var(--dm-ui-text-primary); }
.question-input input:focus { border-color: var(--dm-ui-border-strong); }
.node, .node.completed, .node.failed { border-color: var(--dm-ui-border); }

/* Home uses the same restrained surfaces as the rest of the app. */
.home-brief, .home-work, .home-approval { border: 1px solid var(--dm-ui-border); background: var(--dm-ui-surface); box-shadow: none; border-radius: 18px; }
.home-work { background: var(--dm-ui-surface-soft); }
.home-insight { border-radius: 12px; }
.home-insight > .ui-icon, .home-insight strong, .home-insight p, .home-insight button { color: var(--dm-ui-text-primary); }
.home-count { background: var(--dm-ui-surface); color: var(--dm-ui-text-primary); }
.home-work-footer, .home-agenda, .home-agenda-row { border-color: var(--dm-ui-border); }

/* Auth states outside the standard Kakao login screen. */
.login-wrap { background: var(--dm-ui-canvas); }
.login-card { background: var(--dm-ui-surface); border: 1px solid var(--dm-ui-border); border-radius: 24px; box-shadow: var(--dm-ui-elevation); }
.login-mascot { background: var(--dm-ui-surface-soft); }
.eyebrow { color: var(--dm-ui-text-muted); }

@media (max-width: 700px) {
  .mobile-nav { border-top: 1px solid var(--dm-ui-border); background: var(--dm-ui-surface); box-shadow: none; }
  .mobile-nav button { color: var(--dm-ui-text-muted); }
  .mobile-nav button.active { color: var(--dm-ui-text-primary); }
  .mobile-brand .brand-wordmark { width: 100px; max-height: 32px; }
  .danmuji-shell .main-content { padding-inline: 20px; }
  .home-intro h2 { font-size: 26px; }
}

/* Today's remaining conversation, first on the settings page (TASK-182). Derived from the shared tokens. */
.usage-panel { margin-bottom: 15px; }
.usage-panel .usage-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.usage-panel .usage-head h2 { margin: 0; }
.usage-panel .usage-head strong { color: var(--dm-ui-text-primary); font-size: 22px; font-weight: var(--dm-ui-font-weight-semibold); letter-spacing: -.02em; }
.usage-meter { height: 8px; margin: 14px 0 10px; overflow: hidden; border-radius: var(--dm-ui-radius-pill); background: var(--dm-ui-surface-soft); }
.usage-meter span { display: block; width: var(--used, 0%); height: 100%; border-radius: inherit; background: var(--dm-ui-action-primary-bg); }
.usage-panel p { margin: 0; }
.usage-panel.is-reached .usage-head strong, .usage-panel.is-reached p { color: var(--dm-ui-danger); }
.usage-panel.is-reached .usage-meter span { background: var(--dm-ui-danger); }

/* 보관함의 완료한 일 (TASK-199): 분류 탭, 영수증·예약 내용. 색은 4장의 파생 토큰만 쓴다. */
.library-tabs { margin: 0 0 12px; }
.record-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; font-size: 11px; }
.record-actions .link-button { display: inline; margin: 0; padding: 0; font-size: 11px; }
.record-detail { margin-top: 2px; font-size: 12px; }
.record-detail summary { cursor: pointer; color: var(--dm-ui-text-primary); font-size: 11px; font-weight: 600; }
.record-detail dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 14px; margin: 10px 0 2px; padding: 12px 14px; border: 1px solid var(--dm-ui-border); border-radius: 12px; background: var(--dm-ui-surface-soft); }
.record-detail dt { color: var(--dm-ui-text-secondary); }
.record-detail dd { margin: 0; color: var(--dm-ui-text-primary); overflow-wrap: anywhere; }
.record-detail dd { white-space: pre-line; }
.record-detail .record-transcript { max-height: 240px; overflow-y: auto; }

/* TASK-221: Danmuzi's layer dialog (app.js `dialog`), in place of the browser's alert/confirm/prompt. A card in the
   middle on wide screens and a bottom sheet at 700px and below; derived values (danmuzi-ui-design-tokens 2-4). */
.dm-dialog { width: min(400px, calc(100vw - 32px)); max-width: none; margin: auto; padding: 0; border: 0; border-radius: 24px; background: var(--dm-ui-surface); color: var(--dm-ui-text-primary); box-shadow: 0 16px 48px #19191929; font-family: var(--dm-ui-font-family); }
.dm-dialog::backdrop { background: #08080866; }
.dm-dialog-body { display: grid; gap: 12px; padding: 28px 24px 20px; }
.dm-dialog h2 { margin: 0; font-size: 18px; font-weight: var(--dm-ui-font-weight-semibold); line-height: 1.4; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.dm-dialog p { margin: 0; color: var(--dm-ui-text-secondary); font-size: var(--dm-ui-font-size-body); line-height: 1.58; white-space: pre-line; overflow-wrap: anywhere; }
.dm-dialog-field { display: grid; gap: 6px; font-size: var(--dm-ui-font-size-caption); color: var(--dm-ui-text-secondary); }
.dm-dialog-field input { min-height: 48px; padding: 0 16px; border: 1px solid var(--dm-ui-border-strong); border-radius: 14px; background: var(--dm-ui-canvas); color: var(--dm-ui-text-primary); font: inherit; font-size: 15px; }
.dm-dialog-field input:focus { outline: 2px solid var(--dm-ui-focus); outline-offset: 1px; }
.dm-dialog-actions { display: flex; gap: 8px; margin-top: 12px; }
.dm-dialog-actions button { flex: 1; min-height: 50px; padding: 0 16px; border: 0; border-radius: var(--dm-ui-radius-pill); font: inherit; font-size: 15px; font-weight: var(--dm-ui-font-weight-semibold); cursor: pointer; }
.dm-dialog-cancel { background: var(--dm-ui-surface-soft); color: var(--dm-ui-text-primary); }
.dm-dialog-ok { background: var(--dm-ui-action-primary-bg); color: var(--dm-ui-action-primary-text); }
.dm-dialog.is-danger .dm-dialog-ok { background: var(--dm-ui-danger); color: #ffffff; }
.dm-dialog-actions button:focus-visible { outline: 2px solid var(--dm-ui-focus); outline-offset: 2px; }
.dm-dialog[open] { animation: dm-dialog-in 160ms ease-out; }
@keyframes dm-dialog-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (max-width: 700px) {
  .dm-dialog { width: 100%; margin: auto 0 0; border-radius: 24px 24px 0 0; }
  .dm-dialog-body { padding: 28px 20px calc(20px + env(safe-area-inset-bottom)); }
  .dm-dialog[open] { animation-name: dm-dialog-up; }
  @keyframes dm-dialog-up { from { transform: translateY(24px); } to { transform: none; } }
}
@media (prefers-reduced-motion: reduce) { .dm-dialog[open] { animation: none; } }

/* Terms popup (TASK-412, ADR-412): .dm-dialog with the required terms to agree to. No design yet: every value is 파생,
   the check follows the /join required-consent rows (danmuzi-ui-design-tokens 2-5), the disabled button its colours. */
.dm-terms .dm-terms-body { gap: 14px; }
.dm-terms-list { display: grid; gap: 4px; margin: 0; padding: 10px 14px; list-style: none; border: 1px solid var(--dm-ui-border); border-radius: 18px; }
.dm-terms-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 8px; }
.dm-terms-check { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; color: var(--dm-ui-text-primary); font-size: 14px; font-weight: 500; line-height: 21px; cursor: pointer; overflow-wrap: anywhere; }
.dm-terms-all .dm-terms-check { padding: 0 15px; font-weight: var(--dm-ui-font-weight-semibold); }
.dm-terms-input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; }
.dm-terms-icon { flex: none; fill: none; stroke: var(--dm-ui-text-muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dm-terms-input:checked + .dm-terms-icon circle { fill: var(--dm-ui-text-primary); stroke: var(--dm-ui-text-primary); }
.dm-terms-input:checked + .dm-terms-icon path { stroke: var(--dm-ui-canvas); }
.dm-terms-input:focus-visible + .dm-terms-icon { border-radius: 50%; outline: 2px solid var(--dm-ui-focus); outline-offset: 1px; }
.dm-terms-input:disabled + .dm-terms-icon { opacity: .4; }
.dm-terms-input:disabled ~ span { color: var(--dm-ui-text-muted); }
.dm-terms-view { padding: 6px 2px; color: var(--dm-ui-text-secondary); font-size: 13px; text-decoration: underline; text-underline-offset: 2px; }
.dm-terms .dm-terms-summary { grid-column: 1 / -1; margin: 0 0 6px 30px; font-size: 13px; line-height: 1.5; }
.dm-terms .dm-terms-notice { color: var(--dm-ui-text-primary); font-size: 13px; }
.dm-terms .dm-terms-error { color: var(--dm-ui-danger); font-size: 13px; }
.dm-terms .dm-terms-error:empty { display: none; }
.dm-terms .dm-dialog-actions { margin-top: 2px; }
.dm-terms .dm-dialog-ok:disabled { background: rgba(0, 24, 46, 0.07); color: #72777C; cursor: default; }
[data-dm-theme="dark"] .dm-terms .dm-dialog-ok:disabled { background: #373737; color: #A2A8AE; }
.dm-terms .dm-terms-foot { font-size: 13px; text-align: center; }
.dm-terms-logout { padding: 4px; border: 0; background: none; color: var(--dm-ui-text-primary); font: inherit; font-weight: var(--dm-ui-font-weight-semibold); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }

/* TASK-243 location card: the device-location button above the place box (파생: question-send's primary pill). */
.question-location { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 8px 16px; border: 1px solid var(--dm-ui-action-primary-bg); border-radius: var(--dm-ui-radius-pill, 999px); background: var(--dm-ui-action-primary-bg); color: var(--dm-ui-action-primary-text); font-size: 14px; font-weight: 600; }
.question-location .ui-icon { width: 16px; height: 16px; }
.question-location:disabled { cursor: default; opacity: .6; }
.question-card.is-location .question-input .question-send { border-color: var(--dm-ui-border); background: var(--dm-ui-surface); color: var(--dm-ui-text-primary); }

/* TASK-263 task chip, task thread and the call question banner (파생: progress-toggle's pill, question-card's surface). */
.task-message { max-width: min(88%, 560px); }
.task-chip { min-width: 0; max-width: 100%; color: var(--dm-ui-text-primary); }
.task-toggle { display: flex; align-items: center; gap: 8px; max-width: 100%; min-height: 40px; padding: 8px 14px; border: 1px solid var(--dm-ui-border); border-radius: var(--dm-ui-radius-pill, 999px); background: var(--dm-ui-surface); color: inherit; font-family: inherit; font-size: 13px; line-height: 1.4; text-align: left; cursor: pointer; }
.task-toggle:hover, .task-toggle:focus-visible { border-color: var(--dm-ui-border-strong); background: var(--dm-ui-surface-soft); }
.task-toggle:focus-visible { outline: 2px solid var(--dm-ui-text-primary); outline-offset: 2px; }
.task-toggle strong { flex: none; font-weight: 600; }
.task-icon { display: inline-flex; flex: none; }
.task-icon .ui-icon { width: 16px; height: 16px; }
.task-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--dm-ui-text-secondary); }
.task-chip.is-active .task-icon { animation: progress-pulse 1.5s ease-in-out infinite; }
.task-chip.is-needs_input .task-toggle { border-color: var(--dm-ui-text-primary); }
.task-chip.is-needs_input .task-label { color: var(--dm-ui-text-primary); font-weight: 600; }
.task-chip.is-failed .task-label { color: var(--dm-ui-danger); }
.task-toggle[aria-expanded="true"] .progress-chevron { transform: rotate(180deg); }
.task-thread { margin: 8px 0 0; padding: 12px 14px; border: 1px solid var(--dm-ui-border); border-radius: 18px; background: var(--dm-ui-surface); font-size: 13px; line-height: 1.58; overflow-wrap: anywhere; }
.task-thread[hidden] { display: none; }
.task-line { display: grid; gap: 2px; padding: 6px 0; border-bottom: 1px solid var(--dm-ui-border); }
.task-line:last-child { border-bottom: 0; }
.task-line > span { color: var(--dm-ui-text-muted); font-size: 12px; }
.task-line p { margin: 0; }
.task-questions, .task-summary { margin: 0; padding-left: 18px; }
.task-questions small { display: block; color: var(--dm-ui-text-secondary); }
.task-transcript { padding-top: 8px; }
.task-transcript summary { cursor: pointer; color: var(--dm-ui-text-secondary); }
.task-transcript pre { margin: 8px 0 0; padding: 10px; border-radius: 12px; background: var(--dm-ui-surface-soft); white-space: pre-wrap; font-family: inherit; font-size: 12px; }
.task-empty { margin: 0; color: var(--dm-ui-text-muted); }
.task-origin { align-self: flex-start; padding: 0; border: 0; background: none; color: var(--dm-ui-text-secondary); font-family: inherit; font-size: 12px; cursor: pointer; }
.task-origin:hover, .task-origin:focus-visible { color: var(--dm-ui-text-primary); text-decoration: underline; }
.call-banner { display: grid; gap: 8px; margin: 0 0 8px; padding: 12px; border: 1px solid var(--dm-ui-text-primary); border-radius: 18px; background: var(--dm-ui-surface-soft); }
.call-banner-head { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: center; }
.call-banner-head .ui-icon { width: 16px; height: 16px; }
.call-banner-head small { grid-column: 2; color: var(--dm-ui-text-secondary); }
@media (max-width: 700px) { .task-message { max-width: 94%; } }
@media (prefers-reduced-motion: reduce) { .task-chip.is-active .task-icon { animation: none; opacity: .6; } }

/* TASK-275 social login to other sites (social-login-connections 7). No Figma frame yet: derived from the shared
   tokens, question-option's surface and the 44px touch target. */
.login-methods { display: grid; gap: 8px; margin: 10px 0 6px; }
.login-method-card .login-method { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 10px 14px; border: 1px solid var(--dm-ui-border); border-radius: 14px; background: var(--dm-ui-surface); color: var(--dm-ui-text-primary); font: inherit; font-weight: var(--dm-ui-font-weight-regular); text-align: left; cursor: pointer; }
.login-method-card .login-method:not(:disabled):hover { border-color: var(--dm-ui-border-strong); background: var(--dm-ui-surface-soft); }
.login-method-card .login-method:disabled { cursor: default; opacity: .6; }
.login-method-icon { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--dm-ui-surface-soft); box-shadow: inset 0 0 0 1px var(--dm-ui-border); color: var(--dm-ui-text-primary); font-size: 15px; font-weight: 700; line-height: 1; }
.login-method-icon .ui-icon { width: 18px; height: 18px; }
.login-method-icon.is-kakao { background: var(--dm-ui-kakao); box-shadow: none; color: var(--dm-ui-kakao-text); }
.login-method-text { display: grid; gap: 2px; min-width: 0; }
.login-method-card .login-method-text strong { color: var(--dm-ui-text-primary); font-size: 14px; font-weight: var(--dm-ui-font-weight-semibold); overflow-wrap: anywhere; }
.login-method-account { color: var(--dm-ui-text-secondary); font-weight: var(--dm-ui-font-weight-regular); }
.login-method-card .login-method-text small { margin: 0; color: var(--dm-ui-text-secondary); font-size: 12px; }
/* Gmail cleanup cards (TASK-292): the picked mails, each with a box to keep it. */
.mail-cleanup-picked { display: flex; align-items: center; gap: 6px; margin: 8px 0 4px; color: var(--dm-ui-text-secondary); font-size: var(--dm-ui-font-size-caption); }
.mail-cleanup-picked .ui-icon { width: 14px; height: 14px; flex: none; }
.mail-cleanup-list { display: grid; gap: 6px; max-height: 280px; overflow: auto; margin: 6px 0; padding: 0; list-style: none; }
.mail-cleanup-item label { display: flex; align-items: flex-start; gap: 8px; padding: 8px 10px; border: 1px solid var(--dm-ui-border); border-radius: 10px; background: var(--dm-ui-surface-soft); cursor: pointer; }
.mail-cleanup-item input { width: auto; margin-top: 3px; flex: none; }
.mail-cleanup-text { display: grid; gap: 2px; min-width: 0; }
.mail-cleanup-text strong, .mail-cleanup-text small { overflow-wrap: anywhere; }
.mail-cleanup-domain { color: var(--dm-ui-danger); font-size: var(--dm-ui-font-size-body); }
.mail-cleanup-undo { color: var(--dm-ui-text-secondary); }
/* A card made after reading a mail, a file or a page (TASK-291): the note and its sources, as text only. */
.approval-origin { margin: 8px 0 0; padding: 10px 12px; border: 1px solid var(--dm-ui-border); border-radius: 12px; background: var(--dm-ui-surface-soft); color: var(--dm-ui-text-secondary); }
.approval-origin strong { display: block; color: var(--dm-ui-text-primary); font-size: 13px; font-weight: var(--dm-ui-font-weight-semibold); }
.approval-origin ul { margin: 6px 0 0; padding-left: 18px; font-size: 12px; }
.approval-origin li, .approval-origin small { overflow-wrap: anywhere; }
.approval-origin small { display: block; margin-top: 6px; font-size: 12px; }
.browser-remote button { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 44px; min-height: 44px; padding: 8px 14px; border-radius: 12px; font-size: 13px; }
.browser-remote .ui-icon { width: 16px; height: 16px; }
.card-remote { margin-top: 8px; }
.card-remote .card-remote-shot { display: block; width: 100%; max-width: none; min-height: 0; height: auto; cursor: crosshair; touch-action: manipulation; }
/* A finger dragged over a connected screen scrolls the remote page (TASK-783). `none` first for a browser without pinch-zoom. */
.card-remote.is-remote-live .card-remote-shot { touch-action: none; touch-action: pinch-zoom; }
.card-remote-note { display: block; margin: 6px 0; color: var(--dm-ui-text-secondary); }
.card-remote-tools button { min-height: 44px; border-radius: 12px; }
.card-remote-tools input { min-height: 44px; }
.connection-site { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.connection-site > span { min-width: 0; }
.connection-site strong { overflow-wrap: anywhere; }
.connection-site button { flex: none; min-height: 40px; padding: 8px 14px; border: 1px solid var(--dm-ui-border); border-radius: var(--dm-ui-radius-pill); background: var(--dm-ui-surface); font: inherit; font-size: 13px; cursor: pointer; }
.connection-site button:disabled { cursor: default; opacity: .6; }
@media (max-width: 700px) {
  .browser-tools button { min-height: 44px; }
  .browser-remote { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
/* TASK-281 대화 정리 구분선과 자동 기억 설정 (파생: 시안 없음, border·text-muted·surface-soft 토큰). */
.history-fold { display: grid; gap: 6px; align-self: stretch; justify-items: center; margin: 4px 0; color: var(--dm-ui-text-muted); font-size: 12px; text-align: center; }
.history-fold > span { display: flex; align-items: center; gap: 10px; width: 100%; }
.history-fold > span::before, .history-fold > span::after { content: ""; flex: 1; height: 1px; background: var(--dm-ui-border); }
.history-fold details { max-width: min(92%, 560px); }
.history-fold summary { cursor: pointer; color: var(--dm-ui-text-secondary); }
.history-fold details p { margin: 8px 0 0; padding: 12px 14px; border: 1px solid var(--dm-ui-border); border-radius: 12px; background: var(--dm-ui-surface-soft); color: var(--dm-ui-text-secondary); text-align: left; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; }
.history-fold.is-folding > span { animation: history-fold-pulse 1.6s ease-in-out infinite; }
@keyframes history-fold-pulse { 50% { opacity: .5; } }
@media (prefers-reduced-motion: reduce) { .history-fold.is-folding > span { animation: none; } }
.history-more { align-self: center; min-height: 36px; padding: 6px 14px; border: 1px solid var(--dm-ui-border); border-radius: var(--dm-ui-radius-pill, 999px); background: var(--dm-ui-surface); color: var(--dm-ui-text-secondary); font: inherit; font-size: 12px; cursor: pointer; }
.history-more:hover, .history-more:focus-visible { border-color: var(--dm-ui-border-strong); color: var(--dm-ui-text-primary); }
.history-more:disabled { opacity: .6; cursor: default; }
.memory-auto { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; }
.memory-auto span { display: grid; gap: 2px; }
.memory-auto input { width: 20px; height: 20px; flex: none; accent-color: var(--dm-ui-action-primary-bg); }

/* 포커스 테두리는 키보드로 옮길 때만(2026-11-11 사용자: 다이얼로그 「확인」 등에 테두리가 저절로 그려짐). theme.js · join.js 가 Tab · 화살표를 누르면
   <html data-kbd-focus>, 누르기(마우스 · 터치)를 하면 지움. 그 표시가 없으면 :focus-visible 테두리 · 고리 · 밑줄을 그리지 않는다. 글 입력칸 테두리는 그대로 */
:root:not([data-kbd-focus]) :focus-visible, :root:not([data-kbd-focus]) :has(> input:focus-visible) { outline: none !important; }
:root:not([data-kbd-focus]) :focus-visible:not(input, textarea)::before, :root:not([data-kbd-focus]) :focus-visible:not(input, textarea)::after { box-shadow: none !important; }
:root:not([data-kbd-focus]) .dm-wheel-col:focus-visible .dm-wheel-item.is-selected { text-decoration: none; }
