/* เธอ — สไตล์ทั้งหมด (โทนเข้ม อุ่น เรียบ ไม่มีฟอนต์หรือไฟล์จากภายนอก) */

:root {
  color-scheme: dark;
  --bg: #14161b;
  --bg-2: #191c23;
  --card: #1f232b;
  --card-2: #282d37;
  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.13);
  --text: #f1ece4;
  --muted: #aba69d;
  --faint: #7b766e;
  --good: #8fd0a0;
  --good-rgb: 143, 208, 160;
  --danger: #e5857a;
  --me: #e3b36b;
  --me-rgb: 227, 179, 107;
  --you: #6fc3b2;
  --you-rgb: 111, 195, 178;
  --r: 22px;
  --r-s: 14px;
  --pad: 20px;
  --bar-h: 76px;
  --font: 'Sukhumvit Set', -apple-system, BlinkMacSystemFont, 'Thonburi', 'Noto Sans Thai', 'Leelawadee UI', 'Loma', system-ui, sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  overscroll-behavior-y: none;
}

/* พื้นหลัง: ไล่สีจาง ๆ สองมุม (สีของสองคน) + ลายจุดละเอียด */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 60% at 0% 0%, rgba(var(--you-rgb), 0.13), transparent 60%),
    radial-gradient(110% 55% at 100% 8%, rgba(var(--me-rgb), 0.1), transparent 62%),
    linear-gradient(180deg, var(--bg-2), var(--bg) 55%);
}
.backdrop::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1.3px);
  background-size: 18px 18px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 78%);
  mask-image: linear-gradient(180deg, #000 0%, transparent 78%);
}

#app {
  position: relative;
  z-index: 1;
  max-width: 520px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}
button {
  -webkit-appearance: none;
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  text-align: inherit;
}
h1,
h2,
h3,
p {
  margin: 0;
}
[hidden] {
  display: none !important;
}
svg {
  width: 1.25em;
  height: 1.25em;
  flex: 0 0 auto;
  vertical-align: -0.22em;
}
/* วลีสั้น ๆ ไม่ถูกตัดกลางคำ (ภาษาไทยไม่มีช่องว่างระหว่างคำ จึงให้ขึ้นบรรทัดใหม่ตรงช่องว่างระหว่างวลีก่อน) */
.nw {
  white-space: nowrap;
}
.h1,
.h2,
.qtext {
  text-wrap: balance;
}
p {
  text-wrap: pretty;
}

/* ----- หน้าจอ ----- */
.screen {
  min-height: 100vh;
  min-height: 100dvh;
  padding: calc(env(safe-area-inset-top, 0px) + 14px) var(--pad) calc(env(safe-area-inset-bottom, 0px) + 28px);
  display: flex;
  flex-direction: column;
  animation: screen-in 0.22s var(--ease) both;
}
.screen.with-bar {
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + var(--bar-h) + 28px);
}
@keyframes screen-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  margin-bottom: 8px;
}
.topbar .title {
  font-size: 18px;
  font-weight: 600;
}
.wordmark {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--text);
  opacity: 0.92;
  -webkit-user-select: none;
  user-select: none;
}
.wordmark.egg {
  color: var(--you);
  opacity: 1;
  animation: fade 0.35s var(--ease) both;
}
.near {
  margin: -10px 0 16px;
}
.iconbtn {
  width: 44px;
  height: 44px;
  margin: 0 -10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--muted);
  transition: background 0.15s, color 0.15s;
}
.iconbtn:active {
  background: var(--line);
  color: var(--text);
}
.iconbtn svg {
  width: 24px;
  height: 24px;
}

