/* --- Design tokens (device-aware via media queries) --- */
:root {
  --bg: #0f0f12;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-hover: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.15);
  --text: #e4e4e7;
  --text-muted: rgba(255, 255, 255, 0.5);
  --text-strong: #fff;
  --radius-sm: 12px;
  --radius-md: 14px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 20px;
  --space-xl: 24px;
  --space-2xl: 32px;
  --app-max-width: 100%;
  --app-padding-x: 16px;
  --app-padding-top: 16px;
  --wheel-size: min(360px, calc(100vw - var(--app-padding-x) * 2));
  --prize-font-size: 1.1rem;
  --timer-font-size: 1.4rem;
  --btn-padding-y: 14px;
  --btn-padding-x: 28px;
  --header-gap: 12px;
  --channel-photo-size: 40px;
  --participants-max-height: 220px;
}

/* Tablet: more space, slightly larger wheel */
@media (min-width: 600px) {
  :root {
    --app-max-width: 420px;
    --app-padding-x: 24px;
    --app-padding-top: 8px;
    --wheel-size: 420px;
    --prize-font-size: 1.2rem;
    --timer-font-size: 1.5rem;
    --space-lg: 24px;
    --space-xl: 28px;
    --radius-lg: 18px;
    --channel-photo-size: 44px;
    --participants-max-height: 280px;
  }
}

/* Laptop / desktop: two-column layout, larger typography */
@media (min-width: 900px) {
  :root {
    --app-max-width: min(1500px, calc(100vw - 32px));
    --app-padding-x: 32px;
    /* Use available desktop space aggressively (bounded for stability). */
    --wheel-size: min(760px, calc(100dvh - 180px), calc(100vw - 560px));
    --prize-font-size: 1.35rem;
    --timer-font-size: 1.6rem;
    --space-lg: 28px;
    --space-xl: 32px;
    --space-2xl: 40px;
    --radius-lg: 20px;
    --radius-xl: 24px;
    --channel-photo-size: 48px;
    --participants-max-height: 560px;
  }
}

@media (min-width: 1280px) {
  :root {
    --wheel-size: min(860px, calc(100dvh - 160px), calc(100vw - 620px));
  }
}

/* --- Base --- */
*, *::before, *::after { box-sizing: border-box; }
html { height: 100%; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0;
  padding: 0;
  padding-top: max(88px, calc(20px + var(--app-padding-top, 16px) + env(safe-area-inset-top, 0px)));
  padding-bottom: max(24px, env(safe-area-inset-bottom, 0px));
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
  min-height: var(--tg-viewport-stable-height, 100vh);
  line-height: 1.4;
}

.app {
  max-width: var(--app-max-width);
  margin: 0 auto;
  padding: var(--app-padding-top) var(--app-padding-x) 0;
  min-height: 100%;
}

/* --- Desktop: two-column layout --- */
@media (min-width: 900px) {
  .app { padding: 0 var(--app-padding-x); }
  .main {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto 1fr;
    gap: var(--space-xl) var(--space-2xl);
    align-items: start;
    align-content: start;
    text-align: left;
    max-width: var(--app-max-width);
    margin: 0 auto;
  }
  .main .prize-card { grid-column: 2; grid-row: 1; margin-bottom: 0; text-align: left; }
  .main .wheel-wrap { grid-column: 1; grid-row: 1 / 4; margin-bottom: 0; }
  .main .participant-count { grid-column: 2; }
  .main #participantsSection { grid-column: 2; margin-top: 0; }
  /* Participate button under the wheel on desktop; hidden when user already joined */
  .main .actions { grid-column: 1; grid-row: 4; margin-top: 0; margin-bottom: var(--space-md); }
  /* Status message under the wheel on desktop */
  .main .message { grid-column: 1; grid-row: 5; margin-top: var(--space-sm); }
}

/* --- Header --- */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-lg);
  min-height: 44px;
  gap: var(--header-gap);
}

.channel-block { margin: 0; }
.channel-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  border-radius: var(--radius-md);
  padding: 6px 10px 6px 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: background 0.2s, border-color 0.2s;
}
.channel-link:hover, .channel-link:active {
  background: var(--surface-hover);
  border-color: rgba(255, 255, 255, 0.12);
}
.channel-link:focus-visible { outline: 2px solid rgba(255, 255, 255, 0.5); outline-offset: 2px; }
.channel-photo {
  width: var(--channel-photo-size);
  height: var(--channel-photo-size);
  border-radius: 50%;
  object-fit: cover;
  background: #27272a;
  flex-shrink: 0;
  display: block;
}
.channel-photo.hidden { display: none; }
.channel-name {
  font-size: 0.9rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 180px;
}

@media (min-width: 600px) {
  .channel-name { max-width: 220px; }
}
@media (min-width: 900px) {
  .channel-name { max-width: 240px; font-size: 1rem; }
}

