/* Clay Toy Theme - CSS Design System */

:root {
  /* Sparkle Toy Colors - bright, candy-coated palette */
  --clay-bg: #ffe1f2; /* Cotton candy play desk */
  --clay-board: #ff9fd6; /* Bubblegum pink play mat */
  --clay-board-dark: #ee5fb0; /* Bubblegum pink mat border */

  --clay-red: #ff6b6b;
  --clay-red-dark: #cc4b4b;
  --clay-red-light: #ff9e9e;

  --clay-blue: #4dabf7;
  --clay-blue-dark: #228be6;
  --clay-blue-light: #a5d8ff;

  --clay-green: #51cf66;
  --clay-green-dark: #37b24d;
  --clay-green-light: #b2f2bb;

  --clay-yellow: #fcc419;
  --clay-yellow-dark: #f59f00;
  --clay-yellow-light: #ffe066;

  --clay-pink: #ff6fb5;
  --clay-pink-dark: #e64980;
  --clay-pink-light: #ffc2dd;

  --clay-purple: #cc5de8;
  --clay-purple-dark: #9c36b5;
  --clay-purple-light: #eebefa;

  --clay-white: #fff5fb;
  --clay-white-dark: #f3c8e2;
  --clay-white-light: #ffffff;

  --clay-dark: #6a4172;

  /* Text and shadows */
  --font-main: 'Fredoka', system-ui, -apple-system, sans-serif;
  
  /* Claymorphic Shadows */
  --clay-shadow-out: 6px 6px 12px rgba(0, 0, 0, 0.2);
  --clay-shadow-in: inset 3px 3px 6px rgba(255, 255, 255, 0.7), inset -6px -6px 10px rgba(0, 0, 0, 0.2);
  
  --clay-btn-shadow: 4px 4px 0px rgba(0, 0, 0, 0.15), inset 2px 2px 4px rgba(255, 255, 255, 0.7), inset -3px -3px 6px rgba(0, 0, 0, 0.15);
  --clay-btn-active: 1px 1px 0px rgba(0, 0, 0, 0.15), inset 2px 2px 4px rgba(255, 255, 255, 0.7), inset -3px -3px 6px rgba(0, 0, 0, 0.15);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-drag: none;
}

body, html {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--clay-bg);
  font-family: var(--font-main);
  color: var(--clay-dark);
}

/* Landscape Wrapper */
.landscape-wrapper {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  background: radial-gradient(circle, #ffe3f3 0%, #e6c6ff 55%, #b98af2 100%);
}

/* Orientation Warning Screen */
.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.overlay.hidden {
  display: none !important;
  opacity: 0;
  pointer-events: none;
}

.clay-card {
  background: var(--clay-white);
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--clay-shadow-out), var(--clay-shadow-in);
  border: 4px solid var(--clay-white-dark);
  text-align: center;
}

.warning-content {
  width: 320px;
  background: var(--clay-yellow-light);
  border-color: var(--clay-yellow-dark);
}

.toy-icon {
  font-size: 3rem;
  margin-bottom: 12px;
  animation: wobble 2s infinite ease-in-out;
}

@keyframes wobble {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(10deg) scale(1.05); }
  75% { transform: rotate(-10deg) scale(0.95); }
}

/* Base Screen Style */
.screen {
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
}

.screen.hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.9);
}

.clay-container {
  width: 90%;
  max-width: 900px;
  height: 85%;
  background: var(--clay-board);
  border: 8px solid var(--clay-board-dark);
  border-radius: 36px;
  box-shadow: 12px 12px 24px rgba(0, 0, 0, 0.25), inset 4px 4px 10px rgba(255, 255, 255, 0.4), inset -8px -8px 16px rgba(0, 0, 0, 0.3);
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

/* Buttons (Claymorphism Style) */
.clay-btn {
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 1.1rem;
  padding: 12px 24px;
  border: 4px solid rgba(0, 0, 0, 0.15);
  border-radius: 20px;
  cursor: pointer;
  outline: none;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
  box-shadow: var(--clay-btn-shadow);
  color: white;
  text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.2);
}

.clay-btn:hover {
  transform: scale(1.04) translateY(-2px);
}

.clay-btn:active {
  transform: scale(0.96) translateY(2px);
  box-shadow: var(--clay-btn-active);
}

.btn-primary {
  background: var(--clay-blue);
  border-color: var(--clay-blue-dark);
}
.btn-secondary {
  background: var(--clay-white);
  color: var(--clay-dark);
  text-shadow: none;
  border-color: var(--clay-white-dark);
}
.btn-success {
  background: var(--clay-green);
  border-color: var(--clay-green-dark);
}
.btn-danger {
  background: var(--clay-red);
  border-color: var(--clay-red-dark);
}

.btn-large {
  font-size: 1.5rem;
  padding: 16px 40px;
  border-radius: 24px;
}

/* Home Screen Styling */
.home-content {
  justify-content: center;
  gap: 30px;
}

.logo-area {
  text-align: center;
}

.clay-logo {
  font-size: 4.5rem;
  color: var(--clay-white);
  text-shadow: 4px 4px 0px var(--clay-purple-dark), 8px 8px 0px var(--clay-pink-dark), 8px 8px 18px rgba(0,0,0,0.15);
  letter-spacing: 2px;
  animation: popIn 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards, sparkleGlow 2.4s ease-in-out infinite;
}

@keyframes sparkleGlow {
  0%, 100% { filter: drop-shadow(0 0 0px rgba(255, 255, 255, 0)); }
  50% { filter: drop-shadow(0 0 18px rgba(255, 220, 245, 0.9)); }
}

.logo-subtitle {
  font-size: 1.4rem;
  color: var(--clay-yellow);
  font-weight: 700;
  text-shadow: 2px 2px 0px rgba(0,0,0,0.2);
}

.logo-sparkle {
  display: inline-block;
  animation: wobble 1.8s infinite ease-in-out;
}

.home-buttons {
  display: flex;
  gap: 20px;
}

.clay-decorations {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 0;
}

.clay-ball {
  position: absolute;
  border-radius: 50%;
  box-shadow: var(--clay-shadow-out), var(--clay-shadow-in);
  opacity: 0.85;
  animation: floatBob 4s ease-in-out infinite;
}

@keyframes floatBob {
  0%, 100% { transform: translateY(0) rotate(var(--ball-rot, 0deg)); }
  50% { transform: translateY(-14px) rotate(var(--ball-rot, 0deg)); }
}

.clay-ball.red {
  width: 60px;
  height: 60px;
  background: var(--clay-red);
  top: 15%;
  left: 10%;
  --ball-rot: 15deg;
  animation-delay: 0s;
}

.clay-ball.blue {
  width: 80px;
  height: 80px;
  background: var(--clay-blue);
  bottom: 15%;
  right: 8%;
  --ball-rot: -25deg;
  animation-delay: 0.6s;
}

.clay-ball.green {
  width: 50px;
  height: 50px;
  background: var(--clay-green);
  top: 20%;
  right: 15%;
  --ball-rot: 45deg;
  animation-delay: 1.2s;
}

.clay-ball.yellow {
  width: 70px;
  height: 70px;
  background: var(--clay-yellow);
  bottom: 10%;
  left: 15%;
  animation-delay: 1.8s;
}

.clay-ball.pink {
  width: 45px;
  height: 45px;
  background: var(--clay-pink);
  top: 42%;
  left: 4%;
  --ball-rot: -10deg;
  animation-delay: 0.3s;
}

.clay-ball.purple {
  width: 55px;
  height: 55px;
  background: var(--clay-purple);
  top: 8%;
  left: 45%;
  --ball-rot: 20deg;
  animation-delay: 0.9s;
}

/* Sparkly emoji decorations (stars, hearts) scattered around the home screen */
.clay-sparkle {
  position: absolute;
  font-size: 2rem;
  filter: drop-shadow(2px 2px 0px rgba(0,0,0,0.1));
  animation: floatBob 3.5s ease-in-out infinite, wobble 2.5s infinite ease-in-out;
  opacity: 0.9;
}