/* ----- การ์ด ----- */
.card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 20px;
  overflow: hidden;
}
/* เนื้อกระดาษบาง ๆ บนการ์ด */
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}
.card > * {
  position: relative;
}
.card + .card,
.stack > * + * {
  margin-top: 14px;
}
.card.tint-you {
  border-color: rgba(var(--you-rgb), 0.35);
  background: linear-gradient(180deg, rgba(var(--you-rgb), 0.1), transparent 70%), var(--card);
}
.card.tint-me {
  border-color: rgba(var(--me-rgb), 0.3);
  background: linear-gradient(180deg, rgba(var(--me-rgb), 0.08), transparent 70%), var(--card);
}
.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
}
.eyebrow.you {
  color: var(--you);
}
.eyebrow.me {
  color: var(--me);
}
.h1 {
  font-size: 26px;
  line-height: 1.4;
  font-weight: 700;
}
.h2 {
  font-size: 21px;
  line-height: 1.45;
  font-weight: 600;
}
.muted {
  color: var(--muted);
}
.faint {
  color: var(--faint);
}
.small {
  font-size: 14.5px;
  line-height: 1.6;
}
.center {
  text-align: center;
}
.grow {
  flex: 1 1 auto;
}
.gap {
  height: 14px;
}
.gap-l {
  height: 26px;
}

/* ----- ปุ่ม ----- */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 54px;
  padding: 12px 20px;
  border-radius: 18px;
  font-size: 17px;
  font-weight: 600;
  background: var(--me);
  color: #17181c;
  transition: transform 0.12s var(--ease), opacity 0.15s, background 0.15s;
}
.btn:active {
  transform: scale(0.985);
  opacity: 0.9;
}
.btn[disabled] {
  opacity: 0.4;
  pointer-events: none;
}
.btn.ghost {
  background: var(--card-2);
  color: var(--text);
  border: 1px solid var(--line);
}
.btn.quiet {
  background: transparent;
  color: var(--muted);
  min-height: 44px;
  font-weight: 500;
}
.btn.danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid rgba(229, 133, 122, 0.4);
}
.btn.small {
  min-height: 42px;
  width: auto;
  padding: 8px 16px;
  font-size: 15px;
  border-radius: 14px;
}
.row {
  display: flex;
  gap: 10px;
}
.row > * {
  flex: 1 1 0;
}
.row.wrap {
  flex-wrap: wrap;
}
.row.wrap > * {
  flex: 0 0 auto;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--card-2);
  border: 1px solid var(--line);
  font-size: 15px;
  color: var(--text);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.chip:active {
  background: var(--line-2);
}
.chip.on {
  background: rgba(var(--me-rgb), 0.16);
  border-color: rgba(var(--me-rgb), 0.6);
  color: var(--me);
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.field {
  width: 100%;
  min-height: 54px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  font-size: 17px;
  line-height: 1.6;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  resize: none;
}
.field:focus {
  border-color: rgba(var(--me-rgb), 0.7);
}
.field::placeholder {
  color: var(--faint);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  background: var(--card-2);
  color: var(--muted);
}
.tag.good {
  background: rgba(var(--good-rgb), 0.14);
  color: var(--good);
}
.tag.me {
  background: rgba(var(--me-rgb), 0.14);
  color: var(--me);
}
.tag.you {
  background: rgba(var(--you-rgb), 0.14);
  color: var(--you);
}

/* ----- รูปประจำตัว ----- */
.avatar {
  --c: var(--you);
  --c-rgb: var(--you-rgb);
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 19px;
  line-height: 1;
  color: var(--c);
  background: radial-gradient(circle at 30% 25%, rgba(var(--c-rgb), 0.3), rgba(var(--c-rgb), 0.1) 70%);
  box-shadow: inset 0 0 0 1.5px rgba(var(--c-rgb), 0.65);
}
.avatar.mine {
  --c: var(--me);
  --c-rgb: var(--me-rgb);
}
.avatar.s {
  width: 30px;
  height: 30px;
  font-size: 14px;
}
.avatar.xl {
  width: 124px;
  height: 124px;
  font-size: 52px;
  box-shadow: inset 0 0 0 2px rgba(var(--c-rgb), 0.7), 0 0 0 8px rgba(var(--c-rgb), 0.07);
}

/* ----- หน้าแรก ----- */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 0 22px;
  text-align: center;
}
.hero .who {
  position: relative;
  border-radius: 50%;
}
.hero .who:active .avatar {
  transform: scale(0.96);
}
.hero .avatar {
  transition: transform 0.15s var(--ease);
}
.hero .name {
  margin-top: 14px;
  font-size: 24px;
  font-weight: 700;
}
.hero .sub {
  margin-top: 2px;
  min-height: 24px;
  font-size: 14.5px;
  color: var(--faint);
}
.hero .sub.here {
  color: var(--you);
}
.pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  box-shadow: 0 0 0 2px rgba(var(--you-rgb), 0.7);
  animation: pulse 1.1s var(--ease) both;
}
.pulse.mine {
  box-shadow: 0 0 0 2px rgba(var(--me-rgb), 0.7);
}
@keyframes pulse {
  from {
    transform: scale(1);
    opacity: 0.9;
  }
  to {
    transform: scale(1.7);
    opacity: 0;
  }
}

