*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --vk: #0077FF;
  --vk-hover: #0062D4;
  --vk-light: rgba(0,119,255,0.12);
  --bg: #0F1117;
  --surface: #1C1E26;
  --surface2: #23262F;
  --border: #2C2F3A;
  --text: #E8E9EB;
  --muted: #72747C;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  height: 100vh;
  overflow: hidden;
}

.hidden { display: none !important; }

/* ── VK Logo ─────────────────────────────────────────── */
.vk-logo-wrap { align-items: center; display: flex; gap: 10px; }
.vk-clover-svg { clip-path: circle(50%); flex-shrink: 0; height: 34px; width: 34px; }
.vk-logo-text { display: flex; flex-direction: column; gap: 1px; }
.vk-logo-name { color: var(--text); font-size: 0.9rem; font-weight: 700; line-height: 1.1; }
.vk-logo-sub { color: var(--muted); font-size: 0.7rem; line-height: 1.1; }

/* ── Inputs & buttons ────────────────────────────────── */
.vk-input {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 1rem;
  outline: none;
  padding: 11px 15px;
  transition: border-color 0.2s;
  width: 100%;
}
.vk-input:focus { border-color: var(--vk); }

.vk-textarea {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  padding: 11px 15px;
  resize: vertical;
  transition: border-color 0.2s;
  width: 100%;
}
.vk-textarea:focus { border-color: var(--vk); }

