.access-granted {
  border-color: rgba(53, 107, 85, .45);
  color: var(--green);
  background: rgba(53, 107, 85, .07);
}

.local-notice {
  margin-top: 22px;
  padding: 14px 16px;
  border: 1px solid #d9b68e;
  background: #fff6e9;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
}

.local-notice[hidden], .access-active[hidden] { display: none; }
.local-notice b, .local-notice span { display: block; }
.local-notice b { font-size: 12px; }
.local-notice span { color: var(--muted); font-size: 10px; margin-top: 3px; }
.local-notice a { text-decoration: none; white-space: nowrap; }

.source-guide {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 18px;
  margin: 0 0 26px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.source-guide b { font-family: "Songti SC", serif; font-size: 17px; }
.source-guide span { color: var(--muted); font-size: 11px; line-height: 1.7; }

#keyDialog { max-width: 520px; }
#keyDialog form > p:not(.section-no):not(.error) { color: var(--muted); font-size: 12px; line-height: 1.7; }
.access-active { display: grid; gap: 10px; padding: 18px; background: #eef4ef; border: 1px solid rgba(53, 107, 85, .22); margin: 20px 0; }
.access-active b { color: var(--green); }
.access-active span { font-size: 11px; color: var(--muted); }
.access-active button { justify-self: start; }
.text-button { border: 0; background: none; color: var(--accent); padding: 0 0 18px; text-decoration: underline; cursor: pointer; font-size: 11px; }

@media (max-width: 580px) {
  .local-notice { align-items: stretch; flex-direction: column; }
  .local-notice a { text-align: center; }
  .source-guide { grid-template-columns: 1fr; gap: 5px; }
}

.script-import { display: grid; gap: 18px; }
.featured-drop { min-height: 250px; display: grid; place-content: center; gap: 8px; border: 1px solid #9d968b; background: linear-gradient(135deg, rgba(9,47,40,.035), transparent 55%), #f8f6f0; transition: border-color .2s, background .2s, transform .2s; }
.featured-drop:hover, .featured-drop.dragging { border-color: #0b4137; background-color: #f0f5f1; }
.featured-drop.dragging { transform: translateY(-2px); box-shadow: inset 0 0 0 2px rgba(11,65,55,.12); }
.featured-drop.importing { cursor: wait; border-color: #bd9b59; background-color: #f7f2e5; }
.featured-drop.has-files { border-color: rgba(53,107,85,.62); }
.featured-drop.has-error { border-color: rgba(161,63,53,.62); background-color: #fbf2ef; }
.featured-drop .drop-mark { justify-self: center; width: max-content; padding: 6px 9px; background: #0b4137; color: #f3e8c9; font-size: 9px; font-weight: 700; letter-spacing: .14em; }
.import-feedback { display: grid; grid-template-columns: 34px minmax(0,1fr); gap: 12px; align-items: center; min-height: 62px; padding: 12px 14px; border-left: 3px solid #9d968b; background: #f5f2eb; transition: background .2s, border-color .2s; }
.import-feedback .feedback-mark { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid currentColor; border-radius: 50%; color: var(--muted); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.import-feedback b, .import-feedback small { display: block; }
.import-feedback b { font-size: 12px; font-weight: 650; }
.import-feedback small { margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.55; text-wrap: pretty; }
.import-feedback.loading { border-color: #bd9b59; background: #f7f2e5; }
.import-feedback.loading .feedback-mark { animation: feedback-pulse 1s ease-in-out infinite alternate; }
.import-feedback.success { border-color: var(--green); background: #edf4ef; }
.import-feedback.success .feedback-mark, .import-feedback.success b { color: var(--green); }
.import-feedback.warning { border-color: #a87d30; background: #fbf5e8; }
.import-feedback.warning .feedback-mark, .import-feedback.warning b { color: #8a6424; }
.import-feedback.error { border-color: var(--red); background: #fbf0ed; }
.import-feedback.error .feedback-mark, .import-feedback.error b { color: var(--red); }
.file-queue { display: grid; gap: 8px; }
.file-queue .empty { margin: 0; padding: 18px; border: 1px solid var(--line); background: #f5f2eb; }
.file-row { display: grid; grid-template-columns: minmax(0,1fr) auto auto; gap: 14px; align-items: center; padding: 13px 14px; border: 1px solid var(--line); background: #fff; }
.file-row b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: "Songti SC", serif; font-size: 14px; }
.file-row small { color: var(--muted); font-size: 9px; }
.file-row .ready { color: var(--green); font-size: 10px; }
.file-row .invalid { color: var(--red); font-size: 10px; }
.file-row button { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 18px; }
.route-lock { display: grid; gap: 5px; padding: 15px; margin: -7px 0 20px; border-left: 3px solid #0b4137; background: #edf2ed; }
.route-lock b { color: #0b4137; font-size: 11px; }
.route-lock span, #lineDescription { color: var(--muted); font-size: 9px; line-height: 1.65; }
.advanced { margin: 0 0 20px; border-block: 1px solid var(--line); padding: 14px 0; }
.advanced summary { cursor: pointer; font-size: 11px; font-weight: 700; }
.advanced[open] summary { margin-bottom: 18px; }
.comic-preset { border-color: #0b4137 !important; background: #0b3029 !important; color: #f0eadb; }
.comic-preset p { color: #b9c9c1 !important; }
.comic-preset b { color: #f1d634 !important; }

@keyframes feedback-pulse { to { opacity: .45; transform: scale(.9); } }

@media (max-width: 580px) {
  .file-row { grid-template-columns: minmax(0,1fr) auto; }
  .file-row > span { grid-column: 1 / -1; }
  .featured-drop { min-height: 210px; }
}
