:root {
  --bg: #000;
  --panel: #080808;
  --panel-2: #101010;
  --border: #2f3336;
  --text: #e7e9ea;
  --muted: #71767b;
  --accent: #1d9bf0;
  --heart: #f91880;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  font-size: 15px;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button,
input,
textarea,
select {
  font: inherit;
}

.site-shell {
  display: grid;
  grid-template-columns: minmax(190px, 270px) minmax(0, 620px) minmax(280px, 360px);
  max-width: 1260px;
  margin: 0 auto;
  min-height: 100vh;
}

.left-column {
  border-right: 1px solid var(--border);
}

.right-column {
  border-left: 1px solid var(--border);
}

.left-inner {
  position: sticky;
  top: 0;
  padding: 16px;
  max-height: 100vh;
  overflow: auto;
}

.right-inner {
  position: sticky;
  top: 0;
  padding: 16px;
  max-height: none;
  overflow: visible;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--text);
  color: var(--bg);
  display: grid;
  place-items: center;
  font-weight: 700;
}

.brand small {
  display: block;
  color: var(--muted);
  margin-top: 2px;
}

.main-nav {
  display: grid;
  gap: 8px;
  margin-bottom: 24px;
}

.main-nav a {
  padding: 12px 14px;
  border-radius: 999px;
  font-size: 18px;
}

.main-nav a:hover {
  background: var(--panel-2);
  text-decoration: none;
}

.post-button,
.comment-form button,
.tag-actions button,
.admin-form button,
.login-card button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  padding: 0 18px;
  background: var(--accent);
  color: white;
  font-weight: 700;
  cursor: pointer;
}

.post-button {
  width: 100%;
  min-height: 50px;
}

.center-column {
  min-width: 0;
  border-right: 1px solid var(--border);
}

.sticky-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(0, 0, 0, .88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.page-title {
  height: 52px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  font-size: 20px;
  font-weight: 800;
}

.tabs {
  display: flex;
  overflow-x: auto;
  border-top: 1px solid rgba(47, 51, 54, .5);
}

.tab {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 14px 18px;
  white-space: nowrap;
  cursor: pointer;
  border-bottom: 3px solid transparent;
}

.tab.active {
  color: var(--text);
  border-bottom-color: var(--accent);
  font-weight: 700;
}

.tag-panel {
  display: none;
  padding: 16px;
  border-top: 1px solid var(--border);
  background: var(--panel);
}

.tag-panel.open {
  display: block;
}

.tag-panel-title {
  font-weight: 700;
  margin-bottom: 12px;
}

.tag-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.tag-checks label {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--text);
}

.tag-checks small {
  color: var(--muted);
}

.tag-modes,
.tag-actions {
  display: flex;
  gap: 14px;
  margin-top: 14px;
  align-items: center;
}

.tag-actions a {
  color: var(--muted);
}

.article-card,
.comment-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.article-card:hover {
  background: rgba(255, 255, 255, .025);
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #333;
  color: var(--text);
  display: grid;
  place-items: center;
  font-weight: 800;
}

.avatar.small {
  width: 36px;
  height: 36px;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.article-meta .author {
  color: var(--text);
  font-weight: 700;
}

.article-card h2 {
  margin: 4px 0 8px;
  font-size: 20px;
  line-height: 1.35;
}

.category-line {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
}

.tag-chips {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: 8px;
}

.tag-chips a {
  color: var(--accent);
}

.excerpt {
  margin: 0 0 10px;
  line-height: 1.7;
  white-space: normal;
}

.read-more {
  color: var(--accent);
  font-weight: 600;
}

.actions {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 12px;
  color: var(--muted);
}

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

.like-form button {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
}

.like-form button:hover {
  color: var(--heart);
}

.article-detail {
  padding: 18px 16px;
  border-bottom: 1px solid var(--border);
}

.article-detail h1 {
  font-size: 28px;
  margin: 10px 0;
  line-height: 1.35;
}

.body-text {
  line-height: 1.9;
  white-space: normal;
  margin-top: 18px;
}

.comment-form {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.comment-form input,
.comment-form textarea,
.search-box input,
.admin-form input,
.admin-form textarea,
.admin-form select,
.login-card input {
  width: 100%;
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  outline: none;
}

.comment-form textarea,
.admin-form textarea {
  min-height: 120px;
  resize: vertical;
}

.comment-form .hp {
  position: absolute;
  left: -9999px;
  opacity: 0;
}

.comments h2 {
  padding: 16px;
  margin: 0;
  font-size: 20px;
  border-bottom: 1px solid var(--border);
}

.comment-card p {
  margin: 6px 0 0;
  line-height: 1.7;
}

.search-box {
  margin-bottom: 16px;
}

.search-box input {
  border-radius: 999px;
}

.side-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 16px;
}

.side-card h2 {
  margin: 0;
  padding: 14px 16px;
  font-size: 20px;
}

.side-link {
  display: block;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  font-weight: 600;
}

.side-link small {
  display: block;
  color: var(--muted);
  font-weight: 400;
  margin-top: 4px;
}

.side-link:hover {
  background: var(--panel-2);
  text-decoration: none;
}

.empty-state,
.muted {
  color: var(--muted);
}

.empty-state {
  padding: 24px 16px;
}

.admin-wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 24px;
}

