.venue-remote {
  --ink: #1f3043;
  --dim: #4a6270;
  --green: #185f59;
  --green2: #104d48;
  --soft: #edf5ee;
  --line: #d9e3df;
  --paper: #fffefa;
  min-height: 100svh;
  color: var(--ink);
  background-color: #eff4f2;
  background-image: radial-gradient(#c0d3cd90 0.8px, transparent 0.9px);
  background-size: 9px 9px;
}
.venue-remote #main {
  min-height: 100svh;
}
.player-app {
  width: min(100%, 520px);
  min-height: 100svh;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  background: #f7f8f3;
  box-shadow:
    0 0 0 1px #dbe4df,
    0 0 54px #234c3710;
}
.player-mast {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 68px;
  padding: max(8px, env(safe-area-inset-top)) clamp(14px, 4vw, 22px) 8px;
  background: #fff;
  border-bottom: 1px solid #dce4e1;
}
.player-brand {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-right: auto;
}
.player-brand img {
  width: 43px;
  height: 43px;
  object-fit: contain;
}
.player-brand > span {
  font-size: 0.62rem;
  letter-spacing: 0.11em;
  font-weight: 600;
  line-height: 1.15;
  color: #455248;
}
.player-brand b {
  display: block;
  font-size: 1.18rem;
  letter-spacing: -0.035em;
  color: #203d37;
}
.player-mast .game-partner {
  --partner-logo-size: 38px;
  font-size: 0.61rem;
  color: #384a4c;
}
.back-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 44px;
  min-height: 44px;
  padding: 0 8px;
  background: #f1f5ef;
  border: 1px solid #d3dfd8;
  border-radius: 12px;
  font-weight: 600;
  color: #284b42;
}
.player-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 16px clamp(12px, 4vw, 20px) max(12px, env(safe-area-inset-bottom));
}
.connected .player-content {
  gap: 12px;
  padding-top: 10px;
}
.connected .player-mast {
  min-height: 54px;
}
.routine-rest {
  margin: 0 0 0.65rem;
  padding: 0.55rem 0.75rem;
  border-radius: 0.65rem;
  color: #554122;
  background: #fff4d9;
  font-size: 0.9rem;
  line-height: 1.4;
}
.routine-rest strong {
  display: block;
}
.remote-reconnecting {
  margin: 0;
  padding: 8px 14px;
  border-radius: 12px;
  background: #fff0cc;
  color: #704519;
  font-weight: 600;
}
.player-pass {
  position: relative;
  isolation: isolate;
  border-radius: 20px;
  min-height: 100px;
  padding: 10px 14px;
  display: grid;
  align-content: center;
  gap: 4px;
  overflow: hidden;
  color: #fffcdf;
  background: #174e4d;
  box-shadow: 0 3px 0 #baccc4;
}
.player-pass::before,
.join-illustration::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, #143e3b 0%, #163c38f5 24%, #163c38b8 43%, #15424011 73%),
    url('/art/player/clubhouse.webp') center 52% / cover;
}
.player-pass::after {
  content: '';
  position: absolute;
  inset: 5px;
  border-radius: 15px;
  border: 1px solid #fbe09a9e;
  pointer-events: none;
}
.pass-copy {
  min-width: 0;
  position: relative;
}
.pass-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.seat-label,
.tier-name,
.turn-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.seat-label {
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.25;
}
.pass-heading .seat-label {
  color: #f4edce;
}
.pass-heading .seat-label .icon {
  width: 14px;
  height: 14px;
}
.player-pass h1 {
  margin: 0;
  font-size: clamp(1.4rem, 6vw, 1.8rem);
  letter-spacing: -0.025em;
  line-height: 1.15;
  overflow-wrap: anywhere;
  text-shadow: 0 1px 4px #092621;
}
.tier-name {
  font-size: 0.8rem;
  color: #fff0b0;
  font-weight: 600;
}
.turn-tag {
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: 18px;
  color: #115d4e;
  background: #e4ffec;
  border: 1px solid #8edab7;
  box-shadow: 0 2px 6px #133f3d25;
  font-size: 0.72rem;
  line-height: 1.4;
  font-weight: 600;
}
.turn-tag i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.player-pass[data-player-lane='2'] .turn-tag {
  color: #82335f;
  background: #ffecf7;
  border-color: #e5a7cf;
}
.player-pass[data-player-lane=''] .turn-tag {
  color: #754c1d;
  background: #fff3d7;
  border-color: #ecce92;
}
.action-sheet {
  min-width: 0;
}
.action-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 11px;
}
.action-heading h2 {
  font-size: clamp(1.35rem, 5.5vw, 1.65rem);
  color: #253c36;
  letter-spacing: -0.025em;
  overflow-wrap: anywhere;
}
.back-chip {
  background: #fff;
  font-size: 0.84rem;
  padding: 4px 11px;
  min-height: 41px;
}
.play-options {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 9px;
}
.options-home {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.play-choice {
  --tile: #edf4e8;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 70px;
  padding: 7px 10px 7px 7px;
  border: 1px solid #ccd9d1;
  border-radius: 16px;
  text-align: left;
  background: #fffefa;
  box-shadow: 0 2px 0 #d5dfd7;
  transition:
    transform 130ms ease,
    box-shadow 130ms ease,
    background-color 130ms ease;
  -webkit-tap-highlight-color: transparent;
}
.play-choice:disabled {
  opacity: 1;
  background: #f0f2ed;
  border-color: #d4dbd3;
  color: #626f69;
  box-shadow: none;
}
.play-choice:disabled .choice-art {
  opacity: 0.64;
  filter: saturate(0.55);
}
.play-choice:not(:disabled):active {
  transform: translateY(2px) scale(0.986);
  box-shadow: none;
}
.action-sheet[aria-busy='true'] .play-choice {
  pointer-events: none;
}
.play-choice[data-busy] {
  opacity: 0.8;
}
.venue-remote button:focus-visible {
  outline: 3px solid #236e76;
  outline-offset: 2px;
}
.choice-art {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--tile);
}
.choice-art .player-art {
  width: 87%;
  height: 87%;
  object-fit: contain;
}
.choice-art > .icon {
  width: 24px;
  height: 24px;
  color: #337568;
}
.choice-caption {
  min-width: 0;
}
.choice-caption b {
  display: block;
  font-size: 1.03rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.choice-caption small {
  display: block;
  font-size: 0.8rem;
  line-height: 1.35;
  margin-top: 2px;
  color: #705922;
}
.choice-marker {
  color: #637d70;
}
.options-home .play-choice:not(.featured) {
  gap: 6px;
  min-height: 57px;
  padding: 6px;
  border-radius: 12px;
}
.options-home .play-choice:not(.featured) .choice-art {
  width: clamp(26px, 8vw, 38px);
  height: 36px;
  background: none;
}
.options-home .play-choice:not(.featured) b {
  font-size: 0.93rem;
}
.options-home .play-choice:not(.featured) .choice-marker .icon {
  width: 12px;
}
.play-choice.option-farm,
.play-choice.option-egg {
  position: relative;
  padding: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto 1fr;
  gap: 0 3px;
  border-radius: 17px;
}
.option-farm .choice-art,
.option-egg .choice-art {
  grid-column: 1/-1;
  width: 100%;
  height: clamp(78px, 25vw, 116px);
  border-radius: 0;
  background-size: cover;
  background-position: center;
}
.option-farm .choice-art {
  background-image: url('/art/player/farm-site.webp');
}
.option-egg .choice-art {
  background-image: url('/art/player/nursery.webp');
}
.option-farm .choice-art .player-art,
.option-egg .choice-art .player-art {
  width: 73%;
  height: 86%;
  filter: drop-shadow(0 3px 2px #38281d45);
  align-self: end;
  margin-bottom: 2px;
}
.option-egg .choice-art .player-art {
  width: 63%;
  height: 78%;
}
.options-home .option-farm .choice-caption,
.options-home .option-egg .choice-caption {
  padding: 11px 0 11px 12px;
}
.options-home .option-farm b,
.options-home .option-egg b {
  font-size: 1.07rem;
}
.featured .choice-marker {
  display: grid;
  place-items: center;
  justify-self: end;
  width: 25px;
  height: 25px;
  margin-right: 8px;
  border-radius: 50%;
  background: #e3eddd;
  color: #31523c;
}
.option-egg .choice-marker {
  background: #eee7f5;
  color: #664d79;
}
[data-play-scene='egg'] .choice-art,
[data-play-scene='eggs'] .choice-art,
[data-play-scene='companions'] .choice-art {
  --tile: #eeebf8;
}
[data-play-scene='shops'] .choice-art,
[data-play-scene='reward'] .choice-art,
[data-play-scene='orders'] .choice-art {
  --tile: #f7efd8;
}
.tv-hint {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 15px;
  border-radius: 14px;
  background: white;
  color: var(--dim);
}
.player-tools {
  position: sticky;
  z-index: 2;
  bottom: max(6px, env(safe-area-inset-bottom));
  box-shadow: 0 3px 14px #183a2a15;
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  gap: 2px;
  padding: 5px;
  margin-top: auto;
  border: 1px solid #d6e0d9;
  border-radius: 16px;
  background: #fff;
}
.player-tools button {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 4px 8px;
  flex: 1;
  font-size: 0.88rem;
  line-height: 1.3;
  color: #435a52;
  border: 0;
  border-radius: 10px;
  background: transparent;
}
.player-tools .pass-turn,
.player-tools [aria-pressed='true'] {
  color: #185945;
  background: #edf5ea;
}
.join-sheet,
.waiting-panel,
.remote-auth {
  background: #fffefa;
  border: 1px solid #d0dcd4;
  border-radius: 19px;
  overflow: hidden;
  box-shadow: 0 2px 0 #dce4da;
}
.join-illustration {
  position: relative;
  isolation: isolate;
  min-height: 142px;
  display: grid;
  place-items: end center;
}
.join-illustration::before {
  background: url('/art/player/clubhouse.webp') center 54% / cover;
}
.join-illustration .player-art {
  height: 110px;
  width: auto;
  margin-bottom: 6px;
  filter: drop-shadow(0 3px 2px #40322566);
}
.join-copy,
.remote-auth,
.waiting-panel {
  padding: 20px;
}
.join-copy h1,
.remote-auth h2,
.waiting-panel h2 {
  font-size: 1.6rem;
  color: #243f36;
  letter-spacing: -0.025em;
}
.join-copy p,
.waiting-panel p {
  color: var(--dim);
  margin: 7px 0 14px;
}
.join-copy .seat-label,
.join-seat .seat-label {
  padding: 6px 11px;
  background: #e9f2e8;
  color: #2b5948;
  border-radius: 16px;
  margin-bottom: 10px;
}
.join-seat .seat-label {
  margin: 0;
}
.join-seat .scan-deadline {
  margin: 6px 0 0;
  color: var(--dim);
  font-size: 0.95rem;
}
.pairing .player-content {
  gap: 10px;
}
.venue-remote .btn {
  min-height: 46px;
  border-radius: 12px;
}
.venue-remote .btn.alt {
  background: #f2f6ee;
}
.join-copy .btn + .btn {
  margin-top: 8px;
}
.waiting-panel {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 14px;
  text-align: left;
}
.waiting-panel .player-art {
  display: block;
  object-fit: contain;
  width: 70px;
  height: 75px;
  flex: none;
}
.waiting-panel p {
  margin: 4px 0 0;
}
.remote-auth .seal {
  display: none;
}
.remote-auth input {
  font-size: 16px;
}
.remote-auth .field input,
.remote-auth .match {
  border-color: #c5d5cb;
  border-radius: 11px;
}
.remote-auth .match {
  background: #f5f8ee;
}
.remote-settings,
.private-mail,
.venue-remote dialog form {
  display: grid;
  gap: 8px;
}
.private-mail article {
  padding: 10px 0;
  border-top: 1px solid #d6dfd6;
}
.private-mail small {
  display: block;
  color: var(--dim);
}
.venue-remote .connection-error {
  padding: 20px;
  text-align: center;
}
@media (max-width: 355px) {
  .player-mast {
    padding-inline: 10px;
    gap: 6px;
  }
  .player-brand {
    gap: 3px;
  }
  .player-brand img {
    width: 32px;
    height: 36px;
  }
  .player-mast .game-partner {
    --partner-logo-size: 34px;
    font-size: 0.58rem;
  }
  .player-content {
    padding-inline: 11px;
    gap: 14px;
  }
  .player-pass {
    min-height: 94px;
    padding: 9px 12px;
  }
  .play-choice.option-farm .choice-caption,
  .play-choice.option-egg .choice-caption {
    padding-inline-start: 8px;
  }
  .options-home {
    gap: 8px;
  }
  .options-home .play-choice:not(.featured) {
    gap: 3px;
  }
  .options-home .play-choice:not(.featured) b {
    font-size: 0.86rem;
  }
  .player-tools button {
    padding-inline: 4px;
    font-size: 0.8rem;
  }
}
@media (hover: hover) {
  .play-choice:hover:not(:disabled) {
    border-color: #759b89;
  }
}
@media (prefers-reduced-motion: reduce) {
  .play-choice {
    transition: none;
  }
  .play-choice:not(:disabled):active {
    transform: none;
  }
}
/* Exchange tickets and product cards share their pictures with the TV counter. */
.action-sheet[data-play-scene='shops'] .play-choice,
.action-sheet[data-play-scene='reward'] .play-choice {
  grid-template-columns: minmax(0, 24%) minmax(0, 1fr) auto;
  min-height: 94px;
  color: #48332c;
  border: 1px solid #d4b689;
  border-radius: 17px;
  overflow: hidden;
  background: linear-gradient(120deg, #fcebc6, #fffaf0 50%);
  box-shadow: 0 2px 0 #cfa97c;
}
.action-sheet[data-play-scene='shops'] .play-choice {
  padding: 9px 12px 9px 5px;
  min-height: 100px;
}
.action-sheet[data-play-scene='shops'] [data-choice='qt'] {
  border-color: #b7a8d0;
  background: linear-gradient(120deg, #e6defb, #fbf8ff 52%);
  box-shadow: 0 2px 0 #b7a8ca;
}
.action-sheet .voucher-purse {
  width: 100%;
  height: 72px;
}
.action-sheet .voucher-caption {
  font-size: 1rem;
  line-height: 1.23;
  gap: 3px;
}
.action-sheet .voucher-balance {
  margin-top: 3px;
}
.action-sheet[data-play-scene='reward'] .play-choice {
  padding: 0 10px 0 0;
  background: #fffbef;
}
.phone-reward-art {
  align-self: stretch;
  display: grid;
  place-items: center;
  min-width: 0;
  padding: 5px;
  background: radial-gradient(ellipse at center, #fff2c4, #edcc97);
  border-right: 1px dashed #d1ac80;
}
.phone-reward-art .reward-art {
  height: 75px;
  filter: drop-shadow(0 2px 2px #78432c25);
}
.phone-reward-label {
  min-width: 0;
  display: grid;
  gap: 3px;
  justify-items: start;
  padding: 6px 0;
}
.phone-reward-label > strong {
  font-size: 1rem;
  line-height: 1.3;
}
.phone-reward-label .reward-price {
  font-size: 0.79rem;
}
.phone-reward-label .reward-state {
  font-size: 0.73rem;
}
.action-sheet .phone-shop-wallet {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 13px;
  color: #5d4736;
  font-size: 0.86rem;
  line-height: 1.3;
}
.phone-shop-wallet .reward-art {
  width: 26px;
  height: 26px;
}
.phone-shop-wallet strong {
  margin-left: auto;
}
.action-sheet .reward-detail {
  grid-template-columns: minmax(0, 0.65fr) minmax(0, 1.35fr);
  width: 100%;
  height: auto;
  border-width: 1px;
  border-color: #ccaa7b;
  margin: 0 0 13px;
  box-shadow: 0 2px 0 #d4b384;
  font-size: 0.95rem;
}
.action-sheet .reward-detail-art {
  padding: 5%;
}
.action-sheet .reward-detail-art > .reward-art {
  max-height: 145px;
}
.action-sheet .reward-receipt {
  padding: 12px 9px;
}
.action-sheet .reward-receipt dl {
  font-size: 0.78rem;
}
.action-sheet .reward-receipt > small {
  font-size: 0.72rem;
}
.action-sheet .reward-receipt h2 {
  font-size: 1.08rem;
}
.action-sheet .reward-receipt .reward-state {
  font-size: 0.75rem;
}
.action-sheet[data-play-scene='confirm'] [data-choice='redeem'] {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 47px;
  color: #fff8e5;
  background: #315f45;
  border-color: #274f37;
  box-shadow: 0 2px 0 #254a34;
}
.action-sheet[data-play-scene='confirm'] [data-choice='redeem']:disabled {
  color: #6d6258;
  background: #eee9dc;
  border-color: #d0c5b7;
  box-shadow: none;
}
.action-sheet .reward-empty {
  margin-bottom: 12px;
  font-size: 0.9rem;
}

.friend-entry {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) auto;
  align-items: center;
  min-height: 63px;
  width: 100%;
  padding: 0 12px 0 0;
  gap: 10px;
  overflow: hidden;
  border: 1px solid #d5c5ab;
  border-radius: 17px;
  color: #423e32;
  text-align: left;
  background: linear-gradient(112deg, #fff0d4, #fffaf0 58%, #fff5e7);
  box-shadow: 0 2px 0 #daccb5;
}
.friend-entry-art {
  display: grid;
  place-items: end center;
  align-self: stretch;
  overflow: hidden;
  border-radius: 15px 40% 43% 15px;
  background: radial-gradient(ellipse at 45% 75%, #fffad8 45%, #e5efcb);
}
.friend-entry-art img {
  width: 100%;
  height: 60px;
  object-fit: contain;
}
.friend-entry-copy {
  min-width: 0;
  line-height: 1.28;
}
.friend-entry-copy strong,
.friend-entry-copy small {
  display: block;
  overflow-wrap: anywhere;
}
.friend-entry-copy strong {
  color: #483c33;
  font-size: 1.04rem;
}
.friend-entry-copy small {
  margin-top: 3px;
  color: #645543;
  font-size: 0.82rem;
}
.friend-entry-arrow,
.friend-seal {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #73553e;
  background: #f2e3c9;
}
.friend-entry[data-incoming] {
  background: #fff1f1;
  border-color: #d39a9f;
}
.friend-entry[data-incoming] small {
  color: #923f58;
  font-weight: 600;
}
.room-tools {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 8px;
}
.room-tools .friend-entry {
  min-height: 55px;
  grid-template-columns: clamp(35px, 12vw, 60px) minmax(0, 1fr);
  padding-right: 6px;
  gap: 6px;
}
.room-tools .friend-entry-art img {
  height: 52px;
}
.room-tools .friend-entry-arrow {
  display: none;
}
.room-tools .friend-entry-copy strong,
.show-room-qr strong {
  font-size: 0.94rem;
}
.room-tools .friend-entry-copy small,
.show-room-qr small {
  display: block;
  font-size: 0.75rem;
  line-height: 1.25;
}
.show-room-qr {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 5px;
  border: 1px solid #b6d2c6;
  border-radius: 15px;
  background: #eaf5ec;
  color: #205544;
  text-align: left;
  line-height: 1.35;
  box-shadow: 0 2px 0 #cedfd4;
}
.show-room-qr small {
  margin-top: 2px;
  color: #456754;
}
.show-room-qr:disabled {
  color: #51645d;
  background: #eef1eb;
  border-color: #d4ddd4;
  box-shadow: none;
}
.room-qr-symbol {
  display: inline-grid;
  place-items: center;
}

#dialog:has(#friend-circle) {
  background: #fffdf6;
  width: min(430px, 94vw);
  max-height: min(90svh, 780px);
  padding: 19px clamp(13px, 4vw, 22px) 16px;
  border: 1px solid #cbbb9f;
  border-radius: 23px;
}
#dialog:has(#friend-circle) h2 {
  color: #3b5948;
  text-align: center;
  margin: 0 0 8px;
}
.friend-story {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  height: clamp(78px, 15svh, 119px);
  border-radius: 16px;
  overflow: hidden;
  background:
    radial-gradient(80% 100% at 50% 100%, #edf1cd 30%, transparent 31%),
    linear-gradient(160deg, #e0f1e3, #fff3d4 70%, #f8e7da);
}
.friend-story img {
  width: 88%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
  transform-origin: 50% 85%;
}
.friend-story i {
  position: absolute;
  top: 50%;
  left: 50%;
  color: #a63f5d;
  font: bold 16px sans-serif;
  opacity: 0;
  pointer-events: none;
}
.friend-story i:nth-of-type(1) {
  --fly: -34px;
  --tilt: -18deg;
}
.friend-story i:nth-of-type(2) {
  --fly: 5px;
  --tilt: 10deg;
}
.friend-story i:nth-of-type(3) {
  --fly: 38px;
  --tilt: 24deg;
}
.friend-post-flower {
  position: absolute;
  left: 50%;
  top: 40%;
  opacity: 0;
  color: #ac3f5d;
  font: 25px/1 sans-serif;
  text-shadow: 0 1px #fff;
}
.friend-offer .friend-post-flower,
.friend-delivery .friend-post-flower {
  animation: friend-flower-pass 1.15s ease-in-out both;
}
.friend-delivery .friend-post-flower {
  animation-direction: reverse;
}
.friend-entry-art.friend-delivery img {
  animation: friend-hop 0.7s ease-in-out both;
}
@keyframes friend-flower-pass {
  0% {
    opacity: 0;
    transform: translate(-45px, 7px) scale(0.5) rotate(-18deg);
  }
  20% {
    opacity: 1;
  }
  55% {
    opacity: 1;
    transform: translate(0, -15px) rotate(8deg);
  }
  100% {
    opacity: 0;
    transform: translate(44px, 7px) scale(0.6) rotate(20deg);
  }
}
.friend-story.friend-bloom i {
  animation: friend-petals 1.3s ease-out both;
}
.friend-story.friend-bloom i:nth-of-type(2) {
  animation-delay: 120ms;
}
.friend-story.friend-bloom i:nth-of-type(3) {
  animation-delay: 200ms;
}
.friend-bloom img {
  animation: friend-hop 0.7s ease-in-out both;
}
@keyframes friend-petals {
  0% {
    opacity: 0;
    transform: translate(0, 0) scale(0.4);
  }
  20% {
    opacity: 0.95;
  }
  75% {
    opacity: 0.9;
  }
  100% {
    opacity: 0;
    transform: translate(var(--fly), -45px) rotate(var(--tilt));
  }
}
@keyframes friend-hop {
  20% {
    transform: scale(1.04, 0.93);
  }
  47% {
    transform: translateY(-6px) rotate(-3deg) scale(0.99, 1.03);
  }
  70% {
    transform: rotate(2deg);
  }
}
#dialog #friend-circle-guide {
  margin: 9px 2px 15px;
  color: #5b584c;
  font-size: 0.88rem;
  line-height: 1.45;
}
#friend-circle-status {
  display: flex;
  gap: 7px;
  align-items: center;
  color: #375b48;
  font-size: 0.86rem;
}
#friend-circle-status::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #48835b;
}
#friend-peers {
  display: grid;
  gap: 6px;
  list-style: none;
  margin: 7px 0 0;
  padding: 0;
}
#friend-peers li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 7px 8px;
  border: 1px solid #e3ddc8;
  border-radius: 13px;
  background: #fffefa;
}
#friend-peers li[data-friend-status='received'] {
  border-color: #e1acb7;
  background: #fff6f3;
}
#friend-peers li:focus-visible {
  outline: 2px solid #236e76;
}
.friend-initial {
  display: grid;
  place-items: center;
  width: 32px;
  height: 35px;
  border-radius: 50% 48% 43% 43%;
  color: #71424f;
  background: #f4dce1;
  font-weight: 700;
}
#friend-peers li:nth-child(3n + 2) .friend-initial {
  background: #e5dbef;
  color: #624e75;
}
#friend-peers li:nth-child(3n) .friend-initial {
  background: #e4ead5;
  color: #4b6542;
}
.friend-identity {
  min-width: 0;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.friend-identity strong {
  color: #383e32;
}
.friend-identity small {
  display: block;
  color: #66614f;
  font-size: 0.77rem;
}
.friend-identity img {
  width: 19px;
  height: 19px;
  margin-inline-start: 4px;
  vertical-align: middle;
  object-fit: contain;
}
.friend-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  justify-content: end;
}
.friend-actions button {
  min-height: 44px;
  padding: 5px 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: 10px;
  border: 1px solid #769980;
  background: #31684f;
  color: #fffdf4;
  font: inherit;
  font-weight: 600;
  font-size: 0.82rem;
}
.friend-actions button[data-friend-action='accept'] {
  border-color: #9b5264;
  background: #94485c;
}
.friend-actions button[data-friend-action='decline'],
.friend-actions button[data-friend-action='cancel'] {
  color: #65574a;
  background: #fffaf0;
  border-color: #dcd0bd;
}
.friend-actions button:disabled {
  opacity: 0.65;
}
.friend-actions .icon {
  width: 14px;
}
.friend-seal {
  color: #32654c;
  background: #e3edd9;
}
.friend-feedback:not(:empty) {
  margin-top: 8px;
  padding: 7px 10px;
  border-radius: 10px;
  background: #edf3e5;
  color: #35503a;
  font-size: 0.85rem;
}
#dialog:has(#friend-circle) .actions {
  justify-content: center;
  margin-top: 12px;
}
#dialog:has(#friend-circle) .actions button {
  min-height: 44px;
  min-width: 92px;
}
@media (max-width: 370px) {
  #friend-peers li[data-friend-status='received'] .friend-actions {
    grid-column: 2 / -1;
    justify-content: start;
  }
}
@media (prefers-reduced-motion: reduce) {
  .friend-story.friend-bloom i,
  .friend-offer .friend-post-flower,
  .friend-delivery .friend-post-flower,
  .friend-entry-art.friend-delivery img,
  .friend-bloom img {
    animation: none;
  }
}