.clay-sparkle.s1 { top: 10%; left: 25%; font-size: 1.8rem; animation-delay: 0.2s; }
.clay-sparkle.s2 { top: 65%; left: 20%; font-size: 1.4rem; animation-delay: 0.8s; }
.clay-sparkle.s3 { top: 25%; right: 25%; font-size: 1.6rem; animation-delay: 1.4s; }
.clay-sparkle.s4 { bottom: 12%; right: 30%; font-size: 2rem; animation-delay: 0.5s; }

/* Mode Selection Screen */
.mode-options {
  display: flex;
  gap: 30px;
  margin: auto;
}

.mode-card {
  width: 220px;
  padding: 30px 20px;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.2s ease;
  background: var(--clay-white);
  border: 5px solid var(--clay-white-dark);
}

.mode-card:hover {
  transform: scale(1.08) translateY(-5px);
  box-shadow: 10px 10px 20px rgba(0,0,0,0.15), var(--clay-shadow-in);
}

.mode-card:active {
  transform: scale(0.98);
}

.mode-icon {
  font-size: 3.5rem;
  margin-bottom: 12px;
}

.mode-card h3 {
  font-size: 1.4rem;
  margin-bottom: 8px;
}

/* Game Board Layout */
#screen-game {
  background: var(--clay-bg);
}

.game-layout {
  width: 100vw;
  height: 100vh;
  display: grid;
  grid-template-rows: 110px 1fr 200px;
  padding: 10px;
  gap: 8px;
}

/* Opponents Row */
.opponents-row {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 5px 15px;
  gap: 15px;
}

/* Opponent clay card info */
.opponent-badge {
  display: flex;
  align-items: center;
  background: var(--clay-white);
  padding: 8px 16px;
  border-radius: 20px;
  border: 4px solid var(--clay-white-dark);
  box-shadow: var(--clay-shadow-out), var(--clay-shadow-in);
  min-width: 160px;
  position: relative;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.opponent-badge.active-turn {
  border-color: var(--clay-blue);
  transform: scale(1.05);
  animation: turnPulse 1.5s infinite alternate;
}

@keyframes turnPulse {
  0% { box-shadow: 0 0 10px rgba(77, 171, 247, 0.5), var(--clay-shadow-out), var(--clay-shadow-in); }
  100% { box-shadow: 0 0 20px rgba(77, 171, 247, 0.8), var(--clay-shadow-out), var(--clay-shadow-in); }
}

.avatar-holder {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ccd;
  border: 3px solid white;
  margin-right: 8px;
  overflow: hidden;
  box-shadow: inset 1px 1px 3px rgba(0,0,0,0.2);
}

.opponent-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.opponent-name {
  font-weight: 700;
  font-size: 0.9rem;
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.opponent-hand-preview {
  display: flex;
  margin-top: 4px;
}

.mini-card-back {
  width: 14px;
  height: 20px;
  background: var(--clay-red);
  border: 1px solid white;
  border-radius: 3px;
  margin-right: -8px;
  box-shadow: 1px 1px 2px rgba(0,0,0,0.15);
}

.opponent-card-count {
  font-size: 0.8rem;
  font-weight: 700;
  margin-left: 12px;
}

.opponent-status-tag {
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--clay-red);
  color: white;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 700;
  box-shadow: var(--clay-shadow-out);
  white-space: nowrap;
}

.opponent-status-tag.eliminated {
  background: #555;
}

.opponent-status-tag.reconnecting {
  background: var(--clay-yellow);
  color: #5c4400;
}

.opponent-badge.disconnected {
  opacity: 0.55;
}

.opponent-status-tag.reconnecting .status-spinner {
  display: inline-block;
  margin-right: 4px;
  animation: statusSpin 0.8s linear infinite;
}

@keyframes statusSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Turn timer countdown ring (spec 4.2) - a conic-gradient arc that drains as
   --timer-pct falls from 100 to 0, with --timer-color shifting green -> red. */
.turn-indicator-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.turn-timer-ring {
  --timer-pct: 100;
  --timer-color: #51cf66;
  position: relative;
  width: 46px;
  height: 46px;
  min-width: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: conic-gradient(var(--timer-color) calc(var(--timer-pct) * 1%), rgba(0, 0, 0, 0.15) 0);
  box-shadow: var(--clay-shadow-out), var(--clay-shadow-in);
  transition: opacity 0.2s ease;
}

.turn-timer-ring.hidden {
  opacity: 0;
  pointer-events: none;
}

.turn-timer-ring::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--clay-white);
}

.turn-timer-ring span {
  position: relative;
  font-weight: 800;
  font-size: 0.85rem;
  z-index: 1;
}

/* Brief discard-pile pulse when a genuinely new card lands (spec 4.7) */
@keyframes cardJustPlayed {
  0% { scale: 1.35; filter: brightness(1.3); }
  100% { scale: 1; filter: brightness(1); }
}

.card-just-played {
  animation: cardJustPlayed 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Online lobby */
.lobby-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  width: 340px;
  max-width: 90vw;
}

.lobby-field-label {
  font-weight: 700;
  font-size: 0.85rem;
  margin-top: 6px;
}

.clay-input {
  font-family: inherit;
  font-size: 1rem;
  padding: 10px 14px;
  border-radius: 14px;
  border: 3px solid var(--clay-white-dark);
  background: var(--clay-white);
  box-shadow: inset 2px 2px 5px rgba(0,0,0,0.1);
  outline: none;
}

.clay-input:focus {
  border-color: var(--clay-blue);
}

.lobby-hint {
  font-size: 0.75rem;
  opacity: 0.7;
  margin: 0 0 6px;
}

.lobby-status {
  padding: 16px 24px;
  text-align: center;
  margin-top: 14px;
}

.lobby-waiting-details {
  margin-top: 8px;
  font-weight: 700;
}

/* Matchmaking lobby seat fill-in / timer / tips (spec section 14) */

.lobby-timer-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 10px 0;
}

.lobby-timer-ring {
  --timer-pct: 100;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: conic-gradient(var(--clay-green) calc(var(--timer-pct) * 1%), rgba(0, 0, 0, 0.15) 0);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.lobby-timer-ring::before {
  content: "";
  position: absolute;
}
.lobby-timer-ring span {
  background: var(--clay-white-light);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--clay-dark);
}

.lobby-timer-label {
  font-size: 0.7rem;
  font-weight: 500;
  opacity: 0.75;
  max-width: 160px;
  text-align: left;
}

.lobby-seat-row {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin: 10px 0;
}

.lobby-seat-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 64px;
}
.lobby-seat-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3px solid var(--clay-white-dark);
  background: var(--clay-white-light);
  overflow: hidden;
  box-shadow: var(--clay-shadow-out);
}
.lobby-seat-avatar svg {
  width: 100%;
  height: 100%;
}
.lobby-seat-slot.empty .lobby-seat-avatar {
  border-style: dashed;
  opacity: 0.4;
}
.lobby-seat-name {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--clay-dark);
  max-width: 64px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lobby-tip-card {
  margin-top: 10px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  padding: 8px 14px;
  font-size: 0.75rem;
  font-style: italic;
  opacity: 0.85;
  min-height: 1.2em;
}

.lobby-starting-message {
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--clay-green-dark);
}

/* Center Board (Main Playing Surface) */
.center-board {
  background: var(--clay-board);
  border-radius: 30px;
  border: 6px solid var(--clay-board-dark);
  box-shadow: inset 5px 5px 10px rgba(0,0,0,0.3), inset -5px -5px 10px rgba(255,255,255,0.15), 0px 4px 10px rgba(0,0,0,0.2);
  display: grid;
  grid-template-columns: 180px 1fr 180px;
  padding: 10px;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Board Panels */
.board-info-panel, .board-state-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
  justify-content: center;
}

