/* ============================================================
   We Lost The Plot — styles
   Mobile-first. One centered "phone" column on desktop.
   ============================================================ */

:root {
  --bg: #0a0711;
  --bg-2: #120b1d;
  --ink: #f7f2ff;
  --ink-dim: #cbbfe0;
  --muted: #9d8fb5;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.18);
  --card: rgba(255, 255, 255, 0.045);

  --reader: #6aa8ff;
  --group: #4fe0b0;
  --action: #ff7a63;
  --plot: #d08bff;

  --font-display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-accent: "Instrument Serif", "Iowan Old Style", Georgia, serif;

  --shell: 460px;
  --radius: 22px;
  --ease: cubic-bezier(0.22, 0.9, 0.25, 1);
}

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

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: 0;
  background: none;
  -webkit-tap-highlight-color: transparent;
}

h1,
h2,
h3,
p {
  margin: 0;
}

svg {
  display: block;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------------- backdrop ---------------- */

.backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 50% -10%, #1b0f2e 0%, #0c0714 55%, #07040c 100%);
  pointer-events: none;
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
  animation: drift 18s ease-in-out infinite alternate;
}

.glow-a {
  width: 60vw;
  height: 60vw;
  max-width: 520px;
  max-height: 520px;
  left: -18%;
  top: -12%;
  background: radial-gradient(circle, rgba(138, 75, 255, 0.55), transparent 65%);
}

.glow-b {
  width: 55vw;
  height: 55vw;
  max-width: 480px;
  max-height: 480px;
  right: -20%;
  top: 34%;
  background: radial-gradient(circle, rgba(255, 92, 240, 0.34), transparent 65%);
  animation-delay: -6s;
}

.glow-c {
  width: 52vw;
  height: 52vw;
  max-width: 440px;
  max-height: 440px;
  left: 10%;
  bottom: -18%;
  background: radial-gradient(circle, rgba(79, 140, 255, 0.3), transparent 65%);
  animation-delay: -11s;
}

.grain {
  position: absolute;
  inset: -50%;
  opacity: 0.05;
  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='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(4%, 3%, 0) scale(1.08); }
}

/* ---------------- shell ---------------- */

.app-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--shell);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
}

.app {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
}

@media (min-width: 560px) {
  .app-shell {
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.06),
      0 40px 120px -30px rgba(0, 0, 0, 0.9);
  }
}

/* ---------------- screens + type ---------------- */

.screen {
  display: none;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  padding:
    max(18px, env(safe-area-inset-top))
    22px
    max(20px, env(safe-area-inset-bottom));
}

.screen.is-active {
  display: flex;
  animation: screen-in 0.5s var(--ease) both;
}

@keyframes screen-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------------- buttons ---------------- */

.btn {
  --btn-h: 58px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: var(--btn-h);
  padding: 0 24px;
  border-radius: 18px;
  font-family: var(--font-display);
  font-size: 1.04rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  transition: transform 0.15s var(--ease), filter 0.2s var(--ease), opacity 0.2s;
  user-select: none;
}

.btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn-primary {
  background: linear-gradient(135deg, #ff5cf0 0%, #8a4bff 52%, #4f8cff 100%);
  box-shadow:
    0 18px 40px -16px rgba(138, 75, 255, 0.85),
    0 2px 0 rgba(255, 255, 255, 0.28) inset,
    0 -2px 10px rgba(0, 0, 0, 0.25) inset;
  color: #fff;
}

.btn-primary:hover { filter: brightness(1.06); }
.btn-primary:active { transform: translateY(2px) scale(0.995); filter: brightness(0.98); }

.btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(8px);
}

.btn-ghost:hover { background: rgba(255, 255, 255, 0.09); }
.btn-ghost:active { transform: translateY(1px); }

.btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
  filter: grayscale(0.3);
  box-shadow: none;
}

.btn-text {
  padding: 12px;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(255, 255, 255, 0.18);
  transition: color 0.2s;
}

