:root {
  color-scheme: light;
  --bg: #e9ecef;
  --bg-elevated: #ffffff;
  --bg-card: #ffffff;
  --border: #d0d4da;
  --border-strong: #b8bec6;
  --text: #1f2328;
  --text-muted: #5f6772;
  --accent: #1f2328;
  --accent-hover: #000000;
  --accent-soft: rgba(31, 35, 40, 0.06);
  --danger: #b42318;
  --danger-soft: rgba(180, 35, 24, 0.08);
  --success: #1f7a4d;
  --success-soft: rgba(31, 122, 77, 0.08);
  --radius: 0;
  --radius-sm: 0;
  --shadow: none;
  --font-sans: "Roboto", Arial, sans-serif;
  --font-display: "Roboto Condensed", "Roboto", Arial, sans-serif;
  --container: 1140px;
  --tag-bg: #f1f3f5;
  --tag-text: #1f2328;
}

/* Vždy světlý vzhled jako na slovickarim.cz */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--accent-hover);
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

.container-narrow {
  width: min(100% - 2rem, 760px);
  margin-inline: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Header */
.site-header {
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}

.header-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 72px;
  padding: 0.35rem 0;
}

.header-nav-row {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
  min-width: 0;
}

.main-nav {
  min-width: 0;
}

.header-search {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  flex-shrink: 0;
}

.header-search .search-input {
  width: 130px;
  padding: 0.4rem 0.55rem;
  font-size: 0.85rem;
}

.header-search .btn-search {
  padding: 0.4rem 0.75rem;
  min-width: auto;
  font-size: 0.82rem;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  white-space: nowrap;
}

.site-logo:hover {
  color: var(--text);
}

.logo-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.logo-text {
  font-family: var(--font-display);
}

.main-menu-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0.15rem 0.35rem;
}

.main-menu-list li {
  margin: 0;
  padding: 0;
}

.main-menu-list li a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.55rem;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.main-menu-list li a:hover {
  color: #000;
  text-decoration: underline;
}

.main-menu-list li.active a {
  text-decoration: underline;
}

.menu-icon {
  font-size: 1rem;
  line-height: 1;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}

.header-action-link {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
}

.header-action-link:hover {
  text-decoration: underline;
}

.inline-form {
  display: inline;
  margin: 0;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: 1px solid var(--border);
  cursor: pointer;
  padding: 0.45rem;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.1rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-sm {
  padding: 0.45rem 0.9rem;
  font-size: 0.9rem;
}

.btn-block {
  width: 100%;
}

.btn-primary {
  background: var(--text);
  color: #ffffff;
}

.btn-primary:hover {
  background: #000;
  color: #ffffff;
}

.btn-dark {
  background: #111;
  color: #fff;
  border-color: #111;
}

.btn-dark:hover {
  background: #000;
  color: #fff;
}

.btn-outline {
  background: #fff;
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-outline:hover {
  background: #f5f5f5;
  color: var(--text);
}

.btn-search {
  background: #111;
  color: #fff;
  border: 1px solid #111;
  padding: 0.55rem 1.1rem;
  min-width: 3.5rem;
}

.btn-search:hover {
  background: #000;
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border);
}

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

.btn-danger {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: rgba(255, 107, 122, 0.25);
}

.btn-danger:hover {
  background: var(--danger);
  color: white;
}

/* Main layout */
.site-main {
  min-height: calc(100vh - 180px);
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.25rem 0;
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.site-footer p {
  margin: 0;
}

.top-banner {
  background: var(--bg-elevated);
  padding: 1.75rem 0 0;
}

.top-banner h1 {
  margin: 0;
  padding-bottom: 0.45rem;
  border-bottom: 2px solid var(--border-strong);
  display: inline-block;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text);
}

.main-wrap {
  padding: 1.5rem 0 3rem;
}

.main-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 1.5rem;
  align-items: start;
}

.content-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 1.75rem 2rem;
}

.col-main {
  min-width: 0;
}

.col-sidebar {
  min-width: 0;
}

.sidebox {
  border: 1px solid var(--border);
  background: var(--bg-card);
  padding: 1rem;
  margin-bottom: 1rem;
}

.sidebar-title {
  display: block;
  margin-bottom: 0.85rem;
  padding-bottom: 0.35rem;
  border-bottom: 2px solid var(--border-strong);
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
}

.sidebar-search {
  margin: 0;
}

.search-input-group {
  display: flex;
  gap: 0.5rem;
}

.search-input {
  flex: 1;
  min-width: 0;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border-strong);
  border-radius: 0;
  background: #fff;
  color: var(--text);
  font: inherit;
}

.search-input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.sidebar-article-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar-article-list li {
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
}

.sidebar-article-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.sidebar-article-title {
  color: var(--text);
  font-weight: 600;
  line-height: 1.35;
}

.sidebar-article-title:hover {
  color: var(--accent);
}