.daycard .theme {
  margin-top: 4px;
}
.daycard .intro {
  margin-top: 8px;
  color: var(--muted);
}
.daycard .state {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 15px;
}
.daycard .btn {
  margin-top: 18px;
}

.bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  padding: 12px var(--pad) calc(env(safe-area-inset-bottom, 0px) + 12px);
  background: linear-gradient(180deg, transparent, rgba(20, 22, 27, 0.92) 34%);
  pointer-events: none;
}
.bar .inner {
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  gap: 10px;
  pointer-events: auto;
}
.bar .btn {
  flex: 1 1 auto;
}
.bar .paw {
  flex: 0 0 54px;
  width: 54px;
  padding: 0;
  background: var(--card-2);
  color: var(--text);
  border: 1px solid var(--line);
}
.bar .paw svg {
  width: 26px;
  height: 26px;
}
/* ปุ่มดูรายงาน: ครั้งแรกมีแสง ดูแล้วจางลงและนิ่ง */
.btn.report.fresh {
  box-shadow: 0 0 0 0 rgba(var(--me-rgb), 0.5);
  animation: glow 2.4s ease-in-out infinite;
}
.btn.report.seen {
  background: var(--card-2);
  color: var(--muted);
  border: 1px solid var(--line);
  font-weight: 500;
}
@keyframes glow {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(var(--me-rgb), 0.45);
  }
  50% {
    box-shadow: 0 0 22px 2px rgba(var(--me-rgb), 0.45);
  }
}

.notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--r-s);
  background: var(--card-2);
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.55;
}

/* ปุ่มคู่: ไม่ตัดคำกลางปุ่มทุกขนาดจอ; จอแคบมาก (320) ตัวเล็กลงและซ่อนไอคอน */
.row > .btn {
  white-space: nowrap;
  padding-left: 12px;
  padding-right: 12px;
}
@media (max-width: 350px) {
  .row > .btn {
    padding-left: 10px;
    padding-right: 10px;
    font-size: 15px;
  }
  .row > .btn svg {
    display: none;
  }
}

/* ----- รหัสคู่ ----- */
.codegrid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.codeword {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 12px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  font-size: 18px;
  font-weight: 600;
}
.codeword i {
  font-style: normal;
  font-size: 12px;
  font-weight: 500;
  color: var(--faint);
  min-width: 14px;
}
.codeword.bad {
  border-color: rgba(229, 133, 122, 0.6);
  color: var(--danger);
}