.btn-text:hover { color: var(--ink-dim); }

.icon-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  color: var(--ink-dim);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  transition: background 0.2s, color 0.2s;
}

.icon-btn:hover { background: rgba(255, 255, 255, 0.08); color: var(--ink); }
.icon-btn:active { transform: scale(0.96); }

.icon-btn svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.icon-btn svg path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ============================================================
   HOME
   ============================================================ */

.screen-home {
  position: relative;
  justify-content: space-between;
  overflow: hidden;
}

.home-cards {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.ghost-card {
  position: absolute;
  width: 148px;
  padding: 16px 15px;
  border-radius: 18px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.86rem;
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 24px 50px -22px rgba(0, 0, 0, 0.9);
  opacity: 0.42;
  filter: blur(0.4px);
  animation: float 9s ease-in-out infinite alternate;
}

.ghost-tag {
  display: block;
  margin-bottom: 9px;
  font-family: var(--font-body);
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.7;
}

.ghost-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
}

.ghost-card-1 {
  top: 12%;
  right: -42px;
  transform: rotate(11deg);
  background: linear-gradient(150deg, #18b98a, #063b36);
}

.ghost-card-2 {
  top: 30%;
  left: -54px;
  transform: rotate(-9deg);
  background: linear-gradient(150deg, #b45cff, #25064d);
  animation-delay: -3s;
}

.ghost-card-3 {
  bottom: 13%;
  right: -34px;
  transform: rotate(-6deg);
  background: linear-gradient(150deg, #ff6a4d, #4a0d2a);
  animation-delay: -6s;
}

@keyframes float {
  from { translate: 0 0; }
  to   { translate: 0 -14px; }
}

.home-top {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(10, 7, 17, 0.5);
  backdrop-filter: blur(10px);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.brand-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ff5cf0;
  box-shadow: 0 0 12px 2px rgba(255, 92, 240, 0.8);
}

.home-hero {
  position: relative;
  z-index: 1;
  padding: 6vh 0 4vh;
}

.home-hero .eyebrow {
  margin-bottom: 16px;
  max-width: 30ch;
  line-height: 1.6;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3.1rem, 17.5vw, 5.3rem);
  line-height: 0.86;
  letter-spacing: -0.045em;
  margin-left: -0.04em;
}

.wordmark-line {
  display: block;
}

.wordmark-accent {
  font-family: var(--font-accent);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.015em;
  padding-right: 0.08em;
  background: linear-gradient(100deg, #ff8fc7 0%, #d08bff 42%, #6aa8ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.home-sub {
  max-width: 30ch;
  margin-top: 22px;
  font-size: 0.98rem;
  line-height: 1.55;
  color: var(--ink-dim);
}

.home-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.screen-home::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 42%;
  background: linear-gradient(
    to top,
    #0a0711 12%,
    rgba(10, 7, 17, 0.82) 46%,
    rgba(10, 7, 17, 0) 100%
  );
  z-index: 0;
  pointer-events: none;
}

.home-actions .btn-primary {
  --btn-h: 62px;
}

.home-foot {
  position: relative;
  z-index: 1;
  margin-top: 18px;
  text-align: center;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: rgba(203, 191, 224, 0.55);
}

/* ============================================================
   SETUP
   ============================================================ */

.screen-setup {
  height: 100vh;
  height: 100dvh;
  padding-bottom: max(16px, env(safe-area-inset-bottom));
}

.screen-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 14px;
}

.screen-head-text {
  flex: 1;
}

.screen-head-text .eyebrow {
  margin-bottom: 3px;
}

.screen-head h2 {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.count-pill {
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-dim);
  font-variant-numeric: tabular-nums;
}

.setup-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 4px 2px 12px;
  scrollbar-width: none;
}

.setup-scroll::-webkit-scrollbar { display: none; }

