:root {
  --pine: #1f4e4a;
  --ink: #1c2326;
  --paper: #f7f5f0;
  --celadon: #e4edea;
  --terra: #b5523b;
  --stone: #5f6765;
  --line: #d5deda;
  --input: #74867f;
  --media-surface: #fff;
  --media-padding: 18px;
  --media-radius: 10px;
  --media-control-gap: 14px;
  --media-compact-gap: 10px;
  --media-playback-gap: 8px;
  --media-control-height: 44px;
  --media-playback-min-width: 68px;
  --media-compact-text-size: 12px;
  --media-heading-gap: 12px;
  --media-list-gap: 20px;
  --media-title-size: 17px;
  --media-action-size: 14px;
  --media-button-x: 16px;
  --media-button-y: 10px;
  --media-button-radius: 4px;
  --media-badge-x: 10px;
  --media-badge-y: 5px;
  --media-badge-size: 12px;
  --media-error-padding: 16px;
  --error-bg: #fff1eb;
  --error-ink: #8f2c1b;
  --error-line: #c78878;
  font-family:
    Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-size: 16px;
  line-height: 1.65;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea,
summary {
  touch-action: manipulation;
}
a {
  color: var(--pine);
  text-underline-offset: 4px;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 51px;
  padding: 10px 16px;
  border: 1px solid var(--input);
  border-radius: 4px;
  background: white;
  color: var(--pine);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.65;
  text-decoration: none;
  gap: 8px;
  white-space: normal;
  text-align: center;
}
button:hover,
.button:hover {
  background: var(--celadon);
}
.primary {
  background: var(--pine);
  color: white;
  border-color: var(--pine);
}
.primary:hover {
  background: #173c39;
}
.accent {
  background: var(--terra);
  color: white;
  border-color: var(--terra);
}
.accent:hover {
  background: #943e2d;
}
.danger {
  color: #9d3524;
}
.quiet {
  border: 0;
  background: transparent;
  padding: 4px;
  min-height: 40px;
  font-weight: 500;
}
.block {
  width: 100%;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2 {
  font-family: "Noto Serif KR", "AppleMyungjo", Georgia, serif;
}
h1 {
  font-size: 28px;
}
h2 {
  font-size: 24px;
  margin: 8px 0;
}
h3 {
  font-size: 18px;
  line-height: 1.65;
}
p {
  white-space: pre-line;
}
img {
  max-width: 100%;
  display: block;
}
input,
textarea {
  width: 100%;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--input);
  border-radius: 4px;
  background: white;
  color: var(--ink);
  min-height: 51px;
  font-size: 14px;
}
input[type="checkbox"],
input[type="radio"] {
  width: 20px;
  min-height: 20px;
  height: 20px;
  accent-color: var(--pine);
  flex-shrink: 0;
}
textarea {
  min-height: 150px;
  resize: vertical;
}
label,
.field-label {
  display: block;
  font-size: 14px;
  font-weight: 700;
}
label > input,
label > textarea {
  display: block;
  margin-top: 8px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.field small {
  color: var(--stone);
  font-weight: 400;
}
fieldset {
  min-width: 0;
  border: 0;
  padding: 0;
  margin: 0;
}
legend {
  padding: 0;
  margin-bottom: 16px;
  font-weight: 700;
  font-size: 18px;
}
:focus-visible,
input[type="date"]:focus-within {
  outline: 3px solid #386fdb;
  outline-offset: 3px;
}
.skip {
  position: fixed;
  left: 16px;
  top: -80px;
  background: white;
  padding: 12px;
  z-index: 100;
}
.skip:focus {
  top: 12px;
}
.shell {
  max-width: 960px;
  margin: auto;
  min-height: 100vh;
}
.site-header {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  background: white;
  padding: 24px;
  min-height: 99px;
  border-bottom: 1px solid var(--line);
}
.brand {
  flex: none;
  display: block;
  width: 150px;
  height: 40.364px;
}
.brand img {
  width: auto;
  max-width: none;
  height: auto;
}
.site-header nav {
  display: flex;
  gap: 8px;
  flex: 1;
  align-items: flex-start;
}
.site-header nav a {
  font-size: 14px;
  text-decoration: none;
  flex: 1;
  padding: 0 8px;
  line-height: 27px;
  min-height: 40px;
}
.site-header nav a[aria-current="page"] {
  text-decoration: underline;
  font-weight: 700;
}
.lang-control {
  width: 106px;
  flex: none;
}
.mobile-menu {
  display: none;
}
.local-notice {
  font-size: 12px;
  color: var(--stone);
  padding: 4px 24px;
  background: #f0f3f1;
  border-bottom: 1px solid var(--line);
}
main {
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-height: 65vh;
}
.breadcrumb {
  font-size: 12px;
  color: var(--stone);
}
.footer {
  padding: 32px;
  background: var(--celadon);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13px;
}
.footer nav a {
  flex: 0 1 200px;
  min-height: 25px;
  overflow-wrap: anywhere;
}
.footer p {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 12px;
  color: var(--stone);
  line-height: 1.7;
}
.footer .admin-link {
  align-self: flex-end;
  font-size: 12px;
}

.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.panel.tint,
.alert {
  background: var(--celadon);
}
.panel.paper {
  background: var(--paper);
}
.alert {
  padding: 16px;
  color: var(--pine);
  font-size: 14px;
  white-space: pre-line;
}
.alert.error {
  background: var(--error-bg);
  color: var(--error-ink);
  border: 1px solid var(--error-line);
}
.alert.success {
  border: 1px solid var(--input);
}
.muted {
  color: var(--stone);
  font-size: 14px;
}
.row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
}
.row > * {
  flex: 1;
  min-width: 0;
}
.row > .fixed {
  flex: 0 0 120px;
}
.grid2,
.grid3 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.grid3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.actions > * {
  min-width: 140px;
}
.actions.spread > * {
  flex: 1;
}
.search-button {
  align-self: flex-start;
}
.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 40px;
}
.chip {
  background: var(--celadon);
  border: 0;
  border-radius: 0;
  font-size: 12px;
  font-weight: 500;
  min-height: 40px;
  padding: 8px 12px;
}
.result-sort {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}
.result-sort > .field {
  width: 200px;
}
.books {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.book-card {
  background: white;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.book-card h3 {
  min-height: 62px;
  text-wrap: balance;
  word-break: normal;
  overflow-wrap: anywhere;
}
.book-card h3:lang(ko) {
  word-break: keep-all;
  overflow-wrap: normal;
}
.book-card > .button {
  margin-top: auto;
  width: 100%;
}
.book-card .meta {
  font-size: 13px;
  color: var(--stone);
}
.book-card .audio {
  font-size: 12px;
  color: var(--pine);
}
.book-art {
  position: relative;
  overflow: hidden;
  aspect-ratio: 253.333/360;
  width: 100%;
}
.book-art img {
  position: absolute;
  max-width: none;
  width: 280.432%;
  height: auto;
  left: -87.438%;
  top: -15.044%;
}
.book-art.no-cover {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--celadon);
  padding: 20px;
}
.book-art.no-cover img {
  display: none;
}
.book-art[data-custom="true"] img {
  position: static;
  max-width: 100%;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.book-detail {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 24px;
}
.book-detail > .book-art {
  align-self: start;
}
.book-detail .meta-list {
  width: 100%;
}
.meta-list {
  margin: 0;
  display: flex;
  flex-direction: column;
}
.meta-list > div {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(0, 2fr);
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
dt {
  font-size: 14px;
  color: var(--stone);
}
dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
  background: white;
  text-align: left;
}
th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px;
  vertical-align: top;
  overflow-wrap: anywhere;
}
th {
  background: var(--celadon);
  font-weight: 700;
  font-size: 13px;
}
table button {
  min-height: 40px;
  padding: 6px 10px;
}
.pagination {
  display: flex;
  gap: 8px;
}
.pagination > * {
  flex: 1;
  min-width: 0;
}
.empty {
  padding: 40px 20px;
  border: 1px solid var(--line);
  background: white;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}
.dropdown {
  position: relative;
  min-width: 0;
}
.select-trigger {
  font-weight: 500;
  width: 100%;
  justify-content: space-between;
  text-align: left;
}
.options {
  position: absolute;
  z-index: 30;
  top: 100%;
  left: 0;
  right: 0;
  min-width: 150px;
  max-height: 300px;
  overflow: auto;
  border: 1px solid var(--input);
  background: white;
  box-shadow: 0 5px 18px #18332c18;
}
.options[hidden] {
  display: none;
}
.option {
  display: flex;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  justify-content: flex-start;
  font-weight: 500;
}
.option[aria-selected="true"] {
  background: var(--celadon);
  font-weight: 700;
}
.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 400;
}
.check input {
  margin: 4px 0 0;
}
.file-card {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  background: white;
  border: 1px solid var(--line);
  padding: 12px;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.file-card > div {
  min-width: 0;
}
.file-state {
  font-size: 12px;
  color: var(--stone);
}
.file-input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  min-height: 1px;
  overflow: hidden;
}
.upload-zone.dragging {
  outline: 3px dashed var(--pine);
  background: var(--celadon);
}
.faq {
  background: white;
  border: 1px solid var(--line);
  padding: 20px;
}
.faq summary {
  font-weight: 700;
  cursor: pointer;
}
.faq p {
  margin-top: 16px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
.stat {
  font-size: 28px;
  color: var(--pine);
  font-weight: 700;
}
.step {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: white;
}
.step > strong {
  color: var(--pine);
  width: 40px;
}
.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.auth-card {
  width: 400px;
  max-width: 100%;
  min-height: 0;
  border: 1px solid var(--celadon);
  border-radius: 12px;
  padding: 32px;
  background: white;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.auth-card h1 {
  font-family: inherit;
  font-size: 24px;
  font-weight: 700;
}
.auth-card .brand {
  width: 180px;
  height: 48.44px;
  transform-origin: top left;
  transform: scale(1.2);
  margin-bottom: 8px;
}
.admin-header {
  display: flex;
  gap: 24px;
  align-items: center;
  padding: 20px;
  background: white;
  border-bottom: 1px solid var(--line);
}
.admin-header .logout {
  margin-left: auto;
}
.admin-layout {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  align-items: start;
}
.admin-nav {
  background: var(--pine);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 760px;
  position: sticky;
  top: 0;
}
.admin-nav a {
  color: white;
  text-decoration: none;
  padding: 10px 12px;
  font-size: 14px;
}
.admin-nav a[aria-current="page"] {
  background: var(--celadon);
  color: var(--pine);
}
.admin-layout main {
  padding: 24px;
  min-width: 0;
  max-width: 100%;
}
.admin-layout h1 {
  font-family: inherit;
  font-size: 26px;
  font-weight: 700;
}
.admin-layout .grid2 {
  gap: 16px;
}
.admin-layout .table-wrap {
  font-size: 13px;
}
.editor {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.editor-toolbar {
  display: flex;
  gap: 4px;
  background: white;
  border: 1px solid var(--input);
  border-bottom: 0;
  padding: 4px;
  flex-wrap: wrap;
}
.editor-toolbar button {
  min-height: 34px;
  border: 0;
  padding: 4px 10px;
  font-size: 12px;
}
.rich textarea {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  min-height: 180px;
}
.rich-output {
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.rich-output a {
  overflow-wrap: anywhere;
}
.related {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.related-item {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: var(--paper);
  flex-wrap: wrap;
}
.related-item > span {
  flex: 1;
  min-width: 140px;
}
.related-item input {
  max-width: 230px;
}
.nested-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.nested-row {
  border: 1px solid var(--line);
  padding: 12px;
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.nested-row > span {
  flex: 1;
  min-width: 120px;
  overflow-wrap: anywhere;
}
.nested-row button {
  min-height: 38px;
}
.badge {
  display: inline-flex;
  padding: 5px 10px;
  background: var(--celadon);
  font-size: 12px;
  color: var(--pine);
}
.thumb {
  width: 48px;
  height: 64px;
  object-fit: contain;
}
dialog {
  border: 0;
  border-radius: 8px;
  background: white;
  color: var(--ink);
  padding: 24px;
  max-width: min(680px, calc(100vw - 32px));
  width: 620px;
  max-height: calc(100dvh - 48px);
  overflow: auto;
  box-shadow: 0 20px 70px #0003;
}
dialog::backdrop {
  background: #1c232666;
}
.dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}
.dialog-header h2 {
  font-family: inherit;
  font-size: 22px;
  margin: 0;
}
.dialog-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}
.picker-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.picker-row span {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.preview-document {
  background: white;
  border: 1px solid var(--line);
  padding: 32px;
  min-height: 480px;
  transform-origin: top left;
  white-space: pre-line;
}
.preview-frame {
  width: 100%;
  height: 70vh;
  border: 1px solid var(--line);
}
.sr-only,
#live:empty {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
#live:not(:empty) {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--pine);
  color: white;
  padding: 12px 24px;
  z-index: 100;
  border-radius: 4px;
  max-width: calc(100vw - 32px);
}
[hidden] {
  display: none !important;
}
:lang(ne) {
  font-family:
    "Noto Sans Devanagari", "Devanagari Sangam MN", "Apple SD Gothic Neo",
    sans-serif;
}
:lang(th) {
  font-family: "Noto Sans Thai", Thonburi, "Apple SD Gothic Neo", sans-serif;
}
@media (min-width: 701px) {
  .public-title {
    margin-bottom: 0;
  }
  .nav-backdrop {
    display: none !important;
  }
}
@media (max-width: 700px) {
  .site-header {
    padding: 16px;
    gap: 12px;
    align-items: center;
    min-height: 83px;
  }
  .brand {
    width: 140px;
    height: 37.67px;
    overflow: hidden;
  }
  .brand img {
    transform: scale(0.933333);
    transform-origin: top left;
  }
  .auth-card .brand {
    overflow: visible;
  }
  .auth-card .brand img {
    transform: none;
  }
  .site-header nav {
    display: none;
  }
  .site-header.menu-open nav {
    display: flex;
    position: fixed;
    z-index: 50;
    inset: 83px 0 0;
    background: white;
    padding: 24px;
    flex-direction: column;
    gap: 0;
    overflow: auto;
  }
  .site-header nav a {
    flex: none;
    padding: 16px 0;
    min-height: 56px;
    width: 100%;
    border-bottom: 1px solid var(--line);
  }
  .lang-control {
    width: auto;
    flex: 1;
    margin-left: auto;
    max-width: 110px;
  }
  .mobile-menu {
    display: inline-flex;
    flex: none;
    width: 44px;
    padding: 8px;
  }
  .local-notice {
    padding: 4px 20px;
  }
  .shell main {
    padding: 20px;
    gap: 24px;
  }

  .hero h1 {
    font-size: 28px;
  }

  .hero-photo {
    height: 100%;
    object-position: 50% 55%;
  }
  .grid2,
  .grid3,
  .books {
    grid-template-columns: 1fr;
  }
  .row {
    flex-direction: column;
    align-items: stretch;
  }
  .row > .fixed {
    flex: auto;
  }
  .search-button {
    align-self: stretch;
  }
  .result-sort {
    flex-direction: column;
  }
  .result-sort > .field {
    width: 100%;
  }
  .book-card {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr);
    gap: 12px 16px;
  }
  .book-card .book-art {
    grid-row: 1/5;
    align-self: center;
  }
  .book-card h3 {
    font-size: 18px;
    min-height: 58px;
  }
  .book-card > .button {
    grid-column: 2;
    min-width: 0;
  }
  .book-detail {
    grid-template-columns: 1fr;
  }
  .book-detail > .book-art {
    width: 160px;
  }
  .meta-list > div {
    grid-template-columns: minmax(96px, 1fr) minmax(0, 2fr);
  }
  .footer {
    padding: 20px;
  }
  .footer nav {
    gap: 16px;
  }
  .pagination > * {
    padding: 10px 4px;
    min-height: 51px;
  }
  .pagination button {
    font-size: 13px;
  }
  .actions > * {
    min-width: 0;
    flex: 1;
  }
  .admin-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .admin-nav {
    position: static;
    min-height: 0;
    flex-direction: row;
    overflow: auto;
    padding: 8px;
    gap: 8px;
  }
  .admin-nav a {
    white-space: nowrap;
  }
  .admin-header {
    padding: 16px;
    gap: 12px;
  }
  .admin-layout .table-wrap table {
    min-width: 640px;
  }
  .admin-layout .table-wrap {
    max-width: 100%;
  }
  .auth-shell {
    padding: 16px;
  }
  .auth-card {
    padding: 24px;
  }
  .file-card {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .nested-row > span {
    width: 100%;
  }
  .related-item input {
    max-width: 100%;
  }
  .preview-document {
    padding: 20px;
  }
  .panel {
    padding: 20px;
  }
  .public-title {
    font-size: 28px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  button,
  .button {
    transition: background 0.15s ease;
  }
}
@media print {
  .site-header,
  .admin-nav,
  .actions,
  .local-notice {
    display: none;
  }
  main {
    padding: 0;
  }
  .shell {
    max-width: 100%;
  }
}

.brand picture {
  display: block;
}
.brand img {
  max-width: none;
}
.auth-card .brand {
  width: 180px;
  height: auto;
  overflow: visible;
}
.auth-card .brand img {
  transform: none;
}

.picker-item {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 16px;
  cursor: pointer;
}
.picker-item span {
  display: flex;
  flex-direction: column;
}
.picker-item small {
  color: var(--stone);
}
.picker-item input {
  width: 20px;
  height: 20px;
}
.boot-error {
  max-width: 600px;
  margin: 10vh auto;
  padding: 24px;
}
.form-error:focus {
  outline: 2px solid var(--terra);
}
.row > .field {
  min-width: 0;
  flex: 1;
}
.chip-list:empty {
  display: none;
}
.rich-output {
  overflow-wrap: anywhere;
}
.admin-header {
  flex-wrap: wrap;
}
.admin-header .brand {
  flex: none;
}
.book-art[data-custom="true"] img {
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  object-fit: contain;
}

.auth-card h1 {
  font-family: inherit;
  font-size: 24px;
}
.auth-card .brand {
  transform: none;
}
.auth-card form {
  width: 100%;
}
.lang-control .field-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

html[data-text-size="large"] {
  font-size: 18px;
}
html[data-text-size="larger"] {
  font-size: 20px;
}
html[data-text-size="large"] p,
html[data-text-size="large"] label,
html[data-text-size="large"] td {
  font-size: 1.05rem;
}
html[data-text-size="larger"] p,
html[data-text-size="larger"] label,
html[data-text-size="larger"] td {
  font-size: 1.1rem;
}
@media (max-width: 700px) {
  .brand img {
    transform: none;
  }

  .lang-control {
    max-width: 100px;
  }
  .site-header {
    gap: 8px;
  }
  .site-header .brand {
    width: 120px;
  }
  .site-header .brand img {
    width: 120px;
    height: auto;
  }
  .site-header .brand {
    height: auto;
  }
  .site-header .select-trigger {
    padding: 8px;
    min-height: 44px;
  }
  .site-header .brand picture {
    height: auto;
  }
  .admin-header .brand {
    width: 140px;
  }
  .admin-header .brand img {
    width: 140px;
    height: auto;
  }
  .row > .field {
    width: 100%;
  }
  .nested-row {
    flex-wrap: wrap;
  }
  .nested-row > .actions {
    flex-wrap: wrap;
  }
}

.copy-spec {
  padding: 32px;
  background: white;
}
.copy-spec header {
  max-width: 1000px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}
.copy-spec table {
  min-width: 2600px;
}
.copy-spec th {
  position: sticky;
  top: 0;
  z-index: 1;
  vertical-align: top;
}
.copy-spec tbody th {
  position: static;
  min-width: 220px;
}
.copy-spec td {
  min-width: 260px;
  max-width: 340px;
  white-space: pre-line;
  vertical-align: top;
}
.copy-spec small {
  display: block;
  font-weight: 400;
  margin-top: 8px;
}
.lang-control .options {
  left: auto;
  right: 0;
  min-width: 180px;
}
.lang-control .option {
  white-space: nowrap;
}
.site-header .select-trigger > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (min-width: 361px) and (max-width: 700px) {
  .site-header .brand,
  .site-header .brand img {
    width: 140px;
  }
}

@media (max-width: 700px) {
  .hero h1 {
    white-space: normal;
    word-break: keep-all;
    text-wrap: balance;
  }
}
/* Direct publisher media. Only the selected unit is rendered; no preloading. */
.media-list {
  display: grid;
  gap: var(--media-list-gap);
  margin-top: var(--media-list-gap);
  min-width: 0;
}
.media-card {
  padding: var(--media-padding);
  background: var(--media-surface);
  border: 1px solid var(--line, #ced9d6);
  border-radius: var(--media-radius);
  min-width: 0;
  overflow-wrap: anywhere;
}
.media-card h4 {
  margin: 0;
  font-size: var(--media-title-size);
}
.media-card > .row {
  gap: var(--media-heading-gap);
}
.media-card audio,
.media-card video {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: var(--media-control-gap) 0;
}
.media-card video {
  max-height: 420px;
  background: #1c2326;
}
.media-error[hidden] {
  display: none;
}
.media-card > .button {
  font-size: var(--media-action-size);
  padding: var(--media-button-y) var(--media-button-x);
  border-radius: var(--media-button-radius);
}
.media-card .badge {
  padding: var(--media-badge-y) var(--media-badge-x);
  font-size: var(--media-badge-size);
}
.media-error.alert {
  padding: var(--media-error-padding);
}
.compact-media-controls {
  display: none;
}
@media (max-width: 700px) {
  .media-card audio {
    display: none;
  }
  .compact-media-controls {
    display: grid;
    gap: var(--media-compact-gap);
    margin: var(--media-control-gap) 0;
  }
  .media-playback {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--media-playback-gap);
  }
  .media-playback button {
    min-width: var(--media-playback-min-width);
    min-height: var(--media-control-height);
  }
  .media-clock {
    font-size: var(--media-compact-text-size);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }
  .media-seek-label {
    display: flex;
    flex-direction: column;
    min-width: 0;
    font-size: var(--media-compact-text-size);
    gap: 0;
  }
  .media-seek-label input {
    width: 100%;
    min-height: var(--media-control-height);
    padding: 0;
    margin: 0;
    accent-color: var(--pine);
  }
}
.nested-row p {
  overflow-wrap: anywhere;
}
.translation-source {
  white-space: pre-wrap;
}
.options {
  overscroll-behavior: contain;
}

.view-settings-dialog {
  width: 600px;
  padding: 28px;
  border-radius: 10px;
}
.view-group {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.view-group legend {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 20px;
  padding: 0;
}
.view-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.view-option {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px;
  border: 1px solid var(--input);
  border-radius: 4px;
  font-size: 14px;
  color: var(--pine);
  cursor: pointer;
  overflow-wrap: anywhere;
  text-align: center;
}
.view-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.view-option:has(input:checked) {
  background: var(--pine);
  color: white;
  border-color: var(--pine);
}
.view-option:has(input:focus-visible) {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}
.view-text-group {
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.view-text-group legend {
  float: left;
  width: 100%;
}
.view-text-options {
  clear: both;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
html[data-text-size="small"] {
  font-size: 14px;
}
html[data-text-size="small"] p,
html[data-text-size="small"] label,
html[data-text-size="small"] td {
  font-size: 0.85rem;
}
@media (max-width: 700px) {
  .footer nav {
    gap: 8px;
  }
  .footer nav a {
    flex-basis: 150px;
  }
  .view-settings-dialog {
    padding: 20px;
  }
}

.view-group:not(.view-text-group) .view-option:has(input:checked) {
  background: white;
  color: var(--pine);
}
.view-group:not(.view-text-group) .view-option:has(input:checked) span::after {
  content: " ✓";
}

html[data-text-size] .view-option {
  font-size: max(14px, 0.8rem);
}
.view-settings-dialog .dialog-header {
  position: sticky;
  top: -28px;
  z-index: 1;
  background: white;
  padding: 12px 0;
}
@media (max-width: 700px) {
  .view-settings-dialog .dialog-header {
    top: -20px;
  }
}
