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

:root {
  --bg: #f7f3ee;
  --surface: #ffffff;
  --surface-soft: #fbfaf8;
  --text: #171717;
  --muted: #6b7280;
  --line: #e5e1da;
  --dark: #26211d;
  --green: #047857;
  --green-bg: #dff5ea;
  --blue: #1d4ed8;
  --blue-bg: #dbeafe;
  --amber: #b45309;
  --amber-bg: #fef3c7;
  --red: #b91c1c;
  --red-bg: #fee2e2;
  --shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 8px 24px rgba(39, 32, 26, .08);
  --radius: 10px;
  --max-w: 1180px;
  --sidebar-w: 240px;
}

html {
  scroll-behavior: smooth;
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  height: 100%;
}

.layout {
  display: flex;
  height: 100%;
}

.sidebar {
  flex-shrink: 0;
  width: var(--sidebar-w);
  background: #2f2924;
  color: #fff;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.sidebar-toggle {
  display: none;
}

.sidebar-backdrop {
  display: none;
}

.sidebar-close {
  display: none;
}

.sidebar-brand {
  padding: 1.6rem 1.2rem 1.2rem;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.sidebar-eyebrow {
  color: #f7c974;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.sidebar-title {
  margin-top: .15rem;
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1.15;
}

.sidebar-nav {
  flex: 1;
  padding: .6rem .6rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .2rem;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: .65rem;
  width: 100%;
  padding: .7rem .75rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, .72);
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
  transition: background .15s, color .15s;
}

.sidebar-item:hover {
  background: rgba(255, 255, 255, .08);
  color: #fff;
}

.sidebar-item.active {
  background: rgba(192, 138, 47, .22);
  color: #f7c974;
}

.sidebar-icon {
  font-size: 1.15rem;
  width: 1.4rem;
  text-align: center;
  flex-shrink: 0;
}

.main-area {
  flex: 1;
  overflow-y: auto;
  min-width: 0;
}

button,
input,
select {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

.site-header {
  background: #2f2924;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.header-inner {
  display: flex;
  gap: 1.5rem;
  align-items: flex-end;
  justify-content: space-between;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2.6rem 1rem 2.2rem;
}

.eyebrow {
  color: #f7c974;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.site-header h1 {
  margin-top: .18rem;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.subtitle {
  margin-top: .5rem;
  color: rgba(255, 255, 255, .76);
  font-size: .98rem;
}

.header-panel {
  min-width: 12rem;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: var(--radius);
  padding: .8rem .9rem;
  background: rgba(255, 255, 255, .06);
}

.panel-label,
.panel-value {
  display: block;
}

.panel-label {
  color: rgba(255, 255, 255, .58);
  font-size: .75rem;
  font-weight: 700;
}

.panel-value {
  margin-top: .1rem;
  font-weight: 800;
}

.app-shell {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1.2rem 1rem 3rem;
}

.home-hero {
  padding: 2rem 0 .5rem;
}

.home-hero h2 {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--dark);
}

.home-hero p {
  margin-top: .4rem;
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.6;
}

.home-photo-wall {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 1.5rem;
  margin-bottom: 2rem;
}

.home-photo-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .15s, box-shadow .15s;
  cursor: pointer;
  position: relative;
  aspect-ratio: 1;
}

.home-photo-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(39, 32, 26, .12);
}

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

.home-photo-card .home-photo-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: .6rem .8rem;
  background: linear-gradient(transparent, rgba(0,0,0,.65));
  color: #fff;
  font-size: 1.05rem;
  font-weight: 900;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .75rem;
}

.summary-card {
  min-height: 5.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: .9rem 1rem;
  box-shadow: var(--shadow);
}

.summary-value {
  display: block;
  font-size: 1.7rem;
  line-height: 1;
  font-weight: 900;
}

.summary-label {
  display: block;
  margin-top: .35rem;
  color: var(--muted);
  font-size: .8rem;
  font-weight: 700;
}

.tone-green .summary-value { color: var(--green); }
.tone-blue .summary-value { color: var(--blue); }
.tone-amber .summary-value { color: var(--amber); }
.tone-red .summary-value { color: var(--red); }
.tone-dark .summary-value { color: var(--dark); }

.controls {
  margin-top: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1rem;
  box-shadow: var(--shadow);
}

.search-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: .75rem;
}

.search-box,
.filter-field {
  display: grid;
  gap: .35rem;
}

.search-box span,
.filter-field span {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 800;
}

.search-box input,
.filter-field select {
  width: 100%;
  min-height: 2.6rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text);
  padding: .55rem .7rem;
  outline: none;
}

.search-input-row {
  display: flex;
  gap: .5rem;
}

.search-input-row input {
  flex: 1;
  min-height: 2.6rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text);
  padding: .55rem .7rem;
  outline: none;
  font: inherit;
}

