:root {
  --bg: #0a0b10;
  --surface: #121520;
  --surface-soft: #171b29;
  --surface-chat: #161926;
  --border: rgba(216, 180, 108, 0.18);
  --border-gold: rgba(216, 180, 108, 0.48);
  --gold: #d8b46c;
  --gold-light: #f0d69c;
  --gold-tint: rgba(216, 180, 108, 0.12);
  --ivory: #f5efe6;
  --muted: #b0a99d;
  --ruby: #9c4454;
  --sage: #579b86;
  --radius: 16px;
  --font-serif: "Cormorant Garamond", "Georgia", "Times New Roman", serif;
  --font-sans: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 50% -10%, #1d2133 0%, var(--bg) 56%);
  color: var(--ivory);
  font-family: var(--font-sans);
  font-size: 15.5px;
  line-height: 1.65;
  overflow-x: hidden;
}

.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(110px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.16;
}

.ambient-glow-top {
  width: 380px;
  height: 380px;
  top: -120px;
  right: 8%;
  background: #d8b46c;
}

.ambient-glow-bottom {
  width: 340px;
  height: 340px;
  bottom: -120px;
  left: 6%;
  background: #5b7db1;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(14px);
  background: rgba(10, 11, 16, 0.84);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  font-size: 1.35rem;
  color: var(--gold-light);
  line-height: 1;
}

.brand-name {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--gold-light);
  line-height: 1.1;
}

.brand-sub {
  display: block;
  font-size: 0.76rem;
  color: var(--muted);
}

.topnav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.nav-btn,
.sound-toggle-btn {
  background: transparent;
  color: var(--muted);
  border: 1px solid transparent;
  padding: 7px 14px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav-btn:hover,
.sound-toggle-btn:hover {
  color: var(--ivory);
  border-color: var(--border);
}

.nav-btn.is-active {
  background: var(--gold-tint);
  color: var(--gold-light);
  border-color: var(--border-gold);
}

.sound-toggle-btn {
  border-color: var(--border);
  margin-left: 4px;
}

.sound-toggle-btn.is-muted {
  opacity: 0.65;
}

.shell {
  position: relative;
  z-index: 1;
  max-width: 980px;
  margin: 0 auto;
  padding: 22px 20px 140px;
}

.toast-banner {
  background: var(--surface-soft);
  border: 1px solid var(--border-gold);
  color: var(--gold-light);
  padding: 10px 16px;
  border-radius: 12px;
  margin-bottom: 14px;
  font-size: 0.9rem;
}

h1, h2, h3 {
  font-family: var(--font-serif);
  margin: 0 0 8px;
  font-weight: 600;
  color: var(--ivory);
  letter-spacing: 0.01em;
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.4rem; color: var(--gold-light); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 10px; }
.muted { color: var(--muted); }
.small-text { font-size: 0.85rem; }

/* Tarot Masası */
.table-stage {
  position: relative;
  background: radial-gradient(circle at 50% 35%, rgba(28, 34, 54, 0.95), rgba(13, 15, 24, 0.98));
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 22px 22px 20px;
  margin-bottom: 18px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.table-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.table-title {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: var(--gold-light);
  margin: 0;
}

.table-sub {
  font-size: 0.86rem;
  color: var(--muted);
  margin: 2px 0 0;
}

/* Hazır 3 Açılım */
.spreads-trio {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.spread-choice-card {
  text-align: left;
  background: linear-gradient(170deg, rgba(25, 29, 44, 0.85), rgba(14, 16, 25, 0.95));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 16px;
  color: var(--ivory);
  cursor: pointer;
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.spread-choice-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-gold);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45), 0 0 24px rgba(216, 180, 108, 0.12);
}

.spread-choice-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.spread-icon-svg {
  width: 38px;
  height: 38px;
}

.spread-tagline {
  font-size: 0.76rem;
  color: var(--gold);
  letter-spacing: 0.04em;
}

.spread-choice-name {
  font-family: var(--font-serif);
  font-size: 1.28rem;
  font-weight: 600;
  color: var(--ivory);
}

.spread-choice-desc {
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.5;
}

.table-footer-link {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.link-btn {
  background: none;
  border: none;
  color: var(--gold);
  font-family: inherit;
  font-size: 0.86rem;
  cursor: pointer;
  padding: 4px 0;
  text-decoration: underline;
  text-underline-offset: 4px;
  opacity: 0.88;
}

.link-btn:hover {
  opacity: 1;
  color: var(--gold-light);
}

/* Kart Yelpazesi (Seçim Aşaması) */
.fan-tray {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  padding: 18px 8px 10px;
  min-height: 185px;
  overflow-x: auto;
}

.fan-card-btn {
  position: relative;
  width: 82px;
  height: 122px;
  margin-left: -24px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.22, 0.61, 0.36, 1), opacity 0.2s ease;
  flex-shrink: 0;
}

.fan-card-btn:first-child {
  margin-left: 0;
}

.fan-card-btn:hover:not(:disabled) {
  transform: translateY(-18px) scale(1.05);
  z-index: 10;
}

.fan-card-btn.is-chosen {
  opacity: 0.18;
  transform: translateY(-28px);
  pointer-events: none;
}

.fan-card-btn .card-back-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.5));
}