#dialog:has(.activity-panel) {
  padding: 0;
  overflow: hidden;
  background: #fffefa;
}
#dialog-body:has(.activity-panel) {
  display: flex;
  flex-direction: column;
  max-height: min(86vh, 690px);
  max-height: min(86dvh, 690px);
}
#dialog #activity-title {
  margin: 0;
  padding: 16px 18px;
  color: #24473a;
  background: #f1f6eb;
  border-bottom: 1px solid #d3dfd3;
  font-size: 1.28rem;
}
.activity-panel {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 14px 18px;
}
.activity-days section + section { margin-top: 16px; }
.activity-days h3 {
  margin: 0 0 4px;
  color: #536d5f;
  font-size: 0.86rem;
  font-weight: 600;
}
.activity-days ol { list-style: none; margin: 0; padding: 0; }
.activity-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: start;
  gap: 9px;
  padding: 10px 0;
}
.activity-row + .activity-row { border-top: 1px solid #e4e9df; }
.activity-row img {
  display: block;
  width: 38px;
  height: 38px;
  object-fit: contain;
  padding: 3px;
  border-radius: 11px;
  background: #f0f4e8;
}
.activity-copy { min-width: 0; overflow-wrap: anywhere; }
.activity-copy strong { color: #234738; line-height: 1.35; }
#dialog .activity-copy p { margin: 2px 0 0; font-size: 0.85rem; }
.activity-row time {
  padding-top: 2px;
  color: #52645a;
  font-size: 0.77rem;
  font-variant-numeric: tabular-nums;
}
.activity-changes { display: flex; flex-wrap: wrap; gap: 3px 5px; margin-top: 4px; }
.activity-change {
  padding: 1px 6px;
  border-radius: 6px;
  color: #2a6044;
  background: #e9f3e6;
  font-size: 0.77rem;
}
.activity-change.spent { color: #77552f; background: #f6eddf; }
#dialog .activity-panel [role='status'] { margin: 8px 0; }
#dialog .activity-panel [role='status']:empty { margin: 0; }
#dialog .activity-panel + .actions {
  justify-content: flex-end;
  margin: 0;
  padding: 8px 18px;
  border-top: 1px solid #dbe4d8;
}
@media (max-width: 420px) {
  .player-tools:has(.pass-turn) > button { flex-direction: column; gap: 2px; }
}
