:root {
  color-scheme: light;
  --ink: #15191e;
  --muted: #68717c;
  --line: #e6e9ee;
  --line-strong: #d4dae1;
  --paper: #f7f8fa;
  --panel: #ffffff;
  --blue: #1769e0;
  --blue-soft: #edf4ff;
  --green: #16835f;
  --green-soft: #e9f7f1;
  --red: #c03245;
  --red-soft: #fff0f2;
  --note: #f5f6f8;
  --note-line: #e1e5ea;
  --shadow-soft: 0 10px 30px rgba(18, 27, 38, .06);
  --radius: 12px;
  --radius-sm: 9px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Listening: Pro audio/video transcript workspace. */
.listening-view { width: min(920px, 100%); margin: 0 auto; display: grid; gap: 12px; }
.listening-hero, .listening-locked-card, .listening-player-card, .listening-library { border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.listening-hero { padding: 16px 18px; }
.listening-hero span, .listening-detail-head span { color: var(--green); font-size: 11px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.listening-hero h1, .listening-detail-head h1 { margin: 2px 0 0; color: var(--ink); font-size: 22px; }
.listening-hero p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.listening-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.listening-actions.has-youtube-import { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.listening-actions button, .listening-actions .listening-file-button { min-height: 44px; display: inline-flex; flex-direction: row; align-items: center; justify-content: center; gap: 7px; border-radius: 9px; line-height: 1; }
.listening-actions button svg, .listening-actions .listening-file-button svg { flex: 0 0 auto; }
.listening-actions button span, .listening-actions .listening-file-button span { display: inline-flex; align-items: center; line-height: 1; }
.listening-actions button.danger { border: 1px solid rgba(185, 55, 73, .28); background: #fff3f5; color: #a12f40; }
.listening-silence-option { min-height: 36px; display: flex; align-items: center; gap: 8px; width: fit-content; max-width: 100%; cursor: pointer; color: var(--muted); }
.listening-silence-option input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.listening-silence-option > span { position: relative; flex: 0 0 34px; width: 34px; height: 20px; border: 1px solid #cbd2d8; border-radius: 10px; background: #e9edf0; transition: background .16s ease, border-color .16s ease; }
.listening-silence-option > span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(24,34,42,.22); transition: transform .16s ease; }
.listening-silence-option input:checked + span { border-color: var(--green); background: var(--green); }
.listening-silence-option input:checked + span::after { transform: translateX(14px); }
.listening-silence-option input:focus-visible + span { outline: 2px solid rgba(28,143,104,.25); outline-offset: 2px; }
.listening-silence-option input:disabled + span, .listening-silence-option input:disabled ~ strong { opacity: .5; }
.listening-silence-option strong { overflow: hidden; font-size: 11px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.listening-library-tabs { display:grid; grid-template-columns:1fr 1fr; gap:4px; padding:4px; border:1px solid var(--line); border-radius:9px; background:#f3f6f5; }
.listening-library-tabs button { min-height:38px; border:0; border-radius:6px; background:transparent; color:var(--muted); font-weight:800; }
.listening-library-tabs button.active { background:#fff; color:var(--green); box-shadow:0 1px 3px rgba(22,45,37,.1); }
.listening-upload-options { display:flex; flex-wrap:wrap; gap:8px 18px; }
.listening-free-upload-note,.listening-pro-translation-note { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:10px 12px; border:1px solid #dce8e3; border-radius:8px; background:#f5fbf8; color:var(--muted); font-size:12px; }
.listening-pro-translation-note > svg { flex:0 0 auto; color:var(--green); }
.listening-pro-translation-note > span { flex:1; }
.listening-library-head { display:flex; align-items:center; justify-content:flex-start; gap:6px; }
.listening-library-tabs { display:flex; align-items:center; gap:5px; }
.listening-library-tabs button { width:34px; height:32px; min-height:32px; display:grid; place-items:center; padding:0; border:1px solid transparent; border-radius:7px; background:transparent; color:var(--muted); }
.listening-library-tabs button svg { width:16px; height:16px; }
.listening-library-tabs button.active { border-color:#cfe3da; background:var(--green-soft); color:var(--green); }
.listening-batch-bar { display:flex; align-items:center; gap:6px; padding:8px 10px; border-bottom:1px solid var(--line); overflow-x:auto; background:#f7faf9; }
.listening-batch-bar > span { margin-right:auto; white-space:nowrap; color:var(--muted); font-size:11px; font-weight:750; }
.listening-batch-bar button { min-height:30px; padding:5px 8px; border:1px solid var(--line); border-radius:6px; background:#fff; white-space:nowrap; font-size:11px; font-weight:750; }
.listening-batch-bar .danger-text { color:#b83e50; border-color:#eccbd1; }
.listening-new-folder,.listening-folder-back,.listening-folder-actions button { min-height:32px; display:inline-flex; align-items:center; justify-content:center; gap:5px; padding:5px 8px; border:1px solid var(--line); border-radius:7px; background:#fff; color:var(--green); font-size:11px; font-weight:800; }
.listening-new-folder { width:34px; padding:0; }
.listening-new-folder svg,.listening-folder-back svg,.listening-folder-actions svg { width:14px; height:14px; }
.listening-select-toggle { width:34px; height:32px; min-height:32px; display:grid; place-items:center; margin-left:auto; padding:0; border:1px solid var(--line); border-radius:7px; background:#fff; color:var(--muted); }
.listening-select-toggle.active { border-color:#cfe3da; background:var(--green-soft); color:var(--green); }
.listening-select-toggle svg { width:16px; height:16px; }
.listening-folder-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(180px,1fr)); gap:7px; padding:10px; border-bottom:1px solid var(--line); background:#fafcfb; }
.listening-folder-card { min-width:0; min-height:54px; display:grid; grid-template-columns:32px minmax(0,1fr) 16px; align-items:center; gap:8px; padding:8px 10px; border:1px solid var(--line); border-radius:8px; background:#fff; color:var(--ink); text-align:left; transition:border-color .15s ease,background .15s ease; }
.listening-folder-card.is-drag-over { border-color:var(--green); background:var(--green-soft); }
.listening-folder-card > svg:first-child { width:25px; height:25px; color:var(--green); fill:#dff3ea; }
.listening-folder-card > svg:last-child { width:15px; color:var(--muted); }
.listening-folder-card span { min-width:0; display:grid; gap:2px; }
.listening-folder-card strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:13px; }
.listening-folder-card small { color:var(--muted); font-size:10px; }
.listening-folder-title { min-width:0; flex:1; display:grid; gap:1px; }
.listening-folder-title strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:15px; }
.listening-folder-title small { color:var(--muted); font-size:10px; }
.listening-folder-actions { display:flex; align-items:center; gap:4px; }
.listening-folder-actions button { width:32px; padding:0; }
.listening-folder-actions button.danger { border-color:#ead7da; background:#fff7f8; color:#a13d49; }
.listening-order-controls { flex:0 0 31px; display:grid; align-content:center; gap:2px; padding-right:5px; }
.listening-order-controls button { width:27px; height:24px; min-height:24px; display:grid; place-items:center; padding:0; border:1px solid var(--line); border-radius:5px; background:#fff; color:var(--muted); }
.listening-order-controls svg { width:12px; height:12px; }
.listening-folder-modal-backdrop { position:fixed; inset:0; z-index:120; display:grid; place-items:center; padding:18px; background:rgba(15,23,20,.38); }
.listening-folder-modal { width:min(390px,100%); max-height:min(70vh,560px); overflow:hidden; border:1px solid var(--line); border-radius:11px; background:#fff; box-shadow:0 20px 60px rgba(15,23,20,.2); }
.listening-folder-modal header { display:flex; align-items:center; justify-content:space-between; padding:12px 14px; border-bottom:1px solid var(--line); }
.listening-folder-modal header button { width:30px; height:30px; display:grid; place-items:center; padding:0; border:0; background:transparent; }
.listening-folder-modal header svg { width:17px; }
.listening-folder-modal > div { max-height:calc(min(70vh,560px) - 55px); overflow:auto; padding:7px; }
.listening-folder-modal > div button { width:100%; min-height:44px; display:flex; align-items:center; gap:9px; padding:8px 10px; border:0; border-radius:7px; background:#fff; color:var(--ink); text-align:left; }
.listening-folder-modal > div button:hover { background:var(--green-soft); }
.listening-folder-modal > div svg { width:18px; color:var(--green); }
.listening-like-picker header strong { display:flex; align-items:center; gap:8px; }
.listening-like-picker header strong svg { color:var(--green); }
.listening-like-picker-body > button span { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.listening-like-picker-body > button svg:last-child:not(:first-child) { margin-left:auto; color:var(--muted); }
.listening-like-picker-body > .listening-like-new-folder { margin-top:5px; border-top:1px solid var(--line); border-radius:0 0 7px 7px; color:var(--green); }
.listening-like-folder-form { display:grid; grid-template-columns:minmax(0,1fr) 44px; gap:8px; padding:8px 4px 4px; border-top:1px solid var(--line); }
.listening-like-folder-form input { min-width:0; height:44px; padding:8px 10px; border:1px solid var(--line-strong); border-radius:7px; background:#fff; color:var(--ink); font:inherit; }
.listening-folder-modal > div .listening-like-folder-form button { width:44px; min-height:44px; justify-content:center; padding:0; background:var(--green); color:#fff; }
.listening-folder-modal > div .listening-like-folder-form button:hover { background:#11694d; }
.listening-folder-modal > div .listening-like-folder-form button svg { color:currentColor; }
.listening-folder-editor-backdrop { position:fixed; inset:0; z-index:165; display:grid; place-items:center; padding:18px; background:rgba(25,34,42,.38); }
.listening-folder-editor { width:min(390px,100%); overflow:hidden; border:1px solid var(--line); border-radius:10px; background:#fff; box-shadow:0 20px 55px rgba(24,34,42,.24); }
.listening-folder-editor header { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:13px 15px; border-bottom:1px solid var(--line); }
.listening-folder-editor header button { width:30px; height:30px; display:grid; place-items:center; padding:0; border:0; background:transparent; color:var(--muted); }
.listening-folder-editor header svg { width:17px; height:17px; }
.listening-folder-editor form { display:grid; gap:11px; padding:14px 15px 15px; }
.listening-folder-editor input { width:100%; min-height:44px; padding:9px 11px; border:1px solid var(--line-strong); border-radius:7px; background:#fff; color:var(--ink); font:inherit; }
.listening-folder-editor form > div:last-child { display:flex; justify-content:flex-end; gap:8px; }
.listening-folder-editor form > div:last-child button { min-width:76px; }
.listening-public-folder-heading { display:flex; align-items:center; gap:9px; padding:10px 12px; border:1px solid var(--line); border-radius:9px; background:#fff; }
.listening-public-folder-heading > svg { width:22px; color:var(--green); fill:#dff3ea; }
.listening-public-folder-heading > div { min-width:0; display:grid; gap:1px; }
.listening-public-folder-heading strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:15px; }
.listening-public-folder-heading small { color:var(--muted); font-size:10px; }
.listening-list-entry { position:relative; display:flex; align-items:stretch; border-bottom:1px solid var(--line); background:#fff; }
.listening-list-entry:last-child { border-bottom:0; }
.listening-list-entry.is-selected { background:#eef9f4; }
.listening-list-entry .listening-list-row { flex:1; border-bottom:0; background:transparent; }
.listening-select-check { display:flex; align-items:center; padding-left:12px; cursor:pointer; }
.listening-select-check input { position:absolute; opacity:0; pointer-events:none; }
.listening-select-check span { display:grid; place-items:center; width:22px; height:22px; border:1px solid #c8d1cd; border-radius:5px; background:#fff; color:transparent; }
.listening-select-check input:checked + span { border-color:var(--green); background:var(--green); color:#fff; }
.listening-select-check svg { width:14px; height:14px; }
.listening-open-public { width:18px; color:var(--muted); }
.listening-detail-language { display:block; margin-top:2px; color:var(--muted); font-size:11px; font-weight:700; }
.listening-detail-language button { padding:0; border:0; background:transparent; color:var(--green); font:inherit; cursor:pointer; }
.listening-owner-social { display:inline-flex; align-items:center; gap:8px; margin-left:9px; }
.listening-owner-social > span, .listening-owner-social > button { display:inline-flex; align-items:center; gap:3px; color:var(--muted); }
.listening-owner-social svg { width:12px; height:12px; }
.discover-view { max-width:680px; }
.public-app-shell { min-height:100vh; min-height:100dvh; background:#fff; }
.public-app-header { display:flex; align-items:center; gap:8px; }
.public-app-header .app-menu { flex:1 1 auto; min-width:0; }
.public-app-header .header-spacer { display:none; }
.public-app-header .header-learning-language { width:40px; min-width:40px; height:38px; border-radius:8px; }
.public-game-button { min-height:38px; display:flex; align-items:center; gap:6px; padding:7px 10px; border:1px solid var(--line); border-radius:8px; background:#fff; color:var(--ink); font-size:11px; font-weight:800; white-space:nowrap; }
.public-game-button svg { width:15px; height:15px; color:var(--green); }
.public-game-button.active { border-color:#b9ddcf; background:var(--green-soft); color:var(--green); }
.public-login-button { min-height:38px; padding:7px 12px; white-space:nowrap; }
.public-global-search { background:#fff; }
.public-workspace { padding-top:12px; }
.public-workspace.public-game-workspace { padding:0; overflow:hidden; }
.public-wordle-view { width:min(720px,100%); height:100%; min-height:0; margin:0 auto; display:grid; grid-template-rows:44px minmax(0,1fr); overflow:hidden; background:#f7f9f8; }
.public-wordle-toolbar { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:5px 12px; border-bottom:1px solid var(--line); background:#fff; }
.public-wordle-toolbar > span { min-width:0; overflow:hidden; color:var(--muted); font-size:11px; font-weight:850; text-overflow:ellipsis; white-space:nowrap; }
.public-wordle-toolbar > div { display:flex; align-items:center; gap:5px; }
.public-wordle-toolbar .icon-button { width:34px; height:34px; min-height:34px; }
.public-wordle-toolbar svg { width:16px; height:16px; }
.public-wordle-stage { min-height:0; overflow:hidden; }
.public-wordle-stage > .wordle-game { min-height:0; }
.public-game-coming { width:min(420px,100%); min-height:100%; margin:auto; display:grid; place-items:center; align-content:center; gap:8px; color:var(--muted); text-align:center; }
.public-game-coming svg { width:36px; height:36px; color:var(--green); }
.public-game-coming strong { color:var(--ink); font-size:18px; }
.public-game-coming span { font-size:13px; }
.public-discover-home { width:100%; max-width:720px; }
.public-feed-loading { min-height:55vh; display:grid; place-items:center; align-content:center; gap:10px; color:var(--muted); }
.public-feed-loading svg { width:23px; height:23px; color:var(--green); animation:spin .9s linear infinite; }
.public-feed-loading strong { font-size:13px; }
.public-bottom-tabs { grid-template-columns:repeat(3,minmax(0,1fr)); }
.public-search-results { width:100%; max-width:720px; }
.auth-back-to-public { align-self:flex-start; display:flex; align-items:center; gap:6px; min-height:38px; margin-top:max(12px,env(safe-area-inset-top)); padding:7px 10px; border:1px solid var(--line); border-radius:8px; background:#fff; color:var(--ink); font-weight:800; }
.auth-back-to-public svg { width:16px; height:16px; }
.discover-heading { display:flex; align-items:center; justify-content:space-between; padding:2px 2px 6px; }
.discover-heading small { color:var(--green); font-size:11px; font-weight:850; }
.discover-heading h1 { margin:1px 0 0; font-size:23px; }
.discover-heading button { width:38px; height:38px; display:grid; place-items:center; border:1px solid var(--line); border-radius:8px; background:#fff; color:var(--ink); }
.discover-feed { display:grid; gap:16px; scroll-snap-type:y proximity; }
.discover-listening-card { position:relative; overflow:hidden; scroll-snap-align:start; border:1px solid var(--line); border-radius:12px; background:#fff; box-shadow:0 8px 24px rgba(18,27,38,.05); }
.discover-media-shell { min-height:250px; display:grid; place-items:center; background:#101613; }
.discover-media-shell video { display:block; width:100%; max-height:min(58vh,620px); background:#000; }
.discover-audio-art { width:100%; min-height:280px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:14px; padding:26px; color:#fff; background:radial-gradient(circle at 30% 20%,#2d9875,#173e32 68%,#0e211b); text-align:center; }
.discover-audio-art > svg { width:54px; height:54px; }
.discover-audio-art > strong { max-width:440px; font-size:20px; }
.discover-audio-art audio { width:min(440px,100%); }
.discover-card-info { display:grid; gap:8px; padding:13px 58px 15px 14px; }
.discover-card-info h2 { margin:0; font-size:17px; }
.discover-author { width:max-content; max-width:100%; display:flex; align-items:center; gap:8px; padding:0; border:0; background:transparent; text-align:left; }
.discover-author > span { min-width:0; display:grid; }
.discover-author strong,.discover-author small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.discover-author small { color:var(--muted); font-size:11px; }
.discover-open-transcript { width:100%; display:flex; align-items:center; justify-content:space-between; gap:8px; padding:9px 10px; border:1px solid #dce8e3; border-radius:7px; background:#f5fbf8; color:var(--green); font-size:12px; font-weight:800; text-align:left; }
.discover-open-transcript svg { width:16px; height:16px; }
.discover-social-actions { position:absolute; right:10px; bottom:14px; display:grid; gap:9px; }
.discover-social-actions button,.discover-detail-social button { min-width:42px; display:grid; place-items:center; gap:1px; padding:6px; border:0; border-radius:8px; background:#f4f6f6; color:var(--muted); font-size:10px; font-weight:800; }
.discover-social-actions button svg,.discover-detail-social button svg { width:20px; height:20px; }
.discover-social-actions button.is-liked,.discover-detail-social button.is-liked { color:#d73556; background:#fff0f3; }
.discover-social-actions button.is-liked svg,.discover-detail-social button.is-liked svg { fill:currentColor; }
.discover-detail-social { display:flex; justify-content:flex-end; gap:8px; }
.discover-detail-social button { display:flex; grid-auto-flow:column; min-width:58px; }
.discover-comments-backdrop { position:fixed; inset:0; z-index:80; display:flex; align-items:flex-end; justify-content:center; padding-top:70px; background:rgba(14,20,18,.42); }
.discover-comments-sheet { width:min(680px,100%); height:min(78dvh,680px); max-height:78dvh; display:grid; grid-template-rows:auto minmax(0,1fr) auto; overflow:hidden; border-radius:12px 12px 0 0; background:#fff; box-shadow:0 -12px 40px rgba(0,0,0,.18); }
.discover-comments-sheet > header { min-height:48px; display:flex; align-items:center; justify-content:space-between; padding:10px 14px; border-bottom:1px solid var(--line); }
.discover-comments-sheet > header button { width:32px; height:32px; display:grid; place-items:center; border:0; border-radius:7px; background:#f3f5f5; }
.discover-comments-list { overflow:auto; padding:4px 14px; }
.discover-comment { display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:9px; padding:11px 0; border-bottom:1px solid var(--line); }
.discover-comment p { margin:3px 0; white-space:pre-wrap; overflow-wrap:anywhere; }
.discover-comment small { color:var(--muted); font-size:10px; }
.discover-comment > button { width:32px; height:32px; display:grid; place-items:center; border:0; background:transparent; color:#a83a4b; }
.discover-comment-form { display:grid; grid-template-columns:minmax(0,1fr) 42px; gap:8px; padding:10px 14px max(10px,env(safe-area-inset-bottom)); border-top:1px solid var(--line); }
.discover-comment-form input { min-width:0; height:42px; padding:0 12px; border:1px solid var(--line-strong); border-radius:8px; background:#fff; }
.discover-comment-form button { display:grid; place-items:center; border:0; border-radius:8px; background:var(--green); color:#fff; }
.discover-profile-view { max-width:680px; }
.discover-profile-card { display:flex; align-items:center; gap:14px; padding:16px; border:1px solid var(--line); border-radius:10px; background:#fff; }
.discover-profile-card > div { min-width:0; flex:1; }
.discover-profile-card h2 { margin:0 0 4px; }
.discover-profile-card small { color:var(--muted); }
.discover-profile-chat { flex:0 0 auto; }
.discover-view { flex:1 1 auto; height:auto; min-height:0; grid-template-rows:auto minmax(0,1fr); overflow:hidden; }
.discover-stage { min-height:0; height:100%; }
.discover-single-card { height:100%; display:grid; grid-template-rows:minmax(155px,42%) auto minmax(120px,1fr); overflow:hidden; }
.discover-single-card .discover-media-shell { min-height:0; height:100%; }
.discover-single-card .discover-media-shell video { width:100%; height:100%; max-height:none; object-fit:contain; }
.discover-single-card .discover-audio-art { min-height:0; height:100%; padding:16px 50px 12px 16px; }
.discover-single-card .discover-audio-art > svg { width:42px; height:42px; }
.discover-single-card .discover-audio-art > strong { font-size:16px; }
.discover-single-card .discover-card-info { padding:9px 58px 8px 12px; border-bottom:1px solid var(--line); }
.discover-single-card .discover-card-info h2 { font-size:14px; }
.discover-inline-transcript { min-height:0; overflow-y:auto; overscroll-behavior:contain; scroll-behavior:smooth; padding:5px 52px 12px 10px; background:#fff; }
.discover-inline-transcript > button { width:100%; display:grid; gap:3px; padding:9px 10px; border:0; border-bottom:1px solid #eef0f2; border-radius:6px; background:transparent; color:var(--ink); text-align:left; }
.discover-inline-transcript > button time { color:var(--green); font-size:10px; font-weight:850; }
.discover-inline-transcript > button strong { font-size:14px; line-height:1.45; }
.discover-inline-transcript > button span { color:var(--muted); font-size:12px; line-height:1.4; }
.discover-inline-transcript > button.active { background:#eaf8f2; box-shadow:inset 3px 0 0 var(--green); }
.discover-inline-transcript .article-empty svg { width:18px; animation:spin .9s linear infinite; }
.discover-switch-controls { position:absolute; right:9px; top:50%; z-index:3; display:grid; place-items:center; gap:4px; transform:translateY(-12%); }
.discover-switch-controls button { width:40px; height:40px; display:grid; place-items:center; border:1px solid rgba(255,255,255,.35); border-radius:8px; background:rgba(13,25,21,.68); color:#fff; backdrop-filter:blur(8px); }
.discover-switch-controls button:disabled { opacity:.4; }
.discover-switch-controls span { padding:2px 5px; border-radius:5px; background:rgba(13,25,21,.62); color:#fff; font-size:9px; font-weight:800; }
.discover-single-card .discover-social-actions { right:9px; bottom:13px; }
@media (min-width:801px) {
  .discover-single-card { grid-template-rows:minmax(210px,48%) auto minmax(140px,1fr); }
}
.listening-file-button { position: relative; min-width: 0; overflow: hidden; cursor: pointer; }
.listening-file-button input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; opacity: 0; cursor: pointer; }
.listening-file-button > svg, .listening-file-button > span { pointer-events: none; }
.listening-file-button.is-disabled { cursor: not-allowed; opacity: .65; }
.listening-file-button.is-disabled input { cursor: not-allowed; }
[data-listening-video-input] { display: none !important; }
.listening-progress { min-height: 42px; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 12px; border: 1px solid rgba(28, 143, 104, .22); border-radius: 9px; background: rgba(28, 143, 104, .06); color: var(--green); font-size: 12px; font-weight: 850; }
.listening-progress svg { width: 16px; height: 16px; animation: spin .9s linear infinite; }
.listening-upload-error { display: grid; gap: 10px; }
.listening-native-app-recommendation { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 9px; border-top: 1px solid rgba(161, 47, 64, .16); }
.listening-native-app-recommendation p { flex: 1; margin: 0; font-size: 12px; line-height: 1.45; }
.listening-native-app-recommendation a { flex: 0 0 auto; text-decoration: none; }
.listening-native-app-recommendation a svg { width: 15px; height: 15px; }
@media (max-width: 520px) {
  .listening-native-app-recommendation { align-items: stretch; flex-direction: column; }
  .listening-native-app-recommendation a { justify-content: center; }
}
.listening-library { overflow: hidden; }
.listening-library-head { padding: 12px 14px; border-bottom: 1px solid var(--line); }
.listening-library-head h2 { margin: 0; font-size: 14px; }
.listening-list { display: grid; }
.listening-list-swipe { position: relative; overflow: hidden; background: #b23849; border-bottom: 1px solid var(--line); }
.listening-list-swipe .listening-list-row { position: relative; z-index: 1; border-bottom: 0; transition: transform .18s ease; touch-action: pan-y; }
.listening-list-swipe.is-revealed .listening-list-row { transform: translateX(72px); }
.listening-swipe-delete { position: absolute; inset: 0 auto 0 0; width: 72px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 0; background: #b23849; color: #fff; }
.listening-swipe-delete svg { width: 19px; height: 19px; }
.listening-list-row { width: 100%; min-width: 0; display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 11px 13px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: #fff; color: var(--ink); text-align: left; }
.listening-list-row:last-child { border-bottom: 0; }
.listening-list-row:hover { background: #f7fbf9; }
.listening-list-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 8px; background: var(--green-soft); color: var(--green); }
.listening-list-icon svg { width: 17px; height: 17px; }
.listening-list-main { min-width: 0; display: grid; gap: 3px; }
.listening-list-main strong, .listening-list-main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.listening-list-main strong { font-size: 13px; }
.listening-list-main small { color: var(--muted); font-size: 10px; }
.listening-history-progress { display:block; width:100%; height:3px; overflow:hidden; border-radius:2px; background:#e5ebe8; }
.listening-history-progress i { display:block; height:100%; background:var(--green); }
.listening-list-social { display:flex; align-items:center; gap:9px; color:var(--muted); font-size:9px; font-weight:800; }
.listening-list-social > span { display:inline-flex; align-items:center; gap:3px; }
.listening-list-social svg { width:11px; height:11px; }
.listening-list-social b, .listening-owner-social b { font:inherit; }
.listening-status { padding: 4px 7px; border-radius: 6px; background: #f2f4f7; color: var(--muted); font-size: 10px; font-weight: 850; text-align: center; }
.listening-status.status-processing { width: 102px; display: grid; gap: 4px; }
.listening-mini-progress { width: 100%; height: 3px; overflow: hidden; border-radius: 2px; background: rgba(104,113,124,.16); }
.listening-mini-progress i { display: block; height: 100%; border-radius: inherit; background: var(--green); transition: width .25s linear; }
.listening-list-row:disabled { cursor: default; opacity: 1; }
.listening-status.status-ready { background: var(--green-soft); color: var(--green); }
.listening-status.status-error { background: #fff1f3; color: #a12f40; }
.listening-detail-head { display: grid; grid-template-columns: 42px minmax(0, 1fr); align-items: center; gap: 10px; }
.listening-detail-head.is-shared, .listening-detail-head.is-public { grid-template-columns: minmax(0, 1fr); }
.listening-sticky-player { position: sticky; top: 0; z-index: 18; display: grid; gap: 8px; padding: 2px 0 9px; background: rgba(255,255,255,.97); backdrop-filter: blur(14px); }
.listening-discover-tabs { display:grid; grid-template-columns:repeat(3,1fr); gap:4px; padding:4px; border:1px solid var(--line); border-radius:8px; background:#f3f6f5; }
.listening-discover-tabs button { min-width:0; min-height:34px; display:flex; align-items:center; justify-content:center; gap:5px; padding:5px 7px; border:0; border-radius:6px; background:transparent; color:var(--muted); font-size:11px; font-weight:800; white-space:nowrap; }
.listening-discover-tabs button svg { width:14px; height:14px; }
.listening-discover-tabs button.active { background:#fff; color:var(--green); box-shadow:0 1px 3px rgba(22,45,37,.1); }
.listening-discover-tabs button:disabled { opacity:.35; }
.listening-discover-panel { min-height:140px; overflow:hidden; border:1px solid var(--line); border-radius:10px; background:#fff; }
.listening-discover-panel-title,.listening-author-folder-head { display:flex; align-items:center; gap:9px; padding:11px; border-bottom:1px solid var(--line); background:#fff; }
.listening-discover-panel-title svg { width:17px; height:17px; color:var(--green); }
.listening-author-folder-head > button { width:34px; height:34px; display:grid; place-items:center; padding:0; border:1px solid var(--line); border-radius:7px; background:#fff; color:var(--ink); }
.listening-author-folder-head > button svg { width:17px; height:17px; }
.listening-author-folder-head > div { min-width:0; display:grid; gap:2px; }
.listening-author-folder-head strong,.listening-author-folder-head small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.listening-author-folder-head small { color:var(--muted); font-size:11px; }
.listening-author-unfiled { padding:14px 4px 7px; color:var(--muted); font-size:12px; }
.listening-discover-panel-list { display:grid; }
.listening-discover-panel-list > button { width:100%; min-width:0; display:grid; grid-template-columns:32px minmax(0,1fr) 18px; align-items:center; gap:9px; padding:10px 11px; border:0; border-bottom:1px solid var(--line); border-radius:0; background:#fff; color:var(--ink); text-align:left; }
.listening-discover-panel-list > button:last-child { border-bottom:0; }
.listening-discover-panel-list > button.active { background:var(--green-soft); color:var(--green); }
.listening-discover-panel-list > button > svg:first-child { width:18px; height:18px; justify-self:center; color:var(--green); }
.listening-discover-panel-list > button > svg:last-child { width:14px; height:14px; justify-self:end; color:var(--muted); }
.listening-discover-panel-list > button > span { min-width:0; display:grid; gap:2px; }
.listening-discover-panel-list strong,.listening-discover-panel-list small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.listening-discover-panel-list strong { font-size:13px; }
.listening-discover-panel-list small { color:var(--muted); font-size:10px; }
.listening-detail-head > div { min-width: 0; }
.listening-detail-head h1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 17px; }
.listening-title-block { min-width: 0; }
.listening-title-row { min-width: 0; display: flex; align-items: center; gap: 6px; }
.listening-title-row h1 { min-width: 0; }
.listening-edit-title-button { flex: 0 0 auto; width: 28px; min-height: 28px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--muted); }
.listening-edit-title-button svg { width: 13px; height: 13px; }
.listening-title-edit { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) 30px 30px; gap: 5px; margin-top: 2px; }
.listening-title-edit input { width: 100%; min-width: 0; height: 34px; padding: 5px 8px; border: 1px solid var(--green); border-radius: 7px; outline: none; background: #fff; color: var(--ink); font-size: 14px; font-weight: 750; }
.listening-title-edit button { width: 30px; min-width: 30px; min-height: 30px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--green); }
.listening-title-edit button:last-child { color: var(--muted); }
.listening-title-edit svg { width: 14px; height: 14px; }
.listening-delete-button { width: 40px; min-width: 40px; min-height: 40px; padding: 0; border: 1px solid #ead7da; border-radius: 9px; background: #fff7f8; color: #a13d49; }
.listening-share-button, .listening-download-button { width: 40px; min-width: 40px; min-height: 40px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--green); }
.listening-share-button svg, .listening-download-button svg, .listening-delete-button svg { width: 18px; height: 18px; }
.listening-share-panel { margin-top: 2px; }
.listening-player-card { padding: 10px 12px; }
.listening-player-card audio { display: block; width: 100%; height: 42px; }
.listening-player-card video { display: block; width: 100%; max-height: min(46vh, 430px); border-radius: 8px; background: #fff; object-fit: contain; }
.listening-player-card.has-video { padding: 8px; background: #fff; }
.listening-player-card.has-video [data-listening-video-visual] { cursor:pointer; }
.listening-player-card.has-video audio { margin-top:6px; }
.youtube-listening-frame-shell { position:relative; width:100%; aspect-ratio:16 / 9; overflow:hidden; border-radius:8px; background:#000; }
.youtube-listening-frame-shell iframe { position:absolute; inset:0; width:100%; height:100%; max-height:none; border:0; border-radius:0; }
.youtube-listening-open { flex:0 0 40px; width:40px; height:40px; display:grid; place-items:center; border:1px solid var(--line); border-radius:9px; background:#fff; color:var(--green); text-decoration:none; }
.youtube-listening-open svg { width:18px; height:18px; }
.listening-youtube-inline { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:7px; padding:7px 8px; border:1px solid #cfe3da; border-radius:8px; background:#f5fbf8; }
.listening-youtube-inline > span { min-width:0; display:flex; align-items:center; gap:6px; overflow:hidden; color:var(--green); font-size:11px; font-weight:850; text-overflow:ellipsis; white-space:nowrap; }
.listening-youtube-inline > span svg { flex:0 0 auto; width:15px; height:15px; }
.listening-youtube-inline > button { min-height:34px; display:inline-flex; align-items:center; justify-content:center; gap:5px; padding:5px 10px; border-radius:7px; }
.listening-youtube-inline > button svg { width:15px; height:15px; }
.listening-youtube-inline > .alert { grid-column:1 / -1; margin:0; }
.listening-actions button.active { border-color:#b9ddce; background:var(--green-soft); color:var(--green); }
.listening-playback-controls { display: flex; align-items: center; justify-content: center; gap: 5px; margin-top: 8px; }
.listening-playback-controls button { flex: 0 0 38px; width: 38px; min-width: 0; height: 38px; min-height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); }
.listening-playback-controls button > svg { width: 17px; height: 17px; }
.listening-playback-controls .listening-playback-mode-button { flex-basis: 86px; width: 86px; padding: 0 7px; color: var(--green); font-size: 10px; font-weight: 850; }
.listening-playback-controls .listening-playback-mode-button > svg { flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.listening-playback-controls .listening-playback-mode-button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.listening-playback-controls.actions-only { justify-content: flex-end; }
.listening-playback-controls .listening-download-button, .listening-playback-controls .listening-share-button { color: var(--green); }
.listening-playback-controls.public-actions { gap: 3px; overflow: visible; }
.listening-playback-controls.public-actions button { flex: 1 1 28px; width: auto; max-width: 34px; height: 36px; min-height: 36px; }
.listening-playback-controls.public-actions .listening-playback-mode-button { flex: 1.8 1 50px; width: auto; max-width: 60px; padding: 0 4px; }
.listening-playback-controls .listening-social-button { position: relative; color: var(--muted); }
.listening-playback-controls.public-actions .listening-play-count { flex:1 1 28px; width:auto; max-width:34px; height:36px; display:inline-flex; align-items:center; justify-content:center; border:1px solid var(--line); border-radius:8px; background:#fff; }
.listening-playback-controls .listening-social-button small { position: absolute; right: 2px; bottom: 1px; min-width: 9px; color: inherit; font-size: 7px; font-weight: 900; line-height: 1; }
.listening-playback-controls .listening-social-button.is-liked { border-color: #f0ccd5; background: #fff1f4; color: #cf3556; }
.listening-playback-controls .listening-social-button.is-liked svg { fill: currentColor; }
.listening-playback-controls .listening-delete-button { border-color: #ead7da; background: #fff7f8; color: #a13d49; }
.listening-download-menu { position: relative; flex: 0 0 38px; width: 38px; height: 38px; color: var(--green); }
.listening-download-menu > summary { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; list-style: none; }
.listening-download-menu > summary::-webkit-details-marker { display: none; }
.listening-download-menu > summary svg { width: 18px; height: 18px; }
.listening-download-menu[open] > summary { border-color: #b9ddce; background: var(--green-soft); }
.listening-download-menu-panel { position: absolute; top: calc(100% + 7px); right: 0; z-index: 30; width: 174px; display: grid; gap: 2px; padding: 5px; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: 0 10px 28px rgba(24,34,42,.16); }
.listening-playback-controls .listening-download-menu .listening-download-menu-panel button { width: 100%; max-width: none; height: 38px; min-height: 38px; display: flex; align-items: center; justify-content: flex-start; gap: 9px; padding: 0 10px; border: 0; border-radius: 6px; color: var(--ink); font-size: 12px; font-weight: 750; white-space: nowrap; }
.listening-playback-controls .listening-download-menu .listening-download-menu-panel button:hover { border: 0; background: #f3f8f6; color: var(--green); }
.listening-playback-controls .listening-download-menu .listening-download-menu-panel button svg { flex: 0 0 auto; width: 16px; height: 16px; }
.listening-playback-controls.public-actions .listening-download-menu { flex: 1 1 28px; width: auto; max-width: 34px; height: 36px; }
.listening-playback-controls.public-actions .listening-download-menu > summary { width: 100%; height: 36px; }
.listening-player-card.has-video .listening-playback-controls button { border-color: var(--line); background: #fff; color: var(--ink); }
.listening-player-card.has-video .listening-playback-controls .listening-playback-mode-button { color: var(--green); }
.listening-transcript { display: grid; gap: 7px; }
.listening-segment { width: 100%; display: grid; gap: 4px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); text-align: left; transition: border-color .16s ease, background .16s ease, box-shadow .16s ease; }
.listening-segment-meta { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.listening-segment time { flex: 0 0 auto; display: flex; align-items: center; gap: 5px; color: var(--green); font-size: 9px; font-weight: 900; }
.listening-segment time svg { width: 12px; height: 12px; fill: currentColor; }
.listening-segment-note { min-width: 0; max-width: 72%; display: flex; align-items: center; gap: 4px; padding: 3px 6px; border-radius: 5px; background: #f3f8f6; color: #49655b; font-size: 10px; font-style: normal; font-weight: 700; line-height: 1.2; }
.listening-segment-note svg { flex: 0 0 auto; width: 11px; height: 11px; }
.listening-segment .listening-segment-note span { overflow: hidden; color: inherit; font-size: inherit; line-height: inherit; text-overflow: ellipsis; white-space: nowrap; }
.listening-segment strong { font-size: 15px; font-weight: 750; line-height: 1.55; }
.listening-segment span { color: var(--muted); font-size: 13px; line-height: 1.5; }
.listening-segment.is-active { border-color: rgba(28, 143, 104, .42); background: #eef9f4; box-shadow: 0 4px 14px rgba(28, 143, 104, .08); }
.listening-segment.is-favorited { border-left: 3px solid var(--green); padding-left: 12px; }
.listening-translation-upsell { display: grid; grid-template-columns: 26px minmax(0,1fr) auto; align-items: center; gap: 9px; padding: 11px 12px; border: 1px solid #cfe4da; border-radius: 9px; background: #f3faf7; }
.listening-translation-upsell > svg { width: 20px; height: 20px; color: var(--green); }
.listening-translation-upsell > div { min-width: 0; display: grid; gap: 2px; }
.listening-translation-upsell strong { color: var(--ink); font-size: 12px; line-height: 1.35; }
.listening-translation-upsell small { color: var(--muted); font-size: 10px; line-height: 1.35; }
.listening-translation-upsell button { min-height: 34px; white-space: nowrap; }
.listening-player-card.has-video .listening-playback-controls .listening-social-button.is-liked { border-color: #f0ccd5; background: #fff1f4; color: #cf3556; }
.listening-player-card.has-video .listening-playback-controls .listening-play-count { border-color: var(--line); background: #fff; color: var(--ink); }
.listening-theater-open { overflow: hidden; }
.listening-theater { position: fixed; inset: 0; z-index: 10000; min-width: 0; min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 8px; padding: max(12px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left)); overflow: hidden; background: radial-gradient(circle at 50% 40%, #142a23 0, #09130f 54%, #050a08 100%); color: #fff; }
.listening-theater.is-forced-landscape { inset: auto; top: 50%; left: 50%; width: 100dvh; height: 100dvw; transform: translate(-50%, -50%) rotate(90deg); }
.listening-theater-header { min-width: 0; display: flex; align-items: center; gap: 8px; }
.listening-theater-header > strong { flex: 1 1 auto; min-width: 0; overflow: hidden; color: rgba(255,255,255,.72); font-size: 12px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.listening-theater-header button, .listening-theater-controls button { width: 38px; height: 38px; min-height: 38px; display: grid; place-items: center; padding: 0; border: 1px solid rgba(255,255,255,.2); border-radius: 7px; background: rgba(255,255,255,.08); color: #fff; }
.listening-theater-header button svg { width: 18px; height: 18px; }
.listening-theater-header button > span { font-size: 10px; font-weight: 900; letter-spacing: -.02em; }
.listening-theater-header button.is-off { color: rgba(255,255,255,.4); }
.listening-theater-stage { min-width: 0; min-height: 0; display: grid; grid-template-rows: minmax(20px, .55fr) auto auto minmax(20px, .55fr); align-items: center; align-content: center; gap: clamp(8px, 2.2vh, 20px); overflow: auto; text-align: center; }
.listening-theater-stage p { margin: 0 auto; max-width: min(94%, 1180px); }
.listening-theater-context { align-self: center; display: -webkit-box; overflow: hidden; color: rgba(255,255,255,.22); font-size: clamp(13px, 1.7vw, 22px); font-weight: 650; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.listening-theater-source { color: #f5f9f7; font-size: clamp(28px, 5.2vw, 70px); font-weight: 800; line-height: 1.34; letter-spacing: .01em; text-wrap: balance; }
.listening-theater-word { box-decoration-break: clone; -webkit-box-decoration-break: clone; transition: color .12s ease, background-color .12s ease, opacity .12s ease, box-shadow .12s ease; }
.listening-theater-word.is-past { color: rgba(211,231,222,.46); }
.listening-theater-word.is-current { padding: .02em .08em .05em; border-radius: 3px; background: #63e2ae; color: #07130e; box-shadow: 0 .08em .34em rgba(54,218,151,.24); }
.listening-theater-phonetic-word { display: inline-block; white-space: nowrap; }
.listening-theater-translation { color: rgba(255,255,255,.76); font-size: clamp(18px, 2.7vw, 36px); font-weight: 600; line-height: 1.42; text-wrap: balance; }
.listening-theater-controls { min-width: 0; display: grid; grid-template-columns: 38px 38px minmax(80px, 1fr) auto; align-items: center; gap: 12px; }
.listening-theater-controls button > span { font-size: 15px; font-weight: 900; line-height: 1; }
.listening-theater-controls input { width: 100%; accent-color: #42d699; }
.listening-theater-controls time { min-width: 84px; color: rgba(255,255,255,.64); font-size: 11px; font-variant-numeric: tabular-nums; text-align: right; }
.listening-phonetics-button.is-busy svg { animation: spin .9s linear infinite; }
.article-theater-open { overflow: hidden; }
.article-theater { background: radial-gradient(circle at 50% 34%, #17312a 0, #0a1712 55%, #050a08 100%); }
.listening-theater.is-forced-portrait { inset: auto; top: 50%; left: 50%; width: 100dvh; height: 100dvw; transform: translate(-50%, -50%) rotate(90deg); }
.article-theater.is-forced-portrait { inset: auto; top: 50%; left: 50%; width: 100dvh; height: 100dvw; transform: translate(-50%, -50%) rotate(90deg); }
.article-theater-stage { grid-template-rows: minmax(28px, .7fr) auto minmax(28px, .7fr); gap: clamp(14px, 3vh, 30px); padding: 2vh 0; cursor: pointer; touch-action: pan-y; }
.article-theater-current { min-width: 0; display: grid; align-content: center; gap: clamp(8px, 1.8vh, 16px); }
.article-theater-current > p { margin: 0 auto; }
.article-theater-pinyin { max-width: min(92%, 760px); color: #8fe6c1; font-size: clamp(17px, 3.4vw, 31px); font-weight: 650; line-height: 1.4; letter-spacing: .025em; text-wrap: balance; }
.article-theater .listening-theater-source { max-width: min(92%, 760px); font-size: clamp(28px, 7vw, 58px); line-height: 1.42; }
.article-theater .listening-theater-translation { max-width: min(90%, 720px); font-size: clamp(19px, 4.2vw, 34px); line-height: 1.5; }
.article-theater .listening-theater-context { max-width: min(88%, 680px); font-size: clamp(13px, 2.8vw, 21px); }
.article-theater-controls time { min-width: 54px; }
.listening-locked-card { min-height: 360px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 28px; text-align: center; }
.listening-locked-card > svg { width: 34px; height: 34px; color: var(--green); }
.listening-locked-card h1, .listening-locked-card p { margin: 0; }
.listening-locked-card h1 { font-size: 20px; }
.listening-locked-card p { max-width: 460px; color: var(--muted); font-size: 13px; }

@media (max-width: 620px) {
  .public-app-header { grid-template-columns:minmax(0,1fr) auto auto; gap:6px; padding:8px 10px; }
  .public-app-header .app-version-pill { display:none; }
  .public-app-header .brand-word { font-size:22px; }
  .public-login-button { min-width:54px; padding-left:7px; padding-right:7px; font-size:11px; }
  .public-workspace { padding:9px 10px; }
  .public-discover-home { height:100%; }
  .public-discover-home .discover-single-card { border-radius:10px; }
  .listening-view { gap: 9px; }
  .listening-hero { padding: 13px 14px; }
  .listening-hero h1 { font-size: 19px; }
  .listening-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
  .listening-actions.has-youtube-import { grid-template-columns: repeat(4, minmax(0, 1fr)); gap:4px; }
  .listening-actions button, .listening-actions .listening-file-button { min-width: 0; min-height: 44px; flex-direction: column; gap: 2px; padding: 4px 2px; font-size: 9px; }
  .listening-actions button svg, .listening-actions .listening-file-button svg { width: 16px; height: 16px; }
  .listening-actions button span, .listening-actions .listening-file-button span { max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .listening-list-row { grid-template-columns: 36px minmax(0, 1fr) auto; gap: 8px; padding: 10px; }
  .listening-status { white-space: nowrap; }
  .listening-status.status-processing { width: 94px; }
  .listening-segment { padding: 11px 12px; }
  .listening-segment-meta { grid-template-columns: auto minmax(0, 1fr); display: grid; align-items: start; }
  .listening-segment-note { width: 100%; max-width: none; justify-self: stretch; font-size: 11px; }
  .listening-segment .listening-segment-note span { overflow: visible; text-overflow: clip; white-space: normal; overflow-wrap: anywhere; }
  .listening-segment strong { font-size: 14px; }
  .listening-player-card video { max-height: 34dvh; }
  .listening-playback-controls { gap: 4px; }
  .listening-playback-controls button { flex-basis: 34px; width: 34px; height: 36px; min-height: 36px; }
  .listening-playback-controls .listening-playback-mode-button { flex-basis: 74px; width: 74px; padding: 0 5px; font-size: 9px; }
}

* { box-sizing: border-box; }

html {
  background: #fff;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #fff;
  color: var(--ink);
  letter-spacing: 0;
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
  -webkit-user-select: none;
  user-select: none;
}

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .65; }

.app-shell {
  width: min(1120px, 100%);
  height: 100dvh;
  min-height: 100vh;
  margin: 0 auto;
  background: var(--panel);
  border-inline: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}

.app-header {
  min-height: 62px;
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 0 22px;
  border-bottom: 1px solid rgba(226, 231, 236, .86);
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(14px);
}
.global-search-bar { flex: 0 0 auto; min-height: 50px; display: grid; grid-template-columns: minmax(0, 1fr) auto 38px; align-items: center; gap: 8px; padding: 7px 22px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.98); z-index: 28; }
.global-search-input { min-width: 0; height: 36px; display: grid; grid-template-columns: 18px minmax(0, 1fr) 30px; align-items: center; gap: 6px; padding: 0 6px 0 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; }
.global-search-input > svg { width: 16px; height: 16px; color: var(--muted); }
.global-search-input input { width: 100%; min-width: 0; height: 34px; padding: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 13px; }
.global-search-input input::-webkit-search-cancel-button { display: none; -webkit-appearance: none; }
.global-search-clear { width: 28px; height: 28px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 6px; background: #edf1f4; color: var(--muted); }
.global-search-clear[hidden] { display: none; }
.global-search-clear svg { width: 15px; height: 15px; }
.global-search-submit { min-width: 88px; height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 13px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; color: var(--ink); font-size: 13px; font-weight: 850; }
.global-search-submit svg { width: 16px; height: 16px; }
.global-search-submit:disabled svg { animation: spin .9s linear infinite; }
.global-search-mic { width: 38px; height: 36px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; color: var(--green); touch-action: none; -webkit-user-select: none; user-select: none; }
.global-search-mic svg { width: 17px; height: 17px; }
.global-search-mic.is-recording { border-color: rgba(178,56,73,.42); background: #fff1f3; color: #b23849; box-shadow: 0 0 0 3px rgba(178,56,73,.10); }
.global-search-mic:disabled .lucide-loader-2 { animation: spin .9s linear infinite; }
.global-search-results { flex: 1 1 auto; width: min(760px, 100%); min-height: 0; margin: 0 auto; display: grid; align-content: start; gap: 10px; overflow: auto; -webkit-overflow-scrolling: touch; }
.global-search-results-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 2px 2px 8px; }
.global-search-results-head strong { font-size: 18px; }
.global-search-results-head span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 12px; }
.global-search-result-groups { display:grid; gap:16px; }
.global-search-result-group { display:grid; gap:7px; }
.global-search-result-group h2 { margin:0; display:flex; align-items:center; gap:7px; padding:0 2px; color:var(--ink); font-size:13px; }
.global-search-result-group h2 svg { width:15px; height:15px; color:var(--green); }
.global-search-result-group h2 small { margin-left:auto; color:var(--muted); font-size:10px; }
.global-search-result-list { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.global-search-result { width: 100%; display: grid; grid-template-columns: 38px minmax(0, 1fr) 18px; align-items: center; gap: 10px; padding: 11px 12px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: #fff; color: var(--ink); text-align: left; }
.global-search-result:last-child { border-bottom: 0; }
.global-search-result:hover { background: #f7fbf9; }
.global-search-result > svg { width: 16px; height: 16px; color: var(--muted); }
.global-search-result-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 8px; background: var(--green-soft); color: var(--green); }
.global-search-result-icon svg { width: 17px; height: 17px; }
.global-search-result-copy { min-width: 0; display: grid; gap: 3px; }
.global-search-result-copy small, .global-search-result-copy strong, .global-search-result-copy time { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.global-search-result-copy small { color: var(--green); font-size: 10px; font-weight: 850; }
.global-search-result-copy strong { font-size: 13px; }
.global-search-result-copy time { color: var(--muted); font-size: 10px; }
.global-search-empty { min-height: 180px; display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 750; }
.global-search-empty svg { width: 18px; height: 18px; }
.global-search-empty .lucide-loader-2 { animation: spin .9s linear infinite; }

.proxy-login-banner {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 22px;
  border-bottom: 1px solid #f0c36d;
  background: #fff8e7;
  color: #6f4700;
  font-size: 13px;
  font-weight: 800;
}
.proxy-login-banner span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.proxy-login-banner small {
  color: #8b6a2f;
  font-weight: 700;
}
.proxy-login-banner button {
  flex: 0 0 auto;
  min-height: 28px;
  border: 1px solid #e2aa45;
  border-radius: 999px;
  background: #fff;
  color: #8a5700;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 900;
}

.logo-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 19px;
  font-weight: 850;
  border: 0;
  background: transparent;
  padding: 0;
}
.logo-lockup[data-action="home"] {
  cursor: pointer;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  gap: 3px;
  padding: 7px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #fff;
}
.brand-mark span {
  display: block;
  border-radius: 3px;
  background: var(--green);
}
.brand-mark span:last-child {
  width: 68%;
  background: var(--blue);
}
.brand-word { line-height: 1; }
.header-spacer { min-width: 0; }

.app-menu {
  min-width: 0;
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.app-version-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 24px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f7faf9;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
  font-family: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}
.app-version-pill:active {
  transform: translateY(1px);
}
.app-version-pill:disabled {
  opacity: 0.65;
  cursor: wait;
}

.language-control {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}
.desktop-language-control {
  display: none;
}
.chat-language-control {
  justify-self: end;
}
.chat-language-control select {
  max-width: 150px;
}
.language-control label { font-weight: 750; }
select {
  height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  padding: 0 34px 0 10px;
}

.account-menu {
  min-width: 0;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  position: relative;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}
.header-account-actions { min-width:0; display:flex; align-items:center; justify-content:flex-end; gap:8px; }
.header-learning-language-picker { position:relative; flex:0 0 auto; }
.header-learning-language { width:46px; min-width:46px; height:46px; display:grid; place-items:center; padding:0 7px; border:1px solid var(--line-strong); border-radius:10px; background:#fff; color:var(--green); font-size:12px; font-weight:900; letter-spacing:.03em; }
.header-learning-language-picker.open .header-learning-language { border-color:#acd7c6; background:var(--green-soft); }
.header-learning-language-menu { position:absolute; top:calc(100% + 8px); right:0; z-index:65; width:220px; max-height:min(520px,72vh); display:grid; grid-template-rows:auto minmax(0,1fr); overflow:hidden; padding:6px; border:1px solid var(--line); border-radius:9px; background:#fff; box-shadow:0 16px 38px rgba(24,36,31,.2); }
.header-learning-language-menu > strong { padding:8px 9px 9px; border-bottom:1px solid var(--line); color:var(--muted); font-size:11px; font-weight:850; }
.header-learning-language-menu > div { min-height:0; display:grid; gap:2px; padding-top:4px; overflow-y:auto; overscroll-behavior:contain; }
.header-learning-language-menu button { min-height:38px; display:grid; grid-template-columns:32px minmax(0,1fr); align-items:center; gap:8px; padding:5px 9px; border:0; border-radius:6px; background:transparent; color:var(--ink); text-align:left; }
.header-learning-language-menu button.active { background:var(--green-soft); color:var(--green); }
.header-learning-language-menu b { font-size:11px; letter-spacing:.02em; }
.header-learning-language-menu span { overflow:hidden; font-size:13px; font-weight:760; text-overflow:ellipsis; white-space:nowrap; }
.account-trigger {
  width: 66px;
  min-width: 66px;
  max-width: 66px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #f8fafc;
  color: var(--ink);
  font-size: 18px;
  font-weight: 850;
  padding: 0 11px 0 14px;
}
.account-trigger span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-trigger svg {
  width: 19px;
  height: 19px;
  color: var(--muted);
  flex: 0 0 auto;
}
.account-popover {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: max-content;
  min-width: 210px;
  max-width: calc(100vw - 28px);
  z-index: 50;
  display: grid;
  gap: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  overflow: hidden;
  box-shadow: 0 22px 45px rgba(24,32,42,.16);
}
.account-menu-item {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  padding: 0 14px;
  text-align: left;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}
.account-menu-item + .account-menu-item {
  border-top: 1px solid var(--line);
}
.account-menu-item:hover {
  background: #f6f8fa;
}
.account-menu-item.danger {
  color: var(--red);
}
.header-scan-button {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink);
}
.header-scan-button svg {
  width: 18px;
  height: 18px;
}
@media (min-width: 801px) {
  .header-scan-button {
    display: none;
  }
}

.workspace { padding: 24px; }
.workspace.chat-workspace,
.workspace.contacts-workspace,
.workspace.profile-workspace,
.workspace.moments-workspace {
  height: auto;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.workspace.profile-workspace {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.chat-workspace .alert,
.chat-workspace .setup-panel,
.contacts-workspace .alert,
.contacts-workspace .setup-panel {
  flex: 0 0 auto;
}

.bottom-tabs {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 4px;
  min-height: 60px;
  padding: 6px max(10px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
  border-top: 1px solid rgba(230, 233, 238, .9);
  background: rgba(255,255,255,.98);
  backdrop-filter: blur(14px);
}
.bottom-tabs button {
  min-height: 48px;
  display: grid;
  place-items: center;
  gap: 2px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  font-size: 12px;
}
.bottom-tabs button svg {
  width: 18px;
  height: 18px;
}
.tab-icon-wrap {
  position: relative;
  display: inline-flex;
}
.tab-badge {
  position: absolute;
  top: -8px;
  right: -12px;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}
.bottom-tabs button.active {
  background: var(--green-soft);
  color: var(--ink);
}
#listening-persistent-player-host { position: fixed; left: -10000px; bottom: 0; width: 1px; height: 1px; overflow: hidden; pointer-events: none; opacity: .01; }
.listening-mini-player { position: relative; flex: 0 0 auto; min-height: 58px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 9px max(12px, env(safe-area-inset-right)) 8px max(12px, env(safe-area-inset-left)); border-top: 1px solid var(--line); background: rgba(255,255,255,.98); box-shadow: 0 -8px 24px rgba(18,27,38,.07); backdrop-filter: blur(16px); z-index: 24; }
.listening-mini-progress-track { position: absolute; top: -1px; left: 0; right: 0; height: 2px; overflow: hidden; background: rgba(104,113,124,.13); }
.listening-mini-progress-track i { display: block; height: 100%; background: var(--green); transition: width .2s linear; }
.listening-mini-title { min-width: 0; display: flex; align-items: center; gap: 9px; padding: 0; border: 0; background: transparent; color: var(--ink); text-align: left; }
.listening-mini-title > svg { flex: 0 0 auto; width: 20px; height: 20px; color: var(--green); }
.listening-mini-title > span { min-width: 0; display: grid; gap: 2px; }
.listening-mini-title strong, .listening-mini-title small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.listening-mini-title strong { font-size: 12px; }
.listening-mini-title small { color: var(--muted); font-size: 9px; font-variant-numeric: tabular-nums; }
.listening-mini-controls { display: flex; align-items: center; gap: 4px; }
.listening-mini-controls button { width: 34px; min-width: 34px; height: 34px; min-height: 34px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); }
.listening-mini-controls button svg { width: 15px; height: 15px; }
.listening-mini-controls .listening-mini-toggle { border-color: var(--green); background: var(--green); color: #fff; }
.listening-mini-controls .listening-mini-close { color: var(--muted); }
.listening-mini-controls .listening-mini-close:hover { border-color:#f0c7cc; background:#fff6f7; color:var(--red); }
.listening-mini-toggle span { font-size: 13px; font-weight: 900; line-height: 1; }
@media (max-width: 420px) {
  .listening-mini-player { gap: 6px; padding-left: 9px; padding-right: 9px; }
  .listening-mini-title > svg { display: none; }
  .listening-mini-controls { gap: 2px; }
  .listening-mini-controls button { width: 31px; min-width: 31px; height: 31px; min-height: 31px; }
}
.app-shell.view-chat .bottom-tabs,
.app-shell.chat-composer-open .bottom-tabs {
  display: none;
}

.moments-view {
  min-height: 0;
  flex: 1 1 auto;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
  background: #fff;
}
.events-view {
  min-height: 0;
  flex: 1 1 auto;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
  background: #fff;
  touch-action: pan-y;
}
.my-events-view {
  grid-template-rows: auto auto minmax(0, 1fr);
}
.event-compose {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfd;
}
.event-compose.free-event-compose {
  grid-template-columns: minmax(0, 1fr);
}
.event-language-filter,
.event-language-select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
  font: inherit;
  font-size: 16px;
}
.event-compose .primary,
.event-form .primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.event-pro-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
}
.event-pro-note .text-button {
  flex: 0 0 auto;
  white-space: nowrap;
}
.event-feed {
  min-height: 0;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 12px;
  background: #fbfcfd;
}
.event-feed.empty-event-feed {
  align-content: center;
  justify-items: center;
  padding: 24px 18px;
}
.event-empty-state {
  width: min(100%, 360px);
  display: grid;
  gap: 7px;
  justify-items: center;
  text-align: center;
  color: var(--muted);
}
.event-empty-state strong {
  color: var(--ink);
  font-size: 16px;
}
.event-empty-state span {
  font-size: 13px;
  line-height: 1.45;
}
.my-events-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfd;
}
.my-events-tabs button {
  min-height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: #fff;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  font-weight: 900;
}
.my-events-tabs button.active {
  border-color: var(--green);
  background: var(--green-soft);
  color: var(--green);
}
.event-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}
.event-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}
.event-card-head strong {
  display: block;
  font-size: 18px;
  line-height: 1.25;
}
.event-card.highlighted-event {
  border-color: rgba(22, 131, 95, .46);
  box-shadow: 0 0 0 3px rgba(22, 131, 95, .12);
  scroll-margin: 92px;
}
.event-title-line {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.event-language-pill {
  border-radius: 999px;
  background: #eef2f6;
  color: var(--muted);
  padding: 4px 7px;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}
.event-card-head small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.event-card-head small.event-status-alert {
  color: var(--red);
}
.event-card-head time {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}
.event-host-chip {
  min-height: 22px;
  border: 1px solid rgba(18, 145, 102, .18);
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  padding: 0 8px;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
}
.event-host-chip:active {
  transform: translateY(1px);
}
.event-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.event-meta-pill,
.event-capacity-pill {
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.event-meta-pill {
  background: #eef2f6;
  color: var(--muted);
}
.event-capacity-pill {
  background: #eef2f6;
  color: var(--muted);
}
.event-tool-note {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border-radius: 5px;
  background: #f1f3f5;
  padding: 9px 10px;
  color: var(--muted);
  font-size: 13px;
  white-space: pre-wrap;
}
.event-tool-note span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.event-participant-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fbfcfd;
  padding: 9px 10px;
  color: var(--muted);
  font-size: 12px;
}
.event-participant-list strong {
  flex: 0 0 100%;
  color: var(--ink);
  font-size: 13px;
}
.event-participant-chip {
  min-height: 30px;
  border: 1px solid rgba(18, 145, 102, .18);
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  padding: 0 10px;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
}
.event-participant-chip:active {
  transform: translateY(1px);
}
.event-join-button {
  justify-self: end;
  min-width: 104px;
}
.event-full-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}
.event-full-row .event-join-button {
  justify-self: stretch;
  min-width: 0;
  width: 100%;
}
.event-join-button.danger {
  border-color: rgba(192, 50, 69, .28);
  color: var(--red);
}
.full-status-button {
  border-color: #d7dde3;
  background: #eef2f6;
  color: var(--muted);
}
.check-more-button {
  color: var(--green);
}
.event-join-button:disabled {
  opacity: .72;
  cursor: default;
}
.event-edit-view {
  min-height: 0;
  flex: 1 1 auto;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
  background: #fff;
  touch-action: pan-y;
}
.event-form {
  min-height: 0;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 14px;
  background: #fbfcfd;
  touch-action: pan-y;
}
.event-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.event-title-input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
  font: inherit;
  font-size: 16px;
}
.event-form input:not([type="radio"]):not([type="range"]),
.event-form select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
  font: inherit;
  font-size: 16px;
}
.event-time-combo {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-items: center;
  background: transparent;
}
.event-time-combo input[name="startsDate"] {
  grid-column: 1 / -1;
  min-width: 0;
  max-width: 100%;
  min-inline-size: 0;
  inline-size: 100%;
}
.event-time-combo input,
.event-time-combo select {
  min-width: 0;
  max-width: 100%;
  min-inline-size: 0;
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: #fff;
  padding: 0 10px;
  font: inherit;
  font-size: 16px;
  box-shadow: none;
}
.event-time-combo select {
  width: 100%;
  padding-right: 28px;
}
.event-time-stack {
  min-width: 0;
  display: grid;
  gap: 6px;
}
.event-timezone-inline {
  max-width: 100%;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.event-time-combo input:focus,
.event-time-combo select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(23,105,224,.12);
  outline: none;
}
.event-form-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}
.event-form-row.single {
  grid-template-columns: 1fr;
}
.event-option-group {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  border: 0;
}
.event-option-group.compact {
  align-content: end;
}
.event-option-title {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.segmented-options,
.tool-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.segmented-option,
.tool-option {
  min-width: 0;
  display: inline-flex;
  position: relative;
}
.segmented-option input,
.tool-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.segmented-option span,
.tool-option span {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  padding: 0 14px;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}
.segmented-option input:checked + span,
.tool-option input:checked + span {
  border-color: var(--green);
  background: var(--green-soft);
  color: var(--green);
}
.segmented-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.segmented-options.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.tool-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.segmented-option span {
  width: 100%;
  border-radius: 5px;
}
.tool-option span {
  width: 100%;
  min-height: 44px;
  padding: 0 6px;
  border-radius: 5px;
  font-size: 12px;
  line-height: 1.1;
  text-align: center;
  white-space: normal;
}
.event-range-field {
  opacity: 1;
}
.event-range-field.disabled {
  opacity: .45;
}
.event-range-field.disabled input[type="range"] {
  cursor: default;
}
.event-range-field input[type="range"] {
  padding: 0;
  border: 0;
  box-shadow: none;
  accent-color: var(--green);
}
.event-range-field output {
  color: var(--green);
  font-weight: 900;
}
.moment-compose {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfd;
}
.moment-post-trigger {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: #fff;
  color: var(--muted);
  padding: 0 11px;
  text-align: left;
  font-weight: 500;
}
.moment-post-trigger:hover {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: var(--ink);
}
.moment-compose .primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.moment-reply-notice {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  border: 1px solid rgba(194, 47, 74, .25);
  border-radius: 7px;
  background: #fff4f6;
  color: var(--red);
  padding: 0 12px;
  font-weight: 800;
  text-align: left;
}
.moment-reply-notice svg {
  width: 18px;
  height: 18px;
}
.moment-filter-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.moment-filter-head .secondary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.moment-filter-head strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.moment-feed {
  min-height: 0;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 12px;
  background: #fbfcfd;
}
.moment-feed-status {
  padding: 8px 0 2px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}
.reply-notice-list {
  display: grid;
  gap: 10px;
  padding: 12px;
  overflow: auto;
}
.reply-notice-item {
  display: grid;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  padding: 12px;
  text-align: left;
}
.reply-notice-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}
.reply-notice-meta strong {
  color: var(--ink);
}
.moment-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 1px 2px rgba(18, 27, 38, .03);
}
.moment-card.just-posted {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(22,131,95,.16);
}
.moment-card.mine {
  background: #e8f7f0;
  border-color: #cbe9dc;
}
.moment-card.theirs {
  background: #fff;
}
.moment-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.moment-head strong,
.moment-comment-main strong,
.author-link {
  display: block;
  color: var(--ink);
  font-size: 14px;
}
.author-link {
  width: fit-content;
  border: 0;
  background: transparent;
  padding: 0;
  font-family: inherit;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}
.author-link:active {
  color: var(--green);
}
.comment-author-link {
  margin-bottom: 2px;
}
.moment-head time,
.moment-comment-main time {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}
.moment-body {
  margin: 0;
  line-height: 1.5;
  white-space: pre-wrap;
}
.original-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 5px;
}
.original-footer time {
  min-width: 0;
  color: #8b949e;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.25;
}
.original-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}
.original-actions .note-action-button {
  width: 22px;
  height: 22px;
}
.original-actions .note-action-button svg {
  width: 12px;
  height: 12px;
}
.moment-note {
  width: 100%;
  background: var(--note);
  border-color: var(--note-line);
}
.moment-comments {
  display: grid;
  gap: 8px;
}
.moment-comment {
  display: grid;
  gap: 7px;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #fff;
}
.moment-comment.mine {
  background: var(--green-soft);
  border-color: #c9e6d8;
}
.moment-comment.theirs {
  background: #fff;
}
.moment-comment.just-posted {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(22,131,95,.16);
}
.moment-comment-main p {
  margin: 4px 0 0;
  line-height: 1.45;
}
.moment-reply-trigger {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: #fff;
  color: var(--muted);
  padding: 0 11px;
  text-align: left;
  font-weight: 500;
}
.moment-reply-trigger:hover {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: var(--ink);
}
.moment-reply-trigger svg {
  width: 17px;
  height: 17px;
  color: var(--blue);
  flex: 0 0 auto;
}
.moment-reply-view,
.moment-edit-view {
  min-height: 0;
  flex: 1 1 auto;
  display: grid;
  grid-template-rows: auto auto auto;
  align-content: start;
  gap: 12px;
  padding: 16px;
  background: #fbfcfd;
  overflow: auto;
}
.moment-reply-head {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.moment-reply-head .secondary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.moment-reply-head .secondary svg {
  width: 17px;
  height: 17px;
}
.moment-reply-head strong {
  font-size: 18px;
}
.moment-reply-context {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}
.moment-reply-context.mine {
  background: var(--green-soft);
  border-color: #c9e6d8;
}
.moment-reply-form,
.moment-edit-form {
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto;
  align-content: start;
  gap: 12px;
}
.moment-reply-form textarea,
.moment-edit-form textarea {
  width: 100%;
  height: 132px;
  min-height: 0;
  resize: none;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: #fff;
  color: var(--ink);
  padding: 12px;
  outline: none;
}
.moment-edit-form textarea {
  height: 156px;
}
.moment-reply-form .primary,
.moment-edit-form .primary {
  justify-self: end;
  align-self: start;
  height: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.moment-reply-form .primary svg,
.moment-edit-form .primary svg {
  width: 18px;
  height: 18px;
}

.profile-view {
  width: min(720px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 18px;
  overflow: visible;
}
.profile-head {
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.profile-head h1 {
  margin: 0;
  font-size: 24px;
}
.profile-panel {
  display: grid;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  overflow: hidden;
}
.favorites-view { width: min(760px, 100%); }
.favorite-list { display: grid; gap: 9px; }
.favorite-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 8px; padding: 13px 12px 13px 14px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.favorite-card-main { min-width: 0; display: grid; gap: 6px; padding: 0; border: 0; background: transparent; color: var(--ink); text-align: left; }
.favorite-card-main small { display: flex; align-items: center; gap: 5px; color: var(--green); font-size: 10px; font-weight: 850; }
.favorite-card-main small svg { width: 13px; height: 13px; }
.favorite-card-main strong { font-size: 15px; line-height: 1.48; }
.favorite-card-main > span { color: var(--muted); font-size: 13px; line-height: 1.45; }
.favorite-card-main em { display: flex; align-items: flex-start; gap: 6px; padding: 8px 9px; border-radius: 7px; background: #f3f8f6; color: #49655b; font-size: 12px; font-style: normal; line-height: 1.4; }
.favorite-card-main em svg { width: 14px; height: 14px; flex: 0 0 auto; margin-top: 1px; }
.favorite-card-actions { display: flex; gap: 5px; }
.favorite-card-actions button, .favorite-editor-head button { width: 34px; height: 34px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--muted); }
.favorite-card-actions button svg, .favorite-editor-head button svg { width: 15px; height: 15px; }
.favorite-editor-backdrop { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; padding: 18px; background: rgba(25, 34, 42, .36); }
.favorite-editor { width: min(520px, 100%); display: grid; gap: 14px; padding: 17px; border: 1px solid var(--line); border-radius: 11px; background: #fff; box-shadow: 0 20px 55px rgba(24, 34, 42, .22); }
.favorite-editor-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.favorite-editor-head strong { font-size: 17px; }
.favorite-editor-preview { display: grid; gap: 5px; padding: 11px 12px; border-radius: 8px; background: #f5f8f7; }
.favorite-editor-preview strong { font-size: 14px; line-height: 1.45; }
.favorite-editor-preview-source { min-width: 0; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: start; gap: 8px; }
.favorite-editor-preview-source button { width: 32px; height: 32px; display: grid; place-items: center; padding: 0; border: 1px solid #cfe3da; border-radius: 7px; background: #fff; color: var(--green); }
.favorite-editor-preview-source button svg { width: 16px; height: 16px; }
.favorite-sentence-player { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.favorite-source-highlight { padding: 0; background: transparent; color: #d32f45; font-weight: inherit; }
.favorite-editor-preview span { color: var(--muted); font-size: 13px; line-height: 1.4; }
.favorite-editor-preview small { color: var(--green); font-size: 10px; font-weight: 800; }
.favorite-editor form, .favorite-editor label { display: grid; gap: 8px; }
.favorite-editor label > span { color: var(--muted); font-size: 11px; font-weight: 850; }
.favorite-editor textarea { width: 100%; min-height: 100px; resize: vertical; padding: 10px 11px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; color: var(--ink); font: inherit; line-height: 1.45; }
.favorite-source-editor { display: grid; gap: 7px; }
.favorite-source-editor-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.favorite-source-editor-head > span { color: var(--muted); font-size: 11px; font-weight: 850; }
.favorite-source-rich-editor { width: 100%; min-height: 76px; max-height: 210px; overflow-x: hidden; overflow-y: auto; padding: 10px 11px; border: 1px solid var(--line-strong); border-radius: 8px; outline: none; background: #fff; color: var(--ink); font: inherit; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; -webkit-user-select: text; user-select: text; }
.favorite-source-rich-editor:focus { border-color: var(--green); box-shadow: 0 0 0 2px rgba(28,143,104,.08); }
.favorite-source-color-actions { display: flex; align-items: center; gap: 5px; }
.favorite-source-color-actions button { width: 32px; height: 32px; min-height: 32px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--green); }
.favorite-source-color-actions button svg { width: 15px; height: 15px; }
.favorite-source-color-actions .favorite-red-action { border: 1px solid #efc2c9; background: #fff4f5; color: #c92f43; }
.favorite-editor-actions { display: flex; justify-content: flex-end; gap: 8px; }
.favorite-editor-actions .danger { margin-right: auto; }
.listening-delete-confirm-backdrop { position: fixed; inset: 0; z-index: 160; display: grid; place-items: center; padding: 18px; background: rgba(25,34,42,.38); }
.listening-delete-confirm { width: min(420px, 100%); display: grid; gap: 11px; padding: 17px; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: 0 20px 55px rgba(24,34,42,.24); }
.listening-delete-confirm h2, .listening-delete-confirm p { margin: 0; }
.listening-delete-confirm h2 { font-size: 19px; }
.listening-delete-confirm > strong { overflow: hidden; color: var(--ink); font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.listening-delete-confirm p { color: var(--muted); font-size: 13px; line-height: 1.5; }
.listening-delete-confirm > div { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 3px; }
.listening-delete-confirm .danger { border-color: #b23849; background: #b23849; color: #fff; }
@media (max-width: 620px) {
  .favorite-editor-backdrop { align-items: end; padding: 0; }
  .favorite-editor { border-radius: 11px 11px 0 0; padding-bottom: max(17px, env(safe-area-inset-bottom)); }
  .listening-delete-confirm-backdrop { align-items: end; padding: 0; }
  .listening-delete-confirm { border-radius: 10px 10px 0 0; padding-bottom: max(17px, env(safe-area-inset-bottom)); }
  .listening-folder-editor-backdrop { align-items:end; padding:0; }
  .listening-folder-editor { max-height:calc(100dvh - 8px); overflow-y:auto; border-radius:10px 10px 0 0; padding-bottom:max(10px,env(safe-area-inset-bottom)); }
  .listening-folder-editor form > div:last-child { position:sticky; bottom:0; padding-top:8px; background:#fff; }
  .favorite-card { grid-template-columns: minmax(0, 1fr); }
  .favorite-card-actions { justify-content: flex-end; }
}

.article-view {
  padding-bottom: 8px;
}
.article-detail-view {
  gap: 8px;
}
.article-panel {
  gap: 10px;
  padding: 12px;
}
.article-compose-panel {
  box-shadow: 0 10px 26px rgba(32, 45, 58, 0.05);
}
.article-compose-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.article-compose-head span {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}
.article-clipboard-button {
  min-height: 34px;
  padding: 0 8px;
  gap: 6px;
  font-size: 12px;
  white-space: nowrap;
}
.article-clipboard-button svg {
  width: 15px;
  height: 15px;
}
.article-intro {
  display: grid;
  gap: 8px;
}
.article-intro strong {
  font-size: 18px;
}
.article-intro p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}
.article-guide-card,
.article-reader-tip {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(20, 145, 101, 0.2);
  border-radius: 7px;
  background: linear-gradient(180deg, rgba(233, 248, 241, 0.9), #fff);
}
.article-guide-copy {
  display: grid;
  gap: 5px;
}
.article-guide-copy strong,
.article-reader-tip strong {
  font-size: 14px;
}
.article-guide-copy p,
.article-reader-tip p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.article-guide-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.article-guide-actions .secondary {
  min-height: 34px;
  padding: 0 14px;
  font-size: 12px;
}
.article-guide-actions .ghost-link,
.article-reader-tip .ghost-link {
  min-height: 34px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}
.article-reader-tip {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  background: #f8fafb;
  border-color: var(--line);
}
.article-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.article-quota {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: #f3f6f8;
  color: var(--muted);
}
.article-quota.pro {
  background: var(--green-soft);
  color: var(--green);
}
.article-field {
  display: grid;
  gap: 8px;
}
.article-text-field {
  position: relative;
}
.article-field span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}
.article-field textarea {
  height: 68px;
  min-height: 68px;
  padding: 12px 42px 12px 13px;
  font-size: 15px;
  line-height: 1.45;
  resize: vertical;
}
.article-clear-input {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 999px;
  background: #f3f6f8;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.article-clear-input svg {
  width: 16px;
  height: 16px;
}
.article-auto-row {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}
.article-input-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.article-input-tools {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.article-photo-input {
  position: fixed;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.article-input-tool-button {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid #dce4e8;
  border-radius: 7px;
  background: #f7f9fa;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.article-input-tool-button:disabled {
  opacity: 0.6;
}
.article-dictation-button.is-recording {
  border-color: #efb1b1;
  background: #fff2f2;
  color: #c63d3d;
}
.article-input-tool-button svg {
  width: 15px;
  height: 15px;
}
.article-dictation-button b {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.article-dictation-error {
  color: var(--danger, #c63d3d);
  font-size: 12px;
  font-weight: 700;
}
.article-actions {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}
.article-actions .primary,
.article-actions .secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 10px;
  font-size: 13px;
}
.article-actions svg {
  width: 16px;
  height: 16px;
}
.article-counter {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}
.article-result {
  display: grid;
  gap: 8px;
  border: 1px solid var(--note-line);
  border-radius: 7px;
  background: var(--note);
  padding: 12px;
}
.article-result p {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.5;
  font-size: 15px;
}
.article-history {
  display: grid;
  gap: 8px;
}
.article-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.article-history-head h2 {
  margin: 0;
  font-size: 15px;
}
.article-history-head span,
.article-history-foot span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}
.article-history-list {
  display: grid;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  overflow: hidden;
}
.article-history-more {
  min-height: 28px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}
.article-history-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  min-height: 58px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.article-history-row.selection-mode { grid-template-columns: 42px minmax(0, 1fr); }
.article-history-row.is-selected { background: var(--green-soft); }
.article-history-row.is-selected .article-history-row-main > button { color: var(--green); }
.article-select-check { display: flex; align-items: center; justify-content: center; cursor: pointer; }
.article-select-check input { position: absolute; opacity: 0; pointer-events: none; }
.article-select-check span { display: grid; place-items: center; width: 22px; height: 22px; border: 1px solid #c8d1cd; border-radius: 5px; background: #fff; color: transparent; }
.article-select-check input:checked + span { border-color: var(--green); background: var(--green); color: #fff; }
.article-select-check svg { width: 14px; height: 14px; }
.article-batch-bar { border: 1px solid var(--line); border-radius: 8px; }
.article-history-row-main { padding: 0; }
.article-history-row-main > button {
  width: 100%; min-width: 0; min-height: 58px; display: grid; align-content: center; gap: 4px;
  padding: 9px 12px; border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer;
}
.article-history-row-main > button strong,
.article-history-row-main > button span { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.article-folder-head-actions button {
  display: grid; place-items: center; border: 0; background: #fff; color: var(--muted); cursor: pointer;
}
.article-folder-head-actions svg { width: 17px; height: 17px; }
.article-library-head { min-height: 42px; }
.article-library-head > h2 { flex: 1; }
.article-folder-head-actions { display: inline-flex; align-items: center; gap: 6px; }
.article-folder-head-actions button { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 8px; }
.article-folder-head-actions button.danger { color: #b94761; background: #fff7f8; }
.article-history-row:last-child {
  border-bottom: 0;
}
.article-history-row:focus-visible {
  outline: 2px solid rgba(20, 145, 101, 0.34);
  outline-offset: 2px;
}
.article-history-row-main {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 0;
}
.article-history-row-main strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}
.article-history-row-main span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}
.article-detail-head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}
.article-detail-head.shared-detail-head {
  grid-template-columns: minmax(0, 1fr);
}
.article-detail-view {
  width: min(1120px, 100%);
}
.article-detail-head h1 {
  margin: 2px 0 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 17px;
}
.article-detail-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.article-title-block { min-width: 0; }
.article-title-row { min-width: 0; display: flex; align-items: center; gap: 6px; }
.article-title-row h1 { min-width: 0; flex: 1; }
.article-title-row button,
.article-title-edit button {
  flex: 0 0 auto; width: 30px; min-height: 30px; display: grid; place-items: center; padding: 0;
  border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--green); cursor: pointer;
}
.article-title-row button { color: var(--muted); }
.article-title-row svg,
.article-title-edit svg { width: 14px; height: 14px; }
.article-title-edit { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) 30px 30px; gap: 5px; margin-top: 2px; }
.article-title-edit input {
  width: 100%; min-width: 0; height: 34px; padding: 5px 8px; border: 1px solid var(--green);
  border-radius: 7px; outline: none; background: #fff; color: var(--ink); font-size: 14px; font-weight: 750;
}
.article-share-button,
.shared-open-app-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}
.article-share-button svg {
  width: 16px;
  height: 16px;
}
.shared-article-drawer {
  overflow: hidden;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: #f7fffb;
}
.shared-article-summary {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
  list-style: none;
  text-decoration: none;
}
.shared-article-summary::-webkit-details-marker {
  display: none;
}
.shared-article-summary svg {
  width: 18px;
  height: 18px;
  color: var(--muted);
}
.shared-install-details {
  display: grid;
  gap: 12px;
  padding: 0 14px 14px;
}
.shared-install-details p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.shared-install-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.shared-install-actions .primary,
.shared-install-actions .secondary {
  min-height: 40px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 900;
}
.shared-article-shell .install-option-list {
  margin-top: 0;
}
.shared-article-shell .install-option-card {
  box-shadow: none;
}
.shared-article-shell .profile-workspace {
  min-height: calc(100dvh - 48px);
  padding-top: 14px;
  padding-bottom: 28px;
}
.article-share-panel {
  display: grid;
  gap: 9px;
  padding: 10px;
  border: 1px solid #d7e8e2;
  border-radius: 13px;
  background: #fbfffd;
}
.article-share-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.article-share-panel-head strong {
  font-size: 14px;
}
.article-share-external {
  min-height: 38px;
  border-radius: 10px;
  font-weight: 900;
}
.article-share-contact-list {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.article-share-contact {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 8px 10px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  text-align: left;
  cursor: pointer;
}
.article-share-contact:last-child {
  border-bottom: 0;
}
.article-share-contact span {
  min-width: 0;
}
.article-share-contact strong,
.article-share-contact small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.article-share-contact strong {
  font-size: 13px;
}
.article-share-contact small,
.article-share-url,
.article-share-empty {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}
.article-share-empty {
  margin: 0;
  padding: 12px;
}
.article-results.article-reader {
  display: block;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.article-reading-controls {
  position: sticky;
  top: 0;
  z-index: 18;
  min-height: 0;
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(14px);
  box-shadow: 0 6px 20px rgba(37, 49, 73, 0.04);
}
.article-reading-buttons {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  overflow: visible;
}
.article-reading-buttons.is-shared {
  display: flex;
}
.article-reading-controls button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  min-height: 32px;
  padding: 0 11px;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}
.article-reading-controls > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
}
.article-reading-hint {
  display: block;
  padding: 0 3px;
}
.article-read-all-button {
  width: 38px;
  min-width: 38px;
  min-height: 38px;
  border: 0;
  background: var(--accent) !important;
  color: #fff !important;
  box-shadow: 0 5px 14px rgba(28, 143, 104, 0.18);
  padding: 0;
  font-size: 12px;
  line-height: 1;
}
.article-read-icon {
  flex: 0 0 auto;
  font-size: 13px;
  line-height: 1;
}
.article-read-label {
  display: inline-block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  color: #fff;
}
.article-read-all-button[aria-pressed="true"] {
  background: #126f55 !important;
}
.article-stop-reading-button {
  width: 38px;
  min-width: 38px;
  min-height: 38px;
  border: 1px solid #e0c4c8;
  background: #fff6f7;
  color: #a13d49;
}
.article-reading-nav-button {
  width: 36px;
  min-width: 36px;
  min-height: 38px !important;
  padding: 0 !important;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}
.article-reading-nav-button svg {
  width: 15px;
  height: 15px;
}
.article-reading-nav-button:disabled {
  opacity: 0.35;
  cursor: default;
}
.article-playback-mode-button {
  width: 36px;
  min-width: 36px;
  min-height: 38px !important;
  padding: 0 !important;
  border: 1px solid rgba(28, 143, 104, 0.32);
  background: rgba(28, 143, 104, 0.08);
  color: var(--accent);
}
.article-reading-action-button {
  width: 36px;
  min-width: 36px;
  min-height: 38px !important;
  padding: 0 !important;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}
.article-reading-action-button svg { width: 16px; height: 16px; }
.article-to-listening-button.is-busy svg { animation: spin 0.9s linear infinite; }
.article-playback-mode-button:hover {
  border-color: rgba(28, 143, 104, 0.52);
  background: rgba(28, 143, 104, 0.14);
}
.article-playback-mode-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.article-stop-reading-button.is-reset {
  border-color: #d7dde7;
  background: #f7f9fc;
  color: #6b7280;
}
.article-stop-reading-button.is-active {
  border-color: #e0c4c8;
  background: #fff6f7;
  color: #a13d49;
}
.speech-toggle {
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
  width: 86px;
  min-width: 0;
  min-height: 32px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
}

.article-reading-controls .article-read-all-button {
  display: inline-flex !important;
  background: #15926e !important;
  color: #fff !important;
  opacity: 1 !important;
}

.article-reading-controls .article-read-all-button .article-read-label,
.article-reading-controls .article-read-all-button .article-read-icon {
  display: inline-block !important;
  color: #fff !important;
  opacity: 1 !important;
  visibility: visible !important;
}
.speech-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.speech-toggle-track {
  width: 28px;
  height: 16px;
  position: relative;
  border-radius: 999px;
  background: #d7dde7;
  transition: background 0.15s ease;
}
.speech-toggle-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(17, 24, 39, 0.18);
  transition: transform 0.15s ease;
}
.speech-toggle input:checked + .speech-toggle-track {
  background: #15926e;
}
.speech-toggle input:checked + .speech-toggle-track::after {
  transform: translateX(12px);
}
.speech-toggle.is-on .speech-toggle-track {
  background: #15926e;
}
.speech-toggle.is-on .speech-toggle-track::after {
  transform: translateX(12px);
}
.speech-toggle strong {
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.speech-toggle.is-on {
  border-color: rgba(21, 146, 110, 0.48);
  background: #e7f7f1;
  color: #126f55;
  box-shadow: inset 0 0 0 1px rgba(21, 146, 110, 0.08);
}
.article-column-headings {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  border-bottom: 1px solid var(--line);
  background: #f7f9fc;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}
.article-column-headings strong {
  min-width: 0;
  padding: 8px 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.article-column-headings strong + strong {
  border-left: 1px solid var(--line);
}
.article-pairs {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  height: clamp(380px, 72vh, 760px);
}
.article-detail-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 8px; background: #f3f6f5; }
.article-detail-tabs button { min-width: 0; min-height: 34px; display: flex; align-items: center; justify-content: center; gap: 5px; padding: 5px 8px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 11px; font-weight: 800; }
.article-detail-tabs button svg { width: 14px; height: 14px; }
.article-detail-tabs button.active { background: #fff; color: var(--green); box-shadow: 0 1px 3px rgba(22, 45, 37, .1); }
.article-detail-tabs button:disabled { opacity: .35; }
.article-detail-listening-grid { display: block; }
.article-detail-listening-grid > .article-detail-tab-panel { display: none; }
.article-detail-listening-grid > .article-detail-tab-panel.is-active { display: block; }
.article-detail-listening-grid .article-reader { min-width: 0; }
.article-pairs.article-listening-pairs { display: block; height: auto; min-height: 360px; }
.article-listening-timeline { display: grid; gap: 7px; padding: 0; }
.article-listening-segment { overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.article-listening-segment.is-favorited { border-left: 3px solid var(--green); }
.article-listening-line.article-unit-group {
  display: grid; width: 100%; gap: 4px; margin: 0; padding: 0 14px; border: 0; border-radius: 0;
  background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer;
}
.article-listening-line.source { padding-top: 12px; padding-bottom: 2px; }
.article-listening-line.target { padding-top: 2px; padding-bottom: 12px; }
.article-listening-line.source:last-child { padding-bottom: 12px; }
.article-listening-line.source .article-unit { font-size: 15px; font-weight: 750; line-height: 1.55; }
.article-listening-line.target .article-unit { color: var(--muted); font-size: 13px; line-height: 1.5; }
.article-listening-line.article-unit-group.is-reading { background: rgba(24, 151, 105, .08); color: var(--ink); }
.article-listening-line.article-unit-group.is-reading-primary { background: rgba(24, 151, 105, .13); color: var(--ink); box-shadow: inset 3px 0 0 var(--green); }
.article-playlist-column { position: sticky; top: 12px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.article-playlist-column > header { display: flex; align-items: center; gap: 9px; padding: 11px 12px; border-bottom: 1px solid var(--line); }
.article-playlist-column > header > svg { width: 18px; height: 18px; color: var(--green); }
.article-playlist-column > header span { min-width: 0; display: grid; gap: 2px; }
.article-playlist-column > header strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.article-playlist-column > header small { color: var(--muted); font-size: 10px; font-weight: 800; }
.article-playlist-list { max-height: min(68vh, 640px); overflow-y: auto; }
.article-playlist-list button { width: 100%; display: grid; grid-template-columns: 24px minmax(0, 1fr); align-items: center; gap: 8px; min-height: 48px; padding: 8px 10px; border: 0; border-bottom: 1px solid var(--line); background: #fff; text-align: left; cursor: pointer; }
.article-playlist-list button:last-child { border-bottom: 0; }
.article-playlist-list button > span { color: var(--muted); font-size: 11px; text-align: center; }
.article-playlist-list button > strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.article-playlist-list button.active { background: var(--green-soft); color: var(--green); }
@media (max-width: 900px) {
  .article-playlist-column { position: static; order: 2; }
  .article-playlist-list { max-height: 260px; }
  .article-listening-line.article-unit-group { padding-left: 12px; padding-right: 12px; }
  .article-listening-line.source .article-unit { font-size: 14px; }
}
.article-scroll-column {
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}
.article-scroll-column + .article-scroll-column {
  border-left: 1px solid var(--line);
}
.article-reader-text {
  min-width: 0;
  padding: 16px 14px 22px;
  background: #fff;
  color: var(--ink);
  font-size: 16px;
  line-height: 2.05;
  overflow-wrap: anywhere;
}
.article-reader-paragraph {
  margin: 0 0 18px;
}
.article-reader-paragraph:last-child {
  margin-bottom: 0;
}
.article-unit-group {
  display: inline;
  margin: 0;
  padding: 0 2px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  line-height: inherit;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(52, 105, 229, 0.12);
  user-select: none;
  -webkit-user-select: none;
}
.article-unit-group.is-reading {
  background: rgba(52, 105, 229, 0.12);
  color: #244aa5;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
@media (hover: hover) and (pointer: fine) {
  .article-unit-group:hover,
  .article-unit-group.is-hover-linked:not(.is-reading) {
    background: rgba(52, 105, 229, 0.12);
    color: #244aa5;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
  }
}
.article-unit-group.is-reading-primary {
  background: rgba(52, 105, 229, 0.18);
  color: #1f3f91;
  box-shadow: inset 0 -2px 0 rgba(52, 105, 229, 0.58);
}
.article-unit {
  pointer-events: none;
}
.mobile-column-label {
  display: none;
}
@media (max-width: 900px) and (orientation: portrait) {
  .profile-view.article-detail-view {
    gap: 7px;
  }
  .article-detail-head {
    grid-template-columns: 40px minmax(0, 1fr);
    min-height: 40px;
  }
  .article-detail-head h1 {
    font-size: 15px;
  }
  .article-share-button {
    width: 38px;
    min-width: 38px;
    padding: 0;
  }
  .article-share-button span {
    display: none;
  }
  .article-reading-controls {
    gap: 6px;
    padding: 5px;
    border-radius: 12px;
  }
  .article-reading-buttons {
    gap: 5px;
  }
  .article-reading-buttons.is-shared {
    display: flex;
  }
  .article-reading-controls > span {
    white-space: nowrap;
    line-height: 1.3;
  }
  .article-reading-controls button,
  .speech-toggle {
    justify-content: center;
  }
  .article-read-all-button {
    width: 34px;
    min-width: 34px;
  }
  .article-stop-reading-button {
    width: 34px;
    min-width: 34px;
  }
  .article-reading-nav-button {
    width: 34px;
    min-width: 34px;
  }
  .article-playback-mode-button {
    width: 34px;
    min-width: 34px;
  }
  .article-reading-action-button {
    width: 34px;
    min-width: 34px;
  }
  .speech-toggle strong {
    font-size: 10px;
  }
  .speech-toggle {
    min-width: 0;
    width: 82px;
    padding: 0 7px;
    gap: 5px;
    grid-template-columns: 28px minmax(0, 1fr);
  }
  .speech-toggle-track {
    width: 28px;
    height: 16px;
  }
  .speech-toggle-track::after {
    top: 3px;
    left: 3px;
    width: 10px;
    height: 10px;
  }
  .speech-toggle input:checked + .speech-toggle-track::after,
  .speech-toggle.is-on .speech-toggle-track::after {
    transform: translateX(12px);
  }
  .article-column-headings {
    display: none;
  }
  .article-pairs {
    grid-template-columns: 1fr;
    height: auto;
  }
  .article-scroll-column {
    height: min(34vh, 310px);
  }
  .article-scroll-column + .article-scroll-column {
    border-top: 1px solid var(--line);
    border-left: 0;
  }
  .mobile-column-label {
    position: sticky;
    z-index: 2;
    top: 0;
    display: block;
    padding: 6px 12px;
    border-bottom: 1px solid var(--line);
    background: rgba(247, 249, 252, 0.96);
    color: var(--muted);
    font-size: 10px;
    font-weight: 900;
    backdrop-filter: blur(8px);
  }
  .article-unit-group {
    padding: 0 2px;
  }
  .article-reader-text {
    padding: 14px 12px 20px;
    font-size: 15px;
    line-height: 1.95;
  }
  .article-reader-paragraph {
    margin-bottom: 17px;
  }
}
.article-empty {
  display: grid;
  gap: 6px;
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 7px;
  color: var(--muted);
}
.article-empty strong {
  color: var(--ink);
}
.article-empty p {
  margin: 0;
  line-height: 1.45;
}
.article-loading-state {
  align-items: center;
  justify-items: center;
  min-height: 76px;
}
.article-loading-state .loading-dots {
  padding-top: 0;
}
.loading-dots.compact span {
  width: 5px;
  height: 5px;
}
.user-avatar {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 12px;
  background: #e8f7f0;
  color: var(--green);
  font-weight: 900;
  line-height: 1;
  overflow: hidden;
  user-select: none;
}
.user-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.avatar-large {
  width: 72px;
  height: 72px;
  border-radius: 14px;
  font-size: 28px;
}
.avatar-contact {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  font-size: 17px;
}
.avatar-message {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  font-size: 12px;
}
.tone-mint { background: #e4f6ee; color: #16835f; }
.tone-blue { background: #e8f1ff; color: #226ad6; }
.tone-violet { background: #f0eafd; color: #6c48c5; }
.tone-amber { background: #fff4df; color: #a76512; }
.tone-rose { background: #ffe9ef; color: #bd3e62; }
.tone-slate { background: #eef2f6; color: #53606d; }
.profile-avatar-card,
.friend-profile-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}
.friend-profile-card {
  grid-template-columns: auto minmax(0, 1fr);
}
.profile-avatar-card strong,
.friend-profile-card strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink);
  font-size: 18px;
  font-weight: 850;
}
.profile-avatar-card small,
.friend-profile-card small {
  display: block;
  min-width: 0;
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 13px;
}
.avatar-upload-button {
  position: relative;
  cursor: pointer;
  min-height: 38px;
}
.avatar-upload-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.profile-field {
  display: grid;
  gap: 7px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}
.profile-field:last-child {
  border-bottom: 0;
}
.profile-field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.profile-field strong {
  min-width: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 750;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile-plan-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}
.profile-upgrade-link {
  flex: 0 0 auto;
  padding: 0;
  color: var(--green);
  font-size: 15px;
  font-weight: 800;
  text-align: right;
}
.profile-upgrade-link:disabled {
  opacity: 0.65;
}
.profile-plan-notes {
  display: grid;
  gap: 4px;
}
.profile-plan-notes small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}
.profile-password-form {
  align-items: stretch;
}
.profile-password-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}
.profile-password-row input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  color: var(--ink);
  font: inherit;
}
.profile-password-row .secondary {
  min-height: 44px;
  padding: 0 14px;
  white-space: nowrap;
}
.profile-password-form small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}
.profile-notification-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}
.profile-notification-row small {
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}
.profile-notification-row .compact {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
}
.profile-notification-row svg {
  width: 16px;
  height: 16px;
}
.notification-switch {
  border: 0;
  background: transparent;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  padding: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.notification-switch:disabled {
  cursor: default;
  opacity: 0.55;
}
.notification-switch-track {
  width: 48px;
  height: 28px;
  border-radius: 999px;
  background: #d4d9df;
  border: 1px solid #c4cbd3;
  display: inline-flex;
  align-items: center;
  padding: 2px;
  transition: background 0.18s ease, border-color 0.18s ease;
}
.notification-switch-thumb {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.22);
  transform: translateX(0);
  transition: transform 0.18s ease;
}
.notification-switch.on {
  color: var(--green);
}
.notification-switch.on .notification-switch-track {
  background: var(--green);
  border-color: var(--green);
}
.notification-switch.on .notification-switch-thumb {
  transform: translateX(20px);
}
.push-diagnostics {
  display: grid;
  gap: 9px;
  margin-top: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8fafb;
}
.push-diagnostics-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.push-diagnostic-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
  flex: 1 1 auto;
}
.push-diagnostics-head strong {
  font-size: 14px;
}
.push-diagnostics dl {
  display: grid;
  gap: 6px;
  margin: 0;
}
.diagnostic-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  font-size: 13px;
}
.diagnostic-row dt {
  color: var(--muted);
  font-weight: 750;
}
.diagnostic-row dd {
  margin: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}
.diagnostic-row.ok dd { color: var(--green); }
.diagnostic-row.warn dd { color: var(--muted); }
.diagnostic-row.bad dd { color: var(--red); }
.push-diagnostics p {
  margin: 0;
  color: var(--red);
  font-size: 12px;
  line-height: 1.4;
}
.profile-field select {
  width: min(260px, 100%);
}
.profile-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.profile-name-row .small {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
}
.profile-name-row svg {
  width: 16px;
  height: 16px;
}
.profile-email-row strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.profile-name-input {
  width: min(360px, 100%);
}
@media (max-width: 420px) {
  .profile-password-row {
    grid-template-columns: 1fr;
  }
  .profile-password-row .secondary {
    width: 100%;
  }
}
.icon-button.small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.profile-toggle-field {
  gap: 10px;
}
.profile-toggle-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}
.profile-toggle-row small {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}
.profile-toggle-row input {
  width: 22px;
  height: 22px;
  padding: 0;
}
.friend-info-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
}
.friend-info-actions .primary,
.friend-info-actions .secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.friend-info-actions svg {
  width: 18px;
  height: 18px;
}
.friend-info-panel .profile-field { padding-top:10px; padding-bottom:10px; }
.friend-info-panel .friend-profile-card { padding-top:12px; padding-bottom:12px; }
.friend-info-actions { padding-top:10px; padding-bottom:10px; }
.friend-language-pair strong { white-space:normal; }
.add-friend-panel {
  gap: 0;
}
.add-friend-panel input {
  width: min(420px, 100%);
}
.add-friend-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
}
.add-friend-actions .primary,
.add-friend-actions .secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.add-friend-actions .primary svg,
.add-friend-actions .secondary svg {
  width: 18px;
  height: 18px;
}
.add-friend-panel > .full-width {
  width: calc(100% - 32px);
  margin: 0 16px 16px;
  justify-content: center;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.add-friend-panel > .full-width svg {
  width: 18px;
  height: 18px;
}
.friend-qr-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-top: 1px solid var(--line);
}
.friend-qr-card strong {
  display: block;
  margin-bottom: 5px;
}
.friend-qr-card p,
.qr-scanner p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}
.friend-qr-card img {
  width: 132px;
  height: 132px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}
.qr-scanner {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-top: 1px solid var(--line);
}
.qr-video {
  width: 100%;
  max-height: 280px;
  border-radius: 7px;
  background: #101820;
  object-fit: cover;
}
.qr-scan-view .profile-panel {
  gap: 14px;
}
.qr-scan-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.discover-panel {
  gap: 0;
}
.discover-heading {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.discover-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.discover-filters label {
  min-width: 0;
  display: grid;
  gap: 6px;
}
.discover-filters span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.discover-filters select {
  width: 100%;
}
.discover-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.discover-row:last-child {
  border-bottom: 0;
}
.discover-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}
.discover-main strong,
.discover-main small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.discover-main small,
.discover-languages {
  color: var(--muted);
}
.discover-languages {
  grid-column: 2 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  font-size: 13px;
}
.discover-avatar {
  align-self: start;
}
.discover-add-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.discover-add-button svg {
  width: 16px;
  height: 16px;
}
.discover-add-button:disabled {
  opacity: 0.65;
  cursor: default;
}
.discover-loading {
  padding: 14px 16px;
  color: var(--muted);
  text-align: center;
  font-size: 14px;
}

input {
  min-width: 0;
  height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: #fff;
  color: var(--ink);
  padding: 0 11px;
  outline: none;
  -webkit-user-select: text;
  user-select: text;
}
textarea {
  -webkit-user-select: text;
  user-select: text;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(23,105,224,.12);
}

.primary,
.secondary,
.provider-button {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 0 14px;
  font-weight: 750;
}
.primary { background: var(--green); color: #fff; }
.secondary { background: #fff; color: var(--ink); border-color: var(--line-strong); }
.primary:hover { background: #106d4e; }
.secondary:hover { background: #f6f8fa; }

.text-button {
  border: 0;
  background: transparent;
  color: var(--blue);
  padding: 0;
  font-weight: 700;
}
.text-button:hover { text-decoration: underline; }

.icon-button {
  display: inline-grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--blue);
}
.icon-button:hover { background: var(--blue-soft); }
.icon-button svg { width: 17px; height: 17px; }

.alert {
  margin-bottom: 16px;
  padding: 10px 12px;
  border: 1px solid;
  border-radius: var(--radius-sm);
  font-size: 13px;
}
.alert.error { color: var(--red); border-color: #efbdc5; background: var(--red-soft); }
.alert.success { color: var(--green); border-color: #b8dfd0; background: var(--green-soft); }

.guidance-card {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid #bdd6f5;
  border-radius: var(--radius);
  background: #f4f8ff;
}
.guidance-card strong {
  display: block;
  margin-bottom: 3px;
  font-size: 14px;
}
.guidance-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.guidance-details {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}
.guidance-details summary {
  width: max-content;
  cursor: pointer;
  color: var(--blue);
  font-weight: 750;
}
.guidance-details p {
  margin-top: 6px;
}
.guidance-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
}
.guidance-actions .secondary,
.guidance-card > .text-button {
  min-height: 34px;
  white-space: nowrap;
}

.pro-banner {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid #b8dfd0;
  border-radius: 7px;
  background: var(--green-soft);
}
.pro-banner strong {
  display: block;
  margin-bottom: 3px;
  font-size: 14px;
}
.pro-banner p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.pro-banner .primary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
}
.pro-banner .primary svg {
  width: 17px;
  height: 17px;
}

.setup-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}
.setup-panel h2 {
  margin: 3px 0 0;
  font-size: 18px;
}
.setup-note {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.setup-form {
  display: flex;
  align-items: end;
  gap: 8px;
  min-width: 0;
}
.setup-field {
  display: grid;
  gap: 5px;
  min-width: 0;
}
.setup-field span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}
.setup-field select {
  min-width: 0;
  max-width: 180px;
}

.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 24px 28px;
  background: #fff;
}
.auth-panel {
  width: min(400px, 100%);
  padding: 28px 0 0;
  border: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}
.auth-restore-panel {
  min-height: 60vh;
  display: grid;
  align-content: center;
  gap: 14px;
  text-align: center;
}
.auth-restore-panel p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}
.app-loading-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: max(18px, env(safe-area-inset-top)) 24px max(18px, env(safe-area-inset-bottom));
  background: #fff;
}
.app-loading-card {
  width: min(320px, 100%);
  display: grid;
  justify-items: center;
  gap: 14px;
  text-align: center;
  transform: translateY(-4vh);
}
.app-loading-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 0;
}
.app-loading-brand .brand-mark {
  width: 42px;
  height: 42px;
  padding: 9px;
  border-radius: 9px;
}
.app-loading-card p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
}
.loading-dots {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-top: 2px;
}
.loading-dots span {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--green);
  opacity: .35;
  animation: loading-dot 1.15s ease-in-out infinite;
}
.loading-dots span:nth-child(2) {
  animation-delay: .16s;
}
.loading-dots span:nth-child(3) {
  animation-delay: .32s;
}
.loading-bar {
  width: min(170px, 58vw);
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf1f4;
}
.loading-bar span {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--blue));
  animation: loading-bar 1.25s ease-in-out infinite;
}
.daily-warmup-view {
  min-height: 100%;
  display: grid;
  place-items: start center;
  overflow-y: auto;
  padding: max(14px, env(safe-area-inset-top)) 18px max(14px, env(safe-area-inset-bottom));
  background: #fff;
}
.daily-warmup-card {
  width: min(560px, 100%);
  display: grid;
  gap: 12px;
  margin: auto 0;
  transform: translateY(-1vh);
}
.daily-warmup-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.daily-warmup-skip-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px 12px;
  text-transform: none;
  letter-spacing: 0;
}
.daily-warmup-skip-actions .text-button {
  min-height: 30px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0 11px;
  background: #f8fafb;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}
.daily-warmup-skip-actions .text-button:hover,
.daily-warmup-skip-actions .text-button:focus-visible {
  border-color: #b8dfd0;
  background: var(--green-soft);
  color: var(--green);
}
.daily-warmup-card h1 {
  margin: 0;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: 0;
}
.warmup-meaning {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f8fafb;
}
.warmup-meaning small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.warmup-meaning p {
  margin: 5px 0 0;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.36;
}
.warmup-answer,
.warmup-token-bank {
  min-height: 50px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  padding: 8px;
  background: #fff;
}
.warmup-answer span {
  color: var(--muted);
  font-weight: 750;
}
.warmup-answer button,
.warmup-token-bank button {
  min-height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0 10px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 850;
  letter-spacing: 0;
}
.warmup-answer button {
  border-color: #b8dfd0;
  background: var(--green-soft);
  color: var(--green);
}
.warmup-answer-token {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px;
  border: 1px solid #b8dfd0;
  border-radius: 999px;
  background: var(--green-soft);
  touch-action: none;
  user-select: none;
  will-change: transform;
}
.warmup-answer-token.dragging {
  position: relative;
  z-index: 5;
  box-shadow: 0 10px 26px rgba(16, 24, 40, .16);
  opacity: .96;
}
.warmup-answer-token .warmup-word {
  min-height: 34px;
  border: 0;
  padding: 0 7px;
  background: transparent;
}
.warmup-answer-token .warmup-move {
  width: 28px;
  min-height: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(22, 131, 95, .18);
  padding: 0;
  background: #fff;
}
.warmup-answer-token .warmup-move svg {
  width: 15px;
  height: 15px;
}
.warmup-answer-token .warmup-move:disabled {
  opacity: .28;
}
.warmup-token-bank button:active,
.warmup-answer button:active {
  transform: translateY(1px);
}
.warmup-prompt-card,
.warmup-listen-card,
.warmup-quote-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}
.warmup-prompt-card small,
.warmup-listen-card small,
.warmup-quote-card small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.warmup-prompt-card p {
  margin: 6px 0 0;
  color: var(--ink);
  font-size: clamp(16px, 4.5vw, 20px);
  font-weight: 800;
  line-height: 1.42;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  text-wrap: pretty;
}
.warmup-quote-card {
  border-color: #b8dfd0;
  background: var(--green-soft);
}
.warmup-quote-card div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}
.warmup-quote-card p {
  margin: 0;
  color: var(--ink);
  font-size: 21px;
  font-weight: 850;
  line-height: 1.35;
}
.warmup-listen-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
}
.warmup-listen-card button {
  min-height: 40px;
}
.warmup-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.warmup-choice-grid button {
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 9px 10px;
  background: #fff;
  color: var(--ink);
  font-size: 15px;
  font-weight: 850;
  line-height: 1.25;
  letter-spacing: 0;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}
.warmup-choice-grid.sentence-options {
  grid-template-columns: 1fr;
}
.warmup-choice-grid.sentence-options button {
  text-align: left;
}
.warmup-choice-grid button.selected {
  border-color: #7ac4aa;
  background: var(--green-soft);
  color: var(--green);
  box-shadow: inset 0 0 0 1px rgba(22, 131, 95, .08);
}
.warmup-feedback {
  min-height: 18px;
  margin: -2px 0 0;
  color: var(--red);
  font-size: 14px;
  font-weight: 800;
}
.warmup-feedback.success {
  color: var(--green);
}
.warmup-answer-card,
.warmup-complete-card {
  border: 1px solid #b8dfd0;
  border-radius: 8px;
  padding: 11px 12px;
  background: var(--green-soft);
}
.warmup-answer-card {
  border-color: var(--note-line);
  background: var(--note);
}
.warmup-answer-card small,
.warmup-complete-card small {
  display: block;
  margin-bottom: 8px;
  color: var(--green);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.warmup-answer-card small {
  color: var(--muted);
}
.warmup-answer-card div,
.warmup-complete-card div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}
.warmup-answer-card p,
.warmup-complete-card p {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.36;
}
.warmup-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.warmup-actions.completed {
  grid-template-columns: 1fr;
  position: sticky;
  bottom: max(10px, env(safe-area-inset-bottom));
  z-index: 3;
  padding-top: 2px;
  background: #fff;
}
.warmup-actions button {
  min-height: 42px;
}
@keyframes loading-dot {
  0%, 80%, 100% {
    opacity: .32;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-4px);
  }
}
@keyframes loading-bar {
  0% {
    transform: translateX(-115%);
  }
  100% {
    transform: translateX(260%);
  }
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .loading-dots span,
  .loading-bar span {
    animation: none;
  }
}
.auth-panel .logo-lockup {
  justify-content: flex-start;
  font-size: 28px;
  font-weight: 900;
  margin-top: 26px;
}
.auth-panel h1 {
  margin: 42px 0 12px;
  font-size: 30px;
  line-height: 1.25;
  text-align: center;
}
.auth-panel p { margin: 0 0 32px; color: var(--muted); line-height: 1.55; }
.auth-panel > p {
  text-align: center;
  font-size: 17px;
}
.auth-use-cases {
  display: grid;
  gap: 8px;
  margin: 22px 0 0;
}
.auth-use-case {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8fafb;
  padding: 12px 13px;
}
.auth-use-case strong {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
  font-weight: 850;
}
.auth-use-case p {
  margin: 0;
  font-size: 13px;
  line-height: 1.48;
}
.auth-core-idea {
  margin: 2px 0 0 !important;
  padding: 10px 12px;
  border-left: 3px solid var(--green);
  background: var(--green-soft);
  color: var(--ink) !important;
  font-size: 13px;
  line-height: 1.5 !important;
}
.auth-pwa-guidance {
  width: calc(100% + 48px);
  align-items: stretch;
  flex-direction: column;
  gap: 0;
  margin: 0 -24px;
  padding: 0 24px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}
.auth-pwa-guidance p {
  margin-bottom: 0;
}
.auth-pwa-guidance strong,
.auth-pwa-guidance > div > p {
  display: none;
}
.auth-pwa-guidance .guidance-details {
  margin: 0;
}
.auth-pwa-guidance .guidance-details summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  color: var(--blue);
  font-weight: 750;
}
.auth-pwa-guidance .guidance-details p {
  padding: 0 0 14px;
}
.auth-pwa-guidance .install-steps {
  display: grid;
  gap: 12px;
  padding: 0 0 14px;
}
.auth-pwa-guidance .install-steps section {
  display: grid;
  gap: 4px;
}
.auth-pwa-guidance .install-steps strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
}
.auth-pwa-guidance .install-steps p {
  padding: 0;
  color: var(--muted);
}
.android-apk-download {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0 16px;
  border-top: 1px solid var(--line);
}
.android-apk-download strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
}
.android-apk-download p {
  margin: 4px 0 0;
  padding: 0;
  color: var(--muted);
}
.android-apk-download .secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}
.android-apk-download svg {
  width: 16px;
  height: 16px;
}
.auth-pwa-guidance > .text-button {
  display: none;
}
.install-device-guidance {
  display: grid;
  gap: 14px;
  padding-top: 14px;
  padding-bottom: 16px;
}
.install-device-guidance .install-device-head,
.install-gate-device .install-device-head {
  display: grid;
  gap: 4px;
}
.auth-pwa-guidance .install-device-head strong,
.install-device-head strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
  font-weight: 850;
  line-height: 1.25;
}
.auth-pwa-guidance .install-device-head p,
.install-device-head p {
  display: block;
  margin: 0;
  padding: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.install-device-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.install-device-selector button {
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 850;
}
.install-device-selector button.active {
  border-color: rgba(22,131,95,.36);
  background: var(--green-soft);
  color: #0f684b;
}
.install-device-selector svg {
  width: 16px;
  height: 16px;
}
.install-option-intro {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.install-option-list {
  display: grid;
  gap: 10px;
}
.install-option-card {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}
.install-option-card.recommended {
  border-color: rgba(22,131,95,.28);
}
.install-option-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.auth-pwa-guidance .install-option-head strong,
.install-option-head strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
  font-weight: 850;
  line-height: 1.25;
}
.install-option-head span {
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--green-soft);
  color: #0f684b;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 850;
}
.auth-pwa-guidance .install-option-card p,
.install-option-card p {
  display: block;
  margin: 0;
  padding: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.install-option-card ol {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 20px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.45;
}
.ios-install-steps {
  display: grid;
  gap: 8px;
}
.ios-install-step {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafbfc;
  padding: 9px 10px;
}
.ios-step-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
}
.ios-step-icon svg {
  width: 24px;
  height: 24px;
  stroke-width: 2.2;
}
.ios-install-step b {
  display: block;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.28;
}
.ios-install-step small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
.home-add-icon,
.safari-menu-icon,
.ios-share-icon {
  color: var(--ink);
}
.sidenote-home-icon {
  position: relative;
}
.sidenote-home-icon {
  border-color: transparent;
  background: transparent;
}
.sidenote-home-icon .brand-mark {
  width: 42px;
  height: 42px;
  gap: 3px;
  padding: 8px;
  border-radius: 10px;
}
.install-option-card .secondary {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
}
.install-download-icon {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
}
.install-download-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.install-gate-device {
  display: grid;
  gap: 14px;
  margin-top: 8px;
}
.auth-display-language {
  width: 100%;
  display: flex;
  justify-content: center;
  margin: 50px 0 0;
}
.auth-display-language select {
  width: auto;
  max-width: 180px;
  height: 28px;
  border: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  color: #858b93;
  padding: 0 8px;
  font-size: 14px;
  text-align: center;
  text-align-last: center;
}
.install-gate-panel h1 {
  margin-top: 34px;
}
.install-visual-grid {
  display: grid;
  gap: 14px;
  margin: 22px 0 14px;
}
.install-step-card {
  display: grid;
  grid-template-columns: 94px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}
.install-step-card strong {
  align-self: end;
  font-size: 15px;
  font-weight: 850;
}
.install-step-card ol {
  grid-column: 2;
  margin: -4px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.install-phone-visual {
  grid-row: span 2;
  width: 86px;
  height: 132px;
  border: 2px solid var(--line-strong);
  border-radius: 18px;
  background: linear-gradient(#fff, #f7fafb);
  display: grid;
  place-items: center;
  position: relative;
}
.install-phone-top {
  position: absolute;
  top: 8px;
  width: 28px;
  height: 4px;
  border-radius: 999px;
  background: var(--line-strong);
}
.install-phone-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--blue);
}
.install-phone-icon svg,
.install-phone-arrow svg {
  width: 18px;
  height: 18px;
}
.install-phone-arrow {
  position: absolute;
  bottom: 34px;
  color: var(--muted);
}
.install-home-icon {
  position: absolute;
  bottom: 9px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}
.install-home-icon .brand-mark {
  width: 20px;
  height: 20px;
}
.install-home-icon .brand-word {
  display: none;
}
.install-gate-note {
  margin-top: 10px !important;
  text-align: center;
  font-size: 13px;
}
.push-permission-view {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 24px;
}
.push-permission-card {
  width: min(420px, 100%);
  display: grid;
  justify-items: center;
  gap: 14px;
  text-align: center;
}
.push-permission-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: var(--green-soft);
  color: var(--green);
}
.push-permission-icon svg {
  width: 27px;
  height: 27px;
}
.push-permission-card h1 {
  margin: 0;
  font-size: 25px;
}
.push-permission-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}
.push-permission-actions {
  width: 100%;
  display: grid;
  gap: 10px;
  margin-top: 8px;
}
.push-permission-actions .primary,
.push-permission-actions .secondary {
  width: 100%;
  min-height: 48px;
}
.email-auth-form {
  display: grid;
  gap: 10px;
  margin: 0 0 18px;
}
.auth-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #f5f6f7;
}
.auth-mode-tabs button {
  min-height: 38px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  box-shadow: none;
}
.auth-mode-tabs button.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}
.email-auth-form input,
.email-auth-form .primary,
.email-auth-form .secondary {
  width: 100%;
}
.email-auth-form input {
  height: 54px;
  border-radius: 8px;
  padding-inline: 18px;
  font-size: 16px;
}
.email-auth-form input::placeholder {
  color: #9aa2aa;
}
.email-auth-form .primary {
  height: 54px;
  border-radius: 8px;
  font-size: 16px;
}
.email-auth-form .secondary {
  min-height: 50px;
  border-radius: 8px;
  font-size: 16px;
}
.email-auth-form .auth-create-account {
  margin-top: 4px;
  background: #fff;
}
.turnstile-box {
  width: 100%;
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.turnstile-box iframe {
  max-width: 100%;
}
.turnstile-placeholder {
  width: 100%;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #f7f8fa;
  color: var(--muted);
  font-weight: 700;
}
.auth-link-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.auth-reset { justify-self: center; }
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0 18px;
  color: var(--muted);
  font-size: 12px;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}
.auth-actions { display: grid; gap: 10px; }
.provider-button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-color: var(--line-strong);
  background: #fff;
  color: var(--ink);
}
.provider-button:hover { background: #f6f8fa; }
.apple-button {
  border-color: #111;
  background: #111;
  color: #fff;
}
.apple-button:hover { background: #272727; }
.apple-symbol {
  font-size: 13px;
  line-height: 1;
}
.google-g { color: var(--blue); font-weight: 900; }
.pc-qr-login {
  display: none;
}
@media (min-width: 801px) {
  .pc-qr-login {
    display: block;
    margin-top: 6px;
  }
  .pc-qr-login-card {
    display: grid;
    justify-items: center;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    text-align: center;
    background: #fff;
  }
  .pc-qr-login-card strong {
    display: block;
    margin-bottom: 4px;
    font-size: 15px;
  }
  .pc-qr-login-card p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
  }
  .pc-qr-login-card small {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
  }
  .pc-qr-login-card .error-text {
    color: var(--red);
  }
  .pc-qr-code-box {
    width: 226px;
    height: 226px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #f8fafc;
  }
  .pc-qr-code-box img {
    width: 210px;
    height: 210px;
    border-radius: 8px;
  }
  .pc-qr-placeholder {
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
  }
}

.chat-layout {
  height: calc(100vh - 112px);
  min-height: 520px;
  flex: 1 1 auto;
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-soft);
}
.chat-workspace .chat-layout {
  height: auto;
  min-height: 0;
}
.contacts-workspace .chat-layout {
  height: auto;
  min-height: 0;
}
.sidebar {
  min-width: 0;
  height: 100%;
  min-height: 0;
  background: #fff;
}
.eyebrow {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}
.contact-list {
  height: 100%;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  display: grid;
  align-content: start;
}
.contact-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 4px 12px;
  align-items: center;
  min-height: 72px;
  padding: 14px 16px;
  border: 0;
  border-bottom: 1px solid rgba(230, 233, 238, .86);
  background: transparent;
  text-align: left;
  transition: background .14s ease, box-shadow .14s ease;
}
.contact-row:hover,
.contact-row.active {
  background: #fafcfb;
}
.contact-row.active {
  box-shadow: inset 3px 0 0 rgba(22, 131, 95, .82);
}
.contact-row .contact-title {
  grid-column: 2;
  color: var(--ink);
  font-weight: 780;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.contact-row .user-avatar {
  grid-row: 1 / 3;
  grid-column: 1;
}
.contact-title span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.unread-badge {
  min-width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
}
.contact-row small {
  grid-column: 2;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}
.contact-language {
  grid-row: 1 / 3;
  grid-column: 3;
  align-self: center;
  max-width: 104px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-radius: 999px;
  background: #f2f5f7;
  color: #58626d;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
}
.contact-row svg {
  grid-row: 1 / 3;
  grid-column: 4;
  width: 17px;
  height: 17px;
  color: var(--muted);
}
.empty-list {
  padding: 18px 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.conversation {
  min-width: 0;
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) min-content;
  background: #fff;
}
.contact-open .conversation { display: none; }
.chat-open .sidebar { display: none; }
.conversation-head {
  min-height: 72px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(230, 233, 238, .9);
  position: sticky;
  top: 0;
  z-index: 12;
  background: rgba(255,255,255,.98);
  backdrop-filter: blur(14px);
}
.back-button {
  color: var(--ink);
}
.conversation-head h2 {
  margin: 3px 0 0;
  font-size: 22px;
}
.conversation-title-button {
  min-width: 0;
  display: grid;
  gap: 2px;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 0;
  text-align: left;
  cursor: pointer;
}
.conversation-title-button span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
}
.conversation-title-button b {
  color: var(--red);
  font-size: 12px;
}
.conversation-head .secondary,
.composer .primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  align-self: start;
  min-height: 44px;
  max-height: 48px;
}
.composer .primary span {
  line-height: 1.2;
}
.conversation-head svg,
.composer svg {
  width: 16px;
  height: 16px;
}
.message-list {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  background: #fbfcfd;
}
.user-avatar.wordle-avatar {
  border-radius: 8px;
  background: #16835f;
  color: #fff;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.25);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 900;
}
.wordle-message-list {
  display: block;
  padding: 0;
  background: #f7f9f8;
  overflow: hidden;
}
.wordle-game {
  width: min(700px, 100%);
  height: 100%;
  min-height: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-rows: minmax(0, 1fr) 30px auto;
  gap: 5px;
  overflow: hidden;
  padding: 10px clamp(10px, 3vw, 24px) 12px;
  color: var(--ink);
  box-sizing: border-box;
  position: relative;
}
.wordle-row {
  display: grid;
  grid-template-rows: minmax(0, 1fr) 11px;
  justify-items: center;
  gap: 1px;
  min-height: 0;
}
.wordle-row.played {
  cursor: pointer;
}
.wordle-row.played .wordle-translation {
  align-self: start;
  transform: translateY(-4px);
}
.wordle-row[data-wordle-hint] {
  cursor: pointer;
}
.wordle-hint-affordance {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: #9a7824;
  font-size: 10px;
  font-weight: 750;
  line-height: 11px;
}
.wordle-hint-affordance svg {
  width: 11px;
  height: 11px;
}
.wordle-bank-game .wordle-row.has-inline-hint {
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 3px;
}
.wordle-inline-hint {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
  max-width: min(290px, 100%);
  color: #8a6b1e;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.25;
  text-align: center;
}
.wordle-inline-hint svg {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
}
.wordle-inline-hint button {
  appearance: none;
  border: 0;
  padding: 0;
  color: #b4233f;
  background: transparent;
  font: inherit;
  text-decoration: underline;
}
.wordle-inline-hint .wordle-hint-next {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin-top: -5px;
  border: 1px solid #d6c58e;
  border-radius: 6px;
  color: #8a6b1e;
  background: #fffdf5;
  text-decoration: none;
  cursor: pointer;
}
.wordle-inline-hint .wordle-hint-next svg {
  width: 12px;
  height: 12px;
}
.wordle-row.played:focus {
  outline: 2px solid rgba(22,131,95,.25);
  outline-offset: 2px;
  border-radius: 5px;
}
.wordle-board {
  width: min(310px, 100%);
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: repeat(6, minmax(0, 1fr));
  gap: 3px;
  margin: 0 auto;
}
.wordle-tiles {
  height: 100%;
  max-height: 50px;
  width: auto;
  max-width: 100%;
  aspect-ratio: 5.55 / 1;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
}
.wordle-tile {
  width: auto;
  height: 100%;
  min-width: 0;
  min-height: 0;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 2px solid #d7dcda;
  border-radius: 5px;
  background: #fff;
  color: #26322e;
  font-size: clamp(15px, 3.2dvh, 24px);
  font-weight: 900;
  line-height: 1;
}
.wordle-tile.filled {
  border-color: #6f7b77;
  box-shadow: inset 0 0 0 1px rgba(111,123,119,.18);
}
.wordle-row.current .wordle-tile.locked {
  cursor: default;
}
.wordle-row.current .wordle-tile.locked.removable {
  cursor: pointer;
}
.wordle-row.current .wordle-tile.locked.removable:active {
  transform: scale(.94);
}
.wordle-tile.correct {
  border-color: #16835f;
  background: #16835f;
  color: #fff;
}
.wordle-tile.present {
  border-color: #c49a2f;
  background: #c49a2f;
  color: #fff;
}
.wordle-tile.absent {
  border-color: #78817e;
  background: #78817e;
  color: #fff;
}
.wordle-translation {
  width: 100%;
  min-height: 14px;
  color: var(--muted);
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wordle-translation strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 11px;
  font-weight: 650;
}
.wordle-translation button {
  border: 0;
  background: transparent;
  color: var(--red);
  padding: 0;
  text-align: center;
  font-size: 10px;
}
.wordle-translation .pending-note {
  color: var(--muted);
  font-size: 10px;
}
.wordle-error {
  margin: 0;
  color: var(--red);
  font-size: 12px;
  text-align: center;
}
.wordle-status {
  min-height: 0;
  display: grid;
  place-items: center;
}
.wordle-result {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: 0;
  border: 1px solid #e4d3a5;
  border-radius: 8px;
  background: #fff9e9;
  padding: 5px 10px;
  font-size: 12px;
}
.wordle-result.won {
  border-color: rgba(22,131,95,.28);
  background: #edf8f3;
  color: #126c50;
}
.wordle-result svg {
  width: 18px;
  height: 18px;
}
.wordle-result button {
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  font: inherit;
  font-weight: 850;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.wordle-game:focus { outline: none; }
.wordle-keyboard {
  width: min(520px, 100%);
  display: grid;
  gap: 4px;
  margin: 0 auto;
  user-select: none;
  -webkit-user-select: none;
}
.wordle-keyboard-row {
  display: flex;
  justify-content: center;
  gap: 4px;
}
.wordle-key {
  min-width: 0;
  height: clamp(34px, 5.6dvh, 46px);
  flex: 1 1 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 5px;
  background: #dce2df;
  color: #24302c;
  padding: 0 2px;
  font-size: 14px;
  font-weight: 850;
  line-height: 1;
  touch-action: manipulation;
}
.wordle-next-button {
  justify-self: end;
}
.wordle-header-actions {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}
.wordle-language-button {
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .02em;
}
.wordle-language-picker {
  position: relative;
}
.wordle-level-picker {
  position: relative;
}
.wordle-level-button {
  font-size: 12px;
  font-weight: 850;
}
.wordle-level-label {
  min-width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--green);
  font-size: 11px;
  font-weight: 850;
}
.wordle-level-menu {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  z-index: 45;
  width: 104px;
  padding: 5px;
  display: grid;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(24,36,31,.18);
}
.wordle-level-menu button {
  min-height: 36px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--ink);
  font-weight: 780;
}
.wordle-level-menu button.active {
  background: var(--green-soft);
  color: var(--green);
}
.wordle-language-menu {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  z-index: 45;
  width: 142px;
  padding: 5px;
  display: grid;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(24,36,31,.18);
}
.wordle-language-menu button {
  min-height: 36px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--ink);
  padding: 5px 8px;
  text-align: left;
}
.wordle-language-menu button.active {
  background: #edf8f3;
  color: var(--green);
}
.wordle-language-menu b {
  font-size: 11px;
}
.wordle-language-menu span {
  font-size: 13px;
}
.wordle-bank-board {
  width: min(300px, 100%);
  grid-template-rows: repeat(4, minmax(0, 1fr));
  gap: 7px;
}
.wordle-bank-tiles {
  width: min(250px, 100%);
  max-height: 58px;
  aspect-ratio: 4.4 / 1;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.wordle-bank-tiles.variable {
  width: min(calc(var(--wordle-bank-length) * 58px), 100%);
  grid-template-columns: repeat(var(--wordle-bank-length), minmax(0, 1fr));
  aspect-ratio: var(--wordle-bank-length) / 1;
}
.wordle-bank-beginner .wordle-row {
  grid-template-rows: auto auto;
  align-content: center;
}
.wordle-bank-beginner .wordle-bank-board {
  grid-template-rows: repeat(var(--wordle-bank-answer-count, 4), auto);
  align-content: center;
}
.wordle-bank-beginner .wordle-row.has-inline-hint .wordle-bank-tiles {
  height: 58px;
}
.wordle-inline-hint.audio-only .wordle-speak-button {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #b9e0d3;
  border-radius: 7px;
  color: var(--green);
  background: #f1faf6;
  text-decoration: none;
}
.wordle-inline-hint.audio-only .wordle-speak-button svg {
  width: 17px;
  height: 17px;
}
.wordle-bank-beginner .wordle-row.played .wordle-translation {
  margin-top: 3px;
  transform: none;
}
.wordle-bank-tiles .wordle-tile {
  font-size: clamp(19px, 3.8dvh, 28px);
}
.wordle-bank-progress {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}
.wordle-symbol-area {
  width: min(520px, 100%);
  display: grid;
  gap: 7px;
  margin: 0 auto;
}
.wordle-symbol-bank {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 5px;
}
.wordle-symbol {
  position: relative;
  min-width: 0;
  height: clamp(36px, 5.8dvh, 48px);
  display: grid;
  place-items: center;
  border: 1px solid #d6ddda;
  border-radius: 5px;
  background: #fff;
  color: var(--ink);
  padding: 0;
  font-size: clamp(17px, 2.8dvh, 23px);
  font-weight: 800;
  touch-action: manipulation;
}
.wordle-symbol-character {
  line-height: 1;
}
.wordle-symbol-count {
  position: absolute;
  top: 2px;
  right: 4px;
  min-width: 12px;
  color: var(--green);
  font-size: 10px;
  font-weight: 850;
  line-height: 1;
  text-align: center;
  pointer-events: none;
}
.wordle-symbol:active {
  background: #edf8f3;
  border-color: rgba(22,131,95,.35);
}
.wordle-symbol.used,
.wordle-symbol.used:active {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}
.wordle-symbol.used:disabled {
  opacity: 1;
}
.wordle-bank-actions {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) minmax(0, 1fr);
  gap: 7px;
}
.wordle-bank-actions.auto-submit {
  grid-template-columns: 58px minmax(0, 1fr);
}
.wordle-standard-actions { margin-top:2px; }
.wordle-bank-actions .wordle-key {
  width: 100%;
  height: 40px;
}
.wordle-bank-delete {
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-select: none;
}
.wordle-bank-submit {
  background: var(--green);
  color: #fff;
}
.wordle-reveal-first {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid rgba(22,131,95,.24);
  border-radius: 6px;
  background: #f3faf7;
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
}
.wordle-reveal-first svg {
  width: 15px;
  height: 15px;
}
.wordle-reveal-first b {
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--green);
  color: #fff;
  font-size: 9px;
  letter-spacing: .04em;
}
.wordle-chinese-phonetic-game {
  grid-template-rows: auto minmax(145px, 1fr) auto auto;
  gap: 8px;
  padding-top: 10px;
}
.wordle-phonetic-mode {
  width: max-content;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  margin: 0 auto;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f3f6f5;
}
.wordle-phonetic-mode button {
  min-width: 72px;
  height: 34px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}
.wordle-phonetic-mode button.active {
  background: #fff;
  color: var(--green);
  box-shadow: 0 1px 4px rgba(24,36,31,.12);
}
.wordle-jyutping-mode {
  grid-template-columns: 1fr;
}
.wordle-jyutping-mode span {
  min-width: 82px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  background: #fff;
  color: var(--green);
  padding: 0 12px;
  font-size: 14px;
  font-weight: 850;
  box-shadow: 0 1px 4px rgba(24,36,31,.12);
}
.wordle-phonetic-board {
  width: min(460px, 100%);
  grid-template-rows: repeat(var(--wordle-phonetic-answer-count, 2), minmax(0, 1fr));
  gap: 8px;
}
.wordle-chinese-phonetic-game .wordle-row.has-inline-hint {
  grid-template-rows: auto auto;
  align-content: center;
  gap: clamp(10px, 2dvh, 18px);
}
.wordle-chinese-phonetic-game .wordle-row.played {
  grid-template-rows: minmax(0, 1fr);
  align-items: center;
}
.wordle-phonetic-syllables {
  width: min(calc(var(--wordle-bank-length) * 94px), 100%);
  display: grid;
  grid-template-columns: repeat(var(--wordle-bank-length), minmax(0, 1fr));
  gap: clamp(12px, 3vw, 18px);
}
.wordle-phonetic-syllable {
  min-width: 0;
  height: clamp(58px, 8.5dvh, 76px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3px;
}
.wordle-phonetic-syllable b {
  min-width: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-bottom: 2px solid #d5dcda;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-size: clamp(18px, 3.4dvh, 26px);
  line-height: 1;
  text-transform: lowercase;
}
.wordle-phonetic-syllable b.filled {
  border-color: var(--green);
  background: transparent;
  color: var(--green);
}
.wordle-phonetic-syllable b.tone {
  font-size: clamp(20px, 3.6dvh, 28px);
}
.wordle-phonetic-syllables.whole-syllables {
  width: min(calc(var(--wordle-bank-length) * 112px), 100%);
}
.wordle-phonetic-syllable.whole {
  grid-template-columns: 1fr;
}
.wordle-phonetic-syllable.whole b {
  font-size: clamp(21px, 4dvh, 30px);
}
.wordle-phonetic-solved {
  color: var(--green);
  font-size: clamp(40px, 6.5dvh, 56px);
  font-weight: 850;
  letter-spacing: .08em;
}
.wordle-phonetic-pending {
  color: #9aa5a1;
  font-size: 16px;
  font-weight: 750;
}
.wordle-phonetic-hint {
  gap: 10px;
  max-width: min(410px, 100%);
  font-size: clamp(17px, 2.8dvh, 22px);
  line-height: 1.45;
}
.wordle-phonetic-hint strong {
  flex: 0 0 auto;
  color: var(--green);
  font-size: clamp(15px, 2.4dvh, 19px);
  white-space: nowrap;
}
.wordle-phonetic-area {
  gap: 4px;
}
.wordle-phonetic-bank-group {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 5px;
}
.wordle-phonetic-bank-group > small {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  text-align: right;
}
.wordle-phonetic-bank {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.wordle-phonetic-bank .wordle-symbol {
  width: auto;
  min-width: 42px;
  height: clamp(38px, 5.5dvh, 46px);
  padding: 0 10px;
  font-size: clamp(18px, 3dvh, 23px);
}
.wordle-phonetic-area .wordle-bank-actions .wordle-key {
  height: 43px;
  font-size: 14px;
}
.wordle-phonetic-actions:not(.auto-submit) {
  grid-template-columns: 58px minmax(0, 1fr) minmax(0, 1fr);
}
.wordle-english-phonetic-board {
  width: min(520px, 100%);
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.wordle-english-phonetic-game {
  grid-template-rows: auto minmax(0, 1fr) 30px auto;
}
.wordle-english-mode {
  height: 40px;
  flex: 0 0 auto;
}
.wordle-english-phonetic-game .wordle-row {
  position: relative;
  min-height: 82px;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  grid-template-rows: 46px auto;
  align-content: center;
  align-items: end;
  justify-items: stretch;
  column-gap: 12px;
  row-gap: 2px;
}
.wordle-phonetic-replay {
  position: static;
  grid-column: 1;
  grid-row: 1;
  align-self: end;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(22,131,95,.28);
  border-radius: 9px;
  background: #edf8f3;
  color: var(--green);
}
.wordle-phonetic-replay:not(.active) {
  border-color: var(--line);
  background: #f4f6f5;
  color: #7d8984;
}
.wordle-phonetic-replay svg { width: 22px; height: 22px; }
.wordle-ipa-slots {
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(var(--wordle-ipa-count), minmax(0, 42px));
  align-items: end;
  justify-content: center;
  gap: clamp(2px, .8vw, 6px);
}
.wordle-ipa-slots > span {
  min-width: 0;
  height: 44px;
  display: grid;
  place-items: center;
  border-bottom: 2px solid #d5dcda;
  color: var(--green);
  font-size: clamp(19px, 3.5dvh, 28px);
  font-weight: 850;
}
.wordle-ipa-slots > span.filled { border-color: var(--green); }
.wordle-english-answer {
  grid-column: 1 / -1;
  grid-row: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-width: 0;
  white-space: nowrap;
  color: var(--green);
}
.wordle-english-phonetic-game .wordle-english-answer > strong,
.wordle-english-phonetic-game .wordle-english-answer .wordle-translation strong {
  font-size: clamp(17px, 3.1dvh, 23px);
  font-weight: 800;
  line-height: 1.2;
}
.wordle-english-phonetic-game .wordle-english-answer > strong { letter-spacing: .05em; }
.wordle-english-phonetic-game .wordle-english-answer .wordle-translation {
  width: auto;
  min-width: 0;
  min-height: 0;
  margin: 0;
  color: var(--muted);
  line-height: 1.2;
  flex: 0 1 auto;
}
.wordle-english-phonetic-game .wordle-english-answer .wordle-translation strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wordle-ipa-bank { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; }
.wordle-ipa-bank .wordle-symbol.ipa {
  width: auto;
  min-width: 45px;
  height: clamp(38px, 5.5dvh, 46px);
  padding: 0 9px;
  font-size: clamp(19px, 3dvh, 24px);
}
.wordle-english-phonetic-area { gap: 8px; }
.wordle-bank-next {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-color: rgba(22,131,95,.28);
  background: #edf8f3;
  color: var(--green);
  font-weight: 850;
}
.wordle-bank-next svg {
  width: 16px;
  height: 16px;
}
.wordle-bank-next:disabled {
  border-color: var(--line);
  background: #f2f4f3;
  color: #9ca5a1;
}
@media (max-height: 700px) {
  .wordle-chinese-phonetic-game { padding-top: 4px; padding-bottom: 6px; }
  .wordle-phonetic-syllable { height: 48px; }
  .wordle-phonetic-bank .wordle-symbol { height: 34px; }
  .wordle-phonetic-mode button { height: 30px; }
}
.wordle-overlay {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 12px;
  background: rgba(23,31,28,.34);
  backdrop-filter: blur(3px);
}
.wordle-modal {
  width: min(430px, 100%);
  max-height: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 16px 45px rgba(24,36,31,.2);
}
.wordle-modal > header {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px 9px 16px;
  border-bottom: 1px solid var(--line);
}
.wordle-modal h3 {
  margin: 0;
  font-size: 21px;
  letter-spacing: -.01em;
}
.wordle-help-copy,
.wordle-detail-body {
  display: grid;
  gap: 14px;
  padding: 17px;
}
.wordle-share-actions {
  display: grid;
  gap: 8px;
  padding: 10px;
}
.wordle-share-actions button {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border: 0;
  border-radius: 7px;
  background: #f5f8f7;
  color: var(--ink);
  font-size: 15px;
  font-weight: 760;
  text-align: left;
}
.wordle-share-actions button:hover {
  background: var(--green-soft);
  color: var(--green);
}
.wordle-share-actions svg {
  width: 19px;
  height: 19px;
  color: var(--green);
}
.wordle-help-copy p,
.wordle-detail-body p {
  margin: 0;
  line-height: 1.55;
}
.wordle-help-copy p {
  color: #34423d;
  font-size: 14px;
}
.wordle-color-help {
  display: grid;
  gap: 8px;
}
.wordle-color-help p {
  display: flex;
  align-items: baseline;
  gap: 9px;
}
.wordle-help-color {
  min-width: 52px;
  font-weight: 850;
}
.wordle-help-color.correct { color: #14835f; }
.wordle-help-color.present { color: #b27b00; }
.wordle-help-color.absent { color: #737b78; }
.wordle-detail-title,
.wordle-example-line {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}
.wordle-detail-title h3 {
  font-size: 24px;
  letter-spacing: .08em;
}
.wordle-detail-title ruby {
  ruby-position: over;
}
.wordle-detail-title rt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .04em;
}
.wordle-speak-button {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid rgba(22,131,95,.24);
  border-radius: 7px;
  background: #edf8f3;
  color: var(--green);
  padding: 0;
}
.wordle-speak-button svg {
  width: 17px;
  height: 17px;
}
.wordle-detail-body section {
  display: grid;
  gap: 5px;
}
.wordle-detail-body small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
}
.wordle-detail-meaning {
  color: var(--ink);
  font-size: 18px;
  font-weight: 750;
}
.wordle-detail-hanja {
  color: var(--green);
  font-size: 22px;
  font-weight: 820;
  letter-spacing: .12em;
}
.wordle-hint-modal header h3 {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.wordle-hint-modal header h3 svg {
  width: 18px;
  height: 18px;
  color: #a17a1d;
}
.wordle-hint-copy {
  color: var(--ink);
  font-size: 17px;
  font-weight: 700;
}
.wordle-example-line {
  justify-content: space-between;
  align-items: flex-start;
}
.wordle-example-line p {
  color: var(--ink);
  font-size: 16px;
  font-weight: 650;
}
.wordle-example-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 7px;
}
.upgrade-modal.upgrade-modal-compact {
  max-width: 460px;
}
.upgrade-modal.upgrade-modal-compact .upgrade-modal-actions {
  margin-top: 4px;
}
.wordle-example-translation {
  color: var(--muted);
  font-size: 13px;
}
.wordle-detail-loading {
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
.wordle-detail-retry {
  border: 1px solid #efc3c8;
  border-radius: 7px;
  background: #fff5f6;
  color: var(--red);
  padding: 10px 12px;
  font-size: 13px;
}
.wordle-key.wide {
  flex: 1.55 1 0;
  font-size: 11px;
}
.wordle-key svg {
  width: 19px;
  height: 19px;
}
.wordle-key.correct {
  background: #16835f;
  color: #fff;
}
.wordle-key.present {
  background: #c49a2f;
  color: #fff;
}
.wordle-key.absent {
  background: #78817e;
  color: #fff;
}
.wordle-key:disabled {
  opacity: 1;
  cursor: default;
}
.chat-comprehension-card {
  display: grid;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.chat-comprehension-card strong {
  display: block;
  font-size: 15px;
  line-height: 1.35;
}
.chat-comprehension-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}
.chat-comprehension-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.chat-comprehension-actions button {
  min-width: 0;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  padding: 9px 12px;
  text-align: center;
}
.chat-comprehension-actions button:hover {
  border-color: var(--green);
  background: #effaf5;
}
.chat-comprehension-actions b {
  display: block;
  font-size: 15px;
  line-height: 1.25;
}
.chat-comprehension-actions span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}
.load-older {
  align-self: center;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}
.load-older:hover {
  background: #f6f8fa;
  color: var(--ink);
}
.empty-state,
.conversation-empty {
  color: var(--muted);
  text-align: center;
}
.empty-state {
  margin: auto;
  padding: 34px 16px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  width: min(380px, 100%);
}
.conversation-empty {
  align-self: center;
  justify-self: center;
  width: min(420px, 100%);
  padding: 24px;
}
.conversation-empty h2 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 24px;
}
.conversation-empty p {
  margin: 0;
  line-height: 1.55;
}
.message {
  width: min(680px, 100%);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  justify-self: flex-start;
}
.message-stack {
  min-width: 0;
}
.message.mine {
  grid-template-columns: minmax(0, 1fr) auto;
  align-self: flex-end;
  justify-self: flex-end;
}
.message.mine .bubble {
  background: #e8f7f0;
  border-color: #cbe9dc;
}
.message.system-message {
  width: min(520px, 100%);
  grid-template-columns: minmax(0, 1fr);
  align-self: center;
  justify-self: center;
}
.message.system-message .bubble {
  border-color: var(--line);
  background: #f1f3f5;
  color: var(--muted);
  text-align: center;
}
.message.system-message .bubble p {
  font-size: 13px;
}
.system-pill {
  display: inline-flex;
  align-items: center;
  vertical-align: baseline;
  min-height: 26px;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 10px;
  margin: 0 2px;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.system-user-pill {
  border-color: rgba(18, 145, 102, .18);
  background: var(--green-soft);
  color: var(--green);
}
.system-event-pill {
  background: #fff;
  color: var(--ink);
}
.system-pill:active {
  transform: translateY(1px);
}
.bubble,
.note {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
}
.bubble {
  background: #fff;
  box-shadow: 0 1px 2px rgba(18, 27, 38, .03);
}
.message.with-notes .bubble {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom-color: transparent;
}
.message.with-notes .note {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}
.message.with-notes .notes .note:not(:first-child) {
  border-top: 0;
  border-radius: 0;
}
.message.with-notes .notes .note:last-child {
  border-bottom-left-radius: var(--radius-sm);
  border-bottom-right-radius: var(--radius-sm);
}
.bubble p,
.note p {
  margin: 0;
  line-height: 1.48;
}
.message-article-card {
  width: 100%;
  display: grid;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}
.bubble.article-share-bubble {
  padding: 10px;
}
.message-article-main {
  width: 100%;
  display: grid;
  gap: 6px;
  padding: 2px 0 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}
.message-article-kicker {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.message-article-card strong {
  color: var(--ink);
  font-size: 17px;
  line-height: 1.35;
}
.message-article-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.message-article-read,
.message-article-forward {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}
.message-article-read {
  border: 1px solid rgba(18, 145, 102, .18);
  background: #fff;
  color: var(--green);
  box-shadow: inset 0 0 0 1px rgba(18, 145, 102, .18);
  text-decoration: none;
}
.message-article-read svg { width: 14px; height: 14px; }
.message-article-read:active,
.message-article-forward:active {
  transform: translateY(1px);
}
.message-article-forward {
  border: 1px solid rgba(18, 145, 102, .18);
  background: rgba(18, 145, 102, .08);
  color: var(--green);
}
.message-article-forward svg {
  width: 14px;
  height: 14px;
}
.shared-forward-preview {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--green-soft);
}
.shared-forward-preview span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}
.shared-forward-preview strong {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.35;
}
.message-article-forward-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.message-article-forward-search {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  margin: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
  color: var(--muted);
}
.message-article-forward-search svg {
  width: 16px;
  height: 16px;
}
.message-article-forward-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
}
.article-share-contact-list.compact {
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
  border-radius: 0;
}
.article-share-contact.compact {
  min-height: 48px;
  padding: 7px 9px;
}
.article-share-contact.compact svg {
  color: var(--muted);
}
.article-share-contact.compact small {
  max-width: 150px;
}
.inline-word-search {
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  padding: 0 1px;
  font: inherit;
  letter-spacing: inherit;
  text-align: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: rgba(25, 145, 101, .16);
}
.inline-word-search:active {
  background: rgba(25, 145, 101, .13);
  color: var(--green);
}
@media (hover: hover) {
  .inline-word-search:hover {
    background: rgba(25, 145, 101, .09);
  }
}

@media (min-width: 801px) {
  .app-shell {
    width: min(1320px, 100%);
  }
  .bottom-tabs {
    display: none;
  }
  .workspace.contacts-workspace,
  .workspace.chat-workspace {
    padding: 14px 18px 18px;
  }
  .chat-layout.desktop-chat {
    height: calc(100dvh - 118px);
    max-height: calc(100dvh - 118px);
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
    border-radius: 10px;
  }
  .chat-layout.desktop-chat .conversation {
    min-height: 0;
    overflow: hidden;
  }
  .chat-layout.desktop-chat .sidebar,
  .chat-layout.desktop-chat.chat-open .sidebar {
    display: block;
    border-right: 1px solid var(--line);
  }
  .chat-layout.desktop-chat .conversation,
  .chat-layout.desktop-chat.contact-open .conversation {
    display: grid;
    grid-template-rows: auto auto auto minmax(0, 1fr);
  }
  .chat-layout.desktop-chat .contact-row.active {
    background: var(--green-soft);
    box-shadow: inset 4px 0 0 rgba(22, 131, 95, .86);
  }
  .chat-layout.desktop-chat .contact-row:hover {
    background: #f5fbf8;
  }
  .chat-layout.desktop-chat .back-button {
    display: none;
  }
  .chat-layout.desktop-chat .conversation-head {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .chat-layout.desktop-chat .message-list {
    padding: 20px 24px 12px;
  }
  .chat-layout.desktop-chat .composer {
    position: static;
    padding: 12px 18px;
    border-bottom: 1px solid rgba(230, 233, 238, .9);
    border-top: 0;
  }
  .chat-layout.desktop-chat .composer .primary {
    min-width: 120px;
  }
}

.bubble > time,
.note span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
}
.note {
  background: var(--note);
  border-color: var(--note-line);
}
.notes {
  display: grid;
  gap: 0;
}
.note-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.note-head span {
  margin: 0 0 6px;
  font-weight: 850;
  text-transform: uppercase;
}
.translation-meta {
  min-width: 0;
}
.translation-meta span,
.translation-meta time {
  display: block;
}
.translation-meta time {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  text-transform: none;
}
.note-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}
.note-action-button {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  color: var(--muted);
}
.note-action-button:hover {
  color: var(--blue);
  background: var(--blue-soft);
}
.pinyin-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  text-transform: lowercase;
  padding: 0;
}
.note-action-button svg {
  width: 15px;
  height: 15px;
}
.pinyin-panel {
  margin-top: 6px;
  border-radius: 5px;
  background: #f6f8fa;
  color: var(--muted);
  padding: 7px 8px;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.bubble .pinyin-panel {
  background: rgba(255, 255, 255, .72);
}
.pinyin-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(21, 25, 30, .26);
}
.pinyin-modal {
  width: min(420px, 100%);
  max-height: min(70dvh, 520px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(16, 24, 40, .18);
}
.pinyin-modal header {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px 10px 16px;
  border-bottom: 1px solid var(--line);
}
.pinyin-modal header strong {
  font-size: 17px;
  font-weight: 850;
}
.pinyin-modal-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.upgrade-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(17, 24, 39, .28);
}
.upgrade-modal {
  width: min(430px, 100%);
  max-height: min(760px, calc(100dvh - 28px));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 22px 58px rgba(16, 24, 40, .2);
  overflow: auto;
}
.upgrade-modal header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--line);
}
.upgrade-modal header p {
  margin: 0 0 4px;
  color: var(--green);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}
.upgrade-modal h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: 0;
}
.upgrade-modal-lead {
  margin: 0;
  padding: 14px 16px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}
.upgrade-compare-table-wrap {
  margin: 0 16px 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.upgrade-compare-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 12px;
  line-height: 1.3;
}
.upgrade-compare-table th,
.upgrade-compare-table td {
  padding: 9px 7px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
  vertical-align: middle;
  overflow-wrap: anywhere;
}
.upgrade-compare-table th:first-child {
  width: 38%;
  text-align: left;
}
.upgrade-compare-table tr:last-child > * {
  border-bottom: 0;
}
.upgrade-compare-table tr > *:last-child {
  border-right: 0;
}
.upgrade-compare-table thead th {
  background: #f8fafc;
  font-size: 13px;
  font-weight: 900;
}
.upgrade-compare-table tbody th {
  color: var(--ink);
  font-weight: 800;
}
.upgrade-compare-table .is-pro {
  background: var(--green-soft);
  color: #08734f;
  font-weight: 800;
}
.upgrade-modal-actions {
  position: sticky;
  bottom: 0;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 10px;
  padding: 14px 16px 16px;
  border-top: 1px solid var(--line);
  background: #fff;
}
.pinyin-reading-block {
  display: grid;
  gap: 8px;
  padding: 18px 16px 20px;
  background: #f6f8fa;
}
.pinyin-reading-block p {
  margin: 0;
  user-select: text;
  -webkit-user-select: text;
}
.pinyin-reading-pronunciation {
  color: var(--muted);
  font-size: 15px;
  font-weight: 750;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.pinyin-reading-original {
  color: var(--ink);
  font-size: 22px;
  font-weight: 750;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.admin-dashboard {
  display: grid;
  gap: 10px;
  padding-bottom: 24px;
}
@media (min-width: 801px) {
  .admin-dashboard {
    width: min(1180px, calc(100vw - 48px));
    margin-inline: auto;
  }
}
.admin-title-row {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.admin-title-row h1 {
  min-width: 0;
}
.admin-refresh-button {
  width: 36px;
  height: 36px;
  min-height: 36px;
}
.admin-refresh-button.is-loading svg {
  animation: spin 0.9s linear infinite;
}
.admin-console-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  -webkit-user-select: text;
  user-select: text;
}
.admin-console-nav {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.admin-console-nav button,
.admin-console-shortcuts button {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 850;
  text-align: left;
  -webkit-user-select: none;
  user-select: none;
}
.admin-console-nav button.active,
.admin-console-nav button:hover,
.admin-console-shortcuts button:hover {
  border-color: rgba(24, 151, 105, 0.22);
  background: #e8f7f0;
  color: #0f7c5b;
}
.admin-console-nav svg,
.admin-console-shortcuts svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}
.admin-console-panel {
  min-width: 0;
}
.admin-console-section {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.admin-console-kicker {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.admin-config-status {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid rgba(24, 151, 105, 0.22);
  border-radius: 12px;
  background: #f2fbf7;
}
.admin-config-status.is-loading {
  border-color: var(--line);
  background: #f8fafc;
}
.admin-config-status.is-error {
  border-color: rgba(197, 48, 76, 0.24);
  background: #fff5f7;
}
.admin-config-status.is-warning {
  border-color: rgba(217, 119, 6, 0.28);
  background: #fffbeb;
}
.admin-config-status strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}
.admin-config-status span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  overflow-wrap: anywhere;
}
.admin-config-status code {
  padding: 7px 8px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.06);
  color: var(--ink);
  font-size: 12px;
  overflow-wrap: anywhere;
  -webkit-user-select: text;
  user-select: text;
}
.admin-copy-field {
  display: block;
  white-space: pre-wrap;
}
.admin-error-detail {
  width: 100%;
}
.admin-console-shortcut-groups {
  display: grid;
  gap: 12px;
}
.admin-console-shortcut-group {
  display: grid;
  gap: 8px;
}
.admin-console-shortcut-group h3 {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}
.admin-console-shortcuts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.admin-console-shortcuts button {
  justify-content: center;
  border-color: var(--line);
  background: #fff;
  text-align: center;
}
.admin-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.admin-stat-card {
  min-width: 0;
  padding: 8px 7px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  text-align: center;
}
.admin-stat-card span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
}
.admin-stat-card strong {
  display: block;
  margin-bottom: 2px;
  font-size: clamp(20px, 7vw, 30px);
  line-height: 1;
  letter-spacing: -.04em;
}
.admin-deepl-card {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid rgba(24, 151, 105, 0.24);
  border-radius: 12px;
  background: #f2fbf7;
}
.admin-deepl-card.is-error {
  border-color: rgba(197, 48, 76, 0.24);
  background: #fff5f7;
}
.admin-deepl-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}
.admin-deepl-head strong {
  color: var(--ink);
  font-size: 14px;
}
.admin-deepl-main {
  color: #10845f;
  font-size: clamp(26px, 8vw, 38px);
  font-weight: 900;
  line-height: 1;
}
.admin-deepl-meter {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(16, 132, 95, 0.14);
}
.admin-deepl-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #189769;
}
.admin-deepl-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}
.admin-openai-total-card { width: 100%; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.admin-openai-total-card:hover { border-color: rgba(24, 151, 105, 0.5); }
.admin-usage-modal-backdrop { position: fixed; inset: 0; z-index: 1700; display: flex; align-items: flex-end; justify-content: center; padding-top: max(18px,env(safe-area-inset-top)); background: rgba(17,28,24,.48); }
.admin-usage-modal { width: min(620px,100%); max-height: min(86dvh,760px); overflow: auto; display: grid; gap: 14px; padding: 16px 16px calc(18px + env(safe-area-inset-bottom)); border-radius: 12px 12px 0 0; background: #fff; box-shadow: 0 -16px 44px rgba(10,25,20,.2); }
.admin-usage-modal > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.admin-usage-modal > header h2,.admin-usage-modal > header p { margin: 0; }
.admin-usage-modal > header h2 { font-size: 20px; }
.admin-usage-modal > header p { margin-top: 3px; color: var(--muted); font-size: 12px; }
.admin-usage-modal > header button { width: 32px; height: 32px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 7px; background: #f1f4f3; color: var(--ink); }
.admin-usage-modal > header button svg { width: 17px; height: 17px; }
.admin-usage-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 8px; background: #eef3f1; }
.admin-usage-tabs button { min-height: 36px; padding: 6px 8px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 800; }
.admin-usage-tabs button.is-active { background: #fff; color: var(--green); box-shadow: 0 1px 4px rgba(20,45,36,.1); }
.admin-usage-chart-area { display: grid; grid-template-columns: minmax(150px,210px) minmax(0,1fr); align-items: center; gap: 20px; }
.admin-usage-pie { width: min(46vw,200px); aspect-ratio: 1; justify-self: center; display: grid; place-items: center; border-radius: 50%; }
.admin-usage-pie > div { width: 54%; aspect-ratio: 1; display: grid; place-content: center; text-align: center; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px rgba(20,50,40,.04); }
.admin-usage-pie strong { font-size: 25px; line-height: 1; }
.admin-usage-pie span { margin-top: 4px; color: var(--muted); font-size: 10px; font-weight: 800; }
.admin-usage-legend { display: grid; gap: 4px; }
.admin-usage-legend > div { display: grid; grid-template-columns: 9px minmax(0,1fr) auto; align-items: center; gap: 8px; min-height: 28px; font-size: 12px; }
.admin-usage-legend i { width: 9px; height: 9px; border-radius: 2px; }
.admin-usage-legend span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.admin-usage-legend strong { font-size: 12px; }
.admin-usage-modal > footer { display: grid; gap: 4px; padding-top: 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; font-weight: 700; }
@media (max-width: 480px) { .admin-usage-chart-area { grid-template-columns: 1fr; gap: 12px; } .admin-usage-pie { width: min(54vw,190px); } }
.admin-config-section {
  display: grid;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.admin-config-section.is-missing {
  border-color: rgba(197, 48, 76, 0.24);
  background: #fff5f7;
}
.admin-config-section code {
  padding: 8px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.05);
  color: var(--ink);
  font-size: 12px;
  overflow-wrap: anywhere;
}
.admin-config-head,
.admin-provider-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.admin-config-head h2,
.admin-config-block h3 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.2;
}
.admin-config-head p,
.admin-config-meta p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}
.admin-config-block {
  display: grid;
  gap: 10px;
}
.admin-feature-categories {
  display: grid;
  gap: 14px;
}
.admin-feature-category {
  display: grid;
  gap: 8px;
}
.admin-feature-category-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 2px 0;
}
.admin-feature-category-head h4 {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}
.admin-feature-category-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}
.admin-config-grid,
.admin-provider-grid {
  display: grid;
  gap: 10px;
}
.admin-config-card,
.admin-provider-card {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
}
.admin-config-meta {
  display: grid;
  gap: 2px;
}
.admin-config-meta strong,
.admin-provider-head strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}
.admin-config-meta span,
.admin-provider-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.admin-feature-rows {
  display: grid;
  gap: 8px;
}
.admin-feature-row {
  display: grid;
  grid-template-columns: minmax(64px, 0.8fr) minmax(92px, 1fr) minmax(118px, 1fr) minmax(70px, 0.7fr) auto;
  gap: 6px;
  align-items: center;
}
.admin-feature-row b {
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}
.admin-feature-row select,
.admin-feature-row input,
.admin-provider-card select,
.admin-provider-card input,
.admin-provider-card textarea {
  width: 100%;
  min-height: 36px;
  padding: 7px 9px;
  border-radius: 8px;
  font-size: 13px;
}
.admin-feature-row button,
.admin-provider-card button {
  min-height: 36px;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 12px;
  -webkit-user-select: none;
  user-select: none;
}
.admin-provider-card label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}
.admin-checkline {
  display: flex !important;
  grid-template-columns: none;
  align-items: center;
  gap: 8px;
}
.admin-checkline input {
  width: 18px;
  min-height: 18px;
}
.admin-secret-pill {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: none !important;
}
.admin-json-field {
  min-height: 88px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  line-height: 1.35;
  resize: vertical;
  -webkit-user-select: text;
  user-select: text;
}
@media (max-width: 620px) {
  .admin-console-shell {
    grid-template-columns: 1fr;
  }
  .admin-console-nav {
    position: static;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
    padding: 6px;
    overflow-x: auto;
  }
  .admin-console-nav button {
    min-height: 46px;
    justify-content: center;
    gap: 4px;
    padding: 7px 6px;
    font-size: 10px;
    text-align: center;
  }
  .admin-console-nav button span {
    display: block;
  }
  .admin-console-shortcuts {
    grid-template-columns: 1fr 1fr;
  }
  .admin-feature-row {
    grid-template-columns: 1fr 1fr;
  }
  .admin-feature-row b {
    grid-column: 1 / -1;
  }
}
.admin-search,
.admin-subscription-form {
  display: grid;
  gap: 10px;
}
.admin-search {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--note);
}
.admin-search label,
.admin-subscription-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.admin-search input,
.admin-subscription-form input,
.admin-subscription-form select {
  font-size: 16px;
}
.admin-generated {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
.admin-user-list {
  display: grid;
  gap: 12px;
}
.admin-user-card,
.admin-empty {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.admin-user-result {
  width: 100%;
  color: var(--ink);
  text-align: left;
}
.admin-user-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.admin-user-head strong,
.admin-user-head small {
  display: block;
}
.admin-user-head strong {
  font-size: 16px;
}
.admin-user-head small {
  margin-top: 3px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.admin-badge {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 11px;
  font-weight: 900;
}
.admin-subscription-status {
  display: grid;
  gap: 4px;
  margin: 12px 0;
  padding: 10px;
  border-radius: 12px;
  background: #f8fafc;
}
.admin-subscription-status.compact {
  margin-bottom: 0;
}
.admin-back-results {
  min-height: 30px;
  justify-self: start;
  margin-top: 8px;
}
.admin-subscription-status span,
.admin-subscription-status small {
  color: var(--muted);
  font-size: 12px;
}
.admin-subscription-status b {
  font-size: 15px;
}
.admin-proxy-login {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.admin-proxy-login span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}
.pending-note {
  color: var(--muted);
  font-style: italic;
}
.message-status {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.message-status.failed {
  color: var(--red);
}
.composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  align-content: start;
  height: auto;
  min-height: 0;
  max-height: max-content;
  padding: 12px 14px;
  border-top: 1px solid rgba(230, 233, 238, .9);
  background: #fff;
  position: sticky;
  bottom: 0;
  z-index: 12;
}
.composer input,
.composer textarea,
.chat-compose-trigger {
  min-height: 44px;
  max-height: 132px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: #fff;
  padding: 11px 14px;
}
.composer textarea {
  width: 100%;
  resize: none;
  overflow-y: auto;
  font: inherit;
  line-height: 1.35;
}
.composer-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  min-width: 0;
}
.composer-row textarea {
  flex: 1 1 auto;
  min-width: 0;
}
.coach-hold-voice-button {
  flex: 0 0 88px;
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 2px;
  padding: 5px 7px;
  font-weight: 800;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.coach-hold-voice-button svg {
  width: 18px;
  height: 18px;
}
.coach-hold-voice-button span {
  max-width: 74px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  line-height: 1.1;
}
.coach-hold-voice-button.is-active {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
  box-shadow: 0 8px 18px rgba(22, 131, 95, .18);
}
.coach-hold-voice-button:disabled {
  background: #f3f5f7;
  border-color: var(--line);
  color: var(--muted);
  box-shadow: none;
}
.coach-hold-voice-button.is-active:disabled {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
.chat-compose-trigger {
  height: 44px;
  max-height: 44px;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  color: var(--muted);
  font-size: 15px;
  text-align: left;
}
.chat-compose-trigger span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-compose-trigger:disabled {
  background: #f3f5f7;
  color: var(--muted);
}
.composer .primary {
  border-radius: 10px;
  padding: 0 14px;
  min-width: 54px;
  background: var(--green);
  box-shadow: 0 8px 18px rgba(22, 131, 95, .18);
}
.composer-note {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.voice-composer {
  grid-template-columns: 1fr;
  gap: 10px;
}
.recording-composer {
  grid-template-columns: minmax(0, 1fr) auto;
}
.chat-compose-view {
  display: grid;
  gap: 16px;
  padding-bottom: 20px;
}
.chat-compose-form {
  display: grid;
  gap: 12px;
}
.chat-compose-form textarea {
  width: 100%;
  min-height: min(45dvh, 360px);
  resize: vertical;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: #fff;
  padding: 14px;
  font: inherit;
  line-height: 1.55;
}
.chat-compose-form .primary {
  min-height: 48px;
  border-radius: 10px;
}
.voice-record-button,
.danger-outline {
  width: 100%;
  min-height: 48px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 800;
}
.voice-record-button {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
  border-radius: 16px;
  box-shadow: 0 8px 18px rgba(22, 131, 95, .18);
  flex-wrap: wrap;
  row-gap: 2px;
  padding: 9px 14px;
}
.voice-record-button:disabled {
  background: #eef1f5;
  border-color: var(--line);
  color: var(--muted);
  box-shadow: none;
}
.voice-record-button small {
  color: rgba(255, 255, 255, .9);
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-basis: 100%;
  line-height: 1.25;
}
.voice-record-button .voice-source-languages {
  color: #111827;
  background: rgba(255, 255, 255, .92);
  border-radius: 999px;
  padding: 1px 7px;
}
.voice-record-button small strong {
  color: #dff7ec;
}
.voice-language-arrow {
  color: rgba(255, 255, 255, .72);
  font-weight: 900;
}
.voice-record-button:disabled small {
  color: var(--muted);
}
.voice-record-button:disabled .voice-source-languages {
  color: var(--muted);
  background: rgba(255, 255, 255, .8);
}
.voice-language-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}
.voice-language-line b {
  color: var(--muted);
}
.voice-language-line strong {
  color: var(--green);
}
.voice-language-line .voice-language-arrow {
  color: var(--muted);
}
.danger-outline {
  color: var(--red);
  border-color: rgba(197, 57, 78, .28);
  background: rgba(197, 57, 78, .06);
}
.recording-status {
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(22, 131, 95, .22);
  background: rgba(22, 131, 95, .08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
}
.recording-status b {
  color: var(--green);
}
.recording-status span,
.voice-preview span,
.voice-error {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.voice-error {
  color: var(--red);
}
.voice-permission-error {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid #fecdd3;
  border-radius: 8px;
  background: #fff1f2;
}
.voice-permission-error span {
  min-width: 0;
}
.voice-permission-error button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 12px;
}
.voice-permission-error button svg {
  width: 15px;
  height: 15px;
}
.voice-preview {
  border: 1px solid var(--line);
  background: #f8fafc;
  border-radius: 14px;
  padding: 12px;
}
.voice-preview small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
.voice-preview p {
  margin: 8px 0;
  font-size: 17px;
  line-height: 1.45;
}
.voice-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}
.voice-actions .secondary,
.voice-actions .primary {
  width: 100%;
  min-height: 44px;
}
.coach-voice-panel,
.coach-voice-detail-card {
  margin: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 12px;
  display: grid;
  gap: 10px;
}
.coach-voice-tips {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  display: grid;
  gap: 10px;
}
.coach-voice-tips h3 {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.25;
}
.coach-voice-tip {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf9;
  padding: 10px;
  display: grid;
  gap: 6px;
}
.coach-voice-tip small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.coach-voice-tip strong {
  color: var(--green);
  font-size: 15px;
  line-height: 1.4;
}
.coach-voice-tip p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.coach-voice-tip .coach-voice-tip-original {
  color: var(--ink);
}
.coach-voice-entry-tips {
  margin-top: 8px;
  display: grid;
  gap: 6px;
}
.coach-voice-entry-tip {
  border: 1px solid #cfe5dc;
  border-radius: 8px;
  background: #f4fbf7;
  padding: 8px 10px;
  display: grid;
  gap: 4px;
}
.coach-voice-entry-tip small {
  color: var(--green);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
  text-transform: uppercase;
}
.coach-voice-entry-tip strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.4;
}
.coach-voice-entry-tip p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.coach-voice-entry-tip.is-ok {
  border-color: #bfe7d7;
  background: #effaf4;
}
.coach-voice-entry-tip.is-ok small {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--green);
  text-transform: none;
}
.coach-voice-entry-tip.is-ok svg {
  width: 14px;
  height: 14px;
  stroke-width: 3;
}
.coach-turn-feedback {
  margin-top: 8px;
  border: 1px solid #cfe5dc;
  border-radius: 8px;
  background: #f4fbf7;
  padding: 8px 10px;
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-size: 13px;
}
.coach-turn-feedback.is-ok {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--green);
  font-weight: 800;
}
.coach-turn-feedback.is-loading {
  display: inline-flex;
  color: var(--muted);
  background: var(--panel);
  border-color: var(--line);
  font-weight: 700;
}
.coach-turn-feedback i {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  stroke-width: 3;
}
.coach-turn-feedback p {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
}
.coach-feedback-mark {
  color: #b42318;
  background: #fff1f2;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  border-radius: 3px;
  padding: 0 2px;
}
.coach-feedback-original {
  color: var(--ink);
}
.coach-feedback-suggestion {
  font-weight: 800;
}
.coach-feedback-suggestion span {
  display: block;
  color: var(--green);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.coach-feedback-explanation {
  color: var(--muted);
}
.coach-voice-panel.compact {
  padding: 8px 12px;
  min-height: 54px;
  align-items: center;
}
.coach-voice-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.coach-voice-head strong {
  display: block;
  font-size: 15px;
}
.coach-voice-head small,
.coach-voice-status,
.coach-voice-empty {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.coach-voice-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.coach-voice-actions.compact-row {
  justify-content: flex-end;
}
.coach-voice-actions .compact {
  width: auto;
  min-height: 38px;
  border-radius: 10px;
  padding: 0 12px;
  white-space: nowrap;
}
.coach-voice-paused {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f4f7f8;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.coach-voice-paused .secondary {
  width: auto;
  min-height: 34px;
  padding: 0 12px;
  white-space: nowrap;
}
.coach-done-speaking-button {
  justify-self: stretch;
  min-height: 42px;
  border: 1px solid rgba(22, 143, 99, 0.28);
  border-radius: 10px;
  background: #e7f6ef;
  color: var(--green);
  font-size: 15px;
  font-weight: 850;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.coach-done-speaking-button svg {
  width: 18px;
  height: 18px;
}
.coach-hold-talk-button {
  justify-self: stretch;
  min-height: 46px;
  border: 1px solid rgba(22, 143, 99, 0.28);
  border-radius: 10px;
  background: #e7f6ef;
  color: var(--green);
  font-size: 15px;
  font-weight: 850;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.coach-hold-talk-button.is-recording {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
  box-shadow: 0 10px 24px rgba(22, 143, 99, 0.18);
}
.coach-hold-talk-button.is-disabled,
.coach-hold-talk-button:disabled {
  border-color: var(--border);
  background: #f3f4f6;
  color: var(--muted);
  box-shadow: none;
  cursor: default;
}
.coach-hold-talk-button svg {
  width: 18px;
  height: 18px;
}
.coach-call-button {
  flex: 0 0 auto;
  color: var(--green);
}
.coach-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.coach-history-button {
  color: var(--muted);
}
.coach-call-button.active {
  color: #be123c;
  background: #fff1f2;
  border-color: #fecdd3;
}
.coach-playback-button {
  color: var(--green);
}
.coach-playback-button.active {
  color: #be123c;
  background: #fff1f2;
  border-color: #fecdd3;
}
.coach-setup-view {
  display: grid;
  gap: 14px;
  padding: 14px;
}
.coach-setup-header {
  display: flex;
  align-items: center;
  gap: 12px;
}
.coach-setup-header h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
}
.coach-setup-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 14px;
  display: grid;
  gap: 12px;
}
.coach-setup-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}
.coach-setup-intro {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}
.coach-setup-intro .user-avatar {
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}
.coach-setup-intro p {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.45;
}
.coach-setup-intro span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}
.user-avatar.amy-avatar {
  border-radius: 14px;
  background: #eef5ff;
}
.user-avatar.amy-avatar img {
  transform: scale(1.72);
  transform-origin: 50% 42%;
}
.coach-setup-card label {
  display: grid;
  gap: 6px;
}
.coach-setup-card label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}
.coach-setup-card input,
.coach-setup-card textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 12px;
  font: inherit;
  font-weight: 700;
  background: #fff;
}
.coach-setup-card textarea {
  resize: vertical;
  min-height: 96px;
}
.coach-setup-loading {
  min-height: 210px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  background: #f8fafc;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  text-align: center;
  color: var(--muted);
  padding: 18px;
}
.coach-setup-loading i {
  width: 30px;
  height: 30px;
  color: var(--green);
}
.coach-setup-loading strong {
  color: var(--ink);
  font-size: 18px;
}
.coach-setup-loading span {
  font-size: 13px;
  line-height: 1.5;
}
.coach-setup-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.coach-setup-actions button {
  min-height: 44px;
}
.coach-call-screen {
  display: grid;
  gap: 12px;
  padding: 14px;
}
.coach-call-head {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 10px;
}
.coach-call-head h2 {
  margin: 0;
  font-size: 17px;
  line-height: 1.25;
}
.coach-call-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.coach-call-recording {
  margin: 0;
}
.coach-call-live {
  min-height: 48vh;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 12px;
  display: grid;
  align-content: start;
  gap: 10px;
}
.coach-voice-live {
  display: grid;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
}
.coach-voice-line {
  border-radius: 10px;
  padding: 10px;
  background: #f6f8fb;
}
.coach-voice-line.user {
  background: rgba(22, 131, 95, .1);
}
.coach-voice-line.is-playing {
  background: #dbeafe;
  color: #1d4ed8;
  box-shadow: inset 0 -2px 0 #7aa7f7;
}
.coach-voice-line.is-playing.user {
  background: #dbeafe;
}
.coach-voice-line strong {
  display: block;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}
.coach-voice-line p {
  margin: 4px 0 0;
  line-height: 1.4;
}
.coach-voice-text-row,
.coach-voice-translation-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
}
.coach-voice-tools {
  display: inline-flex;
  gap: 6px;
}
.coach-voice-tools .note-action-button {
  width: 34px;
  height: 34px;
  min-width: 34px;
}
.coach-voice-line small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.35;
}
.coach-voice-cards {
  display: grid;
  gap: 8px;
}
.coach-voice-card {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
  padding: 10px 12px;
  text-align: left;
}
.coach-voice-card span {
  display: block;
  color: var(--ink);
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.coach-voice-card small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.coach-session-message {
  justify-content: center;
  padding-inline: 14px;
}
.coach-voice-chat-card {
  width: min(100%, 520px);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 12px 14px;
  text-align: left;
  display: grid;
  gap: 4px;
  box-shadow: 0 6px 18px rgba(18, 24, 38, .06);
}
.coach-voice-chat-card strong {
  color: var(--ink);
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.coach-voice-chat-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.coach-voice-chat-card span {
  color: var(--brand);
  font-size: 13px;
  font-weight: 900;
}
.coach-voice-detail {
  display: grid;
  gap: 12px;
}
.coach-voice-history-view .coach-voice-cards {
  padding: 0 14px 18px;
}

@media (max-width: 800px) {
  .app-shell { border: 0; }
  .app-header {
    grid-template-columns: 1fr auto;
    min-height: 64px;
    padding: 10px 16px;
    gap: 10px;
  }
  .global-search-bar { min-height: 48px; gap: 7px; padding: 6px 12px; }
  .global-search-submit { min-width: 76px; padding-inline: 10px; }
  .header-spacer {
    display: none;
  }
  .brand-mark {
    width: 34px;
    height: 34px;
  }
  .brand-word {
    font-size: 22px;
  }
  .language-control {
    order: 3;
    grid-column: 1 / -1;
  }
  .chat-language-control {
    order: 0;
    grid-column: auto;
    justify-content: flex-end;
  }
  .chat-language-control label {
    display: none;
  }
  .chat-language-control select {
    width: 116px;
    max-width: 30vw;
    padding-inline: 9px 28px;
  }
  .chat-comprehension-card {
    padding: 12px 14px;
  }
  .chat-comprehension-actions {
    gap: 8px;
  }
  .chat-comprehension-actions button {
    min-height: 42px;
    padding: 9px 10px;
  }
  .account-menu {
    max-width: 44vw;
  }
  .header-account-actions { gap:6px; }
  .header-learning-language { width:38px; min-width:38px; height:36px; padding:0 4px; border-radius:8px; font-size:10px; }
  .header-learning-language-menu { width:min(220px,calc(100vw - 24px)); max-height:65vh; }
  .account-trigger {
    width: 50px;
    min-width: 50px;
    height: 36px;
    max-width: 50px;
    gap: 7px;
    padding: 0 7px 0 10px;
    font-size: 13px;
  }
  .account-trigger span {
    display: block;
    max-width: 32vw;
  }
  .account-trigger svg {
    width: 15px;
    height: 15px;
  }
  .account-popover {
    top: calc(100% + 10px);
    width: max-content;
    min-width: 190px;
    max-width: calc(100vw - 36px);
  }
  .account-menu-item {
    min-height: 40px;
    padding: 0 14px;
    font-size: 13px;
  }
  .workspace { padding: 14px; }
  .workspace.chat-workspace {
    padding: 0;
  }
  .workspace.contacts-workspace {
    padding: 0;
  }
  .workspace.profile-workspace {
    padding: 14px;
  }
  .admin-stat-card {
    padding: 7px 5px;
  }
  .add-friend-actions {
    justify-content: stretch;
  }
  .add-friend-actions .primary,
  .add-friend-actions .secondary {
    flex: 1 1 160px;
    justify-content: center;
  }
  .friend-qr-card {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
  .friend-qr-card img {
    width: 180px;
    height: 180px;
  }
  .friend-info-actions {
    justify-content: stretch;
  }
  .friend-info-actions .primary,
  .friend-info-actions .secondary {
    flex: 1 1 180px;
    justify-content: center;
  }
  .discover-filters {
    grid-template-columns: 1fr;
  }
  .discover-row {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .discover-languages,
  .discover-add-button {
    grid-column: 1 / -1;
  }
  .discover-add-button {
    width: 100%;
    justify-content: center;
  }
  .workspace.moments-workspace {
    padding: 0;
  }
  .guidance-card {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    margin: 0 0 12px;
  }
  .guidance-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  .setup-panel {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
    margin: 0 0 12px;
    padding: 12px 14px;
    border-inline: 0;
    border-radius: 0;
  }
  .setup-panel h2 {
    font-size: 18px;
  }
  .setup-form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .setup-field select,
  .setup-form .primary {
    width: 100%;
    max-width: none;
  }
  .pro-banner {
    margin: 0;
    border-inline: 0;
    border-radius: 0;
    align-items: stretch;
    flex-direction: column;
  }
  .pro-banner .primary {
    justify-content: center;
  }
  .moments-view {
    border-inline: 0;
    border-radius: 0;
  }
  .events-view,
  .event-edit-view {
    border-inline: 0;
    border-radius: 0;
  }
  .moment-feed {
    padding: 10px;
  }
  .event-feed,
  .event-form {
    padding: 10px;
  }
  .event-card-head {
    grid-template-columns: 1fr;
  }
  .event-meta-pill {
    justify-self: start;
  }
  .event-form-row {
    grid-template-columns: 1fr;
  }
  .event-time-combo {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .event-timezone-inline {
    max-width: 100%;
  }
  .event-join-button,
  .event-form .primary {
    width: 100%;
  }
  .chat-layout {
    height: calc(100dvh - 126px);
    min-height: 420px;
    border-radius: 0;
    border-inline: 0;
  }
  .chat-workspace .chat-layout {
    height: auto;
    min-height: 0;
  }
  .contacts-workspace .chat-layout {
    height: auto;
    min-height: 0;
  }
  .sidebar {
    border: 0;
  }
  .contact-row {
    border-right: 0;
    min-height: 70px;
    padding: 13px 16px;
  }
  .contact-row:hover,
  .contact-row.active {
    background: #fff;
  }
  .contact-row.active {
    box-shadow: none;
  }
  .contact-row.self {
    box-shadow: inset 3px 0 0 var(--green);
  }
  .conversation-head {
    min-height: 64px;
    padding: 10px 12px;
    gap: 10px;
    top: 0;
  }
  .conversation {
    grid-template-rows: auto auto auto minmax(0, 1fr);
  }
  .conversation .composer {
    grid-row: 3;
    position: relative;
    bottom: auto;
    z-index: 11;
    border-top: 0;
    border-bottom: 1px solid var(--line);
    box-shadow: none;
    background: #fff;
  }
  .conversation .message-list {
    grid-row: 4;
    padding-bottom: 18px;
  }
  .conversation .wordle-message-list {
    padding: 0;
  }
  .wordle-game {
    padding: 7px 8px 9px;
  }
  .wordle-translation strong {
    font-size: 10px;
  }
  .wordle-keyboard {
    gap: 3px;
  }
  .wordle-keyboard-row {
    gap: 3px;
  }
  .wordle-key {
    height: 44px;
    font-size: 12px;
  }
  .wordle-key.wide {
    font-size: 10px;
  }
  .conversation-head h2 {
    font-size: 18px;
  }
  .conversation-head .secondary span {
    display: none;
  }
  .message,
  .message.mine {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .message.mine {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .message.mine .bubble,
  .message.mine .notes {
    grid-column: auto;
    grid-row: auto;
  }
  .composer {
    grid-template-columns: minmax(0, 1fr);
    grid-auto-rows: auto;
    align-content: start;
    padding: 10px 12px max(10px, env(safe-area-inset-bottom));
  }
  .composer .primary {
    width: auto;
    min-width: 48px;
    height: 44px;
    min-height: 44px;
    max-height: 44px;
    padding: 0 13px;
  }
  .composer .primary span {
    display: none;
  }
  .app-shell.chat-composer-open .composer {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    z-index: 11;
    height: auto;
    min-height: 0;
    max-height: calc(110px + env(safe-area-inset-bottom));
    padding: 10px 12px max(10px, env(safe-area-inset-bottom));
    border-top: 0;
    border-bottom: 1px solid var(--line);
    box-shadow: none;
  }
  .app-shell.chat-composer-open .message-list {
    padding-bottom: 18px;
  }
  .app-shell.keyboard-open .bottom-tabs {
    display: none;
  }
}

/* Keep the signed-out discovery header aligned with the signed-in mobile shell.
   These overrides intentionally follow the general mobile header rules. */
@media (min-width: 801px) {
  .app-header.public-app-header {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .public-app-header .app-menu { flex: 1 1 auto; }
  .public-app-header .header-spacer { display: none; }
  .public-app-header .public-login-button { width: auto; margin: 0; }
}
@media (max-width: 800px) {
  .public-app-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
  }
  .public-app-header .app-menu,
  .public-app-header .logo-lockup.compact {
    min-width: 0;
  }
  .public-app-header .app-menu {
    flex: 1 1 auto;
  }
  .public-app-header .header-spacer {
    display: none;
  }
  .public-app-header .public-login-button {
    flex: 0 0 auto;
    width: auto;
    min-width: 54px;
    margin: 0;
    padding-inline: 8px;
  }
  .public-app-header .public-game-button { display:none; }
}

.listening-browser-translation {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 11px 12px;
  border: 1px solid #cfe4da;
  border-radius: 9px;
  background: #f3faf7;
}
.listening-browser-translation > svg { width: 20px; height: 20px; color: var(--green); }
.listening-browser-translation > div { min-width: 0; display: grid; gap: 3px; }
.listening-browser-translation strong { color: var(--ink); font-size: 12px; line-height: 1.35; }
.listening-browser-translation small { color: var(--muted); font-size: 10px; line-height: 1.35; }
.listening-browser-translation button { min-height: 34px; white-space: nowrap; }
.listening-browser-translation.is-unsupported { border-color: var(--line); background: #f8f9fa; }
.listening-browser-translation.is-unsupported > svg { color: var(--muted); }
.listening-browser-translation-progress { display: block; width: 100%; height: 3px; overflow: hidden; border-radius: 2px; background: #dfe9e5; }
.listening-browser-translation-progress i { display: block; height: 100%; border-radius: inherit; background: var(--green); transition: width .2s ease; }
.listening-detail-primary-column { min-width: 0; display: grid; gap: 12px; }
.listening-detail-notices { display: grid; gap: 12px; }
.listening-detail-notices:empty { display: none; }

@media (max-width: 899px) {
  .listening-detail-desktop-grid { display: block; }
  .listening-detail-secondary-column { display: contents; }
  .listening-detail-desktop-grid .listening-discover-content-panel:not(.is-active) { display: none; }
  .listening-browser-translation { grid-template-columns: 24px minmax(0, 1fr); }
  .listening-browser-translation button { grid-column: 2; width: fit-content; }
}

@media (min-width: 900px) {
  .workspace.profile-workspace:has(.has-video-desktop-layout) { overflow: hidden; }
  .workspace.profile-workspace:has(.has-video-desktop-layout) > .listening-detail-view {
    flex: 1 1 auto;
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }
  .listening-detail-view > .has-video-detail { height: 100%; min-height: 0; overflow: hidden; }
  .listening-view.listening-detail-view { width: min(1180px, 100%); }
  .listening-detail-primary-column.has-video-desktop-layout {
    height: 100%;
    max-height: 100%;
    min-height: 0;
    grid-template-columns: minmax(0, 1.12fr) minmax(360px, .88fr);
    grid-template-rows: auto minmax(0, 1fr);
    grid-template-areas:
      "player transcript"
      "notices transcript";
    align-items: start;
    column-gap: 16px;
  }
  .listening-detail-primary-column.has-video-desktop-layout > .listening-sticky-player {
    grid-area: player;
    top: 10px;
  }
  .listening-detail-primary-column.has-video-desktop-layout > .listening-detail-notices { grid-area: notices; }
  .listening-detail-primary-column.has-video-desktop-layout > .listening-transcript {
    grid-area: transcript;
    align-content: start;
    height: 100%;
    min-height: 0;
    padding-right: 5px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
  }
  .listening-detail-desktop-grid.has-video-detail { display: block; }
  .listening-detail-desktop-grid.has-video-detail > .listening-detail-secondary-column {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 16px;
    max-height: none;
    overflow: visible;
  }
  .listening-detail-desktop-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.75fr) minmax(290px, .85fr);
    align-items: start;
    gap: 16px;
  }
  .listening-detail-secondary-column {
    position: sticky;
    top: 10px;
    display: grid;
    gap: 12px;
    min-width: 0;
    max-height: calc(100dvh - 150px);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
  }
  .listening-detail-desktop-grid .listening-discover-tabs { display: none; }
  .listening-detail-desktop-grid .listening-discover-content-panel { display: grid; }
  .listening-detail-secondary-column .listening-discover-panel-list { max-height: none; overflow: visible; }
  .listening-detail-secondary-column .listening-discover-panel { min-height: 0; }
}

@media (max-width: 360px) {
  .public-app-header .brand-word { font-size: 19px; }
  .public-app-header .public-login-button { min-width: 48px; padding-inline: 6px; }
}