.player-form {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.player-form input {
  flex: 1;
  min-width: 0;
  height: 52px;
  padding: 0 16px;
  border-radius: 15px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}

.player-form input::placeholder { color: rgba(157, 143, 181, 0.7); }

.player-form input:focus {
  border-color: rgba(255, 92, 240, 0.6);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 3px rgba(255, 92, 240, 0.12);
}

.btn-add {
  --btn-h: 52px;
  min-width: 76px;
  padding: 0 18px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--line-strong);
  font-family: var(--font-display);
  font-weight: 700;
}

.btn-add:hover { background: rgba(255, 255, 255, 0.16); }
.btn-add:active { transform: scale(0.98); }

.player-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.player-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 8px 7px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  animation: chip-in 0.3s var(--ease) both;
}

@keyframes chip-in {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}

.chip-avatar {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 0.76rem;
  font-weight: 700;
  color: #0a0711;
  background: var(--chip-color, #6aa8ff);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

.player-chip > span {
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.88rem;
  font-weight: 500;
}

.chip-remove {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: var(--muted);
  transition: background 0.2s, color 0.2s;
}

.chip-remove:hover { background: rgba(255, 255, 255, 0.1); color: var(--ink); }
.chip-remove svg { width: 13px; height: 13px; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }

.setup-empty {
  margin-top: 12px;
  font-size: 0.8rem;
  color: var(--muted);
}

.setting-block {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.setting-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 11px;
}

.setting-head h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
}

.setting-value {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--plot);
  letter-spacing: 0.04em;
}

.segmented {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
}

.segmented.segmented-2 {
  grid-template-columns: repeat(2, 1fr);
}

.segmented button {
  height: 40px;
  border-radius: 11px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.segmented button.is-on {
  background: linear-gradient(135deg, rgba(255, 92, 240, 0.22), rgba(79, 140, 255, 0.22));
  color: var(--ink);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14) inset;
}

.setting-note {
  margin-top: 10px;
  font-size: 0.74rem;
  line-height: 1.45;
  color: var(--muted);
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 20px;
  padding: 15px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  cursor: pointer;
}

.toggle-copy {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toggle-copy strong {
  font-family: var(--font-display);
  font-size: 0.94rem;
  font-weight: 600;
}

.toggle-copy span {
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.4;
}

.toggle-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch {
  position: relative;
  flex: 0 0 auto;
  width: 48px;
  height: 28px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  transition: background 0.25s var(--ease);
}

.switch-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  transition: transform 0.25s var(--ease);
}