.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.admin-card,
.login-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 16px;
}

.admin-card h2,
.login-card h1 {
  margin-top: 0;
}

.admin-form {
  display: grid;
  gap: 12px;
}

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

.admin-list li {
  border-top: 1px solid var(--border);
  padding: 12px 0;
}

.inline-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.inline-actions button,
.inline-actions a {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  padding: 6px 10px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
}

@media (max-width: 1000px) {
  .site-shell {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .right-column {
    display: none;
  }

  .brand span:not(.brand-mark),
  .main-nav a {
    font-size: 0;
  }

  .main-nav a::first-letter {
    font-size: 18px;
  }
}

@media (max-width: 720px) {
  .site-shell {
    display: block;
    padding-bottom: 60px;
  }

  .left-column {
    display: none;
  }

  .center-column {
    border-right: 0;
  }

  .mobile-nav {
    display: grid;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    grid-template-columns: repeat(4, 1fr);
    background: rgba(0, 0, 0, .94);
    border-top: 1px solid var(--border);
    z-index: 20;
  }

  .mobile-nav a {
    padding: 12px 4px;
    text-align: center;
    color: var(--text);
    font-size: 12px;
  }

  .article-card {
    grid-template-columns: 40px minmax(0, 1fr);
    padding: 14px;
  }

  .avatar {
    width: 38px;
    height: 38px;
  }

  .article-detail h1 {
    font-size: 24px;
  }

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

/* Column images */

.image-grid {
  display: grid;
  gap: 4px;
  margin: 12px 0 14px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--panel);
}

.image-grid.compact {
  max-height: 420px;
}

.image-grid.detail {
  border-radius: 18px;
}

.image-count-1 {
  grid-template-columns: 1fr;
}

.image-count-2 {
  grid-template-columns: repeat(2, 1fr);
}

.image-count-3 {
  grid-template-columns: 1.35fr 1fr;
  grid-template-rows: repeat(2, 1fr);
}

.image-count-3 .image-thumb:first-child {
  grid-row: 1 / span 2;
}

.image-count-4 {
  grid-template-columns: repeat(2, 1fr);
}

.image-thumb {
  position: relative;
  display: block;
  width: 100%;
  min-height: 170px;
  padding: 0;
  border: 0;
  background: #111;
  cursor: zoom-in;
  overflow: hidden;
}

.image-grid.detail .image-thumb {
  min-height: 240px;
}

.image-thumb img {
  width: 100%;
  height: 100%;
  min-height: inherit;
  display: block;
  object-fit: cover;
  transition: transform .18s ease, opacity .18s ease;
}

.image-thumb:hover img {
  transform: scale(1.02);
  opacity: .92;
}

.image-more {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  font-size: 34px;
  font-weight: 800;
}

/* Lightbox */

.no-scroll {
  overflow: hidden;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  background: rgba(0, 0, 0, .86);
}

.lightbox.open {
  display: block;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
}

.lightbox-stage {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  place-items: center;
  padding: 56px 72px 34px;
}

.lightbox-image {
  max-width: min(100%, 1120px);
  max-height: calc(100vh - 150px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 80px rgba(0, 0, 0, .55);
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  border: 0;
  color: #fff;
  background: rgba(15, 20, 25, .72);
  cursor: pointer;
  display: grid;
  place-items: center;
  backdrop-filter: blur(8px);
}

.lightbox-close {
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 30px;
  line-height: 1;
}

.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  font-size: 44px;
}

.lightbox-nav.prev {
  left: 18px;
}

.lightbox-nav.next {
  right: 18px;
}

.lightbox-close:hover,
.lightbox-nav:hover {
  background: rgba(39, 44, 48, .95);
}

.lightbox-caption {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  width: min(100%, 900px);
  min-height: 36px;
  color: var(--text);
  text-align: center;
}

.lightbox-caption small {
  color: var(--muted);
  white-space: nowrap;
}

/* Admin images */

.admin-image-box {
  display: grid;
  gap: 6px;
}

.admin-file-label {
  display: grid;
  gap: 8px;
  border: 1px dashed var(--border);
  border-radius: 14px;
  padding: 14px;
  color: var(--text);
  background: var(--panel-2);
  cursor: pointer;
}

.admin-file-label input {
  border: 0;
  padding: 0;
  background: transparent;
}

.admin-image-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 10px;
}

.admin-image-list p {
  grid-column: 1 / -1;
  margin: 0;
}

.admin-image-item {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  min-height: 96px;
  background: var(--panel-2);
}

.admin-image-item input {
  position: absolute;
  top: 8px;
  left: 8px;
  width: auto;
  z-index: 2;
  accent-color: var(--accent);
}

.admin-image-item img {
  display: block;
  width: 100%;
  height: 110px;
  object-fit: cover;
  opacity: .92;
}

