/* The Season almanac (almanac-pages.ts): a grid of panes, each one list, most first. Item names
   take the game's quality colours as the rest of the site does; a runeword takes the gold the
   game writes runeword names in. The hour bars are the one figure: games ended by hour of day. */
:root { --q-runeword: #c7b377; }
.q-runeword { color: var(--q-runeword); }

.alm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(440px, 1fr)); gap: 18px; margin-top: 14px; }
/* a pane whose table has four numbers or more takes two columns, so none is cut off */
.alm-grid .pane.al-wide { grid-column: span 2; }
.al-one { margin-top: 14px; }
.al-one table.alm td.nm { width: auto; max-width: 60ch; }
.al-more { margin: 10px 0 0; font-family: var(--display); font-size: 12.5px; letter-spacing: .06em; }
.al-more a { text-decoration: none; color: var(--ink2); }
.al-more a:hover { color: #fff; }

/* The item tooltip: the compendium's card (compendium-pages.ts tipCard, its .ctip rules copied
   from compendium.css so the almanac needs no .cmp wrapper), shown over the table on hover and
   on focus, above the name when there is room and under it otherwise is left to the browser:
   it opens upward from the row, since lists run down the page. */
.al-it { position: relative; display: inline-block; cursor: help; outline: none; }
.al-it > .q-unique, .al-it > .q-set, .al-it > .q-runeword, .al-it > span:first-child { border-bottom: 1px dotted rgba(199, 179, 119, .35); }
.al-it .al-tip { display: none; position: absolute; left: 0; bottom: calc(100% + 6px); z-index: 30; width: max-content; min-width: 220px; max-width: 360px; white-space: normal; pointer-events: none; filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .8)); }
.al-it:hover .al-tip, .al-it:focus .al-tip, .al-it:focus-within .al-tip { display: block; }
.al-tip .ctip { display: block; background: rgba(0, 0, 0, .9); outline: 1px solid rgba(199, 179, 119, .25); padding: 10px 14px 12px; font-family: var(--display); font-size: 14px; line-height: 1.38; text-align: center; letter-spacing: .02em; overflow-wrap: anywhere; }
.al-tip .ctip .l { display: block; }
.al-tip .ctip .nm { font-size: 15.5px; }
.al-tip .ctip .gap { display: block; height: 7px; }
.al-tip .ctip .bk { font-size: 12.5px; letter-spacing: .05em; margin-top: 3px; }
.al-tip .ctip .rng { font-variant-numeric: lining-nums; }
.al-tip .ctip .t-red { color: var(--bad); } .al-tip .ctip .t-purple { color: #c77fe6; }
table.alm tbody tr:first-child .al-it .al-tip, table.alm tbody tr:nth-child(2) .al-it .al-tip, table.alm tbody tr:nth-child(3) .al-it .al-tip { bottom: auto; top: calc(100% + 6px); }
.alm-grid .pane h3 { margin-bottom: 8px; }
/* the panes' captions only: a table cell with .sub stays a cell (as a block it broke each row
   onto lines of its own) */
.alm-grid .pane p.sub { display: block; margin: 10px 0 4px; }
.alm-grid .pane p.sub:first-of-type { margin-top: 0; }
table.alm { min-width: 0; width: 100%; }
/* the name takes what the numbers leave and is cut short with an ellipsis: a cell's max-width alone
   doesn't hold a table in, so a long area name pushed the hours past the pane's frame. max-width 0
   with width 100% makes the name the column that gives way, and the numbers never wrap */
table.alm td.nm { width: 100%; max-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.alm th.r, table.alm td.r, table.alm td.rank { white-space: nowrap; }
/* the item tooltip hangs off the row, not the name: the name's cell clips what overflows it, and a
   box positioned inside that cell was clipped with it */
table.alm tbody tr { position: relative; }
table.alm td.nm .al-it { position: static; }
table.alm td.nm .sub { display: inline; margin: 0 0 0 4px; }
.alm-list { margin: 4px 0 0; font-size: 13.5px; color: var(--ink3); line-height: 1.5; }

.alm-hours { display: grid; grid-template-columns: repeat(24, 1fr); gap: 2px; height: 72px; margin-top: 6px; align-items: end; }
.alm-hour { position: relative; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; }
.alm-hour span { display: block; min-height: 1px; background: var(--golddim); }
.alm-hour:hover span { background: var(--gold); }
.alm-hour i { position: absolute; top: 100%; left: 0; font-style: normal; font-size: 10px; color: var(--ink3); }
.alm-hours + * { margin-top: 18px; }

@media (max-width: 960px) {
  .alm-grid .pane.al-wide { grid-column: auto; }
}
@media (max-width: 560px) {
  .alm-grid { grid-template-columns: minmax(0, 1fr); }
}