.toggle-row input:checked ~ .switch {
  background: linear-gradient(135deg, #ff5cf0, #8a4bff);
}

.toggle-row input:checked ~ .switch .switch-knob {
  transform: translateX(20px);
}

.consent-note {
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 13px;
  background: rgba(79, 224, 176, 0.07);
  border: 1px solid rgba(79, 224, 176, 0.18);
  font-size: 0.74rem;
  line-height: 1.5;
  color: rgba(180, 240, 220, 0.9);
}

.consent-note strong { color: #b9ffe9; }

.setup-bottom {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.deck-summary {
  flex: 1;
  font-size: 0.74rem;
  line-height: 1.3;
  color: var(--muted);
}

.setup-bottom .btn {
  --btn-h: 54px;
  flex: 0 0 auto;
  padding: 0 24px;
}

/* ============================================================
   GAME
   ============================================================ */

.screen-game {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  gap: 10px;
}

.game-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.game-stats {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.stat {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-transform: uppercase;
}

.stat b {
  color: var(--ink);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.stat-chaos svg {
  width: 13px;
  height: 13px;
  fill: #ffb547;
}

.stat-chaos b { color: #ffd27a; }

.mini-mark {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.32);
}

.rule-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 2px 0;
}

.rule-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(208, 139, 255, 0.12);
  border: 1px solid rgba(208, 139, 255, 0.32);
  font-size: 0.68rem;
  font-weight: 500;
  color: #eccfff;
  animation: chip-in 0.3s var(--ease) both;
}

.rule-pill .rule-count {
  display: grid;
  place-items: center;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: rgba(208, 139, 255, 0.28);
  font-size: 0.6rem;
  font-weight: 700;
}

.turn-head {
  padding: 2px 2px 0;
}

.turn-head .eyebrow {
  margin-bottom: 7px;
}

.reader-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--avatar-color, #6aa8ff);
  color: #0a0711;
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.1),
    0 8px 20px -8px rgba(0, 0, 0, 0.7);
  transition: background 0.3s;
}

.reader-meta h2 {
  font-family: var(--font-display);
  font-size: 1.28rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.reader-meta span {
  font-size: 0.7rem;
  color: var(--muted);
}

.card-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
  perspective: 1600px;
}

.card {
  position: relative;
  height: min(54vh, 500px);
  max-height: 100%;
  aspect-ratio: 5 / 7;
  max-width: 88vw;
  perspective: 1600px;
  transition: transform 0.25s var(--ease);
}

.card.is-drawable {
  cursor: pointer;
}

.card.is-drawable:hover {
  transform: translateY(-3px);
}

.card.is-drawable:active {
  transform: scale(0.985);
}

.card.is-drawable:focus-visible {
  outline: none;
  border-radius: 26px;
  box-shadow: 0 0 0 3px rgba(255, 92, 240, 0.55);
}

.card.is-drawable .card-back {
  border-color: rgba(208, 139, 255, 0.38);
  box-shadow:
    0 34px 70px -28px rgba(0, 0, 0, 0.95),
    0 0 0 1px rgba(0, 0, 0, 0.4),
    0 0 54px -14px rgba(208, 139, 255, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.card.is-drawable::after {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 32px;
  border: 1px solid rgba(208, 139, 255, 0.32);
  pointer-events: none;
  animation: tap-ring 2.4s var(--ease) infinite;
}

@keyframes tap-ring {
  0% { opacity: 0; transform: scale(0.985); }
  35% { opacity: 0.55; }
  100% { opacity: 0; transform: scale(1.035); }
}

.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.68s var(--ease);
}

.card.is-flipped .card-inner {
  transform: rotateY(180deg);
}

.card-face {
  position: absolute;
  inset: 0;
  border-radius: 26px;
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow:
    0 34px 70px -28px rgba(0, 0, 0, 0.95),
    0 0 0 1px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

/* ---- card back ---- */

.card-back {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(138, 75, 255, 0.32), transparent 60%),
    linear-gradient(160deg, #170d26 0%, #0c0714 55%, #12081f 100%);
  color: var(--ink);
}

.card-back-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.5;
  background-image:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 14px),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px);
  background-size: auto, 22px 22px;
  mask-image: radial-gradient(circle at 50% 45%, #000 30%, transparent 78%);
  -webkit-mask-image: radial-gradient(circle at 50% 45%, #000 30%, transparent 78%);
}

.card-back-emblem {
  position: relative;
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.03);
  box-shadow: 0 0 40px rgba(208, 139, 255, 0.25) inset;
}

.card-back-emblem img {
  width: 58px;
  height: 58px;
  filter: drop-shadow(0 0 6px rgba(208, 139, 255, 0.7));
}

.card-back-word {
  position: relative;
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.34rem;
  font-weight: 800;
  line-height: 0.94;
  letter-spacing: -0.03em;
}

.card-back-accent {
  display: block;
  font-family: var(--font-accent);
  font-style: italic;
  font-weight: 400;
  color: #e2c2ff;
}

.card-back-foot {
  position: absolute;
  bottom: 22px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 0.56rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
}

/* ---- card front ---- */

.card-front {
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  padding: clamp(17px, 6.4cqw, 27px);
  color: #fff;
  transform: rotateY(180deg);
  background: linear-gradient(155deg, #2f6fe0 0%, #1a3fa0 48%, #0b1c4a 100%);
}

.card-front::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(90% 55% at 18% 0%, rgba(255, 255, 255, 0.24), transparent 60%),
    radial-gradient(80% 60% at 100% 100%, rgba(0, 0, 0, 0.36), transparent 65%);
  pointer-events: none;
}

.card-front::after {
  content: "";
  position: absolute;
  right: -30%;
  bottom: -30%;
  width: 80%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.13);
  box-shadow:
    0 0 0 34px rgba(255, 255, 255, 0.03),
    0 0 0 70px rgba(255, 255, 255, 0.02);
  pointer-events: none;
}