@media (max-width: 720px) {
  .image-thumb {
    min-height: 130px;
  }

  .image-grid.detail .image-thumb {
    min-height: 190px;
  }

  .lightbox-stage {
    padding: 54px 14px 26px;
  }

  .lightbox-image {
    max-height: calc(100vh - 130px);
    border-radius: 4px;
  }

  .lightbox-nav {
    width: 42px;
    height: 42px;
    font-size: 34px;
    background: rgba(15, 20, 25, .5);
  }

  .lightbox-nav.prev {
    left: 8px;
  }

  .lightbox-nav.next {
    right: 8px;
  }

  .lightbox-close {
    top: 10px;
    right: 10px;
  }

  .lightbox-caption {
    padding: 0 8px;
    font-size: 13px;
  }
}

.brand-mark img,
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 999px;
  display: block;
}

/* Logo / author icon */

.brand-mark,
.avatar {
  overflow: hidden;
  flex: 0 0 auto;
}

.brand-mark.site-icon-has-image,
.avatar.site-icon-has-image {
  background: transparent;
  color: transparent;
}

.brand-mark .site-icon-img,
.avatar .site-icon-img,
.brand-mark img,
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 999px;
  display: block;
}

.article-card > .author-avatar,
.article-detail .author-avatar {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  max-width: 44px !important;
  min-height: 44px !important;
  max-height: 44px !important;
  border-radius: 999px !important;
  overflow: hidden !important;
  align-self: start;
}

.article-card > .author-avatar .site-icon-img,
.article-card > .author-avatar img,
.article-detail .author-avatar .site-icon-img,
.article-detail .author-avatar img {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  max-width: 44px !important;
  min-height: 44px !important;
  max-height: 44px !important;
  object-fit: cover !important;
  border-radius: 999px !important;
  display: block !important;
}

.article-card > .article-main {
  min-width: 0;
}

/* Text newline handling: nl2br() creates <br>, CSS must not add extra blank lines. */

.body-text,
.comment-card p {
  white-space: normal;
}

@media (max-width: 720px) {
  .article-card > .author-avatar,
  .article-card > .author-avatar .site-icon-img,
  .article-card > .author-avatar img {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    max-width: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
  }
}

.brand-title-link {
  display: inline-block;
  color: var(--text);
  text-decoration: none;
}

.brand-title-link:hover {
  text-decoration: underline;
}

.brand small {
  pointer-events: none;
}

/* Profile page */

.profile-page {
  border-bottom: 1px solid var(--border);
}

.profile-cover {
  width: 100%;
  height: 200px;
  background: var(--panel-2);
  overflow: hidden;
}

.profile-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-cover-empty {
  background: radial-gradient(circle at 20% 20%, rgba(29, 155, 240, .25), transparent 30%), linear-gradient(135deg, #111, #050505);
}

.profile-head {
  position: relative;
  min-height: 82px;
  padding: 0 16px;
}

.profile-avatar-wrap {
  position: absolute;
  left: 16px;
  top: -64px;
  width: 136px;
  height: 136px;
  border-radius: 999px;
  border: 4px solid var(--bg);
  background: var(--bg);
  overflow: hidden;
}

.profile-avatar {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 999px;
}

.profile-avatar-fallback {
  display: grid;
  place-items: center;
  background: #333;
  color: var(--text);
  font-size: 42px;
  font-weight: 800;
}

.profile-edit-button {
  position: absolute;
  right: 16px;
  top: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid #536471;
  border-radius: 999px;
  color: var(--text);
  font-weight: 700;
  background: rgba(0, 0, 0, .2);
}

.profile-edit-button:hover {
  text-decoration: none;
  background: rgba(255, 255, 255, .08);
}

.profile-body {
  padding: 0 16px 16px;
}

.profile-body h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.25;
}

.profile-handle {
  color: var(--muted);
  margin-top: 2px;
}

.profile-note {
  color: var(--muted);
  margin-top: 8px;
}

.profile-bio {
  margin-top: 12px;
  line-height: 1.55;
  white-space: normal;
}

.profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 14px;
  color: var(--muted);
}

.profile-meta a {
  color: var(--accent);
}

.profile-meta span {
  display: none;
}

.profile-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--border);
}

.profile-tabs a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  color: var(--muted);
  border-bottom: 3px solid transparent;
  font-weight: 700;
}

.profile-tabs a:hover {
  background: rgba(255, 255, 255, .04);
  text-decoration: none;
}

.profile-tabs a.active {
  color: var(--text);
  border-bottom-color: var(--accent);
}

@media (max-width: 720px) {
  .profile-cover {
    height: 150px;
  }

  .profile-avatar-wrap {
    width: 104px;
    height: 104px;
    top: -52px;
  }

  .profile-head {
    min-height: 68px;
  }

  .profile-edit-button {
    top: 12px;
    right: 12px;
    min-height: 34px;
    padding: 0 12px;
    font-size: 13px;
  }

  .profile-body h1 {
    font-size: 22px;
  }
}

/* Links page */

.links-page {
  border-bottom: 1px solid var(--border);
}

.link-admin-box,
.link-list-box {
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.link-admin-box h2,
.link-list-box h2 {
  margin: 0 0 14px;
  font-size: 20px;
}

.link-add-form {
  display: grid;
  gap: 10px;
}

.link-add-form label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.link-add-form input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
  color: var(--text);
  padding: 12px 14px;
  font-size: 15px;
}

