:root {
  --red: #df2a16;
  --red-dark: #b91f10;
  --paper: #f6f3ed;
  --white: #fff;
  --ink: #12110f;
  --muted: #6c655e;
  --line: #d9d3c9;
  --soft: #ece8e0;
  --green: #16834d;
  --sidebar: 260px;
  --sans: "Noto Sans SC", "Source Han Sans SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  --serif: "Noto Serif SC", "Source Han Serif SC", "Noto Serif CJK SC", "Songti SC", "SimSun", serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

body.is-locked {
  overflow: hidden;
}

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

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

img {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
p {
  margin: 0;
}

button {
  cursor: pointer;
}

::selection {
  color: var(--white);
  background: var(--red);
}

.admin-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  width: var(--sidebar);
  display: flex;
  padding: 28px 20px 22px;
  flex-direction: column;
  color: var(--white);
  background: var(--ink);
}

.admin-brand {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 0 13px;
  align-items: center;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(255, 255, 255, .18);
}

.admin-brand-logo {
  grid-row: 1 / span 2;
  width: 42px;
  height: 42px;
  display: block;
}

.admin-brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.admin-brand strong {
  min-width: 0;
  overflow: hidden;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-brand small {
  color: rgba(255, 255, 255, .5);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .12em;
}

.admin-nav {
  display: grid;
  margin-top: 32px;
}

.admin-nav a {
  display: flex;
  min-height: 48px;
  padding: 0 4px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  color: rgba(255, 255, 255, .72);
  font-size: 13px;
  transition: color .2s, padding .2s;
}

.admin-nav a:hover {
  padding-left: 10px;
  color: var(--white);
}

.admin-nav a.is-active {
  color: var(--white);
}

.admin-nav a b {
  color: var(--red);
  font-size: 9px;
}

.sidebar-bottom {
  display: grid;
  gap: 12px;
  margin-top: auto;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, .18);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .05em;
}

.sidebar-bottom a {
  color: rgba(255, 255, 255, .58);
}

.sidebar-bottom a:hover {
  color: var(--white);
}

.admin-main {
  min-height: 100vh;
  margin-left: var(--sidebar);
  padding: 0 clamp(24px, 4vw, 64px) 70px;
}

.admin-top {
  min-height: 112px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  border-bottom: 1px solid var(--ink);
}

.admin-top h1 {
  margin-top: 9px;
  font-family: var(--serif);
  font-size: clamp(31px, 3.4vw, 48px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.05em;
}

.admin-kicker {
  color: var(--red);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.admin-user {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--muted);
  font-size: 11px;
}

.admin-user a {
  padding-bottom: 4px;
  border-bottom: 1px solid var(--line);
}

.admin-user a:hover {
  color: var(--red);
}

.admin-menu {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--ink);
  background: transparent;
  font-size: 17px;
}

.flash {
  margin-top: 22px;
  padding: 13px 16px;
  border-left: 3px solid var(--green);
  background: #e5f3e9;
  font-size: 12px;
}

.flash-error {
  border-color: var(--red);
  background: #fbe7e3;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  margin-top: 40px;
  border: 1px solid var(--line);
  background: var(--line);
}

.stats-grid a {
  position: relative;
  min-height: 180px;
  display: flex;
  padding: 24px;
  flex-direction: column;
  background: var(--white);
  transition: color .25s, background .25s;
}

.stats-grid a::after {
  content: "↗";
  position: absolute;
  top: 22px;
  right: 22px;
  color: var(--red);
  font-size: 16px;
}

.stats-grid a:hover {
  color: var(--white);
  background: var(--red);
}

.stats-grid a:hover::after,
.stats-grid a:hover span {
  color: var(--white);
}

.stats-grid span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .08em;
}

.stats-grid strong {
  margin: auto 0 5px;
  font-family: var(--serif);
  font-size: clamp(54px, 5vw, 80px);
  font-weight: 500;
  line-height: .8;
}

.stats-grid small {
  color: var(--muted);
  font-size: 11px;
}

.stats-grid a:hover small {
  color: rgba(255, 255, 255, .68);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(340px, .88fr);
  gap: 25px;
  margin-top: 25px;
}

.admin-panel {
  margin-top: 34px;
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid var(--line);
  background: var(--white);
}