.pick-progress {
  text-align: center;
  font-size: 0.9rem;
  color: var(--gold-light);
  margin-top: 6px;
}

/* Masadaki Seçili / Açılan Kartlar */
.board-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  padding: 8px 0 4px;
}

.tarot-slot {
  width: 162px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.slot-caption {
  font-size: 0.82rem;
  color: var(--gold);
  font-weight: 500;
  text-align: center;
}

.card-3d {
  position: relative;
  width: 160px;
  height: 244px;
  perspective: 1100px;
  cursor: pointer;
  transform-style: preserve-3d;
  transition: transform 0.72s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.tarot-slot:not(.is-revealed):hover .card-3d {
  transform: translateY(-6px);
}

.tarot-slot.is-next .card-face.card-back {
  box-shadow: 0 0 24px rgba(216, 180, 108, 0.24);
}

.tarot-slot.is-revealed .card-3d {
  transform: rotateY(180deg);
  cursor: default;
}

.card-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 14px;
  overflow: hidden;
}

.card-face.card-back {
  background: #0d0f18;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.card-back-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.card-back-cue {
  position: absolute;
  bottom: 12px;
  font-size: 0.74rem;
  color: var(--gold-light);
  background: rgba(10, 11, 16, 0.84);
  border: 1px solid var(--border);
  padding: 2px 10px;
  border-radius: 999px;
}

.card-face.card-front {
  transform: rotateY(180deg);
  background: linear-gradient(175deg, #171b2a, #0c0e16);
  border: 1px solid var(--border-gold);
  padding: 8px 8px 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.5);
}

.card-front-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 4px;
  font-size: 0.76rem;
}

.card-num {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--gold-light);
}

.card-rev-note {
  font-size: 0.7rem;
  color: #e2a4a8;
  letter-spacing: 0.03em;
}

.card-art-svg {
  width: 100%;
  height: 174px;
  display: block;
}

.card-front-footer {
  text-align: center;
  padding-top: 2px;
}

.card-title {
  font-family: var(--font-serif);
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--ivory);
  line-height: 1.2;
}

/* Danışman Sohbet Akışı */
.chat-feed {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 24px;
}

.msg-row {
  display: flex;
  animation: fadeUp 0.28s ease both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.msg-row.is-consultant {
  justify-content: flex-start;
}

.msg-row.is-user {
  justify-content: flex-end;
}

.msg-bubble {
  max-width: 86%;
  border-radius: 16px;
  padding: 15px 18px;
}

.msg-row.is-consultant .msg-bubble {
  background: var(--surface-chat);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  color: var(--ivory);
}

.msg-row.is-user .msg-bubble {
  background: linear-gradient(135deg, rgba(216, 180, 108, 0.2), rgba(216, 180, 108, 0.1));
  border: 1px solid var(--border-gold);
  color: var(--ivory);
}

.msg-speaker {
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 4px;
  font-weight: 600;
}

.msg-bubble p:last-child {
  margin-bottom: 0;
}

.quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.quick-btn {
  background: rgba(216, 180, 108, 0.08);
  color: var(--gold-light);
  border: 1px solid var(--border-gold);
  border-radius: 999px;
  padding: 7px 14px;
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.18s ease;
}

.quick-btn:hover {
  background: var(--gold);
  color: #10121a;
}

/* Sabit Alt Sohbet Girişi */
.chat-composer-bar {
  position: sticky;
  bottom: 14px;
  z-index: 20;
  margin-top: 18px;
  background: rgba(16, 19, 30, 0.94);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-gold);
  border-radius: 16px;
  padding: 10px 12px;
  display: flex;
  gap: 10px;
  align-items: center;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}

