/* Legacy table attributes follow the active site or wiki palette. */
tr[bgcolor="#D4C0A1" i], tr[style*="#D4C0A1" i] { background-color: var(--surface) !important; }
tr[bgcolor="#F1E0C6" i], tr[style*="#F1E0C6" i], td[style*="#E7D1AF" i] { background-color: var(--surface-2) !important; }
/* the account page and the other pages that once had sheets of their own: the kit's pieces and these few rules */
.account-page .view[hidden] { display: none; }
.account-page .panelgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.account-page .codes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; font-family: Consolas, monospace; }
.account-page .codes span { border: 1px dashed var(--line-strong); padding: 6px 10px; text-align: center; }
.account-page #qr { display: grid; place-items: center; padding: 10px; background: #fff; width: max-content; }
.account-nav { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.account-nav button { padding: 7px 12px; border: 1px solid var(--line); background: var(--surface2); font-size: .85rem; }
.account-nav button[aria-pressed="true"] { border-color: var(--gold); color: var(--gold); }
.dl-cards { display: flex; flex-wrap: wrap; gap: 14px; margin: 10px 0; }
.dl-card { flex: 1 1 300px; min-width: 0; padding: 16px; border: 1px solid var(--line); background: var(--surface); text-align: center; }
.dl-card .TableContentContainer { text-align: left; }
.dl-name { margin: 6px 0 2px; font-size: 1.05rem; }
.dl-sub { color: var(--muted); font-size: .85rem; }
.dl-features { columns: 2; column-gap: 24px; } .dl-features li { break-inside: avoid; }
.updates-intro h2 { margin-top: 0; }
.character-row { display: flex; align-items: center; gap: 10px; }


/* ---------- buttons ---------- */
.button, .compat-btn, .BigButton { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 42px; padding: 10px 20px; border: 1px solid #776749; border-radius: var(--radius); background: var(--surface-2); color: var(--text); font: 600 .875rem var(--ui); text-decoration: none; white-space: nowrap; cursor: pointer; transition: background .18s, border-color .18s, color .18s; }
.button:hover, .compat-btn:hover, .BigButton:hover { background: #23262b; border-color: var(--gold); color: var(--text); text-decoration: none; }
.button.primary, .compat-btn.gold, .BigButton.is-green, .BigButton.is-blue { color: var(--gold-ink); background: linear-gradient(120deg, #d7bd83, #b69b63); border-color: #ddc68e; box-shadow: inset 0 0 0 2px #c3aa74; }
.button.primary:hover, .compat-btn.gold:hover, .BigButton.is-green:hover, .BigButton.is-blue:hover { background: #e2c990; color: var(--gold-ink); }
.button.small { min-height: 36px; padding: 7px 14px; font-size: .8125rem; }
.compat-btn.danger, .BigButton.is-red { border-color: #7a3f36; background: #2b1a17; color: #f0c5bd; }
.compat-btn.danger:hover, .BigButton.is-red:hover { background: #3a221e; border-color: var(--red); }
.BigButton { padding: 0; }
.BigButton > div { display: contents; }
.BigButton .BigButtonText { all: unset; display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 20px; width: 100%; cursor: pointer; color: inherit; font: inherit; text-align: center; }
.BigButton:focus-within { outline: 2px solid var(--gold); outline-offset: 3px; }
.BigButton.is-disabled, .BigButton:has(> div > .BigButtonText:disabled) { opacity: .5; pointer-events: none; }
.BigButton:has(> div > .BigButtonText[hidden]) { display: none; }
.text-link { color: var(--gold); font-size: .875rem; }

/* ---------- forms ---------- */
input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]), select, textarea { display: inline-block; width: 100%; max-width: 420px; padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--ground); color: var(--text); min-height: 40px; }
input::placeholder, textarea::placeholder { color: var(--muted); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; border-color: var(--gold); }
textarea { max-width: 100%; min-height: 110px; resize: vertical; }
input[aria-invalid="true"] { border-color: var(--red); }
label { color: var(--text-soft); }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin: 0 0 14px; }
legend { padding: 0 6px; color: var(--gold); font-weight: 600; }
.field { margin: 0 0 14px; }
.field > label, .field td.LabelV150 label, .LabelV, .LabelV120, .LabelV150, .LabelV175 { font-weight: 600; color: var(--text-soft); }
.field small { display: block; margin-top: 4px; }
.password-wrap { position: relative; display: inline-block; width: 100%; max-width: 420px; }
.password-wrap input { width: 100%; max-width: 100%; padding-right: 76px; }
.password-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); min-height: 28px; padding: 2px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface2); font-size: .75rem; }
.pw-rules { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 3px; font-size: .8125rem; color: var(--muted); }
.pw-rules li::before { content: "○ "; }
.pw-rules li[data-ok="true"] { color: var(--green); }
.pw-rules li[data-ok="true"]::before { content: "✓ "; font-weight: 700; }
.msg { margin: 8px 0; padding: 10px 14px; border: 1px solid var(--line); border-left-width: 3px; border-radius: var(--radius); background: var(--surface2); font-size: .9rem; }
.msg.err { border-left-color: var(--red); color: #f0c5bd; }
.msg.ok { border-left-color: var(--green); color: #cfe5d5; }
.notice { border-left: 2px solid var(--gold); padding: 14px 18px; background: var(--surface-2); font-size: .9rem; color: var(--text-soft); line-height: 1.65; margin: 0 0 20px; }
.status-line { font-size: .9rem; color: var(--text-soft); }
.eyebrow { display: block; font: 600 .75rem/1.4 var(--ui); letter-spacing: .17em; text-transform: uppercase; color: var(--gold); margin-bottom: 12px; }
.meta { font-size: .7rem; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.caption { font-size: .8125rem; color: var(--muted); line-height: 1.6; }
.mono { font-family: Consolas, "DM Mono", monospace; font-size: .9em; }


/* ---------- kit: boxes, tables, lists ---------- */

.TableContainer { margin: 0 0 22px; border: 1px solid var(--line); background: var(--surface2); }
.TableContainer.Captionless { border-top-width: 1px; }
.CaptionContainer { background: linear-gradient(95deg, #23262b, #16171a); border-bottom: 1px solid var(--line-gold); }
.CaptionInnerContainer .Text { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 11px 16px; margin: 0; font: 500 1.05rem var(--title); color: var(--gold); }
.CaptionInnerContainer .Text .RightArea { font: 500 .78rem var(--ui); color: var(--muted); letter-spacing: .04em; }
.TableContainer > table { width: 100%; border-collapse: collapse; }
.TableContainer > table > tbody > tr > td { padding: 0; }
.InnerTableContainer { padding: 14px 16px; }
.InnerTableContainer > table { width: 100%; border-collapse: collapse; }
.InnerTableContainer > table > tbody > tr > td { padding: 4px 4px; vertical-align: top; }
.TableContentContainer { margin: 4px 0 8px; border: 1px solid var(--line); background: var(--surface); overflow-x: auto; }
table.TableContent { width: 100%; border-collapse: collapse; font-size: .875rem; }
table.TableContent td, table.TableContent th { padding: 9px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: top; text-align: left; }
table.TableContent tr.LabelH td, table.TableContent th { background: var(--ground); color: var(--muted); font-size: .74rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
table.TableContent tr.Even td { background: var(--surface-2); }
table.TableContent tr.Odd td { background: transparent; }
table.TableContent tbody tr:not(.LabelH):hover td { background: #23262b; }
table.TableContent td.LabelV, table.TableContent td.LabelV120, table.TableContent td.LabelV150, table.TableContent td.LabelV175 { color: var(--text-soft); font-weight: 600; white-space: nowrap; width: 1%; }
table.TableContent td a { color: var(--gold); }
.DoNotBreak { white-space: nowrap; }
.PageNavigation { padding: 6px 0; }
.PageNavigation small { display: flex; justify-content: space-between; gap: 16px; font-size: .8rem; color: var(--muted); }
.PageNavigation .PageLink a, .PageNavigation .CurrentPageLink { display: inline-block; min-width: 24px; padding: 2px 6px; text-align: center; border: 1px solid var(--line); border-radius: var(--radius); }
.PageNavigation .CurrentPageLink { border-color: var(--gold); color: var(--gold); }
.ThreeColumnsForm { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.ThreeColumnsFormInputCell { flex: 1 1 240px; }
.ThreeColumnsFormInputCell input { max-width: 100%; }
.Odd, .Even { }
.kv { display: table; width: 100%; border-collapse: collapse; }
.kv > div { display: table-row; }
.kv > div:nth-child(even) > span { background: var(--surface-2); }
.kv > div > span { display: table-cell; padding: 8px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; font-size: .875rem; }
.kv > div > span:first-child { width: 180px; font-weight: 600; color: var(--text-soft); }

/* ---------- news archive, documents ---------- */
.NewsHeadline { display: flex; align-items: baseline; gap: 12px; margin: 0 0 6px; }
.NewsHeadlineDate { font-size: .78rem; color: var(--muted); }
.NewsHeadlineText { font: 500 1.2rem var(--title); color: var(--text); }
.OtNews { padding: 18px 0; border-bottom: 1px solid var(--line); }
.OtNews:last-child { border-bottom: 0; }
.OtNews p { font-size: .9rem; }
.OtNewsMore, .cl-links { font-size: .85rem; }
.cl-links a + a { margin-left: 14px; }
.OtDropCap { font: 500 1.6rem/1 var(--title); color: var(--gold); margin-right: 2px; }

/* ---------- guilds ---------- */
.guild-logo-empty { display: inline-grid; place-items: center; width: 64px; height: 64px; border: 1px solid var(--line-gold); background: var(--surface-2); color: var(--gold); font: 500 1.8rem var(--title); }
.OtMostrar { padding: 1px 8px; margin-left: 6px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface2); font-size: .75rem; }
.green, .ColorGreen { color: var(--green); } .red, .ColorRed { color: var(--red); }

/* ---------- sprites (sprites.js) ---------- */
.outfit-slot { display: inline-grid; place-items: end; width: 64px; height: 64px; }
.sprite { image-rendering: pixelated; display: block; margin: 0 auto; overflow: hidden; flex: none; }
.sprite > i { display: block; height: 100%; width: calc(var(--frames, 1) * 100%); background-repeat: no-repeat; background-size: 100% 100%; }
.sprite-item { width: 32px; height: 32px; object-fit: contain; image-rendering: pixelated; }
.sprite-stage { display: flex; align-items: flex-end; justify-content: center; width: 148px; height: 132px; margin: 4px auto 12px; }
.sprite-stage:empty { display: none; }
.daily-selection .sprite-stage { width: 72px; height: 72px; margin: 0; align-items: center; }
@media (prefers-reduced-motion: no-preference) {
  @keyframes ot-sprite-walk { to { transform: translateX(-100%); } }
  .sprite > i { animation: ot-sprite-walk calc(var(--frames, 1) * 105ms) steps(var(--frames, 1)) infinite; }
}