.turn-indicator {
  background: var(--clay-white);
  padding: 8px 12px;
  border-radius: 16px;
  font-weight: 700;
  font-size: 0.95rem;
  border-width: 3px;
  color: var(--clay-dark);
}

.game-status-card {
  font-size: 0.85rem;
  font-weight: 700;
  padding: 10px;
  border-radius: 16px;
  border-width: 3px;
}

.direction-indicator {
  margin-bottom: 4px;
}

.state-card {
  padding: 10px;
  border-radius: 16px;
  border-width: 3px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.state-label {
  font-size: 0.8rem;
  font-weight: 700;
  opacity: 0.7;
}

.clay-color-wheel {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  font-weight: 700;
  font-size: 0.75rem;
  text-shadow: 1px 1px 2px black;
  box-shadow: var(--clay-shadow-out), var(--clay-shadow-in);
  border: 3px solid white;
  transition: background-color 0.3s ease;
}

.clay-color-wheel.red { background-color: var(--clay-red); }
.clay-color-wheel.blue { background-color: var(--clay-blue); }
.clay-color-wheel.green { background-color: var(--clay-green); }
.clay-color-wheel.yellow { background-color: var(--clay-yellow); }
.clay-color-wheel.none { background-color: #888; }

.state-symbol-label {
  font-size: 0.85rem;
  font-weight: 700;
  margin-top: 4px;
}

#symbol-text {
  color: var(--clay-blue-dark);
}

/* Attack Active Card */
.attack-card {
  background: var(--clay-red-light);
  border-color: var(--clay-red);
  padding: 10px;
  border-radius: 16px;
  border-width: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  animation: attackShake 0.4s infinite alternate;
}

@keyframes attackShake {
  0% { transform: rotate(-2deg) scale(1.02); }
  100% { transform: rotate(2deg) scale(1.02); }
}

.attack-icon {
  font-size: 1.5rem;
}

.attack-details {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.attack-title {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--clay-red-dark);
}

.attack-amount {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--clay-red-dark);
}

/* Play Area (Deck & Discard) */
.play-area {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
  position: relative;
}

/* Clay Deck Stack Style */
.deck-container {
  perspective: 600px;
}

.clay-deck-stack {
  position: relative;
  width: 100px;
  height: 140px;
  cursor: pointer;
}

.deck-card-layer {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 14px;
  background: var(--clay-red);
  border: 4px solid var(--clay-white);
  box-shadow: 2px 2px 4px rgba(0,0,0,0.15), var(--clay-shadow-in);
  transition: transform 0.1s ease;
}

.layer-3 {
  transform: translate3d(6px, 6px, -15px);
  background: var(--clay-red-dark);
}

.layer-2 {
  transform: translate3d(3px, 3px, -8px);
  background: var(--clay-red);
}

.layer-1 {
  transform: translate3d(0, 0, 0);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2rem;
}

.clay-deck-stack:hover .layer-1 {
  transform: translate3d(0, -5px, 0);
}

.clay-deck-stack:active .layer-1 {
  transform: translate3d(0, 2px, 0);
}

.card-back-pattern {
  color: rgba(255, 255, 255, 0.4);
  font-size: 2.2rem;
  pointer-events: none;
}

/* Discard Pile */
.discard-container {
  width: 100px;
  height: 140px;
  position: relative;
}

.discard-pile {
  width: 100%;
  height: 100%;
  border-radius: 14px;
  background: rgba(0,0,0,0.1);
  border: 3px dashed rgba(255,255,255,0.4);
  position: relative;
}

/* Clay Card Design
   Frame/content-layer split (spec 6.1: "Card rank/suit content renders as a
   separate layer on top of the frame at runtime") - .clay-card-element is
   the skin-driven FRAME (ivory/brass by default - the "Default" starter
   skin's own look, per the commissioned skin mockups), and .card-center is
   the gameplay-critical CONTENT box: its background carries the actual suit
   color, independent of whatever frame skin is equipped, so a skin can
   never obscure which color a card actually is. */
.clay-card-element {
  position: absolute;
  width: 100px;
  height: 140px;
  border-radius: 14px;
  border: 4px solid #c9a24d; /* brass hairline - "Ivory & Brass" default skin */
  background: #f4ecd8; /* warm ivory */
  box-shadow: inset 0 0 0 2px rgba(201, 162, 77, 0.35), var(--clay-shadow-out), var(--clay-shadow-in);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 8px;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.2s ease, filter 0.2s ease;
  transform-origin: center bottom;
  box-sizing: border-box;
}

.clay-card-element.red .card-center { background: linear-gradient(180deg, var(--clay-red-light), var(--clay-red-dark)); }
.clay-card-element.blue .card-center { background: linear-gradient(180deg, var(--clay-blue-light), var(--clay-blue-dark)); }
.clay-card-element.green .card-center { background: linear-gradient(180deg, var(--clay-green-light), var(--clay-green-dark)); }
.clay-card-element.yellow .card-center { background: linear-gradient(180deg, var(--clay-yellow-light), var(--clay-yellow-dark)); }

/* Joker/Wild is the one deliberate exception to the frame/content split -
   there's no "suit color" to protect, so it stays a single dramatic
   full-card treatment (and keeps the content box's original glowing-circle
   look, distinct from every suited card's rounded-rect content box). */
.clay-card-element.joker {
  background: linear-gradient(135deg, #cc5de8 0%, #862e9c 100%);
  color: white;
  border-color: #f3d9fa;
}
.clay-card-element.wild {
  background: linear-gradient(135deg, #ff6b6b 0%, #4dabf7 50%, #51cf66 100%);
  border-color: var(--clay-white);
}
.clay-card-element.wild .card-corner {
  color: white;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}
.clay-card-element.wild .card-center {
  border-radius: 50%;
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.15);
  box-shadow: inset 1px 1px 3px rgba(0, 0, 0, 0.2), 1px 1px 2px rgba(255, 255, 255, 0.2);
}

.card-corner {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--clay-dark);
  position: relative;
  z-index: 1;
}

.card-center {
  align-self: center;
  font-size: 2rem;
  font-weight: 800;
  color: white;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  display: flex;
  justify-content: center;
  align-items: center;
  width: 60px;
  height: 84px;
  border-radius: 12px;
  box-shadow: inset 1px 1px 3px rgba(255, 255, 255, 0.25), 2px 2px 5px rgba(0, 0, 0, 0.25);
  position: relative;
  z-index: 1;
}

/* Card blank state for Green King visual rule */
.clay-card-element.blank-visual .card-center {
  visibility: hidden;
}
.clay-card-element.blank-visual .card-corner {
  visibility: hidden;
}

.player-hand-scroll .clay-card-element {
  position: relative;
  width: 110px;
  height: 160px;
  flex-shrink: 0;
  margin-left: -50px; /* Spread cards horizontally with a nice overlap */
  margin-bottom: 5px;
  box-shadow: var(--clay-shadow-out), var(--clay-shadow-in);
}

.player-hand-scroll .clay-card-element:first-child {
  margin-left: 0;
}

/* Play card fly animations */
.clay-card-element.flying {
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.4s ease;
  z-index: 100;
}

/* Card interactive states inside human hand */
.player-hand-scroll .clay-card-element:hover {
  transform: translateY(-20px) scale(1.08) rotate(2deg) !important;
  z-index: 50 !important;
  box-shadow: 8px 12px 16px rgba(0,0,0,0.3), var(--clay-shadow-in);
}

.player-hand-scroll .clay-card-element.unplayable {
  filter: brightness(0.65) saturate(0.8);
  cursor: not-allowed;
}

.player-hand-scroll .clay-card-element.unplayable:hover {
  transform: none !important;
  z-index: 1 !important;
  box-shadow: var(--clay-shadow-out), var(--clay-shadow-in);
}

.player-hand-scroll .clay-card-element.gk-selectable {
  filter: brightness(0.7);
  border: 4px solid var(--clay-white-dark);
}

