.clicker-page .clicker-layout {
  --heading:var(--gold);
  --detail:var(--muted);
  --jade:#a6dbc0;
  --player:#d4dccb;
  --sky:#b5d7d5;
  --berry:#edc596;
  --club-rule:#ae93634f;
  --club-selected:#335447;
  --club-selected-ink:#f8f5de;
  padding-bottom:max(24px,env(safe-area-inset-bottom));
}

.clicker-page[data-theme=light] .clicker-layout {
  --jade:#235b44;
  --player:#3d4e44;
  --sky:#315957;
  --berry:#804b2a;
  --club-rule:#8d795e70;
  --club-selected:#284c3c;
}

.clicker-page #lobby {
  max-width:850px;
  margin:12px auto 32px;
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
}

.knock-sign {
  position:relative;
  display:flex;
  align-items:flex-end;
  min-height:190px;
  padding:28px;
  border-block:1px solid #a68b63;
  background:linear-gradient(90deg,#15221fe6,transparent 65%),linear-gradient(0deg,#151c2288,transparent 58%),#283c40 url('/hall-online.webp') center 53% / cover;
}

.knock-sign::after {
  content:"";
  position:absolute;
  inset:6px;
  border:1px solid #f1d99d61;
  pointer-events:none;
}

.clicker-page #lobby h1 {
  margin:0;
  color:#fff0cf;
  font-size:42px;
  line-height:1.05;
  text-wrap:balance;
  text-shadow:0 2px 5px #121c1c;
}

.club-registration {
  display:grid;
  grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);
  gap:36px;
  padding:24px 0;
  border-bottom:1px solid var(--club-rule);
}

.club-registration .recent {
  align-self:start;
  margin:0;
  padding:0 0 0 24px;
  border:0;
  border-inline-start:1px solid var(--club-rule);
}

.clicker-page #lobby .recent h2,.clicker-page #game :is(.shop-heading,.room-social) h2 {
  font-size:22px;
  font-weight:650;
  line-height:1.2;
}

.clicker-layout .room-modes {
  background:var(--input);
  border-color:var(--club-rule);
}

.clicker-page #lobby .room-modes button[aria-pressed=true],.clicker-page #shop-tabs button[aria-pressed=true],.clicker-layout #enter-room {
  background:var(--club-selected);
  color:var(--club-selected-ink);
}
.clicker-layout #enter-room:hover:not(:disabled) {background:#39644e;color:white;}
.clicker-page #lobby-status:empty {margin:0;min-block-size:0;}

.clicker-page .room-top {
  align-items:center;
  border-block:1px solid var(--club-rule);
  padding-block:12px;
}
.clicker-page .room-top .balance {
  justify-content:start;
  grid-template-columns:auto minmax(0,1fr);
  column-gap:16px;
}
.club-room-title {
  grid-column:1 / -1;
  font-size:22px;
  line-height:1.1;
}
.club-coins {
  position:absolute; left:12px; top:12px; z-index:1; max-width:calc(100% - 24px);
  min-width:0; overflow-wrap:anywhere; padding:5px 10px; border-radius:4px;
  color:#fff1cd; background:#1c2926f2; border:1px solid #d5ba8280; pointer-events:none;
}
.clicker-page .club-coins #coins {color:inherit;background:none;}
.clicker-page .club-coins .coin-label {color:#e8dbc0;}
.clicker-page .balance .rates {
  align-content:center;
  min-height:28px;
}
.clicker-page .rates > span {white-space:normal;overflow-wrap:anywhere;}
.clicker-page .room-shop,.clicker-page .room-social > section {
  border:0;
  border-top:2px solid var(--club-rule);
  border-radius:0;
  background:transparent;
  padding:12px 0 0;
}
.clicker-page #progress {accent-color:var(--jade);}
.clicker-page #knock {
  min-height:62px;
  border-radius:5px;
  border-color:#a17b51;
  background:linear-gradient(#35261ccc,#2a211ae0),#4d382c url('/timber.webp') center / 600px auto;
  box-shadow:inset 0 0 0 3px #4b382e,inset 0 0 0 4px #c6a1708a,inset 0 -3px #241b15;
  color:#fff0cf;
  font:700 32px/1.1 var(--woodays-type,Georgia,serif);
  justify-content:center;
}
.clicker-page #knock:hover:not(:disabled) {background-color:#816248;background-blend-mode:screen,multiply;color:#fff;}
.clicker-page #knock:active:not(:disabled) {box-shadow:inset 0 2px 6px #19120e;}
.clicker-page :is(#chat-log,#standings) {
  border-block:1px solid var(--club-rule);
}
.clicker-page #chat-log {
  padding:8px;
  background:var(--input);
}

