/* CicadaChat Blog.
   The chat app's palette (apps/web/src/styles/global.css): quiet neutral
   chrome, the logo's teal-green spent on links and the one action that
   matters on a screen, amber kept for warnings. Bootstrap supplies the reset,
   the grid helpers and the pager; everything visible is styled here. Dark
   follows the system through Bootstrap's data-bs-theme, set in the layout. */

:root {
  --bg: #f2f1ec;
  --bg-raised: #ffffff;
  --bg-sunken: #f6f7f9;
  --bg-hover: rgba(33, 26, 17, 0.055);
  --text: #14181d;
  --text-muted: #5b6570;
  --text-faint: #8d949d;
  --border: rgba(22, 24, 15, 0.09);
  --border-strong: rgba(33, 26, 17, 0.18);
  --accent: #0a8262;
  --accent-hover: #086f54;
  --accent-contrast: #ffffff;
  --accent-soft: #e7eeec;
  --accent-soft-strong: #d6e4e0;
  --warn: #b45309;
  --danger: #c0362c;
  --radius-sm: 8px;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(22, 24, 15, 0.06);
  --shadow: 0 8px 24px rgba(33, 26, 17, 0.1);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  --gutter: 16px;

  --bs-body-bg: var(--bg);
  --bs-body-color: var(--text);
  --bs-body-font-family: var(--font);
  --bs-link-color-rgb: 10, 130, 98;
  --bs-border-color: var(--border);
}

[data-bs-theme="dark"] {
  --bg: #0d0f12;
  --bg-raised: #171a1f;
  --bg-sunken: #111419;
  --bg-hover: rgba(255, 255, 255, 0.06);
  --text: #e9ebef;
  --text-muted: #a1a8b3;
  --text-faint: #6d747f;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.17);
  --accent: #3fd0a0;
  --accent-hover: #62dcb3;
  --accent-contrast: #032619;
  --accent-soft: rgba(120, 190, 175, 0.11);
  --accent-soft-strong: rgba(120, 190, 175, 0.19);
  --warn: #f5b041;
  --danger: #f2837a;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.45);

  --bs-body-bg: var(--bg);
  --bs-body-color: var(--text);
  --bs-link-color-rgb: 63, 208, 160;
  --bs-border-color: var(--border);
}

/* ---------------------------------------------------------------- base --- */

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-underline-offset: 2px;
}

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

svg {
  flex-shrink: 0;
  vertical-align: -0.125em;
}

.container {
  max-width: 1160px;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 100;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--accent-contrast);
}

.skip-link:focus {
  left: 8px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.btn-accent,
.btn-quiet,
.btn-app {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
}

.btn-accent,
.btn-app {
  background: var(--accent);
  color: var(--accent-contrast);
}

.btn-accent:hover,
.btn-app:hover {
  background: var(--accent-hover);
  color: var(--accent-contrast);
}

.btn-accent:disabled {
  opacity: 0.6;
  cursor: default;
}

.btn-quiet {
  background: var(--bg-raised);
  border-color: var(--border-strong);
  color: var(--text);
}

.btn-quiet:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--text-muted);
  font-size: 13.5px;
}

.room-chip,
.tag-chip {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
}

.room-chip:hover,
.tag-chip:hover {
  background: var(--accent-soft-strong);
  color: var(--accent);
}

.panel {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-raised);
  box-shadow: var(--shadow-sm);
}

.panel-title,
.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  font-size: 17px;
  font-weight: 700;
}

.section-title {
  margin: 8px 0 14px;
  font-size: 19px;
}

.panel-title svg,
.section-title svg {
  color: var(--accent);
}