.player-hand-scroll .clay-card-element.gk-selected {
  filter: brightness(1.05) saturate(1.1);
  border: 5px solid var(--clay-yellow);
  transform: translateY(-25px) scale(1.05) !important;
  box-shadow: 0 0 15px var(--clay-yellow), var(--clay-shadow-out), var(--clay-shadow-in);
}

/* Bottom Player Panel */
.player-panel {
  display: grid;
  grid-template-columns: 200px 1fr 140px;
  align-items: center;
  padding: 5px 15px;
  gap: 15px;
}

.player-info-badge {
  display: flex;
  align-items: center;
  padding: 10px 15px;
  border-radius: 20px;
  border-width: 4px;
  position: relative;
}

.player-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.player-name {
  font-weight: 700;
  font-size: 1rem;
}

.player-card-count {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--clay-blue-dark);
}

.player-status-tag {
  position: absolute;
  top: -15px;
  right: 10px;
  background: var(--clay-red);
  color: white;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  box-shadow: var(--clay-shadow-out);
  animation: wobble 1s infinite alternate;
}

/* Player Hand Container */
.player-hand-container {
  display: flex;
  align-items: center;
  width: 100%;
  overflow: hidden;
  height: 100%;
}

.player-hand-scroll {
  display: flex;
  align-items: flex-end;
  height: 100%;
  width: 100%;
  overflow-x: auto;
  padding: 15px 50px 10px 50px; /* Increased left/right padding to prevent fanned card edge clipping */
  scrollbar-width: none; /* Hide default scrollbar */
}

.player-hand-scroll::-webkit-scrollbar {
  display: none;
}

.scroll-hand-btn {
  background: var(--clay-white);
  border: 3px solid var(--clay-white-dark);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: var(--clay-btn-shadow);
  font-weight: 700;
  font-size: 0.85rem;
  z-index: 10;
}

.scroll-hand-btn:active {
  box-shadow: var(--clay-btn-active);
  transform: scale(0.95);
}

/* Player Action Controls area */
.player-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Color Picker modal content */
.color-selector {
  width: 360px;
  background: var(--clay-white);
  border-color: var(--clay-white-dark);
}

.color-selector h3 {
  font-size: 1.4rem;
  margin-bottom: 20px;
}

.color-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.color-select-btn {
  font-family: var(--font-main);
  font-size: 1.2rem;
  font-weight: 700;
  color: white;
  border-radius: 16px;
  border: 4px solid rgba(0,0,0,0.15);
  padding: 20px;
  cursor: pointer;
  box-shadow: var(--clay-btn-shadow);
  text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
  transition: transform 0.1s ease;
}

.color-select-btn:active {
  transform: scale(0.95);
  box-shadow: var(--clay-btn-active);
}

.btn-red { background: var(--clay-red); border-color: var(--clay-red-dark); }
.btn-blue { background: var(--clay-blue); border-color: var(--clay-blue-dark); }
.btn-green { background: var(--clay-green); border-color: var(--clay-green-dark); }
.btn-yellow { background: var(--clay-yellow); border-color: var(--clay-yellow-dark); }

/* Standings Card */
.standings-card {
  width: 350px;
  margin: 15px auto;
  background: var(--clay-white-light);
}

.standings-list {
  list-style: none;
  text-align: left;
  padding: 10px;
}

.standings-list li {
  padding: 8px 12px;
  margin-bottom: 8px;
  border-radius: 10px;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
}