.search-input-row input:focus {
  border-color: #c08a2f;
  box-shadow: 0 0 0 3px rgba(192, 138, 47, .16);
}

.search-btn {
  flex-shrink: 0;
  min-height: 2.6rem;
  border: 1px solid #c08a2f;
  border-radius: 8px;
  background: #c08a2f;
  color: #fff;
  padding: .55rem 1rem;
  font-weight: 800;
  font-size: .88rem;
  white-space: nowrap;
  transition: background .18s, border-color .18s;
}

.search-btn:hover {
  background: #a67627;
  border-color: #a67627;
}

.search-box input:focus,
.filter-field select:focus {
  border-color: #c08a2f;
  box-shadow: 0 0 0 3px rgba(192, 138, 47, .16);
}

.filter-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: .75rem;
  margin-top: .75rem;
}

.result-bar {
  display: flex;
  gap: .75rem;
  align-items: center;
  justify-content: space-between;
  margin-top: .9rem;
  padding-top: .85rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .88rem;
}

.result-bar strong {
  color: var(--text);
}

.text-button {
  border: none;
  background: transparent;
  color: var(--amber);
  font-weight: 800;
}

.cat-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

.cat-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: border-color .18s, transform .18s, box-shadow .18s;
  aspect-ratio: 1;
}

.cat-card:hover,
.cat-card:focus {
  border-color: #d0a35a;
  box-shadow: 0 12px 28px rgba(39, 32, 26, .12);
  transform: translateY(-2px);
  outline: none;
}

.cat-card-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cat-card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  background: var(--surface-soft);
  color: var(--line);
}

.cat-card-name {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: .6rem .8rem;
  background: linear-gradient(transparent, rgba(0,0,0,.65));
  color: #fff;
  font-size: 1.1rem;
  font-weight: 900;
  line-height: 1.2;
}

.drawer-image {
  width: calc(100% + 3rem);
  max-height: 300px;
  object-fit: cover;
  margin: 0 -1.5rem 1rem;
  border-radius: var(--radius);
}

.status-pill,
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 1.55rem;
  border-radius: 999px;
  padding: .16rem .58rem;
  font-size: .72rem;
  font-weight: 900;
  white-space: nowrap;
}

.status-pill {
  background: var(--blue-bg);
  color: var(--blue);
}

.status-在校 {
  background: var(--green-bg);
  color: var(--green);
}

.status-预计领养 {
  background: var(--amber-bg);
  color: var(--amber);
}

.status-已离世,
.status-失踪 {
  background: var(--red-bg);
  color: var(--red);
}

.drawer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: 1rem;
}

.tag {
  background: #f1f5f9;
  color: #475569;
}

.vaccine-待首针,
.vaccine-超窗口 {
  background: var(--red-bg);
  color: var(--red);
}

.vaccine-需补针 {
  background: var(--amber-bg);
  color: var(--amber);
}

.vaccine-三针完成 {
  background: var(--green-bg);
  color: var(--green);
}

.empty-state {
  margin-top: 1rem;
  border: 1px dashed #c9c1b7;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .6);
  padding: 2rem;
  text-align: center;
}

.empty-state p {
  margin-top: .4rem;
  color: var(--muted);
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(15, 15, 15, .36);
}

.cat-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 30;
  width: min(100%, 31rem);
  overflow-y: auto;
  background: var(--surface);
  box-shadow: -16px 0 40px rgba(0, 0, 0, .18);
  padding: 1.1rem;
}

.drawer-header {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1rem;
}

.drawer-header p {
  color: var(--muted);
  font-size: .8rem;
  font-weight: 800;
}

.drawer-header h2 {
  margin-top: .15rem;
  font-size: 1.7rem;
}

.icon-button {
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 1.45rem;
  line-height: 1;
}

.drawer-tags {
  margin-top: 1rem;
}

.drawer-tabs {
  display: flex;
  gap: 0;
  margin-top: 1rem;
  border-bottom: 2px solid var(--line);
}

.drawer-tab {
  flex: 1;
  padding: .55rem 0;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: .88rem;
  font-weight: 900;
  cursor: pointer;
  position: relative;
  transition: color .18s;
}

.drawer-tab::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: transparent;
  transition: background .18s;
}

.drawer-tab.active {
  color: var(--text);
}

.drawer-tab.active::after {
  background: #c08a2f;
}

.drawer-content {
  margin-top: 1rem;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .6rem;
}

.photo-item {
  border-radius: 8px;
  overflow: hidden;
  background: var(--line);
  cursor: pointer;
  transition: transform .15s;
}

.photo-item:hover {
  transform: scale(1.03);
}

.photo-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

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

.photo-empty p:first-child {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
}

