:root {
  --bg: #f3f5f7;
  --panel: #fff;
  --ink: #16202a;
  --muted: #66717d;
  --line: #ccd3da;
  --line-strong: #20272e;
  --focus: #006b67;
  --selected: #132f38;
  --selected-text: #fff;
  --ocg: #e4e8eb;
  --md: #cbeafb;
  --kcg: #d8efbc;
  --tcg: #f5d0cf;
  --age-2y: #8e2934;
  --age-1y: #dc4550;
  --age-180: #e89134;
  --age-90: #f2d14b;
  --age-30: #c8e788;
  --age-current: #9de7dc;
  --age-new: #ebeff2;
  --overlay: rgba(255, 255, 255, .40);
  --card-control-opacity: .84;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Malgun Gothic", "Segoe UI", system-ui, sans-serif;
  letter-spacing: 0;
}
button, input, select { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
.dark-mode {
  --bg: #11161b;
  --panel: #1a2229;
  --ink: #edf1f4;
  --muted: #aab5bd;
  --line: #3b4650;
  --line-strong: #9aa6af;
  --focus: #4ab8ae;
  --selected: #e7ecef;
  --selected-text: #141b21;
  --overlay: rgba(12, 16, 20, .44);
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.page { width: min(1440px, calc(100% - 32px)); margin: 0 auto; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.top-layout { padding: 14px 0 16px; display: grid; gap: 12px; }
.headline { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
h1 { margin: 0; font-size: 24px; line-height: 1.3; }
h2 { margin: 0; font-size: 13px; color: var(--muted); font-weight: 700; }
.headline-actions { display: flex; gap: 8px; }
.mode-button[aria-pressed="true"] { border-color: var(--focus); background: var(--focus); color: #fff; }
.filter-panel {
  display: grid;
  grid-template-columns: minmax(210px, .85fr) auto minmax(390px, 1.4fr);
  align-items: start;
  gap: 18px;
}
.mobile-filter-open, .mobile-filter-close, .top-filter-toggle, .mobile-filter-backdrop { display: none; }
.autocomplete-wrap { position: relative; }
.query-box {
  display: flex;
  align-items: center;
  overflow: hidden;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 4px 6px;
  background: #fff;
}
.query-box:focus-within { border-color: var(--focus); }
.query-box input {
  flex: 1 1 auto;
  min-width: 64px;
  height: 28px;
  border: 0;
  padding: 2px 4px;
  background: transparent;
  outline: none;
}
.dark-mode .query-box input {
  color: var(--ink);
}
.dark-mode .query-box input::placeholder {
  color: var(--muted);
}
.theme-token {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  min-height: 29px; border: 1px solid #273039; background: #edf1f3;
  border-radius: 5px; padding: 2px 8px; font-size: 13px; line-height: 1; font-weight: 700;
}
.theme-token:has(button) { justify-content: flex-start; padding-right: 5px; }
.theme-token button {
  border: 0; background: transparent; padding: 0; width: 18px; height: 18px; line-height: 1;
}
.date-inputs input {
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 7px 10px;
  width: 100%;
  background: #fff;
}
.suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 50;
  max-height: 320px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(20, 30, 40, .16);
}
.suggestion-group { padding: 5px 8px 3px; font-size: 11px; font-weight: 700; color: var(--muted); }
.suggestion {
  display: block; width: 100%; border: 1px solid var(--line); border-radius: 4px; background: #fff;
  padding: 7px 8px; text-align: left; overflow-wrap: anywhere;
  margin-top: 4px;
}
.suggestion-group + .suggestion { margin-top: 2px; }
.suggestion-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: end;
}
.suggestion-title span { min-width: 0; }
.suggestion-title time {
  align-self: end;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}
.suggestion-theme {
  position: relative;
  min-height: 0;
  overflow: hidden;
  font-weight: 700;
}
.suggestion-theme::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--overlay);
}
.suggestion-theme-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.suggestion-theme-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.suggestion-theme-token {
  position: relative;
  z-index: 1;
  min-height: 24px;
  padding: 1px 7px;
}
.suggestion:hover, .suggestion:focus, .suggestion.is-active { background: #eef3f5; }
.suggestion-theme:hover, .suggestion-theme:focus, .suggestion-theme.is-active {
  filter: brightness(.97);
}
.suggestion small { display: block; color: var(--muted); margin-top: 2px; }
.suggestion-theme small {
  display: inline-flex;
  align-items: center;
  position: relative;
  z-index: 1;
  color: var(--ink);
  opacity: .78;
  margin: 0 0 0 6px;
  vertical-align: middle;
}
.toggle-filter, .date-filter { display: grid; gap: 7px; }
.toggle-filter .filter-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.filter-reset-button {
  justify-self: start;
}
.toggles { display: flex; flex-wrap: wrap; gap: 5px; }
.toggle, .category-button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 5px;
  min-height: 34px;
  padding: 5px 11px;
}
.category-button.is-active {
  border-color: var(--selected);
  background: var(--selected);
  color: var(--selected-text);
}
.env-token {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 55px;
  min-height: 30px;
  border: 1px solid #273039;
  border-radius: 16px;
  background: #fff;
  padding: 3px 12px;
  font-size: 13px;
  line-height: 1;
  font-weight: 700;
}
.env-token.is-active { border-width: 3px; padding: 1px 10px; }
.env-token.env-ALL.is-active { background: #273039; color: #fff; }
.dark-mode .env-token.is-active {
  border-color: #11161b;
  box-shadow: 0 0 0 2px #f0f5f8;
}
.dark-mode .env-token.env-ALL.is-active { background: #f0f5f8; color: #141b21; }
.theme-clear-button {
  width: 31px;
  padding: 0;
  align-items: center;
  justify-content: center;
}
.theme-clear-button::before {
  content: "";
  width: 17px;
  height: 17px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18'/%3E%3Cpath d='M8 6V4h8v2'/%3E%3Cpath d='M19 6l-1 14H6L5 6'/%3E%3Cpath d='M10 11v6'/%3E%3Cpath d='M14 11v6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18'/%3E%3Cpath d='M8 6V4h8v2'/%3E%3Cpath d='M19 6l-1 14H6L5 6'/%3E%3Cpath d='M10 11v6'/%3E%3Cpath d='M14 11v6'/%3E%3C/svg%3E") center / contain no-repeat;
}
.date-filter .filter-title {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}
.date-inputs { display: flex; align-items: center; gap: 5px; }
.date-inputs input { width: 137px; height: 34px; font-size: 13px; }
.range-wrap { position: relative; height: 43px; margin: 0 7px; }
.date-track { position: absolute; left: 0; right: 0; top: 15px; height: 3px; background: var(--line); }
.tick { position: absolute; top: -3px; height: 10px; width: 1px; background: #aab4bc; }
.tick.quarter { top: -9px; height: 21px; width: 2px; background: #57636d; }
.tick-label {
  position: absolute;
  top: 15px;
  transform: translateX(-50%);
  white-space: nowrap;
  color: var(--muted);
  font-size: 11px;
}
.range {
  position: absolute;
  width: 100%;
  left: 0;
  top: 6px;
  height: 20px;
  margin: 0;
  appearance: none;
  pointer-events: none;
  background: transparent;
}
.range::-webkit-slider-thumb {
  appearance: none;
  width: 13px; height: 25px; border-radius: 1px;
  background: var(--focus); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--focus);
  pointer-events: auto;
}
.range::-moz-range-thumb {
  width: 13px; height: 25px; border-radius: 1px;
  background: var(--focus); border: 2px solid #fff;
  pointer-events: auto;
}
.range-start { z-index: 2; }
.range-end { z-index: 3; }
.range-start:focus { z-index: 4; }
.range-start::-webkit-slider-thumb {
  transform: translateX(-6.5px);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 72%);
}
.range-end::-webkit-slider-thumb {
  transform: translateX(6.5px);
  clip-path: polygon(0 0, 100% 0, 100% 72%, 0 100%);
}
.range-start::-moz-range-thumb {
  transform: translateX(-6.5px);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 72%);
}
.range-end::-moz-range-thumb {
  transform: translateX(6.5px);
  clip-path: polygon(0 0, 100% 0, 100% 72%, 0 100%);
}
.app-layout {
  display: grid;
  grid-template-columns: 262px minmax(0, 1fr);
  gap: 16px;
  padding: 16px 0 32px;
}
.theme-sidebar {
  position: sticky;
  top: 182px;
  align-self: start;
  max-height: calc(100vh - 198px);
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  display: grid;
  grid-template-rows: auto auto auto auto 1fr;
}
.side-heading {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 12px 8px;
}
.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 0 10px 10px;
  border-bottom: 1px solid var(--line);
}
.category-button { min-height: 31px; padding: 4px 8px; font-size: 13px; }
.theme-search-row { display: flex; align-items: center; gap: 5px; padding: 10px 10px 0; }
.theme-search { flex: 1; }
.theme-search input {
  width: 100%; height: 34px; border-radius: 5px; padding: 6px 9px;
  border: 1px solid var(--line); background: #fff;
}
.theme-buttons {
  display: flex; align-content: flex-start; flex-wrap: wrap; gap: 5px;
  overflow: auto; padding: 10px;
}
.theme-button { font-size: 12px; text-align: left; max-width: 100%; overflow-wrap: anywhere; }
.theme-button.is-active { box-shadow: inset 0 0 0 2px #20272e; }
.results { min-width: 0; }
.selected-theme-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 5px;
  min-width: 0; min-height: 0; margin: 6px 0 0;
  overflow: visible;
}
.selected-theme-bar:empty { display: none; }
.selected-theme-bar .theme-token { flex: 0 0 auto; white-space: nowrap; }
.sidebar-selected-theme-bar {
  display: none;
}
.content-tabs {
  display: flex; align-items: end; gap: 3px; margin: 0 2px 10px;
  border-bottom: 1px solid var(--line);
}
.content-tabs[hidden] { display: none; }
.content-tab {
  min-height: 38px; padding: 7px 18px; border: 1px solid var(--line); border-bottom: 0;
  border-radius: 6px 6px 0 0; background: var(--panel); color: var(--muted); font-weight: 700;
}
.content-tab.is-active {
  position: relative; bottom: -1px; background: #fff; color: var(--ink);
  border-color: var(--line-strong);
}
.result-header {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
  margin: 0 2px 12px; color: var(--muted); font-size: 14px;
}
.result-tools { display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
.sort-control { display: inline-flex; align-items: center; gap: 4px; }
.view-mode-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 34px;
  padding: 4px;
}
.view-mode-icon {
  display: block;
  width: 27px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sort-control select {
  height: 34px; border: 1px solid var(--line); border-radius: 5px; background: #fff; padding: 5px 8px;
}
.sort-control button {
  width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 5px; background: #fff;
}
.pagination { display: flex; justify-content: center; align-items: center; gap: 5px; color: var(--ink); }
.pagination-bottom { margin: 18px 0 4px; }
.page-button {
  height: 32px; min-width: 34px; border: 1px solid var(--line); border-radius: 5px; background: #fff;
}
.page-button:disabled { opacity: .38; cursor: default; }
.page-button.is-hidden { visibility: hidden; }
.page-position { display: inline-flex; align-items: center; gap: 4px; margin: 0 4px; }
.page-position input {
  width: 43px; height: 32px; padding: 4px; text-align: center; border: 1px solid var(--line); border-radius: 5px;
}
.page-size { display: inline-flex; align-items: center; gap: 5px; margin-left: 12px; color: var(--muted); font-size: 13px; }
.page-size select {
  height: 32px; border: 1px solid var(--line); border-radius: 5px; background: #fff;
}
.scroll-top-button {
  position: fixed; right: 22px; bottom: 22px; z-index: 30;
  display: grid; place-items: center; width: 46px; height: 46px; border: 1px solid var(--line-strong);
  border-radius: 50%; background: var(--panel); color: var(--ink); font-size: 24px;
  box-shadow: 0 4px 14px rgba(20, 30, 40, .16); opacity: 0; visibility: hidden;
  transform: translateY(8px); transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
}
.scroll-top-button.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.guide-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.guide-card {
  position: relative; isolation: isolate; height: 206px;
  border: 2px solid var(--line-strong); border-radius: 8px;
  background: #fff; overflow: hidden; display: grid; cursor: pointer;
}
.card-background { position: absolute; inset: 0; z-index: -2; display: flex; }
.card-background .theme-image { flex: 1; min-width: 0; height: 100%; object-fit: cover; }
.card-background .blank-image {
  flex: 1; background: linear-gradient(120deg, #f6f7f8, #e9edf0);
}
.guide-card::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--overlay);
}
.card-link-area {
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 8px; padding: 11px; min-height: 0;
  color: inherit; text-decoration: none; cursor: pointer;
}
.card-badges { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.theme-badge { background: rgba(255,255,255,.20); }
.guide-card .env-badge,
.guide-card .theme-badge,
.guide-card .url-field,
.guide-card .date-chip { opacity: var(--card-control-opacity); }
.theme-expand-button { display: none; }
.env-OCG { background: var(--ocg); color: #16202a; }
.env-MD { background: var(--md); color: #16202a; }
.env-KCG { background: var(--kcg); color: #16202a; }
.env-TCG { background: var(--tcg); color: #16202a; }
.guide-title {
  margin: 0; font-size: 19px; line-height: 1.45; font-weight: 700;
  overflow-wrap: anywhere; align-self: start; min-height: 0; overflow: hidden;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3;
}
.card-bottom { display: grid; gap: 9px; align-self: end; min-width: 0; }
.date-row { display: flex; justify-content: flex-end; }
.date-chip { padding: 4px 9px; min-height: 29px; font-size: 13px; font-weight: 700; border-radius: 4px; }
.site-chip { color: #fff; background: var(--focus); letter-spacing: 0; }
.age-2y { color: #fff; background: var(--age-2y); }
.age-1y { color: #fff; background: var(--age-1y); }
.age-180 { background: var(--age-180); color: #16202a; }
.age-90 { background: var(--age-90); color: #16202a; }
.age-30 { background: var(--age-30); color: #16202a; }
.age-current { background: var(--age-current); color: #16202a; }
.age-new { background: var(--age-new); color: #16202a; }
.url-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; }
.url-field {
  height: 27px; border: 1px solid #48525b; background: #fff;
  padding: 3px 7px; font-size: 12px; min-width: 0; cursor: text;
}
.copy-button {
  display: inline-grid; place-items: center; width: 30px; height: 27px;
  border: 1px solid #273039; background: #fff; padding: 3px;
}
.copy-button svg { width: 17px; height: 17px; pointer-events: none; }
.copy-button.is-done { background: var(--kcg); }
.empty { padding: 44px 20px; border: 1px solid var(--line); border-radius: 7px; text-align: center; background: #fff; color: var(--muted); }
.quiet-button, .mini-button, .primary-button, .danger-button, .file-button {
  border-radius: 5px; border: 1px solid var(--line); min-height: 34px; padding: 6px 12px; background: #fff; color: var(--ink);
}
.mini-button { font-size: 12px; min-height: 29px; padding: 3px 7px; }
.primary-button { border-color: var(--focus); background: var(--focus); color: #fff; }
.danger-button { border-color: #bb3e47; color: #a92d36; background: #fff; }
.admin-dialog {
  width: min(980px, calc(100% - 30px)); height: min(760px, calc(100vh - 32px));
  border: 1px solid var(--line-strong); border-radius: 8px; padding: 0; color: var(--ink); overflow: hidden;
}
.admin-dialog[open] { display: flex; flex-direction: column; }
.admin-dialog::backdrop { background: rgba(21, 31, 40, .42); }
.dialog-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); padding: 14px 18px; }
.dialog-header h2 { color: var(--ink); font-size: 18px; }
.icon-button { border: 0; background: transparent; font-size: 28px; line-height: 1; width: 36px; height: 36px; }
.admin-tabs { display: flex; padding: 10px 18px 0; gap: 5px; border-bottom: 1px solid var(--line); }
.admin-tab { border: 1px solid transparent; background: transparent; padding: 9px 14px; }
.admin-tab.is-active { border-color: var(--line) var(--line) #fff; background: #fff; margin-bottom: -1px; font-weight: 700; }
.admin-pane { display: none; padding: 18px; min-height: 0; }
.admin-pane.is-active { display: block; flex: 1; overflow: hidden; }
.admin-split { display: grid; grid-template-columns: 310px 1fr; gap: 20px; height: 100%; min-height: 0; }
.select-list { display: grid; gap: 7px; color: var(--muted); font-size: 13px; }
.select-list select { width: 100%; border: 1px solid var(--line); border-radius: 5px; padding: 4px; background: #fff; }
.select-list input { border: 1px solid var(--line); border-radius: 5px; height: 35px; padding: 6px 9px; }
.theme-admin-browser { grid-template-rows: auto auto 1fr; min-height: 0; overflow: hidden; }
.admin-theme-list {
  display: flex; flex-direction: column; gap: 2px; min-height: 0;
  overflow-y: auto; padding: 3px; border: 1px solid var(--line); border-radius: 5px;
}
.admin-theme-group-toggle {
  display: flex; align-items: center; gap: 6px; width: 100%; min-height: 28px; margin-top: 3px;
  padding: 3px 6px; border: 0; border-radius: 4px; background: transparent; color: var(--ink); font-weight: 700;
}
.admin-theme-group:first-child .admin-theme-group-toggle { margin-top: 0; }
.admin-theme-group-toggle span:first-child { width: 18px; color: var(--muted); font-size: 11px; }
.admin-theme-group-items { display: grid; gap: 1px; }
.admin-theme-group.is-collapsed .admin-theme-group-items { display: none; }
.admin-theme-group.is-collapsed .admin-theme-group-toggle span:first-child { transform: rotate(-90deg); }
.admin-theme-group-toggle:hover { background: rgba(0, 107, 103, .08); }
.admin-theme-item {
  display: flex; align-items: center; gap: 6px; width: 100%; border: 1px solid transparent;
  border-radius: 4px; padding: 2px 5px 2px 27px; background: transparent; color: var(--ink); text-align: left;
}
.admin-theme-item.is-selected { border-color: var(--focus); background: rgba(0, 107, 103, .08); }
.admin-theme-item .theme-token { min-height: 26px; max-width: 100%; }
.edit-form { display: grid; gap: 12px; align-content: start; min-height: 0; overflow-y: auto; padding-right: 6px; }
.theme-edit-form { display: block; overflow: hidden; padding-right: 0; }
.theme-form-scroll { display: grid; gap: 12px; align-content: start; height: 100%; overflow-y: auto; padding-right: 6px; }
.edit-form label { display: grid; gap: 5px; font-size: 13px; color: var(--muted); }
.edit-form input, .edit-form select {
  height: 39px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 5px; color: var(--ink); background: #fff;
}
.theme-identity-fields { display: grid; grid-template-columns: minmax(0, 1fr) 112px; gap: 10px; }
.theme-alias-fields { display: grid; gap: 6px; }
.theme-alias-fields input { width: 100%; }
.guide-theme-editor { display: grid; gap: 7px; }
.guide-theme-tags { display: flex; flex-wrap: wrap; gap: 5px; min-height: 31px; }
.guide-theme-tag button { width: 20px; height: 20px; border: 0; background: transparent; color: inherit; padding: 0; }
.guide-theme-add { display: grid; grid-template-columns: 1fr auto; gap: 6px; }
.selection-note { min-height: 16px; color: var(--focus); font-weight: 700; }
.theme-image-editor {
  display: grid; gap: 10px; min-width: 0; margin: 0; padding: 10px;
  border: 1px solid var(--line); border-radius: 6px;
}
.theme-image-editor legend { padding: 0 5px; color: var(--muted); font-size: 13px; }
.image-thumbnail-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.image-thumbnail {
  position: relative; display: grid; grid-template-rows: 1fr auto; height: 104px; padding: 0;
  overflow: hidden; border: 1px solid var(--line); border-radius: 5px; background: var(--panel); color: var(--muted);
}
.image-thumbnail img { width: 100%; min-height: 0; height: 75px; display: block; object-fit: cover; }
.image-thumbnail .image-slot-empty { display: grid; place-items: center; min-height: 75px; font-size: 25px; }
.image-thumbnail .image-slot-label { min-height: 27px; padding: 5px; font-size: 12px; background: var(--panel); }
.image-thumbnail.is-active { border: 2px solid var(--focus); }
.image-thumbnail.can-drag { cursor: grab; }
.image-thumbnail.is-dragging { opacity: .42; }
.mixed-image-field { display: grid; gap: 5px; }
.mixed-image-options { display: flex; gap: 7px; }
.mixed-image-choice {
  position: relative; display: grid; place-items: center; width: 68px; height: 52px; padding: 0;
  overflow: hidden; border: 1px solid var(--line); border-radius: 5px; background: var(--panel); color: var(--muted); font-size: 12px;
}
.mixed-image-choice img { width: 100%; height: 100%; object-fit: cover; }
.mixed-image-choice.is-selected { border: 3px solid #1874d1; }
.mixed-image-choice:disabled { opacity: .4; cursor: default; }
.theme-image-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.directory-status { color: var(--muted); font-size: 12px; margin-right: 4px; }
.directory-status.is-connected { color: var(--focus); font-weight: 700; }
.theme-image-preview {
  position: relative; cursor: crosshair;
  display: none; width: 100%; height: 270px; border: 1px solid var(--line); border-radius: 5px;
  overflow: hidden; background: #f3f5f7;
}
.theme-image-preview.has-image { display: block; }
.theme-image-preview img { width: 100%; height: 100%; display: block; object-fit: contain; }
.theme-focal-marker {
  position: absolute; width: 16px; height: 16px; border: 2px solid #fff; border-radius: 50%;
  background: var(--focus); box-shadow: 0 0 0 1px #15232b; transform: translate(-50%, -50%);
  pointer-events: none;
}
.theme-preview-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.preview-label { display: block; margin-bottom: 5px; color: var(--muted); font-size: 12px; font-weight: 700; }
.theme-card-preview {
  position: relative; height: 178px; overflow: hidden; border: 2px solid var(--line-strong); border-radius: 8px;
  background: #eef2f3;
}
.theme-card-preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.theme-card-preview::after { content: ""; position: absolute; inset: 0; background: var(--overlay); }
.preview-card-body {
  position: relative; z-index: 1; height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 7px; padding: 10px;
}
.theme-card-preview .guide-title { font-size: 16px; }
.theme-card-preview .url-row { grid-template-columns: 1fr 28px; }
.theme-card-preview .copy-button { width: 28px; height: 28px; }
.theme-card-preview .url-field { height: 28px; font-size: 11px; }
.theme-card-preview .date-chip { min-height: 24px; font-size: 11px; padding: 3px 7px; }
.theme-card-preview .env-token, .theme-card-preview .theme-token {
  min-height: 23px; font-size: 11px; padding: 2px 7px;
}
.theme-suggestion-preview {
  position: relative; min-height: 39px; overflow: hidden; border: 1px solid var(--line); border-radius: 5px;
  padding: 7px 8px; background: #fff;
}
.theme-suggestion-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--overlay);
}
.focal-mode-toggle { display: flex; gap: 6px; }
.focal-mode-toggle .is-active { border-color: var(--focus); background: var(--focus); color: #fff; }
.theme-focal-tools { display: flex; align-items: end; flex-wrap: wrap; gap: 10px; }
.theme-focal-tools label { display: grid; gap: 5px; }
.focal-axis { display: flex; align-items: center; gap: 5px; }
.focal-axis input[type="range"] { width: 128px; height: 28px; padding: 0; }
.focal-axis .mini-button { width: 30px; min-height: 30px; padding: 2px; }
.focal-axis output { width: 28px; text-align: right; color: var(--ink); font-size: 12px; }
.theme-color-tools { display: flex; align-items: end; flex-wrap: wrap; gap: 10px; }
.theme-color-tools label { display: grid; gap: 5px; }
.theme-color-tools input[type="color"] { width: 56px; padding: 3px; }
.theme-related { display: grid; gap: 7px; padding: 10px; border: 1px solid var(--line); border-radius: 6px; }
.theme-related-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.theme-related-heading h3 { margin: 0; font-size: 13px; color: var(--ink); }
.theme-related-heading span { color: var(--muted); font-size: 12px; }
.theme-related-guides { display: grid; gap: 4px; max-height: 180px; overflow-y: auto; }
.theme-related-guide {
  display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: center; gap: 7px;
  width: 100%; padding: 6px 7px; border: 1px solid var(--line); border-radius: 4px;
  background: var(--panel); color: var(--ink); text-align: left; font-size: 12px;
}
.theme-related-guide time { color: var(--muted); white-space: nowrap; }
.theme-related-empty { margin: 0; padding: 8px 0; color: var(--muted); font-size: 12px; }
.form-actions, .file-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 6px; }
.dc-export-panel {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.dc-export-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 8px;
}
.dc-export-controls label {
  display: grid;
  gap: 5px;
  font-size: 12px;
  color: var(--muted);
}
.dc-export-envs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  min-height: 34px;
  margin: 0;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
}
.dc-export-envs legend {
  padding: 0 4px;
  color: var(--muted);
  font-size: 12px;
}
.dc-export-envs label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--ink);
}
.dc-export-envs input {
  width: 14px;
  height: 14px;
}
.dc-export-controls select,
.dc-export-controls input {
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 6px 8px;
  background: #fff;
  color: var(--ink);
}
.dc-export-link { min-width: min(100%, 360px); flex: 1 1 280px; }
.dc-export-output {
  width: 100%;
  min-height: 260px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px;
  background: #fff;
  color: var(--ink);
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
}
.unsaved-note { align-self: center; color: #b44529; font-size: 13px; font-weight: 700; }
.dark-mode .unsaved-note { color: #ffb78c; }
.file-button { position: relative; display: inline-flex; align-items: center; cursor: pointer; }
.file-button input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.hidden-file-input { position: fixed; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.admin-footer { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; border-top: 1px solid var(--line); padding: 7px 18px; }
.admin-status { flex: 1; min-width: 0; margin: 0; color: var(--muted); }
.admin-footer-actions { display: flex; align-items: center; gap: 8px; }
.admin-footer-actions[hidden] { display: none; }
.dark-mode .query-box,
.dark-mode .date-inputs input,
.dark-mode .suggestions,
.dark-mode .suggestion,
.dark-mode .category-button,
.dark-mode .theme-search input,
.dark-mode .sort-control select,
.dark-mode .sort-control button,
.dark-mode .content-tab.is-active,
.dark-mode .page-button,
.dark-mode .page-position input,
.dark-mode .page-size select,
.dark-mode .scroll-top-button,
.dark-mode .url-field,
.dark-mode .copy-button,
.dark-mode .quiet-button,
.dark-mode .mini-button,
.dark-mode .danger-button,
.dark-mode .file-button,
.dark-mode .select-list select,
.dark-mode .select-list input,
.dark-mode .edit-form input,
.dark-mode .edit-form select,
.dark-mode .dc-export-controls select,
.dark-mode .dc-export-controls input,
.dark-mode .dc-export-output,
.dark-mode .dc-export-envs {
  background: #202a32;
  color: var(--ink);
}
.dark-mode .theme-related-guide { background: #202a32; color: var(--ink); }
.dark-mode .suggestion:hover, .dark-mode .suggestion:focus, .dark-mode .suggestion.is-active { background: #2b363e; }
.dark-mode .suggestion-theme:hover, .dark-mode .suggestion-theme:focus, .dark-mode .suggestion-theme.is-active { filter: brightness(1.08); }
.dark-mode .theme-button.is-active { box-shadow: inset 0 0 0 2px #f0f5f8; }
.dark-mode .theme-sidebar, .dark-mode .guide-card, .dark-mode .empty, .dark-mode .admin-dialog { background: var(--panel); }
.dark-mode .dialog-header, .dark-mode .admin-tabs { background: var(--panel); }
.dark-mode .admin-tab.is-active { background: var(--panel); color: var(--ink); border-bottom-color: var(--panel); }
.compact-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
}
.compact-list .guide-card {
  height: 46px;
  min-height: 46px;
  border-width: 1px;
}
.compact-list .card-background, .compact-list .guide-card::after, .compact-list .url-row { display: none; }
.compact-list .card-link-area {
  display: grid;
  grid-template-columns: auto auto minmax(120px, 1fr) max-content;
  align-items: center;
  gap: 8px;
  padding: 6px 9px;
}
.compact-list .card-badges { display: contents; }
.compact-list .env-badge { grid-column: 1; min-height: 28px; justify-self: start; }
.compact-list .theme-badge { min-height: 28px; white-space: nowrap; }
.compact-list .card-badges {
  grid-column: 1 / 3;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 5px;
}
.compact-list .extra-theme-badge { display: none; }
.compact-list .themes-expanded .card-badges { flex-wrap: wrap; }
.compact-list .themes-expanded .extra-theme-badge { display: inline-flex; }
.compact-list .theme-expand-button {
  display: inline-flex; align-items: center; flex: none; min-height: 28px; padding: 3px 7px; border: 1px solid var(--line);
  border-radius: 4px; background: var(--panel); color: var(--ink); font-size: 12px;
}
.compact-list .themes-expanded.guide-card { height: auto; min-height: 46px; }
.compact-list .guide-title {
  grid-column: 3; margin: 0; font-size: 17px; line-height: 1.3; align-self: center;
  display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.compact-list .card-bottom { display: contents; }
.compact-list .date-row { grid-column: 4; justify-content: end; }
.compact-list .date-chip { min-height: 27px; padding: 4px 7px; }
@media (max-width: 1180px) {
  .result-header { grid-template-columns: 1fr auto; }
  .result-header .pagination { grid-column: 1 / -1; grid-row: 2; }
}
@media (max-width: 1020px) {
  .filter-panel { grid-template-columns: 1fr; gap: 12px; }
  .theme-sidebar { top: 282px; }
  .tick-label.july { display: none; }
  .guide-grid:not(.compact-list) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
}
@media (max-width: 780px) {
  .page { width: calc(100% - 20px); }
  h1 { font-size: 20px; }
  .topbar { position: static; }
  .top-layout { gap: 9px; }
  .filter-panel {
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 8px;
    align-items: stretch;
  }
  .searchbox { grid-column: 1 / -1; }
  .query-box {
    overflow: hidden;
  }
  .query-box { min-width: 0; }
  .selected-theme-bar { max-width: 100%; }
  .selected-theme-bar .theme-token {
    min-height: 25px;
    padding: 1px 6px;
  }
  .mobile-filter-open, .top-filter-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
  }
  .mobile-filter-open.has-theme-filter {
    border-color: var(--focus);
    background: var(--focus);
    color: #fff;
  }
  .top-filter-extra {
    grid-column: 1 / -1;
  }
  .topbar.filters-collapsed .top-filter-extra {
    display: none;
  }
  .date-filter .filter-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }
  .date-inputs {
    align-self: flex-start;
  }
  .date-filter .range-wrap {
    display: none;
  }
  .app-layout { display: block; }
  .theme-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 60;
    width: min(86vw, 340px);
    height: 100dvh;
    max-height: none;
    margin: 0;
    border-radius: 0;
    border-top: 0;
    border-bottom: 0;
    transform: translateX(-104%);
    transition: transform .18s ease;
    grid-template-rows: auto auto auto auto minmax(0, 1fr);
    box-shadow: 10px 0 24px rgba(20, 30, 40, .20);
  }
  body.mobile-filter-open .theme-sidebar {
    transform: translateX(0);
  }
  .mobile-filter-close {
    display: inline-flex;
  }
  .sidebar-selected-theme-bar {
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 5px;
    padding: 0 10px 10px;
    border-bottom: 1px solid var(--line);
  }
  .sidebar-selected-theme-bar:empty {
    display: none;
  }
  .mobile-filter-backdrop {
    position: fixed;
    inset: 0;
    z-index: 55;
    border: 0;
    background: rgba(10, 16, 22, .42);
  }
  body:not(.mobile-filter-open) .mobile-filter-backdrop {
    display: none;
  }
  body.mobile-filter-open .mobile-filter-backdrop {
    display: block;
  }
  .theme-buttons {
    max-height: none;
    min-height: 0;
    overflow-y: auto;
  }
  .guide-grid:not(.compact-list) {
    grid-template-columns: 1fr;
  }
  .guide-grid.compact-list { grid-template-columns: 1fr; }
  .result-header { grid-template-columns: 1fr; }
  .result-header .pagination { grid-column: auto; grid-row: auto; }
  .result-tools { justify-content: space-between; }
  .pagination { order: 3; flex-wrap: wrap; }
  .admin-split { grid-template-columns: 1fr; }
  .admin-footer { flex-direction: column; align-items: stretch; }
  .admin-footer-actions { justify-content: flex-end; flex-wrap: wrap; }
}
@media (max-width: 430px) {
  .date-inputs input { width: calc(50vw - 26px); }
  .guide-title { font-size: 17px; }
  .guide-card { height: 184px; }
  .card-link-area { padding: 8px; }
  .env-badge, .theme-badge { min-height: 25px; padding: 2px 7px; font-size: 11px; }
  .guide-title { font-size: 14px; }
  .compact-list .card-link-area { grid-template-columns: auto auto minmax(96px, 1fr) max-content; gap: 4px; padding: 5px; }
  .compact-list .env-badge, .compact-list .theme-badge { font-size: 10px; padding: 2px 5px; }
  .compact-list .guide-title { font-size: 15px; }
  .compact-list .date-chip { font-size: 11px; }
}
@media (max-width: 470px) {
  .compact-list .card-link-area { grid-template-columns: auto auto minmax(106px, 1fr) max-content; }
  .compact-list .card-badges { overflow: hidden; }
  .compact-list .themes-expanded .card-badges { overflow: visible; }
  .compact-list .theme-badge { max-width: 84px; overflow: hidden; text-overflow: ellipsis; }
}
@media (max-width: 360px) {
  .guide-grid:not(.compact-list) { grid-template-columns: 1fr; }
}