.link-add-form button,
.danger-button {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 800;
  cursor: pointer;
}

.link-add-form button {
  justify-self: start;
  background: var(--accent);
  color: #fff;
}

.link-list {
  display: grid;
}

.link-card {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--border);
}

.link-card:first-child {
  border-top: 0;
}

.link-check {
  padding-top: 3px;
}

.link-card-body {
  min-width: 0;
}

.link-title {
  display: inline-block;
  color: var(--text);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.35;
}

.link-title:hover {
  color: var(--accent);
  text-decoration: none;
}

.link-url {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  word-break: break-all;
}

.link-delete-area {
  padding-top: 14px;
}

.danger-button {
  background: #f4212e;
  color: #fff;
}

.danger-button:hover {
  opacity: .9;
}

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

.form-error {
  margin: 16px;
  padding: 12px 14px;
  border: 1px solid #f4212e;
  border-radius: 12px;
  color: #ff8a8a;
  background: rgba(244, 33, 46, .08);
}

/* Profile admin */

.profile-custom-items {
  margin-top: 18px;
  display: grid;
  gap: 12px;
}

.profile-custom-item {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, .02);
}

.profile-custom-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 4px;
}

.profile-custom-value {
  color: var(--text);
  line-height: 1.55;
}

.profile-admin {
  border-top: 1px solid var(--border);
}

.profile-admin-box {
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.profile-admin-box h2 {
  margin: 0 0 14px;
  font-size: 20px;
}

.profile-edit-form {
  display: grid;
  gap: 10px;
}

.profile-edit-form label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.profile-edit-form input,
.profile-edit-form textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
  color: var(--text);
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
}

.profile-edit-form textarea {
  resize: vertical;
}

.profile-edit-form button {
  justify-self: start;
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.profile-delete-row {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
}

.profile-delete-row:first-of-type {
  border-top: 0;
}

.profile-delete-row small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.45;
}

/* Archive page */

.archive-page {
  border-bottom: 1px solid var(--border);
  padding: 0 12px 28px;
}

.archive-page-title span {
  letter-spacing: .01em;
}

.archive-month {
  margin: 0;
  padding: 24px 6px 18px;
  font-size: 28px;
  line-height: 1.25;
  font-weight: 800;
  color: #dcecff;
  border-bottom: 1px solid var(--border);
}

.archive-list {
  display: grid;
  gap: 12px;
  padding-top: 20px;
}

.archive-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  min-height: 64px;
  padding: 0 16px 0 22px;
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .015));
  color: var(--text);
  text-decoration: none;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}

.archive-card:hover {
  border-color: var(--cat-border);
  background: linear-gradient(90deg, var(--cat-bg), rgba(255, 255, 255, .025));
  text-decoration: none;
  transform: translateY(-1px);
}

.archive-title-wrap {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 8px;
}