.standings-list li.rank-1 { background: #ffe066; border: 2px solid #f59f00; font-size: 1.1em; transform: scale(1.04); }
.standings-list li.rank-2 { background: #f3d9ff; border: 2px solid #cc5de8; }
.standings-list li.rank-3 { background: #ffd8a8; border: 2px solid #f76707; }
.standings-list li.rank-4 { background: #fff0f8; border: 1px dashed #f3c8e2; opacity: 0.8; }

/* Podium-style staggered reveal (spec 4.11) - each row fades/slides in with
   an increasing delay set inline per row (index * 0.25s), 1st place first. */
@keyframes podiumReveal {
  0% { opacity: 0; transform: translateY(14px) scale(0.9); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.podium-reveal {
  opacity: 0;
  animation: podiumReveal 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.standings-list li.rank-1.podium-reveal {
  animation-name: podiumRevealRankOne;
}

@keyframes podiumRevealRankOne {
  0% { opacity: 0; transform: translateY(14px) scale(0.9); }
  100% { opacity: 1; transform: translateY(0) scale(1.04); }
}

/* Rules overlay sizing */
.rules-content {
  max-width: 600px;
  height: 85%;
}

.rules-scroll-area {
  flex: 1;
  width: 100%;
  overflow-y: auto;
  text-align: left;
  margin: 15px 0;
  background: var(--clay-white);
  padding: 15px;
  border-radius: 16px;
}

.rule-group {
  margin-bottom: 18px;
}

.rule-group h4 {
  font-size: 1.1rem;
  margin-bottom: 6px;
  color: var(--clay-blue-dark);
}

.rule-group ul {
  padding-left: 20px;
  margin-top: 4px;
}

.rule-group li {
  margin-bottom: 4px;
  font-size: 0.9rem;
}

.rule-group p {
  font-size: 0.9rem;
  line-height: 1.35;
}

/* Floating Log System (Clay Tablet) & Home Button */
.game-log-floating-container {
  position: absolute;
  top: 15px;
  right: 15px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
}

.game-home-floating-container {
  position: absolute;
  top: 15px;
  left: 15px;
  z-index: 100;
  display: flex;
  gap: 8px;
}

.log-toggle-btn {
  background: var(--clay-white);
  border: 3px solid var(--clay-white-dark);
  border-radius: 12px;
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--clay-shadow-out), var(--clay-shadow-in);
}

.log-toggle-btn:active {
  transform: scale(0.95);
}

.log-panel {
  width: 250px;
  height: 250px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  text-align: left;
  border-radius: 16px;
  border-width: 3px;
  background: rgba(245, 245, 240, 0.95);
}

.log-panel h3 {
  font-size: 0.9rem;
  margin-bottom: 6px;
  border-bottom: 1px solid #ccc;
  padding-bottom: 4px;
}

.log-entries {
  flex: 1;
  overflow-y: auto;
  font-size: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.log-entry {
  line-height: 1.2;
}

/* CSS Animations for deck, drawing, and custom events */
@keyframes popIn {
  0% { transform: scale(0.5); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* Utility visibility classes */
.hidden {
  display: none !important;
}

/* Custom avatars (SVG styling) */
.avatar-svg {
  width: 100%;
  height: 100%;
}

/* Custom animations for squash and stretch */
@keyframes claySquishStretch {
  0% {
    transform: scaleX(1) scaleY(1);
  }
  25% {
    transform: scaleX(0.7) scaleY(1.3); /* Stretch tall as it flies */
  }
  60% {
    transform: scaleX(0.7) scaleY(1.3);
  }
  85% {
    transform: scaleX(1.3) scaleY(0.7); /* Squash flat on impact */
  }
  100% {
    transform: scaleX(1) scaleY(1); /* Settle to normal */
  }
}

.inner-flyer {
  animation: claySquishStretch 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* Screen Shake Animation */
@keyframes screenShake {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  10% { transform: translate(-3px, 2px) rotate(-0.5deg); }
  20% { transform: translate(2px, -3px) rotate(0.5deg); }
  30% { transform: translate(-2px, -2px) rotate(-0.5deg); }
  40% { transform: translate(3px, 2px) rotate(0.5deg); }
  50% { transform: translate(-1px, 3px) rotate(-0.5deg); }
  60% { transform: translate(2px, -2px) rotate(0.5deg); }
  70% { transform: translate(-3px, 1px) rotate(-0.5deg); }
  80% { transform: translate(1px, -3px) rotate(0.5deg); }
  90% { transform: translate(2px, 2px) rotate(-0.5deg); }
}

.game-layout.shake-active {
  animation: screenShake 0.45s ease-in-out;
}

/* Attack gauge design */
.attack-card {
  flex-direction: column !important;
  align-items: stretch !important;
}

.attack-header-row {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}

.clay-gauge-track {
  width: 100%;
  height: 20px;
  background: #6b2158; /* Deep candy valley */
  border-radius: 10px;
  margin-top: 10px;
  position: relative;
  overflow: hidden;
  box-shadow: inset 3px 3px 6px rgba(0,0,0,0.3), inset -1px -1px 2px rgba(255,255,255,0.1);
  border: 2px solid rgba(0,0,0,0.15);
}

.clay-gauge-fill {
  height: 100%;
  width: 0%; /* Dynamic from JS */
  background: linear-gradient(90deg, #ff8787 0%, #ff4b4b 50%, #c92a2a 100%);
  box-shadow: inset 1px 1px 2px rgba(255,255,255,0.4);
  border-radius: 8px;
  transition: width 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gauge-pip-markers {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: space-around;
  pointer-events: none;
}

.gauge-pip-markers span {
  width: 2px;
  height: 100%;
  background: rgba(255, 255, 255, 0.15);
}

/* ==================== CARD SKINS SYSTEM ==================== */

/* --- Card Front Skins --- */
/* Neon Glaze front: pink glowing neon border */
.clay-card-element.front-neon {
  border-color: #ff2a85 !important;
  box-shadow: 0 0 12px rgba(255, 42, 133, 0.8), var(--clay-shadow-in) !important;
}

/* Gold Leaf front: shiny metallic gold borders with soft amber shadows */
.clay-card-element.front-gold {
  border-color: #ffd700 !important;
  box-shadow: 0 0 14px rgba(255, 215, 0, 0.75), var(--clay-shadow-in) !important;
}

/* Charcoal Slate front: dark body, dark slate borders */
.clay-card-element.front-charcoal {
  background-color: #2b3035 !important;
  border-color: #495057 !important;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.5), var(--clay-shadow-in) !important;
}

/* Pastel Dough front: soft candy pastel borders */
.clay-card-element.front-pastel {
  border-color: #fcc2d7 !important;
  box-shadow: 0 0 8px rgba(252, 194, 215, 0.5), var(--clay-shadow-in) !important;
}

/* Slate & Silver front ("Default2"): cool slate-grey face, double silver
   hairline border - same minimal Common-tier complexity as the ivory/brass
   default (a material/palette swap only, spec 6.2), just a distinct second
   baseline rather than a re-tint of it. */
.clay-card-element.front-slate-silver {
  background: #d7dde3 !important;
  border-color: #8a97a3 !important;
  box-shadow: inset 0 0 0 2px rgba(138, 151, 163, 0.5), var(--clay-shadow-out), var(--clay-shadow-in) !important;
}
.clay-card-element.front-slate-silver .card-corner {
  color: #2b3a55;
}

/* Ember Gala front (event skin): deep crimson-lacquer gradient, gold
   ornamented border, subtle diagonal lacquer texture - the genuine step-up
   in ornamentation an earn-only event skin should have (spec 6.3), distinct
   from every Common/Epic shop tier. */
.clay-card-element.front-ember-gala {
  background: linear-gradient(160deg, #6b1420 0%, #3d0c14 100%) !important;
  border-color: #d4af37 !important;
  box-shadow: inset 0 0 0 2px rgba(212, 175, 55, 0.45), 0 0 14px rgba(212, 175, 55, 0.45), var(--clay-shadow-in) !important;
  position: relative;
  overflow: hidden;
}
.clay-card-element.front-ember-gala::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg,
    rgba(212, 175, 55, 0.08) 0px,
    rgba(212, 175, 55, 0.08) 2px,
    transparent 2px,
    transparent 10px
  );
  pointer-events: none;
}
.clay-card-element.front-ember-gala .card-corner {
  color: #f4ecd8;
  text-shadow: 0 0 3px rgba(212, 175, 55, 0.6);
}
.clay-card-element.front-ember-gala .card-center {
  box-shadow: inset 0 0 0 2px #d4af37, inset 1px 1px 3px rgba(255, 255, 255, 0.25), 2px 2px 5px rgba(0, 0, 0, 0.25);
}

/* --- Card Back Skins --- */
/* Default back: classic red back */
.clay-card-element.back-default {
  background-color: var(--clay-red) !important;
}

/* Ocean Swirl back: blue wave back */
.clay-card-element.back-ocean, .mini-card-back.back-ocean {
  background: radial-gradient(circle, #3bc9db 0%, #15aabf 100%) !important;
  border-color: #e3fafc !important;
}

/* Forest Fern back: green fern back */
.clay-card-element.back-forest, .mini-card-back.back-forest {
  background: radial-gradient(circle, #69db7c 0%, #2f9e44 100%) !important;
  border-color: #ebfbee !important;
}

/* Sunburst back: yellow sunburst back */
.clay-card-element.back-sunburst, .mini-card-back.back-sunburst {
  background: radial-gradient(circle, #ffe066 0%, #f59f00 100%) !important;
  border-color: #fff9db !important;
}

/* Cosmic Purple back: magic cosmic purple back */
.clay-card-element.back-purple, .mini-card-back.back-purple {
  background: radial-gradient(circle, #da77f2 0%, #9c36b5 100%) !important;
  border-color: #f3d9fa !important;
}


/* ==================== CLAY SHOP SCREEN ==================== */
.shop-content {
  max-width: 750px !important;
  height: 88% !important;
}

.shop-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-bottom: 12px;
}

.shop-coin-badge {
  background: var(--clay-yellow-light);
  border: 3px solid var(--clay-yellow-dark);
  padding: 8px 16px;
  border-radius: 18px;
  font-weight: 700;
  font-size: 1.1rem;
  box-shadow: var(--clay-btn-shadow);
  color: var(--clay-dark);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Coins + Gems shown side by side (spec 9.2/10.1 - Gems is the hard,
   real-money-backed currency alongside soft-currency Coins). */
.currency-badge-row {
  gap: 14px;
}
.currency-badge-row > span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.shop-tabs {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
  width: 100%;
  justify-content: center;
}

.shop-tab-btn {
  background: var(--clay-white-dark);
  color: var(--clay-dark);
  border: 3px solid #b2babb;
  border-radius: 15px;
  padding: 8px 20px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--clay-btn-shadow);
  transition: transform 0.1s, background-color 0.2s;
}

.shop-tab-btn.active {
  background: var(--clay-blue);
  color: white;
  border-color: var(--clay-blue-dark);
  text-shadow: 1px 1px 0px rgba(0,0,0,0.15);
}

.shop-tab-btn:hover {
  transform: translateY(-2px);
}

.shop-tab-btn:active {
  transform: translateY(1px);
}

.shop-items-scroll-area {
  flex: 1;
  width: 100%;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.12);
  border-radius: 24px;
  padding: 18px;
  margin-bottom: 15px;
  box-shadow: inset 3px 3px 6px rgba(0,0,0,0.2);
}

.shop-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 18px;
}

.shop-item-card {
  background: var(--clay-white-light);
  border: 4px solid var(--clay-white-dark);
  border-radius: 20px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: var(--clay-shadow-out), var(--clay-shadow-in);
  transition: transform 0.2s ease;
}

.shop-item-card:hover {
  transform: translateY(-4px);
}

.shop-item-preview-holder {
  width: 100px;
  height: 140px;
  position: relative;
  margin-bottom: 10px;
}

/* Shop mockup card overrides */
.shop-item-preview-holder .clay-card-element {
  position: absolute;
  left: 0;
  top: 0;
  width: 100px;
  height: 140px;
}

/* Boards (spec 6.1) preview - no card layer of their own, just a play-mat
   color swatch, sized to fill the same preview holder as a card front/back. */
.board-swatch-preview {
  width: 100px;
  height: 140px;
  border-radius: 14px;
  border: 6px solid;
  box-shadow: inset 3px 3px 8px rgba(0,0,0,0.25), inset -3px -3px 8px rgba(255,255,255,0.15);
}

/* Tier badge (spec 6.2/10.3): Common = cheap frame-tint-only, Epic = the
   real-money-backed tier with custom art/typography/animation. */
.shop-tier-badge {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 10px;
  border-radius: 10px;
  margin-bottom: 4px;
}
.shop-tier-badge.tier-common {
  background: var(--clay-white-dark);
  color: var(--clay-dark);
}
.shop-tier-badge.tier-epic {
  background: linear-gradient(135deg, #a78bfa, #f472b6);
  color: white;
  text-shadow: 1px 1px 0px rgba(0,0,0,0.2);
}

.shop-item-name {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 6px;
  color: var(--clay-dark);
}

.shop-item-price {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--clay-yellow-dark);
  margin-bottom: 10px;
}

.shop-item-btn {
  width: 100%;
  font-size: 0.85rem !important;
  padding: 6px 12px !important;
  border-radius: 12px !important;
}

.btn-equipped {
  background: var(--clay-green) !important;
  border-color: var(--clay-green-dark) !important;
  cursor: default !important;
  pointer-events: none;
}

/* ------------------------------------------------------------------ */
/* Event system (spec section 5) - collection grid + missions list     */
/* ------------------------------------------------------------------ */

.event-countdown {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--clay-dark);
  opacity: 0.75;
}

.event-progress-text {
  text-align: center;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 12px;
  color: var(--clay-dark);
}

.event-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: 8px;
}

.event-card-tile {
  aspect-ratio: 2 / 3;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
  border: 3px solid var(--clay-white-dark);
  background: var(--clay-white-light);
  box-shadow: var(--clay-shadow-out);
  position: relative;
  text-align: center;
  padding: 2px;
}

.event-card-tile.owned {
  background: var(--clay-green-light);
  border-color: var(--clay-green-dark);
  color: var(--clay-dark);
}

.event-card-tile.owned::after {
  content: "✓";
  position: absolute;
  top: 2px;
  right: 4px;
  font-size: 0.7rem;
  color: var(--clay-green-dark);
}

.event-card-tile.missing {
  /* Deliberately no opacity/grayscale filter on the whole tile - the buy
     row below has real interactive buttons now (Dust/Coins/Gems, spec
     5.4/10.4), and a filter on this element would visually wash them out
     along with the label, making working buttons look disabled. */
  background: var(--clay-white-dark);
}

.event-card-tile .event-card-buy-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3px;
  margin-top: 3px;
}

.event-card-tile .event-card-buy-btn {
  font-size: 0.6rem !important;
  padding: 2px 5px !important;
  border-radius: 8px !important;
}

/* Open Pack button (spec 5.1 v5: ECP reward unit) - sits between the
   progress text and the collection grid. */
#btn-open-pack {
  align-self: center;
  margin: 0 auto 12px;
  display: block;
}

/* Mission cadence tag (Daily/Weekly/Monthly/Milestone/Achievement) */
.mission-cadence-tag {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  background: var(--clay-white-dark);
  color: var(--clay-dark);
  border-radius: 8px;
  padding: 1px 7px;
  margin-left: 6px;
  vertical-align: middle;
  opacity: 0.8;
}

/* Vault per-card "pick a card" inline list (spec 5.4 v5 - 50 Dust choice) */
.vault-pick-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
  margin-top: 8px;
  max-height: 140px;
  overflow-y: auto;
}

.vault-pick-card-btn {
  font-size: 0.6rem !important;
  padding: 3px 6px !important;
  border-radius: 8px !important;
  background: var(--clay-white);
  color: var(--clay-dark);
}

/* ---------------------------------------------------------------------------
   Card Collection Board (spec 6.5) - per-skin 45-card progress grid.
   Collected tiles render as mini clay cards in the skin's real frame;
   uncollected ones are greyed silhouettes.
--------------------------------------------------------------------------- */

.ccb-actions-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.ccb-hint {
  font-size: 0.8rem;
  color: var(--clay-dark);
  opacity: 0.7;
  margin: 0;
  width: 100%;
  text-align: center;
}

.ccb-grid .ccb-tile {
  aspect-ratio: 2 / 3;
  border-radius: 10px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
}

/* Collected: a shrunken real clay card (the skin's frame class applies). */
.ccb-tile .clay-card-element {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 4px;
  border-width: 3px;
  cursor: default;
}
.ccb-tile .clay-card-element .card-corner { font-size: 0.55rem; }
.ccb-tile .clay-card-element .card-center {
  width: 60%;
  height: 55%;
  font-size: 1rem;
  border-radius: 8px;
}

/* Uncollected: greyed silhouette placeholder (spec 6.5). */
.ccb-tile.silhouette {
  background: rgba(0, 0, 0, 0.12);
  border: 3px dashed rgba(0, 0, 0, 0.25);
  color: rgba(0, 0, 0, 0.45);
  font-size: 0.7rem;
  font-weight: 700;
  text-align: center;
  padding: 4px;
}

.ccb-tile .ccb-buy-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3px;
}
.ccb-tile .ccb-buy-btn {
  font-size: 0.6rem !important;
  padding: 2px 5px !important;
  border-radius: 8px !important;
}

/* Just-collected celebration on the slot (spec 6.6's landing moment). */
@keyframes ccbSlotPop {
  0% { transform: scale(0.6); box-shadow: 0 0 0 rgba(255, 215, 0, 0); }
  55% { transform: scale(1.15); box-shadow: 0 0 24px rgba(255, 215, 0, 0.9); }
  100% { transform: scale(1); box-shadow: 0 0 6px rgba(255, 215, 0, 0.3); }
}
.ccb-tile.just-collected,
.event-card-tile.just-collected {
  animation: ccbSlotPop 0.7s ease-out;
}

/* ---------------------------------------------------------------------------
   Pack-opening animation (spec 6.6) - pack appears -> shakes -> bursts ->
   card flips in. One sequence for every grant source; the pack visual class
   (pack-ecp / pack-vault-random / pack-vault-choice) is the only difference.
--------------------------------------------------------------------------- */

.pack-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 320px;
}

.pack-visual {
  width: 150px;
  height: 210px;
  border-radius: 18px;
  border: 6px solid;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--clay-shadow-out), inset 2px 2px 6px rgba(255, 255, 255, 0.35);
}
.pack-visual .pack-icon { font-size: 3.2rem; }
.pack-visual .pack-shine {
  position: absolute;
  top: -60%;
  left: -60%;
  width: 60%;
  height: 220%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  transform: rotate(20deg);
  animation: packShine 1.4s ease-in-out infinite;
}
@keyframes packShine {
  from { left: -60%; }
  to { left: 120%; }
}

/* Pack visual by source (spec 6.6) */
.pack-visual.pack-ecp { background: linear-gradient(160deg, #b7442e, #7a1f12); border-color: #f5c04e; } /* event-themed (Ember Gala) */
.pack-visual.pack-vault-random { background: linear-gradient(160deg, #8d97ab, #4d5668); border-color: #cfd6e2; }
.pack-visual.pack-vault-choice { background: linear-gradient(160deg, #7b5cd6, #45318a); border-color: #d9c9ff; }

@keyframes packShake {
  0%, 100% { transform: rotate(0deg); }
  20% { transform: rotate(-6deg) scale(1.02); }
  40% { transform: rotate(6deg) scale(1.04); }
  60% { transform: rotate(-5deg) scale(1.06); }
  80% { transform: rotate(5deg) scale(1.08); }
}
.pack-visual.pack-shake { animation: packShake 0.6s ease-in-out; }

@keyframes packBurst {
  from { transform: scale(1.1); opacity: 1; }
  to { transform: scale(1.9); opacity: 0; }
}
.pack-visual.pack-burst { animation: packBurst 0.32s ease-out forwards; }

.pack-card-reveal {
  perspective: 700px;
}
.pack-card-reveal .clay-card-element {
  position: relative;
  width: 140px;
  height: 196px;
  cursor: default;
  animation: packCardFlipIn 0.5s ease-out;
}
@keyframes packCardFlipIn {
  from { transform: rotateY(90deg) scale(0.7); opacity: 0; }
  to { transform: rotateY(0deg) scale(1); opacity: 1; }
}

.pack-result-label {
  font-size: 1.15rem;
  font-weight: 800;
  color: white;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  min-height: 1.4em;
  text-align: center;
}

/* spec 4.7: online Joker slide-behind - starts raised above the pile, slides
   down/under the top card (it paints beneath via DOM order), then fades,
   leaving the unchanged top card clearly still in charge of the table. */
@keyframes jokerSlideBehind {
  0% { transform: translate(-60px, -90px) rotate(-14deg) scale(1.05); opacity: 0; }
  25% { opacity: 1; }
  60% { transform: translate(8px, 5px) rotate(4deg) scale(0.96); opacity: 1; }
  85% { transform: translate(8px, 5px) rotate(4deg) scale(0.96); opacity: 1; }
  100% { transform: translate(8px, 5px) rotate(4deg) scale(0.96); opacity: 0; }
}
.joker-slide-behind {
  position: absolute;
  left: 0;
  top: 0;
  width: 100px;
  height: 140px;
  cursor: default;
  pointer-events: none;
  animation: jokerSlideBehind 1.45s ease-in-out forwards;
}

/* Shop Event tab summary panel (spec 10.2 tab 3) */
.shop-event-stats-row {
  display: flex;
  justify-content: center;
  gap: 24px;
  font-weight: 700;
  color: var(--clay-dark);
  margin: 14px 0;
}

/* Section headers inside the Tasks panel (Daily / Weekly / Monthly, spec 12.1) */
.task-section-header {
  list-style: none;
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--clay-dark);
  opacity: 0.75;
  margin-top: 6px;
  padding-left: 4px;
}

/* Profile inventory secondary tabs (spec 11.3 Owned / Not Owned) */
.profile-subtabs {
  margin-top: -6px;
}
.profile-subtabs .shop-tab-btn {
  font-size: 0.8rem;
  padding: 5px 14px;
}

.missions-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mission-row {
  background: var(--clay-white-light);
  border: 3px solid var(--clay-white-dark);
  border-radius: 16px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: var(--clay-shadow-out);
}

.mission-row.eligible {
  border-color: var(--clay-green-dark);
}

.mission-row-title {
  font-weight: 700;
  color: var(--clay-dark);
}

.mission-row-desc {
  font-size: 0.8rem;
  opacity: 0.75;
  color: var(--clay-dark);
}

.mission-claim-btn {
  font-size: 0.8rem !important;
  padding: 6px 14px !important;
  border-radius: 12px !important;
  white-space: nowrap;
}

.mission-claim-btn:disabled {
  /* opacity alone read as "still green enough to look claimable" at a
     glance (caught via a live screenshot, not just code review) - override
     the background directly so an incomplete task is unmistakably inert. */
  background: var(--clay-white-dark) !important;
  border-color: #b2babb !important;
  color: var(--clay-dark) !important;
  opacity: 0.7;
  cursor: default !important;
  pointer-events: none;
}

/* AI opponent slot wrappers for vertical sidebar placement */
.opponent-slot {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 80px;
}
.opponent-slot:empty {
  display: none;
}

/* Human Active Turn Highlights */
.player-info-badge.active-turn {
  border-color: var(--clay-red);
  transform: scale(1.03);
  box-shadow: 0 0 20px rgba(255, 107, 107, 0.8), var(--clay-shadow-out), var(--clay-shadow-in);
  animation: turnPulseHuman 1.5s infinite alternate;
}

@keyframes turnPulseHuman {
  0% { box-shadow: 0 0 10px rgba(255, 107, 107, 0.5), var(--clay-shadow-out), var(--clay-shadow-in); }
  100% { box-shadow: 0 0 20px rgba(255, 107, 107, 0.85), var(--clay-shadow-out), var(--clay-shadow-in); }
}

/* Inactive Attack status card style (always present on right sidebar) */
.attack-card {
  background: var(--clay-white);
  border-color: var(--clay-white-dark);
  padding: 12px;
  border-radius: 16px;
  border-width: 3px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  animation: none; /* No shake when inactive */
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.attack-card.active-attack {
  background: var(--clay-red-light);
  border-color: var(--clay-red);
  animation: attackShake 0.4s infinite alternate;
}

/* Deck count badge below the draw pile */
.deck-count-badge {
  text-align: center;
  font-size: 0.85rem;
  font-weight: 800;
  color: white;
  margin-top: 8px;
  background: rgba(0,0,0,0.2);
  padding: 2px 10px;
  border-radius: 10px;
  display: inline-block;
  align-self: center;
  box-shadow: inset 1px 1px 2px rgba(0,0,0,0.15);
}

.deck-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Bouncing deck draw arrow hint */
.deck-draw-arrow {
  position: absolute;
  top: -45px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 2.2rem;
  z-index: 10;
  pointer-events: none;
  animation: arrowBounce 0.6s infinite alternate;
  filter: drop-shadow(2px 2px 0px rgba(0,0,0,0.15));
}

@keyframes arrowBounce {
  0% { transform: translate(-50%, 0); }
  100% { transform: translate(-50%, -10px); }
}

/* Rotating Direction Ring around center play area */
.direction-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 330px;
  height: 200px;
  border: 4px dashed rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  z-index: 1;
  pointer-events: none;
  box-sizing: border-box;
}

.direction-ring.clockwise {
  animation: spinClockwise 15s linear infinite;
}

.direction-ring.counter-clockwise {
  animation: spinCounterClockwise 15s linear infinite;
}

.direction-arrow-fx {
  position: absolute;
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.4rem;
  line-height: 1;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

/* Position arrows at 12, 3, 6, 9 o'clock angles around the ring */
.arrow-1 {
  top: -12px;
  left: 50%;
  transform: translateX(-50%) rotate(0deg);
}

.arrow-2 {
  top: 50%;
  right: -10px;
  transform: translateY(-50%) rotate(90deg);
}

.arrow-3 {
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%) rotate(180deg);
}

.arrow-4 {
  top: 50%;
  left: -10px;
  transform: translateY(-50%) rotate(270deg);
}

@keyframes spinClockwise {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes spinCounterClockwise {
  from { transform: translate(-50%, -50%) rotate(360deg); }
  to { transform: translate(-50%, -50%) rotate(0deg); }
}

/* ------------------------------------------------------------------ */
/* Tutorial (spec section 13) - guided lesson banner + card highlight  */
/* ------------------------------------------------------------------ */

.tutorial-lesson-banner {
  position: absolute;
  top: 12%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  width: min(520px, 88%);
  animation: tutorialBannerIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

.tutorial-lesson-card {
  background: var(--clay-white-light);
  border: 4px solid var(--clay-blue);
  border-radius: 22px;
  padding: 18px 22px;
  box-shadow: var(--clay-shadow-out), 0 0 20px rgba(77, 171, 247, 0.35);
  text-align: center;
}

.tutorial-lesson-card h3 {
  margin: 0 0 8px;
  color: var(--clay-dark);
  font-size: 1.15rem;
}

.tutorial-lesson-card p {
  margin: 0 0 12px;
  color: var(--clay-dark);
  font-size: 0.9rem;
  line-height: 1.4;
}

.tutorial-skip-btn {
  /* Offset below the log toggle (.game-log-floating-container sits at the
     same top:15px/right:15px corner with z-index:100) so the two never
     overlap and steal each other's clicks. */
  position: absolute;
  top: 62px;
  right: 14px;
  z-index: 100;
  font-size: 0.7rem !important;
  padding: 6px 12px !important;
  opacity: 0.75;
}

/* The one card a guided step allows - a glowing highlight distinct from the
   ordinary "legal to play" state, so it reads as "play THIS one." Pulses
   box-shadow only (never transform) - the card's position/size must stay
   perfectly still so a mid-pulse tap always lands where the player expects,
   rather than chasing a bouncing target. */
.clay-card-element.tutorial-target {
  animation: tutorialTargetPulse 1.1s ease-in-out infinite;
  z-index: 20 !important;
  outline: 3px solid rgba(77, 171, 247, 0.9);
  outline-offset: 3px;
}

@keyframes tutorialTargetPulse {
  0%, 100% { box-shadow: 0 0 0 rgba(77, 171, 247, 0); }
  50% { box-shadow: 0 0 22px 6px rgba(77, 171, 247, 0.7); }
}

/* ------------------------------------------------------------------ */
/* Tutorial completion screen                                          */
/* ------------------------------------------------------------------ */

.tutorial-complete-content {
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 14px;
}

.tutorial-complete-icon {
  font-size: 3.5rem;
  margin-bottom: 4px;
}

.tutorial-reward-text {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--clay-yellow-dark);
  margin: 8px 0 20px;
}

.tutorial-link-blurb {
  max-width: 420px;
  margin: 0 auto 16px;
  color: var(--clay-dark);
  opacity: 0.85;
  font-size: 0.9rem;
}

.tutorial-link-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 10px;
}

/* ------------------------------------------------------------------ */
/* Home screen top bar + bottom nav (spec section 9.2)                 */
/* ------------------------------------------------------------------ */

.home-topbar {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
}

.topbar-avatar-btn {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 0;
}

.topbar-avatar-holder {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--clay-white);
  box-shadow: var(--clay-shadow-out);
  display: block;
}
.topbar-avatar-holder svg {
  width: 100%;
  height: 100%;
}

.player-level-badge {
  background: var(--clay-purple, var(--clay-dark));
  color: white;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 1px 8px;
  border-radius: 10px;
  white-space: nowrap;
}

.topbar-icon-buttons {
  display: flex;
  gap: 8px;
}

.topbar-icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 3px solid var(--clay-white-dark);
  background: var(--clay-white-light);
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: var(--clay-shadow-out);
  transition: transform 0.15s ease;
}
.topbar-icon-btn:hover {
  transform: translateY(-2px);
}

.home-event-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: linear-gradient(135deg, #6b1420, #3d0c14);
  border: 3px solid #d4af37;
  border-radius: 18px;
  padding: 10px 18px;
  color: #f4ecd8;
  width: min(420px, 90%);
  box-shadow: var(--clay-shadow-out);
}
.home-event-banner-name {
  font-weight: 800;
  font-size: 0.95rem;
}
.home-event-banner-progress {
  font-size: 0.75rem;
  opacity: 0.85;
}
.home-event-banner-countdown {
  font-size: 0.8rem;
  font-weight: 700;
  color: #d4af37;
  white-space: nowrap;
}

.home-play-cta {
  display: flex;
  justify-content: center;
}

.btn-huge {
  font-size: 1.6rem !important;
  padding: 22px 70px !important;
  border-radius: 30px !important;
}

.home-secondary-buttons {
  display: flex;
  gap: 14px;
  justify-content: center;
}
.home-secondary-buttons .clay-btn {
  font-size: 0.8rem !important;
  padding: 8px 18px !important;
  opacity: 0.85;
}

.home-bottom-nav {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  background: var(--clay-white-light);
  border: 3px solid var(--clay-white-dark);
  border-radius: 24px;
  padding: 6px;
  box-shadow: var(--clay-shadow-out);
}

.bottom-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 18px;
  border-radius: 18px;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--clay-dark);
  opacity: 0.6;
  transition: background 0.15s ease, opacity 0.15s ease;
}
.bottom-nav-btn.active {
  background: var(--clay-blue-light);
  opacity: 1;
}
.bottom-nav-icon {
  font-size: 1.1rem;
}

.daily-login-card {
  text-align: center;
}

/* ------------------------------------------------------------------ */
/* Profile / Inventory screen (spec section 11)                        */
/* ------------------------------------------------------------------ */

.profile-content {
  gap: 12px;
}

.profile-view-tabs {
  display: flex;
  gap: 8px;
  width: 100%;
  justify-content: center;
}

.profile-view-tab-btn {
  flex: 1;
  min-height: 40px;
  border: 3px solid var(--clay-white-dark);
  border-radius: 999px;
  background: var(--clay-white-light);
  color: var(--clay-dark);
  font-weight: 800;
  padding: 8px 12px;
  box-shadow: var(--clay-shadow-out);
}

.profile-view-tab-btn.active {
  background: var(--clay-blue-light);
  border-color: var(--clay-blue);
}

#profile-panel,
#profile-inventory-panel {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

#profile-panel.hidden,
#profile-inventory-panel.hidden {
  display: none;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
}

.profile-avatar-btn {
  width: 64px;
  height: 64px;
  cursor: pointer;
}

.profile-header-text {
  flex: 1;
}

.profile-username {
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--clay-dark);
}

.profile-level-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.profile-xp-bar {
  flex: 1;
  max-width: 220px;
  height: 10px;
  background: rgba(0, 0, 0, 0.15);
  border-radius: 6px;
  overflow: hidden;
}
.profile-xp-bar-fill {
  height: 100%;
  background: var(--clay-green);
  width: 0%;
  transition: width 0.3s ease;
}

.avatar-picker {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 10px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  width: 100%;
}

.avatar-preset-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 3px solid var(--clay-white);
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  box-shadow: var(--clay-shadow-out);
}
.avatar-preset-btn svg {
  width: 100%;
  height: 100%;
}

.profile-currency-row {
  display: flex;
  gap: 18px;
  font-weight: 700;
  color: var(--clay-dark);
}

.profile-stats-row {
  display: flex;
  gap: 24px;
}

.profile-inventory-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(255, 255, 255, 0.55);
  border: 3px solid var(--clay-white-dark);
  border-radius: 18px;
  padding: 12px;
  box-shadow: var(--clay-shadow-out);
}

.profile-inventory-section-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--clay-dark);
}