.composer-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--ivory);
  font-family: inherit;
  font-size: 0.96rem;
  padding: 6px 4px;
}

.composer-input:focus {
  outline: none;
}

.composer-input::placeholder {
  color: #8c877d;
}

.btn-primary,
.btn-secondary,
.mini-btn,
.chip-btn {
  font-family: inherit;
  cursor: pointer;
  transition: all 0.18s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #e2c27e, #c49b4d);
  color: #11131b;
  border: none;
  border-radius: 10px;
  padding: 10px 18px;
  font-weight: 600;
  font-size: 0.92rem;
}

.btn-primary:hover:not(:disabled) {
  filter: brightness(1.07);
}

.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  color: var(--ivory);
  border: 1px solid var(--border-gold);
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 0.88rem;
}

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

.mini-btn {
  background: #171b29;
  color: var(--ivory);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 5px 11px;
  font-size: 0.8rem;
}

.mini-btn:hover {
  border-color: var(--gold);
}

.danger-btn:hover {
  border-color: var(--ruby);
  color: #e69aa0;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0;
}

.chip-btn {
  background: #121521;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.83rem;
}

.chip-btn.is-active,
.chip-btn:hover {
  border-color: var(--gold);
  color: var(--gold-light);
  background: var(--gold-tint);
}

/* Paneller (Geçmişim, Ayarlar, Fiziksel Masa) */
.panel-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 16px;
}

.panel-head-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin: 14px 0;
}

.field-label {
  display: block;
  font-size: 0.86rem;
  color: var(--gold);
  margin-bottom: 6px;
}

.text-input,
.select-input {
  width: 100%;
  background: #0d0f17;
  color: var(--ivory);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 0.94rem;
}

.text-input:focus,
.select-input:focus {
  outline: none;
  border-color: var(--gold);
}

.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  border: 1px solid var(--border);
  color: var(--muted);
}

.status-gerceklesti { border-color: var(--sage); color: #8cd4bc; }
.status-kismen { border-color: var(--gold); color: var(--gold-light); }

/* Fiziksel Deste Seçici */
.picker-slots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.picker-slot {
  background: #0e1019;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  cursor: pointer;
}

.picker-slot.is-active {
  border-color: var(--gold);
  background: var(--gold-tint);
}

.picker-slot-title { font-size: 0.78rem; color: var(--gold); }
.picker-slot-card { font-weight: 600; margin: 4px 0; font-size: 0.92rem; }
.picker-slot-actions { display: flex; gap: 6px; }

.picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
  gap: 8px;
  max-height: 270px;
  overflow-y: auto;
  padding: 4px;
  margin: 10px 0;
}

.picker-card-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: #10131e;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--ivory);
  text-align: left;
  cursor: pointer;
}

.picker-card-btn:hover:not(:disabled) { border-color: var(--gold); }
.picker-card-btn.is-picked { opacity: 0.32; cursor: not-allowed; }
.picker-card-num { font-size: 0.72rem; color: var(--gold); }
.picker-card-name { font-size: 0.86rem; font-weight: 600; }

/* Geçmişim & Notlar */
.reading-item-top {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.card-mini-chip {
  font-size: 0.78rem;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #0f121d;
}

.stalker-pill {
  font-size: 0.8rem;
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid var(--border-gold);
  color: var(--gold-light);
  background: var(--gold-tint);
}

.reading-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.glossary-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.glossary-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 12px;
  align-items: center;
  background: #0f121d;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
}

.glossary-input-wrap {
  display: flex;
  gap: 8px;
}

@media (max-width: 780px) {
  .spreads-trio { grid-template-columns: 1fr; }
  .msg-bubble { max-width: 96%; }
  .tarot-slot { width: 138px; }
  .card-3d { width: 136px; height: 210px; }
  .card-art-svg { height: 144px; }
  .glossary-row { grid-template-columns: 1fr; }
}