.photo-empty-hint {
  margin-top: .5rem;
  font-size: .82rem;
}

.photo-empty code {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: .1rem .35rem;
  font-size: .82rem;
}

.photo-viewer {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(0, 0, 0, .88);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.photo-viewer img {
  max-width: 92vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius);
}

.detail-list {
  display: grid;
  gap: .9rem;
  margin-top: 1rem;
}

.detail-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: .8rem;
}

.detail-row dt {
  color: var(--muted);
  font-size: .76rem;
  font-weight: 800;
}

.detail-row dd {
  margin-top: .22rem;
  line-height: 1.65;
  color: #33302d;
  font-size: .86rem;
  font-weight: 650;
}

body.drawer-open {
  overflow: hidden;
}

.tab-panel {
  animation: fadeIn .2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== Supplies Tab ===== */

.supplies-list {
  display: grid;
  gap: 1rem;
}

.supply-category {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1rem;
  box-shadow: var(--shadow);
}

.supply-category h3 {
  font-size: 1rem;
  margin-bottom: .75rem;
}

.supply-cat-note {
  color: var(--muted);
  font-size: .78rem;
  margin-top: -.25rem;
  margin-bottom: .5rem;
}

.supply-empty {
  color: var(--muted);
  font-size: .86rem;
}

.supply-table {
  display: grid;
  gap: .25rem;
}

.supply-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 2fr;
  gap: .5rem;
  padding: .55rem .35rem;
  border-radius: 6px;
  font-size: .82rem;
  align-items: center;
}

.supply-row-header {
  color: var(--muted);
  font-weight: 800;
  font-size: .72rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: .4rem;
  margin-bottom: .2rem;
}

.supply-row:not(.supply-row-header):nth-child(odd) {
  background: var(--surface-soft);
}

/* ===== SOP Tab ===== */

.sop-list {
  display: grid;
  gap: .75rem;
}

.sop-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.sop-title {
  display: block;
  padding: .9rem 1rem;
  font-weight: 900;
  font-size: 1rem;
  cursor: pointer;
  user-select: none;
  transition: background .15s;
}

.sop-title:hover {
  background: var(--surface-soft);
}

.sop-card[open] .sop-title {
  border-bottom: 1px solid var(--line);
}

.sop-body {
  padding: 1rem;
}

.sop-section {
  margin-bottom: 1rem;
}

.sop-section:last-child {
  margin-bottom: 0;
}

.sop-section h4 {
  font-size: .88rem;
  color: var(--amber);
  margin-bottom: .35rem;
}

.sop-section ul {
  padding-left: 1.2rem;
}

.sop-section li {
  font-size: .86rem;
  line-height: 1.7;
  color: #33302d;
}

/* ===== Plans Tab ===== */