.card-front[data-type="reader"] {
  background: linear-gradient(155deg, #2f6fe0 0%, #1a3fa0 48%, #0b1c4a 100%);
}

.card-front[data-type="group"] {
  background: linear-gradient(155deg, #16b98a 0%, #0c7a64 50%, #043a34 100%);
}

.card-front[data-type="action"] {
  background: linear-gradient(155deg, #ff6a4d 0%, #d92c4f 50%, #4a0d2a 100%);
}

.card-front[data-type="plot"] {
  background: linear-gradient(155deg, #b45cff 0%, #6a1fd0 46%, #23054a 100%);
}

.card-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.card-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: clamp(0.5rem, 2.6cqw, 0.62rem);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  backdrop-filter: blur(4px);
}

.card-kicker svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.card-badge i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
}

.card-badge i.on {
  background: #fff;
  box-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
}

.card-body {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(8px, 3cqw, 14px);
  padding: clamp(12px, 4cqw, 22px) 0;
  min-height: 0;
}

.card-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 12.5cqw, 3.5rem);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.25);
}

.card-text {
  font-family: var(--font-display);
  font-size: clamp(1.12rem, 7.4cqw, 1.72rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.card-front.is-long .card-text {
  font-size: clamp(1rem, 6.4cqw, 1.5rem);
  line-height: 1.2;
}

.card-front.has-picker .card-title {
  font-size: clamp(1.7rem, 10.4cqw, 2.75rem);
}

.card-front.has-picker .card-text {
  font-size: clamp(0.98rem, 5.6cqw, 1.28rem);
  line-height: 1.2;
}

.card-front.has-picker .card-body {
  gap: clamp(6px, 2cqw, 10px);
  padding: clamp(6px, 2.5cqw, 12px) 0;
}

.card-front.has-picker .pick-chip {
  padding: 5px 9px 5px 5px;
  font-size: clamp(0.56rem, 2.7cqw, 0.68rem);
}

.card-front.has-picker .pick-avatar {
  width: 16px;
  height: 16px;
  font-size: 0.5rem;
}

.card-foot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: clamp(9px, 3cqw, 14px);
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  font-size: clamp(0.5rem, 2.5cqw, 0.6rem);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

.card-mark {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.42);
}

/* picker inside plot cards */

.card-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 4px;
}

.pick-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px 6px 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-size: clamp(0.58rem, 3cqw, 0.72rem);
  font-weight: 600;
  color: #fff;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.pick-chip:active { transform: scale(0.97); }

.pick-chip.is-on {
  background: #fff;
  border-color: #fff;
  color: #1a0b2e;
}

.pick-chip .pick-avatar {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--chip-color, #fff);
  color: #0a0711;
  font-size: 0.55rem;
  font-weight: 800;
}

.pick-chip.is-on .pick-avatar {
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
}

/* ---- turn actions ---- */

.turn-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  padding-top: 2px;
}

.turn-hint {
  text-align: center;
  font-size: 0.72rem;
  color: var(--muted);
  min-height: 1.2em;
}

.turn-hint.is-cta {
  color: rgba(247, 242, 255, 0.82);
  font-size: 0.8rem;
  font-weight: 500;
}

.btn-draw {
  --btn-h: 56px;
}

/* ---- confetti ---- */

.confetti {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 12px;
  border-radius: 2px;
  pointer-events: none;
  z-index: 5;
  animation: confetti-burst 1.15s var(--ease) forwards;
}

@keyframes confetti-burst {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(0deg) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(var(--rot)) scale(0.5);
  }
}

