/* The bird log's page (index.html, home.js), drawn like North's bird log: its frame, surface, rules and fonts, which
   the game's export brings (build/art). */
@font-face { font-family: Cinzel; font-weight: 400; src: url(/stage/build/art/Cinzel-Regular.ttf); font-display: swap; }
@font-face { font-family: Cinzel; font-weight: 700; src: url(/stage/build/art/Cinzel-Bold.ttf); font-display: swap; }
:root {
  --title: #c9a06a; --text: #bfa582; --dim: #8c7758; --bright: #ecd3a6; --gold: #ffe2a8; --ground: #0d0a08;
  --line: rgba(191, 165, 130, .16); --live: #8fd37f;
}
* { box-sizing: border-box; }
html { background: var(--ground); }
body { margin: 0 auto; max-width: 1560px; padding: 28px 22px 60px; color: var(--text); font: 15px/1.35 Cinzel, Georgia, serif;
       background: radial-gradient(ellipse 90% 520px at 50% 0, rgba(201, 160, 106, .09), transparent); }
a { color: inherit; text-decoration: none; cursor: pointer; }
a:hover { color: var(--gold); }

/* A title between two rules that end in a diamond. */
.title { display: flex; align-items: center; gap: 16px; }
.title h1, .title h2 { margin: 0; font-weight: 700; color: var(--title); letter-spacing: .1em; white-space: nowrap;
                       text-shadow: 0 2px 3px rgba(0, 0, 0, .7); }
.title h1 { font-size: 34px; }
.title h2 { font-size: 19px; }
.rule { flex: 1; height: 2px; position: relative; background: url(/stage/build/art/inventory_line.png) center / 100% 100%; }
.rule::after { content: ""; position: absolute; top: 50%; right: -2px; width: 9px; height: 9px; transform: translateY(-50%);
               background: url(/stage/build/art/inventory_diamond.png) center / contain no-repeat; image-rendering: pixelated; }
.rule.right { transform: scaleX(-1); }

#live { min-height: 22px; margin-top: 8px; text-align: center; font-size: 13px; letter-spacing: .12em; color: var(--dim); }
#live a { color: var(--live); margin-left: 12px; }
#live a::before, .live::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%;
                                 background: var(--live); box-shadow: 0 0 6px var(--live); vertical-align: 1px; }

#filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center; margin: 18px 0 6px; }
select, input, button { font: inherit; font-size: 14px; color: var(--bright); background: rgba(24, 19, 14, .92); padding: 6px 12px;
                        border: 1px solid rgba(201, 160, 106, .45); border-radius: 3px; outline: none; }
select:hover, input:hover, button:hover, select:focus, input:focus { border-color: var(--gold); }
select option { background: #18130e; }
input::placeholder { color: var(--dim); }
button { cursor: pointer; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 5px 10px 5px 12px; margin-left: 2px; font-size: 14px; color: #1a140e;
        background: var(--title); border-radius: 3px; font-weight: 700; }
.chip:hover { color: #1a140e; background: var(--gold); }
.chip::after { content: "×"; font-size: 16px; line-height: 1; }

#totals { display: flex; flex-wrap: wrap; justify-content: center; margin: 22px 0 26px; }
.total { padding: 0 34px; text-align: center; border-left: 1px solid var(--line); }
.total:first-child { border-left: none; }
.total b { display: block; font-size: 38px; line-height: 1.1; color: var(--gold); text-shadow: 0 0 18px rgba(255, 200, 110, .3); font-variant-numeric: tabular-nums; }
.total span { font-size: 12px; letter-spacing: .16em; color: var(--dim); text-transform: uppercase; }

main { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; align-items: start; }
/* The surface lies inside the frame, which is drawn over its edge. */
.panel { position: relative; padding: 30px 34px 34px; min-width: 0; }
.panel::before { content: ""; position: absolute; inset: 5px; z-index: -2; border-radius: 10px;
                 background: #18130e url(/stage/build/art/inventory_surface.png) center / 100% 100%; box-shadow: 0 10px 26px rgba(0, 0, 0, .55); }
.panel::after { content: ""; position: absolute; inset: 0; z-index: -1; border: 40px solid transparent; pointer-events: none;
                border-image: url(/stage/build/art/inventory_frame.png) 89 / 40px stretch; }
.panel .title { margin-bottom: 14px; }
main .panel { z-index: 0; }
.wide { grid-column: 1 / -1; }
.stack { display: grid; gap: 22px; min-width: 0; }

/* A table: rows of cells in the columns its --columns names. */
.rows { overflow-x: auto; }
.row { display: grid; grid-template-columns: var(--columns); column-gap: 14px; align-items: baseline; padding: 6px 8px;
       border-bottom: 1px solid var(--line); white-space: nowrap; }
.row:last-child { border-bottom: none; }
.row > * { overflow: hidden; text-overflow: ellipsis; }
.row.head { font-size: 11px; letter-spacing: .14em; color: var(--dim); text-transform: uppercase; border-bottom-color: rgba(191, 165, 130, .3); }
.row:not(.head):hover { background: rgba(255, 226, 168, .05); }
.row.chosen { background: rgba(201, 160, 106, .16); }
.number { text-align: right; font-variant-numeric: tabular-nums; }
.rank { text-align: right; font-weight: 700; color: var(--dim); }
.who { color: var(--bright); }
.when, .where { color: var(--dim); font-size: 13px; }
.bird { font-weight: 700; text-shadow: 0 1px 2px rgba(0, 0, 0, .8); }
.rarity { font-size: 12px; letter-spacing: .06em; }
.night { margin-left: 6px; color: var(--dim); font-family: serif; }
.top .rank { color: var(--title); }
.first .who, .first .rank { color: var(--gold); text-shadow: 0 0 12px rgba(255, 200, 110, .45); }
.empty { text-align: center; color: var(--dim); padding: 18px 0 6px; margin: 0; }

#more { display: block; margin: 14px auto 0; }
#more[hidden] { display: none; }
#note { text-align: center; color: var(--dim); min-height: 20px; margin: 26px 0 0; }

@media (max-width: 1100px) { main { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) {
  body { padding: 18px 8px 40px; font-size: 14px; }
  .title h1 { font-size: 26px; }
  .panel { padding: 24px 20px 26px; }
  .panel::after { border-width: 30px; border-image-width: 30px; }
  .total { padding: 0 16px; }
  .total b { font-size: 28px; }
}
