.admin-body {
  --paper: #f8f3ec;
  --ink: #5d2036;
  --muted: #7b626b;
  --gold: #ef795e;
  --line: #e1ced4;
  padding: 0;
  background: #f8f3ec;
  font-size: 13px;
}
.admin-body .button {
  background: var(--ink);
  border-color: var(--ink);
  color: #fffaf7;
  min-height: 44px;
}
.admin-body .button:hover { background: #76344b; border-color: #76344b; }
.admin-sidebar nav { min-height: 0; overflow-y: auto; }
.admin-sidebar nav button { padding-block: 15px; }
.admin-sidebar .sidebar-label { margin-top: 38px; }
.admin-sidebar .sidebar-bottom { margin-top: 24px; gap: 18px; }
.admin-sidebar {
  width: 232px;
  position: fixed;
  inset: 0 auto 0 0;
  border-right: 1px solid #e1ced4;
  padding: 39px 27px;
  display: flex;
  flex-direction: column;
  background: #f2e7e5;
}
.admin-brand {
  font-family: var(--serif);
  font-size: 42px;
  letter-spacing: -2px;
  display: block;
}
.admin-brand span {
  display: block;
  font-family: var(--sans);
  font-size: 8px;
  letter-spacing: 2px;
  margin-top: 10px;
}
.sidebar-label {
  margin: 67px 0 20px;
  font-size: 9px;
  color: #8b707a;
  letter-spacing: 1px;
}
.admin-sidebar nav button {
  width: 100%;
  display: flex;
  gap: 15px;
  padding: 19px 12px;
  font-size: 13px;
  border-bottom: 1px solid #e1ced4;
}
.admin-sidebar nav button.active {
  background: #5d2036;
  color: #fff;
}
.admin-sidebar nav span {
  font-family: var(--serif);
  color: #ef795e;
}
.admin-sidebar nav i {
  font-style: normal;
  margin-left: auto;
}
.sidebar-bottom {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
  font-size: 11px;
}
.sidebar-bottom button {
  text-align: left;
  padding: 0;
  font-size: 11px;
}
.sidebar-bottom small {
  color: #8b707a;
  font-size: 8px;
}
.admin-main {
  margin-left: 232px;
}
.admin-topbar {
  height: 77px;
  border-bottom: 1px solid #e1ced4;
  padding: 0 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #7b626b;
  font-size: 11px;
}
.admin-online {
  font-size: 10px;
}
.admin-content {
  padding: 40px 42px;
}
.admin-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.admin-title h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 31px;
  letter-spacing: 1px;
  margin: 16px 0 0;
}
.admin-title .eyebrow {
  font-size: 8px;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 40px 0;
  border: 1px solid #e1ced4;
}
.stat-grid > div {
  padding: 24px;
  border-right: 1px solid #e1ced4;
}
.stat-grid > div:last-child {
  border: 0;
}
.stat-grid span {
  font-size: 11px;
  display: block;
}
.stat-grid strong {
  font-family: var(--serif);
  font-size: 51px;
  font-weight: 400;
  display: block;
  margin: 9px 0;
}
.stat-grid small {
  font-size: 7px;
  letter-spacing: 1.4px;
  color: #8b707a;
}
.table-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.table-toolbar input,
.table-toolbar select {
  min-height: 42px;
  border: 1px solid #d8c0c8;
  background: transparent;
  padding: 10px;
  font: inherit;
  font-size: 11px;
  border-radius: 0;
  max-width: 100%;
}
.table-toolbar input#search {
  flex: 1;
  min-width: 185px;
  max-width: 300px;
}
.table-toolbar .button {
  margin-left: auto;
  font-size: 11px;
  min-height: 42px;
}
.table-toolbar .muted {
  font-size: 10px;
}
.small-button {
  border: 1px solid #d8c0c8;
  padding: 12px 17px;
  font-size: 11px;
  min-height: 42px;
  white-space: nowrap;
}
.table-wrap {
  overflow: auto;
  border-top: 1px solid #d8c0c8;
}
table {
  border-collapse: collapse;
  width: 100%;
  min-width: 690px;
  text-align: left;
}
th {
  font-weight: 400;
  font-size: 10px;
  letter-spacing: 0.5px;
  background: #f2e7e5;
  padding: 16px;
}
td {
  border-bottom: 1px solid #e1ced4;
  padding: 22px 16px;
  font-size: 12px;
  vertical-align: top;
}
td strong {
  font-size: 13px;
  font-weight: 400;
  display: block;
  line-height: 1.7;
}
td small {
  display: block;
  color: #7b626b;
  font-size: 10px;
  margin-top: 6px;
}
td .text-link {
  font-size: 10px;
  white-space: nowrap;
}
.preference-cell {
  max-width: 310px;
  min-width: 200px;
}
.preference-cell p {
  font-size: 11px;
  color: #7b626b;
  line-height: 1.8;
  max-width: 300px;
  overflow-wrap: anywhere;
}
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.style-tag {
  border: 1px solid #d8c0c8;
  padding: 5px 8px;
  font-size: 10px;
  display: inline-block;
}
.state {
  display: inline-block;
  padding: 6px 9px;
  font-size: 10px;
  background: #e7e9e0;
  white-space: nowrap;
}
.state.pending {
  background: #f0e9d6;
  color: #796238;
}
.state.confirmed {
  background: #e5ebdb;
  color: #596c43;
}
.state.completed {
  background: #e2e8e5;
  color: #456455;
}
.state.cancelled {
  background: #e9e5e3;
  color: #86665f;
}
.admin-empty {
  text-align: center;
  padding: 60px 25px;
  border-bottom: 1px solid #e1ced4;
}
.admin-empty > span {
  font-size: 40px;
  font-family: var(--serif);
  color: #b78b9a;
}
.admin-empty h3 {
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 400;
}
.admin-empty p {
  color: #7b626b;
  line-height: 1.8;
  font-size: 12px;
}
.admin-work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
}
.admin-work-image {
  height: 250px;
  position: relative;
}
.admin-work-image img {
  height: 100%;
}
.admin-work-image .badge {
  position: absolute;
  left: 12px;
  top: 12px;
  background: #f6f5ed;
  padding: 7px;
  font-size: 9px;
}
.admin-work h3 {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 400;
  margin-bottom: 8px;
}
.admin-work p {
  font-size: 10px;
  color: #7b626b;
}
.work-controls {
  display: flex;
  justify-content: space-between;
}
.work-controls button {
  font-size: 10px;
}
.admin-body dialog {
  max-width: min(92vw, 680px);
}
.detail-block {
  border-block: 1px solid #e1ced4;
  margin: 25px 0;
  padding: 20px 0;
}
.detail-block label {
  display: block;
  font-size: 11px;
  color: #7b626b;
  margin-bottom: 10px;
}
.detail-block .tag-list {
  margin-bottom: 25px;
}
.preserve {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.8;
  font-size: 13px;
}
.upload-zone {
  border: 1px dashed #c69fac;
  text-align: center;
  cursor: pointer;
  padding: 24px;
  display: block;
  font-size: 14px;
}
.upload-zone input {
  display: block;
  margin: 15px auto;
  max-width: 100%;
  font-size: 12px;
}
.upload-zone span {
  font-size: 10px;
  color: #7b626b;
  line-height: 1.9;
}
.media-thumb {
  width: 100px;
  height: 112px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 10px 10px 0;
  background: #f2e7e5;
  font-size: 11px;
  vertical-align: top;
}
.media-thumb img {
  height: 100%;
  object-fit: cover;
}
.media-thumb button {
  position: absolute;
  right: 0;
  top: 0;
  background: #f5f3ee;
  width: 30px;
  height: 30px;
}
.media-thumb small {
  position: absolute;
  bottom: 0;
  left: 0;
  background: #f5f3ee;
  padding: 4px;
  font-size: 9px;
}
#upload-feedback {
  font-size: 11px;
  color: #7b626b;
}
.admin-login {
  width: min(90%, 540px);
  margin: 70px auto;
  border: 1px solid #d8c0c8;
  padding: 40px;
}
.admin-login .eyebrow {
  margin-top: 55px;
  font-size: 9px;
}
.admin-login h1 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.8;
  font-size: 34px;
}
.admin-login h1 em {
  font-style: normal;
  color: #a85670;
}
.admin-login .text-link {
  margin-top: 25px;
}
.admin-body button:disabled {
  opacity: 0.4;
  cursor: wait;
}
@media (max-width: 1000px) {
  .admin-sidebar {
    width: 190px;
    padding: 30px 18px;
  }
  .admin-main {
    margin-left: 190px;
  }
  .admin-content {
    padding: 30px 23px;
  }
  .admin-work-grid {
    grid-template-columns: 1fr 1fr;
  }
  .admin-title h1 {
    font-size: 25px;
  }
  .admin-title {
    align-items: flex-start;
  }
  .stat-grid > div {
    padding: 18px;
  }
  .stat-grid small {
    display: none;
  }
  .admin-topbar {
    padding-inline: 23px;
  }
}
@media (max-width: 650px) {
  .admin-sidebar {
    position: static;
    width: 100%;
    padding: 20px;
  }
  .admin-sidebar .admin-brand {
    font-size: 34px;
  }
  .sidebar-label,
  .sidebar-bottom small {
    display: none;
  }
  .admin-sidebar nav {
    display: flex;
    margin-top: 24px;
    overflow-x: auto;
    flex-shrink: 0;
  }
  .admin-sidebar nav button {
    padding: 13px 8px;
    font-size: 11px;
    gap: 8px;
    flex: 0 0 auto;
    width: auto;
    white-space: nowrap;
  }
  .admin-sidebar nav i {
    display: none;
  }
  .sidebar-bottom {
    position: absolute;
    right: 20px;
    top: 25px;
    gap: 12px;
    font-size: 9px;
  }
  .sidebar-bottom button {
    font-size: 9px;
  }
  .admin-main {
    margin: 0;
  }
  .admin-topbar {
    display: none;
  }
  .admin-content {
    padding: 25px 20px;
  }
  .admin-title {
    display: block;
  }
  .admin-title h1 {
    font-size: 25px;
  }
  .admin-title > .small-button {
    margin-top: 20px;
  }
  .stat-grid {
    grid-template-columns: 1fr 1fr;
    margin: 24px 0;
  }
  .stat-grid > div {
    border-bottom: 1px solid #e1ced4;
  }
  .stat-grid > div:nth-child(2) {
    border-right: 0;
  }
  .stat-grid strong {
    font-size: 38px;
  }
  .admin-work-grid {
    gap: 20px 14px;
  }
  .admin-work-image {
    height: 220px;
  }
  .admin-work h3 {
    font-size: 16px;
  }
  .admin-login {
    margin-top: 30px;
    padding: 30px 22px;
  }
  .admin-login h1 {
    font-size: 28px;
  }
}