/* ============================================================
   END
   ============================================================ */

.screen-end {
  height: 100vh;
  height: 100dvh;
  gap: 18px;
}

.end-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-top: 6vh;
  scrollbar-width: none;
}

.end-scroll::-webkit-scrollbar { display: none; }

.end-title {
  margin-top: 10px;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 11vw, 3.2rem);
  font-weight: 800;
  line-height: 0.94;
  letter-spacing: -0.04em;
}

.end-title em {
  font-family: var(--font-accent);
  font-weight: 400;
  letter-spacing: -0.01em;
  background: linear-gradient(100deg, #ff8fc7, #d08bff 55%, #6aa8ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.end-sub {
  margin-top: 14px;
  max-width: 32ch;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--ink-dim);
}

.end-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 26px;
}

.end-stat {
  padding: 14px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  text-align: center;
}

.end-stat b {
  display: block;
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}

.end-stat span {
  display: block;
  margin-top: 5px;
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.end-cast {
  margin-top: 26px;
}

.end-cast h3 {
  margin-bottom: 12px;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
}

.end-players {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.end-player {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px 7px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  font-size: 0.8rem;
}

.end-player .chip-avatar {
  width: 26px;
  height: 26px;
  font-size: 0.66rem;
}

.end-player small {
  color: var(--muted);
  font-size: 0.68rem;
}

.end-quote {
  margin-top: 24px;
  padding: 16px 18px;
  border-left: 2px solid rgba(208, 139, 255, 0.6);
  border-radius: 0 12px 12px 0;
  background: rgba(208, 139, 255, 0.07);
  font-family: var(--font-accent);
  font-style: italic;
  font-size: 1.08rem;
  line-height: 1.4;
  color: #ecd9ff;
}

.end-actions {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding-top: 6px;
}

/* ============================================================
   MODAL / SHEET
   ============================================================ */

.modal-root {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}

.modal-root[hidden] { display: none; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 3, 9, 0.72);
  backdrop-filter: blur(6px);
  animation: fade-in 0.25s ease both;
}

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.sheet {
  position: relative;
  width: 100%;
  max-width: var(--shell);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  padding: 10px 22px max(22px, env(safe-area-inset-bottom));
  border-radius: 26px 26px 0 0;
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(138, 75, 255, 0.16), transparent 60%),
    #110a1c;
  border: 1px solid var(--line-strong);
  border-bottom: 0;
  box-shadow: 0 -24px 60px -20px rgba(0, 0, 0, 0.9);
  animation: sheet-up 0.38s var(--ease) both;
}

@keyframes sheet-up {
  from { transform: translateY(40px); opacity: 0.6; }
  to   { transform: translateY(0); opacity: 1; }
}

.sheet-grip {
  flex: 0 0 auto;
  width: 38px;
  height: 4px;
  margin: 0 auto 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
}

.sheet-head h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.sheet-body {
  overflow-y: auto;
  min-height: 0;
  scrollbar-width: none;
}

.sheet-body::-webkit-scrollbar { display: none; }

.confirm-copy {
  padding: 4px 0 10px;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--ink-dim);
}

.sheet-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.sheet-body + .sheet-actions {
  margin-top: 6px;
}

.menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  padding: 16px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  text-align: left;
  transition: background 0.2s;
}

.menu-item:hover { background: rgba(255, 255, 255, 0.08); }
.menu-item:active { transform: scale(0.995); }

.menu-item strong {
  display: block;
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 600;
}

.menu-item span {
  display: block;
  margin-top: 2px;
  font-size: 0.72rem;
  color: var(--muted);
}

.menu-item.danger strong { color: #ff9c8f; }

.menu-item svg {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* rules content */

.rules {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-bottom: 8px;
}

.rule-block {
  display: flex;
  gap: 14px;
}

.rule-num {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink-dim);
}

.rule-block h3 {
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 600;
  margin-bottom: 3px;
}

.rule-block p {
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--ink-dim);
}

.type-legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: 4px;
}

