* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
  background-color: #f0f2f5;
  color: #1c1e21;
}

/* Header */
header {
  background-color: #ffffff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  max-width: 680px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

h1 {
  font-size: 1.2rem;
  color: #ff4a3d;
}

.identity-panel {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: #606770;
}

.identity-label { color: #9ca3af; }

.current-id-display {
  color: #1c1e21;
  font-size: 0.88rem;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-change-id {
  background: none;
  border: 1px solid #ccd0d5;
  color: #606770;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.78rem;
  cursor: pointer;
}
.btn-change-id:hover { background: #f0f2f5; border-color: #9ca3af; }

/* Main layout */
main {
  max-width: 680px;
  margin: 20px auto;
  padding: 0 12px;
}

/* Create post */
.create-post {
  background: white;
  padding: 16px;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  margin-bottom: 12px;
}

.create-post textarea {
  width: 100%;
  min-height: 80px;
  border: none;
  resize: none;
  outline: none;
  font-size: 1rem;
  margin-bottom: 12px;
  line-height: 1.5;
}

/* Subject picker */
.subject-picker {
  border: 1px solid #e4e6eb;
  border-radius: 8px;
  margin-bottom: 12px;
  overflow: hidden;
}

.subject-picker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: #fffafa;
  border-bottom: 1px solid #e4e6eb;
  font-size: 0.85rem;
  font-weight: 600;
  color: #606770;
}

.subject-count-badge {
  background: #fff0ef;
  color: #ff4a3d;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.78rem;
}

.subject-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 12px;
  max-height: 160px;
  overflow-y: auto;
}

.subject-checkbox {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border: 1px solid #ccd0d5;
  border-radius: 16px;
  font-size: 0.82rem;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s, border-color 0.15s;
}

.subject-checkbox:hover { background: #f0f2f5; }

.subject-checkbox input[type=checkbox] {
  accent-color: #ff4a3d;
  width: 13px;
  height: 13px;
}

.subject-checkbox:has(input:checked) {
  background: #fff0ef;
  border-color: #ff4a3d;
  color: #ff4a3d;
  font-weight: 600;
}

.create-post button#btn-post {
  width: 100%;
  background-color: #ff4a3d;
  color: white;
  border: none;
  padding: 10px;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  font-size: 0.95rem;
}

.create-post button#btn-post:hover { background-color: #e63e32; }

/* Filter bar */
.filter-bar {
  background: white;
  padding: 12px 16px;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  margin-bottom: 16px;
}

.filter-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.filter-row select,
.filter-row input[type=date] {
  padding: 7px 10px;
  border: 1px solid #ccd0d5;
  border-radius: 6px;
  font-size: 0.85rem;
  outline: none;
  color: #1c1e21;
  flex: 1;
  min-width: 120px;
}

.filter-row select:focus,
.filter-row input[type=date]:focus { border-color: #ff4a3d; }

.btn-filter {
  background: #ff4a3d;
  color: white;
  border: none;
  padding: 7px 16px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.btn-filter:hover { background: #e63e32; }

.btn-filter-clear {
  background: #f0f2f5;
  color: #606770;
  border: 1px solid #ccd0d5;
  padding: 7px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  white-space: nowrap;
}

.btn-filter-clear:hover { background: #e4e6eb; }

/* Post */
.post {
  background: white;
  padding: 16px;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  margin-bottom: 14px;
}

.post-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.post-header > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.author {
  font-weight: bold;
  font-size: 0.95rem;
  color: #1c1e21;
}

.post-id-link {
  font-size: 0.75rem;
  color: #9ca3af;
  text-decoration: none;
  font-family: monospace;
}

.post-id-link:hover { color: #ff4a3d; text-decoration: underline; }

.time {
  font-size: 0.78rem;
  color: #9ca3af;
}

/* Subject tags on posts */
.subject-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 10px;
}

.subject-tag {
  background: #fff0ef;
  color: #ff4a3d;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 600;
}

.post-content {
  margin-bottom: 12px;
  line-height: 1.6;
  font-size: 0.95rem;
}

/* Reactions */
.actions {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  border-top: 1px solid #ebedf0;
  border-bottom: 1px solid #ebedf0;
  padding: 6px 0;
}

.actions button {
  background: none;
  border: none;
  color: #606770;
  font-weight: 600;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 0.85rem;
  transition: background 0.15s;
}

.actions button:hover { background-color: #f0f2f5; }
.actions button.active { color: #ff4a3d; }

/* Comments */
.comments-section {
  background-color: #f7f8fa;
  padding: 10px;
  border-radius: 8px;
}

.comments-list { margin-bottom: 8px; }

.comment {
  background: white;
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 6px;
  border: 1px solid #e4e6eb;
}

.comment:last-child { margin-bottom: 0; }

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.comment-author {
  font-weight: 700;
  font-size: 0.85rem;
  color: #1c1e21;
}

.comment-time {
  font-size: 0.72rem;
  color: #9ca3af;
}

.comment-body {
  font-size: 0.88rem;
  line-height: 1.4;
  color: #1c1e21;
}

.comment-input-area {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.comment-input-area input {
  flex-grow: 1;
  padding: 7px 12px;
  border: 1px solid #ccd0d5;
  border-radius: 20px;
  outline: none;
  font-size: 0.85rem;
}

.comment-input-area input:focus { border-color: #1877f2; }

.comment-input-area button {
  background-color: #ff4a3d;
  color: white;
  border: none;
  padding: 7px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
}

.comment-input-area button:hover { background-color: #e63e32; }

/* Back link (post.html) */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #ff4a3d;
  text-decoration: none;
  font-weight: 600;
  margin-bottom: 16px;
  font-size: 0.9rem;
}

.back-link:hover { text-decoration: underline; }

/* Comment reactions */
.comment-reactions {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

.cr-btn {
  background: none;
  border: 1px solid #e4e6eb;
  color: #606770;
  padding: 2px 9px;
  border-radius: 12px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
  line-height: 1.6;
}

.cr-btn:hover { background: #f0f2f5; border-color: #ccd0d5; }

.cr-btn.active {
  background: #fff0ef;
  border-color: #ff4a3d;
  color: #ff4a3d;
  font-weight: 600;
}

/* Registration modal */
.register-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 9000;
  align-items: center;
  justify-content: center;
}

.register-overlay.visible {
  display: flex;
}

.register-card {
  background: white;
  border-radius: 16px;
  padding: 40px 36px;
  width: 420px;
  max-width: calc(100vw - 32px);
  box-shadow: 0 8px 40px rgba(0,0,0,0.2);
  text-align: center;
  animation: slide-up 0.22s ease;
}

@keyframes slide-up {
  from { transform: translateY(24px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.register-icon { font-size: 2.8rem; margin-bottom: 12px; }

.register-card h2 {
  font-size: 1.35rem;
  color: #1c1e21;
  margin-bottom: 6px;
}

.register-subtitle {
  color: #606770;
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.reg-input-group {
  margin-bottom: 8px;
  text-align: left;
}

.reg-input-group input {
  width: 100%;
  padding: 11px 14px;
  border: 2px solid #ccd0d5;
  border-radius: 8px;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.15s;
  font-family: monospace;
  letter-spacing: 0.02em;
}

.reg-input-group input:focus { border-color: #ff4a3d; }

.reg-status {
  min-height: 20px;
  font-size: 0.82rem;
  margin-top: 6px;
  padding-left: 2px;
}

.reg-status.ok       { color: #2e7d32; }
.reg-status.error    { color: #d32f2f; }
.reg-status.checking { color: #9ca3af; }

.reg-hint {
  font-size: 0.78rem;
  color: #9ca3af;
  margin-bottom: 20px;
  text-align: left;
}

.reg-hint code {
  background: #f0f2f5;
  padding: 1px 4px;
  border-radius: 3px;
  font-family: monospace;
}

.btn-register {
  width: 100%;
  background: #ff4a3d;
  color: white;
  border: none;
  padding: 13px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}

.btn-register:hover:not(:disabled) { background: #e63e32; }

.btn-register:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Misc */
.loading-msg { text-align: center; padding: 40px; color: #606770; }
.error-msg   { text-align: center; padding: 40px; color: #d32f2f; }

.post-id-badge {
  font-size: 0.75rem;
  color: #9ca3af;
  font-family: monospace;
}

/* ── Auth modal (login + register) ─────────────────────── */
.auth-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 9100;
  align-items: center;
  justify-content: center;
}
.auth-overlay.visible { display: flex; }

.auth-card {
  background: white;
  border-radius: 16px;
  padding: 36px 32px 28px;
  width: 400px;
  max-width: calc(100vw - 32px);
  box-shadow: 0 10px 48px rgba(0,0,0,0.22);
  animation: auth-in 0.2s ease;
}

@keyframes auth-in {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.auth-icon { font-size: 2.4rem; text-align: center; margin-bottom: 8px; }
.auth-card h2 { text-align: center; font-size: 1.25rem; color: #1c1e21; margin-bottom: 18px; }

/* Tabs */
.auth-tabs {
  display: flex;
  border-bottom: 2px solid #e4e6eb;
  margin-bottom: 20px;
}

.auth-tab {
  flex: 1;
  background: none;
  border: none;
  padding: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #606770;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: color 0.15s;
}
.auth-tab.active { color: #1877f2; border-bottom-color: #1877f2; }
.auth-tab:hover:not(.active) { background: #f7f8fa; }

/* Panes */
.auth-pane { display: none; }
.auth-pane.active { display: block; }

/* Fields */
.auth-field { margin-bottom: 14px; }
.auth-field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #606770;
  margin-bottom: 5px;
}

.auth-field input,
.auth-field .pw-wrap input {
  width: 100%;
  padding: 10px 13px;
  border: 1.5px solid #ccd0d5;
  border-radius: 7px;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.15s;
}
.auth-field input:focus,
.auth-field .pw-wrap input:focus { border-color: #ff4a3d; }

.pw-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.pw-wrap input { padding-right: 42px; }
.pw-eye {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  padding: 2px;
  opacity: 0.6;
}
.pw-eye:hover { opacity: 1; }

/* Hints below field */
.field-hint {
  font-size: 0.78rem;
  margin-top: 4px;
  min-height: 16px;
  color: #9ca3af;
}
.field-hint.ok       { color: #2e7d32; }
.field-hint.error    { color: #d32f2f; }
.field-hint.warn     { color: #e65100; }
.field-hint.checking { color: #9ca3af; }

/* Status bar above button */
.auth-status {
  min-height: 18px;
  font-size: 0.82rem;
  margin-bottom: 10px;
}
.auth-status.error { color: #d32f2f; }
.auth-status.ok    { color: #2e7d32; }

/* Submit button */
.auth-btn {
  width: 100%;
  background: #ff4a3d;
  color: white;
  border: none;
  padding: 12px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 4px;
  transition: background 0.15s, opacity 0.15s;
}
.auth-btn:hover:not(:disabled) { background: #e63e32; }
.auth-btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* Image upload UI */
.post-image-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.img-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border: 1px solid #ccd0d5;
  border-radius: 16px;
  font-size: 0.82rem;
  color: #606770;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s, border-color 0.15s;
}

.img-upload-btn:hover { background: #f0f2f5; border-color: #9ca3af; }

.img-count-badge {
  font-size: 0.78rem;
  color: #ff4a3d;
  background: #fff0ef;
  padding: 2px 8px;
  border-radius: 10px;
  display: inline-block;
}

.img-count-badge:empty { display: none; }

/* Image gallery (posts & comments) */
.img-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
}

.gallery-img {
  width: 120px;
  height: 90px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #e4e6eb;
  transition: opacity 0.15s;
  display: block;
}

.gallery-img:hover { opacity: 0.88; cursor: zoom-in; }

/* User links (author names) */
.user-link {
  color: inherit;
  font-weight: inherit;
  text-decoration: none;
}
.user-link:hover { color: #ff4a3d; text-decoration: underline; }

/* User profile page header */
.profile-header {
  display: flex;
  align-items: center;
  gap: 14px;
  background: white;
  padding: 20px 20px;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  margin-bottom: 12px;
}

.profile-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #ff4a3d;
  color: white;
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.profile-title {
  font-size: 1.15rem;
  color: #1c1e21;
  font-weight: 700;
}

/* Comment textarea */
.ci-textarea {
  flex-grow: 1;
  padding: 7px 12px;
  border: 1px solid #ccd0d5;
  border-radius: 20px;
  outline: none;
  font-size: 0.85rem;
  font-family: inherit;
  resize: none;
  line-height: 1.45;
  min-height: 34px;
  max-height: 120px;
  overflow-y: auto;
}
.ci-textarea:focus { border-color: #ff4a3d; }

/* Lightbox */
#lb-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}
#lb-overlay.visible { display: flex; }

.lb-img-wrap {
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

#lb-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
  user-select: none;
  display: block;
}

.lb-close {
  position: absolute;
  top: 14px;
  right: 18px;
  background: none;
  border: none;
  color: white;
  font-size: 1.8rem;
  cursor: pointer;
  opacity: 0.75;
  line-height: 1;
  padding: 4px 8px;
}
.lb-close:hover { opacity: 1; }

.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.12);
  border: none;
  color: white;
  font-size: 2.8rem;
  padding: 8px 16px;
  cursor: pointer;
  border-radius: 6px;
  line-height: 1;
  transition: background 0.15s;
}
.lb-nav:hover { background: rgba(255,255,255,0.22); }
.lb-prev { left: 12px; }
.lb-next { right: 12px; }

.lb-counter {
  position: absolute;
  bottom: 16px;
  color: rgba(255,255,255,0.65);
  font-size: 0.88rem;
  pointer-events: none;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  padding: 20px 0 8px;
  flex-wrap: wrap;
}

.pg-btn {
  background: white;
  border: 1px solid #ccd0d5;
  color: #1c1e21;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 500;
  min-width: 36px;
  transition: background 0.12s, border-color 0.12s;
}

.pg-btn:hover:not(:disabled):not(.active) {
  background: #f0f2f5;
  border-color: #9ca3af;
}

.pg-btn.active {
  background: #ff4a3d;
  border-color: #ff4a3d;
  color: white;
  font-weight: 700;
  cursor: default;
}

.pg-btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.pg-ellipsis {
  color: #9ca3af;
  padding: 6px 4px;
  font-size: 0.88rem;
  user-select: none;
}

/* Floating Navigation Buttons */
.floating-nav {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 1000;
}

.nav-scroll-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: #ff4a3d;
  color: white;
  border: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  transition: transform 0.15s, background-color 0.15s;
}

.nav-scroll-btn:hover {
  background-color: #e63e32;
  transform: scale(1.1);
}

/* Date filter label groups */
.date-filter-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
  cursor: default;
}

.date-filter-label {
  font-size: 0.72rem;
  color: #9ca3af;
  font-weight: 500;
  white-space: nowrap;
  pointer-events: none;
}

/* ── Language toggle & Menu ── */
.btn-lang {
  background: none;
  border: 1px solid #ccd0d5;
  color: #606770;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.78rem;
  cursor: pointer;
}
.btn-lang:hover { background: #f0f2f5; border-color: #9ca3af; }

.menu-container {
  position: relative;
}

.btn-menu {
  background: none;
  border: 1px solid #ccd0d5;
  color: #606770;
  padding: 7px 18px;
  border-radius: 12px;
  font-size: 1.15rem;
  font-weight: 600;
  cursor: pointer;
  line-height: 1;
}
.btn-menu:hover { background: #f0f2f5; border-color: #9ca3af; }

.menu-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: white;
  border: 1px solid #e4e6eb;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  min-width: 180px;
  z-index: 500;
  overflow: hidden;
}
.menu-dropdown.open { display: block; }

.menu-item {
  display: block;
  width: 100%;
  padding: 11px 16px;
  background: none;
  border: none;
  text-align: left;
  font-size: 0.88rem;
  color: #1c1e21;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  transition: background 0.12s;
}
.menu-item:hover { background: #f0f2f5; }
.menu-item + .menu-item { border-top: 1px solid #f0f2f5; }
.menu-item.danger { color: #e63e32; }

/* ── Profile page enhancements ── */
.profile-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.profile-avatar-img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e4e6eb;
  display: block;
}

.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #ff4a3d;
  color: white;
  font-size: 1.4rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.avatar-upload-btn {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #ff4a3d;
  color: white;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 2px solid white;
}
.avatar-upload-btn:hover { background: #e63e32; }

.profile-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.profile-bio {
  font-size: 0.88rem;
  color: #606770;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.btn-edit-bio {
  align-self: flex-start;
  background: none;
  border: 1px solid #ccd0d5;
  color: #606770;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.78rem;
  cursor: pointer;
  margin-top: 4px;
}
.btn-edit-bio:hover { background: #f0f2f5; border-color: #9ca3af; }

.bio-edit-section {
  background: white;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  padding: 16px;
  margin-bottom: 12px;
}

.bio-edit-section textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ccd0d5;
  border-radius: 8px;
  font-size: 0.88rem;
  font-family: inherit;
  resize: vertical;
  min-height: 90px;
  outline: none;
  line-height: 1.5;
}
.bio-edit-section textarea:focus { border-color: #ff4a3d; }

.bio-char-count {
  text-align: right;
  font-size: 0.78rem;
  color: #9ca3af;
  margin-top: 4px;
}
.bio-char-count.warn { color: #e63e32; }

.bio-edit-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.btn-save-bio {
  background: #ff4a3d;
  color: white;
  border: none;
  padding: 6px 18px;
  border-radius: 8px;
  font-size: 0.85rem;
  cursor: pointer;
  font-family: inherit;
}
.btn-save-bio:hover { background: #e63e32; }
.btn-cancel-bio {
  background: none;
  border: 1px solid #ccd0d5;
  color: #606770;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  cursor: pointer;
  font-family: inherit;
}
.btn-cancel-bio:hover { background: #f0f2f5; }

/* ── Mobile filter: 3-row grid layout ── */
@media (max-width: 600px) {
  .filter-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  /* Row 1: subject select — full width */
  .filter-row select {
    grid-column: 1 / -1;
    min-width: unset;
    width: 100%;
  }

  /* Row 2: from/to date groups — one column each */
  .filter-row .date-filter-group {
    grid-column: span 1;
    min-width: unset;
  }

  .filter-row .date-filter-group input[type=date] {
    width: 100%;
    min-width: unset;
    flex: unset;
  }

  /* Row 3: buttons — one column each */
  .filter-row .btn-filter,
  .filter-row .btn-filter-clear {
    grid-column: span 1;
  }
}
