/* ==========================================================
   themes/line.css — 界面风格「明快」：浅蓝灰聊天底（顶栏与它同色）、淡绿自己气泡（黑字）、大圆角 + 首条小尾巴、
   白色输入栏（左加号、表情、右绿色发送）、绿色未读角标；已读显示成文字（status.read，跟语言走）放在气泡外侧，时间也在外侧
   只覆盖 token 与少量组件规则；对照与取色说明见 docs/skins.md
   ========================================================== */

/* —— 浅色 —— */
html[data-skin="line"] {
  --accent: #03893b;                 /* 文字 / 按钮用深一档绿（白字 4.5:1）；品牌绿 #06c755 只给角标 */
  --on-accent: #ffffff;
  --bubble-radius: 16px;
  --item-avatar: 48px;
  --bg: #ffffff;
  --bg-soft: #f5f6f8;
  --bg-hover: #f2f3f5;
  --chat-bg: #8cabd9;
  --text: #111111;
  --text-2: #6b7280;
  --text-3: #949ba5;
  --border: #eceef1;
  --border-strong: #d3d7dd;
  --bubble-in: #ffffff;
  --bubble-out: #9de693;             /* 现行 Android 版（iOS #79e278）；黑字 12.7:1 */
  --bubble-out-text: #111111;
  --bubble-out-meta: rgba(0, 0, 0, .5);
  --bubble-out-quote: rgba(0, 0, 0, .07);
  --bubble-out-line: #1f6b1c;
  --outside-meta: #1f2d40;           /* 气泡外的时间 / 已读：在 #8cabd9 上 7:1 */
  --sys-bg: rgba(31, 45, 64, .35);
  --head-bg: #8cabd9;                /* 顶栏与聊天底同色 */
  --head-fg: #111111;
  --head-fg-2: #1f2d40;
  --head-accent: #1f2d40;
  --head-border: transparent;
  --list-sep: transparent;
  --item-active-bg: #f2f3f5;
  --item-active-fg: #111111;
  --item-active-fg-2: #6b7280;
  --badge-bg: #06c755;
  --badge-fg: #0b1a10;
  --composer-bg: #ffffff;
  --composer-input-bg: #f2f3f5;
  --composer-input-radius: 20px;
  --composer-btn-bg: transparent;
  --send-bg: transparent;
  --send-fg: #04a447;                /* 绿色图标（3.3:1） */
  --tail-w: 7px; --tail-h: 10px; --tail-top: 0;
  --tail-out: polygon(0 0, 100% 0, 0 100%);
  --tail-in: polygon(0 0, 100% 0, 100% 100%);
}

/* —— 深色（手动 / 跟随系统） —— */
html[data-skin="line"][data-theme="dark"] {
  --accent: #06c755;
  --on-accent: #0b1a10;
  --bg: #111111;
  --bg-soft: #1c1c1e;
  --bg-hover: #222326;
  --chat-bg: #262626;
  --text: #e9e9eb;
  --text-2: #9a9da4;
  --text-3: #6e727a;
  --border: #26282c;
  --border-strong: #3a3d42;
  --bubble-in: #343a45;
  --bubble-out: #5cb85c;             /* 深色气泡没找到实拍：淡绿压暗一档，黑字 7.2:1 */
  --bubble-out-text: #0b1a10;
  --bubble-out-meta: rgba(0, 0, 0, .55);
  --bubble-out-quote: rgba(0, 0, 0, .12);
  --bubble-out-line: #0b4d24;
  --outside-meta: #a9b3c2;
  --sys-bg: rgba(255, 255, 255, .1);
  --head-bg: #262626;                /* 与深色聊天底同色 */
  --head-fg: #e9e9eb;
  --head-fg-2: #9a9da4;
  --head-accent: #06c755;
  --head-border: transparent;
  --item-active-bg: #222326;
  --item-active-fg: #e9e9eb;
  --item-active-fg-2: #9a9da4;
  --composer-bg: #111111;
  --composer-input-bg: #222326;
  --send-fg: #06c755;
}
@media (prefers-color-scheme: dark) {
  html[data-skin="line"][data-theme="system"] {
    --accent: #06c755;
    --on-accent: #0b1a10;
    --bg: #111111;
    --bg-soft: #1c1c1e;
    --bg-hover: #222326;
    --chat-bg: #262626;
    --text: #e9e9eb;
    --text-2: #9a9da4;
    --text-3: #6e727a;
    --border: #26282c;
    --border-strong: #3a3d42;
    --bubble-in: #343a45;
    --bubble-out: #5cb85c;
    --bubble-out-text: #0b1a10;
    --bubble-out-meta: rgba(0, 0, 0, .55);
    --bubble-out-quote: rgba(0, 0, 0, .12);
    --bubble-out-line: #0b4d24;
    --outside-meta: #a9b3c2;
    --sys-bg: rgba(255, 255, 255, .1);
    --head-bg: #262626;
    --head-fg: #e9e9eb;
    --head-fg-2: #9a9da4;
    --head-accent: #06c755;
    --head-border: transparent;
    --item-active-bg: #222326;
    --item-active-fg: #e9e9eb;
    --item-active-fg-2: #9a9da4;
    --composer-bg: #111111;
    --composer-input-bg: #222326;
    --send-fg: #06c755;
  }
}

