:root {
  color-scheme: dark;
  --page: #0e0d12;
  --surface: #18171e;
  --line: #3a3642;
  --text: #f4f0e9;
  --muted: #c9c4ce;
  --gold: #efd389;
  background: var(--page);
  color: var(--text);
  font: 100%/1.6 "Pretendard Variable", Pretendard, system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
a { color: var(--gold); text-underline-offset: .22em; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.guide-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
  padding: .9rem max(1rem, calc((100% - 47rem) / 2));
  border-bottom: 1px solid var(--line);
}
.guide-header a { font-weight: 700; }
.guide-main {
  width: min(47rem, calc(100% - 2rem));
  margin: clamp(1.5rem, 6vw, 4rem) auto 4rem;
}
h1 { margin: .45em 0; line-height: 1.22; font-size: clamp(1.7rem, 5vw, 2.5rem); overflow-wrap: anywhere; }
#guide-status { color: var(--muted); }
#guide-status:empty { display: none; }
.guide-action, select, input, textarea {
  color: inherit;
  font: inherit;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: .5rem;
  min-height: 2.75rem;
  padding: .35rem .65rem;
}
.guide-action {
  display: inline-flex;
  align-items: center;
  color: var(--gold);
  cursor: pointer;
  width: fit-content;
}
.guide-action:disabled { cursor: wait; opacity: .65; }
.guide-list { padding: 0; margin: 1.25rem 0; list-style: none; display: grid; gap: .6rem; }
.guide-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .3rem .8rem;
  border: 1px solid var(--line);
  border-radius: .65rem;
  padding: .65rem .9rem;
  background: var(--surface);
}
.guide-list a { display: inline-flex; align-items: center; min-height: 2.75rem; overflow-wrap: anywhere; }
.guide-tier { color: var(--muted); font-size: .92rem; }
.guide-body { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.75; }
.guide-select { display: flex; align-items: end; flex-wrap: wrap; gap: .8rem; margin-bottom: 1rem; }
.guide-select label { flex: 1 1 12rem; }
#guide-form fieldset { display: grid; gap: .8rem; margin: 0; padding: 1rem; border: 1px solid var(--line); border-radius: .65rem; min-inline-size: 0; }
#guide-editor label { display: grid; gap: .25rem; min-width: 0; }
#guide-editor textarea { resize: vertical; min-height: 7rem; }
#guide-editor .guide-select { margin: 0; }
