:root {
  --bg: #0f1420;
  --bg-card: #161d2e;
  --bg-card-hover: #1c2438;
  --border: #232c42;
  --text: #e6e9f0;
  --text-dim: #8891a8;
  --accent: #ff7a1a;
  --accent-2: #22c55e;
  --radius: 12px;
}
* { box-sizing: border-box; }
html { overflow-x: hidden; }
body {
  margin: 0;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  overflow-x: hidden;
  max-width: 100vw;
}
a { color: inherit; text-decoration: none; }
.wrap { width: 100%; margin: 0 auto; padding: 0 28px; box-sizing: border-box; }

/* Header */
.site-header { background: #0b0f18; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; gap: 24px; padding: 14px 20px; flex-wrap: wrap; }
.logo { font-weight: 800; font-size: 1.25rem; color: var(--text); display: inline-flex; align-items: center; gap: 8px; }
.logo span { color: var(--accent); font-weight: 600; }
.logo-icon { width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0; }
.search-form { flex: 0 1 420px; min-width: 160px; display: flex; position: relative; }
.search-form input { flex: 1; min-width: 0; padding: 9px 14px; border-radius: 20px 0 0 20px; border: 1px solid var(--border); background: var(--bg-card); color: var(--text); outline: none; }
.search-form button { padding: 9px 16px; border-radius: 0 20px 20px 0; border: 1px solid var(--accent); background: var(--accent); color: #fff; cursor: pointer; }
.search-suggest { display: none; position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; box-shadow: 0 12px 28px rgba(0,0,0,.4); z-index: 60; }
.search-suggest.open { display: block; }
.search-suggest a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; }
.search-suggest a:hover, .search-suggest a.active { background: var(--bg-card-hover); }
.search-suggest .ss-icon { width: 32px; height: 32px; border-radius: 8px; background: #202a42; display: flex; align-items: center; justify-content: center; font-size: 16px; overflow: hidden; flex-shrink: 0; }
.search-suggest .ss-icon img { width: 100%; height: 100%; object-fit: cover; }
.search-suggest .ss-text { display: flex; flex-direction: column; min-width: 0; }
.search-suggest .ss-text strong { font-size: .88rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-suggest .ss-text small { font-size: .76rem; color: var(--text-dim); }
.header-nav { display: flex; align-items: center; gap: 16px; font-size: .92rem; margin-left: auto; }
.header-nav a { color: var(--text-dim); white-space: nowrap; }
.header-nav a:hover { color: var(--text); }
.nav-account { display: flex; align-items: center; gap: 8px; }
.nav-avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-size: .78rem; font-weight: 700; overflow: hidden; flex-shrink: 0; text-transform: uppercase; }
.nav-avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-preview { width: 64px; height: 64px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; font-weight: 700; overflow: hidden; flex-shrink: 0; text-transform: uppercase; }
.avatar-preview img { width: 100%; height: 100%; object-fit: cover; }

.nav-bell { position: relative; font-size: 1rem; line-height: 1; }
.bell-badge { position: absolute; top: -8px; right: -10px; background: #e0245e; color: #fff; font-size: .65rem; font-weight: 700; line-height: 1; padding: 3px 5px; border-radius: 10px; min-width: 16px; text-align: center; }

.announcement-list { display: flex; flex-direction: column; gap: 14px; max-width: 720px; }
.announcement-item { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }
.announcement-item h3 { margin: 0 0 4px; font-size: 1.05rem; }
.announcement-date { font-size: .78rem; color: var(--text-dim); margin-bottom: 10px; }
.announcement-content { color: #ccd2e0; line-height: 1.6; white-space: pre-wrap; }

@media (max-width: 700px) {
  .wrap { padding: 0 14px; }
  .header-inner { padding: 10px 14px; gap: 10px; }
  .search-form { flex: 1 1 100%; order: 3; max-width: none; }
  .header-nav { gap: 10px; font-size: .82rem; }
  .header-nav a.btn-outline { padding: 5px 10px; }
}
.btn-outline { border: 1px solid var(--accent); color: var(--accent) !important; padding: 6px 14px; border-radius: 8px; }

/* Layout */
.main-content { padding: 28px 20px 60px; min-height: 60vh; }
.page-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.page-header h1 { font-size: 1.5rem; margin: 0; }

.layout { display: grid; grid-template-columns: 220px 1fr; gap: 28px; align-items: start; }
.layout > div { min-width: 0; width: 100%; }
@media (max-width: 800px) {
  .layout { display: block; }
  .sidebar { position: static; margin-bottom: 20px; }
  .sidebar-box:first-child { padding: 12px; }
  .sidebar-box:first-child h3 { display: none; }
  .sidebar-box:first-child ul { display: flex; flex-direction: row; overflow-x: auto; gap: 8px; padding-bottom: 2px; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
  .sidebar-box:first-child li { margin-bottom: 0; flex-shrink: 0; }
  .sidebar-box:first-child a { flex-direction: row-reverse; white-space: nowrap; padding: 8px 12px; background: var(--bg-card-hover); border-radius: 20px; gap: 6px; }
  .sidebar-box:first-child a span { color: inherit; opacity: .75; }
  .sidebar-stats { display: none; }

  .popular-box { padding: 12px; }
  .popular-box h3 { display: none; }
  .popular-list { display: flex; flex-direction: row; overflow-x: auto; gap: 8px; padding-bottom: 2px; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
  .popular-list li { margin-bottom: 0; flex-shrink: 0; }
  .popular-list a { flex-direction: column; align-items: center; gap: 4px; padding: 6px 4px; width: 64px; text-align: center; }
  .popular-list .popular-icon { width: 36px; height: 36px; font-size: 18px; }
  .popular-list .popular-name { font-size: .72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
}

.sidebar { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 16px; }
.sidebar-box { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.sidebar-box h3 { margin: 0 0 10px; font-size: .85rem; text-transform: uppercase; color: var(--text-dim); letter-spacing: .04em; }
.sidebar-box ul { list-style: none; margin: 0; padding: 0; }
.sidebar-box li { margin-bottom: 4px; }
.sidebar-box a { display: flex; justify-content: space-between; padding: 8px 10px; border-radius: 8px; color: var(--text-dim); font-size: .92rem; }
.sidebar-box a:hover, .sidebar-box a.active { background: var(--bg-card-hover); color: var(--text); }
.sidebar-box a.active { color: var(--accent); }
.stat-row { display: grid; grid-template-columns: 100px 1fr; align-items: center; font-size: .88rem; padding: 6px 2px; }
.stat-row span { color: var(--text-dim); white-space: nowrap; }
.stat-row strong { color: var(--accent); font-weight: 700; text-align: left; }

.popular-box h3 { color: var(--accent); }
.popular-list li { margin-bottom: 2px; }
.popular-list a { display: flex; justify-content: flex-start; align-items: center; gap: 10px; padding: 7px 8px; }
.popular-icon { width: 26px; height: 26px; border-radius: 7px; background: #202a42; display: flex; align-items: center; justify-content: center; font-size: 14px; overflow: hidden; flex-shrink: 0; }
.popular-icon img { width: 100%; height: 100%; object-fit: cover; }

/* Grid of software cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr)); gap: 16px; min-width: 0; }
.card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; display: flex; flex-direction: column; gap: 10px; transition: .15s;
}
.card:hover { background: var(--bg-card-hover); border-color: #333f5c; transform: translateY(-2px); }
.card-top { display: flex; gap: 12px; align-items: flex-start; }
.card-icon { width: 52px; height: 52px; border-radius: 12px; background: #202a42; display: flex; align-items: center; justify-content: center; font-size: 24px; overflow: hidden; flex-shrink: 0; }
.card-icon img { width: 100%; height: 100%; object-fit: cover; }

.icon-badge-wrap { position: relative; flex-shrink: 0; display: inline-flex; }
.icon-badge { position: absolute; top: -7px; left: -8px; background: var(--accent-2); color: #fff; font-size: .6rem; font-weight: 700; line-height: 1; padding: 3px 7px; border-radius: 20px; white-space: nowrap; box-shadow: 0 2px 6px rgba(0,0,0,.35); z-index: 2; text-transform: none; }
.icon-badge-lg { top: -8px; left: -10px; font-size: .72rem; padding: 4px 10px; }
.card-title {
  font-weight: 700; font-size: 1rem; margin: 0; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 2.6em; /* always reserve 2 lines so short 1-line titles don't shift everything below up */
}
.card-dev { font-size: .8rem; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-desc { font-size: .85rem; color: var(--text-dim); flex: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { display: flex; gap: 10px; font-size: .78rem; color: var(--text-dim); flex-wrap: wrap; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: .72rem; font-weight: 600; }
.badge-free { background: rgba(34,197,94,.15); color: var(--accent-2); }
.badge-os { background: rgba(255,255,255,.06); color: var(--text-dim); }
/* grid card: keep the badge row on one line even for long OS text (VD "Windows/macOS/Linux"),
   otherwise it wraps and pushes the download count down, misaligning that card vs its row neighbors */
.card .card-meta { flex-wrap: nowrap; overflow: hidden; }
.card .card-meta .badge-os { max-width: 118px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex-shrink: 1; }

/* Pagination */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 30px; }
.pagination a, .pagination span { padding: 8px 14px; border-radius: 8px; background: var(--bg-card); border: 1px solid var(--border); font-size: .88rem; }
.pagination .current { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Detail page */
.detail-header { display: flex; gap: 20px; align-items: flex-start; margin-bottom: 24px; flex-wrap: wrap; }
.detail-icon { width: 96px; height: 96px; border-radius: 20px; background: #202a42; display: flex; align-items: center; justify-content: center; font-size: 42px; overflow: hidden; flex-shrink: 0; }
.detail-icon img { width: 100%; height: 100%; object-fit: cover; }
.detail-info h1 { margin: 0 0 6px; font-size: 1.6rem; }
.detail-info .card-dev { font-size: .95rem; }
.detail-grid { display: grid; grid-template-columns: 1fr 300px; gap: 28px; align-items: start; margin-bottom: 28px; }
.detail-grid > * { min-width: 0; } /* without this, a wide screenshot forces the grid column (and whole page) wider instead of just scrolling inside .screenshots */
@media (max-width: 820px) { .detail-grid { grid-template-columns: 1fr; } }
.info-box { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.info-box dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; font-size: .88rem; }
.info-box dt { color: var(--text-dim); }
.btn-download {
  display: block; text-align: center; padding: 14px; background: var(--accent); color: #fff;
  border-radius: 10px; font-weight: 700; font-size: 1.05rem; margin-bottom: 16px; border: none; cursor: pointer; width: 100%;
}
.btn-download:hover { filter: brightness(1.08); }
.note-password {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: rgba(255,122,26,.08); border: 1px solid var(--border); border-left: 3px solid var(--accent);
  border-radius: 8px; padding: 12px 16px; font-size: .88rem; margin: 4px 0 24px; color: var(--text-dim);
}
.note-password strong { color: var(--text); }
.note-password code { background: rgba(255,255,255,.08); padding: 3px 10px; border-radius: 6px; color: var(--accent); font-weight: 700; }
.mirror-links { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.mirror-links a { display: block; text-align: center; padding: 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-card); color: var(--text); font-weight: 600; font-size: .92rem; }
.mirror-links a:hover { background: var(--bg-card-hover); border-color: var(--accent); }
.btn-fav { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg-card); cursor: pointer; color: var(--text); font-size: .9rem; }
.btn-fav.active { border-color: #e0245e; color: #e0245e; }

.mini-toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(10px); background: #1c2438; border: 1px solid var(--border); color: var(--text); padding: 10px 18px; border-radius: 30px; font-size: .88rem; box-shadow: 0 8px 24px rgba(0,0,0,.4); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 300; }
.mini-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.screenshots { display: flex; gap: 10px; overflow-x: auto; margin: 16px 0; }
.ss-item { position: relative; flex-shrink: 0; display: inline-block; }
.screenshots img { height: 180px; border-radius: 10px; border: 1px solid var(--border); cursor: zoom-in; transition: transform .15s; display: block; }
.screenshots img:hover { transform: scale(1.03); border-color: var(--accent); }
.ss-video-badge { position: absolute; top: 10px; left: 10px; background: rgba(224,32,32,.92); color: #fff; font-size: .74rem; font-weight: 700; padding: 5px 11px; border-radius: 20px; border: none; cursor: pointer; box-shadow: 0 3px 10px rgba(0,0,0,.4); white-space: nowrap; }
.ss-video-badge:hover { background: rgba(224,32,32,1); }
@media (max-width: 700px) {
  /* mobile: one screenshot per swipe (slide), instead of a cramped multi-thumbnail strip */
  .screenshots { scroll-snap-type: x mandatory; }
  .ss-item { width: 100%; scroll-snap-align: center; }
  .screenshots img { width: 100%; height: auto; aspect-ratio: 16/9; object-fit: cover; }
}

.lightbox { display: none; position: fixed; inset: 0; background: rgba(6,9,16,.92); z-index: 200; align-items: center; justify-content: center; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 88vh; border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.lb-close { position: absolute; top: 18px; right: 22px; background: rgba(255,255,255,.08); border: 1px solid var(--border); color: #fff; width: 40px; height: 40px; border-radius: 50%; font-size: 1.1rem; cursor: pointer; }
.lb-close:hover { background: rgba(255,255,255,.18); }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,.08); border: 1px solid var(--border); color: #fff; width: 48px; height: 48px; border-radius: 50%; font-size: 1.6rem; cursor: pointer; line-height: 1; }
.lb-nav:hover { background: rgba(255,255,255,.18); }
.lb-prev { left: 18px; }
.lb-next { right: 18px; }
@media (max-width: 620px) { .lb-nav { width: 40px; height: 40px; font-size: 1.3rem; } .lb-prev { left: 6px; } .lb-next { right: 6px; } }
.desc-box { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 24px; }
.video-box { margin-bottom: 24px; }
.video-box h3 { margin: 0 0 12px; }
.video-thumb { position: relative; width: 220px; max-width: 100%; aspect-ratio: 16/9; border-radius: 10px; overflow: hidden; background: #000; border: 1px solid var(--border); padding: 0; cursor: pointer; display: block; }
.video-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .85; transition: opacity .15s; }
.video-thumb:hover img { opacity: 1; }
.video-play { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 46px; height: 46px; border-radius: 50%; background: rgba(255,0,0,.85); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; padding-left: 3px; box-shadow: 0 4px 14px rgba(0,0,0,.4); }

.video-modal { display: none; position: fixed; inset: 0; background: rgba(6,9,16,.92); z-index: 200; align-items: center; justify-content: center; padding: 40px; }
.video-modal.open { display: flex; }
.video-modal-inner { width: 100%; max-width: 900px; aspect-ratio: 16/9; border-radius: 10px; overflow: hidden; background: #000; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.video-modal-inner iframe { width: 100%; height: 100%; border: 0; }
.description { line-height: 1.7; color: #ccd2e0; white-space: pre-wrap; }
.description-rich { white-space: normal; max-width: 100%; overflow-x: auto; }
.description-rich h1, .description-rich h2, .description-rich h3, .description-rich h4 { color: var(--text); margin: 18px 0 8px; line-height: 1.3; }
.description-rich h1 { font-size: 1.3rem; }
.description-rich h2 { font-size: 1.15rem; }
.description-rich h3 { font-size: 1.02rem; }
.description-rich p { margin: 0 0 10px; }
.description-rich ul, .description-rich ol { margin: 0 0 10px; padding-left: 22px; }
.description-rich li { margin-bottom: 4px; }
.description-rich a { color: var(--accent); }
.description-rich img { max-width: 100%; border-radius: 10px; border: 1px solid var(--border); margin: 8px 0; display: block; }
.description-rich blockquote { margin: 10px 0; padding: 8px 14px; border-left: 3px solid var(--accent); color: var(--text-dim); }
.description-rich table { border-collapse: collapse; margin: 10px 0; width: 100%; }
.description-rich th, .description-rich td { border: 1px solid var(--border); padding: 6px 10px; text-align: left; }
.description-wrap { position: relative; }
.description-wrap.collapsed { max-height: 180px; overflow: hidden; }
.description-fade { display: none; }
.description-wrap.collapsed .description-fade { display: block; position: absolute; bottom: 0; left: 0; right: 0; height: 60px; background: linear-gradient(transparent, var(--bg-card)); }
.btn-toggle-desc { margin-top: 10px; background: none; border: none; color: var(--accent); font-weight: 600; font-size: .88rem; cursor: pointer; padding: 4px 0; }
.btn-toggle-desc:hover { text-decoration: underline; }

.version-history { margin-top: 30px; }
.version-table { width: 100%; border-collapse: collapse; background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; font-size: .88rem; }
.version-table th, .version-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.version-table th { color: var(--text-dim); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; }
.version-table tr:last-child td { border-bottom: none; }
.v-date { white-space: nowrap; color: var(--text-dim); }
.v-file { color: var(--text); font-weight: 600; margin-bottom: 2px; }
.v-ver { color: var(--text-dim); font-size: .82rem; }
.v-dl { display: inline-block; padding: 6px 14px; border-radius: 8px; background: var(--accent); color: #fff; font-weight: 600; white-space: nowrap; }

.comments { margin-top: 30px; }
.comment { background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 12px 16px; margin-bottom: 10px; }
.comment-head { display: flex; justify-content: space-between; font-size: .82rem; color: var(--text-dim); margin-bottom: 6px; }
textarea, input[type=text], input[type=email], input[type=password], select {
  width: 100%; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--border); background: #101626; color: var(--text); font-family: inherit; font-size: .92rem;
}
.rte-toolbar { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.rte-toolbar button { padding: 6px 10px; border-radius: 6px; border: 1px solid var(--border); background: #101626; color: var(--text); font-size: .82rem; cursor: pointer; }
.rte-toolbar button:hover { background: var(--bg-card-hover); border-color: var(--accent); }
.rte-editor { min-height: 180px; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--border); background: #101626; color: var(--text); font-size: .92rem; line-height: 1.6; overflow-y: auto; }
.rte-editor:focus { outline: none; border-color: var(--accent); }
.rte-editor img { max-width: 100%; border-radius: 8px; margin: 6px 0; display: block; }
.rte-editor h2, .rte-editor h3 { margin: 12px 0 6px; }
.rte-editor ul, .rte-editor ol { padding-left: 22px; margin: 6px 0; }
.cloud-upload-box { background: rgba(255,122,26,.06); border: 1px dashed var(--accent); border-radius: 10px; padding: 14px 16px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; margin-bottom: 6px; font-size: .88rem; color: var(--text-dim); }
.btn { display: inline-block; padding: 10px 20px; border-radius: 8px; background: var(--accent); color: #fff; border: none; cursor: pointer; font-weight: 600; font-size: .92rem; }
.btn-secondary { background: var(--bg-card-hover); border: 1px solid var(--border); }
.auth-box { max-width: 380px; margin: 40px auto; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
.auth-box h1 { font-size: 1.3rem; margin-top: 0; }
.alert { padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; font-size: .88rem; }
.alert-error { background: rgba(224,36,94,.12); color: #ff6b8a; }
.alert-success { background: rgba(34,197,94,.12); color: var(--accent-2); }
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-dim); }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 24px 0; margin-top: 40px; font-size: .82rem; color: var(--text-dim); }
.site-footer p { margin: 4px 0; }

/* Admin */
.admin-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
@media (max-width: 700px) { .admin-table { display: block; overflow-x: auto; white-space: nowrap; } }
.admin-table th, .admin-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; }
.admin-table th { color: var(--text-dim); font-weight: 600; }
.admin-actions a { margin-right: 10px; color: var(--accent); }
.admin-nav { display: flex; gap: 16px; margin-bottom: 20px; border-bottom: 1px solid var(--border); padding-bottom: 12px; }
.admin-nav a { color: var(--text-dim); }
.admin-nav a.active { color: var(--accent); font-weight: 600; }
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); gap: 14px; margin-bottom: 24px; }
.stat-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.stat-card .num { font-size: 1.6rem; font-weight: 800; }
.stat-card .label { font-size: .8rem; color: var(--text-dim); }
.checkbox-row { display: flex; gap: 16px; flex-wrap: wrap; }
.checkbox-row label { display: flex; align-items: center; gap: 6px; font-size: .88rem; width: auto; }

.repeat-row { display: flex; gap: 8px; margin-bottom: 8px; align-items: center; }
.repeat-row input { flex: 1; min-width: 0; }
.repeat-row-ver input { flex: 1 1 0; }
.btn-remove-row { flex-shrink: 0; width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg-card); color: var(--text-dim); cursor: pointer; font-size: .9rem; }
.btn-remove-row:hover { color: #ff6b8a; border-color: #ff6b8a; }
@media (max-width: 700px) { .repeat-row-ver { flex-wrap: wrap; } .repeat-row-ver input { flex: 1 1 45%; } }