/* —— 组件 —— */
html[data-skin="line"] .msg .bubble { border-radius: var(--bubble-radius); }
html[data-skin="line"]:not([data-layout="list"]) .msg.out:not(.cont) .bubble:not(.media) { border-top-right-radius: 4px; }
html[data-skin="line"]:not([data-layout="list"]) .msg.in:not(.cont) .bubble:not(.media) { border-top-left-radius: 4px; }
html[data-skin="line"] :is(.date-sep, .sys-msg) span { color: #fff; }
/* 时间与已读放到气泡外侧底部（已读在上、时间在下）；图片 / 带说明的媒体仍在图上 */
html[data-skin="line"]:not([data-layout="list"]) .bubble > .meta:not(.overlay) {
  position: absolute; bottom: 0; float: none; margin: 0;
  flex-direction: column-reverse; align-items: flex-end; gap: 0;
  font-size: 11px; line-height: 1.25; white-space: nowrap;
  color: var(--outside-meta);
}
html[data-skin="line"]:not([data-layout="list"]) .msg.out .bubble > .meta:not(.overlay) { right: calc(100% + 6px); }
html[data-skin="line"]:not([data-layout="list"]) .msg.in .bubble > .meta:not(.overlay) { left: calc(100% + 6px); align-items: flex-start; }
/* 已读 = 文字（aria-label 已按语言翻好）；送达的单勾不显示；发送中的时钟保留 */
html[data-skin="line"] .meta .ti-checks { color: var(--outside-meta); }
html[data-skin="line"] .meta .ti-checks::before { content: attr(aria-label); font-family: var(--font-lang), var(--font); font-size: 11px; font-weight: 500; }
html[data-skin="line"] .meta .ti-check { display: none; }
html[data-skin="line"] .meta.overlay .ti-checks::before { font-size: 11px; }
/* 输入栏：白底整条；加号在左（回形针换成加号）、表情在框内、发送 / 麦克风是绿色图标 */
html[data-skin="line"] .composer { padding-top: 8px; align-items: center; }
html[data-skin="line"] .composer-input { min-height: 40px; }
html[data-skin="line"] .composer-input textarea { height: 40px; padding: 9px 0; }
html[data-skin="line"] .composer-input .icon-btn { margin-bottom: 0; }
html[data-skin="line"] #attachBtn { width: 40px; height: 40px; }
html[data-skin="line"] #attachBtn .ti::before { content: "\eb0b"; }            /* 加号（ti-plus） */
html[data-skin="line"] .send-btn { width: 40px; height: 40px; }
html[data-skin="line"] .send-btn .ti { font-size: 24px; }

/* 设置页缩略 */
.skin-sw[data-sw="line"] { --sw-bg: #8cabd9; --sw-in: #ffffff; --sw-out: #9de693; --sw-r: 8px; }