/* -------------------------------------------------------------- header --- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg-raised);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  text-decoration: none;
}

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

.brand-name {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1;
}

.brand-accent {
  color: var(--accent);
}

.brand-tag {
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.header-search {
  display: flex;
  justify-self: center;
  width: 100%;
  max-width: 420px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--bg-sunken);
  overflow: hidden;
}

.header-search:focus-within {
  border-color: var(--accent);
}

.header-search input {
  flex: 1;
  min-width: 0;
  padding: 8px 14px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 15px;
  outline: none;
}

.header-search button {
  padding: 0 14px;
  border: 0;
  background: transparent;
  color: var(--text-muted);
}

.btn-app-short {
  display: none;
}

.room-bar {
  border-top: 1px solid var(--border);
}

.room-bar ul {
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 6px 0;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}

.room-bar ul::-webkit-scrollbar {
  display: none;
}

.room-bar a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.room-bar a:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.room-bar a[aria-current="page"] {
  background: var(--accent-soft);
  color: var(--accent);
}

.room-bar img {
  border-radius: 6px;
}

/* -------------------------------------------------------------- layout --- */

.site-main {
  padding: 28px 0 56px;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  align-items: start;
}

.layout-main {
  display: flex;
  flex-direction: column;
  gap: 28px;
  min-width: 0;
}

.sidebar {
  position: sticky;
  top: 132px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.page-head h1 {
  margin: 0 0 6px;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.page-lede {
  margin: 0;
  color: var(--text-muted);
  font-size: 17px;
}

/* ------------------------------------------------------------ featured --- */

.featured-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 16px;
}

.featured-lead {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-raised);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.featured-lead-media {
  display: block;
  aspect-ratio: 16 / 9;
  background: var(--accent-soft);
}

.featured-lead-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-lead-media.is-icon img,
.card-row-media.is-icon img {
  object-fit: contain;
  padding: 12%;
}

/* A percentage would be of the whole row's width here, not the thumbnail's. */
.mini.is-icon img {
  object-fit: contain;
  padding: 10px;
}

.featured-lead-body {
  padding: 16px 18px 18px;
}

.featured-lead-body h3 {
  margin: 8px 0 6px;
  font-size: 21px;
  font-weight: 750;
  line-height: 1.3;
}

.featured-lead-body h3 a,
.card-row-title a,
.room-box-head h2 a,
.top-list a {
  color: var(--text);
  text-decoration: none;
}

.featured-lead-body h3 a:hover,
.card-row-title a:hover,
.room-box-head h2 a:hover,
.top-list a:hover {
  color: var(--accent);
}

.featured-lead-body p {
  margin: 0;
  color: var(--text-muted);
}

.featured-side,
.room-box-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mini {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px;
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
}

.featured-side .mini {
  border: 1px solid var(--border);
  background: var(--bg-raised);
}

.mini:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.mini img {
  width: 88px;
  height: 64px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  object-fit: cover;
}

.mini span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.mini strong {
  font-size: 15px;
  line-height: 1.35;
}

.mini small {
  color: var(--text-muted);
  font-size: 12.5px;
}

/* ----------------------------------------------------------- room boxes --- */

.room-box {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-raised);
  box-shadow: var(--shadow-sm);
}

.room-box-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.room-box-head img {
  border-radius: var(--radius-sm);
}

.room-box-head div {
  flex: 1;
  min-width: 0;
}

.room-box-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 750;
}

.room-box-head p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13.5px;
}

.see-all {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.room-box-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 12px;
}

/* ---------------------------------------------------------- card lists --- */

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

.card-row {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 18px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-raised);
  box-shadow: var(--shadow-sm);
}

.card-row-media {
  display: block;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius);
  background: var(--accent-soft);
  overflow: hidden;
}

.card-row-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-row-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
}

.card-row-title {
  margin: 0;
  font-size: 19px;
  font-weight: 750;
  line-height: 1.3;
}

