:root {
  --forest-950: #0b140d;
  --forest-900: #10200f;
  --forest-800: #16311a;
  --forest-700: #204526;
  --forest-600: #3f6b3f;
  --gold-500: #c9a24b;
  --gold-400: #e0c27a;
  --parchment: #f3ecda;
  --ink: #e9e4d8;
  --danger: #b5453b;
  --success: #4c8a5e;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Georgia', 'Iowan Old Style', serif;
  background: radial-gradient(ellipse at top, var(--forest-900), var(--forest-950));
  color: var(--ink);
  min-height: 100vh;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}

.site-header {
  background: rgba(11, 20, 13, 0.85);
  border-bottom: 1px solid var(--forest-700);
  position: sticky;
  top: 0;
  backdrop-filter: blur(6px);
  z-index: 10;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
}

.brand {
  color: var(--gold-400);
  font-size: 1.3rem;
  text-decoration: none;
  font-weight: bold;
}

.nav a {
  color: var(--ink);
  text-decoration: none;
  margin-left: 20px;
  font-size: 0.95rem;
}

.nav a:hover { color: var(--gold-400); }

.btn-nav {
  background: var(--forest-600);
  padding: 8px 16px;
  border-radius: 6px;
}

main.container { padding-top: 32px; padding-bottom: 64px; min-height: 70vh; }

h1, h2, h3 { color: var(--gold-500); font-weight: normal; }

a { color: var(--gold-400); }

.card-box {
  background: rgba(22, 49, 26, 0.55);
  border: 1px solid var(--forest-700);
  border-radius: 12px;
  padding: 28px;
  margin-bottom: 24px;
}

.hero {
  text-align: center;
  padding: 48px 0;
}

.hero h1 { font-size: 2.4rem; margin-bottom: 12px; }
.hero p { font-size: 1.1rem; opacity: 0.85; max-width: 600px; margin: 0 auto 28px; }

.btn {
  display: inline-block;
  background: var(--gold-500);
  color: var(--forest-950);
  padding: 14px 28px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  font-family: inherit;
}

.btn:hover { background: var(--gold-400); }

.btn-secondary {
  background: transparent;
  border: 1px solid var(--gold-500);
  color: var(--gold-500);
}

form.form-box { max-width: 420px; margin: 0 auto; }

.field { margin-bottom: 18px; }
.field label { display: block; margin-bottom: 6px; color: var(--gold-400); font-size: 0.9rem; }
.field input, .field textarea {
  width: 100%;
  padding: 12px;
  border-radius: 6px;
  border: 1px solid var(--forest-700);
  background: var(--forest-900);
  color: var(--ink);
  font-family: inherit;
  font-size: 1rem;
}
.field input:focus, .field textarea:focus { outline: 2px solid var(--gold-500); }

.alert { padding: 14px 18px; border-radius: 8px; margin-bottom: 20px; }
.alert-success { background: rgba(76, 138, 94, 0.2); border: 1px solid var(--success); color: #cdeed8; }
.alert-error { background: rgba(181, 69, 59, 0.2); border: 1px solid var(--danger); color: #f3cfcb; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--forest-700); font-size: 0.92rem; }
th { color: var(--gold-500); }

.badge { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 0.8rem; }
.badge-pending { background: rgba(201, 162, 75, 0.2); color: var(--gold-400); }
.badge-approved { background: rgba(76, 138, 94, 0.25); color: #a9e0ba; }
.badge-rejected, .badge-expired, .badge-cancelled { background: rgba(181, 69, 59, 0.2); color: #f3cfcb; }

.reading-card {
  border-left: 3px solid var(--gold-500);
  padding-left: 18px;
  margin-bottom: 22px;
}

.qr-box { text-align: center; }
.qr-box img { max-width: 260px; border-radius: 8px; background: #fff; padding: 10px; }
.pix-code {
  background: var(--forest-900);
  border: 1px dashed var(--gold-500);
  padding: 12px;
  border-radius: 6px;
  word-break: break-all;
  font-family: monospace;
  font-size: 0.85rem;
  margin: 16px 0;
}

.site-footer {
  border-top: 1px solid var(--forest-700);
  padding: 20px 0;
  text-align: center;
  font-size: 0.8rem;
  opacity: 0.6;
}

.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.mini-card {
  background: var(--forest-800);
  border: 1px solid var(--forest-700);
  border-radius: 10px;
  padding: 16px;
  text-align: center;
}

.mini-card .numeral {
  display: inline-block;
  width: 32px;
  height: 32px;
  line-height: 32px;
  border-radius: 50%;
  background: var(--gold-500);
  color: var(--forest-950);
  font-weight: bold;
  margin-bottom: 8px;
}

.status-waiting { text-align: center; padding: 20px; opacity: 0.85; }
.spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--forest-700);
  border-top-color: var(--gold-500);
  border-radius: 50%;
  margin: 0 auto 12px;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.mini-card-img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 10px;
  border: 1px solid var(--forest-700);
}

#table-instructions {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 24px;
  opacity: 0.9;
}

.tarot-table {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 14px 10px;
  justify-items: center;
  margin: 24px 0 8px;
}

.tarot-slot {
  width: 84px;
  cursor: pointer;
  text-align: center;
}

.tarot-slot.disabled {
  cursor: default;
  pointer-events: none;
  opacity: 0.35;
}

.card-inner {
  position: relative;
  width: 84px;
  height: 130px;
  perspective: 1000px;
  transition: transform 0.6s cubic-bezier(0.4, 0.2, 0.2, 1);
  transform-style: preserve-3d;
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
}

.tarot-slot:not(.disabled):hover .card-inner {
  transform: translateY(-4px) scale(1.04);
}

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

.tarot-slot.flipped:hover .card-inner {
  transform: rotateY(180deg);
}

.card-face {
  position: absolute;
  inset: 0;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  background-color: var(--forest-800);
  border: 1px solid var(--gold-500);
  backface-visibility: hidden;
}

.card-face-front {
  transform: rotateY(180deg);
}

.card-label {
  margin-top: 8px;
  font-size: 0.72rem;
  min-height: 2.4em;
  color: var(--gold-400);
  line-height: 1.2;
}
