:root {
  color-scheme: light;
  --bg: #eef8fb;
  --bg-deep: #dff1f6;
  --panel: rgba(255, 255, 255, 0.88);
  --panel-solid: #ffffff;
  --panel-soft: #f3fbfd;
  --text: #162033;
  --muted: #7f8da2;
  --line: #d9ebf2;
  --line-strong: #c4e0e9;
  --accent: #11aeb9;
  --accent-strong: #0797a4;
  --accent-deep: #087782;
  --accent-soft: #e7f9fb;
  --danger: #e24d4d;
  --danger-soft: #fff1f1;
  --warn: #b7791f;
  --warn-soft: #fff6dc;
  --success: #159c57;
  --shadow: 0 18px 46px rgba(43, 91, 113, 0.13);
  --shadow-soft: 0 10px 26px rgba(43, 91, 113, 0.08);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 9% 16%, rgba(87, 191, 209, 0.16), transparent 26%),
    radial-gradient(circle at 86% 2%, rgba(175, 228, 239, 0.42), transparent 24%),
    linear-gradient(180deg, #f8fdff 0%, #edf7fb 44%, #f5fbfd 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(14, 151, 164, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(14, 151, 164, 0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.72), transparent 80%);
}

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

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.shell {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

.lab-bg {
  position: fixed;
  pointer-events: none;
  z-index: -1;
  color: rgba(17, 174, 185, 0.72);
}

.lab-bg-left {
  left: 0;
  top: 104px;
  width: 170px;
  height: 430px;
  opacity: 0.8;
}

.lab-bg-top {
  right: 36px;
  top: 14px;
  width: 256px;
  height: 118px;
  opacity: 0.48;
}

.lab-svg {
  pointer-events: none;
  color: rgba(17, 174, 185, 0.72);
  overflow: visible;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr);
  align-items: center;
  gap: 18px;
  min-height: 86px;
  margin: 6px clamp(10px, 1.1vw, 22px) 0;
  padding: 18px clamp(18px, 2.2vw, 34px);
  border: 1px solid rgba(215, 235, 242, 0.82);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(145deg, #1ecbd0, #0798a8);
  color: white;
  font-size: 20px;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(7, 151, 164, 0.28);
}

.brand h1 {
  margin: 0;
  color: #13213a;
  font-size: 22px;
  line-height: 1.08;
}

.brand p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.top-nav,
.top-actions,
.row,
.action-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.top-nav {
  justify-content: center;
  gap: 24px;
}

.top-actions {
  justify-content: flex-end;
}

.nav-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 4px;
  background: transparent;
  color: #25334a;
  font-weight: 900;
}

.nav-item span {
  color: var(--accent);
  font-size: 18px;
}

.nav-item.active {
  color: var(--accent-deep);
}

.nav-item.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -23px;
  height: 4px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 16px rgba(17, 174, 185, 0.32);
}

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

.page {
  display: block;
  width: min(100%, 1980px);
  margin: 0 auto;
  padding: 26px clamp(14px, 1.1vw, 22px) 48px;
}

.page-home {
  width: min(100%, 1980px);
}

.main {
  min-width: 0;
  width: 100%;
  margin: 0 auto;
}