.archive-title {
  min-width: 0;
  color: var(--cat-color);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.45;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.archive-link-mark {
  flex: 0 0 auto;
  color: var(--cat-color);
  opacity: .9;
  font-size: 15px;
}

.archive-info {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  white-space: nowrap;
}

.archive-date {
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.archive-category {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  min-height: 26px;
  padding: 0 12px;
  border: 1px solid var(--cat-border);
  border-radius: 999px;
  background: var(--cat-bg);
  color: var(--cat-color);
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
}

.archive-arrow {
  color: var(--cat-color);
  font-size: 22px;
  line-height: 1;
  opacity: .85;
}

@media (max-width: 720px) {
  .archive-page {
    padding: 0 10px 22px;
  }

  .archive-month {
    padding: 20px 4px 14px;
    font-size: 24px;
  }

  .archive-card {
    grid-template-columns: 1fr;
    gap: 8px;
    min-height: auto;
    padding: 14px 14px;
  }

  .archive-title {
    white-space: normal;
  }

  .archive-info {
    justify-content: flex-start;
    gap: 10px;
  }

  .archive-arrow {
    margin-left: auto;
  }
}

/* Right sidebar: profile / recent / ranking / category / archive */

.right-profile-card,
.right-section {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  margin-bottom: 16px;
  overflow: hidden;
}

.right-profile-card {
  padding: 16px;
}

.right-profile-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.right-profile-avatar {
  width: 54px;
  height: 54px;
  border-radius: 999px;
  overflow: hidden;
  background: #333;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  font-weight: 800;
}

.right-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.right-profile-head b {
  display: block;
  font-size: 17px;
}

.right-profile-head small {
  display: block;
  color: var(--muted);
  margin-top: 2px;
}

.right-profile-card p {
  margin: 14px 0 10px;
  color: var(--text);
  line-height: 1.55;
}

.right-profile-link,
.right-more-link {
  color: #8ecbff;
  font-weight: 700;
}

.right-section h2 {
  margin: 0;
  padding: 14px 16px;
  font-size: 18px;
  border-bottom: 1px solid var(--border);
  color: #f2a6c8;
}

.right-empty {
  margin: 0;
  padding: 12px 16px 16px;
  color: var(--muted);
}

.right-category-list,
.right-archive-list {
  display: grid;
  padding: 8px 0;
}

.right-category-link,
.right-archive-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  color: var(--text);
  text-decoration: none;
}

.right-category-link:hover,
.right-archive-link:hover {
  background: rgba(255, 255, 255, .04);
  text-decoration: none;
}

.right-category-link span {
  color: var(--cat-color);
  font-weight: 700;
}

.right-category-link b {
  min-width: 28px;
  min-height: 22px;
  padding: 2px 9px;
  border: 1px solid var(--cat-border);
  border-radius: 999px;
  background: var(--cat-bg);
  color: var(--cat-color);
  text-align: center;
  font-size: 13px;
}

.right-archive-link {
  color: var(--muted);
}

.right-archive-link.active {
  margin: 0 8px;
  border-radius: 10px;
  background: rgba(29, 155, 240, .10);
  color: #8ecbff;
}

.right-archive-link b {
  min-width: 28px;
  min-height: 22px;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  color: var(--text);
  text-align: center;
  font-size: 13px;
}

.right-archive-link.active b {
  background: rgba(29, 155, 240, .18);
  color: #8ecbff;
}

.right-more-link {
  padding: 10px 16px 12px;
}

/* Archive category colors - class based */

.archive-card.cat-diary,
.right-category-link.cat-diary {
  --cat-color: #f6d365;
  --cat-border: rgba(246, 211, 101, .72);
  --cat-bg: rgba(246, 211, 101, .10);
}

.archive-card.cat-thinking,
.right-category-link.cat-thinking {
  --cat-color: #72e6e3;
  --cat-border: rgba(114, 230, 227, .72);
  --cat-bg: rgba(114, 230, 227, .10);
}

.archive-card.cat-music,
.right-category-link.cat-music {
  --cat-color: #d7a6ff;
  --cat-border: rgba(215, 166, 255, .72);
  --cat-bg: rgba(215, 166, 255, .10);
}

.archive-card.cat-book,
.right-category-link.cat-book {
  --cat-color: #d7a6ff;
  --cat-border: rgba(215, 166, 255, .72);
  --cat-bg: rgba(215, 166, 255, .10);
}

.archive-card.cat-okinawa,
.right-category-link.cat-okinawa {
  --cat-color: #7fd8ff;
  --cat-border: rgba(127, 216, 255, .72);
  --cat-bg: rgba(127, 216, 255, .10);
}

.archive-card.cat-tech,
.right-category-link.cat-tech {
  --cat-color: #9bd67a;
  --cat-border: rgba(155, 214, 122, .72);
  --cat-bg: rgba(155, 214, 122, .10);
}

.archive-card.cat-misc,
.right-category-link.cat-misc {
  --cat-color: #b8c0cc;
  --cat-border: rgba(184, 192, 204, .58);
  --cat-bg: rgba(184, 192, 204, .08);
}

/* 未登録カテゴリ用の自動色 */

.archive-card.cat-auto-0,
.right-category-link.cat-auto-0 {
  --cat-color: #f6d365;
  --cat-border: rgba(246, 211, 101, .72);
  --cat-bg: rgba(246, 211, 101, .10);
}

.archive-card.cat-auto-1,
.right-category-link.cat-auto-1 {
  --cat-color: #72e6e3;
  --cat-border: rgba(114, 230, 227, .72);
  --cat-bg: rgba(114, 230, 227, .10);
}

.archive-card.cat-auto-2,
.right-category-link.cat-auto-2 {
  --cat-color: #d7a6ff;
  --cat-border: rgba(215, 166, 255, .72);
  --cat-bg: rgba(215, 166, 255, .10);
}

.archive-card.cat-auto-3,
.right-category-link.cat-auto-3 {
  --cat-color: #9bd67a;
  --cat-border: rgba(155, 214, 122, .72);
  --cat-bg: rgba(155, 214, 122, .10);
}

.archive-card.cat-auto-4,
.right-category-link.cat-auto-4 {
  --cat-color: #f2a6c8;
  --cat-border: rgba(242, 166, 200, .72);
  --cat-bg: rgba(242, 166, 200, .10);
}

.archive-card.cat-auto-5,
.right-category-link.cat-auto-5 {
  --cat-color: #9fc5ff;
  --cat-border: rgba(159, 197, 255, .72);
  --cat-bg: rgba(159, 197, 255, .10);
}

/* Mobile hamburger menu */

.mobile-menu-button,
.mobile-menu-backdrop {
  display: none;
}

@media (max-width: 720px) {
  body {
    overflow-x: hidden;
  }

  .site-shell {
    display: block;
    width: 100%;
    max-width: none;
    padding-bottom: 0;
  }

  .center-column {
    width: 100%;
    max-width: none;
    border-right: 0;
  }

  .right-column {
    display: none;
  }

  .mobile-nav {
    display: none !important;
  }

  .mobile-menu-button {
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 12px);
    left: 14px;
    z-index: 2002;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(0, 0, 0, .82);
    color: var(--text);
    backdrop-filter: blur(10px);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
  }

  .mobile-menu-button span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: var(--text);
    transition: transform .18s ease, opacity .18s ease;
  }

  body.mobile-menu-open .mobile-menu-button span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  body.mobile-menu-open .mobile-menu-button span:nth-child(2) {
    opacity: 0;
  }

  body.mobile-menu-open .mobile-menu-button span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .mobile-menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: block;
    background: rgba(0, 0, 0, .58);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease;
  }

  body.mobile-menu-open .mobile-menu-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .left-column {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 2001;
    display: block !important;
    width: 286px;
    max-width: 84vw;
    height: 100dvh;
    border-right: 1px solid var(--border);
    background: var(--bg);
    transform: translateX(-105%);
    transition: transform .2s ease;
  }

  body.mobile-menu-open .left-column {
    transform: translateX(0);
  }

  .left-inner {
    position: static;
    height: 100dvh;
    max-height: none;
    overflow-y: auto;
    padding: calc(env(safe-area-inset-top, 0px) + 18px) 16px 24px;
  }

  .sticky-header {
    padding-left: 58px;
  }

  .page-title {
    min-height: 56px;
  }

  body.mobile-menu-open {
    overflow: hidden;
  }
}
/* Mobile menu text restore */
@media (max-width: 720px) {
  body.mobile-menu-open .left-column .brand span:not(.brand-mark) {
    font-size: 15px;
  }

  body.mobile-menu-open .left-column .brand b {
    font-size: 16px;
  }

  body.mobile-menu-open .left-column .brand small {
    font-size: 13px;
  }

  body.mobile-menu-open .left-column .main-nav a {
    display: block;
    font-size: 18px;
    white-space: nowrap;
  }

  body.mobile-menu-open .left-column .main-nav a::first-letter {
    font-size: inherit;
  }
}
@media (max-width: 720px) {
  body.mobile-menu-open .left-inner {
    padding-top: calc(env(safe-area-inset-top, 0px) + 72px);
  }
}