.lang-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 36px;
  padding: 0;
  font-size: 1.4rem;
  line-height: 1;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: inherit;
  cursor: pointer;
  margin-left: auto;
  transition: background 0.2s, border-color 0.2s;
}
.lang-pill:hover,
.lang-pill:active {
  background: var(--surface-hover);
  border-color: rgba(255, 255, 255, 0.25);
}
.lang-pill:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 2px;
}
.lang-pill span { display: block; }

/* --- Main content --- */
.main { text-align: center; }

/* Better use of viewport on desktop/laptop */
@media (min-width: 900px) {
  .main {
    min-height: calc(100dvh - 110px);
    padding-bottom: var(--space-xl);
  }
}

/* Prize card */
.prize-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-sm) var(--space-md);
  margin-bottom: var(--space-lg);
  text-align: center;
}
@media (min-width: 600px) {
  .prize-card { padding: var(--space-md) var(--space-lg); }
}
@media (min-width: 900px) {
  .prize-card { padding: var(--space-md) var(--space-xl); }
}

.prize-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.prize {
  font-size: var(--prize-font-size);
  font-weight: 700;
  color: var(--text-strong);
  margin: 0;
  letter-spacing: 0.02em;
}

/* Wheel: size from variable, canvas fills container */
.wheel-wrap {
  position: relative;
  width: var(--wheel-size);
  height: var(--wheel-size);
  max-width: 100%;
  margin: 0 auto var(--space-lg);
  border-radius: 50%;
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.06),
    0 0 0 4px rgba(0, 0, 0, 0.2),
    0 12px 40px rgba(0, 0, 0, 0.4);
}
#wheelWrap {
  position: relative;
  width: var(--wheel-size);
  height: var(--wheel-size);
  max-width: 100%;
  margin: 0 auto var(--space-lg);
}
#wheelCanvas {
  width: 100% !important;
  height: 100% !important;
  max-width: 100%;
  border-radius: 50%;
  display: block;
}

/* Plinko mode: board should look like a panel, not a circle. */
#wheelWrap.plinko-view,
#wheelWrap.plinko-drop-view {
  border-radius: 22px;
  overflow: hidden;
}
#wheelWrap.plinko-view #wheelCanvas,
#wheelWrap.plinko-drop-view #wheelCanvas {
  border-radius: 18px;
}
#wheelWrap.plinko-view #wheelPointer,
#wheelWrap.plinko-drop-view #wheelPointer {
  display: none;
}

/* Full drop page feel (scroll-friendly). */
.plinko-drop-page {
  --wheel-size: min(760px, calc(100dvh - 220px), calc(100vw - 32px));
}
.plinko-drop-page .participants-section {
  margin-top: var(--space-md);
}

.wheel-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 42%;
  height: 42%;
  min-width: 60px;
  min-height: 50px;
  max-width: 180px;
  max-height: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
  z-index: 1;
}
.wheel-center .timer-label {
  font-size: 0.55rem;
  margin-bottom: 2px;
}
.wheel-center .timer-countdown {
  font-size: 0.9rem;
  line-height: 1.15;
  padding: 0 6px;
  word-break: break-word;
}
@media (min-width: 600px) {
  .wheel-center .timer-countdown { font-size: 1.05rem; }
}
@media (min-width: 900px) {
  .wheel-center .timer-countdown { font-size: 1.15rem; }
}

.wheel-pointer {
  position: absolute;
  left: 50%;
  top: -8px;
  transform: translateX(-50%);
  width: 36px;
  height: 32px;
  z-index: 2;
  pointer-events: none;
  animation: pointer-idle 2s ease-in-out infinite;
}
.wheel-pointer-svg {
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}
#wheelWrap.wheel-spinning .wheel-pointer { animation: none; transform: translateX(-50%) scale(1); }
#wheelWrap.wheel-landed .wheel-pointer { animation: pointer-landed 0.5s ease-out; }
@keyframes pointer-idle {
  0%, 100% { transform: translateX(-50%) scale(1); }
  50% { transform: translateX(-50%) scale(1.06); }
}
@keyframes pointer-landed {
  0% { transform: translateX(-50%) scale(1.2); }
  100% { transform: translateX(-50%) scale(1); }
}

/* Timer card */
.timer-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-lg);
  margin-bottom: var(--space-xs);
  display: inline-block;
  min-width: 140px;
}
@media (min-width: 600px) {
  .timer-card { min-width: 160px; padding: var(--space-md) var(--space-xl); }
}
.timer-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 2px;
}
.timer-countdown {
  font-size: var(--timer-font-size);
  font-weight: 700;
  margin: 0;
  color: var(--text-strong);
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  transition: color 0.25s;
}
.timer-countdown.urgent {
  color: #f87171;
  animation: timer-pulse 1s ease-in-out infinite;
}
@keyframes timer-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.88; }
}
#timer.ended { color: #4ade80; }