.card-row-summary {
  display: -webkit-box;
  margin: 0;
  color: var(--text-muted);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pager .pagination {
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 20px 0 0;
  --bs-pagination-color: var(--text);
  --bs-pagination-bg: var(--bg-raised);
  --bs-pagination-border-color: var(--border-strong);
  --bs-pagination-hover-color: var(--text);
  --bs-pagination-hover-bg: var(--bg-hover);
  --bs-pagination-hover-border-color: var(--border-strong);
  --bs-pagination-active-bg: var(--accent);
  --bs-pagination-active-border-color: var(--accent);
  --bs-pagination-active-color: var(--accent-contrast);
  --bs-pagination-disabled-bg: var(--bg-sunken);
  --bs-pagination-disabled-color: var(--text-faint);
  --bs-pagination-disabled-border-color: var(--border);
  --bs-pagination-focus-box-shadow: none;
}

.pager .page-link {
  border-radius: var(--radius-sm) !important;
}

/* -------------------------------------------------------------- sidebar --- */

.app-cta {
  text-align: center;
  background: linear-gradient(180deg, var(--accent-soft), var(--bg-raised) 70%);
}

.app-cta h2 {
  margin: 10px 0 6px;
  font-size: 18px;
  font-weight: 750;
}

.app-cta p {
  margin: 0 0 14px;
  color: var(--text-muted);
  font-size: 14.5px;
}

.top-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.top-list li {
  display: flex;
  gap: 12px;
  align-items: baseline;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
}

.top-rank {
  flex-shrink: 0;
  width: 1.4em;
  color: var(--accent);
  font-size: 18px;
  font-weight: 800;
}

.room-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.room-list a {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 7px 8px;
  border-radius: var(--radius-sm);
  color: var(--text);
  text-decoration: none;
}

.room-list a:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.room-list img {
  border-radius: 7px;
}

.room-list span {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.3;
}

.room-list strong {
  font-size: 14.5px;
}

.room-list small {
  overflow: hidden;
  color: var(--text-muted);
  font-size: 12.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* -------------------------------------------------------------- article --- */

.article {
  padding: 28px 32px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-raised);
  box-shadow: var(--shadow-sm);
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
  color: var(--text-faint);
  font-size: 14px;
}

.crumbs a {
  color: var(--text-muted);
  font-weight: 600;
  text-decoration: none;
}

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

.article-title {
  margin: 0 0 10px;
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.18;
}

.article-meta {
  margin-bottom: 18px;
}

.article-lede {
  margin: 0 0 20px;
  font-size: 19px;
  line-height: 1.55;
  color: var(--text-muted);
}

.article-hero {
  margin: 0 0 24px;
  border-radius: var(--radius);
  overflow: hidden;
}

.article-hero img {
  display: block;
  width: 100%;
  height: auto;
}

.prose {
  font-size: 17.5px;
  line-height: 1.75;
  overflow-wrap: break-word;
}

.prose > :first-child {
  margin-top: 0;
}

.prose h2 {
  margin: 1.8em 0 0.5em;
  font-size: 1.45em;
  font-weight: 750;
  line-height: 1.3;
}

.prose h3 {
  margin: 1.5em 0 0.4em;
  font-size: 1.2em;
  font-weight: 700;
}

.prose p,
.prose ul,
.prose ol,
.prose blockquote,
.prose pre,
.prose table {
  margin: 0 0 1.1em;
}

.prose li + li {
  margin-top: 0.3em;
}

.prose img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}

.prose blockquote {
  padding: 4px 0 4px 18px;
  border-left: 4px solid var(--accent);
  color: var(--text-muted);
}

.prose code {
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--bg-sunken);
  font-family: var(--font-mono);
  font-size: 0.88em;
}

.prose pre {
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--bg-sunken);
  overflow-x: auto;
}

.prose pre code {
  padding: 0;
  background: none;
}

.prose hr {
  margin: 2em 0;
  border: 0;
  border-top: 1px solid var(--border-strong);
  opacity: 1;
}

.prose table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 0.92em;
}

.prose th,
.prose td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.prose th {
  color: var(--text-muted);
  font-size: 0.85em;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.prose iframe {
  max-width: 100%;
}

.prose .ratio,
.prose .video {
  position: relative;
  aspect-ratio: 16 / 9;
}

.prose .ratio iframe,
.prose .video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.prose [id] {
  scroll-margin-top: 140px;
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 24px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
}

.article-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
}

.article-share > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 4px;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--bg-raised);
  color: var(--text-muted);
}

.share-btn:hover,
.share-btn.is-done {
  border-color: var(--accent);
  color: var(--accent);
}

