/* XYY member center — light-orange theme v2 */
:root {
  --mo-50: #fff7ed;
  --mo-100: #ffedd5;
  --mo-200: #fed7aa;
  --mo-300: #fdba74;
  --mo-400: #fb923c;
  --mo-500: #f97316;
  --mo-600: #ea580c;
  --mo-700: #c2410c;
  --ink: #42281a;
  --ink-2: #6f5844;
  --ink-3: #a68a70;
  --line: #ffe4cc;
  --card: #ffffff;
  --shadow-sm: 0 2px 10px rgba(234, 88, 12, .06);
  --shadow-md: 0 10px 30px rgba(234, 88, 12, .12);
  --shadow-lg: 0 18px 44px rgba(234, 88, 12, .16);
}

body {
  background:
    radial-gradient(900px 320px at 85% -80px, rgba(251, 146, 60, .16), transparent 70%),
    radial-gradient(700px 300px at -8% 220px, rgba(251, 146, 60, .10), transparent 70%),
    linear-gradient(180deg, #fff4e6 0%, #fffaf4 340px, #fffaf4 100%);
  background-attachment: fixed;
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.member-main { flex: 1 0 auto; max-width: 1020px; width: 100%; box-sizing: border-box; margin: 30px auto 70px; padding: 0 18px; }

/* ---------------------------------------------------------------- header */
.nav {
  background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 3px 16px rgba(234, 88, 12, .07);
}
.nav-inner { max-width: 1020px; margin: 0 auto; padding: 10px 18px; display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.nav nav { flex: 1; }
.nav .brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; font-size: 19px; color: var(--ink); letter-spacing: .5px; }
.nav .brand::before {
  content: 'X'; display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 9px; color: #fff; font-size: 16px; font-weight: 800;
  background: linear-gradient(135deg, #ffb066, var(--mo-500) 60%, var(--mo-600));
  box-shadow: 0 4px 10px rgba(249, 115, 22, .35);
}
.nav .brand span { color: var(--mo-500); font-weight: 700; }
.nav nav { display: flex; gap: 6px; align-items: center; }
.nav nav a { color: var(--ink-3); font-size: 14px; padding: 7px 14px; border-radius: 999px; transition: all .15s; }
.nav nav a:hover { color: var(--mo-500); background: var(--mo-50); }
.nav nav a.active { color: var(--mo-700); background: var(--mo-100); font-weight: 600; box-shadow: inset 0 0 0 1px var(--mo-200); }
.nav-user { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-2); background: #fff; border: 1px solid var(--mo-200); border-radius: 999px; padding: 4px 13px 4px 5px; box-shadow: var(--shadow-sm); }
.nav-user .avatar {
  display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px;
  border-radius: 50%; background: linear-gradient(135deg, #ffb066, var(--mo-500)); color: #fff; font-size: 13px; font-weight: 700;
}
.nav-user a { color: var(--mo-600); font-weight: 600; }

/* page title band */
.page-head { display: flex; align-items: center; gap: 14px; margin: 4px 0 18px; }
.page-head h1 { position: relative; font-size: 23px; color: var(--ink); margin: 0; padding-left: 14px; font-weight: 800; }
.page-head h1::before {
  content: ''; position: absolute; left: 0; top: 3px; bottom: 3px; width: 5px;
  border-radius: 3px; background: linear-gradient(180deg, #ffb066, var(--mo-500));
}
.page-head .back { margin-left: auto; font-size: 13px; color: var(--ink-3); text-decoration: none; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; transition: all .15s; }
.page-head .back:hover { color: var(--mo-600); border-color: var(--mo-300); box-shadow: var(--shadow-sm); }

/* ------------------------------------------------------------- hero band */
.hero-band {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  background: linear-gradient(120deg, #ff9f4d 0%, var(--mo-500) 55%, var(--mo-600) 100%);
  border-radius: 18px; padding: 22px 26px; color: #fff; margin-bottom: 22px;
  box-shadow: var(--shadow-lg); position: relative; overflow: hidden;
}
.hero-band::after {
  content: ''; position: absolute; right: -40px; top: -60px; width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .22), transparent 65%);
}
.hero-band .hb-hi { font-size: 20px; font-weight: 800; letter-spacing: .3px; }
.hero-band .hb-sub { font-size: 13.5px; opacity: .92; margin-top: 5px; }
.hero-band .hb-cta {
  margin-left: auto; position: relative; z-index: 1;
  background: #fff; color: var(--mo-700); font-weight: 700; border: none;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .12);
}
.hero-band .hb-cta:hover { color: var(--mo-600); transform: translateY(-1px); }

/* ----------------------------------------------------------------- login */
.auth-card {
  position: relative; overflow: hidden;
  max-width: 480px; margin: 34px auto 70px; background: #fff; border: 1px solid var(--line); border-radius: 20px;
  padding: 34px 38px 30px; box-shadow: var(--shadow-lg);
}
.auth-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 6px;
  background: linear-gradient(90deg, #ffb066, var(--mo-500), #ffb066);
}
.auth-card::after {
  content: ''; position: absolute; right: -46px; top: -46px; width: 150px; height: 150px; border-radius: 50%;
  background: radial-gradient(circle, rgba(249, 115, 22, .10), transparent 70%);
}
.auth-card h1 { font-size: 23px; margin: 0 0 6px; color: var(--ink); font-weight: 800; }
.auth-card > .dim { line-height: 1.7; }
.auth-form label { display: block; font-size: 13px; color: var(--ink-2); margin: 15px 0 0; font-weight: 600; }
.auth-form input {
  width: 100%; margin-top: 6px; padding: 11px 13px; font-size: 14px;
  border: 1px solid var(--mo-200); border-radius: 11px; background: #fffdf9; box-sizing: border-box; color: var(--ink);
  transition: all .15s;
}
.auth-form input:focus { outline: none; border-color: var(--mo-500); box-shadow: 0 0 0 3px rgba(249, 115, 22, .16); background: #fff; }
.auth-form .btn.wide { width: 100%; margin-top: 18px; padding: 11px; font-size: 15px; }
.code-row { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.code-row .btn { white-space: nowrap; }

.tabs { display: flex; gap: 4px; background: var(--mo-50); border: 1px solid var(--mo-100); border-radius: 13px; padding: 4px; margin-top: 18px; position: relative; z-index: 1; }
.tab { flex: 1; text-align: center; padding: 8px 6px; font-size: 13px; color: var(--ink-3); text-decoration: none; border-radius: 10px; transition: all .15s; }
.tab:hover { color: var(--mo-500); }
.tab.active { color: var(--mo-700); background: #fff; font-weight: 700; box-shadow: 0 3px 10px rgba(249, 115, 22, .18); }

.wechat-box { text-align: center; padding: 24px 0 8px; position: relative; z-index: 1; }
.wechat-box .wx-ico {
  display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px;
  border-radius: 20px; background: linear-gradient(135deg, #4ade80, #22c55e); color: #fff; font-size: 34px;
  box-shadow: 0 10px 22px rgba(34, 197, 94, .3); margin-bottom: 6px;
}
.wechat-box .btn { margin: 14px 0 6px; width: 100%; }

/* ----------------------------------------------------------------- cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 15px; margin-bottom: 26px; }
.card {
  position: relative; overflow: hidden; background: var(--card); border: 1px solid var(--line); border-radius: 15px; padding: 18px 20px;
  box-shadow: var(--shadow-sm); transition: transform .18s, box-shadow .18s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card::before {
  position: absolute; right: 14px; top: 14px; width: 40px; height: 40px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; font-size: 19px;
  background: var(--mo-50); border: 1px solid var(--mo-100);
}
.cards .card:nth-child(1)::before { content: '🎫'; background: linear-gradient(135deg, #fff3e6, #ffe1c2); }
.cards .card:nth-child(2)::before { content: '💰'; background: linear-gradient(135deg, #fefce8, #fde9a8); border-color: #fde68a; }
.cards .card:nth-child(3)::before { content: '📉'; background: linear-gradient(135deg, #fff1f0, #ffd9d3); border-color: #fecaca; }
.cards .card:nth-child(4)::before { content: '⚡'; background: linear-gradient(135deg, #fff7e0, #ffe9ad); border-color: #fde68a; }
.card .k { font-size: 13px; color: var(--ink-3); font-weight: 500; }
.card .v { font-size: 22px; font-weight: 800; color: var(--ink); margin: 7px 0 11px; }
.card .v em { font-style: normal; color: var(--mo-600); }
.card .btn { padding: 6px 14px; font-size: 13px; }

/* section titles */
.member-main .sec {
  display: flex; align-items: center; gap: 9px; font-size: 16.5px; color: var(--ink); margin: 30px 0 12px; font-weight: 800;
}
.member-main .sec::before { content: ''; flex: none; width: 5px; height: 16px; border-radius: 3px; background: linear-gradient(180deg, #ffb066, var(--mo-500)); }
.member-main .sec::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--mo-200), transparent); }

/* tables */
.member-main table { width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.member-main th, .member-main td { text-align: left; padding: 12px 15px; font-size: 14px; border-bottom: 1px solid #fdf0e3; color: var(--ink-2); }
.member-main tbody tr:last-child td { border-bottom: none; }
.member-main tbody tr { transition: background .12s; }
.member-main tbody tr:hover { background: #fffaf2; }
.member-main th { color: var(--ink-3); font-weight: 600; width: 140px; background: linear-gradient(180deg, #fff7ec, #fff1e0); font-size: 13px; }
.member-main table thead th { width: auto; background: linear-gradient(180deg, #fff7ec, #ffedda); color: var(--ink-2); font-weight: 700; letter-spacing: .4px; }

.panel { background: #fff; border: 1px solid var(--line); border-radius: 15px; padding: 18px 20px; box-shadow: var(--shadow-sm); }
.bind-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 11px 0; border-bottom: 1px dashed var(--mo-100); }
.bind-form:last-child { border-bottom: none; }
.bind-form label { font-size: 13px; color: var(--ink-2); display: flex; align-items: center; gap: 6px; font-weight: 600; }
.bind-form input { padding: 9px 11px; border: 1px solid var(--mo-200); border-radius: 10px; font-size: 14px; width: 210px; background: #fffdf9; transition: all .15s; }
.bind-form input:focus { outline: none; border-color: var(--mo-500); box-shadow: 0 0 0 3px rgba(249, 115, 22, .14); }
.bind-form span { font-size: 14px; color: var(--ink); }

/* ----------------------------------------------------------------- plans */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.plan-card {
  position: relative; background: #fff; border: 1px solid var(--line); border-radius: 17px; padding: 26px 22px; text-align: center;
  box-shadow: var(--shadow-sm); transition: transform .18s, box-shadow .18s, border-color .18s;
}
.plan-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--mo-300); }
.plan-card .p-name { font-size: 16.5px; font-weight: 800; color: var(--ink); }
.plan-card .p-price { font-size: 30px; font-weight: 800; color: var(--mo-600); margin: 12px 0 4px; }
.plan-card .p-price span { font-size: 13px; color: var(--ink-3); font-weight: 500; }
.plan-card .p-cap { font-size: 13px; color: var(--ink-3); margin-bottom: 16px; line-height: 1.7; }
.plan-card .btn { width: 100%; padding: 10px; font-weight: 700; }
.payg-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 15px; padding: 16px 18px; box-shadow: var(--shadow-sm); }
.panel .payg-form { border: none; background: transparent; padding: 0; box-shadow: none; }
.payg-form label { font-size: 13px; color: var(--ink-2); display: flex; align-items: center; gap: 8px; font-weight: 600; }
.payg-form input { padding: 9px 11px; border: 1px solid var(--mo-200); border-radius: 10px; font-size: 14px; width: 120px; background: #fffdf9; transition: all .15s; }
.payg-form input:focus { outline: none; border-color: var(--mo-500); box-shadow: 0 0 0 3px rgba(249, 115, 22, .14); }

/* ---------------------------------------------------------- flash & tags */
.flash { border-radius: 12px; padding: 11px 15px; font-size: 14px; margin: 12px 0; box-shadow: var(--shadow-sm); }
.flash.ok { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.flash.err { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.flash.info { background: #fff7ed; color: var(--mo-700); border: 1px solid var(--mo-200); }

.tag { display: inline-block; font-size: 12px; padding: 2.5px 10px; border-radius: 999px; font-weight: 600; }
.tag.ok { background: #f0fdf4; color: #15803d; }
.tag.warn { background: var(--mo-50); color: var(--mo-700); border: 1px solid var(--mo-200); }
.tag.err { background: #fef2f2; color: #b91c1c; }
.tag.brand { background: var(--mo-100); color: var(--mo-700); }

/* --------------------------------------------------------------- buttons */
.btn {
  display: inline-block; padding: 9px 18px; font-size: 14px; border-radius: 11px;
  border: 1px solid var(--mo-200); background: #fff; color: var(--ink-2); cursor: pointer; text-decoration: none;
  transition: all .16s; font-weight: 500;
}
.btn:hover { border-color: var(--mo-400); color: var(--mo-600); box-shadow: 0 5px 14px rgba(249, 115, 22, .16); transform: translateY(-1px); }
.btn.primary {
  background: linear-gradient(135deg, #ff9f4d, var(--mo-500)); border: none; color: #fff; font-weight: 700;
  box-shadow: 0 7px 18px rgba(249, 115, 22, .30);
}
.btn.primary:hover { background: linear-gradient(135deg, #fb8c2e, var(--mo-600)); color: #fff; box-shadow: 0 10px 24px rgba(249, 115, 22, .38); }
.btn.sm { padding: 5px 12px; font-size: 13px; border-radius: 9px; }
.dim { color: var(--ink-3); font-size: 13px; }

/* ------------------------------------------------------------------ foot */
.foot {
  flex-shrink: 0;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, #fff6ec, #ffeeda);
  padding: 26px 0; color: var(--ink-3); font-size: 13px;
}
.foot a { color: var(--mo-600); font-weight: 600; }

@media (max-width: 640px) {
  .auth-card { padding: 26px 20px 22px; margin-top: 20px; }
  .tab { font-size: 12px; padding: 7px 4px; }
  .hero-band { padding: 18px 18px; }
  .hero-band .hb-cta { margin-left: 0; width: 100%; text-align: center; }
  .nav-inner { gap: 10px 14px; }
  .nav .nav-user { margin-left: auto; }
  .nav nav { order: 3; flex: 1 0 100%; overflow-x: auto; scrollbar-width: none; gap: 4px; }
  .nav nav::-webkit-scrollbar { display: none; }
  .nav nav a { padding: 6px 12px; font-size: 13px; white-space: nowrap; flex-shrink: 0; }
}

/* ------------------------------------------------------- remote control */
.rc [hidden] { display: none !important; }
.rc-intro { margin: -6px 0 16px; line-height: 1.7; }
.rc { display: grid; grid-template-columns: 320px 1fr; gap: 16px; height: calc(100vh - 230px); min-height: 520px; }
.rc-side, .rc-main { background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.rc-devs-head { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 14px 4px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.rc-devs-head .dim { font-weight: 400; font-size: 12px; }
.rc-devs { max-height: 46%; flex: none; overflow-y: auto; padding: 4px 10px 10px; border-bottom: 1px solid var(--line); }
.rc-devs .rc-empty { padding: 10px 4px; font-size: 12.5px; }
.rc-dev { border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; margin-top: 6px; cursor: pointer; background: #fff; transition: border-color .15s, background .15s; outline: none; }
.rc-dev:hover, .rc-dev:focus-visible { border-color: var(--mo-300); background: #fffaf4; }
.rc-dev.active { border-color: var(--mo-400); background: var(--mo-50); box-shadow: 0 0 0 2px rgba(251, 146, 60, .15); }
.rc-dev.off { opacity: .72; }
.rc-dev-top { display: flex; align-items: center; gap: 7px; min-width: 0; }
.rc-dev-name { flex: 1; min-width: 0; font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-dev-edit { border: 0; background: none; color: var(--ink-3); cursor: pointer; font-size: 14px; padding: 0 2px; flex: none; }
.rc-dev-edit:hover { color: var(--mo-600); }
.rc-dev-input { flex: 1; min-width: 0; font: inherit; font-size: 13px; padding: 3px 7px; border: 1px solid var(--mo-300); border-radius: 7px; background: #fff; color: var(--ink); }
.rc-dev-input:focus { outline: none; box-shadow: 0 0 0 3px rgba(251, 146, 60, .18); }
.rc-dev-sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-dev-act { font-size: 12.5px; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-3); }
.rc-dev-act.busy { color: #c2410c; font-weight: 600; }
.rc-dev-act.idle { color: #15803d; }
.rc-dev-bar { display: flex; gap: 10px; align-items: center; margin-top: 5px; flex-wrap: wrap; }
.rc-dev-bar:empty { display: none; }
.rc-link.muted { color: var(--ink-3); font-weight: 400; }
.rc-link.danger { color: #dc2626; }
.rc-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; display: inline-block; background: #c9c2ba; }
.rc-dot.on { background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, .15); }
.rc-dot.busy { background: #f97316; box-shadow: 0 0 0 3px rgba(249, 115, 22, .18); animation: rc-pulse 1.4s ease-in-out infinite; }
@keyframes rc-pulse { 50% { box-shadow: 0 0 0 5px rgba(249, 115, 22, .05); } }
.rc-target { display: flex; align-items: center; gap: 6px; font-size: 12.5px; margin-bottom: 7px; min-width: 0; }
.rc-target b { flex: none; max-width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-target-act { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-3); }
.rc-target-act.busy { color: #c2410c; }
.rc-tabs { display: flex; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.rc-tabs button { border: 1px solid transparent; background: transparent; color: var(--ink-3); padding: 5px 12px; border-radius: 999px; font-size: 13px; cursor: pointer; }
.rc-tabs button.active { background: var(--mo-100); color: var(--mo-700); border-color: var(--mo-200); font-weight: 600; }
.rc-tabs .rc-new { margin-left: auto; color: var(--mo-600); font-weight: 600; }
.rc-tabs .rc-new:hover { background: var(--mo-50); }
.rc-list { flex: 1; overflow-y: auto; padding: 8px; }
.rc-item { display: block; width: 100%; text-align: left; border: 1px solid transparent; background: transparent; border-radius: 12px; padding: 9px 10px; margin-bottom: 4px; cursor: pointer; color: var(--ink); font: inherit; box-sizing: border-box; }
.rc-item:hover { background: #fffaf2; }
.rc-item.active { background: var(--mo-50); border-color: var(--mo-200); }
.rc-item.task { cursor: default; border-color: #fdf0e3; }
.rc-item-top { display: flex; gap: 8px; align-items: center; }
.rc-item-title { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-item-sub { font-size: 12px; color: var(--ink-3); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-item-err { font-size: 12px; color: #dc2626; margin-top: 3px; }
.rc-item-bar { display: flex; gap: 12px; margin-top: 4px; }
.rc-link { border: 0; background: none; padding: 0; color: var(--mo-600); font-size: 12.5px; cursor: pointer; font-weight: 600; }
.rc-pill { display: inline-block; flex: none; font-size: 11.5px; padding: 2px 8px; border-radius: 999px; background: #f3f0ec; color: var(--ink-3); white-space: nowrap; }
.rc-pill.running, .rc-pill.queued { background: #fff1db; color: #c2410c; }
.rc-pill.done { background: #e7f8ee; color: #15803d; }
.rc-pill.failed { background: #fde8e8; color: #dc2626; }
.rc-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.rc-title { flex: 1; min-width: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-back { display: none; border: 1px solid var(--mo-200); background: #fff; border-radius: 9px; padding: 3px 10px; cursor: pointer; color: var(--mo-600); }
.rc-msgs { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; background: #fffcf8; }
.rc-empty { color: var(--ink-3); font-size: 13px; text-align: center; padding: 30px 10px; }
.rc-msg { max-width: 92%; }
.rc-msg.user { align-self: flex-end; }
.rc-msg.tool { align-self: stretch; max-width: 100%; }
.rc-bubble { border-radius: 14px; padding: 9px 13px; line-height: 1.6; font-size: 14px; background: #fff; border: 1px solid var(--line); word-break: break-word; }
.rc-msg.user .rc-bubble { background: linear-gradient(135deg, #ffb066, var(--mo-500)); color: #fff; border-color: transparent; }
.rc-text { white-space: pre-wrap; }
.rc-code { background: #2b2118; color: #ffe9d2; border-radius: 9px; padding: 9px 11px; overflow-x: auto; font-size: 12.5px; line-height: 1.5; white-space: pre-wrap; word-break: break-all; margin: 6px 0; max-height: 360px; }
.rc-reason { margin-bottom: 6px; font-size: 12.5px; color: var(--ink-3); }
.rc-reason summary { cursor: pointer; }
.rc-reason .rc-text { border-left: 3px solid var(--mo-200); padding-left: 8px; margin-top: 4px; max-height: 240px; overflow-y: auto; }
.rc-calls { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.rc-chip { font-size: 12px; background: var(--mo-50); color: var(--mo-700); border: 1px solid var(--mo-200); border-radius: 999px; padding: 2px 9px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-meta { font-size: 12px; margin-top: 4px; opacity: .85; }
.rc-tool { border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 7px 11px; font-size: 13px; }
.rc-tool summary { cursor: pointer; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-tool.ok summary { color: #15803d; }
.rc-tool.error summary, .rc-tool.denied summary { color: #dc2626; }
.rc-time { font-size: 11px; color: var(--ink-3); margin-top: 3px; }
.rc-msg.user .rc-time { text-align: right; }
.rc-pending { display: flex; align-items: center; gap: 10px; border: 1px dashed var(--mo-300); border-radius: 12px; padding: 8px 11px; background: #fff8ef; font-size: 13px; }
.rc-pending-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-approve { margin: 10px 16px 0; border: 1px solid #fbbf24; background: #fffbeb; border-radius: 12px; padding: 10px 12px; }
.rc-approve-title { font-weight: 700; font-size: 14px; color: #92400e; }
.rc-approve-bar { display: flex; gap: 8px; margin-top: 6px; }
.rc-compose { border-top: 1px solid var(--line); padding: 10px 14px 12px; background: #fff; }
.rc-modes { display: flex; gap: 16px; font-size: 13px; color: var(--ink-2); margin-bottom: 7px; flex-wrap: wrap; }
.rc-modes input { accent-color: var(--mo-500); }
.rc-input-row { display: flex; gap: 10px; align-items: flex-end; }
.rc-input-row textarea { flex: 1; resize: vertical; min-height: 46px; max-height: 220px; border: 1px solid var(--mo-200); border-radius: 12px; padding: 9px 11px; font: inherit; font-size: 14px; background: #fffaf4; color: var(--ink); box-sizing: border-box; }
.rc-input-row textarea:focus { outline: none; border-color: var(--mo-400); box-shadow: 0 0 0 3px rgba(251, 146, 60, .18); }
.rc-hint { font-size: 12px; color: var(--ink-3); min-height: 16px; margin-top: 5px; }
.rc-hint.bad { color: #c2410c; }

body.rd-open { overflow: hidden; }
.rd[hidden], .rd [hidden] { display: none !important; }
.rd { position: fixed; inset: 0; z-index: 1000; background: #17120e; color: #f5ede4; display: flex; flex-direction: column; }
.rd-bar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: #231a13; border-bottom: 1px solid #3a2c20; flex-wrap: wrap; }
.rd-title { flex: 1; min-width: 160px; font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rd-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rd-tools select { background: #2f241b; color: #f5ede4; border: 1px solid #4a3828; border-radius: 8px; padding: 5px 8px; font-size: 13px; }
.rd .btn { background: #2f241b; color: #f5ede4; border-color: #4a3828; box-shadow: none; }
.rd .btn:hover { color: #fed7aa; border-color: var(--mo-400); transform: none; }
.rd .btn.primary { background: linear-gradient(135deg, var(--mo-400), var(--mo-600)); color: #fff; border-color: transparent; }
.rd .btn.danger { background: #7f1d1d; border-color: #991b1b; color: #fff; }
.rd-check { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; cursor: pointer; user-select: none; }
.rd-check input { accent-color: var(--mo-500); }
.rd-keys { padding: 8px 12px; background: #1f1711; border-bottom: 1px solid #3a2c20; display: flex; flex-direction: column; gap: 7px; }
.rd-text-row { display: flex; gap: 8px; }
.rd-text-row input { flex: 1; min-width: 0; background: #2f241b; color: #f5ede4; border: 1px solid #4a3828; border-radius: 8px; padding: 6px 9px; font: inherit; font-size: 14px; }
.rd-key-row { display: flex; gap: 6px; flex-wrap: wrap; }
.rd-key-row button { background: #2f241b; color: #f5ede4; border: 1px solid #4a3828; border-radius: 7px; padding: 4px 10px; font-size: 12.5px; cursor: pointer; min-width: 38px; }
.rd-key-row button:active { background: var(--mo-600); }
.rd-stage { flex: 1; min-height: 0; position: relative; overflow: auto; background: #0e0b08; }
.rd-stage.fit { overflow: hidden; display: flex; align-items: center; justify-content: center; }
.rd-stage canvas { display: block; margin: 0 auto; outline: none; touch-action: pan-x pan-y; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.rd-stage.fit canvas { touch-action: none; }
.rd-stage canvas.ctl { cursor: crosshair; }
.rd-msg { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); max-width: min(440px, 86%); background: rgba(35, 26, 19, .92); border: 1px solid #4a3828; border-radius: 12px; padding: 14px 18px; text-align: center; font-size: 14px; line-height: 1.6; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.rd-foot { display: flex; gap: 14px; padding: 5px 12px; font-size: 12px; background: #231a13; border-top: 1px solid #3a2c20; color: #cdbfb1; flex-wrap: wrap; }
.rd-foot .dim { color: #9c8c7c; }

@media (max-width: 760px) {
  .rc { grid-template-columns: 1fr; height: calc(100vh - 170px); min-height: 460px; }
  .rc-main { display: none; }
  .rc.show-main .rc-main { display: flex; }
  .rc.show-main .rc-side { display: none; }
  .rc-back { display: inline-block; }
  .rc-intro { font-size: 12.5px; }
  .rc-msg { max-width: 100%; }
  .rc-devs { max-height: 52%; }
  .rd-bar { padding: 6px 8px; gap: 6px; }
  .rd-title { min-width: 100%; font-size: 13px; }
  .rd-tools { gap: 6px; }
  .rd-foot #rd-tip { display: block; width: 100%; }
}
