/* Drawn with the game's own UI pieces (data/ui, as the journal site is): the quest log's frame and
   page, its filigree, the gold-and-red buttons, the red gem button (the "i"), the red close button,
   the search box's border, the minimal checkbox, the bronze ring, and the gauntlet cursor. */
:root {
  color-scheme: dark;
  --ink: #050403; --text: #f1e5c8; --muted: #b8a27a; --gold: #ffd100; --good: #9ee07a; --bad: #ff7b6b;
  --font-body: "EB Garamond", Georgia, "Times New Roman", serif;
  --font-title: "Cinzel", "Trajan Pro", Georgia, serif;
  --cur-point: image-set(url(/ui/cursor-point.webp) 1x, url(/ui/cursor-point@2x.webp) 2x) 0 0, default;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, a, button, label, summary { cursor: var(--cur-point); }
input[type="password"], input[type="text"] { cursor: text; }
body {
  margin: 0; min-height: 100vh; display: grid; place-items: center; padding: 24px 16px;
  background: radial-gradient(ellipse at 50% 30%, #241a10, var(--ink) 70%) fixed;
  color: var(--text); font: 18px/1.45 var(--font-body); -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; color: inherit; }
a { color: var(--gold); }
code { font-size: .85em; background: #0008; padding: 1px 5px; border-radius: 3px; }

/* The quest log's frame round its page. */
.frame {
  border: 11px solid transparent; border-image: url(/ui/questlog-frame.webp) 22 / 11px / 0 round;
  background: url(/ui/questlog-main-background.webp) 50% 0 / 100% auto, #0b0806;
  box-shadow: 0 14px 40px #000d;
}
main.frame { width: min(600px, 100%); padding: 18px 22px 22px; }

header { display: flex; align-items: center; gap: 14px; }
.ring { position: relative; flex: none; width: 64px; height: 64px; }
.ring::after { content: ""; position: absolute; inset: -6px; background: url(/ui/profession-ring-frame-c60-2x.webp) 0 0 / 100% 100%; }
.ring img { width: 100%; height: 100%; border-radius: 50%; display: block; }
h1 { flex: 1; margin: 0; font: 700 23px/1.1 var(--font-title); color: var(--gold); text-shadow: 0 1px 2px #000; letter-spacing: .02em; }
h1 small { display: block; font-size: 14px; color: var(--muted); letter-spacing: .12em; text-transform: uppercase; margin-top: 3px; }
.filigree { display: block; width: 96px; margin: 10px auto 4px; opacity: .9; }

/* One row a step: its name, what to do, its "i". */
.step {
  display: grid; grid-template-columns: 104px 1fr auto; align-items: center; gap: 4px 12px;
  padding: 14px 2px; border-top: 1px solid #ffd10026;
}
.step:first-of-type { border-top: 0; }
h2 { margin: 0; font: 700 14px/1.2 var(--font-title); color: var(--gold); letter-spacing: .04em; text-shadow: 0 1px 1px #000; }
.body { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-width: 0; }
.state { color: var(--muted); font-size: 16px; }
.msg { grid-column: 2 / -1; margin: 0; font-size: 16px; }
.msg:empty { display: none; }
.good { color: var(--good); }
.bad { color: var(--bad); }
.note { margin: 6px 0; color: var(--muted); font-size: 16px; text-align: center; }
.log { grid-column: 2 / -1; margin: 0; padding-left: 18px; color: var(--muted); font-size: 15px; }
.log:empty { display: none; }

/* The gold-and-red button. */
.wow-btn {
  --h: 30px; position: relative; isolation: isolate; display: inline-flex; align-items: center; justify-content: center;
  height: var(--h); min-width: 86px; padding: 0 1.2em; border: 0; white-space: nowrap; user-select: none; text-decoration: none;
  font: 700 13px var(--font-title); letter-spacing: .03em; color: var(--gold); text-shadow: 0 1px 1px #000, 0 0 3px #000;
  background: url(/ui/128-goldredbutton-left.webp) left center / auto 100% no-repeat,
              url(/ui/128-goldredbutton-right.webp) right center / auto 100% no-repeat;
}
.wow-btn::before { content: ""; position: absolute; z-index: -1; inset: 0 calc(var(--h) * .4);
  background: url(/ui/128-goldredbutton-center.webp) center / auto 100% repeat-x; }
.wow-btn:active:not(:disabled) { background-image: url(/ui/128-goldredbutton-left-pressed.webp), url(/ui/128-goldredbutton-right-pressed.webp); }
.wow-btn:active:not(:disabled)::before { background-image: url(/ui/128-goldredbutton-center-pressed.webp); }
.wow-btn:disabled { color: #8a8a8a;
  background-image: url(/ui/128-goldredbutton-left-disabled.webp), url(/ui/128-goldredbutton-right-disabled.webp); }
.wow-btn:disabled::before { background-image: url(/ui/128-goldredbutton-center-disabled.webp); }
@media (hover: hover) { .wow-btn:not(:disabled):hover { filter: brightness(1.25); color: #fff; } }

/* The "i": the red gem button. */
.info {
  width: 30px; height: 30px; padding: 0 0 1px; border: 0; flex: none;
  background: url(/ui/128-redbutton-blank.webp) 0 0 / 100% 100%;
  font: 700 18px/1 var(--font-body); color: #ffe88a; text-shadow: 0 0 3px #000, 0 1px 1px #000;
  filter: drop-shadow(0 1px 1px #000c);
}
.info:active { background-image: url(/ui/128-redbutton-blank-pressed.webp); }
@media (hover: hover) { .info:hover { filter: brightness(1.25) drop-shadow(0 1px 1px #000c); } }

/* The search box's border round the passphrase. */
.field { display: inline-flex; height: 30px; width: 140px; padding: 0 12px;
  background: url(/ui/common-search-border-left-c60.webp) left center / auto 100% no-repeat,
              url(/ui/common-search-border-right-c60.webp) right center / auto 100% no-repeat,
              url(/ui/common-search-border-middle-c60.webp) center / calc(100% - 12px) 100% no-repeat; }
.field input { width: 100%; border: 0; outline: 0; background: transparent; font-size: 16px; }
.field input::placeholder { color: #8f8068; }
.field:focus-within { filter: brightness(1.3); }

/* The minimal checkbox. */
.check { display: inline-flex; align-items: center; gap: 6px; font-size: 16px; color: var(--muted); user-select: none; }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check i { width: 20px; height: 20px; flex: none; background: url(/ui/checkbox-minimal.webp) 0 0 / 100% 100%; }
.check input:checked + i { background-image: url(/ui/checkmark-minimal.webp); }
.check input:focus-visible + i { outline: 1px solid var(--gold); }

/* The pop-up: the same frame, closed with the red X. */
dialog.frame { width: min(420px, calc(100% - 32px)); padding: 16px 20px 14px; color: var(--text); }
dialog::backdrop { background: #000a; }
dialog h3 { margin: 0 30px 8px 0; font: 700 17px/1.2 var(--font-title); color: var(--gold); text-shadow: 0 1px 1px #000; }
dialog p { margin: 0 0 10px; font-size: 17px; }
.close { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; border: 0; padding: 0;
  background: url(/ui/redbutton-exit-c60-2x.webp) 0 0 / 100% 100%; filter: drop-shadow(0 1px 1px #000c); }
.close:active { background-image: url(/ui/redbutton-exit-pressed-c60-2x.webp); }
@media (hover: hover) { .close:hover { filter: brightness(1.25) drop-shadow(0 1px 1px #000c); } }
.inline-link { color: var(--gold); text-decoration: underline; }

@media (max-width: 480px) {
  .step { grid-template-columns: 1fr auto; }
  .step h2 { grid-column: 1; }
  .step .info { grid-column: 2; grid-row: 1; }
  .body, .msg, .log { grid-column: 1 / -1; }
}