.room-cta {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border: 1px solid var(--accent-soft-strong);
  border-radius: var(--radius-lg);
  background: var(--accent-soft);
}

.room-cta img {
  border-radius: var(--radius);
}

.room-cta div {
  flex: 1;
  min-width: 0;
}

.room-cta h2 {
  margin: 0 0 2px;
  font-size: 17px;
  font-weight: 750;
}

.room-cta p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14.5px;
}

/* ------------------------------------------------------------- comments --- */

.comments .count {
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--bg-sunken);
  color: var(--text-muted);
  font-size: 13px;
}

.comment-form textarea,
.comment-form input[type="text"],
.search-big input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg-sunken);
  color: var(--text);
  font: inherit;
  font-size: 15px;
}

.comment-form textarea:focus,
.comment-form input[type="text"]:focus,
.search-big input:focus {
  border-color: var(--accent);
  outline: none;
}

.comment-form textarea {
  resize: vertical;
}

.comment-form-row {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.comment-form-row input[type="text"] {
  flex: 1;
  min-width: 0;
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.comment-note {
  margin: 8px 0 0;
  color: var(--text-faint);
  font-size: 13px;
}

.comment-feedback {
  margin: 6px 0 0;
  color: var(--danger);
  font-size: 14px;
}

.comment-feedback:empty {
  display: none;
}

.comment-feedback.is-ok {
  color: var(--accent);
}

.comment-tabs {
  display: flex;
  gap: 4px;
  margin: 20px 0 8px;
  border-bottom: 1px solid var(--border);
}

.comment-tabs button {
  padding: 8px 12px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
}

.comment-tabs button.is-active {
  border-bottom-color: var(--accent);
  color: var(--text);
}

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

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

.comment-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.comment-head time {
  color: var(--text-faint);
  font-size: 13px;
}

.comment-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
}

.comment-body {
  margin: 6px 0 0 40px;
  overflow-wrap: break-word;
}

.comment-actions {
  display: flex;
  gap: 14px;
  margin: 6px 0 0 40px;
}

.comment-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 0;
  border: 0;
  background: none;
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 600;
}

.comment-action:hover {
  color: var(--accent);
}

.comment-action .like-on,
.comment-action[aria-pressed="true"] .like-off {
  display: none;
}

.comment-action[aria-pressed="true"] .like-on {
  display: inline;
  color: var(--danger);
}

.comment-replies {
  margin: 8px 0 0 40px;
  padding-left: 14px;
  border-left: 2px solid var(--border);
}

.comment.is-reply {
  padding: 10px 0;
}

.comment-form.is-reply {
  margin: 10px 0 0 40px;
  padding: 12px;
  border-radius: var(--radius);
  background: var(--bg-sunken);
}

.reply-to {
  margin: 0 0 8px;
  color: var(--text-muted);
  font-size: 14px;
}

.comment-empty {
  margin: 12px 0 0;
  color: var(--text-muted);
}

.comment-more {
  margin-top: 12px;
  text-align: center;
}

/* ------------------------------------------------------ rooms and pages --- */

.room-hero {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--accent-soft), var(--bg-raised) 65%);
}

.room-hero img {
  border-radius: var(--radius-lg);
}

.room-hero h1 {
  margin: 0 0 4px;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.015em;
}

.room-hero p {
  margin: 0;
  color: var(--text-muted);
}

.room-hero-kicker {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 2px !important;
  color: var(--accent) !important;
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.room-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.room-tile {
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 100%;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-raised);
  box-shadow: var(--shadow-sm);
  color: var(--text);
  text-decoration: none;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.room-tile:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
  color: var(--text);
}

.room-tile img {
  margin-bottom: 6px;
  border-radius: var(--radius);
}

.room-tile strong {
  font-size: 18px;
}

.room-tile span {
  color: var(--text-muted);
  font-size: 14.5px;
}

.room-tile small {
  margin-top: auto;
  color: var(--accent);
  font-weight: 600;
}

.static-page {
  max-width: 780px;
  margin: 0 auto;
  padding: 32px 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-raised);
  box-shadow: var(--shadow-sm);
}