/* Comment identity / delete key / admin IP */
.comment-meta {
  align-items: baseline;
}

.comment-author {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: baseline;
}

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

.comment-author small {
  color: var(--muted);
  font-size: 13px;
}

.comment-author em {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 8px;
  border: 1px solid rgba(242, 166, 200, .48);
  border-radius: 999px;
  background: rgba(242, 166, 200, .10);
  color: #f2a6c8;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.admin-comment {
  background: rgba(242, 166, 200, .035);
}

.admin-comment .comment-author b,
.admin-comment .comment-author small {
  color: #f2a6c8;
  font-weight: 500;
}

.admin-comment-avatar,
.admin-comment-avatar img,
.admin-comment-avatar .site-icon-img {
  width: 36px !important;
  min-width: 36px !important;
  max-width: 36px !important;
  height: 36px !important;
  min-height: 36px !important;
  max-height: 36px !important;
  overflow: hidden !important;
  border-radius: 999px !important;
  object-fit: cover !important;
}

.comment-form-note {
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.comment-admin-meta {
  margin-top: 6px;
  padding: 8px 10px;
  border: 1px solid rgba(244, 33, 46, .35);
  border-radius: 10px;
  background: rgba(244, 33, 46, .08);
  color: #ff9aa2;
  font-size: 12px;
  line-height: 1.45;
  word-break: break-all;
}

.comment-delete-form {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin: 0;
}

.comment-delete-form input[type="password"] {
  width: 120px;
  min-height: 28px;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  outline: none;
  background: var(--panel-2);
  color: var(--text);
  font-size: 12px;
}

.comment-delete-form button {
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
}

.comment-delete-form button:hover {
  border-color: rgba(244, 33, 46, .45);
  color: #ff8a8a;
}

.comment-form input[name="delete_key"] {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  outline: none;
  background: var(--panel-2);
  color: var(--text);
}

@media (max-width: 720px) {
  .comment-delete-form {
    width: 100%;
    flex-wrap: wrap;
  }

  .comment-delete-form input[type="password"] {
    width: min(180px, 60vw);
  }
}
.right-compact-list {
  display: grid;
  padding: 8px 0;
}

.right-compact-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 34px;
  padding: 7px 16px;
  color: var(--text);
  text-decoration: none;
}

.right-compact-link:hover {
  background: rgba(255, 255, 255, .04);
  text-decoration: none;
}

.right-compact-title {
  min-width: 0;
  overflow: hidden;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.right-compact-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
}

.right-compact-link:hover .right-compact-title {
  color: #8ecbff;
}

.right-compact-link:hover .right-compact-meta {
  color: #b7c9d8;
}
.main-nav {
  gap: 4px;
}

.main-nav .nav-item {
  display: flex;
  gap: 16px;
  align-items: center;
  min-height: 50px;
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--text);
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}

.main-nav .nav-item:hover {
  background: var(--panel-2);
  text-decoration: none;
}

.nav-icon {
  display: inline-grid;
  flex: 0 0 26px;
  place-items: center;
  width: 26px;
  height: 26px;
  color: currentColor;
}

