:root {
  color-scheme: dark;
  --bg: #171816;
  --panel: #20221f;
  --line: #383b33;
  --gold: #d4b675;
  --text: #eee9db;
  --muted: #a6aa9d;
}
.cloud-panel { margin-bottom: 24px; }
.cloud-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; max-width: 900px; }
.cloud-badge { color: var(--muted); border: 1px solid var(--line); padding: 4px 10px; font-size: 12px; }
.cloud-badge.ready { color: var(--gold); border-color: #79683f; }
.cloud-actions { display: flex; gap: 10px; margin-top: 20px; }
.cloud-status { line-height: 1.8; color: var(--gold); overflow-wrap: anywhere; }
.upload-progress { color: var(--gold); border-left: 2px solid #79683f; padding: 10px 14px; background: #292b23; line-height: 1.8; overflow-wrap: anywhere; }
input[readonly] { color: var(--muted); background: #20221d; }
@media (max-width: 800px) { .cloud-fields { grid-template-columns: 1fr; } }
select { display: block; width: 100%; margin-top: 8px; padding: 11px 12px; color: var(--text); background: #171916; border: 1px solid #46493f; border-radius: 2px; font: inherit; }
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Microsoft YaHei", sans-serif;
  font-size: 14px;
}
aside {
  position: fixed;
  inset: 0 auto 0 0;
  width: 224px;
  border-right: 1px solid var(--line);
  padding: 38px 24px;
  background: #1b1d19;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--gold);
  font-family: Georgia, serif;
  font-size: 25px;
  letter-spacing: 4px;
}
.brand svg {
  width: 40px;
  height: 40px;
}
.brand span {
  display: block;
  font: 9px sans-serif;
  letter-spacing: 1.5px;
  margin-top: 6px;
  color: var(--muted);
}
nav {
  display: grid;
  gap: 8px;
  margin-top: 70px;
}
nav button {
  border: 0;
  text-align: left;
  padding: 15px 16px;
  background: transparent;
  color: var(--muted);
}
nav button.active {
  background: #2b2d24;
  color: var(--gold);
  border-left: 2px solid var(--gold);
}
.aside-foot {
  position: absolute;
  bottom: 28px;
  left: 28px;
  font-size: 11px;
  line-height: 2;
  color: var(--muted);
}
.aside-foot button {
  display: block;
  margin-top: 18px;
}
main {
  margin-left: 224px;
  padding: 40px 48px;
  max-width: 1600px;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 26px;
  margin-bottom: 24px;
}
h1 {
  font-weight: 400;
  font-size: 30px;
  letter-spacing: 2px;
  margin: 8px 0;
}
.eyebrow {
  font:
    10px Georgia,
    serif;
  letter-spacing: 3px;
  color: var(--gold);
}
h2 {
  font-size: 18px;
  font-weight: 400;
  margin: 0 0 20px;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 28px;
  min-width: 0;
}
.split {
  display: grid;
  grid-template-columns: 320px minmax(400px, 1fr);
  gap: 24px;
}
label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 18px;
}
input,
textarea {
  display: block;
  width: 100%;
  margin-top: 8px;
  border: 1px solid #46493f;
  background: #171916;
  color: var(--text);
  padding: 11px 12px;
  font:
    14px "Microsoft YaHei",
    sans-serif;
  border-radius: 2px;
  outline: none;
}
input:focus,
textarea:focus {
  border-color: var(--gold);
}
input:disabled {
  opacity: 0.55;
}
.check {
  display: flex;
  align-items: center;
  gap: 10px;
}
.check input {
  width: 16px;
  margin: 0;
}
button {
  cursor: pointer;
  background: transparent;
  color: var(--text);
  border: 1px solid #555747;
  padding: 10px 15px;
  border-radius: 2px;
  font:
    13px "Microsoft YaHei",
    sans-serif;
}
button:hover {
  border-color: var(--gold);
  color: var(--gold);
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
.primary {
  background: var(--gold);
  color: #171916;
  border-color: var(--gold);
}
.primary:hover {
  color: #171916;
  background: #e5c987;
}
.actions {
  display: flex;
  gap: 10px;
}
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.panel-heading h2 {
  margin: 0;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
}
th {
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
}
th,
td {
  padding: 15px 10px;
  border-bottom: 1px solid var(--line);
}
td button {
  padding: 5px 9px;
  margin: 0 6px 4px 0;
  font-size: 12px;
}
.table-wrap {
  overflow: auto;
}
p {
  color: var(--muted);
  line-height: 1.8;
}
#status {
  min-height: 24px;
  margin-bottom: 18px;
  color: var(--gold);
  white-space: pre-wrap;
}
#authPanel {
  max-width: 450px;
}
#identity {
  font-size: 12px;
  color: var(--muted);
}
#newsList article {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
#newsList article h3 {
  font-weight: 400;
  margin: 0 0 8px;
}
#newsList article p {
  white-space: pre-wrap;
}
.divider {
  border-top: 1px solid var(--line);
  margin: 30px 0;
}
[hidden] {
  display: none !important;
}
@media (max-width: 1100px) {
  .split {
    grid-template-columns: 1fr;
  }
  main {
    padding: 28px;
  }
  aside {
    width: 190px;
  }
  main {
    margin-left: 190px;
  }
}
@media (max-width: 650px) {
  aside {
    position: static;
    width: auto;
    padding: 20px;
  }
  .aside-foot {
    position: static;
    display: none;
  }
  nav {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
  }
  nav button {
    padding: 10px;
  }
  main {
    margin: 0;
    padding: 20px;
  }
  .panel {
    padding: 20px;
  }
}

