:root {
  color-scheme: light;
  font-family: Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #000;
  background: #fff;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
.page { max-width: 1200px; margin: 0 auto; padding: 28px 24px; }
header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
h1 { font-size: 20px; margin: 0; font-weight: 600; }
button, input, select, .button { font: inherit; color: #000; background: #fff; border: 1px solid #000; border-radius: 0; }
button, .button { padding: 6px 12px; cursor: pointer; text-decoration: none; white-space: nowrap; }
.button { display: inline-block; }
button:hover:not(:disabled), .button:hover { color: #fff; background: #000; }
button:disabled { cursor: default; border-color: transparent; }
button.dirty { color: #fff; background: #000; }
input, select { padding: 6px 8px; }
input[type="checkbox"] { accent-color: #000; width: 16px; height: 16px; margin: 0; cursor: pointer; vertical-align: middle; }
input:disabled { cursor: default; }
:focus-visible { outline: 2px solid #000; outline-offset: 3px; }
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.server-field { display: flex; align-items: center; gap: 10px; min-width: 0; }
#server { min-width: 200px; max-width: 100%; }
#search { width: 250px; max-width: 100%; margin-bottom: 20px; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { font-weight: 600; border-bottom: 1px solid #000; }
th, td { padding: 12px 8px; }
th:first-child, td:first-child { padding-left: 0; }
th:last-child, td:last-child { padding-right: 0; text-align: right; }
td { vertical-align: middle; }
.channel-name { width: 18%; overflow-wrap: anywhere; }
.language-cell { width: 18%; }
.destination-cell { width: 22%; }
.destination-cell select { width: 100%; min-width: 130px; }
.language-cell select { width: 100%; min-width: 120px; }
.checkbox-cell { text-align: center; }
th:nth-child(2), th:nth-child(6) { text-align: center; }
.channel-save { min-width: 64px; }
.row-status td { padding: 0 0 12px; text-align: left; }
.row-status p { margin: 0; }
.notice { border: 1px solid #000; padding: 12px; white-space: pre-line; }
.usage { margin-top: 28px; }
summary { cursor: pointer; width: fit-content; }
.usage p { margin: 8px 0 0; }
#login p { margin-top: 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 900px) {
  .page { padding: 20px 16px; }
  header { margin-bottom: 24px; }
  h1 { font-size: 18px; }
  .toolbar { align-items: end; }
  .server-field { flex: 1; display: flex; flex-direction: column; align-items: stretch; gap: 4px; }
  #server { min-width: 0; width: 100%; }
  #search { width: 100%; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  table, tbody { display: block; }
  .channel { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; padding: 20px 0; border-top: 1px solid #000; }
  .channel td { display: block; width: auto; padding: 0; text-align: left; }
  .channel .channel-name { grid-column: 1 / -1; font-weight: 600; }
  .channel td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 4px; }
  .channel .enabled-cell { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; }
  .channel .enabled-cell::before { margin: 0; }
  .channel td:last-child { align-self: end; text-align: right; }
  .language-cell select { min-width: 0; }
  .destination-cell { grid-column: 1 / -1; }
  .destination-cell select { min-width: 0; }
  .row-status { display: block; padding-bottom: 16px; }
  .row-status td { display: block; }
}