.panel,
.card,
.auth-card,
.modal-panel,
.article {
  background: var(--panel);
  border: 1px solid rgba(213, 233, 241, 0.92);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.panel {
  padding: clamp(18px, 2vw, 30px);
}

.panel h2,
.panel h3,
.main h2,
.main h3 {
  margin: 0;
}

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

.small {
  font-size: 13px;
}

.stack {
  display: grid;
  gap: 16px;
}

.spacer {
  flex: 1;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 16px;
  border: 1px solid rgba(205, 225, 234, 0.95);
  border-radius: 7px;
  background: linear-gradient(180deg, #ffffff, #f4fafc);
  color: #26364d;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(43, 91, 113, 0.08);
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(43, 91, 113, 0.12);
}

.btn.primary {
  border-color: transparent;
  background: linear-gradient(135deg, #1ecbd0, #0797a4);
  color: white;
  box-shadow: 0 12px 24px rgba(7, 151, 164, 0.26);
}

.btn.primary:hover {
  background: linear-gradient(135deg, #25d4d7, #078b98);
}

.btn.danger {
  border-color: #ffd4d4;
  background: var(--danger-soft);
  color: var(--danger);
}

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

.btn.compact {
  min-height: 34px;
  padding: 6px 8px;
}

.btn.icon {
  width: 38px;
  min-height: 38px;
  padding: 0;
}

.home-btn,
.home-icon {
  display: inline-flex;
}

.user-pill,
.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 12px;
  font-weight: 900;
}

.user-pill {
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid rgba(193, 224, 234, 0.9);
  background: rgba(255, 255, 255, 0.72);
  color: #4b5b72;
}

.pill.warn {
  background: var(--warn-soft);
  color: var(--warn);
}

.instrument-pill {
  color: white;
  box-shadow: 0 8px 18px rgba(17, 174, 185, 0.18);
}

.field {
  display: grid;
  gap: 7px;
}

.field span {
  color: #67768d;
  font-size: 13px;
  font-weight: 900;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  padding: 11px 12px;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

input:focus,
select:focus,
textarea:focus,
.editor:focus {
  border-color: rgba(17, 174, 185, 0.76);
  box-shadow: 0 0 0 4px rgba(17, 174, 185, 0.12);
}

textarea {
  min-height: 104px;
  resize: vertical;
}

.auth-wrap {
  position: relative;
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  overflow: hidden;
}

.auth-illustration {
  position: absolute;
  inset: auto 5vw 8vh auto;
  width: min(42vw, 460px);
  height: min(34vw, 340px);
  color: rgba(17, 174, 185, 0.56);
  opacity: 0.58;
}

.auth-card {
  position: relative;
  width: min(460px, 100%);
  padding: 28px;
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.tab {
  padding: 10px;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
}

.tab.active {
  background: white;
  color: var(--accent-deep);
  box-shadow: var(--shadow-soft);
}

.section-heading {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.compact-heading {
  align-items: center;
}

.section-icon {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--accent);
  font-size: 23px;
  font-weight: 900;
}

.svg-icon {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.section-heading p {
  margin: 6px 0 0;
}

.home-hero {
  position: relative;
  min-height: 360px;
  overflow: hidden;
}

.home-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 92% 12%, rgba(17, 174, 185, 0.09), transparent 14%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.2), transparent 42%);
}

.home-hero::after,
.history-panel::after {
  content: none;
}

.home-hero-art {
  position: absolute;
  right: 34px;
  top: 30px;
  width: 210px;
  height: auto;
  color: rgba(17, 174, 185, 0.52);
  opacity: 0.38;
}

.instrument-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 18px;
}

.home-grid {
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  align-items: stretch;
}

.instrument-card {
  position: relative;
  min-height: 240px;
  overflow: hidden;
  border: 1px solid rgba(202, 225, 234, 0.96);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-soft);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.instrument-card:hover,
.instrument-card:focus-within {
  transform: translateY(-3px);
  border-color: rgba(17, 174, 185, 0.42);
  box-shadow: 0 18px 34px rgba(43, 91, 113, 0.14);
}

.instrument-card-main {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 238px;
  align-content: space-between;
  gap: 18px;
  padding: 24px;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.card-wave {
  position: absolute;
  inset: 44px 22px auto 105px;
  height: 82px;
  opacity: 0.5;
  background:
    radial-gradient(ellipse at 22% 78%, transparent 0 24px, rgba(17, 174, 185, 0.16) 25px 27px, transparent 28px),
    radial-gradient(ellipse at 58% 58%, transparent 0 26px, rgba(17, 174, 185, 0.12) 27px 29px, transparent 30px),
    radial-gradient(ellipse at 92% 22%, transparent 0 34px, rgba(17, 174, 185, 0.16) 35px 37px, transparent 38px);
}

.logo-edit {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.instrument-card:hover .logo-edit,
.instrument-card:focus-within .logo-edit {
  opacity: 1;
}

.logo {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  border-radius: 8px;
  color: white;
  padding: 5px;
  font-size: clamp(15px, 2.2vw, 22px);
  font-weight: 900;
  line-height: 1.05;
  text-align: center;
  overflow-wrap: anywhere;
  box-shadow: 0 13px 24px rgba(17, 174, 185, 0.24);
}

.instrument-card-main strong {
  display: block;
  margin-bottom: 8px;
  color: #18243a;
  font-size: 20px;
}

.instrument-card-main p {
  margin: 0;
  min-height: 22px;
}

.card-arrow {
  position: absolute;
  right: 20px;
  bottom: 18px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(17, 174, 185, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--accent);
  font-size: 24px;
  font-weight: 900;
}

.empty-state {
  display: grid;
  min-height: 170px;
  place-items: center;
  gap: 8px;
  padding: 28px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: rgba(244, 251, 253, 0.7);
  text-align: center;
}

.empty-state.tall {
  min-height: 320px;
}

.vote-panel {
  margin-bottom: 26px;
}

.accent-panel {
  border-color: rgba(17, 174, 185, 0.24);
}

.vote-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.procedure-list {
  display: grid;
  gap: 12px;
}

.inline-list {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.procedure-item {
  display: grid;
  gap: 7px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  text-align: left;
  box-shadow: 0 8px 18px rgba(43, 91, 113, 0.05);
}

.procedure-item.active {
  border-color: rgba(17, 174, 185, 0.62);
  box-shadow: inset 0 -3px 0 var(--accent), 0 10px 22px rgba(17, 174, 185, 0.11);
}

.procedure-item strong {
  font-size: 15px;
}

.content-view {
  display: grid;
  gap: 20px;
}

.article {
  padding: clamp(22px, 2.3vw, 34px);
}

.action-row {
  gap: 12px;
}

.article-title {
  display: grid;
  gap: 10px;
}

.article-title h2 {
  color: #142039;
  font-size: clamp(26px, 2.4vw, 38px);
  line-height: 1.12;
}

.article-title p {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  margin: 0;
  font-weight: 800;
}

.article-body {
  overflow-wrap: anywhere;
  color: #24334c;
  font-size: 16px;
}

.article-body h1,
.article-body h2,
.article-body h3 {
  margin: 1.35em 0 0.45em;
  color: #18243a;
  line-height: 1.2;
}

.article-body h2 {
  position: relative;
  padding-left: 44px;
  font-size: 23px;
}

.article-body h2::before {
  content: "◎";
  position: absolute;
  left: 0;
  top: -2px;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: var(--accent);
  font-size: 24px;
}

.article-body p {
  margin: 0.7em 0;
}

.article-body ul,
.article-body ol {
  margin-top: 0.45em;
  padding-left: 28px;
}

.article-body li {
  margin: 0.3em 0;
}

.article-body img,
.editor img {
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.article-body > img,
.editor > img {
  display: block;
  margin: 14px 0;
}

.history-panel {
  position: relative;
  overflow: hidden;
}

.history-panel-art {
  position: absolute;
  left: 50%;
  bottom: 22px;
  width: 260px;
  height: auto;
  transform: translateX(-50%);
  color: rgba(17, 174, 185, 0.46);
  opacity: 0.28;
}

.history {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
}

.history-month {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(248, 253, 254, 0.86);
}

.history-month-head {
  width: 100%;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 15px 16px;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.history-month-head > span:first-child {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.history-month-body {
  display: none;
  gap: 10px;
  padding: 0 14px 14px;
}

.history-month.open .history-month-body {
  display: grid;
}

.history-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
}

.history-head {
  width: 100%;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 13px;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.history-body {
  display: none;
  padding: 0 13px 13px;
  border-top: 1px solid var(--line);
}

.history-item.open .history-body {
  display: block;
}

.snapshot {
  max-height: 260px;
  overflow: auto;
  padding: 12px;
  border-radius: 7px;
  background: var(--panel-soft);
}

.change-section {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.change-section:first-child {
  margin-top: 0;
}

.change-section h4 {
  margin: 0;
  font-size: 14px;
}

.change-section.added h4,
.highlight-added {
  color: var(--success);
}

.change-section.modified h4,
.change-section.deleted h4,
.highlight-modified,
.highlight-deleted {
  color: #c83d3d;
}

.highlight-added,
.highlight-modified,
.highlight-deleted {
  font-weight: 900;
  border-left: 4px solid currentColor;
  padding-left: 7px;
}

.article-body .highlight-added {
  color: var(--success);
  background: rgba(34, 164, 90, 0.08);
  box-shadow: 0 0 0 6px rgba(34, 164, 90, 0.08);
}

.article-body .highlight-modified,
.article-body .highlight-deleted {
  color: #c83d3d;
  background: rgba(200, 61, 61, 0.1);
  box-shadow: 0 0 0 6px rgba(200, 61, 61, 0.1);
}

.highlight-deleted {
  text-decoration: line-through;
}

span.highlight-added,
span.highlight-modified,
span.highlight-deleted {
  border-left: 0;
  padding-left: 0;
  border-radius: 4px;
}

.article-body img.highlight-image-added {
  border: 3px solid #22a45a;
  box-shadow: 0 0 0 4px rgba(34, 164, 90, 0.14);
}

.article-body img.highlight-image-modified {
  border: 3px solid #d92d20;
  box-shadow: 0 0 0 4px rgba(217, 45, 32, 0.14);
}

.deleted-image-placeholder {
  display: grid;
  width: 100%;
  min-height: 120px;
  place-items: center;
  border: 4px solid #d92d20;
  border-radius: 8px;
  color: #b42318;
  background: rgba(217, 45, 32, 0.04);
  font-weight: 900;
}

.change-section ul {
  margin: 0;
  padding-left: 20px;
}

.change-row,
.image-change-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: stretch;
  gap: 10px;
  padding: 16px 0;
  border-top: 3px solid rgba(22, 32, 51, 0.88);
}

.change-row:first-of-type {
  padding-top: 0;
  border-top: 0;
}

.change-text {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-soft);
  overflow-wrap: anywhere;
}

.change-arrow {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 900;
}

.image-change-list {
  display: grid;
  gap: 10px;
}

.image-thumb {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.image-thumb.added {
  border-color: #22a45a;
}

.image-thumb.modified,
.image-thumb.deleted {
  border-color: #d92d20;
}

.image-thumb img {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  border-radius: 7px;
  background: white;
  border: 1px solid var(--line);
}

.image-thumb figcaption {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.image-block {
  --image-width: 64%;
  --image-offset: 0%;
  position: relative;
  display: block;
  clear: both;
  width: 100%;
  margin: 14px 0;
  padding: 4px 0;
  user-select: none;
}

.image-block img {
  display: block;
  width: var(--image-width);
  max-width: 100%;
  margin-left: var(--image-offset);
  background: white;
  cursor: grab;
}

.image-block.dragging img {
  cursor: grabbing;
}

.image-block.active {
  outline: 2px solid rgba(17, 174, 185, 0.28);
  outline-offset: 4px;
  border-radius: 8px;
}

.image-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(360px, calc(100% - var(--image-offset)));
  margin-top: 8px;
  margin-left: var(--image-offset);
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9feff;
  color: var(--muted);
  font-size: 13px;
  box-shadow: var(--shadow-soft);
}

.image-controls input {
  min-width: 120px;
  flex: 1;
}

.image-controls strong {
  min-width: 42px;
  color: var(--text);
  text-align: right;
}

.image-controls button {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 7px;
  background: var(--danger-soft);
  color: var(--danger);
  font-weight: 900;
}

.editor-shell {
  display: grid;
  gap: 10px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(243, 251, 253, 0.9);
}

.toolbar button,
.toolbar select,
.toolbar input {
  width: auto;
  min-height: 34px;
}

.color-tool {
  position: relative;
  display: inline-grid;
  width: 42px;
  min-height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
  color: var(--text);
  font-weight: 900;
  overflow: hidden;
  cursor: pointer;
}

.color-tool span {
  pointer-events: none;
  border-bottom: 3px solid #172033;
  line-height: 1;
}

.highlight-tool span {
  border-bottom-color: #facc15;
}

.color-tool input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.editor {
  min-height: 390px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  outline: none;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 33, 49, 0.36);
  backdrop-filter: blur(8px);
}

.modal-panel {
  width: min(920px, 100%);
  max-height: min(92vh, 900px);
  overflow: auto;
  padding: 22px;
}

.wide-modal {
  width: min(1040px, 100%);
}

.notice {
  padding: 12px 13px;
  border: 1px solid #f1d497;
  border-radius: 8px;
  background: #fff9e8;
  color: #725000;
}

.error {
  padding: 11px 13px;
  border: 1px solid #f4b1aa;
  border-radius: 8px;
  background: var(--danger-soft);
  color: var(--danger);
}

.admin-section {
  padding-top: 4px;
}

.admin-section h3 {
  margin: 0;
}

.admin-section p {
  margin: 4px 0 0;
}

.admin-list {
  display: grid;
  gap: 10px;
}

.admin-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.user-admin-row {
  grid-template-columns: minmax(220px, 1fr) minmax(130px, 160px) minmax(130px, 160px);
}

.admin-row strong,
.admin-row span {
  overflow-wrap: anywhere;
}

.code-text {
  display: block;
  margin-bottom: 4px;
  letter-spacing: 0.08em;
}

.compact-field {
  gap: 4px;
}

.compact-field select {
  min-height: 38px;
  padding: 8px 10px;
}

@media (max-width: 980px) {
  .topbar {
    grid-template-columns: 1fr;
  }

  .top-nav,
  .top-actions {
    justify-content: flex-start;
  }

  .nav-item.active::after {
    bottom: -6px;
  }

  .content-view {
    gap: 20px;
  }

  .history-panel {
    min-height: 0;
  }
}

@media (max-width: 760px) {
  .topbar {
    margin: 0;
    border-radius: 0;
  }

  .page {
    padding-inline: 12px;
  }

  .panel,
  .article,
  .auth-card,
  .modal-panel {
    padding: 18px;
  }

  .brand-mark {
    width: 48px;
    height: 48px;
  }

  .top-nav {
    width: 100%;
    gap: 8px;
  }

  .nav-item {
    min-height: 38px;
    padding-right: 10px;
  }

  .home-grid,
  .instrument-grid,
  .inline-list {
    grid-template-columns: 1fr;
  }

  .instrument-card,
  .instrument-card-main {
    min-height: 210px;
  }

  .action-row,
  .top-actions {
    align-items: stretch;
  }

  .action-row .btn,
  .top-actions .btn {
    flex: 1 1 auto;
  }

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

  .article-body h2 {
    padding-left: 34px;
  }

  .change-row,
  .image-change-row,
  .vote-card,
  .admin-row,
  .user-admin-row {
    grid-template-columns: 1fr;
  }

  .change-arrow {
    min-height: 24px;
    font-size: 0;
  }

  .change-arrow::before {
    content: "↓";
    font-size: 18px;
  }

  .lab-bg-top {
    display: none;
  }
}