.nav-icon svg {
  display: block;
  width: 26px;
  height: 26px;
  stroke-width: 1.9;
}

.nav-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.post-button {
  gap: 10px;
  text-decoration: none;
}

.post-button:hover {
  text-decoration: none;
}

.post-button-icon {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
}

.post-button-icon .nav-icon,
.post-button-icon .nav-icon svg {
  width: 22px;
  height: 22px;
}

@media (max-width: 1000px) and (min-width: 721px) {
  .main-nav .nav-item {
    justify-content: center;
    gap: 0;
    padding: 12px;
    font-size: 0;
  }

  .main-nav .nav-label {
    display: none;
  }

  .brand .brand-text {
    display: none;
  }

  .post-button {
    width: 52px;
    height: 52px;
    min-height: 52px;
    padding: 0;
    border-radius: 999px;
  }

  .post-button > span:not(.post-button-icon) {
    display: none;
  }
}

@media (max-width: 720px) {
  body.mobile-menu-open .left-column .brand .brand-text {
    display: inline;
    font-size: 15px;
  }

  body.mobile-menu-open .left-column .brand .brand-text b {
    font-size: 16px;
  }

  body.mobile-menu-open .left-column .brand .brand-text small {
    display: block;
    font-size: 13px;
  }

  body.mobile-menu-open .left-column .main-nav .nav-item {
    justify-content: flex-start;
    gap: 16px;
    padding: 12px 14px;
    font-size: 18px;
  }

  body.mobile-menu-open .left-column .main-nav .nav-label {
    display: inline;
    font-size: 18px;
  }

  body.mobile-menu-open .left-column .main-nav .nav-item::first-letter {
    font-size: inherit;
  }

  body.mobile-menu-open .left-column .post-button {
    width: 100%;
    min-height: 50px;
    padding: 0 18px;
    border-radius: 999px;
  }

  body.mobile-menu-open .left-column .post-button > span:not(.post-button-icon) {
    display: inline;
  }
}

/* Text auto link */
.text-link {
  color: #8ecbff;
  text-decoration: none;
  word-break: break-all;
}

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

/* External URL preview card */
.external-link-card {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 12px;
  min-height: 96px;
  margin: 12px 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--panel);
  color: var(--text);
  text-decoration: none;
}

.external-link-card:hover {
  border-color: rgba(142, 203, 255, .48);
  background: var(--panel-2);
  text-decoration: none;
}

.external-link-card-image {
  display: block;
  min-height: 96px;
  background: #111;
}

.external-link-card-image img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 96px;
  object-fit: cover;
}

.external-link-card-body {
  display: grid;
  align-content: center;
  min-width: 0;
  padding: 10px 12px 10px 0;
}