.profile-inventory-section-subtitle {
  font-size: 0.72rem;
  opacity: 0.7;
  color: var(--clay-dark);
}

.profile-inventory-section-items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.profile-inventory-section-items .shop-item-card {
  margin: 0;
}

.profile-stat {
  text-align: center;
}
.profile-stat-value {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--clay-dark);
}
.profile-stat-label {
  font-size: 0.7rem;
  opacity: 0.7;
}

/* ------------------------------------------------------------------ */
/* Settings screen (spec section 15)                                   */
/* ------------------------------------------------------------------ */

.settings-content {
  gap: 14px;
}

.settings-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--clay-white-light);
  border: 3px solid var(--clay-white-dark);
  border-radius: 16px;
  padding: 10px 16px;
}

.settings-row-title {
  font-weight: 700;
  color: var(--clay-dark);
}
.settings-row-desc {
  font-size: 0.75rem;
  opacity: 0.75;
  color: var(--clay-dark);
}

.settings-version {
  font-size: 0.7rem;
  opacity: 0.6;
  color: var(--clay-dark);
}

/* ------------------------------------------------------------------ */
/* Shop Currency tab (spec section 10.2 tab 5)                         */
/* ------------------------------------------------------------------ */

.currency-tab-content {
  width: 100%;
  padding-top: 20px;
}

.currency-section-title {
  color: var(--clay-dark);
  font-size: 1rem;
  margin: 0 0 10px;
}

.currency-dev-note {
  font-size: 0.75rem;
  background: rgba(255, 200, 0, 0.2);
  border: 2px dashed #f59f00;
  border-radius: 10px;
  padding: 6px 12px;
  color: var(--clay-dark);
  margin-bottom: 12px;
}

.currency-convert-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--clay-white-light);
  border: 3px solid var(--clay-white-dark);
  border-radius: 16px;
  padding: 12px 16px;
  margin-top: 8px;
}
.currency-convert-row .clay-input {
  max-width: 140px;
}
.currency-convert-preview {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--clay-dark);
  flex: 1;
}
