@font-face {
  font-family: Kanit;
  src: url('/fonts/kanit-thai-400-normal.woff2');
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0E01-0E5B, U+200B;
}
@font-face {
  font-family: Kanit;
  src: url('/fonts/kanit-thai-600-normal.woff2');
  font-weight: 600 900;
  font-display: swap;
  unicode-range: U+0E01-0E5B, U+200B;
}
@font-face {
  font-family: Kanit;
  src: url('/fonts/kanit-latin-400-normal.woff2');
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2000-206F;
}
@font-face {
  font-family: Kanit;
  src: url('/fonts/kanit-latin-600-normal.woff2');
  font-weight: 600 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2000-206F;
}
:root {
  color-scheme: light;
  --bg: #f8f7ef;
  --paper: #fffef9;
  --ink: #233f31;
  --green: #25563b;
  --green2: #183f2e;
  --soft: #e9eedf;
  --line: #dedfce;
  --dim: #626d5e;
  --gold: #bd822a;
  --err: #963b30;
  font:
    16px/1.55 Kanit,
    system-ui,
    sans-serif;
  color: var(--ink);
  background: var(--bg);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-width: 300px;
}
h1,
h2,
h3,
h4,
p {
  margin: 0;
}
h1,
h2,
h3,
h4 {
  line-height: 1.27;
}
a {
  color: inherit;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  color: inherit;
}
button:disabled {
  cursor: default;
  opacity: 0.52;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
.game-partner {
  display: flex;
  align-items: center;
  gap: 0.42em;
  color: #354e70;
  font-weight: 600;
  line-height: 1.15;
}
.game-partner img {
  flex: none;
  width: var(--partner-logo-size);
  height: var(--partner-logo-size);
  object-fit: contain;
}
.game-partner span {
  white-space: nowrap;
}
svg {
  display: block;
  flex: none;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #bc8732;
  outline-offset: 3px;
}
button[aria-current='page'],
a[aria-current='page'] {
  color: var(--green);
}
[hidden] {
  display: none !important;
}
.skip {
  position: fixed;
  top: 5px;
  left: 5px;
  z-index: 8;
  background: white;
  transform: translateY(-200%);
  padding: 8px;
}
.skip:focus {
  transform: none;
}
.loading {
  min-height: 70vh;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 16px;
}
.loading img {
  width: 90px;
}
.icon {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 1.7;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon.sm {
  width: 16px;
  height: 16px;
}
.icon.lg {
  width: 26px;
  height: 26px;
}
.btn,
.actions {
  display: flex;
  align-items: center;
  gap: 9px;
}
.desc,
.muted {
  color: var(--dim);
}
.desc {
  margin: 7px 0 20px;
  font-size: 0.95rem;
}
.field {
  display: grid;
  gap: 6px;
  margin: 0 0 13px;
  font-size: 0.9rem;
  font-weight: 600;
}
.field input,
.field select,
.field textarea,
.searchbar {
  width: 100%;
  border: 1px solid #cbd0c0;
  border-radius: 9px;
  color: var(--ink);
  background: #fff;
  min-height: 44px;
  line-height: 1.45;
  padding: 10px 12px;
  font-weight: 400;
}
.input-wrap {
  position: relative;
}
.input-wrap > .icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: #7b8979;
}
.input-wrap input {
  padding-left: 40px;
}
.btn {
  justify-content: center;
  background: var(--green);
  color: #fffdf3;
  border: 1px solid var(--green);
  font-weight: 600;
  font-size: 0.93rem;
  border-radius: 9px;
  min-height: 42px;
  padding: 9px 16px;
  text-decoration: none;
  line-height: 1.4;
}
.btn:hover:not(:disabled) {
  background: var(--green2);
}
.btn.alt {
  background: #f6f6ed;
  color: var(--green);
  border-color: var(--line);
}
.btn.alt:hover:not(:disabled) {
  background: #e9eddf;
}
.btn.wide {
  width: 100%;
}
.btn.danger {
  background: #8e493a;
  border-color: #8e493a;
}
.helper {
  display: flex;
  gap: 10px;
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding-top: 19px;
  font-size: 0.83rem;
  line-height: 1.5;
  color: var(--dim);
}
.helper svg {
  margin-top: 2px;
  color: #758363;
}
.helper strong {
  display: block;
  color: var(--ink);
  font-size: 0.87rem;
}
.err {
  color: var(--err);
  line-height: 1.45;
  font-size: 0.88rem;
  margin: 8px 0;
}
.back,
.quiet {
  display: inline-flex;
  color: var(--green);
  padding: 2px 0;
  gap: 6px;
}
.back {
  background: none;
  border: none;
  align-items: center;
  margin-bottom: 12px;
  font-size: 0.83rem;
}
.matches {
  display: grid;
  gap: 6px;
  max-height: 220px;
  overflow: auto;
  margin: 10px 0;
}
.match {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbf3;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
}
.match small {
  color: var(--dim);
}
.remote-auth .selected {
  padding: 8px 12px;
  background: var(--soft);
  border-radius: 9px;
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
}
.actions {
  flex-wrap: wrap;
  margin-top: 14px;
}
#notice {
  position: fixed;
  z-index: 9;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  max-width: min(92vw, 560px);
  background: #153767;
  color: white;
  padding: 11px 19px;
  border-radius: 12px;
  box-shadow: 0 4px 20px #172d2040;
  text-align: center;
}
#dialog {
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 18px;
  width: min(460px, 92vw);
  padding: 24px;
  background: var(--paper);
  max-height: 88vh;
}
#dialog::backdrop {
  background: #10261886;
}
#dialog h2 {
  font-size: 1.45rem;
  margin-bottom: 10px;
}
#dialog p {
  color: var(--dim);
  margin-bottom: 12px;
}
#dialog form {
  margin: 8px 0;
}
