/* ================================================================
   Shared medieval content finish
   ================================================================ */
:root {
  --content-frame-dark: #21150f;
  --content-frame-mid: #704b23;
  --content-frame-gold: #b88936;
  --content-paper: #f1e0c6;
  --content-paper-alt: #d5c0a1;
  --content-wine: #6f1714;
  --content-wine-dark: #3b0d0b;
}

.rank-table,
.character-info-table,
.character-search-results-table,
.guild-table,
.profile-table {
  border: 2px solid var(--content-frame-dark);
  outline: 1px solid var(--content-frame-gold);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.28), 0 3px 8px rgba(55,31,14,.2);
}

.rank-table th,
.character-info-table thead th,
.character-search-results-table thead th,
.guild-table th,
.profile-table th {
  color: #fff0bd;
  background:
    linear-gradient(rgba(255,255,255,.05), rgba(0,0,0,.22)),
    repeating-linear-gradient(90deg, #315934 0, #315934 8px, #17371f 8px, #17371f 16px);
  border-color: #4b321c;
  text-shadow: 1px 1px #160d08;
}

.rank-table tbody tr:nth-child(odd),
.character-search-results-table tbody tr:nth-child(odd) td,
.guild-table tbody tr:nth-child(odd) td,
.profile-table tbody tr:nth-child(odd) td {
  background: var(--content-paper);
}

.rank-table tbody tr:nth-child(even),
.character-search-results-table tbody tr:nth-child(even) td,
.guild-table tbody tr:nth-child(even) td,
.profile-table tbody tr:nth-child(even) td {
  background: var(--content-paper-alt);
}

.rank-table tbody tr:hover,
.character-search-results-table tbody tr:hover td,
.guild-table tbody tr:hover td,
.profile-table tbody tr:hover td {
  background: #faedcf;
}

/* News ticker and article frames */
.news-page {
  text-align: left;
}

.news-ticker {
  margin: 0 0 14px;
  border: 2px solid var(--content-frame-dark);
  outline: 1px solid var(--content-frame-gold);
  background: #ead7b5;
  box-shadow: 0 4px 10px rgba(57,31,14,.22), inset 0 0 12px rgba(91,54,20,.12);
}

.news-ticker-title {
  margin: 0;
  padding: 7px 12px;
  color: #f5da8b;
  background:
    linear-gradient(rgba(255,255,255,.05), rgba(0,0,0,.22)),
    repeating-linear-gradient(90deg, #315934 0, #315934 8px, #17371f 8px, #17371f 16px);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  text-shadow: 1px 2px #100a06;
}

.news-ticker-list {
  margin: 0;
  padding: 5px;
  list-style: none;
}

.news-ticker-entry {
  display: grid;
  grid-template-columns: 88px 18px minmax(0, 1fr) auto;
  min-height: 27px;
  align-items: center;
  gap: 6px;
  padding: 4px 7px;
  border-bottom: 1px solid rgba(91,54,20,.24);
  color: #572800;
  font-size: 13px;
}

.news-ticker-entry:nth-child(odd) { background: var(--content-paper); }
.news-ticker-entry:nth-child(even) { background: var(--content-paper-alt); }
.news-ticker-entry:last-child { border-bottom: 0; }
.news-ticker-entry time { font-size: 12px; white-space: nowrap; }
.news-ticker-entry > span { color: #8a5a21; text-align: center; }
.news-ticker-entry a { overflow: hidden; color: #5a2800; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.news-ticker-entry a:hover { color: #9a1d16; }
.news-ticker-entry small { color: #765a36; font-size: 11px; white-space: nowrap; }

.news-archive {
  display: grid;
  gap: 16px;
}

.news-article {
  overflow: hidden;
  border: 2px solid var(--content-frame-dark);
  outline: 1px solid var(--content-frame-gold);
  background: var(--content-paper);
  box-shadow: 0 5px 12px rgba(57,31,14,.24), inset 0 0 14px rgba(91,54,20,.1);
}

.news-article-header {
  min-height: 34px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  padding: 4px 8px;
  border-bottom: 2px solid #210b09;
  color: #fff1bd;
  background:
    linear-gradient(rgba(255,255,255,.06), rgba(0,0,0,.24)),
    repeating-linear-gradient(135deg, var(--content-wine) 0, var(--content-wine) 9px, #601310 9px, #601310 18px);
  text-shadow: 1px 1px #190806;
}

.news-article-header img {
  width: 25px;
  height: 25px;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(1px 1px 1px #160806);
}

.news-article-header h3 {
  margin: 0;
  color: inherit;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
}

.news-article-header time {
  color: #f1d5ae;
  font-size: 11px;
  white-space: nowrap;
}

.news-article-body {
  padding: 14px;
  color: #572800;
  line-height: 1.55;
}

.news-article:nth-child(even) .news-article-body {
  background: var(--content-paper-alt);
}

.news-article-body > :first-child { margin-top: 0; }
.news-article-body > :last-child { margin-bottom: 0; }
.news-article-body li { margin: 5px 0; }

.news-article-image {
  display: block;
  width: 100%;
  height: auto;
  margin: 12px 0 0;
  border: 1px solid #7b572e;
  background: #24160f;
}

.news-article-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.news-article-action {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border: 2px solid #1b110b;
  border-radius: 3px;
  outline: 1px solid #ae7e31;
  color: #fff1b2;
  background: linear-gradient(#315f35, #12351c);
  font-weight: 700;
  text-decoration: none;
  text-shadow: 1px 1px #100906;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.13), 0 2px 4px rgba(0,0,0,.3);
}

.news-article-action:hover,
.news-article-action:focus-visible {
  color: #fff7cf;
  filter: brightness(1.12);
}

@media (max-width: 700px) {
  .news-ticker-entry {
    grid-template-columns: 72px 15px minmax(0, 1fr);
    font-size: 12px;
  }

  .news-ticker-entry small { display: none; }

  .news-article-header {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .news-article-header time {
    grid-column: 2;
    margin-top: -3px;
  }

  .news-article-body { padding: 12px; }
  .news-article-action { width: 100%; }
}

/* =========================================================
   Final page-specific medieval polish
   Visual only: no API, authentication or gameplay behavior.
   ========================================================= */

/* Rankings ------------------------------------------------ */
body[data-rank-type] main.panel {
  border: 2px solid #20130c;
  outline: 2px ridge #9b7133;
  box-shadow: inset 0 0 0 4px rgba(92, 55, 22, .18), 0 5px 14px rgba(0,0,0,.35);
}

body[data-rank-type] main.panel > h2 {
  margin-bottom: 8px;
  border: 1px solid #0d2412;
  outline: 1px solid #b78838;
  background:
    linear-gradient(rgba(10,52,25,.92), rgba(15,61,28,.95)),
    repeating-linear-gradient(90deg, transparent 0 16px, rgba(255,255,255,.05) 16px 20px);
}

body[data-rank-type] .subtabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
  margin: 10px 0 8px;
}

body[data-rank-type] .subtabs a {
  min-width: 78px;
  padding: 5px 9px;
  border: 1px solid #6e491f;
  border-radius: 2px;
  color: #f7e6c0;
  background: linear-gradient(#56301f, #2d180f);
  text-decoration: none;
  text-shadow: 1px 1px #000;
  box-shadow: inset 0 0 0 1px rgba(231,190,104,.16);
}

body[data-rank-type] .subtabs a:hover,
body[data-rank-type] .subtabs a:focus-visible {
  color: #fff3a5;
  border-color: #c2923e;
  filter: brightness(1.12);
}

body[data-rank-type] #rankStatus {
  margin: 7px auto 10px;
  padding: 6px 10px;
  border-top: 1px solid #c09c63;
  border-bottom: 1px solid #c09c63;
  color: #6b3412;
  font-size: 13px;
}

body[data-rank-type] .rank-table {
  border-bottom: 5px double #5a3519;
  box-shadow: 0 3px 0 #b88b45, 0 7px 12px rgba(54,31,12,.18);
}

body[data-rank-type] .rank-table th:first-child { width: 86px; text-align: center; }
body[data-rank-type] .rank-table td:first-child { text-align: center; font-weight: 800; }
body[data-rank-type] .rank-table tbody tr:nth-child(1) td { background-color: #f3dda0; }
body[data-rank-type] .rank-table tbody tr:nth-child(2) td { background-color: #ddd8cb; }
body[data-rank-type] .rank-table tbody tr:nth-child(3) td { background-color: #dfbc91; }
body[data-rank-type] .rank-table tbody tr:nth-child(-n+3) td:first-child { font-size: 16px; }

.rank-group-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 8px 0 12px;
  padding: 7px;
  border: 1px solid #8b642f;
  background: linear-gradient(#4a2d1c, #28170f);
  box-shadow: inset 0 0 8px rgba(0,0,0,.45);
}

.rank-group-button {
  min-height: 34px;
  padding: 6px 13px;
  border: 2px ridge #a77a37;
  border-radius: 2px;
  background: linear-gradient(#6a4328, #392216);
  color: #f3dfb2;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 14px;
  font-weight: 700;
  text-shadow: 1px 1px #000;
  cursor: pointer;
}

.rank-group-button:hover,
.rank-group-button:focus-visible { background: linear-gradient(#805533, #4b2d1c); }
.rank-group-button.is-selected { color: #fff0a9; background: linear-gradient(#2f6a3b, #12391e); border-color: #d2a84c; }
.rank-group-button.rank-group-banned.is-selected { background: linear-gradient(#8b2929, #4b1515); }
.rank-group-button.rank-group-gm.is-selected { background: linear-gradient(#80621b, #49360e); }
.rank-group-button.rank-group-tester.is-selected { background: linear-gradient(#65428a, #35224c); }

.rank-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 14px 0 4px;
}

.rank-pagination[hidden] { display: none; }

.rank-page-button {
  min-width: 36px;
  min-height: 34px;
  padding: 5px 10px;
  border: 1px solid #67431f;
  border-radius: 3px;
  color: #f9e7b2;
  background: linear-gradient(#805533, #4b2d1c);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 2px 0 rgba(55,25,5,.35);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.rank-page-button:hover,
.rank-page-button:focus-visible { filter: brightness(1.16); }
.rank-page-button.is-selected {
  color: #fff0a9;
  border-color: #d2a84c;
  background: linear-gradient(#2f6a3b, #12391e);
}
.rank-page-button:disabled { cursor: default; opacity: .58; }

.rank-role-badge {
  display: inline-block;
  margin-left: 5px;
  padding: 2px 6px;
  border: 1px solid rgba(0,0,0,.45);
  border-radius: 3px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
  text-decoration: none;
  text-shadow: 1px 1px rgba(0,0,0,.75);
  vertical-align: middle;
}

.rank-role-badge.is-banned { background: #b63b36; }
.rank-role-badge.is-gm { background: #2876a7; }
.rank-role-badge.is-creator { color: #281701; background: linear-gradient(#ffe477, #d79b1f); text-shadow: none; }
.rank-role-badge.is-tester { background: #7250a0; }

/* Characters --------------------------------------------- */
.character-search-page .character-card {
  margin-bottom: 18px;
  padding: 8px;
  border: 2px solid #29180e;
  outline: 2px ridge #9c7238;
  background: #d5bd96;
  box-shadow: inset 0 0 16px rgba(74,40,13,.18), 0 4px 10px rgba(0,0,0,.25);
}

.character-search-page .character-card > h2 {
  margin: 0 0 8px;
  border: 1px solid #4a2514;
  background: linear-gradient(#6b2a20, #3a1712);
  color: #ffe6a3;
  text-shadow: 1px 1px #000;
}

.character-search-page .character-info-caption {
  padding: 7px 11px;
  border: 1px solid #102e18;
  color: #ffe5a1;
  background: linear-gradient(90deg, #10391d, #245f31 50%, #10391d);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 17px;
  font-weight: 700;
  text-shadow: 1px 1px #000;
}

.character-search-page .character-info-table td:first-child {
  width: 35%;
  color: #54280e;
  font-weight: 800;
  background: rgba(119,76,32,.13);
}

.character-equipment-section {
  margin-top: 14px;
}

.character-equipment-privacy-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 0 10px;
  padding: 8px;
  border: 1px solid #805b2b;
  background: linear-gradient(#3d291b, #24160f);
}

.character-equipment-privacy-button {
  min-height: 34px;
  padding: 6px 15px;
  border: 2px ridge #bd8d3e;
  border-radius: 2px;
  background: linear-gradient(#315f38, #12391e);
  color: #ffe5a2;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 14px;
  font-weight: 700;
  text-shadow: 1px 1px #000;
  cursor: pointer;
}

.character-equipment-privacy-button:hover,
.character-equipment-privacy-button:focus-visible {
  background: linear-gradient(#41794a, #194c29);
}

.character-equipment-privacy-button:disabled {
  cursor: wait;
  opacity: .65;
}

.character-equipment-privacy-feedback {
  color: #ead7ad;
  font-size: 13px;
}

.character-equipment-frame {
  position: relative;
  width: min(264px, 82vw);
  aspect-ratio: 132 / 163;
  margin: 0 auto;
  background: url('/equipament.png') center / 100% 100% no-repeat;
  image-rendering: pixelated;
  filter: drop-shadow(0 4px 5px rgba(0,0,0,.42));
}

.character-equipment-slot {
  position: absolute;
  width: 20.454546%;
  height: 15.950921%;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  overflow: hidden;
  pointer-events: none;
}

.character-equipment-slot.has-item {
  background: transparent;
  box-shadow: inset 0 0 0 2px #858585;
}

.character-equipment-slot img {
  display: block;
  width: 88%;
  height: 88%;
  object-fit: contain;
  image-rendering: pixelated;
}

.character-equipment-unavailable {
  margin: 0;
  padding: 12px;
  border: 1px solid #8f6934;
  background: #3a2417;
  color: #ead7ad;
  text-align: center;
  font-style: italic;
}

.character-equipment-slot.equipment-rarity-uncommon { box-shadow: inset 0 0 0 2px #2ABE5F, 0 0 5px rgba(42,190,95,.72); }
.character-equipment-slot.equipment-rarity-rare { box-shadow: inset 0 0 0 2px #3791FF, 0 0 5px rgba(55,145,255,.76); }
.character-equipment-slot.equipment-rarity-epic { box-shadow: inset 0 0 0 2px #A55AFF, 0 0 5px rgba(165,90,255,.76); }
.character-equipment-slot.equipment-rarity-legendary { box-shadow: inset 0 0 0 2px #FFDC41, 0 0 6px rgba(255,220,65,.78); }
.character-equipment-slot.equipment-rarity-mythic { box-shadow: inset 0 0 0 2px #FF8723, 0 0 6px rgba(255,135,35,.82); }
.character-equipment-slot.equipment-rarity-ultra-mythic { box-shadow: inset 0 0 0 2px #ff3cc7, 0 0 7px rgba(255,60,199,.85); }
.character-equipment-slot.equipment-rarity-special { box-shadow: inset 0 0 0 2px #f4d03f, 0 0 7px rgba(244,208,63,.85); }

.character-search-page .character-search-section {
  padding: 9px;
  border: 2px solid #2a190f;
  outline: 1px solid #9d7338;
  background: linear-gradient(#d8c09a, #c9ad82);
  box-shadow: inset 0 0 0 3px rgba(255,240,196,.24);
}

.character-search-page .character-search-section > h2 {
  margin: 0 0 10px;
  border: 1px solid #11301a;
  color: #ffe7a1;
  background: linear-gradient(#285c31, #12361d);
  text-shadow: 1px 1px #000;
}

.character-search-page .search-row input {
  border: 2px inset #af8c56;
  background: #f5e7ca;
  box-shadow: inset 0 1px 5px rgba(76,42,15,.22);
}

.character-search-page .search-row button {
  border: 2px ridge #b78a3d;
  color: #fff1ad;
  background: linear-gradient(#2866d3, #0e3c9b);
  text-shadow: 1px 1px #000;
}

/* Guilds -------------------------------------------------- */
.guild-page .guild-heading,
.guild-public-page .guild-heading {
  border: 2px solid #25140c;
  outline: 2px ridge #a67b3c;
  background:
    linear-gradient(rgba(21,55,27,.9), rgba(10,33,17,.94)),
    repeating-linear-gradient(90deg, transparent 0 15px, rgba(255,255,255,.05) 15px 19px);
  box-shadow: inset 0 0 18px rgba(0,0,0,.45), 0 4px 9px rgba(0,0,0,.28);
}

.guild-page .guild-section,
.guild-public-page .guild-section {
  border: 2px solid #2b190e;
  outline: 1px solid #9b7138;
  background: linear-gradient(#d6bd94, #c6a77a);
  box-shadow: inset 0 0 0 3px rgba(255,239,190,.22), 0 4px 10px rgba(0,0,0,.22);
}

.guild-page .guild-section-title,
.guild-public-page .guild-section-title {
  border: 1px solid #0d2715;
  background: linear-gradient(90deg, #143d21, #245f31 50%, #143d21);
  box-shadow: inset 0 1px rgba(255,255,255,.13);
}

.guild-page .guild-table,
.guild-page .guild-member-table,
.guild-public-page .guild-table,
.guild-public-page .guild-member-table {
  border: 2px solid #402610;
  border-bottom: 5px double #543216;
  box-shadow: 0 3px 0 #aa7b36;
}

.guild-page .guild-table th,
.guild-page .guild-member-table th,
.guild-public-page .guild-table th,
.guild-public-page .guild-member-table th {
  color: #ffe7a1;
  background: linear-gradient(#673023, #391712);
  text-shadow: 1px 1px #000;
}

.guild-page .guild-table tbody tr:nth-child(odd) td,
.guild-page .guild-member-table tbody tr:nth-child(odd) td,
.guild-public-page .guild-table tbody tr:nth-child(odd) td,
.guild-public-page .guild-member-table tbody tr:nth-child(odd) td { background: #d7c19d; }

.guild-page .guild-table tbody tr:nth-child(even) td,
.guild-page .guild-member-table tbody tr:nth-child(even) td,
.guild-public-page .guild-table tbody tr:nth-child(even) td,
.guild-public-page .guild-member-table tbody tr:nth-child(even) td { background: #ead9b9; }

/* Items --------------------------------------------------- */
.items-page > h2,
.monsters-page > h2 {
  border: 1px solid #0c2915;
  outline: 1px solid #b1843e;
  background: linear-gradient(90deg, #12361c, #286035 50%, #12361c);
}

.items-page .items-page-subtitle,
.monsters-page .monsters-intro {
  margin: 8px 0 13px;
  padding: 7px 10px;
  border-top: 1px solid #b88e50;
  border-bottom: 1px solid #b88e50;
  background: rgba(255,244,210,.22);
}

.items-page .items-set-card {
  position: relative;
  overflow: hidden;
  border-width: 2px;
  outline: 2px ridge rgba(119,79,32,.72);
  box-shadow: inset 0 0 18px rgba(48,28,12,.2), 0 5px 13px rgba(0,0,0,.25);
}

.items-page .items-set-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: currentColor;
  opacity: .7;
}

.items-page .items-section > h3,
.items-page .items-category-box > h4 {
  text-shadow: 1px 1px #000;
  box-shadow: inset 0 1px rgba(255,255,255,.13);
}

.items-page .items-category-box {
  border: 1px solid rgba(67,39,17,.7);
  box-shadow: inset 0 0 0 2px rgba(255,239,195,.18), 0 2px 6px rgba(0,0,0,.16);
}

/* Monsters ------------------------------------------------ */
.monsters-page {
  border: 2px solid #27160d;
  outline: 2px ridge #9e7338;
  box-shadow: inset 0 0 0 4px rgba(105,66,27,.14), 0 5px 14px rgba(0,0,0,.3);
}

.monsters-page .monster-card {
  border: 2px solid #2c190e;
  outline: 1px solid #8f6934;
  background: linear-gradient(#d7c09a, #c3a477);
  box-shadow: inset 0 0 12px rgba(75,41,15,.2), 0 4px 9px rgba(0,0,0,.22);
}

.monsters-page .monster-card h3 {
  border-bottom: 2px ridge #9f793d;
  color: #ffe7a0;
  background: linear-gradient(#28582f, #12351b);
  text-shadow: 1px 1px #000;
}

.monsters-page .monster-card-boss {
  border-color: #581d13;
  outline-color: #c49338;
  background: linear-gradient(#d7b88d, #bd8b60);
}

.monsters-page .monster-card-boss h3 {
  background: linear-gradient(#7a281d, #3b130f);
  color: #ffd77b;
}

/* Shop ---------------------------------------------------- */
.support-launch-page {
  border: 2px solid #24140c;
  outline: 2px ridge #aa7d38;
  box-shadow: inset 0 0 0 4px rgba(98,59,23,.15), 0 6px 16px rgba(0,0,0,.32);
}

.support-launch-page > h2,
.support-launch-page .support-section-title,
.support-launch-page .support-offer-title,
.support-launch-page .support-launch-hero h2,
.support-launch-page .support-section-head h3,
.support-launch-page .support-premium-head h3 {
  border: 1px solid #102a17;
  outline: 1px solid rgba(181,132,54,.75);
  color: #ffe49a;
  background: linear-gradient(90deg, #13391f, #286334 50%, #13391f);
  text-shadow: 1px 1px #000;
}

.support-launch-page .support-offer-card,
.support-launch-page .support-product-card,
.support-launch-page .support-steps,
.support-launch-page .support-proof-card,
.support-launch-page .support-receipt-card {
  border: 2px solid #2b190f;
  outline: 1px solid #9c7135;
  box-shadow: inset 0 0 0 3px rgba(255,236,183,.14), 0 5px 12px rgba(0,0,0,.27);
}

.support-launch-page a[class*='button'],
.support-launch-page button,
.support-launch-page .support-btn {
  border: 2px ridge #b78a3d;
  text-shadow: 1px 1px #000;
  box-shadow: inset 0 1px rgba(255,255,255,.22), 0 3px 5px rgba(0,0,0,.3);
}

/* Login and account -------------------------------------- */
.login-page {
  border: 2px solid #25150d;
  outline: 2px ridge #a2783b;
  box-shadow: inset 0 0 0 4px rgba(104,64,25,.16), 0 6px 15px rgba(0,0,0,.32);
}

.login-card {
  position: relative;
  max-width: 510px;
  margin: 20px auto 12px;
  padding: 34px 24px 22px;
  border: 3px double #4f2d15;
  outline: 3px ridge #aa7e3c;
  background:
    radial-gradient(circle at center, rgba(255,243,201,.45), transparent 62%),
    linear-gradient(#d8c09a, #c5a577);
  box-shadow: inset 0 0 22px rgba(72,39,13,.28), 0 7px 16px rgba(0,0,0,.3);
}

.login-card-emblem {
  position: absolute;
  top: -17px;
  left: 50%;
  width: 34px;
  height: 34px;
  transform: translateX(-50%) rotate(45deg);
  border: 2px ridge #d0a04b;
  color: #ffd86c;
  background: #183d22;
  line-height: 29px;
  text-shadow: 1px 1px #000;
  box-shadow: 0 3px 7px rgba(0,0,0,.35);
}

.login-card-emblem::first-letter { transform: rotate(-45deg); }

.login-card .lead { margin-top: 4px; color: #54290f; }
.login-card .store-row { margin: 17px 0 12px; }

.login-card .login-primary-button {
  min-width: 230px;
  padding: 10px 20px;
  border: 3px ridge #d2a64e;
  color: #fff18e;
  background: linear-gradient(#2873ef, #0e43b3 56%, #082a76);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 18px;
  font-weight: 800;
  text-shadow: 1px 2px #071736;
  box-shadow: inset 0 0 0 2px #0b2356, inset 0 2px rgba(255,255,255,.27), 0 4px 7px rgba(0,0,0,.35);
}

.login-card .login-primary-button:hover,
.login-card .login-primary-button:focus-visible { filter: brightness(1.14); }
.login-status { margin: 12px 0 0; font-size: 16px; }
.login-help { margin: 14px 0 0; color: #603414; font-size: 13px; }

.profile-layout {
  border: 2px solid #25150d;
  outline: 2px ridge #a2783b;
  box-shadow: inset 0 0 0 4px rgba(104,64,25,.14), 0 6px 15px rgba(0,0,0,.3);
}

.profile-layout .profile-group {
  border: 2px solid #39200f;
  outline: 1px solid #98703a;
  background: linear-gradient(#d7bf98, #c5a77b);
  box-shadow: inset 0 0 12px rgba(73,39,13,.19), 0 3px 8px rgba(0,0,0,.2);
}

.profile-layout .profile-group-title {
  border-bottom: 2px ridge #9b7439;
  color: #ffe49a;
  background: linear-gradient(#285d32, #12371d);
  text-shadow: 1px 1px #000;
}

.profile-layout .profile-table td:first-child { font-weight: 800; color: #55290f; }

@media (max-width: 700px) {
  body[data-rank-type] .subtabs a { flex: 1 1 84px; min-width: 0; }
  .rank-group-button { flex: 1 1 42%; min-width: 0; }
  .character-search-page .character-info-table td:first-child { width: 42%; }
  .character-equipment-frame { width: min(238px, 82vw); }
  .login-card { margin-inline: 4px; padding-inline: 14px; }
  .login-card .login-primary-button { width: 100%; min-width: 0; }
}

/* =========================================================
   Home page: modern portal with classic medieval finishing
   ========================================================= */
.home-modern-page {
  padding: 10px;
  border: 2px solid #21130c;
  outline: 2px ridge #a3783a;
  border-radius: 2px;
  background:
    linear-gradient(rgba(242,220,177,.96), rgba(221,191,139,.96)),
    repeating-linear-gradient(0deg, transparent 0 27px, rgba(91,52,18,.035) 27px 28px);
  box-shadow: inset 0 0 0 4px rgba(100,61,22,.15), 0 6px 16px rgba(0,0,0,.32);
}

.home-modern-hero,
.home-modern-update-flow,
.home-modern-purchase,
.home-modern-faq,
.home-modern-gallery,
.home-modern-final {
  border: 2px solid #26150c;
  outline: 2px ridge #9f7335;
  border-radius: 2px;
  box-shadow: inset 0 0 0 3px rgba(255,230,157,.08), 0 5px 12px rgba(0,0,0,.3);
}

.home-modern-hero {
  padding-top: 54px;
  background:
    radial-gradient(circle at 82% 32%, rgba(67,177,102,.2), transparent 33%),
    linear-gradient(135deg, #0c2c1a 0%, #174928 56%, #3a190f 100%);
}

.home-modern-hero::before {
  content: '';
  position: absolute;
  inset: 6px;
  z-index: 0;
  border: 1px solid rgba(227,179,75,.38);
  pointer-events: none;
}

.home-modern-language {
  z-index: 2;
  padding: 4px 9px;
  border: 1px solid rgba(214,165,72,.36);
  background: rgba(6,24,15,.7);
  color: #ddcda7;
}

.home-modern-eyebrow {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-top: 1px solid rgba(232,188,91,.45);
  border-bottom: 1px solid rgba(232,188,91,.45);
  background: rgba(7,28,17,.48);
}

.home-modern-hero h1 {
  letter-spacing: -.025em;
  text-shadow: 0 3px 0 #180c07, 0 0 18px rgba(244,199,89,.2);
}

.home-modern-button {
  min-height: 44px;
  border: 2px ridge #b98b3e;
  border-radius: 2px;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 16px;
  text-shadow: 1px 1px #000;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.16), 0 3px 6px rgba(0,0,0,.34);
}

.home-modern-button-primary {
  border-color: #d6aa4d;
  background: linear-gradient(#2c74e7, #1045aa 58%, #0a2b72);
  color: #fff29a;
  box-shadow: inset 0 0 0 2px #0b255e, inset 0 2px rgba(255,255,255,.26), 0 4px 7px rgba(0,0,0,.4);
}

.home-modern-button-secondary {
  border-color: #9b773a;
  background: linear-gradient(#395f3f, #17361e);
  color: #ffe6a0;
}

.home-modern-button-gold {
  border-color: #e0b452;
  background: linear-gradient(#b77a23, #714113);
  color: #fff1b6;
}

.home-modern-network {
  margin-inline: -12px;
  padding: 11px 13px 0;
  border-top: 2px ridge rgba(183,133,54,.43);
}

.home-modern-development {
  border: 2px solid #3a220f;
  outline: 1px solid #a47b40;
  border-radius: 2px;
  background:
    linear-gradient(rgba(240,220,181,.94), rgba(213,181,130,.94)),
    repeating-linear-gradient(90deg, transparent 0 18px, rgba(94,53,17,.045) 18px 19px);
  box-shadow: inset 0 0 0 3px rgba(255,244,210,.2), 0 4px 9px rgba(0,0,0,.22);
}

.home-modern-development-icon {
  border: 2px ridge #b28a48;
  border-radius: 2px;
  background: linear-gradient(#22552e, #102f19);
  box-shadow: inset 0 0 0 2px rgba(0,0,0,.25);
}

.home-modern-development > a {
  padding: 7px 11px;
  border: 1px solid #70471f;
  color: #ffe4a0;
  background: linear-gradient(#67311f, #37180f);
  text-decoration: none;
  text-shadow: 1px 1px #000;
}

.home-modern-flow-head,
.home-modern-section-head,
.home-modern-purchase-copy {
  position: relative;
}

.home-modern-flow-head::after,
.home-modern-section-head::after,
.home-modern-purchase-copy::after {
  content: '◆  ◆  ◆';
  display: block;
  margin: 12px auto 0;
  color: #bd8733;
  font-size: 10px;
  letter-spacing: .8em;
  text-align: center;
}

.home-modern-flow-steps article,
.home-modern-version-visual article,
.home-modern-compare article {
  border: 2px solid rgba(115,76,31,.9);
  outline: 1px solid rgba(202,151,64,.55);
  border-radius: 2px;
  box-shadow: inset 0 0 0 2px rgba(255,222,144,.06), 0 3px 8px rgba(0,0,0,.26);
}

.home-modern-flow-steps article {
  background: linear-gradient(rgba(9,42,23,.88), rgba(5,27,16,.92));
}

.home-modern-flow-steps article:last-of-type {
  border-color: #7e683e;
  background: linear-gradient(rgba(46,36,80,.88), rgba(31,20,54,.94));
}

.home-modern-flow-steps h3 {
  margin-inline: -8px;
  padding: 6px 4px;
  border-top: 1px solid rgba(218,169,70,.25);
  border-bottom: 1px solid rgba(218,169,70,.25);
  background: rgba(88,33,21,.35);
}

.home-modern-flow-note {
  border: 1px solid #90662f;
  border-radius: 2px;
  background: rgba(76,39,16,.42);
}

.home-modern-purchase {
  background:
    radial-gradient(circle at 90% 20%, rgba(112,72,158,.2), transparent 35%),
    linear-gradient(135deg, #10351f, #0b2818 55%, #461c10);
}

.home-modern-version-visual article {
  background: linear-gradient(rgba(7,42,23,.8), rgba(5,25,15,.9));
}

.home-modern-version-visual article:last-of-type {
  background: linear-gradient(rgba(48,37,86,.78), rgba(27,20,50,.9));
}

.home-modern-version-visual > b {
  border: 2px ridge #d4a244;
  border-radius: 2px;
  background: linear-gradient(#a86a1d, #6a3a10);
  text-shadow: 1px 1px #000;
}

.home-modern-faq,
.home-modern-gallery {
  background:
    linear-gradient(rgba(244,225,188,.96), rgba(221,192,143,.96)),
    repeating-linear-gradient(0deg, transparent 0 29px, rgba(93,52,18,.04) 29px 30px);
}

.home-modern-section-head > span {
  display: inline-block;
  padding: 5px 12px;
  border: 1px solid #17351e;
  color: #ffe2a0;
  background: linear-gradient(#2a6234, #12371c);
  text-shadow: 1px 1px #000;
}

.home-modern-section-head h2 {
  color: #5a2b0d;
}

.home-modern-section-head > strong {
  border: 2px ridge #bd8c3b;
  border-radius: 2px;
  background: linear-gradient(#9f3225, #5a1712);
  text-shadow: 1px 1px #000;
}

.home-modern-compare article {
  background: linear-gradient(#174228, #2e170d);
}

.home-modern-divider span {
  border: 2px ridge #aa7a31;
  border-radius: 2px;
  background: #dcc08f;
  box-shadow: inset 0 0 0 2px rgba(255,242,202,.4);
}

.home-modern-gallery .feature-carousel {
  padding: 6px;
  border: 2px solid #2a180e;
  outline: 2px ridge #9f7539;
  border-radius: 2px;
  background: #1a0e09;
  box-shadow: 0 5px 12px rgba(0,0,0,.3);
}

.home-modern-gallery .feature-carousel-slide,
.home-modern-gallery .feature-carousel-slide img {
  border-radius: 0;
}

.home-modern-final {
  background: linear-gradient(135deg, #123820, #092718 62%, #40180e);
}

.home-modern-final > span {
  display: inline-block;
  padding: 5px 12px;
  border-top: 1px solid rgba(221,171,73,.52);
  border-bottom: 1px solid rgba(221,171,73,.52);
}

@media (max-width: 560px) {
  .home-modern-page { padding: 6px; }
  .home-modern-hero { padding-inline: 16px; }
  .home-modern-language { left: 14px; right: 14px; text-align: center; }
  .home-modern-network { margin-inline: 0; }
  .home-modern-flow-head::after,
  .home-modern-section-head::after,
  .home-modern-purchase-copy::after { letter-spacing: .35em; }
}

/* =========================================================
   Contact and Support: medieval community hall
   ========================================================= */
.support-page {
  padding: 10px;
  border: 2px solid #21130c;
  outline: 2px ridge #a2783a;
  border-radius: 2px;
  background:
    linear-gradient(rgba(241,219,176,.96), rgba(218,187,137,.96)),
    repeating-linear-gradient(0deg, transparent 0 28px, rgba(91,52,18,.04) 28px 29px);
  box-shadow: inset 0 0 0 4px rgba(100,61,22,.15), 0 6px 16px rgba(0,0,0,.32);
}

.support-page .support-language-switch {
  margin: 0 0 8px;
  padding: 6px 10px;
  border: 1px solid #9d7a45;
  background: rgba(255,239,199,.38);
  text-align: center;
}

.support-page .support-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 16px;
  padding: 25px clamp(18px, 4vw, 38px) 23px;
  border: 2px solid #24140c;
  outline: 2px ridge #a17637;
  border-radius: 2px;
  color: #eadab4;
  background:
    radial-gradient(circle at 88% 18%, rgba(230,181,77,.15), transparent 28%),
    linear-gradient(135deg, #0d301c, #174828 60%, #3b190f);
  box-shadow: inset 0 0 0 3px rgba(255,225,150,.07), 0 5px 12px rgba(0,0,0,.3);
}

.support-page .support-hero::before {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(222,169,68,.34);
  pointer-events: none;
}

.support-page .support-hero::after {
  content: '✦';
  position: absolute;
  right: 25px;
  bottom: -38px;
  color: rgba(241,194,91,.1);
  font-size: 150px;
  line-height: 1;
  pointer-events: none;
}

.support-page .support-hero h2 {
  position: relative;
  z-index: 1;
  margin: 0 0 8px;
  padding: 7px 12px;
  border-top: 1px solid rgba(224,174,76,.5);
  border-bottom: 1px solid rgba(224,174,76,.5);
  color: #ffe49a;
  background: rgba(6,30,16,.42);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(27px, 4vw, 38px);
  text-align: center;
  text-shadow: 1px 2px #000;
}

.support-page .support-hero p {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: 0 auto;
  color: #e2d2ae;
  font-size: 16px;
  line-height: 1.55;
  text-align: center;
}

.support-page .support-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.support-page .support-card {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  grid-template-rows: auto auto 1fr auto;
  column-gap: 13px;
  align-items: start;
  padding: 12px;
  border: 2px solid #311b0e;
  outline: 1px solid #9d7439;
  border-radius: 2px;
  background:
    linear-gradient(rgba(239,218,177,.96), rgba(208,173,121,.96)),
    repeating-linear-gradient(90deg, transparent 0 19px, rgba(86,48,15,.04) 19px 20px);
  box-shadow: inset 0 0 0 3px rgba(255,240,199,.2), 0 4px 10px rgba(0,0,0,.24);
}

.support-page .support-card::after {
  content: '';
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(113,73,28,.2);
  pointer-events: none;
}

.support-page .support-icon {
  position: relative;
  z-index: 1;
  grid-column: 1;
  grid-row: 1 / span 2;
  width: 44px;
  height: 44px;
  margin: 0;
  border: 2px ridge #bc8d3e;
  border-radius: 2px;
  color: #ffe17d;
  background: linear-gradient(#285b32, #12361c);
  font-size: 20px;
  text-shadow: 1px 1px #000;
  box-shadow: inset 0 0 0 2px rgba(0,0,0,.28), 0 3px 6px rgba(0,0,0,.25);
}

.support-page .support-icon-image {
  width: 27px;
  height: 27px;
}

.support-page .support-card h3 {
  position: relative;
  z-index: 1;
  grid-column: 2;
  margin: 0;
  padding: 6px 9px;
  border: 1px solid #17331d;
  color: #ffe5a0;
  background: linear-gradient(90deg, #24572e, #12361c);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 18px;
  text-shadow: 1px 1px #000;
}

.support-page .support-card p {
  position: relative;
  z-index: 1;
  grid-column: 1 / -1;
  min-height: 0;
  margin: 13px 2px 12px;
  color: #5a3014;
  font-size: 15px;
  line-height: 1.5;
}

.support-page .support-card .support-btn {
  position: relative;
  z-index: 1;
  grid-column: 1 / -1;
  justify-self: stretch;
  padding: 9px 12px;
  border: 3px ridge #d1a34b;
  border-radius: 2px;
  color: #fff196;
  background: linear-gradient(#2b72e4, #1045aa 58%, #092c77);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 16px;
  text-align: center;
  text-shadow: 1px 1px #061638;
  box-shadow: inset 0 0 0 2px #0b255e, inset 0 2px rgba(255,255,255,.24), 0 3px 6px rgba(0,0,0,.32);
}

.support-page .support-card .support-btn:hover,
.support-page .support-card .support-btn:focus-visible {
  color: #fff9c9;
  filter: brightness(1.14);
}

.support-page .support-card small {
  position: relative;
  z-index: 1;
  grid-column: 1 / -1;
  margin-top: 10px;
  color: #67401d;
  font-size: 13px;
  line-height: 1.35;
  text-align: center;
  overflow-wrap: anywhere;
}

.support-page .support-note {
  margin-top: 16px;
  padding: 0;
  border: 2px solid #2c190e;
  outline: 1px solid #98703a;
  border-radius: 2px;
  background: #d6bd94;
  box-shadow: inset 0 0 0 3px rgba(255,240,200,.18), 0 3px 8px rgba(0,0,0,.2);
}

.support-page .support-note h4 {
  margin: 0;
  padding: 7px 12px;
  border-bottom: 2px ridge #94703a;
  color: #ffe49a;
  background: linear-gradient(90deg, #603021, #35170f);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 17px;
  text-align: center;
  text-shadow: 1px 1px #000;
}

.support-page .support-note p {
  margin: 0;
  padding: 11px 13px;
  color: #572c11;
  font-size: 14px;
  text-align: center;
}

@media (max-width: 760px) {
  .support-page .support-grid { grid-template-columns: 1fr; }
}

@media (max-width: 460px) {
  .support-page { padding: 6px; }
  .support-page .support-hero { padding-inline: 12px; }
  .support-page .support-hero h2 { font-size: 27px; }
  .support-page .support-card { grid-template-columns: 42px minmax(0, 1fr); column-gap: 9px; }
  .support-page .support-icon { width: 38px; height: 38px; }
  .support-page .support-icon-image { width: 24px; height: 24px; }
}

/* =========================================================
   Remaining pages: unified medieval visual language
   ========================================================= */

/* Level calculator --------------------------------------- */
.calculator-page {
  padding: 12px;
  border: 2px solid #21130c;
  outline: 2px ridge #a2783a;
  border-radius: 2px;
  background:
    linear-gradient(rgba(241,220,178,.96), rgba(216,184,133,.96)),
    repeating-linear-gradient(0deg, transparent 0 28px, rgba(92,52,17,.04) 28px 29px);
  box-shadow: inset 0 0 0 4px rgba(100,61,22,.15), 0 6px 16px rgba(0,0,0,.32);
  text-align: center;
}

.calculator-page > h2 {
  margin: 4px 0 0;
  padding: 10px 14px;
  border: 1px solid #0c2915;
  outline: 1px solid #b1843e;
  color: #ffe49a;
  background: linear-gradient(90deg, #12361c, #286035 50%, #12361c);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(27px, 4vw, 38px);
  text-shadow: 1px 2px #000;
}

.calculator-page .calc-help {
  max-width: 620px;
  margin: 13px auto 0;
  color: #5d3316;
  font-size: 16px;
}

.calculator-page .calc-inline {
  max-width: 660px;
  margin: 20px auto 0;
  padding: clamp(18px, 4vw, 30px);
  border: 3px double #4b2a13;
  outline: 3px ridge #a47a3c;
  border-radius: 2px;
  background:
    radial-gradient(circle at center, rgba(255,244,207,.45), transparent 64%),
    linear-gradient(#d9c19b, #c5a578);
  box-shadow: inset 0 0 20px rgba(74,39,13,.24), 0 6px 14px rgba(0,0,0,.27);
}

.calculator-page .calc-inline input {
  min-height: 44px;
  border: 2px inset #a9854e;
  border-radius: 2px;
  color: #49250e;
  background: #f7e8ca;
  font-size: 16px;
  box-shadow: inset 0 2px 6px rgba(78,43,15,.2);
}

.calculator-page .calc-inline button {
  min-height: 44px;
  border: 3px ridge #d1a34b;
  border-radius: 2px;
  color: #fff196;
  background: linear-gradient(#2b72e4, #1045aa 58%, #092c77);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 17px;
  font-weight: 800;
  text-shadow: 1px 1px #061638;
  box-shadow: inset 0 0 0 2px #0b255e, inset 0 2px rgba(255,255,255,.24), 0 3px 6px rgba(0,0,0,.32);
}

.calculator-page .calc-inline button:hover,
.calculator-page .calc-inline button:focus-visible { filter: brightness(1.14); }

.calculator-page .calc-result {
  max-width: 660px;
  min-height: 44px;
  margin: 16px auto 0;
  padding: 10px 14px;
  border: 2px solid #39200f;
  outline: 1px solid #98703a;
  color: #55290f;
  background: #ead8b7;
  box-shadow: inset 0 0 0 2px rgba(255,242,205,.28);
}

.calculator-page .calc-result:empty { display: none; }
.calculator-page .calc-result-value { color: #6d320b; }
.calculator-page .calc-note { color: #70431d; font-size: 13px; }

/* Item details ------------------------------------------- */
.item-detail-page {
  padding: 12px;
  border: 2px solid #21130c;
  outline: 2px ridge #a2783a;
  border-radius: 2px;
  background:
    linear-gradient(rgba(240,219,177,.96), rgba(216,184,132,.96)),
    repeating-linear-gradient(0deg, transparent 0 28px, rgba(91,51,17,.04) 28px 29px);
  box-shadow: inset 0 0 0 4px rgba(100,61,22,.15), 0 6px 16px rgba(0,0,0,.32);
}

.item-detail-page .item-back-link {
  padding: 6px 10px;
  border: 1px solid #68411c;
  color: #ffe6a1;
  background: linear-gradient(#5f301f, #34170e);
  text-decoration: none;
  text-shadow: 1px 1px #000;
}

.item-detail-page .item-detail-hero {
  padding: 15px;
  border: 2px solid #2c190e;
  outline: 2px ridge #9d7439;
  background: linear-gradient(135deg, #143a21, #0b2918 60%, #3a190f);
  color: #e5d6b2;
  box-shadow: inset 0 0 0 3px rgba(255,226,151,.07), 0 4px 10px rgba(0,0,0,.27);
}

.item-detail-page .item-detail-hero h1,
.item-detail-page .item-detail-hero h2 {
  margin: 0 0 7px;
  color: #ffe49a;
  font-family: Georgia, 'Times New Roman', serif;
  text-shadow: 1px 2px #000;
}

.item-detail-page .item-detail-hero .lead { color: #dfcfaa; }

.item-detail-page .item-detail-art {
  flex: 0 0 auto;
  border-width: 2px;
  outline: 2px ridge #a57b3d;
  box-shadow: inset 0 0 12px rgba(53,29,10,.24), 0 4px 9px rgba(0,0,0,.28);
}

.item-detail-page .items-section {
  padding: 9px;
  border: 2px solid #2d1a0f;
  outline: 1px solid #99713a;
  background: linear-gradient(#d7bf98, #c5a67a);
  box-shadow: inset 0 0 0 3px rgba(255,240,199,.19), 0 4px 9px rgba(0,0,0,.21);
}

.item-detail-page .items-section > h3 {
  margin: -9px -9px 10px;
  padding: 8px 11px;
  border-bottom: 2px ridge #96713a;
  color: #ffe49a;
  background: linear-gradient(90deg, #24582f, #12361c);
  font-family: Georgia, 'Times New Roman', serif;
  text-shadow: 1px 1px #000;
}

.item-detail-page .item-info-card,
.item-detail-page .item-source-card {
  border: 1px solid #72502a;
  color: #53280e;
  background: #ead8b7;
  box-shadow: inset 0 0 0 2px rgba(255,244,211,.35), 0 2px 5px rgba(0,0,0,.14);
}

.item-detail-page .item-info-card strong {
  color: #704015;
  font-family: Georgia, 'Times New Roman', serif;
}

.item-detail-page .item-source-card:hover,
.item-detail-page .item-source-card:focus-visible {
  border-color: #b47d2c;
  background: #f2e2c3;
  transform: translateY(-1px);
}

/* Individual monster pages ------------------------------ */
.monster-detail-page {
  padding: 12px;
  border: 2px solid #21130c;
  outline: 2px ridge #a2783a;
  border-radius: 2px;
  background:
    linear-gradient(rgba(239,217,173,.96), rgba(211,177,125,.96)),
    repeating-linear-gradient(0deg, transparent 0 28px, rgba(88,49,16,.04) 28px 29px);
  box-shadow: inset 0 0 0 4px rgba(100,61,22,.15), 0 6px 16px rgba(0,0,0,.32);
}

.monster-detail-page .monster-detail-section-title {
  margin: 0 0 11px;
  padding: 8px 12px;
  border: 1px solid #0d2916;
  outline: 1px solid #b0833c;
  color: #ffe49a;
  background: linear-gradient(90deg, #12361c, #286035 50%, #12361c);
  font-family: Georgia, 'Times New Roman', serif;
  text-align: center;
  text-shadow: 1px 1px #000;
}

.monster-detail-page .monster-detail-hero {
  border: 2px solid #29170d;
  outline: 2px ridge #9d7439;
  border-radius: 2px;
  box-shadow: inset 0 0 0 3px rgba(255,225,150,.07), 0 5px 11px rgba(0,0,0,.28);
}

.monster-detail-page .monster-detail-copy h2 {
  color: #ffe29a;
  font-family: Georgia, 'Times New Roman', serif;
  text-shadow: 1px 2px #000;
}

.monster-detail-page .monster-detail-figure {
  border: 2px ridge #ac803c;
  border-radius: 2px;
  box-shadow: inset 0 0 12px rgba(0,0,0,.28), 0 4px 9px rgba(0,0,0,.3);
}

.monster-detail-page .monster-stats-section,
.monster-detail-page .monster-drops-section {
  padding: 9px;
  border: 2px solid #2d190e;
  outline: 1px solid #98703a;
  background: linear-gradient(#d5bc93, #c3a275);
  box-shadow: inset 0 0 0 3px rgba(255,240,199,.17), 0 4px 9px rgba(0,0,0,.21);
}

.monster-detail-page .monster-stats-section > h3,
.monster-detail-page .monster-drops-section > h3 {
  margin: -9px -9px 10px;
  padding: 8px 11px;
  border-bottom: 2px ridge #96713a;
  color: #ffe49a;
  background: linear-gradient(90deg, #603021, #35170f);
  font-family: Georgia, 'Times New Roman', serif;
  text-shadow: 1px 1px #000;
}

.monster-detail-page .monster-stat-card,
.monster-detail-page .monster-drop-card {
  border: 1px solid #71502a;
  border-radius: 2px;
  background: #ead8b7;
  box-shadow: inset 0 0 0 2px rgba(255,244,211,.32), 0 2px 5px rgba(0,0,0,.16);
}

.monster-detail-page .monster-stat-card strong,
.monster-detail-page .monster-drop-card h4 {
  color: #633514;
  font-family: Georgia, 'Times New Roman', serif;
}

.monster-detail-page .monster-drop-clickable:hover,
.monster-detail-page .monster-drop-clickable:focus-visible {
  border-color: #b77e2c;
  background: #f3e2c2;
  transform: translateY(-1px);
}

/* Purchase terms and privacy ----------------------------- */
.terms-page,
.privacy-page {
  padding: 12px;
  border: 2px solid #21130c;
  outline: 2px ridge #a2783a;
  border-radius: 2px;
  color: #4e2911;
  background:
    linear-gradient(rgba(243,224,185,.97), rgba(222,193,143,.97)),
    repeating-linear-gradient(0deg, transparent 0 29px, rgba(91,52,18,.04) 29px 30px);
  box-shadow: inset 0 0 0 4px rgba(100,61,22,.15), 0 6px 16px rgba(0,0,0,.32);
  line-height: 1.65;
  text-align: left;
}

.terms-page > h2,
.privacy-page > h2 {
  margin: 5px 0 16px;
  padding: 10px 14px;
  border: 1px solid #0c2915;
  outline: 1px solid #b1843e;
  color: #ffe49a;
  background: linear-gradient(90deg, #12361c, #286035 50%, #12361c);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(25px, 4vw, 35px);
  text-align: center;
  text-shadow: 1px 2px #000;
}

.terms-page > h3,
.privacy-page > h3 {
  margin: 20px 0 0;
  padding: 7px 11px;
  border: 1px solid #3e2013;
  border-bottom: 2px ridge #96713a;
  color: #ffe3a0;
  background: linear-gradient(90deg, #633123, #37170f);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 18px;
  text-shadow: 1px 1px #000;
}

.terms-page > p,
.privacy-page > p,
.privacy-page > ul {
  margin: 0;
  padding: 11px 13px;
  border-right: 1px solid rgba(108,72,32,.42);
  border-bottom: 1px solid rgba(108,72,32,.42);
  border-left: 1px solid rgba(108,72,32,.42);
  background: rgba(250,233,197,.48);
}

.terms-page > .support-language-switch {
  margin-bottom: 8px;
  border: 1px solid #9d7a45;
  background: rgba(255,239,199,.4);
  text-align: center;
}

.terms-page a,
.privacy-page a { color: #7b3100; font-weight: 700; }

/* Unlinked legacy welcome page --------------------------- */
.legacy-welcome-page {
  padding: 12px;
  border: 2px solid #21130c;
  outline: 2px ridge #a2783a;
  border-radius: 2px;
  background:
    linear-gradient(rgba(241,220,178,.96), rgba(216,184,133,.96)),
    repeating-linear-gradient(0deg, transparent 0 28px, rgba(92,52,17,.04) 28px 29px);
  box-shadow: inset 0 0 0 4px rgba(100,61,22,.15), 0 6px 16px rgba(0,0,0,.32);
}

.legacy-welcome-page > h2 {
  margin: 5px 0 12px;
  padding: 10px 14px;
  border: 1px solid #0c2915;
  outline: 1px solid #b1843e;
  color: #ffe49a;
  background: linear-gradient(90deg, #12361c, #286035 50%, #12361c);
  font-family: Georgia, 'Times New Roman', serif;
  text-shadow: 1px 2px #000;
}

.legacy-welcome-page .store-row,
.legacy-welcome-page .online-count {
  max-width: 720px;
  margin-right: auto;
  margin-left: auto;
}

.legacy-welcome-page .online-count {
  padding: 8px 12px;
  border-right: 1px solid #a17a43;
  border-bottom: 1px solid #a17a43;
  border-left: 1px solid #a17a43;
  color: #5b3013;
  background: rgba(249,232,195,.52);
}

.legacy-welcome-page .feature-carousel {
  padding: 6px;
  border: 2px solid #2a180e;
  outline: 2px ridge #9f7539;
  border-radius: 2px;
  background: #1a0e09;
  box-shadow: 0 5px 12px rgba(0,0,0,.3);
}

@media (max-width: 700px) {
  .calculator-page,
  .item-detail-page,
  .monster-detail-page,
  .terms-page,
  .privacy-page,
  .legacy-welcome-page { padding: 7px; }

  .item-detail-page .item-detail-hero { align-items: center; }
  .terms-page > h3,
  .privacy-page > h3 { font-size: 17px; }
}

/* Medieval 404 page */
.error-page {
  position: relative;
  overflow: hidden;
  max-width: 760px;
  margin: 18px auto;
  padding: clamp(32px, 7vw, 64px) 20px;
  border: 2px solid #21130c;
  outline: 3px ridge #a2783a;
  color: #e9d9b3;
  background: radial-gradient(circle at 50% 20%, rgba(225,176,73,.15), transparent 34%), linear-gradient(145deg, #0d301c, #174828 55%, #3b190f);
  text-align: center;
  box-shadow: inset 0 0 0 5px rgba(255,225,150,.07), 0 7px 18px rgba(0,0,0,.38);
}

.error-page::before {
  content: '';
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(222,169,68,.35);
  pointer-events: none;
}

.error-code {
  display: block;
  color: #d7a33f;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(64px, 14vw, 120px);
  font-weight: 900;
  line-height: .8;
  text-shadow: 0 4px #1c0d07;
}

.error-kicker {
  margin: 18px 0 4px;
  color: #f2c65d;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .16em;
}

.error-page h1 {
  margin: 5px 0 14px;
  color: #ffe7a1;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(28px, 5vw, 43px);
  text-shadow: 1px 2px #000;
}

.error-page > p:not(.error-kicker) {
  position: relative;
  z-index: 1;
  max-width: 590px;
  margin: 8px auto;
  line-height: 1.55;
}

.error-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
}

.error-actions a {
  min-width: 155px;
  padding: 9px 14px;
  border: 3px ridge #d1a34b;
  color: #fff196;
  background: linear-gradient(#2b72e4, #1045aa 58%, #092c77);
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 800;
  text-decoration: none;
  text-shadow: 1px 1px #061638;
  box-shadow: inset 0 0 0 2px #0b255e, inset 0 2px rgba(255,255,255,.24), 0 3px 6px rgba(0,0,0,.32);
}

.error-actions a:hover,
.error-actions a:focus-visible { filter: brightness(1.14); }