.collection-kind-switch { display: inline-flex; gap: 6px; padding: 5px; background: #efdfe3; border-radius: 14px; margin: 0 0 26px; }
.collection-kind-switch button { display: flex; align-items: center; gap: 13px; padding: 13px 22px; border-radius: 10px; font-size: 13px; }
.collection-kind-switch button.active { background: #fffaf7; box-shadow: 0 2px 8px #5d203610; }
.collection-kind-switch button span { min-width: 22px; padding: 3px 6px; font-size: 10px; border-radius: 6px; background: #f2e7e5; }
.admin-collection-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 25px; }
.admin-collection { border: 1px solid var(--line); background: #fffbf7; border-radius: 16px; overflow: hidden; }
.admin-collection-cover { position: relative; aspect-ratio: 4 / 3; background: #efdfe3; overflow: hidden; }
.admin-collection-cover > img { height: 100%; object-fit: cover; }
.collection-state, .collection-order { position: absolute; top: 13px; padding: 7px 11px; border-radius: 7px; font-size: 10px; background: #fffaf7e8; }
.collection-state { left: 13px; }
.collection-state.published { background: var(--ink); color: #fffaf7; }
.collection-state.archived { color: #7b626b; background: #eee7e6; }
.collection-order { right: 13px; }
.collection-no-cover { height: 100%; display: flex; flex-direction: column; gap: 10px; align-items: center; justify-content: center; color: #ac7a8c; }
.collection-no-cover > span { font: italic 64px var(--serif); }
.collection-no-cover small { font-size: 10px; letter-spacing: 2px; }
.admin-collection-copy { padding: 22px; }
.collection-card-top { display: flex; gap: 16px; justify-content: space-between; font-size: 10px; color: var(--muted); }
.collection-card-top strong { font-weight: 500; color: var(--ink); }
.admin-collection-copy h3 { font: 400 21px var(--serif); margin: 17px 0 8px; overflow-wrap: anywhere; }
.collection-subtitle, .collection-service { font-size: 11px; line-height: 1.8; color: var(--muted); margin: 8px 0; overflow-wrap: anywhere; }
.collection-service { color: #a34b67; }
.collection-description { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: 12px; line-height: 1.8; min-height: 64px; color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; }
.collection-card-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding-top: 16px; margin-top: 20px; border-top: 1px solid var(--line); }
.collection-card-actions .text-link { font-size: 11px; min-height: 36px; }
.collection-empty { display: grid; grid-template-columns: minmax(230px, .85fr) minmax(0, 1fr); align-items: center; gap: 48px; min-height: 340px; border: 1px solid var(--line); border-radius: 16px; padding: 36px; background: #fffbf7; }
.collection-empty-art { position: relative; min-height: 240px; display: flex; justify-content: center; align-items: center; background: #efdfe3; border-radius: 12px; overflow: hidden; }
.collection-empty-art::before, .collection-empty-art::after { content: ""; position: absolute; width: 125px; height: 160px; border: 1px solid #c899a7; border-radius: 50%; transform: rotate(25deg); }
.collection-empty-art::after { width: 165px; height: 125px; transform: rotate(-25deg); }
.collection-empty-art > span { position: absolute; bottom: 22px; font-size: 8px; letter-spacing: 1.5px; color: #a34b67; }
.collection-empty-art > i { font: italic 80px var(--serif); position: relative; z-index: 1; }
.collection-empty-art > b { position: absolute; top: 20px; right: 22px; color: #df6e57; font-size: 25px; font-weight: 400; }
.collection-empty h2 { font: 400 27px var(--serif); line-height: 1.65; margin: 18px 0; }
.collection-empty p { color: var(--muted); line-height: 1.95; font-size: 12px; max-width: 410px; margin-bottom: 26px; }
.collection-empty .button { font-size: 12px; }
.collection-publish-note { margin-top: 24px; }
.collection-cover-preview { margin-bottom: 25px; }
.collection-cover-preview img { width: 100%; max-height: 280px; object-fit: contain; background: #f2e7e5; border: 1px solid var(--line); border-radius: 10px; }
.collection-cover-preview .text-link { margin-top: 12px; min-height: 40px; font-size: 12px; }
.collection-editor [name="description"] { min-height: 150px; }
#collection-upload-status { color: var(--muted); font-size: 12px; line-height: 1.8; margin: 0 0 15px; }
.collection-cover-preview[hidden], .collection-reload[hidden] { display: none !important; }
.collection-reload { white-space: normal; line-height: 1.7; font-size: 12px; margin-top: 18px; }
@media (max-width: 1100px) {
  .admin-collection-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .collection-empty { gap: 28px; padding: 26px; }
}
@media (max-width: 650px) {
  .collection-kind-switch { display: flex; }
  .collection-kind-switch button { flex: 1; justify-content: center; padding-inline: 14px; }
  .admin-collection-grid { grid-template-columns: 1fr; gap: 18px; }
  .collection-empty { grid-template-columns: 1fr; padding: 24px; gap: 26px; }
  .collection-empty-art { min-height: 190px; }
  .collection-empty h2 { font-size: 24px; }
  .collection-toolbar .button { width: 100%; margin-left: 0; }
  .collection-toolbar input#search { max-width: none; }
}
.work-controls {
  gap: 14px;
  flex-wrap: wrap;
}
.work-controls button {
  font-size: 12px;
  min-height: 36px;
}
.danger-link {
  color: #924b3c;
}
.trash-controls {
  margin-left: auto;
  display: flex;
  gap: 12px;
}
.content-intro {
  display: flex;
  gap: 35px;
  align-items: center;
  justify-content: space-between;
  border-block: 1px solid #d8c0c8;
  padding: 30px 0;
  margin-bottom: 30px;
}
.content-intro h2 {
  font: 400 29px var(--serif);
  margin: 12px 0;
}
.content-intro p {
  font-size: 13px;
  line-height: 1.9;
  max-width: 620px;
  color: #666d61;
}
.module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 25px;
}
.module-card {
  border: 1px solid #d8c0c8;
  padding: 21px;
  position: relative;
}
.module-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.module-index {
  font: italic 25px var(--serif);
  color: #70795f;
}
.module-preview {
  height: 130px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border-block: 1px solid #d9ddcf;
  margin: 18px 0;
  background: #f2e7e5;
}
.module-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.module-ornament {
  font: italic 88px var(--serif);
  color: #9ba286;
}
.module-card h3 {
  font: 400 23px var(--serif);
  margin: 16px 0 10px;
}
.module-card p {
  font-size: 12px;
  line-height: 1.8;
  min-height: 44px;
  color: #666d61;
  overflow-wrap: anywhere;
}
.module-card button {
  font-size: 12px;
}
.module-settings {
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
}
.module-settings .field {
  max-width: 110px;
}
.module-language {
  border: 1px solid #d8c0c8;
  padding: 0 20px;
}
.module-language summary {
  cursor: pointer;
  padding: 20px 0;
  font-size: 15px;
  list-style: none;
  display: flex;
  justify-content: space-between;
}
.module-language summary span {
  font-size: 11px;
  color: #747e65;
}
.module-language .field {
  font-size: 13px;
}
.module-language textarea {
  min-height: 80px;
  resize: vertical;
  line-height: 1.7;
}
.module-image-preview {
  height: 130px;
  max-width: 100%;
  object-fit: cover;
}
#module-upload-status {
  font-size: 12px;
  color: #65734f;
}
.confirm-actions {
  display: flex;
  gap: 15px;
  margin-top: 25px;
}
@media (max-width: 950px) {
  .module-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .content-intro {
    display: block;
  }
  .content-intro > .small-button {
    display: inline-block;
    margin-top: 12px;
  }
}
@media (max-width: 650px) {
  .admin-sidebar nav {
    flex-wrap: wrap;
  }
  .admin-sidebar nav button {
    width: 50%;
    font-size: 13px;
  }
  .module-grid {
    grid-template-columns: 1fr;
  }
  .module-preview {
    height: 170px;
  }
  .work-controls {
    gap: 8px;
  }
  .module-language {
    padding-inline: 14px;
  }
}
/* Keep editable text and module previews readable at every editor width. */
.admin-body .module-image-preview[hidden],
.admin-body .module-reload[hidden] {
  display: none;
}
.module-image-preview {
  width: 100%;
  height: 210px;
  border: 1px solid #d8c0c8;
  background: #f2e7e5;
  object-fit: contain;
}
.module-language .field {
  margin: 0 0 22px;
  gap: 8px;
}
.module-language .field small,
.auth-form > .field small {
  font-size: 11px;
  color: #7b626b;
  font-weight: 400;
}
.module-language textarea,
.module-settings input,
.auth-form > .field input {
  font-size: 14px;
  line-height: 1.7;
  letter-spacing: 0;
}
.module-settings .consent {
  font-size: 13px;
  line-height: 1.7;
  flex: 1;
}
.module-settings .field {
  flex: 0 0 110px;
}
.module-language summary:focus-visible {
  outline: 2px solid #ef795e;
  outline-offset: 4px;
}
.module-language[open] summary {
  border-bottom: 1px solid #e1ced4;
  margin-bottom: 20px;
}
.module-reload {
  white-space: normal;
  line-height: 1.6;
}
.module-card h3,
.admin-work h3 {
  overflow-wrap: anywhere;
}
.admin-body .notice {
  font-size: 12px;
  line-height: 1.9;
}
@media (max-width: 650px) {
  .module-settings {
    gap: 15px;
  }
  .module-settings .field {
    flex-basis: 90px;
  }
  .module-language textarea,
  .module-settings input,
  .auth-form > .field input {
    font-size: 16px;
  }
  .confirm-actions {
    flex-wrap: wrap;
  }
  .module-image-preview {
    height: 180px;
  }
}