.dashboard-grid > .admin-panel {
  margin-top: 0;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.panel-heading h2 {
  margin-top: 8px;
  font-family: var(--serif);
  font-size: clamp(26px, 2.8vw, 38px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -.035em;
}

.admin-primary,
.admin-secondary {
  display: inline-flex;
  min-height: 42px;
  padding: 0 18px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--red);
  font-size: 11px;
  white-space: nowrap;
}

.admin-primary {
  color: var(--white);
  background: var(--red);
}

.admin-primary:hover {
  background: var(--ink);
  border-color: var(--ink);
}

.admin-secondary {
  color: var(--red);
  background: transparent;
}

.admin-secondary:hover {
  color: var(--white);
  background: var(--red);
}

.small-link {
  color: var(--red);
  font-size: 11px;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--ink);
  border-left: 1px solid var(--line);
}

.quick-actions a {
  min-height: 125px;
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 4px 11px;
  align-content: center;
  padding: 19px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transition: background .2s;
}

.quick-actions a:hover {
  background: var(--soft);
}

.quick-actions b {
  grid-row: 1 / span 2;
  color: var(--red);
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 400;
}

.quick-actions span {
  font-family: var(--serif);
  font-size: 19px;
}

.quick-actions small {
  color: var(--muted);
  font-size: 10px;
}

.compact-list {
  display: grid;
}

.compact-list a {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 18px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.compact-list a:first-child {
  padding-top: 0;
}

.compact-list span {
  min-width: 0;
  overflow: hidden;
  font-family: var(--serif);
  font-size: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-list small {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
}

.compact-list b {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  color: var(--red);
  font-size: 9px;
  font-weight: 400;
}

.notice-panel {
  display: flex;
  margin-top: 25px;
  padding: 25px 30px;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  color: var(--white);
  background: var(--red);
}

.notice-panel .admin-kicker {
  color: rgba(255, 255, 255, .64);
}

.notice-panel h3 {
  margin: 9px 0 8px;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
}

.notice-panel p {
  max-width: 760px;
  color: rgba(255, 255, 255, .72);
  font-size: 11px;
  line-height: 1.7;
}

.notice-panel > a {
  flex: 0 0 auto;
  padding-bottom: 7px;
  border-bottom: 1px solid rgba(255, 255, 255, .65);
  font-size: 11px;
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th {
  padding: 0 12px 12px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 400;
  letter-spacing: .06em;
  text-align: left;
  white-space: nowrap;
}

.admin-table td {
  min-width: 74px;
  padding: 13px 12px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  vertical-align: middle;
}

.admin-table td:nth-child(2) {
  min-width: 190px;
}

.admin-table td strong {
  display: block;
  max-width: 360px;
  overflow: hidden;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-table td small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
}

.admin-thumb {
  width: 58px;
  height: 48px;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--muted);
  background: var(--soft);
}

.admin-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 50%;
  background: #aaa49b;
}

.status-dot.is-live {
  background: var(--green);
}

.admin-table td.right {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
}

.admin-table td.right a,
.admin-table td.right button,
.media-card button {
  padding: 0;
  border: 0;
  color: var(--red);
  background: transparent;
  font-size: 10px;
}

.admin-table td.right button:hover,
.media-card button:hover {
  color: var(--ink);
}

.empty-state {
  padding: 80px 24px;
  border: 1px dashed var(--line);
  text-align: center;
}

.empty-state b {
  color: var(--red);
  font-family: var(--serif);
  font-size: 64px;
  font-weight: 500;
  line-height: 1;
}

.empty-state h3 {
  margin: 20px 0 9px;
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 500;
}

.empty-state p,
.empty {
  color: var(--muted);
  font-size: 12px;
}

.entity-form {
  margin-top: 34px;
}

.editor-head {
  display: flex;
  padding-bottom: 28px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  border-bottom: 1px solid var(--ink);
}

.editor-head h2 {
  margin-top: 10px;
  font-family: var(--serif);
  font-size: clamp(35px, 4vw, 56px);
  font-weight: 500;
  line-height: .95;
  letter-spacing: -.055em;
}

.editor-actions {
  display: flex;
  gap: 9px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: 34px;
  border: 1px solid var(--line);
  background: var(--line);
}

.admin-field {
  min-width: 0;
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 20px;
  background: var(--white);
}

.admin-field > span,
.image-field > span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .06em;
}

.admin-field input,
.admin-field select,
.admin-field textarea {
  width: 100%;
  padding: 11px 0;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  outline: 1px solid transparent;
  color: var(--ink);
  background: transparent;
  font-size: 14px;
  transition: border-color .2s;
}