.participant-count {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  margin: 0 0 var(--space-md);
}
@media (min-width: 600px) {
  .participant-count { font-size: 0.9rem; }
}
@media (min-width: 900px) {
  .participant-count {
    margin-bottom: var(--space-xs);
  }
}

/* Live toast */
.live-toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  color: #18181b;
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
  z-index: 10;
  white-space: nowrap;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}
@media (min-width: 600px) {
  .live-toast { bottom: 24px; padding: 12px 22px; font-size: 0.9rem; }
}
.live-toast.show {
  opacity: 1;
  animation: toast-in 0.3s ease;
}
@keyframes toast-in {
  from { transform: translateX(-50%) translateY(10px); opacity: 0; }
  to { transform: translateX(-50%) translateY(0); opacity: 1; }
}

/* Participants section */
.participants-section {
  margin-top: var(--space-xl);
  text-align: left;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
}
@media (min-width: 600px) {
  .participants-section { padding: var(--space-lg); }
}
@media (min-width: 900px) {
  .participants-section {
    padding: var(--space-xl);
    margin-top: 0;
  }
}

.participants-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 var(--space-sm);
  padding-bottom: var(--space-xs);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
@media (min-width: 600px) {
  .participants-title { font-size: 1rem; }
}

.participants-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: var(--participants-max-height);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}
.participants-list::-webkit-scrollbar { width: 6px; }
.participants-list::-webkit-scrollbar-track { background: transparent; }
.participants-list::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.2); border-radius: 3px; }
.participants-list li { margin: 0; padding: 0; }
.participants-list li + li { margin-top: 2px; }
.participant-link {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: var(--space-md);
  padding: 10px var(--space-sm);
  color: var(--text);
  text-decoration: none;
  border-radius: var(--radius-sm);
  margin-bottom: 4px;
  transition: background 0.15s;
  min-height: 48px;
  cursor: pointer;
}
.participant-primary {
  display: flex;
  align-items: center;
  min-width: 0;
}
.participant-primary-left {
  gap: var(--space-sm);
}
.participant-primary-right {
  justify-content: flex-end;
  gap: var(--space-xs);
}
.participant-link:hover, .participant-link:active {
  background: var(--surface-hover);
}
.participant-link:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.4);
  outline-offset: 2px;
}
.participants-list li.participant-winner .participant-link {
  background: rgba(74, 222, 128, 0.15);
  border: 1px solid rgba(74, 222, 128, 0.4);
}
.participants-list li.participant-winner .participant-name::after {
  content: ' 🏆';
}
.participant-avatar {
  position: relative;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
}
.participant-link .participant-avatar img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  background: #3f3f46;
  display: block;
}
.participant-link .participant-initials {
  position: absolute;
  left: 0;
  top: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #52525b;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  display: none;
  align-items: center;
  justify-content: center;
}
.participant-link .participant-name {
  font-size: 0.95rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (min-width: 900px) {
  .participant-link .participant-name { font-size: 1rem; }
}

.participant-primary-left .participant-name {
  flex: 1;
  min-width: 0;
}

.participant-chance {
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
}

.participant-tickets {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  white-space: nowrap;
}

/* Highlight current user row when many participants (wheel pill may be hidden) */
.participants-list li.participant-you .participant-link {
  background: rgba(148, 163, 184, 0.25);
  border: 1px solid rgba(148, 163, 184, 0.6);
}
.participants-list li.participant-you .participant-name::after {
  content: '';
}

/* Loading state (full-screen until first fetch) */
.loading-state {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  padding: var(--space-xl);
}
.loading-state[aria-hidden="true"] {
  display: none;
}
.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-top-color: #fff;
  border-radius: 50%;
  animation: loading-spin 0.8s linear infinite;
}
@keyframes loading-spin {
  to { transform: rotate(360deg); }
}
.loading-text {
  font-size: 1rem;
  color: var(--text-muted);
}

/* Wheel fallback when canvas unsupported or too small */
.wheel-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  text-align: center;
  font-size: 0.95rem;
  color: var(--text-muted);
  background: var(--surface);
  border-radius: var(--radius-lg);
}

/* Message (status / error) */
.message {
  min-height: 24px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
  margin: var(--space-sm) 0 var(--space-md);
  padding: 0 4px;
}
.message.error {
  color: #f87171;
  font-weight: 500;
}
.message.success {
  color: #4ade80;
  font-weight: 500;
}
.message:empty { display: none; }
.message[role="alert"] {
  font-weight: 500;
}
.message-joined-flash {
  animation: message-joined-flash 2s ease-out;
}
@keyframes message-joined-flash {
  0% { opacity: 1; transform: scale(1.02); }
  15% { opacity: 1; }
  100% { opacity: 0.85; transform: scale(1); }
}

