/* A small fan-site page, with a little of the old web left in it. */
:root {
  color-scheme: dark;
  --body-font: "Trebuchet MS", "Lucida Grande", "Lucida Sans Unicode", sans-serif;
  --display-font: "Palatino Linotype", Palatino, "Book Antiqua", serif;
  --mono-font: Consolas, "Courier New", monospace;
  --text-size: 13px;
  --small-text-size: 12px;
}
* { box-sizing: border-box; }
html { min-height: 100%; }
body {
  margin: 0;
  min-height: 100svh;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #28180f;
  background-image: radial-gradient(ellipse at 50% 20%, #5b321b70, transparent 75%), repeating-linear-gradient(45deg, #d7b77604 0, #d7b77604 1px, transparent 1px, transparent 5px);
  color: #e8d6b1;
  font: var(--text-size)/1.6 var(--body-font);
}
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
a:focus-visible { outline: 2px solid #ffe4a3; outline-offset: 5px; }
[hidden] { display: none !important; }
h1, h2, p { margin: 0; }
button { font: inherit; }
.site-wrap { width: min(960px, 100%); }
.masthead { text-align: center; padding: 0 0 20px; }
.wordmark {
  display: inline-block;
  font: bold small-caps 58px/1 var(--display-font);
  color: #dbb66a;
  letter-spacing: .025em;
  text-shadow: 0 1px #f7d88d, 0 3px #6d351b, 0 4px 2px #160c08;
}
.welcome {
  height: clamp(310px, 58svh, 430px);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #203623;
  border: 1px solid #aa8346;
  box-shadow: 0 0 0 4px #1b100a, 0 0 0 5px #674627, 0 5px 15px #0c080650;
}
/* The extra height crops the title and progress bar out of the native artwork. */
.welcome-scene { position: absolute; z-index: -3; inset: -32% 0; background: url('/site/valley.jpg') center / cover no-repeat; }
.welcome-shade { position: absolute; z-index: -2; inset: 0; background: linear-gradient(90deg, #102017e8, #13251ac2 28%, #13251a38 65%, #13251a00 83%); }
.welcome::after { content: ""; position: absolute; inset: 5px; border: 1px solid #e2cf9d38; pointer-events: none; }
.welcome-content { height: 100%; padding: 34px 43px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
h1 { font: normal 43px/1.2 var(--display-font); color: #fff0cc; text-shadow: 0 2px 3px #07110bc0; }
.welcome-note { margin: 13px 0 27px; color: #dcdcc8; font-size: var(--text-size); text-shadow: 0 1px 3px #0d1c11; }
.welcome-actions { display: flex; align-items: stretch; gap: 12px; }
.play-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 23px;
  min-width: 226px;
  height: 55px;
  padding: 0 22px;
  border: 2px solid #ceae63;
  border-radius: 4px;
  background: linear-gradient(#82b956, #477e31 48%, #2b5522 50%, #416a2c);
  box-shadow: inset 0 1px #d9f5a28c, inset 0 -1px #183a12, 0 2px 4px #09140b80;
  color: #fff2cb;
  font: bold 22px var(--display-font);
  text-shadow: 0 2px 1px #183a12;
}
.play-button:hover { background: linear-gradient(#95ca67, #568b39 48%, #38672b 50%, #537f34); border-color: #f1d58b; }
.play-button:active { transform: translateY(1px); }
.play-button { cursor: pointer; }
body.game-mode { display: block; padding: 0; background: #000; }
body.game-mode #game-player { position: fixed; inset: 0; }
.dynasty-loading {
  position: absolute;
  z-index: 5;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: radial-gradient(ellipse at 50% 40%, #50311e, #1b110c 80%);
  color: #e8d6b1;
  font: var(--text-size)/1.6 var(--body-font);
}
.loading-card {
  width: min(580px, 100%);
  overflow: hidden;
  border: 1px solid #b48b4c;
  box-shadow: 0 0 0 4px #170e09, 0 0 0 5px #69492c, 0 14px 45px #0c070780;
  background: #302015;
}
.loading-valley {
  height: clamp(150px, 30vh, 235px);
  border-bottom: 1px solid #b48b4c;
  background: url('/site/valley.jpg') center / cover no-repeat;
  background-size: 100% auto;
}
.loading-panel { padding: 18px 27px 25px; background: linear-gradient(#3e291b, #2b1c13); }
.loading-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 6px; }
.loading-heading h2 { margin: 0; color: #e9c67d; font: bold small-caps 36px/1.2 var(--display-font); text-shadow: 0 2px #170e09; }
.loading-marbles { display: flex; gap: 6px; }
.loading-marbles i { width: 17px; height: 17px; border: 1px solid #c2a165; border-radius: 50%; background: radial-gradient(circle at 35% 28%, #fff2b9, #d4952d 35%, #644311 78%); box-shadow: 0 1px 2px #170e09; }
.loading-marbles i:nth-child(2) { background: radial-gradient(circle at 35% 28%, #e0f6c0, #67a43d 35%, #25471e 78%); }
.loading-marbles i:nth-child(3) { background: radial-gradient(circle at 35% 28%, #ffd8b4, #c44d32 35%, #602319 78%); }
#loading-message { min-height: 21px; margin: 0 0 13px; }
.loading-meter { height: 13px; padding: 2px; overflow: hidden; border: 1px solid #9a7441; background: #140f0b; box-shadow: inset 0 1px 3px #000; }
.loading-meter span { display: block; width: 32%; height: 100%; background: linear-gradient(#d6b56a, #a77e38); animation: dynasty-loading 1.7s ease-in-out infinite alternate; }
.loading-meter.has-progress span { animation: none; }
#loading-back { display: inline-block; color: #efd08e; text-decoration: underline; }
.loading-failed #loading-message { color: #f2d8bb; }
@keyframes dynasty-loading { from { transform: translateX(-100%); } to { transform: translateX(315%); } }
@media (prefers-reduced-motion: reduce) { .loading-meter span { animation: none; width: 100%; opacity: .6; } }
@media (max-width: 480px) {
  .dynasty-loading { padding: 20px; }
  .loading-panel { padding: 16px 20px 21px; }
  .loading-valley { height: clamp(100px, 25svh, 170px); background-size: auto 180%; }
  .loading-heading h2 { font-size: 32px; }
}
@media (max-height: 400px) {
  .dynasty-loading { padding: 16px; }
  .loading-valley { height: 100px; }
  .loading-panel { padding-top: 12px; padding-bottom: 18px; }
}
.play-arrow { color: #e1e7b7; font: 12px var(--body-font); }
.donate-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 142px;
  padding: 0 17px;
  border: 1px solid #a9844d;
  border-radius: 4px;
  background: linear-gradient(#53331f, #352016);
  box-shadow: inset 0 1px #ddb8752e, 0 2px 4px #09140b66;
  color: #e4c98f;
  cursor: pointer;
  font-size: var(--text-size);
  font-weight: bold;
  text-shadow: 0 1px #170b07;
}
.donate-button:hover { color: #ffe2a6; border-color: #d2a95f; background: linear-gradient(#684128, #41271a); }
.play-button:focus-visible, .donate-button:focus-visible, .dialog-close:focus-visible, .copy-button:focus-visible { outline: 2px solid #ffe4a3; outline-offset: 4px; }
.launch-notice { max-width: 380px; margin-top: 17px; padding: 8px 11px; color: #542719; background: #ead7a8; border-left: 3px solid #aa6641; font-size: var(--small-text-size); }
.site-footer { text-align: center; padding: 19px 10px 0; color: #b49d7c; font-size: var(--small-text-size); }
.project-note { max-width: 650px; margin: 7px auto 0; color: #ac9678; font-size: var(--small-text-size); line-height: 1.6; }
.smile { color: #d1b57f; white-space: nowrap; }
.donate-dialog {
  width: min(470px, calc(100% - 32px));
  padding: 0;
  overflow: hidden;
  border: 1px solid #b1874b;
  border-radius: 3px;
  background: #2f1b11;
  box-shadow: 0 0 0 4px #170d08, 0 14px 50px #090503cc;
  color: #e8d6b1;
  font: var(--text-size)/1.55 var(--body-font);
}
.donate-dialog::backdrop { background: #0d0806c7; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid #6f492a; background: linear-gradient(#5a3420, #3a2116); }
.dialog-heading h2 { color: #efd39a; font: bold 20px/1.2 var(--display-font); }
.dialog-close { width: 28px; height: 28px; padding: 0; border: 1px solid #9e7845; border-radius: 2px; background: #2b180f; color: #dcbc7a; cursor: pointer; font-size: 20px; line-height: 1; }
.dialog-note { padding: 17px 18px 12px; color: #c9b28b; }
.wallet-list { display: grid; gap: 9px; padding: 0 18px 18px; }
.wallet-row { display: grid; grid-template-columns: 74px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 9px; border: 1px solid #67472e; background: #21130d; }
.wallet-name { color: #e3c78e; font-weight: bold; }
.wallet-address { overflow: hidden; color: #b9a684; font: var(--small-text-size)/1.4 var(--mono-font); text-overflow: ellipsis; white-space: nowrap; }
.copy-button { padding: 5px 8px; border: 1px solid #8d6d40; border-radius: 2px; background: #4b2e1d; color: #e4c98f; cursor: pointer; font-size: var(--small-text-size); }
.wallet-empty { margin: 0 18px 18px; padding: 10px 11px; border: 1px dashed #705039; color: #a99575; font-size: var(--small-text-size); text-align: center; }
@media (max-width: 700px) {
  body { padding: 20px; }
  .wordmark { font-size: 51px; }
  .masthead { padding-bottom: 19px; }
  .welcome { height: min(470px, calc(100svh - 250px)); }
  .welcome-scene { background-position: 85% center; }
  .welcome-shade { background: linear-gradient(90deg, #102017d9, #13251a8a 65%, #13251a4a); }
  .welcome-content { padding: 29px; }
  h1 { font-size: 37px; }
  .welcome-note { max-width: 24ch; }
  .welcome-actions { flex-direction: column; align-items: flex-start; }
  .donate-button { width: 210px; min-height: 38px; }
  .site-footer { max-width: 340px; margin: auto; line-height: 1.8; }
}
@media (max-width: 400px) {
  body { padding: 16px; }
  .wordmark { font-size: 48px; }
  .welcome { height: min(440px, calc(100svh - 250px)); }
  .welcome-content { padding: 25px; }
  h1 { font-size: clamp(29px, 8.6vw, 34px); }
  .welcome-note { margin-bottom: 21px; }
  .play-button { min-width: 210px; height: 53px; font-size: 21px; gap: 19px; padding: 0 17px; }
  .donate-button { min-height: 36px; }
  .site-footer { padding-top: 15px; }
  .wallet-row { grid-template-columns: 1fr auto; }
  .wallet-address { grid-column: 1 / -1; grid-row: 2; }
}
@media (max-height: 560px) and (min-width: 701px) {
  body { padding: 14px; }
  .masthead { padding-bottom: 13px; }
  .wordmark { font-size: 40px; }
  .welcome { height: calc(100svh - 220px); }
  .welcome-content { padding-top: 17px; padding-bottom: 17px; }
  h1 { font-size: 32px; }
  .welcome-note { margin: 9px 0 14px; }
  .play-button { height: 49px; }
  .welcome-actions { flex-direction: row; }
  .donate-button { width: auto; min-height: 0; }
  .site-footer { padding-top: 13px; }
}
@media (max-height: 560px) and (max-width: 700px) {
  body { padding: 10px 16px; }
  .masthead { padding-bottom: 8px; }
  .wordmark { font-size: 38px; }
  .welcome { height: calc(100svh - 202px); }
  .welcome-content { padding-top: 14px; padding-bottom: 14px; }
  h1 { font-size: 28px; }
  .welcome-note { margin: 5px 0 10px; }
  .welcome-actions { gap: 7px; }
  .play-button { height: 46px; }
  .donate-button { min-height: 32px; }
  .site-footer { padding-top: 8px; line-height: 1.5; }
  .project-note { margin-top: 3px; line-height: 1.45; }
}