.admin-field textarea {
  min-height: 100px;
  padding: 11px;
  border: 1px solid var(--line);
  line-height: 1.7;
  resize: vertical;
}

.admin-field input:focus,
.admin-field select:focus,
.admin-field textarea:focus {
  border-color: var(--red);
  outline: 0;
}

.admin-field select {
  min-height: 44px;
  cursor: pointer;
}

.field-wide {
  grid-column: span 1;
}

.field-full {
  grid-column: 1 / -1;
}

.field-help {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
}

.editor-toolbar {
  display: flex;
  gap: 1px;
  flex-wrap: wrap;
  padding-top: 5px;
}

.editor-toolbar button {
  min-width: 37px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--paper);
  font-size: 10px;
}

.editor-toolbar button:hover,
.editor-toolbar button.is-active {
  color: var(--white);
  background: var(--red);
  border-color: var(--red);
}

.rich-editor {
  min-height: 340px;
  padding: 26px;
  border: 1px solid var(--line);
  outline: 0;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.8;
}

.rich-editor:focus {
  border-color: var(--red);
}

.rich-editor p {
  margin-bottom: 1.1em;
}

.rich-editor h2 {
  margin: 1.1em 0 .55em;
  font-size: 1.7em;
  font-weight: 500;
  line-height: 1.2;
}

.rich-editor h3 {
  margin: 1em 0 .45em;
  font-size: 1.3em;
  font-weight: 500;
}

.rich-editor blockquote {
  margin: 1.4em 0;
  padding-left: 1.2em;
  border-left: 2px solid var(--red);
  color: var(--muted);
}

.rich-editor a {
  color: var(--red);
  text-decoration: underline;
}

.image-field {
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 12px 20px;
}

.image-field > span {
  grid-column: 1 / -1;
}

.image-preview {
  grid-row: 2 / span 5;
  width: 150px;
  height: 186px;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--muted);
  background: var(--soft);
}

.image-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.image-preview b,
.image-preview small {
  grid-area: 1 / 1;
  align-self: center;
  justify-self: center;
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 400;
  letter-spacing: .05em;
}

.image-preview small {
  margin-top: 44px;
  font-size: 7px;
}

.file-button {
  width: max-content;
  display: inline-flex;
  padding: 9px 13px;
  align-items: center;
  border: 1px solid var(--ink);
  font-size: 10px;
  cursor: pointer;
}

.file-button:hover {
  color: var(--white);
  background: var(--ink);
}

.file-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.url-field {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 9px;
}

.url-field input {
  padding: 8px 0;
  font-size: 11px;
}

.text-danger {
  width: max-content;
  padding: 0;
  border: 0;
  color: var(--red);
  background: transparent;
  font-size: 9px;
}

.gallery-field {
  gap: 14px;
}

.gallery-edit-list {
  display: grid;
  border-top: 1px solid var(--ink);
}

.gallery-edit-item {
  min-width: 0;
  display: grid;
  grid-template-columns: 32px 86px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.gallery-edit-no {
  color: var(--red);
  font-family: var(--mono);
  font-size: 8px;
}

.gallery-edit-thumb {
  width: 86px;
  height: 66px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--soft);
}

.gallery-edit-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.gallery-edit-url {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.gallery-edit-url strong,
.gallery-edit-url small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gallery-edit-url strong {
  font-size: 11px;
  font-weight: 500;
}

.gallery-edit-url small {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
}

.gallery-edit-actions {
  display: flex;
  gap: 5px;
}

.gallery-edit-actions button {
  width: 32px;
  height: 32px;
  display: grid;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--paper);
  font-size: 13px;
}

.gallery-edit-actions button:hover {
  color: var(--white);
  background: var(--red);
  border-color: var(--red);
}

.gallery-edit-actions button:disabled {
  color: #aaa49b;
  background: transparent;
  cursor: default;
}

.gallery-edit-actions button:disabled:hover {
  color: #aaa49b;
  background: transparent;
  border-color: var(--line);
}

.gallery-edit-actions [data-gallery-remove] {
  color: var(--red);
}

.gallery-empty {
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
  line-height: 1.65;
}

.gallery-add-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
}

.form-footer {
  display: flex;
  min-height: 88px;
  padding: 20px 0;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--ink);
}

.form-footer > span {
  color: var(--muted);
  font-size: 10px;
}