.clicker-page #entry {
  gap:16px;
}

.clicker-page #entry > .room-modes button {
  min-height:44px;
  padding:7px 6px;
  font-size:13px;
}

.clicker-page :is(#enter-room,#chat-send,#paste-code) {
  min-height:44px;
}

.clicker-page #entry-colors summary {
  min-height:44px;
}

.clicker-page .nickname-sample {
  float:inline-end;
  max-width:45%;
  padding:1px 6px;
  border-radius:3px;
  background:#233330;
}
.clicker-page #style-preview {display:block;float:none;max-width:100%;}

.clicker-page :is(#lobby-status,#game-status) {
  min-block-size:1.5em;
  line-height:1.5;
  overflow-wrap:anywhere;
}

.clicker-page #lobby-status {
  margin-top:10px;
}

.clicker-page .recent-heading {
  flex-wrap:wrap;
}

.clicker-page #recent-rooms a {
  min-height:44px;
  align-items:center;
  flex-wrap:wrap;
  gap:2px 8px;
}

.clicker-page #recent-rooms time {
  font-size:12px;
  font-variant-numeric:tabular-nums;
}

.clicker-page .room-layout {
  grid-template-columns:minmax(0,1fr) minmax(250px,310px) minmax(230px,270px);
}

.clicker-page .room-line {
  flex-wrap:wrap;
}

.clicker-page .scene-caption {
  font-size:11px;
}

.clicker-page #room-code {
  white-space:nowrap;
  line-height:1.5;
}

.clicker-page .room-top .balance > div:first-child {
  min-width:0;
  overflow-wrap:anywhere;
}

.clicker-page .milestone {
  flex-wrap:wrap;
  font-size:13px;
  gap:4px 12px;
}

.clicker-page :is(.milestone strong,.rates,.row button,#weekly-rank) {
  font-variant-numeric:tabular-nums;
}

.clicker-page #panel {
  padding:4px 5px 4px 3px;
  scroll-padding-block:8px;
}

.clicker-page #panel .row {
  padding-block:12px;
}

.clicker-page #panel .row > div {
  min-width:0;
  overflow-wrap:anywhere;
}

.clicker-page #panel .row strong {
  font-size:14px;
  line-height:1.35;
}

.clicker-page #panel .row p {
  line-height:1.5;
}

.clicker-page :is(#panel button,#shop-tabs button,#reward) {
  min-height:44px;
}

.clicker-page .bank {
  padding:8px 0;
  border-radius:0;
}

.clicker-page .bank > div {
  min-width:0;
  overflow-wrap:anywhere;
}

.clicker-page .room-social {
  align-items:start;
}

.clicker-page .room-social > section {
  min-width:0;
}

.clicker-page .standings-labels {
  display:flex;
  justify-content:space-between;
  gap:12px;
  margin-bottom:4px;
  padding-inline:5px;
  color:var(--detail);
  font-size:11px;
}

.clicker-page #standings {
  max-height:240px;
  padding:2px;
  scrollbar-gutter:stable;
}

.clicker-page #standings li {
  grid-template-columns:2ch minmax(0,1fr) auto;
  min-height:38px;
  gap:7px;
  padding:8px 4px;
  border-radius:4px;
  font-size:13px;
  line-height:1.4;
}

.clicker-page #standings li.is-you {
  background:var(--hover);
}

.clicker-page #standings .rank {
  text-align:center;
  font-variant-numeric:tabular-nums;
}

.clicker-page #standings strong {
  text-align:end;
  white-space:nowrap;
}

.clicker-page #standings .player-name {
  overflow:visible;
}