.static-page .page-head {
  margin-bottom: 24px;
}

.static-page .prose {
  font-size: 16.5px;
}

.prose .legal-summary {
  margin: 0 0 1.4em;
  padding: 16px 20px;
  border-radius: var(--radius);
  background: var(--accent-soft);
}

.prose .legal-summary h2 {
  margin-top: 0;
  font-size: 1.05em;
}

.prose .legal-summary ul {
  margin-bottom: 0;
}

.search-big {
  display: flex;
  gap: 10px;
  margin: 12px 0 10px;
}

.search-big input {
  flex: 1;
  min-width: 0;
  font-size: 17px;
}

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 48px 24px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  text-align: center;
}

.empty h1,
.empty h3 {
  margin: 0;
  font-size: 21px;
  font-weight: 750;
}

.empty p {
  max-width: 440px;
  margin: 0 0 8px;
  color: var(--text-muted);
}

.empty.is-error {
  max-width: 620px;
  margin: 24px auto;
  border-style: solid;
  background: var(--bg-raised);
}

.error-code {
  margin: 0 !important;
  color: var(--accent) !important;
  font-size: 56px;
  font-weight: 800;
  line-height: 1;
}

.empty-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

/* --------------------------------------------------------------- footer --- */

.site-footer {
  padding: 40px 0 28px;
  border-top: 1px solid var(--border);
  background: var(--bg-raised);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 28px;
}

.footer-about p {
  max-width: 320px;
  margin: 12px 0 16px;
  color: var(--text-muted);
  font-size: 14.5px;
}

.footer-heading {
  margin: 0 0 10px;
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-links {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14.5px;
}

.footer-links li + li {
  margin-top: 6px;
}

.footer-links a,
.footer-links .link-button {
  color: var(--text);
  text-decoration: none;
}

.footer-links a:hover,
.footer-links .link-button:hover {
  color: var(--accent);
}

.footer-copy {
  margin: 28px 0 0;
  color: var(--text-faint);
  font-size: 13px;
}

/* -------------------------------------------------------------- consent --- */

.consent {
  position: fixed;
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 16px;
  width: min(720px, calc(100% - 2 * var(--gutter)));
  padding: 14px 16px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--bg-raised);
  box-shadow: var(--shadow);
  transform: translateX(-50%);
}

.consent[hidden] {
  display: none;
}

.consent p {
  margin: 0;
  font-size: 14.5px;
}

.consent-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

/* ----------------------------------------------------------- responsive --- */

@media (max-width: 991px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    position: static;
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-about {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .header-inner {
    grid-template-columns: auto auto;
    justify-content: space-between;
    gap: 10px;
  }

  .header-search {
    grid-column: 1 / -1;
    grid-row: 2;
    max-width: none;
  }

  .btn-app {
    padding: 8px 12px;
    font-size: 14px;
  }

  .btn-app-long {
    display: none;
  }

  .btn-app-short {
    display: inline;
  }

  .featured-grid,
  .room-box-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .card-row {
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
  }

  .card-row-title {
    font-size: 16.5px;
  }

  .card-row-summary {
    display: none;
  }

  .article,
  .static-page {
    padding: 20px 16px;
  }

  .article-title {
    font-size: 27px;
  }

  .prose {
    font-size: 16.5px;
  }

  .room-hero {
    align-items: flex-start;
    padding: 16px;
  }

  .room-hero img {
    width: 64px;
    height: 64px;
  }

  .room-hero h1,
  .page-head h1 {
    font-size: 26px;
  }

  .room-cta {
    flex-wrap: wrap;
  }

  .comment-form-row {
    flex-wrap: wrap;
  }

  .comment-form-row input[type="text"] {
    flex-basis: 100%;
  }

  .comment-body,
  .comment-actions,
  .comment-replies,
  .comment-form.is-reply {
    margin-left: 0;
  }

  .consent {
    flex-direction: column;
    align-items: stretch;
  }

  .consent-actions > * {
    flex: 1;
  }
}

@media (max-width: 420px) {
  .brand-tag {
    display: none;
  }

  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
