:root{
  --bg:#302b24;
  --bg-dark:#1c1a16;
  --panel:#3b352b;
  --panel-dark:#27231d;
  --panel-light:#51483a;
  --stone:#5a554b;
  --stone-dark:#25231f;
  --border:#171512;
  --border-light:#7b725f;
  --gold:#f0c75e;
  --gold-dark:#b58a2d;
  --text:#f1e6c8;
  --muted:#b8aa88;
  --green:#42b83f;
  --green-dark:#1c671e;
  --red:#c94b3f;
  --blue:#4b82c5;
  --shadow:#0b0a08;
}

*{
  box-sizing:border-box;
}

html,body{
  min-height:100%;
}

body{
  margin:0;
  background:
    radial-gradient(circle at 50% 0%,#514a3d 0,#302b24 45%,#1c1a16 100%);
  color:var(--text);
  font:16px/1.45 "Trebuchet MS","Arial",sans-serif;
  text-shadow:1px 1px 0 #000;
}

/* OSRS-style outer page */

.page{
  width:min(1080px,calc(100% - 28px));
  margin:auto;
  padding:16px 0 55px;
}

.narrow{
  width:min(520px,calc(100% - 28px));
}

/* Top navigation */

.topbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:18px;
  padding:9px 13px;

  background:
    linear-gradient(#4b463c,#2c2923);

  border:3px solid var(--border);
  outline:1px solid var(--border-light);

  box-shadow:
    inset 0 1px 0 #9a9078,
    inset 0 -2px 0 #171512,
    3px 3px 0 #000;
}

.brand{
  color:#d8c89b;
  text-decoration:none;
  font-weight:900;
  font-size:21px;
  letter-spacing:1px;
  text-transform:uppercase;
}

.topbar nav{
  display:flex;
  align-items:center;
  gap:5px;
  flex-wrap:wrap;
}

.topbar a:not(.brand),
.link-button,
.back,
a{
  color:var(--gold);
  text-decoration:none;
}

.topbar a:not(.brand),
.link-button{
  padding:7px 11px;
  border:1px solid transparent;
}

.topbar a:not(.brand):hover,
.link-button:hover,
.back:hover,
a:hover{
  color:#fff2a8;
  text-decoration:none;
  background:#514831;
  border-color:#756841;
}

/* Main hero */

.hero{
  text-align:center;
  padding:70px 25px;
}

.hero.compact{
  padding:35px 20px;
}

.eyebrow{
  color:var(--gold);
  font-size:12px;
  font-weight:900;
  letter-spacing:2px;
  text-transform:uppercase;
}

.hero h1{
  font-family:Georgia,"Times New Roman",serif;
  font-size:clamp(38px,7vw,70px);
  line-height:1;
  margin:12px 0;
  color:var(--gold);
  text-shadow:
    2px 2px 0 #000,
    0 0 2px #000;
}

.hero p{
  color:var(--text);
  max-width:650px;
  margin:0 auto 26px;
}

/* Buttons */

.actions{
  display:flex;
  justify-content:center;
  gap:9px;
  flex-wrap:wrap;
}

.button{
  display:inline-flex;
  justify-content:center;
  align-items:center;
  min-height:43px;
  padding:0 18px;

  border:2px solid var(--border);
  border-radius:3px;

  background:
    linear-gradient(#554c3d,#332e26);

  color:var(--text);
  font-weight:800;
  cursor:pointer;
  text-decoration:none;

  box-shadow:
    inset 0 1px 0 #8c8068,
    inset 0 -2px 0 #1b1915,
    2px 2px 0 #000;
}

.button:hover{
  background:linear-gradient(#665a45,#403728);
  color:#fff0a5;
  border-color:#92805a;
}

.button:active{
  transform:translate(1px,1px);
  box-shadow:
    inset 0 1px 0 #4b4437,
    1px 1px 0 #000;
}

.button.primary{
  background:linear-gradient(#7b652d,#4f3d18);
  border-color:#17130c;
  color:#ffe69a;
}

.button.primary:hover{
  background:linear-gradient(#967b38,#604a1d);
}

.button:disabled{
  opacity:.45;
  cursor:not-allowed;
}

.full{
  width:100%;
}

/* OSRS-style windows */

.card{
  position:relative;

  background:
    linear-gradient(135deg,rgba(255,255,255,.035),transparent 45%),
    linear-gradient(#40392f,#302b24);

  border:3px solid var(--border);
  border-radius:2px;
  padding:22px;

  outline:1px solid var(--border-light);

  box-shadow:
    inset 0 1px 0 #817762,
    inset 0 -2px 0 #171512,
    4px 4px 0 #000;
}

.card::before{
  content:"";
  display:block;
  height:5px;
  margin:-8px -8px 14px;

  background:
    linear-gradient(
      90deg,
      #1b1915 0 4%,
      #746a57 4% 48%,
      #1b1915 48% 52%,
      #746a57 52% 96%,
      #1b1915 96%
    );

  border:1px solid #0c0b09;
}

.main-card::before{
  display:none;
}

.form-card{
  margin-top:10vh;
}

.logo{
  text-align:center;
  font-size:42px;
  color:var(--gold);
  text-shadow:3px 3px 0 #000;
}

.form-card h1{
  text-align:center;
  margin:8px 0;
  color:var(--gold);
}

.muted{
  color:var(--muted);
}

.center{
  text-align:center;
}

/* Forms */

label{
  display:block;
  font-weight:800;
  margin:18px 0;
  color:var(--text);
}

input{
  display:block;
  width:100%;
  margin-top:7px;

  background:#171512;
  color:var(--text);

  border:2px solid #11100d;
  border-radius:2px;

  outline:1px solid #6e624e;

  padding:11px;

  font:inherit;
  text-shadow:1px 1px 0 #000;
}

input:focus{
  outline:2px solid var(--gold-dark);
  border-color:#080706;
}

small{
  display:block;
  color:var(--muted);
  font-weight:400;
  margin-top:5px;
}

.message{
  min-height:24px;
  text-align:center;
  color:#e36a5f;
}

/* Game layout */

.game-grid{
  display:grid;
  grid-template-columns:minmax(0,1.5fr) minmax(260px,.7fr);
  gap:12px;
}

.main-card{
  text-align:center;
  padding:28px;
}

/* Strength / main stat */

.strength-wrap{
  padding:20px 0 26px;
}

.label{
  font-size:12px;
  letter-spacing:2px;
  color:var(--muted);
  font-weight:900;
  text-transform:uppercase;
}

.big-number{
  font-size:clamp(60px,12vw,108px);
  font-weight:900;
  line-height:1;
  margin:8px 0;

  color:var(--gold);

  text-shadow:
    3px 3px 0 #000,
    0 0 2px #000;
}

.rate{
  color:#66cf61;
  font-weight:800;
}

/* XP bar */

.progress{
  height:18px;
  padding:2px;

  background:#15130f;

  border:2px solid #100f0c;
  border-radius:2px;

  box-shadow:
    inset 0 1px 2px #000,
    0 0 0 1px #6b604d;
}

.progress div{
  height:100%;
  width:0;

  background:
    linear-gradient(
      #63d85b,
      #299629
    );

  border-right:1px solid #8ee687;
  box-shadow:inset 0 1px 0 #a2f19a;

  transition:width .25s;
}

.requirement{
  display:flex;
  justify-content:space-between;
  color:var(--muted);
  padding:12px 2px 18px;
}

.requirement strong{
  color:var(--text);
}

/* Prestige */

.prestige{
  min-height:56px;
  font-size:18px;

  background:
    linear-gradient(#66532c,#3e321a);

  border-color:#17130b;
  color:#f5d879;
}

.prestige:hover{
  background:linear-gradient(#806a36,#51421f);
}

/* Status */

.status{
  min-height:22px;
  color:var(--muted);
  font-size:13px;
}

/* Side panels */

.side{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.stat{
  display:flex;
  justify-content:space-between;
  align-items:center;

  padding:8px 4px;

  border-bottom:1px solid #5d523f;
}

.stat:last-child{
  border-bottom:0;
}

.stat span{
  color:var(--muted);
}

.stat strong{
  font-size:24px;
  color:var(--gold);
}

/* Info */

.info h3{
  margin-top:0;
  color:var(--gold);
}

.info p{
  color:var(--text);
}

/* Leaderboards */

.boards{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}

.board h2{
  margin-top:0;
  color:var(--gold);
}

.row{
  display:flex;
  justify-content:space-between;
  gap:15px;

  padding:11px 0;

  border-bottom:1px solid #5d523f;
}

.row:last-child{
  border-bottom:0;
}

.rank{
  color:var(--gold);
  min-width:28px;
  font-weight:900;
}

.user{
  flex:1;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
}

.score{
  font-weight:900;
  color:#e4d4a7;
}

/* Headings */

.card h1,
.card h2,
.card h3{
  text-shadow:2px 2px 0 #000;
}

/* OSRS-like separators */

hr{
  border:0;
  border-top:2px solid #15130f;
  border-bottom:1px solid #756a55;
  margin:16px 0;
}

/* Links */

.back{
  display:inline-block;
  margin-bottom:10px;
  padding:5px 8px;
}

/* Scrollbars */

::-webkit-scrollbar{
  width:14px;
}

::-webkit-scrollbar-track{
  background:#211e19;
  border-left:2px solid #11100d;
}

::-webkit-scrollbar-thumb{
  background:linear-gradient(#655b4a,#39342b);
  border:2px solid #11100d;
}

::-webkit-scrollbar-thumb:hover{
  background:linear-gradient(#776a53,#474033);
}

/* Selection */

::selection{
  background:#806b31;
  color:#fff3b0;
}

/* Mobile */

@media(max-width:720px){

  .game-grid,
  .boards{
    grid-template-columns:1fr;
  }

  .topbar{
    align-items:flex-start;
    flex-direction:column;
  }

  .topbar nav{
    gap:3px;
  }

  .topbar a:not(.brand),
  .link-button{
    padding:6px 8px;
  }

  .hero{
    padding:55px 10px;
  }

  .page{
    width:min(100% - 16px,1080px);
  }

  .button{
    width:100%;
  }

  .actions .button{
    width:auto;
    min-width:160px;
  }

  .card{
    padding:16px;
  }
}