select { background: #171916; color: var(--text); border: 1px solid #46493f; padding: 10px 12px; font: inherit; }
.user-toolbar { display: flex; align-items: end; gap: 12px; margin-bottom: 16px; }
.user-toolbar input { flex: 1; margin: 0; min-width: 100px; }
.user-toolbar label { margin: 0; flex: 0 0 auto; }
.user-toolbar select { display: block; margin-top: 6px; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; color: var(--muted); font-size: 12px; }
.pagination button { margin-left: 8px; }
.image-preview { display: block; width: 100%; max-height: 260px; object-fit: contain; background: #171916; border: 1px solid var(--line); margin: 0 0 18px; }
.news-thumbnail { max-width: 100%; max-height: 180px; object-fit: contain; display: block; margin-bottom: 12px; }
.news-link { display: block; color: var(--gold); overflow-wrap: anywhere; margin-bottom: 12px; }
.release-history { margin-top: 24px; }
.release-help, .release-empty { color: var(--muted); font-size: 12px; line-height: 1.8; }
.release-help { max-width: 780px; margin-bottom: 22px; }
.release-current { display: inline-block; padding: 4px 8px; color: var(--gold); border: 1px solid #756744; background: #302e23; white-space: nowrap; }
.release-archived { color: var(--muted); white-space: nowrap; }
.release-delete { color: #d6a69a; border-color: #6b4d43; padding: 5px 12px; }
.release-description { min-width: 76px; max-width: 300px; }
.release-description summary { cursor: pointer; color: var(--gold); }
.release-description p { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.7; color: var(--muted); margin: 10px 0 0; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.console-hint { color: var(--muted); font-size: 12px; line-height: 1.7; }
.console-plugin-panel { padding: 0; }
.console-overview { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 26px 28px; }
.console-overview h2 { margin: 0 0 9px; font-size: 20px; letter-spacing: 1px; }
.console-connection { margin: 0; color: var(--muted); font-size: 12px; }
.console-connection.connected { color: #b6d89a; }
.console-overview button, .extension-close { display: inline-flex; align-items: center; justify-content: center; gap: 7px; white-space: nowrap; }
.console-overview svg, .console-config svg, .extension-close svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.console-plugin-list table { margin: 0; }
.console-plugin-list th { background: #1b1d19; }
.console-plugin-list th, .console-plugin-list td { padding: 18px 28px; }
.console-plugin-list td:first-child { color: var(--text); font-size: 15px; }
.console-plugin-list th:last-child, .console-plugin-list td:last-child { text-align: right; }
.console-plugin-list th:nth-child(2) { width: 110px; }
.console-plugin-list th:last-child { width: 150px; }
.console-empty { margin: 0; padding: 40px 16px; text-align: center; color: var(--muted); font-size: 13px; }
.console-badge { display: inline-flex; align-items: center; gap: 7px; color: #c5a394; white-space: nowrap; font-size: 12px; }
.console-badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.console-badge.online { color: #b6d89a; }
.console-config { border-top: 1px solid var(--line); background: #1c1e1a; }
.console-config summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 28px; color: var(--muted); cursor: pointer; list-style: none; font-size: 12px; }
.console-config summary::-webkit-details-marker { display: none; }
.console-config summary > span { display: inline-flex; gap: 9px; align-items: center; }
.console-config summary > span:first-child { color: var(--text); font-size: 13px; }
.console-config .config-chevron { transition: transform 150ms ease; }
.console-config[open] .config-chevron { transform: rotate(180deg); }
.console-config-body { padding: 0 28px 22px; }
#bridgeConfiguration { margin: 0; padding: 16px; font: 12px/1.9 Consolas, monospace; color: #d8c9a5; resize: none; overflow-x: auto; }
#bridgeConfigStatus { margin: 10px 0 0; }
#bridgeConfigStatus:empty { display: none; }

.has-extension-dialog { overflow: hidden; }
.extension-dialog { display: none; width: min(1120px, calc(100vw - 64px)); max-width: none; max-height: calc(100dvh - 64px); padding: 0; color: var(--text); background: var(--panel); border: 1px solid #575747; border-top: 2px solid var(--gold); border-radius: 2px; box-shadow: 0 28px 90px #0009; }
.extension-dialog[open] { display: flex; animation: extension-dialog-in 140ms ease-out; }
.extension-dialog::backdrop { background: #080a09cf; backdrop-filter: blur(4px); }
.extension-surface { display: flex; flex-direction: column; width: 100%; min-height: 0; max-height: calc(100dvh - 68px); }
.extension-header { padding: 22px 28px; margin: 0; gap: 20px; }
.extension-heading { display: flex; align-items: center; gap: 14px; }
.extension-header h2 { margin: 0 0 5px; font-size: 20px; letter-spacing: 1px; }
.extension-header p { margin: 0; }
.extension-icon { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid #645b40; color: var(--gold); }
.extension-icon svg { width: 23px; height: 23px; stroke: currentColor; stroke-width: 1.3; fill: none; }
.extension-close { color: var(--muted); background: transparent; padding: 8px 12px; }
.extension-tabs { display: flex; gap: 8px; padding: 0 28px; border-bottom: 1px solid var(--line); }
.extension-tabs button { padding: 14px 20px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; color: var(--muted); }
.extension-tabs button[aria-selected="true"] { border-bottom-color: var(--gold); color: var(--gold); }
.extension-body { padding: 26px 28px; overflow: auto; min-height: 0; }
.extension-footer { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px 28px; border-top: 1px solid var(--line); background: #1c1e1a; }
.extension-footer > button { min-width: 130px; flex: none; }
.console-config summary:focus-visible, .extension-dialog button:focus-visible { outline: 1px solid var(--gold); outline-offset: 3px; }
@keyframes extension-dialog-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 650px) {
.console-config summary { padding: 18px; }
.console-config-body { padding: 0 18px 18px; }
.extension-dialog { width: calc(100vw - 24px); max-height: calc(100dvh - 24px); }
.extension-surface { max-height: calc(100dvh - 28px); }
.extension-header, .extension-footer { padding: 18px; }
.extension-tabs { padding: 0 18px; }
.extension-body { padding: 20px 18px; }
.extension-header h2 { font-size: 17px; }
.extension-icon { display: none; }
.extension-footer { align-items: flex-start; gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
.extension-dialog[open] { animation: none; }
}
.extension-content {display:flex; width:100%; min-height:0;}