.article-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.article-list-item {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}

.article-list-item:first-child {
  padding-top: 0;
}

.article-list-title {
  display: inline-block;
  margin-bottom: 0.35rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.article-list-title:hover {
  color: #000;
  text-decoration: underline;
}

.article-list-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.article-list-category {
  color: var(--text);
  font-weight: 700;
  text-decoration: underline;
}

.article-list-desc {
  margin: 0;
  color: var(--text-muted);
}

.intro-text p {
  margin: 0 0 1rem;
  font-size: 1rem;
  line-height: 1.65;
}

.intro-text p:last-child {
  margin-bottom: 0;
}

.text-list,
.sidebar-text-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.text-list-item,
.sidebar-text-item {
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
  line-height: 1.35;
}

.text-list-item:first-child,
.sidebar-text-item:first-child {
  padding-top: 0;
}

.text-list-item:last-child,
.sidebar-text-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.text-list-title,
.sidebar-text-title {
  color: var(--text);
  font-weight: 700;
}

.text-list-title:hover,
.sidebar-text-title:hover {
  text-decoration: underline;
}

.text-list-author,
.sidebar-text-author {
  display: block;
  margin-top: 0.15rem;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 400;
}

.sidebar-text-item {
  padding: 0.4rem 0;
}

.sidebar-text-title {
  font-size: 0.9rem;
  font-weight: 600;
}

.sidebar-text-author {
  font-size: 0.78rem;
}

.results-info {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

.article-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.article-card:hover {
  border-color: rgba(108, 140, 255, 0.4);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.article-card time {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.article-card h2 {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.35;
}

.article-card h2 a {
  color: var(--text);
}

.article-card h2 a:hover {
  color: var(--accent-hover);
}

.article-card p {
  margin: 0;
  color: var(--text-muted);
  flex: 1;
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  margin-top: 0.25rem;
}

.empty-state {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--text-muted);
}

/* Article detail */
.article-detail {
  padding-top: 0;
}

.back-link {
  display: inline-block;
  margin-bottom: 1.25rem;
  color: var(--text-muted);
}

.article-header {
  margin-bottom: 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.article-header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  line-height: 1.2;
  margin: 0.5rem 0 1rem;
}

.article-lead {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin: 0;
}

.article-body p {
  margin: 0 0 1.25rem;
  font-size: 1.05rem;
}

.rich-content {
  font-size: 1.05rem;
  line-height: 1.75;
}

.rich-content h1,
.rich-content h2,
.rich-content h3,
.rich-content h4 {
  font-family: var(--font-display);
  line-height: 1.3;
  margin: 2rem 0 1rem;
}

.rich-content h1 { font-size: 2rem; }
.rich-content h2 { font-size: 1.6rem; }
.rich-content h3 { font-size: 1.3rem; }
.rich-content h4 { font-size: 1.1rem; }

.rich-content p,
.rich-content ul,
.rich-content ol,
.rich-content blockquote,
.rich-content table {
  margin: 0 0 1.25rem;
}

.rich-content ul,
.rich-content ol {
  padding-left: 1.5rem;
}

.rich-content blockquote {
  border-left: 4px solid var(--accent);
  padding-left: 1rem;
  color: var(--text-muted);
  font-style: italic;
}

.rich-content a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.rich-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  margin: 1rem 0;
}

.rich-content table {
  width: 100%;
  border-collapse: collapse;
  overflow-x: auto;
  display: block;
}

.rich-content th,
.rich-content td {
  border: 1px solid var(--border);
  padding: 0.6rem 0.8rem;
  text-align: left;
}

.rich-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

.password-hint {
  margin: -0.25rem 0 1rem;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.auth-section {
  display: grid;
  place-items: center;
  min-height: 60vh;
  padding: 2rem 0;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.auth-card h1 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
}

.auth-subtitle {
  color: var(--text-muted);
  margin: 0 0 1.5rem;
}

.auth-footer {
  margin: 1.5rem 0 0;
  text-align: center;
}

/* Forms */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 500;
  font-size: 0.95rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font: inherit;
  resize: vertical;
}

.form-group select {
  cursor: pointer;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Alerts */
.alert {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.alert-error {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid rgba(255, 107, 122, 0.25);
}

.alert-success {
  background: var(--success-soft);
  color: var(--success);
  border: 1px solid rgba(95, 212, 154, 0.25);
}

/* Admin */
.admin-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}

.admin-header h1 {
  font-family: var(--font-display);
  margin: 0 0 0.35rem;
}

.admin-header p {
  margin: 0;
  color: var(--text-muted);
}

.admin-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.5rem;
  align-items: start;
}

.admin-grid-editor {
  grid-template-columns: 1fr 340px;
}

.admin-card-wide {
  min-width: 0;
}

.editor-hint {
  margin: -0.5rem 0 1.25rem;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.article-form .tox-tinymce {
  border-radius: var(--radius-sm) !important;
  border-color: var(--border) !important;
}

.article-form .tox .tox-edit-area__iframe {
  background: var(--bg-elevated) !important;
}

.admin-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.admin-card h2 {
  margin: 0 0 1.25rem;
  font-size: 1.15rem;
}

.admin-article-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.admin-article-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}

.admin-article-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.admin-article-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.admin-article-info a {
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-article-info span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.muted {
  color: var(--text-muted);
}

/* Categories */
.categories-section {
  padding-bottom: 1.25rem;
}

.category-panel {
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  background: var(--bg-card);
}

.category-heading {
  margin: 0 0 1rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.category-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.category-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.category-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.category-pill-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.category-pill-active:hover {
  color: #fff;
}

.category-badge {
  display: inline-block;
  margin: 0.35rem 0 0.5rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.meta-sep {
  opacity: 0.6;
}

.article-author {
  font-weight: 500;
}

/* Tags */
.tags-section {
  padding-bottom: 0.5rem;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: var(--tag-bg);
  color: var(--tag-text);
  font-size: 0.85rem;
  font-weight: 600;
  transition: background 0.2s, transform 0.15s;
}

.tag-pill:hover {
  transform: translateY(-1px);
  color: var(--accent-hover);
}

.tag-pill-active {
  background: var(--accent);
  color: #fff;
}

.tag-pill-sm {
  font-size: 0.78rem;
  padding: 0.2rem 0.55rem;
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.25rem 0 0.5rem;
}

.filter-clear {
  margin-left: 0.5rem;
  font-size: 0.9rem;
}

.field-hint {
  margin: 0.35rem 0 0;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.admin-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.admin-article-tags {
  font-size: 0.8rem;
  color: var(--tag-text);
}

.badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-primary {
  background: var(--accent-soft);
  color: var(--accent);
}

/* Sorting, upvotes, comments */
.sort-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border);
}

.sort-link {
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.sort-link:hover,
.sort-link-active {
  color: var(--text);
  text-decoration: underline;
}

.text-list-meta,
.sidebar-text-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.2rem;
}

.reputation-badge,
.upvote-badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
}

.upvote-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.75rem 0;
}

.upvote-form {
  margin: 0;
}

.btn-upvote {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border-strong);
  padding: 0.4rem 0.85rem;
  font-size: 0.85rem;
}

.btn-upvote:hover {
  background: #f5f5f5;
}

.btn-upvote-active {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
}

.upvote-count {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 600;
}

.comments-section {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 2px solid var(--border);
}

.comments-heading {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
}

.comment-list {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
}

.comment-item {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
}

.comment-item:last-child {
  border-bottom: none;
}

.comment-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.comment-author {
  color: var(--text);
}

.comment-body {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.55;
}

.comments-disabled {
  color: var(--text-muted);
  font-style: italic;
}

.form-group-checkbox {
  margin-bottom: 1rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  cursor: pointer;
}

.checkbox-label input {
  width: auto;
}

.admin-side-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.admin-comment-list,
.admin-ban-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.admin-comment-item {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.admin-comment-item:first-child {
  padding-top: 0;
}

.admin-comment-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.admin-comment-text {
  margin: 0 0 0.35rem;
  white-space: pre-wrap;
}

.admin-comment-article {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.admin-comment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: flex-start;
}

.admin-ban-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
}

.comment-ip {
  font-family: monospace;
  font-size: 0.82rem;
}

.badge-ok {
  background: var(--success-soft);
  color: var(--success);
  font-size: 0.72rem;
  padding: 0.1rem 0.4rem;
  margin-left: 0.35rem;
}

.badge-warn {
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 0.72rem;
  padding: 0.1rem 0.4rem;
  margin-left: 0.35rem;
}

.ip-ban-form .btn {
  margin-top: 0.25rem;
}

/* Responsive */
@media (max-width: 980px) {
  .admin-grid,
  .admin-grid-editor,
  .main-layout {
    grid-template-columns: 1fr;
  }

  .header-bar {
    flex-wrap: wrap;
    align-items: flex-start;
    padding: 0.75rem 0 1rem;
  }

  .menu-toggle {
    display: flex;
    margin-left: auto;
  }

  .header-nav-row {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .site-header.menu-open .header-nav-row {
    display: flex;
  }

  .main-menu-list {
    flex-direction: column;
    align-items: stretch;
    border: 1px solid var(--border);
    background: #fff;
    padding: 0.35rem 0;
  }

  .main-menu-list li a {
    padding: 0.65rem 0.9rem;
  }

  .header-search {
    width: 100%;
  }

  .header-search .search-input {
    flex: 1;
    width: auto;
  }

  .header-actions {
    justify-content: flex-start;
    width: 100%;
  }
}

@media (max-width: 720px) {
  .content-box {
    padding: 1.25rem 1rem;
  }

  .admin-article-item {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