.swatches {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.swatch {
  --c: #fff;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--c);
  opacity: 0.85;
  box-shadow: 0 0 0 0 transparent;
  transition: transform 0.15s var(--ease), box-shadow 0.15s;
}
.swatch[data-taken] {
  opacity: 0.22;
}
.swatch.on {
  opacity: 1;
  transform: scale(0.86);
  box-shadow: 0 0 0 4px var(--bg), 0 0 0 6.5px var(--c);
}

/* ----- ตอบคำถาม ----- */
.quiz {
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 18px);
}
.progress {
  flex: 1 1 auto;
  height: 4px;
  margin: 0 14px;
  border-radius: 4px;
  background: var(--line-2);
  overflow: hidden;
}
.progress i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 4px;
  background: var(--me);
  transition: width 0.25s var(--ease);
}
.qwrap {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 18px 2px;
  animation: screen-in 0.22s var(--ease) both;
}
.qlabel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.qtext {
  font-size: 25px;
  line-height: 1.5;
  font-weight: 600;
}
.qhint {
  margin-top: 10px;
  color: var(--muted);
  font-size: 15px;
}
.options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: screen-in 0.22s var(--ease) both;
}
.option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 58px;
  padding: 13px 16px;
  border-radius: 18px;
  background: var(--card);
  border: 1.5px solid var(--line);
  font-size: 17px;
  line-height: 1.5;
  transition: background 0.15s, border-color 0.15s, transform 0.12s var(--ease);
}
.option:active {
  transform: scale(0.99);
  background: var(--card-2);
}
.option .dot {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--line-2);
  transition: all 0.15s;
}
.option.on {
  border-color: var(--me);
  background: rgba(var(--me-rgb), 0.1);
}
.option.on .dot {
  border-color: var(--me);
  background: var(--me);
  box-shadow: inset 0 0 0 4px var(--card);
}
.option.guess.on {
  border-color: var(--you);
  background: rgba(var(--you-rgb), 0.1);
}
.option.guess.on .dot {
  border-color: var(--you);
  background: var(--you);
}
.check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 15px;
}
.check .box {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  border: 1.5px solid var(--line-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  transition: all 0.15s;
}
.check.on {
  color: var(--text);
}
.check.on .box {
  background: var(--me);
  border-color: var(--me);
  color: #17181c;
}
.check .box svg {
  width: 14px;
  height: 14px;
}

/* ----- รายงาน ----- */
.qa .qtext {
  font-size: 19px;
  line-height: 1.55;
}
.answer {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 14px;
}
.answer .body {
  flex: 1 1 auto;
  min-width: 0;
}
.answer .who {
  font-size: 13px;
  color: var(--faint);
}
.answer .text {
  font-size: 17px;
  line-height: 1.55;
}
.answer .text.hit {
  color: var(--good);
}
.answer .guessline {
  margin-top: 4px;
  font-size: 14.5px;
  color: var(--muted);
}
.answer .guessline b {
  font-weight: 600;
  color: var(--text);
}
.answer .guessline.hit b {
  color: var(--good);
}
.qa .foot {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.qa .note {
  font-size: 14.5px;
  color: var(--muted);
}
.qa .note.pact {
  color: var(--text);
}
.qa .said {
  font-size: 15px;
}
.qa .said span {
  color: var(--muted);
}
.linkbtn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  font-size: 14.5px;
  color: var(--muted);
}
.linkbtn svg {
  width: 17px;
  height: 17px;
}
.talk {
  border-style: dashed;
  border-color: var(--line-2);
  background: transparent;
}
.talk::before {
  display: none;
}

.list .item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 16.5px;
}
.list .item:last-child {
  border-bottom: 0;
}
.list .item .n {
  flex: 0 0 auto;
  min-width: 34px;
  font-size: 13px;
  font-weight: 600;
  color: var(--faint);
}
.list .item .t {
  flex: 1 1 auto;
}
.list .item svg {
  width: 18px;
  height: 18px;
  color: var(--faint);
}
.pact .q {
  font-size: 14.5px;
  color: var(--muted);
}
.pact .c {
  font-size: 17px;
  font-weight: 600;
}
.pact + .pact {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

/* ----- ตั้งค่า ----- */
.setrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 52px;
  padding: 6px 0;
}
.setrow + .setrow {
  border-top: 1px solid var(--line);
}
.setrow .l {
  flex: 1 1 auto;
}
.setrow .d {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--faint);
}
.switch {
  flex: 0 0 52px;
  width: 52px;
  height: 32px;
  border-radius: 999px;
  background: var(--card-2);
  border: 1px solid var(--line-2);
  position: relative;
  transition: background 0.18s;
}
.switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 0.18s var(--ease), background 0.18s;
}
.switch.on {
  background: rgba(var(--me-rgb), 0.3);
  border-color: rgba(var(--me-rgb), 0.6);
}
.switch.on::after {
  transform: translateX(20px);
  background: var(--me);
}
.dict dt {
  font-weight: 700;
  font-size: 18px;
  margin-top: 22px;
}
.dict dt:first-child {
  margin-top: 0;
}
.dict dd {
  margin: 4px 0 0;
  color: var(--muted);
}