.external-link-card-domain {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.external-link-card b {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 3px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.external-link-card-desc {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.external-link-card-minimal {
  display: block;
  min-height: auto;
  padding: 12px 14px;
}

.external-link-card-minimal b {
  margin-top: 4px;
  word-break: break-all;
}

.external-link-card-minimal .external-link-card-desc {
  margin-top: 6px;
}

@media (max-width: 720px) {
  .external-link-card {
    grid-template-columns: 94px minmax(0, 1fr);
    min-height: 84px;
  }

  .external-link-card-image,
  .external-link-card-image img {
    min-height: 84px;
  }
}

/* Quote block / rich body */
.body-text {
  display: block;
}

.body-paragraph {
  margin: 0 0 14px;
  line-height: 1.9;
  white-space: normal;
}

.body-paragraph:last-child {
  margin-bottom: 0;
}

.article-quote {
  position: relative;
  margin: 14px 0;
  padding: 12px 14px 12px 16px;
  border-left: 4px solid #536471;
  border-radius: 0 14px 14px 0;
  background: rgba(255, 255, 255, .04);
  color: #c9d1d9;
  line-height: 1.8;
  white-space: normal;
}

.article-quote::before {
  content: "引用";
  display: flex;
  align-items: center;
  width: fit-content;
  min-height: 20px;
  margin-bottom: 8px;
  padding: 0 8px;
  border: 1px solid rgba(83, 100, 113, .65);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.quote-body {
  display: block;
}

.quote-source {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(83, 100, 113, .35);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.quote-source-line {
  display: block;
  min-width: 0;
  word-break: break-word;
}

.quote-source-line b {
  color: #9aa3ad;
  font-weight: 700;
}

.quote-source-line .text-link {
  word-break: break-all;
}

.comment-body {
  margin-top: 6px;
}

.comment-body .body-paragraph {
  margin-bottom: 10px;
  line-height: 1.7;
}

.comment-body .article-quote {
  margin: 10px 0;
  padding: 10px 12px 10px 14px;
  border-left-width: 3px;
  border-radius: 0 12px 12px 0;
  font-size: 14px;
  line-height: 1.7;
}

.comment-body .article-quote::before,
.article-card .excerpt .article-quote::before {
  margin-bottom: 7px;
}

.article-card .excerpt.body-text {
  margin-top: 8px;
}

.article-card .excerpt .body-paragraph {
  margin-bottom: 10px;
}

.article-card .excerpt .article-quote {
  margin: 10px 0 4px;
  padding: 10px 12px 10px 14px;
  border-left-width: 3px;
  border-radius: 0 12px 12px 0;
  font-size: 14px;
  line-height: 1.7;
}

.comment-body .quote-source,
.article-card .excerpt .quote-source {
  margin-top: 10px;
  padding-top: 8px;
  font-size: 12px;
}

.input-help,
.comment-form-note {
  line-height: 1.6;
}

@media (max-width: 720px) {
  .article-quote {
    margin: 12px 0;
    padding: 10px 12px 10px 14px;
  }
}

/* Quote source preview card */
.quote-source-card {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 10px;
  min-height: 72px;
  margin-top: 10px;
  overflow: hidden;
  border: 1px solid rgba(83, 100, 113, .45);
  border-radius: 12px;
  background: rgba(0, 0, 0, .18);
  color: var(--text);
  text-decoration: none;
}

.quote-source-card:hover {
  border-color: rgba(142, 203, 255, .50);
  background: rgba(255, 255, 255, .035);
  text-decoration: none;
}

.quote-source-card-image {
  display: block;
  min-height: 72px;
  background: #111;
}

.quote-source-card-image img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 72px;
  object-fit: cover;
}

.quote-source-card-body {
  display: grid;
  align-content: center;
  min-width: 0;
  padding: 8px 10px 8px 0;
}

.quote-source-card-domain {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quote-source-card b {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 2px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.quote-source-card-desc {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.quote-source-card-minimal {
  display: block;
  min-height: auto;
  padding: 9px 11px;
}

.quote-source-card-minimal b {
  margin-top: 3px;
  word-break: break-all;
}

@media (max-width: 720px) {
  .quote-source-card {
    grid-template-columns: 76px minmax(0, 1fr);
    min-height: 66px;
  }

  .quote-source-card-image,
  .quote-source-card-image img {
    min-height: 66px;
  }
}

/* Input examples */
.input-example {
  margin: -4px 0 4px;
  padding: 10px 12px;
  border: 1px dashed rgba(83, 100, 113, .55);
  border-radius: 12px;
  background: rgba(255, 255, 255, .025);
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
}

/* YouTube preview card */
.youtube-preview-card {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 12px;
  margin: 12px 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--panel);
  color: var(--text);
  text-decoration: none;
}

.youtube-preview-card:hover {
  border-color: rgba(255, 0, 0, .45);
  background: var(--panel-2);
  text-decoration: none;
}

.youtube-preview-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  min-height: 118px;
  background: #111;
  overflow: hidden;
}

.youtube-preview-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
}

.youtube-play-button {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 0, 0, .88);
  transform: translate(-50%, -50%);
}

.youtube-play-button::before {
  content: "";
  position: absolute;
  left: 23px;
  top: 10px;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 16px solid #fff;
}

.youtube-preview-meta {
  display: grid;
  align-content: center;
  min-width: 0;
  padding: 12px 14px 12px 0;
}

.youtube-preview-meta small {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.youtube-preview-meta b {
  margin-top: 4px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.35;
}

.youtube-preview-meta span {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.article-card .youtube-preview-card {
  grid-template-columns: 180px minmax(0, 1fr);
  border-radius: 14px;
}

.article-card .youtube-preview-thumb {
  min-height: 102px;
}

.comment-body .youtube-preview-card {
  grid-template-columns: 160px minmax(0, 1fr);
  border-radius: 14px;
}

.comment-body .youtube-preview-thumb {
  min-height: 90px;
}

@media (max-width: 720px) {
  .youtube-preview-card,
  .article-card .youtube-preview-card,
  .comment-body .youtube-preview-card {
    grid-template-columns: 1fr;
  }

  .youtube-preview-thumb,
  .article-card .youtube-preview-thumb,
  .comment-body .youtube-preview-thumb {
    min-height: auto;
  }

  .youtube-preview-meta {
    padding: 10px 12px 12px;
  }
}
/* Admin pagination / filters */
.admin-filter-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 200px) auto auto;
  gap: 8px;
  align-items: center;
  margin: 12px 0 10px;
}

.admin-filter-form input,
.admin-filter-form select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel-2);
  color: var(--text);
  padding: 9px 11px;
  outline: none;
}

.admin-filter-form button,
.admin-filter-reset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

.admin-filter-form button {
  border-color: transparent;
  background: var(--accent);
  color: #fff;
}

.admin-filter-reset:hover,
.admin-filter-form button:hover {
  text-decoration: none;
  opacity: .9;
}

.admin-list-summary {
  margin: 8px 0 12px;
  color: var(--muted);
  font-size: 13px;
}

.admin-pager {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.admin-pager a,
.admin-pager span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
}

.admin-pager a:hover {
  background: var(--panel-2);
  text-decoration: none;
}

.admin-pager .disabled {
  color: var(--muted);
  opacity: .5;
}

.admin-page-current {
  min-width: 72px;
  background: rgba(255, 255, 255, .035);
}

@media (max-width: 720px) {
  .admin-filter-form {
    grid-template-columns: 1fr;
  }

  .admin-pager {
    flex-wrap: wrap;
  }
}