/* Buttons */
.actions {
  margin-top: var(--space-xs);
  margin-bottom: var(--space-md);
  padding: 0 2px;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: center;
  justify-content: center;
}

/* Mobile UX: keep primary actions always reachable. */
@media (max-width: 899px) {
  .actions {
    position: sticky;
    bottom: max(8px, env(safe-area-inset-bottom, 0px));
    z-index: 8;
    padding: 8px;
    border-radius: 999px;
    background: linear-gradient(
      to top,
      rgba(15, 15, 18, 0.95),
      rgba(15, 15, 18, 0.72)
    );
    backdrop-filter: blur(6px);
  }
}
.actions .btn {
  min-width: 140px;
}
.btn {
  display: inline-block;
  padding: var(--btn-padding-y) var(--btn-padding-x);
  font-size: 1rem;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  cursor: pointer;
  min-height: 48px;
  line-height: 1.25;
  background: #ffffff;
  color: #000000;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
  transition: transform 0.1s, box-shadow 0.2s, background 0.2s, border-color 0.2s;
}
.btn:hover {
  transform: translateY(-1px);
}
@media (min-width: 600px) {
  .btn { font-size: 1.05rem; padding: 16px 32px; min-height: 52px; }
}
.btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 2px;
}
.btn-primary {
  background: #ffffff;
  color: #000000;
  border-color: #d4d4d8;
}
.btn-primary:hover {
  background: #f4f4f5;
  border-color: #a1a1aa;
}
.btn-primary:active {
  transform: translateY(2px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}
.btn-primary:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.6);
  outline-offset: 2px;
}
.btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}
.btn[aria-busy="true"] {
  opacity: 0.9;
  cursor: progress;
}
.btn[aria-busy="true"]::after {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-left: 8px;
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.25);
  border-top-color: rgba(0, 0, 0, 0.75);
  animation: btn-spin 0.8s linear infinite;
  vertical-align: -2px;
}
@keyframes btn-spin {
  to { transform: rotate(360deg); }
}

.btn-ended {
  background: #ffffff;
  color: #000000;
  border-color: #d4d4d8;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.btn-ended:hover {
  background: #f4f4f5;
  border-color: #a1a1aa;
}
.btn-ended:active {
  transform: translateY(2px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

/* "Get more tickets" shares the same pill style and slot as Participate button */
#btnBoostChances {
  display: none;
}

/* Bottom sheet: ways to boost chances */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 200;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.sheet-backdrop.is-open {
  opacity: 1;
}
.sheet-panel {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 75vh;
  background: var(--bg);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.35);
  z-index: 201;
  padding: var(--space-md) var(--app-padding-x) max(env(safe-area-inset-bottom), var(--space-lg));
  padding-top: var(--space-sm);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  overflow-y: auto;
}
.sheet-panel.is-open {
  transform: translateY(0);
}
.sheet-panel {
  touch-action: pan-y;
}
.sheet-handle {
  width: 36px;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  margin: 0 auto var(--space-md);
}
.sheet-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-strong);
  margin: 0 0 var(--space-lg);
  padding: 0;
}
.sheet-task-list {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-xl);
}
.sheet-task-list li {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  margin: 0 0 10px;
  background: rgba(255, 255, 255, 0.02);
}
.sheet-task-list li:last-child {
  margin-bottom: 0;
}
.sheet-task-list .task-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}
.sheet-task-list .task-content {
  flex: 1;
  min-width: 0;
}
.sheet-task-list .task-title {
  font-weight: 600;
  color: var(--text);
  font-size: 0.95rem;
  margin: 0 0 2px;
}
.sheet-task-list .task-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
}
.sheet-task-list .task-meta {
  margin-top: 6px;
  font-size: 0.76rem;
  color: #f4d35e;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.sheet-task-list .task-action {
  flex-shrink: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  background: var(--surface-hover);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 8px 16px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.sheet-task-list .task-action:hover {
  background: rgba(255, 255, 255, 0.15);
}
.sheet-task-list .task-action-buy {
  background: linear-gradient(180deg, #ffd54a, #f5b700);
  border-color: #e2a400;
  color: #111;
  box-shadow: 0 6px 14px rgba(245, 183, 0, 0.35);
}
.sheet-task-list .task-action-buy:hover {
  background: linear-gradient(180deg, #ffe06d, #ffc928);
}
.sheet-task-list .task-action-buy:active {
  transform: translateY(1px);
}
.sheet-task-list .task-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
  flex-shrink: 0;
}
.sheet-task-list .task-check {
  min-width: 112px;
}
.sheet-close {
  width: 100%;
}