.settings-sections {
  display: grid;
  gap: 34px;
  border-bottom: 1px solid var(--ink);
}

.settings-block {
  display: grid;
  gap: 22px;
  padding: 28px 0 34px;
  border-top: 1px solid var(--line);
}

.settings-block:first-child {
  padding-top: 22px;
}

.settings-block > header {
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) minmax(0, 1.3fr);
  gap: 24px;
  align-items: start;
}

.settings-block > header h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
}

.settings-block > header p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.75;
}

.settings-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px 34px;
}

.settings-field-grid .image-field {
  align-self: start;
}

.settings-field-grid .image-preview {
  min-height: 140px;
}

.narrow-panel {
  max-width: 640px;
}

.password-form {
  display: grid;
  gap: 20px;
}

.password-form label {
  display: grid;
  gap: 9px;
  color: var(--muted);
  font-size: 10px;
}

.password-form input {
  width: 100%;
  padding: 13px 0;
  border: 0;
  border-bottom: 1px solid var(--ink);
  outline: 0;
  background: transparent;
  font-size: 15px;
}

.password-form input:focus {
  border-color: var(--red);
}

.password-form button {
  width: max-content;
  margin-top: 10px;
}

.panel-note {
  margin: -10px 0 26px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.media-card {
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--paper);
}

.media-card > div {
  height: 190px;
  overflow: hidden;
  background: var(--soft);
}

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

.media-card p {
  padding: 13px;
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-card p small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 7px;
}

.media-card form {
  padding: 0 13px 13px;
}

.login-body {
  min-height: 100vh;
  background:
    linear-gradient(90deg, transparent calc(100% - 1px), rgba(17, 16, 15, .05) 1px) 0 0 / 72px 100%,
    var(--paper);
}

.login-grid {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(340px, .82fr) minmax(480px, 1.18fr);
}

.login-art {
  position: relative;
  display: flex;
  padding: clamp(34px, 5vw, 72px);
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  color: var(--white);
  background: var(--red);
}

.login-art::before {
  content: "";
  position: absolute;
  top: 12%;
  right: -35%;
  width: 82%;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, .45);
  border-radius: 50%;
}

.login-art::after {
  content: "";
  position: absolute;
  right: -22%;
  bottom: -38%;
  width: 78%;
  aspect-ratio: 1;
  background: var(--paper);
  border-radius: 50%;
}

.login-mark {
  position: relative;
  z-index: 1;
  width: min(210px, 72%);
  height: 68px;
  display: block;
}

.login-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left center;
}

.login-art p {
  position: relative;
  z-index: 1;
  font-family: var(--serif);
  font-size: clamp(70px, 9vw, 132px);
  font-weight: 500;
  line-height: .73;
  letter-spacing: -.075em;
}

.login-art small {
  position: relative;
  z-index: 1;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .12em;
}

.login-form {
  width: min(470px, calc(100% - 72px));
  margin: auto;
  padding: 70px 0;
}

.login-form h1 {
  margin: 15px 0 14px;
  font-family: var(--serif);
  font-size: clamp(52px, 6vw, 82px);
  font-weight: 500;
  line-height: .95;
  letter-spacing: -.065em;
}

.login-form > p {
  width: 90%;
  margin-bottom: 44px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}

.login-form label {
  display: grid;
  gap: 10px;
  margin-top: 22px;
  color: var(--muted);
  font-size: 10px;
}

.login-form input {
  width: 100%;
  padding: 13px 0;
  border: 0;
  border-bottom: 1px solid var(--ink);
  outline: 0;
  background: transparent;
  font-size: 16px;
}

.login-form input:focus {
  border-color: var(--red);
}

.login-form > button {
  width: 100%;
  min-height: 55px;
  display: flex;
  margin-top: 34px;
  padding: 0 20px;
  align-items: center;
  justify-content: space-between;
  border: 0;
  color: var(--white);
  background: var(--red);
  font-size: 13px;
}

.login-form > button:hover {
  background: var(--ink);
}

.back-site {
  display: inline-block;
  margin-top: 25px;
  color: var(--muted);
  font-size: 10px;
}

.back-site:hover {
  color: var(--red);
}

