:root {
  --tile-light: #fffbec;
  --tile-base: #e9dcc1;
  --tile-green: #406c57;
  --porcelain-ink: #193849;
}
body {
  background: radial-gradient(ellipse at 50% -14%,#314638,#15251e 47%,#0c1713 78%);
}
.hero {
  box-shadow: inset 0 0 0 4px #13271f9c, 0 18px 38px #06130f73;
}
#lobby h2 { font-family:"Songti SC","Noto Serif CJK SC",serif; }
.mode { transition: border-color .17s, background .17s, transform .17s; }
.mode:hover { transform:translateY(-2px); }
.gamebar {
  border-bottom: 1px solid #bba37632;
  margin-bottom: 8px;
}
.gamebar button { background:#193026; }
.gamebar #status { min-height: 17px; }
.table,.duel .table {
  background:
    repeating-linear-gradient(32deg,#d5dec007 0 1px,transparent 1px 3px),
    repeating-linear-gradient(118deg,#12241a16 0 1px,transparent 1px 4px),
    radial-gradient(ellipse at 49% 40%,#335940,#254934 55%,#173729 83%,#10271e);
  border-left-color:#806443;
  border-right-color:#806443;
  box-shadow:0 3px #543c28,0 8px #281d17,0 20px 39px #030d0ad0,
    inset 0 0 0 2px #d4b37d9c,inset 0 0 0 6px #152b22aa,inset 0 0 43px #0b1c15ce;
}
.table::before { border-color:#bfaa7554; }
.wallstack {
  background:
     repeating-linear-gradient(90deg,transparent 0 8px,#203025a8 8px 9px),
     linear-gradient(#e1ddc1 0 13%,#e2d6b8 14% 38%,#74917c 39% 54%,#cac1a6 55% 74%,#48705b 75% 100%);
  transition:width .2s ease;
  opacity:.88;
}
.river {
  background:#10291e3d;
  border-color:#aacba135;
}
#compass {
  background:radial-gradient(#34513c,#162b22);
  box-shadow:0 0 0 3px #c0a36d45,inset 0 0 0 3px #20342a,0 3px 10px #0a1e1657;
}
#compass.mine { box-shadow:0 0 0 3px #d5b37878,0 0 14px #f0c0753d; }
.rack {
  border-color:#b4a17761;
  background:linear-gradient(135deg,#2b392f,#17271f 74%);
  margin-top:13px;
}
.racktop button { transition:background .14s, border-color .14s; }
#hand { background:linear-gradient(#0c1f18b8,#26392c54); }
.tile, #hand .tile {
  color: #184b36;
  background: linear-gradient(152deg,var(--tile-light) 8%,#f6edd9 52%,var(--tile-base) 100%);
  border-color: #fff5dc #d3c1a0 #47715a #e4d4b6;
  box-shadow: inset 0 0 0 1px #fff8e8a1, 0 2px 2px #10271cc4;
}
#hand .tile {
  box-shadow: inset 0 0 0 1px #fff6dec7,0 3px 3px #091a13b9;
  transition:transform .17s cubic-bezier(.2,.65,.25,1),filter .17s,box-shadow .17s;
  touch-action: manipulation;
}
#hand .tile:enabled:hover { filter:brightness(1.05); }
#hand .tile.selected {
  outline-color:#eac688;
  box-shadow:inset 0 0 0 1px #fff7df, 0 5px 8px #06140cd6;
}
.flying-tile { position:fixed; pointer-events:none; z-index:10; margin:0; }
@media(max-height:570px) and (orientation:landscape) {
  .gamebar { margin-bottom:3px; }
  .rack { margin-top:9px; }
}
@media(prefers-reduced-motion:reduce){
  #hand .tile,.mode,.wallstack,.racktop button { transition:none; }
  .mode:hover { transform:none; }
}