.type-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--ink-dim);
}

.type-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--dot, #fff);
}

/* ============================================================
   MISC / RESPONSIVE
   ============================================================ */

@media (max-height: 720px) {
  .card { height: 48vh; }
  .end-scroll { padding-top: 2vh; }
  .home-hero { padding: 2vh 0 2vh; }
}

@media (max-height: 640px) {
  .card { height: 44vh; }
  .reader-meta h2 { font-size: 1.12rem; }
  .avatar { width: 40px; height: 40px; font-size: 0.9rem; }
}

@media (min-width: 560px) {
  .screen {
    padding-left: 30px;
    padding-right: 30px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .ghost-card { animation: none; }
}

/* ============================================================
   LANGUAGE SWITCHER
   ============================================================ */

.lang-toggle {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
}

.lang-toggle button {
  min-width: 42px;
  height: 27px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  color: var(--muted);
  transition: background 0.2s, color 0.2s;
}

.lang-toggle button.is-on {
  background: rgba(255, 255, 255, 0.15);
  color: var(--ink);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.home-lang-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
  padding: 0 4px;
}

.home-lang-row .eyebrow {
  font-size: 0.6rem;
}

.home-admin-btn {
  position: absolute;
  right: 0;
  top: -4px;
  width: 38px;
  height: 38px;
  border-radius: 12px;
}

.home-admin-btn svg {
  width: 18px;
  height: 18px;
}

.menu-lang {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 4px 12px;
  border-bottom: 1px solid var(--line);
}

.menu-lang > span {
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ============================================================
   DECK EDITOR
   ============================================================ */

.screen-admin {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  gap: 11px;
}

.admin-toolbar {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-toolbar input[type="search"] {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border-radius: 13px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}

.admin-toolbar input[type="search"]:focus {
  border-color: rgba(255, 92, 240, 0.55);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 3px rgba(255, 92, 240, 0.1);
}

.admin-filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.admin-filters select {
  height: 42px;
  padding: 0 10px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  font-size: 0.78rem;
  outline: none;
}

.admin-actions-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.btn-small {
  --btn-h: 42px;
  padding: 0 14px;
  border-radius: 12px;
  font-size: 0.8rem;
}

.admin-reset {
  margin-left: auto;
  font-size: 0.7rem;
}

.admin-note {
  font-size: 0.67rem;
  line-height: 1.4;
  color: var(--muted);
}

.admin-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 2px 1px 8px;
  scrollbar-width: none;
}

.admin-list::-webkit-scrollbar {
  display: none;
}

.admin-card {
  display: flex;
  align-items: stretch;
  gap: 6px;
  padding: 9px 7px 9px 11px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
}

.admin-card-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 1px 3px;
  text-align: left;
}

.admin-card-top {
  display: flex;
  align-items: center;
  gap: 7px;
}

.admin-type {
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.admin-type[data-type="reader"] { background: rgba(106, 168, 255, 0.15); color: #bcd6ff; }
.admin-type[data-type="group"] { background: rgba(79, 224, 176, 0.14); color: #aef5dd; }
.admin-type[data-type="action"] { background: rgba(255, 122, 99, 0.14); color: #ffc2b8; }
.admin-type[data-type="plot"] { background: rgba(208, 139, 255, 0.15); color: #eccfff; }

.admin-dots {
  display: inline-flex;
  gap: 2px;
}

.admin-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}

.admin-dot.on {
  background: #fff;
}

.admin-id {
  margin-left: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.5rem;
  color: rgba(255, 255, 255, 0.28);
}

.admin-card-en {
  font-size: 0.8rem;
  line-height: 1.32;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.admin-card-ar {
  font-size: 0.72rem;
  line-height: 1.3;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-card-btns {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}

.admin-mini {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border-radius: 9px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}

.admin-mini:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.09);
}

.admin-mini svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.admin-mini-danger:hover {
  color: #ff9c8f;
  background: rgba(255, 107, 94, 0.12);
}

.admin-empty {
  padding: 34px 10px;
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
}

.admin-form-body {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

#admin-plot-fields {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.admin-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}

.admin-field input,
.admin-field select,
.admin-field textarea {
  width: 100%;
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.84rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  outline: none;
}

.admin-field textarea {
  resize: vertical;
  min-height: 64px;
  line-height: 1.4;
}

.admin-field input:focus,
.admin-field select:focus,
.admin-field textarea:focus {
  border-color: rgba(255, 92, 240, 0.55);
  box-shadow: 0 0 0 3px rgba(255, 92, 240, 0.1);
}

.admin-hint {
  font-size: 0.68rem;
  line-height: 1.45;
  color: var(--muted);
}

.admin-danger {
  color: #ff9c8f;
}

.btn.admin-danger {
  background: rgba(255, 107, 94, 0.12);
  border: 1px solid rgba(255, 107, 94, 0.3);
  color: #ffb4a9;
}

#admin-rule-fields {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}

#admin-rule-fields .admin-field {
  margin: 0;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 300;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(21, 12, 33, 0.96);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  font-size: 0.78rem;
  white-space: nowrap;
  box-shadow: 0 14px 34px -12px rgba(0, 0, 0, 0.85);
  animation: toast-in 0.3s var(--ease) both;
}

@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .card.is-drawable::after {
    animation: none;
    opacity: 0.45;
    transform: none;
  }
}

/* ============================================================
   SWIPE GESTURES
   ============================================================ */

.card.is-swipeable {
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  will-change: transform;
}

.card.is-swipeable:active {
  cursor: grabbing;
}

.card.is-dragging {
  transition: none !important;
  cursor: grabbing;
}

.card.is-committing {
  transition: transform 0.24s ease-in, opacity 0.24s ease-in !important;
}

.card.is-resetting {
  transition: none !important;
}

.card.is-resetting .card-inner,
.card.is-resetting .card-face {
  transition: none !important;
}

.swipe-stamp {
  position: absolute;
  top: 50%;
  z-index: 3;
  padding: 7px 13px;
  border: 2px solid currentColor;
  border-radius: 12px;
  background: rgba(10, 7, 17, 0.45);
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 7.5cqw, 2rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s linear;
  backdrop-filter: blur(3px);
}

.swipe-stamp-next {
  left: 17px;
  transform: translateY(-50%) rotate(-10deg);
  color: #a6ffdd;
  border-color: rgba(79, 224, 176, 0.8);
  background: rgba(6, 59, 54, 0.5);
}

.swipe-stamp-skip {
  right: 17px;
  transform: translateY(-50%) rotate(10deg);
  color: #ffb4a9;
  border-color: rgba(255, 122, 99, 0.8);
  background: rgba(74, 13, 42, 0.5);
}

/* ============================================================
   SKIP DARE
   ============================================================ */

.dare {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 2px;
}

.dare-badge {
  align-self: flex-start;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 122, 99, 0.35);
  background: rgba(255, 122, 99, 0.15);
  color: #ffc2b8;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.dare-lede {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--ink-dim);
}

.dare-card {
  position: relative;
  overflow: hidden;
  padding: 20px 18px 22px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: linear-gradient(155deg, #ff6a4d 0%, #d92c4f 50%, #4a0d2a 100%);
  box-shadow: 0 20px 44px -20px rgba(0, 0, 0, 0.85);
}

.dare-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(90% 55% at 18% 0%, rgba(255, 255, 255, 0.2), transparent 60%);
  pointer-events: none;
}

.dare-card::after {
  content: "";
  position: absolute;
  right: -20%;
  bottom: -35%;
  width: 72%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 30px rgba(255, 255, 255, 0.03);
  pointer-events: none;
}

.dare-kicker {
  position: relative;
  z-index: 1;
  display: inline-block;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.18);
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.dare-text {
  position: relative;
  z-index: 1;
  margin-top: 16px;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 5.2vw, 1.85rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #fff;
}