.plans-list {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.plans-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.plans-card-header {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .8rem 1rem;
  background: #2f2924;
  color: #f7c974;
  cursor: pointer;
  user-select: none;
  transition: filter .15s;
}

.plans-card-header:hover {
  filter: brightness(1.06);
}

.plans-card[open] .plans-card-header {
  border-bottom: 1px solid rgba(255,255,255,.12);
}

.plans-card-header h3 {
  font-size: .95rem;
  font-weight: 900;
}

.plans-card-title {
  margin-top: .15rem;
  font-size: .78rem;
  opacity: .75;
}

.plans-card-arrow {
  margin-left: auto;
  font-size: .85rem;
  opacity: .5;
  transition: transform .2s;
}

.plans-card[open] .plans-card-arrow {
  transform: rotate(180deg);
}

.plans-card-body {
  padding: 1rem;
}

.plans-section {
  margin-bottom: 1rem;
}

.plans-section:last-child {
  margin-bottom: 0;
}

.plans-section h4 {
  font-size: .86rem;
  font-weight: 800;
  color: var(--amber);
  margin-bottom: .3rem;
}

.plans-section p {
  font-size: .88rem;
  color: #4b5563;
  line-height: 1.6;
}

/* ===== Timeline Tab ===== */

.timeline-month-list {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.timeline-month-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.timeline-month-header {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .8rem 1rem;
  cursor: pointer;
  user-select: none;
  transition: filter .15s;
}

.timeline-month-header:hover {
  filter: brightness(1.06);
}

.timeline-month-card[open] .timeline-month-header {
  border-bottom: 1px solid var(--line);
}

.timeline-month-header h3 {
  font-size: .95rem;
  font-weight: 900;
}

.timeline-month-count {
  font-size: .74rem;
  font-weight: 700;
  opacity: .65;
}

.timeline-month-arrow {
  margin-left: auto;
  font-size: .85rem;
  opacity: .5;
  transition: transform .2s;
}

.timeline-month-card[open] .timeline-month-arrow {
  transform: rotate(180deg);
}

.timeline-month-body {
  padding: .5rem 1rem 1rem;
}

.timeline-month-item {
  display: flex;
  gap: .6rem;
  align-items: flex-start;
  padding: .55rem 0;
  border-bottom: 1px dashed var(--line);
}

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

.timeline-month-day {
  flex-shrink: 0;
  width: 3rem;
  padding-top: .12rem;
  font-size: .72rem;
  font-weight: 800;
  color: var(--muted);
}

.timeline-month-content {
  flex: 1;
  min-width: 0;
}

.timeline-month-cat {
  font-size: .9rem;
  font-weight: 800;
}

.timeline-month-desc {
  margin-top: .1rem;
  font-size: .8rem;
  color: #4b5563;
  line-height: 1.5;
}

.timeline-month-badge {
  display: inline-block;
  font-size: .66rem;
  font-weight: 900;
  padding: .08rem .45rem;
  border-radius: 999px;
  margin-left: .4rem;
  vertical-align: middle;
}

.timeline-month-badge-救助 {
  background: var(--red-bg);
  color: var(--red);
}

.timeline-month-badge-疫苗 {
  background: var(--green-bg);
  color: var(--green);
}

.timeline-month-badge-绝育 {
  background: var(--blue-bg);
  color: var(--blue);
}

.timeline-month-badge-送养 {
  background: var(--amber-bg);
  color: var(--amber);
}

/* ===== Roles Tab ===== */

.roles-list {
  display: grid;
  gap: 1rem;
}

.role-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.role-header {
  padding: 1rem 1rem .6rem;
  border-bottom: 1px solid rgba(255,255,255,.15);
}

.role-header h3 {
  font-size: 1.15rem;
  font-weight: 900;
  color: #2f2924;
}

.role-desc {
  margin-top: .3rem;
  font-size: .92rem;
  font-weight: 600;
  line-height: 1.5;
  color: rgba(255,255,255,.82);
}

.role-phases {
  padding: .6rem 1rem 1rem;
}

.role-phase {
  display: flex;
  gap: .6rem;
  padding: .55rem 0;
  border-bottom: 1px dashed var(--line);
}

.role-phase:last-child {
  border-bottom: none;
}

.role-phase-label {
  flex-shrink: 0;
  min-width: 5rem;
  font-size: .8rem;
  font-weight: 800;
  color: var(--amber);
}

.role-phase-detail {
  font-size: .86rem;
  color: #33302d;
  line-height: 1.5;
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .82rem;
  padding: 1.5rem 1rem;
  text-align: center;
}

@media (min-width: 720px) {
  .summary-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .search-row {
    grid-template-columns: 1fr 12rem;
  }

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

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

  .home-photo-wall {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1040px) {
  .summary-grid {
    grid-template-columns: repeat(7, 1fr);
  }

  .cat-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .home-photo-wall {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 719px) {
  :root {
    --sidebar-w: 220px;
  }

  .sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: .5rem;
    left: .5rem;
    z-index: 15;
    width: 2.3rem;
    height: 2.3rem;
    border: none;
    border-radius: 8px;
    background: #2f2924;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    -webkit-backface-visibility: hidden;
    transition: opacity .2s;
  }

  .sidebar-toggle:hover {
    opacity: .85;
  }

  .sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 24;
    background: rgba(0, 0, 0, .45);
  }

  body.sidebar-open .sidebar-backdrop {
    display: block;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 25;
    -webkit-backface-visibility: hidden;
    -webkit-transform: translateX(-100%);
    transform: translateX(-100%);
    will-change: transform;
    transition: -webkit-transform .25s ease, transform .25s ease;
    width: var(--sidebar-w);
  }

  body.sidebar-open .sidebar {
    -webkit-transform: translateX(0);
    transform: translateX(0);
  }

  .sidebar-close {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: .5rem;
    right: .5rem;
    width: 1.8rem;
    height: 1.8rem;
    border: none;
    border-radius: 6px;
    background: rgba(255, 255, 255, .1);
    color: rgba(255, 255, 255, .7);
    font-size: .9rem;
    cursor: pointer;
    transition: background .15s;
  }

  .sidebar-close:hover {
    background: rgba(255, 255, 255, .18);
    color: #fff;
  }

  .sidebar-brand {
    padding: 1.2rem .8rem .9rem;
    position: relative;
  }

  .sidebar-title {
    font-size: 1.1rem;
  }

  .sidebar-nav {
    padding: .4rem .4rem .8rem;
  }

  .sidebar-item {
    padding: .6rem .6rem;
    font-size: .82rem;
  }

  .main-area {
    padding-top: .2rem;
  }

  .result-bar {
    align-items: flex-start;
    flex-direction: column;
  }
}