/* ----- แผ่นล่าง ----- */
.scrim {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(8, 9, 12, 0.6);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fade 0.18s ease both;
}
.sheet {
  width: 100%;
  max-width: 520px;
  max-height: 88vh;
  max-height: 88dvh;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: 10px var(--pad) calc(env(safe-area-inset-bottom, 0px) + 22px);
  border-radius: 26px 26px 0 0;
  background: var(--card);
  border-top: 1px solid var(--line-2);
  animation: sheet-in 0.24s var(--ease) both;
}
.sheet .grab {
  width: 40px;
  height: 4px;
  border-radius: 4px;
  background: var(--line-2);
  margin: 0 auto 16px;
}
@keyframes sheet-in {
  from {
    transform: translateY(40px);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}
@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + var(--bar-h) + 18px);
  z-index: 80;
  transform: translateX(-50%);
  max-width: calc(100% - 40px);
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--text);
  color: #17181c;
  font-size: 15px;
  font-weight: 600;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  animation: toast-in 0.2s var(--ease) both;
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translate(-50%, 8px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

/* ----- แสงเวลาอยู่ด้วยกัน: ขอบจอเรืองแสงเป็นสีของอีกคน อยู่บนสุด ไม่รับการแตะ ----- */
#aura {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.2s ease;
  box-shadow: inset 0 0 46px 6px rgba(var(--you-rgb), 0.55), inset 0 0 6px 1px rgba(var(--you-rgb), 0.5);
}
#aura.on {
  opacity: 1;
  animation: breathe 5.5s ease-in-out infinite;
}
@keyframes breathe {
  0%,
  100% {
    opacity: 0.42;
  }
  50% {
    opacity: 1;
  }
}

/* ระลอกเต็มจอเมื่อถูกแตะ */
#ripple {
  position: fixed;
  inset: 0;
  z-index: 99;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at 50% 30%, rgba(var(--you-rgb), 0.35), transparent 62%);
}
#ripple.go {
  animation: ripple 1.4s var(--ease) both;
}
/* สองคนแตะพร้อมกัน: สองสี และอยู่นานขึ้นอีกนิด */
#ripple.both {
  background: radial-gradient(circle at 50% 28%, rgba(var(--you-rgb), 0.4), transparent 56%), radial-gradient(circle at 50% 74%, rgba(var(--me-rgb), 0.36), transparent 56%);
}
#ripple.both.go {
  animation-duration: 2.2s;
}
@keyframes ripple {
  0% {
    opacity: 0;
    transform: scale(0.6);
  }
  25% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: scale(1.5);
  }
}

.spinner {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2.5px solid var(--line-2);
  border-top-color: var(--me);
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ปิดการเคลื่อนไหว (ตั้งค่าในแอป หรือเครื่องตั้ง "ลดการเคลื่อนไหว") */
html.no-motion *,
html.no-motion *::before,
html.no-motion *::after {
  animation-duration: 0.001s !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001s !important;
}
html.no-motion #aura.on {
  animation: none !important;
  opacity: 0.7;
}
html.no-motion .btn.report.fresh {
  animation: none !important;
  box-shadow: 0 0 18px 1px rgba(var(--me-rgb), 0.4);
}