@media (max-width: 1120px) {
  :root {
    --sidebar: 224px;
  }

  .sidebar {
    padding-right: 16px;
    padding-left: 16px;
  }

  .admin-main {
    padding-right: 28px;
    padding-left: 28px;
  }

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

  .stats-grid a {
    min-height: 150px;
  }

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

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

@media (max-width: 780px) {
  .sidebar {
    width: min(84vw, 310px);
    transform: translateX(-105%);
    visibility: hidden;
    transition: transform .35s ease, visibility .35s;
  }

  .sidebar.is-open {
    transform: none;
    visibility: visible;
  }

  body.is-locked::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 25;
    background: rgba(17, 16, 15, .42);
  }

  .admin-main {
    margin-left: 0;
    padding: 0 16px 50px;
  }

  .admin-top {
    min-height: 92px;
    gap: 14px;
  }

  .admin-menu {
    display: block;
    flex: 0 0 auto;
  }

  .admin-top > div:nth-child(2) {
    min-width: 0;
    margin-right: auto;
  }

  .admin-top h1 {
    overflow: hidden;
    font-size: 29px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .admin-kicker {
    font-size: 7px;
  }

  .admin-user span {
    display: none;
  }

  .admin-user a {
    font-size: 9px;
  }

  .stats-grid {
    margin-top: 24px;
  }

  .stats-grid a {
    min-height: 128px;
    padding: 18px;
  }

  .stats-grid strong {
    font-size: 51px;
  }

  .dashboard-grid {
    gap: 18px;
    margin-top: 18px;
  }

  .admin-panel {
    margin-top: 22px;
    padding: 18px;
  }

  .panel-heading {
    align-items: flex-end;
    gap: 14px;
    margin-bottom: 20px;
  }

  .panel-heading h2 {
    font-size: 27px;
  }

  .notice-panel {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
    padding: 22px;
  }

  .admin-table td {
    padding-right: 8px;
    padding-left: 8px;
  }

  .admin-table th:first-child,
  .admin-table td:first-child,
  .admin-table th:nth-child(4),
  .admin-table td:nth-child(4),
  .admin-table th:nth-child(5),
  .admin-table td:nth-child(5) {
    display: none;
  }

  .entity-form {
    margin-top: 22px;
  }

  .editor-head {
    padding-bottom: 20px;
  }

  .editor-actions {
    flex-direction: column;
  }

  .form-grid,
  .settings-form .form-grid {
    grid-template-columns: 1fr;
  }

  .settings-block > header,
  .settings-field-grid {
    grid-template-columns: 1fr;
  }

  .field-full {
    grid-column: 1;
  }

  .admin-field {
    padding: 17px;
  }

  .image-field {
    grid-template-columns: 100px minmax(0, 1fr);
    gap: 10px 14px;
  }

  .image-preview {
    width: 100px;
    height: 130px;
  }

  .gallery-edit-item {
    grid-template-columns: 24px 70px minmax(0, 1fr) auto;
    gap: 10px;
  }

  .gallery-edit-thumb {
    width: 70px;
    height: 56px;
  }

  .rich-editor {
    min-height: 270px;
    padding: 19px;
    font-size: 16px;
  }

  .form-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .form-footer .admin-primary {
    width: 100%;
  }

  .media-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .media-card > div {
    height: 145px;
  }

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

  .login-art {
    min-height: 37vh;
    padding: 25px 22px 32px;
  }

  .login-art p {
    font-size: clamp(62px, 18vw, 105px);
  }

  .login-mark {
    width: 150px;
    height: 48px;
  }

  .login-form {
    width: calc(100% - 44px);
    padding: 54px 0 60px;
  }
}

@media (max-width: 460px) {
  .quick-actions {
    grid-template-columns: 1fr;
  }

  .quick-actions a {
    min-height: 96px;
  }

  .panel-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .panel-heading .admin-primary {
    width: 100%;
  }

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

  .media-card > div {
    height: 210px;
  }

  .editor-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .editor-actions {
    width: 100%;
    flex-direction: row;
  }

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

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

  .image-preview {
    grid-row: auto;
    width: 100%;
    height: 210px;
  }

  .gallery-edit-item {
    grid-template-columns: 24px 64px minmax(0, 1fr);
    align-items: start;
  }

  .gallery-edit-thumb {
    width: 64px;
    height: 54px;
  }

  .gallery-edit-actions {
    grid-column: 2 / -1;
    margin-top: -2px;
  }

  .gallery-add-row {
    grid-template-columns: 1fr;
  }

  .gallery-add-row .admin-secondary {
    width: 100%;
  }
}