.vk-btn-primary {
  background: var(--vk);
  border: none;
  border-radius: 10px;
  color: #fff;
  cursor: pointer;
  font-size: 0.97rem;
  font-weight: 600;
  padding: 11px 24px;
  transition: background 0.15s, transform 0.1s;
  width: 100%;
}
.vk-btn-primary:hover { background: var(--vk-hover); }
.vk-btn-primary:active { transform: scale(0.98); }
.vk-btn-primary:disabled { background: #2a2d3a; color: #555; cursor: default; }

.vk-btn-secondary {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  cursor: pointer;
  font-size: 0.97rem;
  font-weight: 600;
  padding: 11px 20px;
  transition: background 0.15s;
}
.vk-btn-secondary:hover { background: var(--surface2); }

.vk-btn-copy {
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: 9px;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.82rem;
  padding: 6px 14px;
  transition: border-color 0.2s, color 0.2s;
  white-space: nowrap;
}
.vk-btn-copy:hover { border-color: var(--vk); color: var(--vk); }

.back-btn {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0;
  text-align: left;
  transition: color 0.15s;
  width: 100%;
}
.back-btn:hover { color: var(--text); }

/* ── Landing ─────────────────────────────────────────── */
.landing {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 24px;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

.step-card {
  align-items: stretch;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px 28px;
  width: 380px;
}

.step-title { font-size: 1.15rem; font-weight: 700; }

.avatar-label { color: var(--muted); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }

.avatar-grid { display: grid; gap: 6px; grid-template-columns: repeat(8, 1fr); }

.avatar-opt {
  aspect-ratio: 1;
  background: var(--surface2);
  border: 2px solid transparent;
  border-radius: 9px;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  padding: 4px;
  transition: border-color 0.15s, transform 0.1s;
}
.avatar-opt:hover { transform: scale(1.12); }
.avatar-opt.selected { border-color: var(--vk); background: var(--vk-light); }

.or-row { align-items: center; display: flex; }
.or-text { color: var(--muted); font-size: 0.8rem; margin: 0 auto; }

.join-row { display: flex; gap: 8px; }
.join-input { flex: 1; }

/* ── Name overlay ────────────────────────────────────── */
.name-overlay {
  align-items: center;
  background: var(--bg);
  display: flex;
  inset: 0;
  justify-content: center;
  position: fixed;
  z-index: 50;
}
.name-box {
  align-items: stretch;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px;
  width: 380px;
}

/* ── Game layout ─────────────────────────────────────── */
.game { display: flex; flex-direction: column; height: 100vh; }

.header {
  align-items: center;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-shrink: 0;
  height: 56px;
  justify-content: space-between;
  padding: 0 20px;
}

.header-left { align-items: center; display: flex; gap: 12px; }
.header-right { align-items: center; display: flex; gap: 12px; }

.owner-badge {
  background: #1e1800;
  border: 1px solid #4a3a00;
  border-radius: 6px;
  color: #d4a800;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 8px;
}

/* Tabs */
.tab-group { display: flex; gap: 2px; background: var(--surface2); border-radius: 9px; padding: 3px; }
.tab {
  background: transparent;
  border: none;
  border-radius: 7px;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 5px 12px;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.tab.active { background: var(--surface); color: var(--text); }
.tab:hover:not(.active) { color: var(--text); }

.tab-content { display: flex; flex-direction: column; flex: 1; overflow: hidden; }

/* ── Poker table view ────────────────────────────────── */
.table-area {
  align-items: center;
  display: flex;
  flex: 1;
  justify-content: center;
  overflow: hidden;
}

.table-wrap { height: 380px; position: relative; width: 700px; }

.poker-table {
  background: radial-gradient(ellipse at 42% 38%, #1a3f80, #0f2558 55%, #081840);
  border: 10px solid #060f2a;
  border-radius: 50%;
  box-shadow: 0 0 0 3px #04091a, inset 0 2px 40px rgba(0,0,0,0.6), inset 0 0 80px rgba(0,60,180,0.15), 0 16px 60px rgba(0,0,0,0.8);
  height: 210px;
  left: 50%;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 430px;
}

#seats { inset: 0; position: absolute; }

.seat {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: absolute;
  transform: translate(-50%, -50%);
  width: 76px;
}

.seat-avatar {
  align-items: center;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 50%;
  display: flex;
  font-size: 1.2rem;
  height: 40px;
  justify-content: center;
  transition: border-color 0.2s;
  width: 40px;
}
.seat.is-you .seat-avatar { border-color: var(--vk); }
.seat.voted .seat-avatar { box-shadow: 0 0 0 2px var(--vk); }

.seat-name { color: var(--muted); font-size: 0.64rem; max-width: 76px; overflow: hidden; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.seat.is-you .seat-name { color: #5a9fff; }

.react-btn { background: transparent; border: none; border-radius: 6px; color: var(--muted); cursor: pointer; font-size: 0.75rem; padding: 2px 5px; transition: color 0.15s, background 0.15s; }
.react-btn:hover { background: var(--surface2); color: var(--text); }

.card-wrap { height: 54px; perspective: 600px; width: 38px; }
.player-card { border-radius: 8px; height: 100%; position: relative; transform-style: preserve-3d; transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1); width: 100%; }
.player-card.flipped { transform: rotateY(180deg); }

.card-face { align-items: center; backface-visibility: hidden; border-radius: 8px; display: flex; font-weight: 800; inset: 0; justify-content: center; position: absolute; }
.card-b { background: var(--surface); border: 2px dashed var(--border); }
.seat.voted .card-b { background: var(--vk-light); border: 2px solid var(--vk); }
.seat.voted .card-b::after { content: '✓'; color: var(--vk); font-size: 0.9rem; }
.card-f { background: #fff; border: 2px solid #dde; box-shadow: 0 3px 12px rgba(0,0,0,0.4); color: #0f1117; font-size: 1.2rem; transform: rotateY(180deg); }

.table-center { align-items: center; display: flex; flex-direction: column; gap: 8px; left: 50%; pointer-events: none; position: absolute; top: 50%; transform: translate(-50%, -50%); z-index: 10; }
.table-center > * { pointer-events: auto; }

.wait-msg { color: rgba(255,255,255,0.25); font-size: 0.74rem; }

.vk-btn-reveal { animation: pulse 2s infinite; background: var(--vk); border: none; border-radius: 10px; color: #fff; cursor: pointer; font-size: 0.88rem; font-weight: 700; padding: 9px 22px; white-space: nowrap; }
.vk-btn-reveal:hover { background: var(--vk-hover); animation: none; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(0,119,255,0.5); } 50% { box-shadow: 0 0 0 10px rgba(0,119,255,0); } }

.vk-btn-round { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12); border-radius: 8px; color: rgba(255,255,255,0.7); cursor: pointer; font-size: 0.78rem; font-weight: 600; padding: 6px 16px; white-space: nowrap; }
.vk-btn-round:hover { background: rgba(255,255,255,0.14); }

.stats { background: rgba(8,10,16,0.94); border: 1px solid var(--border); border-radius: 10px; min-width: 136px; padding: 10px 14px; }
.stats-row { align-items: center; display: flex; gap: 7px; margin-bottom: 5px; }
.stats-row:last-child { margin-bottom: 0; }
.stats-lbl { color: var(--muted); font-size: 0.74rem; font-weight: 700; text-align: center; width: 14px; }
.stats-track { background: var(--surface2); border-radius: 4px; flex: 1; height: 6px; overflow: hidden; }
.stats-bar { background: var(--vk); border-radius: 4px; height: 100%; transition: width 0.55s ease; width: 0; }
.stats-cnt { color: var(--text); font-size: 0.74rem; font-weight: 700; text-align: right; width: 14px; }

.vote-area { align-items: center; background: #0b0d14; border-top: 1px solid var(--border); display: flex; flex-direction: column; flex-shrink: 0; gap: 10px; padding: 12px 20px 18px; }
.vote-hint { color: var(--muted); font-size: 0.7rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.vote-cards { display: flex; gap: 12px; }
.vcard { background: var(--surface); border: 2px solid var(--border); border-radius: 12px; color: var(--text); cursor: pointer; font-size: 1.8rem; font-weight: 800; height: 96px; transition: border-color 0.12s, background 0.12s, transform 0.12s, box-shadow 0.12s; width: 74px; }
.vcard:hover:not(:disabled) { border-color: var(--vk); background: var(--vk-light); transform: translateY(-5px); }
.vcard.selected { background: var(--vk); border-color: var(--vk); color: #fff; transform: translateY(-7px); box-shadow: 0 8px 24px rgba(0,119,255,0.45); }
.vcard:disabled { cursor: default; opacity: 0.3; transform: none !important; }

/* ── Reactions ───────────────────────────────────────── */
.reaction-picker { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 8px 32px rgba(0,0,0,0.5); display: flex; gap: 4px; padding: 8px 10px; position: fixed; z-index: 200; }
.reaction-picker button { background: transparent; border: none; border-radius: 8px; cursor: pointer; font-size: 1.4rem; padding: 4px 6px; transition: background 0.12s, transform 0.12s; }
.reaction-picker button:hover { background: var(--surface2); transform: scale(1.2); }

.floating-emoji { animation: floatUp 1.5s ease forwards; font-size: 2rem; pointer-events: none; position: absolute; transform: translate(-50%, -50%); z-index: 100; }
@keyframes floatUp { 0% { transform: translate(-50%,-50%) scale(1); opacity:1; } 40% { transform: translate(-50%,-110%) scale(1.6); opacity:1; } 100% { transform: translate(-50%,-200%) scale(2); opacity:0; } }

/* ── Backlog view ────────────────────────────────────── */
.backlog-container {
  flex: 1;
  overflow-y: auto;
  padding: 24px 32px;
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
}

.backlog-header { align-items: center; display: flex; justify-content: space-between; margin-bottom: 20px; }
.backlog-title { font-size: 1.1rem; font-weight: 700; }
.backlog-add-btn { width: auto; padding: 8px 18px; font-size: 0.88rem; }

.add-epic-form { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; padding: 16px; }
.form-actions { display: flex; gap: 8px; }
.form-actions .vk-btn-primary { width: auto; flex: 1; }
.form-actions .vk-btn-secondary { width: auto; }

.epic-error { color: #ff6b6b; font-size: 0.82rem; }

.epic-list { display: flex; flex-direction: column; gap: 12px; }

.epic-group-label { color: var(--muted); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.07em; margin-bottom: 8px; margin-top: 4px; text-transform: uppercase; }

.epic-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  transition: border-color 0.2s;
}
.epic-card:hover { border-color: #3a3d4e; }

.epic-card-top { align-items: flex-start; display: flex; gap: 12px; justify-content: space-between; }
.epic-card-title { font-size: 0.95rem; font-weight: 600; margin-bottom: 3px; }
.epic-card-url { color: var(--muted); font-size: 0.75rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 480px; }
.epic-card-url a { color: var(--vk); text-decoration: none; }
.epic-card-url a:hover { text-decoration: underline; }

.rice-badges { display: flex; gap: 5px; flex-shrink: 0; }
.rice-badge {
  align-items: center;
  border-radius: 6px;
  display: flex;
  font-size: 0.72rem;
  font-weight: 700;
  gap: 3px;
  padding: 3px 7px;
}
.rice-badge.done { background: rgba(0,119,255,0.15); color: var(--vk); }
.rice-badge.todo { background: var(--surface2); color: var(--muted); }

.epic-status { display: inline-flex; align-items: center; gap: 5px; font-size: 0.72rem; font-weight: 600; margin-top: 8px; }
.status-queued { color: var(--muted); }
.status-partial { color: #f0a500; }
.status-complete { color: #3fcc7a; }

.epic-empty { color: var(--muted); font-size: 0.9rem; padding: 20px 0; text-align: center; }

/* ── Epic start-scoring button ───────────────────────── */
.epic-card-actions { display: flex; gap: 8px; margin-top: 10px; }
.vk-btn-start-scoring {
  background: var(--vk-light);
  border: 1px solid rgba(0,119,255,0.35);
  border-radius: 8px;
  color: var(--vk);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 14px;
  transition: background 0.15s;
  white-space: nowrap;
}
.vk-btn-start-scoring:hover { background: rgba(0,119,255,0.22); }

/* ── Scoring banner ──────────────────────────────────── */
.scoring-banner {
  align-items: stretch;
  background: rgba(0,119,255,0.07);
  border-bottom: 1px solid rgba(0,119,255,0.2);
  display: flex;
  flex-shrink: 0;
  gap: 0;
  min-height: 56px;
  padding: 0;
}

/* Левая половина — эпик */
.scoring-banner-epic {
  align-items: flex-start;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 3px;
  justify-content: center;
  min-width: 0;
  padding: 12px 20px 12px 24px;
}

/* Разделитель */
.scoring-banner-divider {
  background: rgba(0,119,255,0.2);
  flex-shrink: 0;
  width: 1px;
}

/* Правая половина — критерий */
.scoring-banner-criterion {
  align-items: center;
  display: flex;
  flex: 1;
  gap: 12px;
  min-width: 0;
  padding: 12px 20px;
}

/* Бейдж буквы */
.scoring-criterion-badge {
  align-items: center;
  background: var(--vk);
  border-radius: 10px;
  color: #fff;
  display: flex;
  flex-shrink: 0;
  font-size: 1.15rem;
  font-weight: 800;
  height: 40px;
  justify-content: center;
  width: 40px;
}

.scoring-criterion-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.scoring-criterion-name {
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 700;
}
.scoring-criterion-desc {
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.4;
  white-space: normal;
}

.scoring-scale-hint {
  color: rgba(255,255,255,0.3);
  font-size: 0.71rem;
  margin-top: 1px;
}

/* Эпик: метка, название, ссылка */
.scoring-epic-title-label {
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.scoring-epic-title-big {
  color: var(--text);
  font-size: 0.97rem;
  font-weight: 700;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
}

/* Кнопка стоп — справа, вертикально по центру */
.scoring-stop-btn {
  align-self: center;
  background: rgba(255,80,80,0.1);
  border: 1px solid rgba(255,80,80,0.3);
  border-radius: 7px;
  color: #ff8080;
  cursor: pointer;
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 600;
  margin-right: 16px;
  padding: 6px 12px;
  transition: background 0.15s;
  white-space: nowrap;
}
.scoring-stop-btn:hover { background: rgba(255,80,80,0.22); }

/* ── Accept / scoring action buttons ─────────────────── */
.scoring-actions { align-items: center; display: flex; flex-direction: column; gap: 6px; }

.vk-btn-accept {
  animation: pulse 2s infinite;
  background: rgba(63,204,122,0.12);
  border: 1px solid rgba(63,204,122,0.5);
  border-radius: 10px;
  color: #3fcc7a;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 9px 22px;
  white-space: nowrap;
}
.vk-btn-accept:hover { background: rgba(63,204,122,0.22); animation: none; }

/* ── Scoring modal ───────────────────────────────────── */
.modal-overlay {
  align-items: center;
  background: rgba(0,0,0,0.72);
  display: flex;
  inset: 0;
  justify-content: center;
  position: fixed;
  z-index: 100;
}
.modal-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 90vh;
  max-width: 460px;
  overflow-y: auto;
  padding: 28px;
  width: 100%;
}
.modal-title { font-size: 1.1rem; font-weight: 700; }
.modal-epic-name { color: var(--vk); font-size: 0.9rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal-label { color: var(--muted); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }

.rice-criteria-list { display: flex; flex-direction: column; gap: 8px; }

.rice-criterion-item {
  align-items: center;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  gap: 12px;
  padding: 10px 14px;
  transition: border-color 0.15s;
}
.rice-criterion-item:hover { border-color: var(--vk); }
.rice-criterion-item.already-done { opacity: 0.5; }
.rice-criterion-item input[type=checkbox] { accent-color: var(--vk); cursor: pointer; flex-shrink: 0; height: 16px; width: 16px; }
.rice-criterion-item .rice-badge { flex-shrink: 0; }
.rice-crit-info { display: flex; flex-direction: column; gap: 2px; }
.rice-crit-name { color: var(--text); font-size: 0.86rem; font-weight: 600; }
.rice-crit-desc { color: var(--muted); font-size: 0.73rem; }

.modal-actions { display: flex; gap: 8px; }
.modal-actions .vk-btn-primary { flex: 1; width: auto; }
.modal-actions .vk-btn-secondary { width: auto; }

/* ── Recent rooms ────────────────────────────────────── */
.recent-rooms { border-top: 1px solid var(--border); margin-top: 4px; padding-top: 14px; }
.recent-rooms-label { color: var(--muted); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; margin-bottom: 8px; text-transform: uppercase; }

.recent-room-item {
  align-items: center;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 9px;
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
  padding: 6px 6px 6px 14px;
  transition: border-color 0.15s, background 0.15s;
}
.recent-room-item:hover { background: var(--surface); border-color: var(--border); }

.recent-room-link {
  align-items: center;
  color: var(--text);
  display: flex;
  flex: 1;
  gap: 8px;
  justify-content: space-between;
  min-width: 0;
  text-decoration: none;
}
.recent-room-link:hover .recent-room-name { color: var(--vk); }

.recent-room-name { font-size: 0.88rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: color 0.15s; }
.recent-room-arrow { color: var(--muted); flex-shrink: 0; font-size: 0.85rem; }

.recent-room-actions { align-items: center; display: flex; flex-shrink: 0; gap: 2px; }

.recent-room-hide {
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.75rem;
  opacity: 0;
  padding: 4px 7px;
  transition: opacity 0.15s, background 0.15s, color 0.15s;
}
.recent-room-item:hover .recent-room-hide { opacity: 1; }
.recent-room-hide:hover { background: var(--surface2); color: var(--text); }

.recent-room-delete {
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.82rem;
  opacity: 0;
  padding: 4px 7px;
  transition: opacity 0.15s, background 0.15s, color 0.15s;
}
.recent-room-item:hover .recent-room-delete { opacity: 1; }
.recent-room-delete:hover { background: rgba(255,80,80,0.12); color: #ff8080; }

/* ── Delete room button ───────────────────────────────── */
.delete-room-btn {
  background: transparent;
  border: 1.5px solid rgba(255,80,80,0.3);
  border-radius: 8px;
  color: #ff8080;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 10px;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.delete-room-btn:hover { background: rgba(255,80,80,0.12); border-color: rgba(255,80,80,0.6); }

/* ── Settings button ─────────────────────────────────── */
.settings-btn {
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 10px;
  transition: border-color 0.15s, color 0.15s;
  white-space: nowrap;
}
.settings-btn:hover { border-color: var(--vk); color: var(--vk); }

/* ── Settings modal ──────────────────────────────────── */
.modal-box--wide { max-width: 580px; }
.modal-sub { color: var(--muted); font-size: 0.8rem; line-height: 1.5; margin-top: -6px; }

.rice-settings-form { display: flex; flex-direction: column; gap: 16px; }

.rice-settings-section {
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
}
.rice-settings-section-header { align-items: center; display: flex; gap: 10px; margin-bottom: 2px; }
.rice-settings-badge {
  align-items: center;
  background: var(--vk);
  border-radius: 7px;
  color: #fff;
  display: flex;
  font-size: 0.9rem;
  font-weight: 800;
  height: 30px;
  justify-content: center;
  width: 30px;
  flex-shrink: 0;
}
.rice-settings-crit-name { color: var(--text); font-size: 0.88rem; font-weight: 700; }

.rice-settings-field label { color: var(--muted); display: block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.05em; margin-bottom: 5px; text-transform: uppercase; }
.rice-settings-field textarea { min-height: 56px; resize: vertical; }

.rice-hints-row { display: flex; gap: 8px; }
.rice-hint-field { display: flex; flex-direction: column; flex: 1; gap: 5px; }
.rice-hint-field label { color: var(--muted); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.05em; text-align: center; text-transform: uppercase; }
.rice-hint-field .vk-input { text-align: center; padding: 8px 6px; font-size: 0.85rem; }

/* ── Epic delete button ───────────────────────────────── */
.epic-delete-btn {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1;
  opacity: 0.4;
  padding: 4px 7px;
  transition: opacity 0.15s, background 0.15s, border-color 0.15s, color 0.15s;
}
.epic-card:hover .epic-delete-btn { opacity: 1; }
.epic-delete-btn:hover { background: rgba(255,80,80,0.12); border-color: rgba(255,80,80,0.3); color: #ff8080; }

/* ── Epic edit button ────────────────────────────────── */
.epic-edit-btn {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1;
  opacity: 0.4;
  padding: 4px 7px;
  transition: opacity 0.15s, background 0.15s, border-color 0.15s, color 0.15s;
}
.epic-card:hover .epic-edit-btn { opacity: 1; }
.epic-edit-btn:hover { background: rgba(0,119,255,0.12); border-color: rgba(0,119,255,0.3); color: var(--vk); }

/* ── Epic card note ──────────────────────────────────── */
.epic-card-note {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
  margin-top: 4px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* ── Scoring banner: URL & note ──────────────────────── */
.scoring-epic-url {
  color: rgba(0,119,255,0.7);
  font-size: 0.72rem;
  overflow: hidden;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
}
.scoring-epic-url:hover { color: var(--vk); text-decoration: underline; }

.scoring-epic-note {
  background: rgba(255,255,255,0.05);
  border-left: 2px solid rgba(0,119,255,0.3);
  border-radius: 4px;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.45;
  margin-top: 2px;
  padding: 3px 8px;
  width: 100%;
}