.clicker-page #weekly-rank {
  margin-top:8px;
  color:var(--detail);
  font-size:12px;
  line-height:1.5;
}

.clicker-page .clicker-chat {
  display:grid;
  grid-template-rows:auto 240px auto 3em;
  font-size:12px;
}

.clicker-page #chat-log {
  height:240px;
  min-height:0;
  padding:4px;
  font-size:13px;
  line-height:1.5;
}

.clicker-page #chat-log p {
  padding-block:6px;
}

.clicker-page #chat-form {
  display:block;
  min-width:0;
  margin-top:10px;
}

.clicker-page #chat-controls {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:8px;
  min-width:0;
  margin:0;
  padding:0;
  border:0;
}

.clicker-page #chat-input {
  font-size:16px;
}

.clicker-page #chat-send {
  padding-inline:12px;
  font-size:14px;
}

.clicker-page #chat-status {
  block-size:3em;
  overflow:auto;
  overflow-wrap:anywhere;
  color:var(--detail);
}

.clicker-page :is(#panel,#standings,#chat-log,#records,#chat-status) {
  overscroll-behavior:contain;
  scrollbar-color:var(--detail) var(--panel);
  scrollbar-width:thin;
}

.clicker-page :is(#panel,#standings,#chat-log):focus-visible {
  outline:2px solid var(--gold);
  outline-offset:2px;
}

.clicker-page :is(summary,select):focus-visible {
  outline:2px solid var(--gold);
  outline-offset:3px;
}

.clicker-page :is(#panel,#standings,#chat-log) button:focus-visible {
  outline-offset:1px;
}

.clicker-page input {
  caret-color:var(--gold);
}

@media (max-width:1000px) and (min-width:736px) {
  .clicker-page .room-layout {
    grid-template-columns:minmax(0,1fr) minmax(260px,310px);
  }

  .clicker-page .room-stage {
    grid-row:auto;
  }

  .clicker-page .room-social {
    grid-column:1 / -1;
  }
}

@media (max-width:1000px) and (min-width:620px) {
  .clicker-page .room-social {
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .clicker-page .room-social:has(#leaderboard[hidden]) {
    grid-template-columns:minmax(0,1fr);
  }
}

@media (max-width:735px) {
  .clicker-page .room-layout {
    grid-template-columns:minmax(0,1fr);
  }

  .clicker-page .room-line {
    gap:6px;
  }

  .clicker-page :is(.room-line .tool,.shop-heading .tool,.recent-room .tool,#paste-code) {
    width:44px;
    min-height:44px;
  }

  .clicker-page #panel {
    max-height:360px;
  }

  .clicker-page #clear-history {
    min-height:44px;
  }

  .clicker-page .bar {
    flex-wrap:wrap;
    gap:8px;
    padding:10px 16px;
  }

  .clicker-page .bar :is(.tool,.icon-button) {
    width:44px;
    min-height:44px;
  }

  .clicker-page .bar .brand {
    margin-inline-end:auto;
  }

  .clicker-page .bar .back {
    border:0;
    padding-inline:6px;
  }

  .clicker-page .bar :is(#sound,#settings) {
    margin-left:0;
  }

  .clicker-page .bar #account-action {
    min-height:44px;
    max-width:100%;
    overflow-wrap:anywhere;
  }
}

@media (max-width:440px) {
  .clicker-page #lobby h1 {
    font-size:32px;
  }

  .clicker-page .room-line #room-code {
    flex-basis:100%;
  }

  .clicker-page .room-line {
    justify-content:flex-start;
  }

  .clicker-page #leave {
    margin-inline-start:auto;
  }

  .clicker-page .color-row {
    grid-template-columns:minmax(0,1fr) 44px minmax(72px,96px);
    gap:6px;
  }

  .clicker-page .color-row input[type=color] {
    width:44px;
    height:44px;
  }
}

@media (max-width:650px) {
  .clicker-page #lobby {margin-top:0;}
  .knock-sign {min-height:148px;padding:18px;background-position:center,center,60% 55%;}
  .club-registration {grid-template-columns:minmax(0,1fr);gap:20px;padding:18px 0;}
  .club-registration .recent {border:0;border-top:1px solid var(--club-rule);padding:14px 0 0;}
}
