  :root {
    --bg: #f6f7f9; --panel: #fff; --text: #1d2330; --muted: #6b7385; --line: #e2e5eb;
    --accent: #2f6fdb; --warn-bg: #fff6e0; --warn-line: #f0c96b; --note-bg: #eef5ff;
    --todo: #8a93a6; --onwork: #2f6fdb; --test: #d9822b; --done: #2e9d5b;
  }
  * { box-sizing: border-box; }
  body { margin: 0; font: 14px/1.45 system-ui, "Segoe UI", sans-serif; color: var(--text); background: var(--bg); }
  a { color: var(--accent); }
  button { font: inherit; cursor: pointer; border: 1px solid var(--line); background: var(--panel);
           border-radius: 6px; padding: 4px 10px; }
  button:hover { border-color: var(--accent); }
  button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
  button.danger { color: #b3261e; border-color: #e3b5b1; }
  button.danger:hover { border-color: #b3261e; background: #fdf1f0; }
  input, textarea, select { font: inherit; border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px;
                            width: 100%; background: #fff; color: var(--text); }
  textarea { min-height: 60px; resize: vertical; }
  .layout { display: grid; grid-template-columns: 300px 1fr; min-height: 100vh; }
  aside { background: var(--panel); border-right: 1px solid var(--line); padding: 14px; display: flex;
          flex-direction: column; gap: 10px; }
  main { padding: 18px 24px; max-width: 1000px; }
  h1 { font-size: 18px; margin: 0; }
  h2 { font-size: 20px; margin: 0; }
  h3 { font-size: 15px; margin: 18px 0 8px; }
  .tabs { display: flex; gap: 6px; }
  .tabs button.active { background: var(--text); color: #fff; border-color: var(--text); }
  .epic-link { display: block; padding: 8px; border-radius: 6px; text-decoration: none; color: var(--text);
               border: 1px solid transparent; }
  .epic-link:hover { border-color: var(--line); }
  .epic-link.active { background: var(--note-bg); border-color: #cfe0fb; }
  .epic-link small { color: var(--muted); display: block; }
  .badge { display: inline-block; padding: 1px 8px; border-radius: 10px; color: #fff; font-size: 12px;
           white-space: nowrap; }
  .s-todo { background: var(--todo); } .s-on-work { background: var(--onwork); }
  .s-test { background: var(--test); } .s-done { background: var(--done); }
  .s-deploy { background: #7c4dcc; } .s-test_outside { background: #b8569b; } .s-ready { background: #1f8a8a; }
  .row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
  .muted { color: var(--muted); }
  .pre { white-space: pre-wrap; }
  .card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; margin-bottom: 8px; }
  .card > summary { padding: 8px 12px; cursor: pointer; display: flex; gap: 8px; align-items: center; }
  .card > .body { padding: 4px 12px 12px; border-top: 1px solid var(--line); }
  .box { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px;
         margin-bottom: 8px; }
  .questions { background: var(--warn-bg); border-color: var(--warn-line); }
  .notes { background: var(--note-bg); border-color: #cfe0fb; }
  .comment { border-left: 3px solid var(--line); padding: 4px 10px; margin: 6px 0; }
  .comment.by-user { border-left-color: var(--test); }
  .comment.by-claude { border-left-color: var(--accent); }
  .comment.question:not(.resolved) { background: var(--warn-bg); }
  .comment.note { background: var(--note-bg); }
  .reply { margin-left: 22px; }
  .meta { font-size: 12px; color: var(--muted); }
  .form { display: grid; gap: 6px; margin-top: 8px; }
  .form .row select { width: auto; }
  .error { position: fixed; right: 16px; bottom: 16px; max-width: 420px; background: #b3261e; color: #fff;
           padding: 10px 14px; border-radius: 8px; display: none; white-space: pre-wrap; }
  .empty { color: var(--muted); padding: 40px 0; }
  main { min-width: 0; }
  main.wide { max-width: none; }
  .board-scroll { overflow-x: auto; padding-bottom: 8px; }
  .board { min-width: 1500px; }
  .lane { margin-bottom: 14px; }
  .lane-title { display: flex; gap: 8px; align-items: center; margin: 6px 0; }
  .bcols { display: grid; grid-template-columns: repeat(7, minmax(200px, 1fr)); gap: 8px; }
  .bhead { position: sticky; top: 0; z-index: 2; background: var(--bg); padding: 4px 0; }
  .bhead div { font-weight: 600; }
  .bcol { background: #eceef3; border-radius: 8px; min-height: 70px; padding: 6px; display: flex;
          flex-direction: column; gap: 6px; }
  .bcol.over { outline: 2px dashed var(--accent); background: #e4ecfb; }
  .bcard { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px;
           cursor: grab; font-size: 13px; }
  .bcard:hover { border-color: var(--accent); }
  .bcard.bug { border-left: 3px solid #b3261e; }
  .bcard.active { box-shadow: 0 0 0 2px var(--onwork); }
  .bcard .meta { margin-top: 3px; }
  .badge.bugmark { background: #b3261e; }
  .hint { color: var(--muted); font-size: 12px; }
  .modal { position: fixed; inset: 0; background: rgba(20, 26, 40, .55); display: none; z-index: 50;
           padding: 4vh 16px; overflow-y: auto; }
  .modal.open { display: block; }
  .modal-box { background: var(--panel); border-radius: 12px; max-width: 1000px; margin: 0 auto;
               padding: 18px 22px 22px; box-shadow: 0 10px 40px rgba(0, 0, 0, .35); }
  .modal-head { display: flex; gap: 12px; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
  .modal-head h2 { font-size: 18px; }
  .modal-close { font-size: 20px; line-height: 1; padding: 2px 10px; }
  @media (max-width: 760px) {
    .layout { grid-template-columns: 1fr; }
    aside { border-right: 0; border-bottom: 1px solid var(--line); }
    main { padding: 14px 16px; }
  }

/* ---- Режимы и чат ---- */
.modes { display: flex; gap: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.modes button { flex: 1; border: 0; border-radius: 0; padding: 7px 10px; background: var(--panel); font-weight: 600; }
.modes button.active { background: var(--accent); color: #fff; }
.side-part { display: flex; flex-direction: column; gap: 10px; }
.layout.chat-mode aside { position: sticky; top: 0; height: calc(100vh - var(--cookie-h, 0px)); overflow-y: auto; }
.layout.chat-mode main { padding: 0; max-width: none; min-width: 0; }
.chat-link { display: block; padding: 8px; border-radius: 6px; text-decoration: none; color: var(--text); border: 1px solid transparent; }
.chat-link:hover { border-color: var(--line); }
.chat-link.active { background: var(--note-bg); border-color: #cfe0fb; }
.chat-link small { display: block; color: var(--muted); }
.chat-link-top { display: flex; align-items: center; gap: 6px; }
.chat-preview { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cdot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #8a93a6; flex: none; }
.cdot-working { background: var(--onwork); animation: cpulse 1.2s infinite; }
.cdot-waiting { background: var(--test); animation: cpulse 1.2s infinite; }
@keyframes cpulse { 50% { opacity: .35; } }
.chatwin { display: flex; flex-direction: column; height: calc(100vh - var(--cookie-h, 0px)); background: var(--bg); }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--panel); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.chat-title { flex: 1; min-width: 160px; cursor: pointer; display: flex; flex-direction: column; }
.chat-back { display: none; font-size: 20px; text-decoration: none; }
.chat-state { color: var(--muted); display: flex; align-items: center; gap: 6px; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.cmsg { display: flex; flex-direction: column; max-width: min(820px, 92%); }
.cmsg .bubble { padding: 9px 13px; border-radius: 14px; overflow-wrap: anywhere; line-height: 1.5; }
.cuser { align-self: flex-end; align-items: flex-end; }
.cuser .bubble { background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.cuser .bubble a, .cuser .bubble code { color: inherit; }
.cclaude { align-self: flex-start; }
.cclaude .bubble { background: var(--panel); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.cmeta { font-size: 11px; color: var(--muted); margin: 2px 4px 0; }
.bubble pre { background: #11151d; color: #e6e9f0; padding: 10px 12px; border-radius: 8px; overflow-x: auto; margin: 6px 0; }
.bubble code { background: rgba(120, 130, 150, .18); padding: 1px 5px; border-radius: 4px; font: 13px/1.4 ui-monospace, Consolas, monospace; }
.bubble pre code { background: none; padding: 0; }
.ctool { align-self: flex-start; color: var(--muted); font-size: 12.5px; }
.ctool details { background: transparent; }
.ctool pre { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 8px; max-height: 240px; overflow: auto; white-space: pre-wrap; }
.csys { align-self: center; color: var(--muted); font-size: 12px; }
.cperm { align-self: flex-start; }
.permcard { background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: 10px; padding: 10px 12px; display: grid; gap: 6px; }
.permcard pre { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; margin: 0; max-height: 200px; overflow: auto; white-space: pre-wrap; }
.typing i { display: inline-block; width: 6px; height: 6px; margin: 0 2px; border-radius: 50%; background: var(--muted); animation: cpulse 1s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
.chat-form { display: flex; gap: 8px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--panel); border-top: 1px solid var(--line); }
.chat-form textarea { min-height: 44px; max-height: 40vh; flex: 1; }
.chat-form button { align-self: stretch; padding: 0 18px; }
.chat-empty { margin: auto; text-align: center; }
@media (max-width: 760px) {
  .layout.chat-mode aside { position: static; height: auto; }
  .layout.chat-mode.chat-open aside { display: none; }
  .layout.chat-mode:not(.chat-open) main { display: none; }
  .chatwin { height: calc(100dvh - var(--cookie-h, 0px)); }
  .chat-back { display: inline; }
  .cmsg { max-width: 96%; }
}

/* ---- Секреты ---- */
main .sec-pin { max-width: 360px; margin: 12vh auto 0; padding: 0 16px; text-align: center; }
.sec-pin form { display: flex; gap: 8px; margin: 14px 0 8px; }
.sec-pin input { flex: 1; min-width: 0; text-align: center; letter-spacing: 4px; font-size: 18px; }
.sec-err { color: #b3261e; min-height: 20px; }
.sec-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.sec-group { margin: 18px 0; }
.sec-group h3 { margin: 0 0 6px; padding-bottom: 4px; border-bottom: 1px solid var(--line); }
.sec-row { display: grid; grid-template-columns: minmax(140px, 1fr) minmax(120px, 2fr) auto; gap: 8px 12px; align-items: start; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.sec-value { font: 13px/1.45 ui-monospace, Consolas, monospace; overflow-wrap: anywhere; white-space: pre-wrap; color: var(--muted); }
.sec-value.shown { color: var(--text); }
.sec-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.sec-actions button { padding: 3px 8px; font-size: 12px; }
.sec-form { display: grid; gap: 10px; }
.sec-form label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
@media (max-width: 760px) { .sec-row { grid-template-columns: 1fr; } .sec-actions { justify-content: flex-start; } }

/* ---- Базовый CSS нажимаемых элементов: D:\CLAUDE\standards\web-ui.md ---- */
a, button, summary, label[for], select,
input[type="button"], input[type="submit"], input[type="reset"],
[role="button"], [role="tab"], [role="link"], [onclick] {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  touch-action: manipulation;
}
button, summary, input[type="button"], input[type="submit"], [role="button"], [role="tab"], .btn, nav a {
  -webkit-user-select: none;
  user-select: none;
}
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--c-primary, #1a73e8); outline-offset: 2px; }
button:active { filter: brightness(.92); }

/* ---- Вход, плашка cookie, мелочи для телефона ---- */
.login { max-width: 340px; margin: 14vh auto; padding: 0 16px; }
.login form { display: grid; gap: 10px; }
.login h1 { margin-bottom: 14px; }
.who { font-size: 12px; color: var(--muted); }
#cookie-consent { position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; background: #1d2330; color: #fff;
  padding: 10px 16px; display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap; font-size: 13px; }
#cookie-consent button { background: #fff; color: #1d2330; border-color: #fff; min-height: 36px; }
body.has-cookie-bar { padding-bottom: var(--cookie-h, 70px); }
button, .epic-link, .tabs button { min-height: 34px; }
.epic-link, .pre, .comment { overflow-wrap: anywhere; }
