:root {
  --ink: #243b4a;
  --link: #267ba8;
  --line: #d7e4e8;
  --paper: #fff;
}

* { box-sizing: border-box; }

html {
  min-height: 100%;
  background: linear-gradient(120deg, #e4f1f4, #f8fbf9 45%, #e7f2ed);
}

body {
  margin: 0;
  padding: 36px 18px;
  color: var(--ink);
  font: 14px/1.55 Arial, Helvetica, sans-serif;
}

.page {
  max-width: 760px;
  margin: auto;
  background: #fffffff0;
  border: 1px solid #ccdce0;
  border-radius: 3px;
  box-shadow: 0 1px 3px #7894a03b, 0 16px 48px #56768021;
}

header {
  padding: 26px 30px 21px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(#fff, #f7fbfb);
}

.site-name {
  color: #1c739d;
  font: 25px Georgia, 'Times New Roman', serif;
  letter-spacing: -0.6px;
  text-decoration: none;
}

.site-name:hover, .source-button:hover { text-decoration: underline; }

header p {
  display: inline;
  margin: 0 0 0 13px;
  padding-left: 13px;
  color: #80929a;
  border-left: 1px solid #c7d9df;
  font-size: 12px;
}

main { padding: 31px 30px 36px; }
.intro { max-width: 585px; }

.intro h1 {
  margin: 0 0 3px;
  color: #304a5c;
  font: 25px Georgia, 'Times New Roman', serif;
}

.intro p { margin: 0; color: #58707d; }

.directory {
  margin-top: 31px;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 2px;
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid #cbdce1;
  background: linear-gradient(#f7fbfc, #e8f2f5);
}

.bar h2 { margin: 0; color: #3c5664; font: bold 13px Arial, sans-serif; }
.bar span { color: #82939a; font-size: 11px; }

.search-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

#search {
  display: block;
  width: calc(100% - 24px);
  margin: 12px;
  padding: 8px 9px;
  color: var(--ink);
  background: #fcfefe;
  border: 1px solid #bacfd7;
  border-radius: 2px;
  outline: none;
  box-shadow: inset 0 1px 2px #d5e0e355;
  font: 13px Arial, sans-serif;
}

#search:focus { border-color: #62a6c4; box-shadow: 0 0 0 2px #bce4f155; }

#scripts {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid #e1ebee;
}

#scripts li {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 10px 12px;
  border-bottom: 1px solid #e1ebee;
}

#scripts li:last-child { border-bottom: 0; }
#scripts li:hover { background: #f3fafc; }

.script-info strong { display: block; color: var(--link); }

.script-info strong::before {
  display: inline-block;
  margin-right: 7px;
  color: #72a6ba;
  content: '>';
}

.script-info span {
  display: block;
  padding-left: 15px;
  color: #81949d;
  font-size: 11px;
}

.script-actions { display: flex; align-items: center; gap: 7px; }

.loadstring-toggle, .source-button, .copy-loadstring {
  padding: 4px 8px;
  color: #376979;
  background: #f7fbfc;
  border: 1px solid #b9d5de;
  border-radius: 2px;
  cursor: pointer;
  font: 11px Arial, sans-serif;
  text-decoration: none;
}

.loadstring-box {
  display: flex;
  align-items: center;
  gap: 12px;
  grid-column: 1 / -1;
  margin-top: -5px;
  padding: 10px;
  background: #f4f9fa;
  border: 1px solid #b9d5de;
  border-radius: 2px;
}

.loadstring-box[hidden] {
  display: none;
}

.loadstring-box code {
  display: block;
  flex: 1;
  overflow-wrap: anywhere;
  color: #415c6c;
  font: 12px/1.5 Consolas, 'Courier New', monospace;
}

.copy-loadstring {
  flex: 0 0 auto;
  color: #fff;
  background: #3b8faf;
  border-color: #317e9b;
}

.token-function { color: #1e809e; font-weight: bold; }
.token-object { color: #577d3a; }
.token-string { color: #a06035; }
.token-punctuation { color: #6d8a97; }
.empty { margin: 14px 12px; color: #768b95; }

.note {
  margin-top: 20px;
  padding: 11px 13px;
  color: #5c7480;
  background: #f5fbfb;
  border-left: 3px solid #8ccbd5;
  font-size: 12px;
}

.note strong { color: #456473; }
.note p { display: inline; margin: 0 0 0 7px; }

footer {
  display: flex;
  justify-content: space-between;
  padding: 15px 30px;
  color: #819399;
  background: #fbfdfd;
  border-top: 1px solid var(--line);
  font-size: 11px;
}

@media (max-width: 560px) {
  body { padding: 12px; }
  .page { border-radius: 0; }
  header { padding: 20px; }
  header p { display: block; margin: 4px 0 0; padding: 0; border: 0; }
  main { padding: 25px 20px; }
  #scripts li { display: block; }
  .script-actions { margin-top: 9px; padding-left: 15px; }
  .loadstring-box { margin-top: 9px; }
  .note p { display: block; margin: 3px 0 0; }
  footer { display: block; padding: 14px 20px; }
  footer span { display: block; }
  .directory { margin-top: 25px; }
}
