/* table.polish.css — Table · ชั้นตกแต่ง (แสงเงา ป้าย กลีบซากุระ) (แยกจาก polish.css เดิม)
   ลำดับ <link> ใน index.html มีผลต่อการทับกันของกฎ — ไฟล์ชั้นเดียวกันเรียงตามเลขส่วน */
/* ===== ไพ่: กระดาษมีมิติ + แสงเงา ===== */
.c {
  position: relative;
  border-color: #b9ae8f;
  box-shadow:
    0 1px 0 #fff9 inset,
    0 -2px 3px #0002 inset,
    0 3px 6px #0006,
    0 1px 0 #0005;
}
.c::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(130deg, #ffffff8c 0%, #ffffff00 38%, #0000 62%, #00000014 100%);
}
.c > span {
  font-size: 1.28em;
  line-height: 1;
  filter: drop-shadow(0 1px 0 #0002);
}
.c.r {
  color: #c3182a;
}
.c.sp {
  outline-color: #ffd25a;
  box-shadow:
    0 0 8px #ffd25a99,
    0 3px 6px #0006;
}
/* ===== ไพ่ในมือ ===== */
.c.new,
.m.new {
  animation: pl-deal 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
}
@keyframes pl-deal {
  from {
    opacity: 0;
    transform: translate(40px, -60px) rotate(18deg) scale(0.7);
  }
  to {
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .c.new,
  .m.new {
    animation: none;
  }
}
/* ===== หน้าสรุปผลจบตา (รวมในหน้าจอเดียว) ===== */
.ov.rsv {
  z-index: 50;
  overflow: hidden;
  padding: max(8px, 1.5dvh) max(8px, 2vw);
  background: radial-gradient(ellipse at 50% 40%, #1b1048cc, #05030fe6);
  backdrop-filter: blur(3px);
}
.rs {
  width: min(100%, 780px);
  max-height: calc(100dvh - 16px);
  display: flex;
  flex-direction: column;
  gap: 1.2dvh;
  padding: 1.6dvh 1.6vw;
  border-radius: 20px;
  color: #fff;
  background: linear-gradient(170deg, #2c1f66f2, #120b32f7);
  border: 2.5px solid #ffe9a8;
  box-shadow:
    0 0 30px #ffd25a55,
    0 14px 40px #000c;
  animation: rs-in 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
}
@keyframes rs-in {
  from {
    opacity: 0;
    transform: scale(0.88) translateY(20px);
  }
}
.rs.lose {
  border-color: #9aa6d8;
  box-shadow:
    0 0 24px #6f7fd055,
    0 14px 40px #000c;
}
.rs-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.rs-ttl small {
  display: block;
  font-weight: 700;
  font-size: max(11px, 2.2dvh);
  color: #ffe9a8;
}
.rs.lose .rs-ttl small {
  color: #c7d0ff;
}
.rs-ttl h2 {
  margin: 0;
  font-size: max(20px, 5.2dvh);
  line-height: 1.1;
  font-weight: 800;
  background: linear-gradient(#fff, #ffd25a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 3px #0008);
}
.rs-down {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: max(10px, 2dvh);
  color: #d6deef;
}
.rs-down .c {
  width: max(26px, 6dvh);
  height: max(36px, 8.4dvh);
  font-size: max(12px, 2.6dvh);
  cursor: default;
}
.rs-body {
  display: grid;
  grid-template-columns: minmax(120px, 28%) 1fr;
  gap: 1.4vw;
  min-height: 0;
}
.rs-kv {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  font-size: max(11px, 2.3dvh);
  border-top: 1px solid #ffffff22;
  padding-top: max(3px, 0.7dvh);
}
.rs-kv span {
  color: #d6deef;
}
.rs-kv b {
  color: #fff;
}
.rs-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}
.rs-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: max(4px, 0.8dvh);
}
.rs-tabs button {
  flex: 1;
  border: 1.5px solid #ffffff33;
  border-radius: 99px;
  background: #ffffff10;
  color: #d6deef;
  font:
    700 max(11px, 2.3dvh)/1.2 Sarabun,
    sans-serif;
  padding: max(4px, 0.8dvh) 6px;
  cursor: pointer;
  margin: 0;
  width: auto;
  box-shadow: none;
}
.rs-tabs button.on {
  background: linear-gradient(#fff3c9, #f2b84b);
  color: #3b2410;
  border-color: #fff;
  box-shadow: 0 2px 8px #0006;
}
.rs-pane {
  overflow: auto;
  min-height: 0;
  max-height: calc(100dvh - 31dvh);
  scrollbar-width: thin;
}
.rs-row {
  display: grid;
  grid-template-columns: auto auto 1fr auto auto;
  align-items: center;
  gap: 8px;
  padding: max(3px, 0.7dvh) 8px;
  margin-bottom: max(3px, 0.6dvh);
  border-radius: 12px;
  background: #ffffff0d;
  border: 1.5px solid transparent;
}
.rs-row.me {
  background: #ffe9a826;
  border-color: #ffe9a8aa;
}
.rs-row.knk {
  box-shadow: inset 3px 0 0 #ffd25a;
}
.rs-rk {
  font-size: max(15px, 3.4dvh);
  min-width: 1.4em;
  text-align: center;
}
.rs-av {
  width: max(28px, 6.4dvh);
  height: max(28px, 6.4dvh);
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(#ffe3a3, #f2a93b);
  border: 2px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.rs-av img,
.rs-av .avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}
.rs-emo {
  font-size: max(15px, 3.4dvh);
}
.rs-who {
  min-width: 0;
}
.rs-who > b {
  display: block;
  font-size: max(12px, 2.7dvh);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rs-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}
.rs-chips i {
  font-style: normal;
  font-size: max(9px, 1.8dvh);
  background: #ffffff1c;
  color: #e8e2ff;
  border-radius: 99px;
  padding: 0 6px;
  white-space: nowrap;
}
.rs-pt {
  font-size: max(15px, 3.4dvh);
  font-weight: 800;
  text-align: right;
  line-height: 1;
}
.rs-pt small {
  display: block;
  font-size: max(8px, 1.6dvh);
  font-weight: 600;
  color: #aebbd8;
}
.rs-cd {
  min-width: 4.6em;
  text-align: center;
  font-weight: 800;
  font-size: max(11px, 2.4dvh);
  padding: max(2px, 0.5dvh) 8px;
  border-radius: 99px;
  background: #ffffff18;
}
.rs-cd.neg {
  background: #a8322d;
  color: #ffecec;
}
.rs-pay > div {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: center;
  padding: max(3px, 0.7dvh) 8px;
  margin-bottom: 3px;
  border-radius: 10px;
  background: #ffffff0d;
  font-size: max(11px, 2.3dvh);
}
.rs-pay em {
  font-style: normal;
  color: #ffe9a8;
  font-size: max(10px, 2dvh);
}
.rs-sub,
.rs-none {
  margin: 0 0 4px;
  color: #d6deef;
  font-size: max(10px, 2dvh);
}
.rs-shuf {
  font-size: max(11px, 2.3dvh);
}
.rs-shuf p {
  margin: 2px 0;
}
.rs-foot {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}
.rs-foot p {
  margin: 0;
  width: 100%;
  text-align: center;
  font-size: max(10px, 2dvh);
  color: #ffd978;
}
.rs-foot button {
  flex: 1;
  max-width: 260px;
  margin: 0;
  border: 2px solid #fff9;
  border-radius: 14px;
  padding: max(6px, 1.3dvh) 10px;
  font:
    800 max(13px, 3dvh)/1.1 Sarabun,
    sans-serif;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(#78e08f, #1f9a4a);
  text-shadow: 0 2px 2px #0006;
  box-shadow:
    0 4px 0 #0005,
    0 8px 14px #0007,
    inset 0 2px 0 #fff6;
}
.rs-foot button.g {
  background: linear-gradient(#5a6aa8, #2b3568);
  flex: 0 1 150px;
}
.rs-foot button:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #0005;
}
.rs-foot button:disabled {
  filter: grayscale(0.7) brightness(0.8);
}
@media (max-aspect-ratio: 1/1) {
  .rs-body {
    grid-template-columns: 1fr;
  }
  .rs-pane {
    max-height: 46dvh;
  }
}
@media (prefers-reduced-motion: reduce) {
  .rs {
    animation: none;
  }
}
.rs-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin-top: 2px;
}
.rs-cards .c,
.rs-cards .gc {
  transform: scale(0.75);
  transform-origin: left top;
  margin-right: -6px;
}
.rs-pt > small {
  font-size: max(10px, 2.1dvh);
  font-weight: 800;
  color: #fff;
}
