/* ==============================================
   CANDIDTICKETS — CLEAR STAGE THEME

   COLOR PALETTE
   ─────────────────────────────────────────────
   --ct-primary:         #0F6E56   teal-800 (nav, primary buttons)
   --ct-primary-hover:   #085041   teal-900 (hover states)
   --ct-accent:          #1D9E75   teal-600 (links, active, highlights)

   --ct-bg:              #F5F2EA   warm cream (page background)
   --ct-surface:         #E1F5EE   teal-50 (cards, dropdowns)
   --ct-surface-raised:  #DCEEE8   elevated surface (inputs, th)

   --ct-text-primary:    #2C2C2A   near-black
   --ct-text-secondary:  #444441   mid-gray
   --ct-text-muted:      #5F5E5A   muted gray

   --ct-border:          #9FE1CB   teal-200
   --ct-border-subtle:   #C2E8D8   subtle row borders

   Error:                #c94040
   ─────────────────────────────────────────────
================================================= */

:root {
  --form-buttons-height: 70px;
}


/* ==============================================
   SITE WIDE
================================================= */

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

a { cursor: pointer; }

a:link {
  text-decoration: none;
  color: #1D9E75;
  font-weight: 700;
}

a:visited {
  color: #085041;
}

a:hover {
  color: #085041;
}

a:active {
  color: #085041;
}

body, .body {
  font-family: "Cormorant", "Georgia", "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.65;
  color: #2C2C2A;
  background-color: #F5F2EA;
  font-weight: 400;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-bottom: calc(var(--form-buttons-height) + 8px);
}

.message {
  color: #1D9E75;
  font-style: italic;
  font-weight: 700;
}

.error {
  color: #c94040;
  font-style: italic;
  font-weight: 700;
}

.alert {
  color: #e07070;
}

.requiredField {
  color: #c94040;
}

.requiredFieldNote {
  display: inline-block;
  text-align: center;
  padding-bottom: 20px;
  color: #5F5E5A;
  font-size: 15px;
}

/* Environment indicator */
.env_id {
  font-size: 11px;
  color: #1D9E75;
  font-style: italic;
}


/* ==============================================
   BOOTSTRAP OVERRIDES
================================================= */

.navbar,
.navbar-light,
.bg-light {
  background-color: #0F6E56 !important;
  border-bottom: 1px solid #9FE1CB;
}

.stickyHeader {
  background-color: #0F6E56;
}

.navbar-toggler {
  border-color: #9FE1CB;
}

.navbar-toggler-icon {
  /* Recolor the hamburger lines to gold */
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23FFFFFF' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

.container {
  background-color: transparent;
}

/* Form controls */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="search"],
select,
textarea {
  background-color: #DCEEE8 !important;
  color: #2C2C2A !important;
  border: 1px solid #9FE1CB !important;
  border-radius: 4px;
}

input::placeholder,
textarea::placeholder {
  color: #5F5E5A !important;
  font-style: italic;
}

select option {
  background-color: #E1F5EE;
  color: #2C2C2A;
}


/* ==============================================
   MENU
================================================= */

.menuBar {
  padding: 8px 0 7px;
  color: #FFFFFF;
  background-color: #0F6E56;
  display: block;
  float: right;
  font-size: 12px;
  max-height: 150px;
}

.menu_list_container {
  width: 100%;
  text-align: center;
  display: none;
  background-color: #E1F5EE;
  border-top: 1px solid #9FE1CB;
  padding: 10px 0;
}

.list_menu_item {
  width: 100%;
  display: block;
  font-size: 26px;
  color: #FFFFFF;
  padding: 6px 0;
}

.list_menu_item a {
  color: #FFFFFF;
}

.list_menu_item a:hover {
  color: #9FE1CB;
}

#menu_bar {
  display: none;
}

#socialIcons {
  width: 200px;
  display: flex;
}

@media only screen and (max-width: 1344px) {
  #socialIcons {
    display: none;
  }
}

@media only screen and (min-width: 1048px) {

  #menu_bar {
    display: block;
    text-align: center;
    padding-top: 2px;
    height: 100%;
    padding-bottom: 3px;
    text-transform: uppercase;
    float: right;
  }

  #menu * {
    background: inherit;
    list-style: none;
    padding: 0;
    margin: 0;
  }

  #menu_bar ul {
    padding-inline-start: 0;
  }

  #menu li.headlink {
    float: left;
    background: inherit;
    font-size: 22px;
    text-decoration: none;
    padding-left: 20px;
    padding-right: 20px;
  }

  #menu li.headlink a {
    display: block;
  }

  #menu li.headlink a .highlighted {
    color: #0F6E56;
    background-color: #FFFFFF;
    border: 1px solid #FFFFFF;
    border-radius: 30px;
    transition-duration: 300ms;
    padding: 10px;
  }

  #menu li.headlink a .highlighted:hover {
    background-color: transparent;
    color: #9FE1CB;
    border-color: #9FE1CB;
  }

  #menu a {
    color: #FFFFFF;
    font-weight: bold;
  }

  #menu a:hover {
    display: block;
    background: transparent;
    color: #9FE1CB;
    font-weight: bold;
  }

  .activeMenuSection {
    color: #9FE1CB;
    font-weight: bold;
  }

  #menu a:active {
    color: #9FE1CB;
    font-weight: bold;
  }

  #menu li.headlink ul li {
    margin: 0;
    padding: 5px 12px;
    white-space: nowrap;
    background: #E1F5EE;
    font-size: 16px;
    text-align: left;
    border-bottom: 1px solid #C2E8D8;
  }

  #menu li.headlink ul li.menu_section_heading {
    color: #1D9E75;
    font-style: italic;
    text-align: left;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding-top: 8px;
  }

  #menu li.headlink ul li a {
    display: inline;
    color: #0F6E56;
  }

  .headlink_ul_hide {
    display: none;
  }

  .headlink_hover_ul {
    display: block;
    position: absolute;
    border: 1px solid #9FE1CB;
    background: #E1F5EE;
    z-index: 200;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7);
    border-radius: 0 0 6px 6px;
  }

  .headlink_hover_ul_li {
    text-align: left;
    font-size: 12px;
  }
}


/* ==============================================
   HEADER
================================================= */

.headerContainer {
  width: 1000px;
  padding: 5px 15px;
  display: block;
  background-color: #0F6E56;
  z-index: 20;
}

.headerLinksBar {
  height: 50px;
}


/* ==============================================
   FILTERING BOX
================================================= */

.searchAndFilterBox {
  margin-top: 20px;
  border: 2px solid #9FE1CB;
  border-radius: 10px;
  padding: 5px;
  background-color: #E1F5EE;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}

.filterFieldRow {
  clear: both;
}

.filterFieldRow div {
  padding-right: 10px;
}

.filterInput {
  padding: 6px !important;
  border-color: #9FE1CB !important;
  background-color: #DCEEE8 !important;
  color: #2C2C2A !important;
}

.filterInput::placeholder {
  font-style: italic;
  color: #5F5E5A !important;
}


/* ==============================================
   COMMON PAGE
================================================= */

.pageTitleOuter, .pageTitlePopups {
  width: 100%;
  height: 60px;
  text-align: center;
  background-color: #E1F5EE;
  border-top: 1px solid #9FE1CB;
  margin-right: auto;
  margin-left: auto;
}

@media only screen and (min-width: 851px) and (max-width: 899px) {
  .pageTitleOuter {
    height: 100px;
  }
}

.pageTitlePopups {
  height: 50px;
}

.pageTitle {
  width: 100%;
  z-index: 20;
  background-color: #E1F5EE;
  color: #1D9E75;
  border-bottom: 2px solid #9FE1CB;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pageTitleHalf {
  width: 70%;
  text-align: left;
  z-index: 20;
  float: left;
}

.sql_result_row {
  clear: both;
  min-height: 25px;
  border-bottom: 1px solid #C2E8D8;
}

.sql_result_row:hover {
  background-color: #C8EAD9;
}

.home-header-img {
  text-align: center;
  margin: 0 auto 1.5rem;
}

.home-header-img img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

.standardContent {
  max-width: 700px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  text-align: center;
}

.filterFloat {
  float: left;
  margin-top: 5px;
  margin-bottom: 5px;
  margin-left: 5px;
  margin-right: 5px;
}


/* ==============================================
   LAYOUT UTILITIES
================================================= */

.floatHalf    { float: left; width: 48%; margin-left: 1%; margin-right: 1%; margin-bottom: .5%; }
.floatThirds  { float: left; width: 31%; margin-left: 1%; margin-right: 1%; margin-bottom: .5%; }
.floatFifths  { float: left; width: 18%; margin-left: 1%; margin-right: 1%; margin-bottom: .5%; }

.float50  { float: left; width: 44px;  background: inherit; margin-left: 3px; margin-right: 3px; }
.float100 { float: left; width: 94px;  background: inherit; margin-left: 3px; margin-right: 3px; }
.float120 { float: left; width: 114px; background: inherit; margin-left: 3px; margin-right: 3px; }
.float150 { float: left; width: 144px; background: inherit; margin-left: 3px; margin-right: 3px; }
.float170 { float: left; width: 164px; background: inherit; margin-left: 3px; margin-right: 3px; }
.float200 { float: left; width: 194px; background: inherit; margin-left: 3px; margin-right: 3px; }
.float230 { float: left; width: 224px; background: inherit; margin-left: 3px; margin-right: 3px; }
.float250 { float: left; width: 250px; background: inherit; }
.float280 { float: left; width: 274px; background: inherit; margin-left: 3px; margin-right: 3px; }
.float300 { float: left; width: 300px; background: inherit; }
.float350 { float: left; width: 344px; background: inherit; margin-left: 3px; margin-right: 3px; }
.float400 { float: left; width: 400px; background: inherit; }
.float450 { float: left; width: 450px; background: inherit; }
.float500 { float: left; width: 500px; background: inherit; }
.float550 { float: left; width: 550px; background: inherit; }
.float600 { float: left; width: 600px; background: inherit; }
.float770 { float: left; width: 770px; background: inherit; }
.float800 { float: left; width: 800px; background: inherit; }
.float850 { float: left; width: 850px; background: inherit; }

.currencyValue100 {
  float: left;
  width: 60px;
  text-align: right;
  margin-right: 40px;
  background: inherit;
}

.currencyValue150 {
  float: left;
  width: 100px;
  text-align: right;
  margin-right: 50px;
}

.leftJustified  { text-align: left; }
.buttonBar      { clear: both; }
.clearFloat     { clear: both; }
.floatLeft      { float: left; margin-left: auto; margin-right: auto; }


/* ==============================================
   BUTTONS
================================================= */

.inputButton {
  text-decoration: none;
  color: #FFFFFF;
  font-weight: 700;
  background-color: #0F6E56;
  height: 40px;
  border-radius: 7px;
  transition: background 250ms ease-in-out, transform 150ms ease;
  cursor: pointer;
  margin-left: 5px;
  margin-right: 5px;
  border: none;
}

.inputButton:hover {
  background-color: #085041;
  color: #FFFFFF;
}

.smallInputButton {
  text-decoration: none;
  color: #FFFFFF;
  font-weight: 700;
  background-color: #0F6E56;
  border-radius: 7px;
  transition: background 250ms ease-in-out, transform 150ms ease;
  cursor: pointer;
  border: none;
}

.smallInputButton:hover {
  background-color: #085041;
}

.paginationButton {
  height: 30px;
  padding-bottom: 5px;
  margin-top: 5px;
  border-radius: 5px;
  border: 1px solid #9FE1CB;
  background-color: #DCEEE8;
  color: #1D9E75;
}

.disabledButton {
  font-size: 24px;
  font-family: "Cormorant", "Georgia", serif;
  font-weight: bold;
  margin-bottom: 10px;
  opacity: 0.35;
  cursor: not-allowed;
}

.btn-primary,
.btn-secondary {
  border-radius: 30px;
  transition: all 0.15s ease;
  min-width: 150px;
  border: 2px solid transparent;
  cursor: pointer;
}

/* PRIMARY — teal fill */
.btn-primary {
  background-color: #0F6E56;
  color: #FFFFFF;
  border-color: #0F6E56;
  font-weight: 700;
}

.btn-primary:hover {
  background-color: #085041;
  border-color: #085041;
  color: #FFFFFF;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(29, 158, 117, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

/* SECONDARY — gold outline */
.btn-secondary {
  background-color: transparent;
  color: #1D9E75;
  border-color: #1D9E75;
}

.btn-secondary:hover {
  background-color: rgba(29, 158, 117, 0.12);
  color: #085041;
  border-color: #085041;
  transform: translateY(-0.5px);
}

/* Generic button */
button {
  background: #E1F5EE;
  color: #0F6E56;
  border: 1px solid #9FE1CB;
  font-size: 16px;
  font-weight: 600;
}

button:hover,
button:focus {
  background: #0F6E56;
  color: #FFFFFF;
  border-color: #0F6E56;
  font-size: 16px;
  font-weight: 600;
}

button:disabled {
  background: #DCEEE8;
  color: #9FE1CB;
  border-color: #9FE1CB;
  cursor: not-allowed;
}

button:focus {
  outline: 1px solid #1D9E75;
  outline-offset: 3px;
}

.btn {
  font-size: 20px;
  font-family: "Cormorant", "Georgia", serif;
  font-weight: bold;
  padding: 8px 15px;
  line-height: 1.2;
  display: inline-block;
  box-sizing: border-box;
  margin-bottom: 10px;
}

.btn:hover,
.btn:focus {
  font-size: 20px;
}


/* ==============================================
   FOOTER
================================================= */

.footer {
  text-align: center;
  width: 100%;
  clear: both;
  color: #5F5E5A;
  font-size: 14px;
  padding: 20px 0;
  border-top: 1px solid #9FE1CB;
}

.formButtons {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: var(--form-buttons-height);
  padding-top: 10px;
  padding-bottom: 0;
  text-align: center;
  background-color: #E1F5EE;
  border-top: 1px solid #9FE1CB;
  z-index: 10;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.6);
}

.formButtonsInline {
  clear: both;
  padding-top: 10px;
  padding-bottom: 10px;
  text-align: center;
}


/* ==============================================
   TABLES (admin / list views)
================================================= */

table {
  border-collapse: collapse;
  width: 100%;
  color: #2C2C2A;
}

th {
  background-color: #DCEEE8;
  color: #1D9E75;
  border-bottom: 2px solid #9FE1CB;
  padding: 8px 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 14px;
}

td {
  padding: 6px 10px;
  border-bottom: 1px solid #C2E8D8;
  vertical-align: middle;
}

tr:hover td {
  background-color: #C8EAD9;
}

/* Alternating row tint */
tr:nth-child(even) td {
  background-color: #EBF8F3;
}


/* ==============================================
   OVERLAY & POPUP
================================================= */

#overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(8, 80, 65, 0.85);
  z-index: 150;
}


/* ==============================================
   RANDOM SIGMA / NUMBER OUTPUT
================================================= */

.randomSigmaTitle {
  font-size: 36px;
  color: #085041;
  font-family: fantasy;
  font-weight: 500;
  letter-spacing: 5px;
  text-shadow:
    1px 1px 1px #0F6E56,
    1px 2px 1px #0F6E56,
    1px 3px 1px #0F6E56,
    1px 4px 1px #0F6E56,
    1px 5px 1px #0F6E56,
    1px 6px 1px #0F6E56,
    1px 7px 1px #0F6E56,
    1px 8px 1px #0F6E56,
    1px 9px 1px #0F6E56,
    1px 10px 1px #0F6E56,
    1px 18px 6px rgba(0, 0, 0, 0.5),
    1px 22px 10px rgba(0, 0, 0, 0.3),
    1px 25px 35px rgba(0, 0, 0, 0.3),
    1px 30px 60px rgba(0, 0, 0, 0.5);
}

.noIconBackground {
  background: url(img/background_no_logo.png);
  background-repeat: tile;
  background-size: auto;
  text-align: center;
}

.numberOutputArea {
  border: 3px solid #1D9E75;
  margin: 10px;
  color: #2C2C2A;
  clear: both;
  text-align: center;
  width: 260px;
  height: 160px;
  background-color: #E1F5EE;
}

.sigmaOutput {
  background-color: #0F6E56;
  border: 2px outset #085041;
  margin: 5px;
  width: 140px;
  height: 55px;
  color: #FFFFFF;
  font-weight: 700;
  vertical-align: middle;
  text-align: center;
}

.outlierOutput {
  background-color: #E1F5EE;
  border: 2px outset #0F6E56;
  margin: 5px;
  width: 400px;
  height: 450px;
  color: #085041;
  font-weight: 600;
  vertical-align: middle;
  text-align: center;
  overflow-y: auto;
}

@media only screen and (max-width: 730px) {
  .outlierOutput {
    height: 350px;
  }
}


/* ==============================================
   HOMEPAGE / PALAVERCONTAINER
================================================= */

.zuzzalert {
  color: #e07070;
}

.zuzzingSoon {
  font-weight: 600;
  font-style: italic;
  text-transform: lowercase;
}

.palaverContainer {
  text-align: center;
  height: 940px;
  width: 100%;
  color: #085041;
  font-size: 18px;
  font-weight: 900;
  text-transform: uppercase;
}

@media only screen and (min-width: 1600px) {
  .palaverContainer {
    background: url(img/logo2_with_background_huge.png);
    background-repeat: no-repeat;
    background-size: contain;
  }
  #smallLogo { display: none; }
  #medLogo   { display: none; }
}

@media only screen and (min-width: 800px) and (max-width: 1599px) {
  .palaverContainer {
    background: url(img/background_no_logo.png);
    background-repeat: repeat;
  }
  #smallLogo { display: none; }
  #medLogo   { display: block; }
}

@media only screen and (max-width: 799px) {
  .palaverContainer {
    background: url(img/background_no_logo.png);
    background-repeat: repeat;
    font-size: 14px;
    font-weight: 600;
  }
  #smallLogo { display: block; }
  #medLogo   { display: none; }
}


/* ==============================================
   CALENDAR
================================================= */

.calendar, .calendarLarge, .calendarSmall {
  background-color: #E1F5EE;
  border: 1px solid #9FE1CB;
  border-radius: 4px;
}

.calHead {
  background-color: #DCEEE8;
  color: #1D9E75;
  font-weight: 700;
  overflow: hidden;
}

.calHeadCel, .calHeadCelLarge, .calHeadCelSmall {
  float: left;
  text-align: center;
  color: #1D9E75;
  border-right: 1px solid #9FE1CB;
  padding: 4px 6px;
  font-size: 14px;
  letter-spacing: 0.05em;
}

.calCel, .calCelLarge, .calCelSmall {
  float: left;
  border: 1px solid #C2E8D8;
  color: #2C2C2A;
  background-color: #E1F5EE;
  min-height: 24px;
  padding: 2px 4px;
}

.calCelCurrent {
  background-color: #DCEEE8;
  border-color: #1D9E75 !important;
  color: #085041;
  font-weight: 700;
}

.calCelInThePast {
  color: #9FE1CB;
}

.calBlank {
  background-color: #F5F2EA;
}

.calTitle {
  color: #1D9E75;
  font-weight: 700;
}


/* ==============================================
   TAROT DRAW PAGE
================================================= */

/* ── Setup panel ── */
.draw-setup {
  max-width: 640px;
  margin: 60px auto 40px;
  text-align: center;
  padding: 0 20px;
}

.draw-title {
  font-size: 2.4rem;
  color: #1D9E75;
  margin-bottom: 8px;
}

.draw-subtitle {
  color: #5F5E5A;
  margin-bottom: 36px;
  font-size: 1.05rem;
}

.draw-selectors {
  display: flex;
  gap: 32px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.draw-selector-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 220px;
}

.draw-selector-group label {
  color: #1D9E75;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.draw-select {
  background: #DCEEE8;
  color: #2C2C2A;
  border: 1px solid #9FE1CB;
  border-radius: 4px;
  padding: 8px 12px;
  font-size: 0.95rem;
  width: 100%;
  cursor: pointer;
}

.draw-select:focus {
  outline: none;
  border-color: #1D9E75;
}

.spread-description {
  color: #5F5E5A;
  font-size: 0.85rem;
  margin-top: 8px;
  min-height: 36px;
}

.btn-draw {
  background: linear-gradient(135deg, #9FE1CB, #0F6E56);
  color: #085041;
  border: 1px solid #1D9E75;
  border-radius: 6px;
  padding: 14px 48px;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background 0.25s, box-shadow 0.25s;
}

.btn-draw:hover {
  background: linear-gradient(135deg, #0F6E56, #1D9E75);
  box-shadow: 0 0 18px rgba(29, 158, 117, 0.35);
}

.draw-question-group {
  margin: 20px auto 0;
  max-width: 480px;
  text-align: left;
}

.draw-question-group label {
  display: block;
  font-size: 0.85rem;
  color: #5F5E5A;
  margin-bottom: 6px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.draw-question-optional {
  font-size: 0.8em;
  color: #5F5E5A;
  text-transform: none;
  letter-spacing: 0;
}

.draw-question-input {
  width: 100%;
  background: #E1F5EE;
  color: #2C2C2A;
  border: 1px solid #9FE1CB;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 0.95rem;
  outline: none;
  box-sizing: border-box;
}

.draw-question-input::placeholder {
  color: #5F5E5A;
}

.draw-question-input:focus {
  border-color: #1D9E75;
}

.draw-question-disclaimer {
  margin: 6px 0 0;
  font-size: 0.75rem;
  color: #5F5E5A;
  font-style: italic;
}

.btn-new-draw {
  display: block;
  margin: 32px auto 0;
  background: transparent;
  color: #1D9E75;
  border: 1px solid #9FE1CB;
  border-radius: 6px;
  padding: 10px 36px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.btn-new-draw:hover {
  border-color: #1D9E75;
  color: #085041;
}

/* ── Loading overlay ── */
.draw-loader {
  text-align: center;
  padding: 80px 20px;
  color: #5F5E5A;
}

.tarot-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid #9FE1CB;
  border-top-color: #1D9E75;
  border-radius: 50%;
  animation: tarot-spin 0.9s linear infinite;
  margin: 0 auto 20px;
}

@keyframes tarot-spin {
  to { transform: rotate(360deg); }
}

/* ── Spread area ── */
.spread-area {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 16px 60px;
}

.spread-title {
  text-align: center;
  font-size: 1.5rem;
  color: #1D9E75;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 36px;
}

/* ── Card row ── */
.card-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 28px;
}

/* ── Card container ── */
.card-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 160px;
}

.card-position-label {
  color: #0F6E56;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 8px;
  text-align: center;
}

/* ── 3-D flip mechanism ── */
.card-scene {
  width: 150px;
  height: 262px;        /* ~1 : 1.75 tarot proportion */
  perspective: 900px;
  cursor: pointer;
  flex-shrink: 0;
}

.card-scene:not(.is-flipped):not(.is-loading):hover .card-flipper {
  transform: rotateY(8deg);
}

.card-flipper {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.7s cubic-bezier(0.4, 0.2, 0.2, 1);
}

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

.card-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #9FE1CB;
  box-shadow: 0 4px 18px rgba(0,0,0,0.6);
}

/* Front face starts rotated — shown when the flipper rotates 180° */
.card-front {
  transform: rotateY(180deg);
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Reversed card image */
.card-reversed .card-img {
  transform: rotate(180deg);
}

/* ── Click hint ── */
.card-hint {
  color: #5F5E5A;
  font-size: 0.72rem;
  margin-top: 6px;
  letter-spacing: 0.06em;
}

/* ── Card info (appears after flip) ── */
.card-info {
  width: 160px;
  margin-top: 14px;
  text-align: center;
}

.card-name {
  color: #1D9E75;
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.reversed-badge {
  background: #9FE1CB;
  color: #1D9E75;
  font-size: 0.7rem;
  padding: 1px 6px;
  border-radius: 3px;
  border: 1px solid #0F6E56;
  vertical-align: middle;
}

.card-keywords {
  color: #5F5E5A;
  font-size: 0.75rem;
  font-style: italic;
  margin-bottom: 8px;
}

.card-interpretation {
  color: #5F5E5A;
  font-size: 0.82rem;
  line-height: 1.55;
}

.interp-loader {
  color: #5F5E5A;
  font-size: 0.78rem;
}

.interp-text {
  color: #444441;
  margin: 0;
}

/* ── Gestalt area ── */
.gestalt-area {
  max-width: 680px;
  margin: 52px auto 0;
  padding: 28px 32px;
  background: #DCEEE8;
  border: 1px solid #9FE1CB;
  border-radius: 8px;
  text-align: center;
}

.gestalt-title {
  color: #1D9E75;
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.gestalt-loader {
  color: #5F5E5A;
  font-size: 0.9rem;
}

.gestalt-text {
  color: #2C2C2A;
  font-size: 1rem;
  line-height: 1.75;
  margin: 0;
}


/* ==============================================
   DRAW HISTORY — detail view additions
================================================= */

/* Cards in history are already face-up — no pointer or hover tilt */
.history-card .card-scene {
  cursor: default;
}

.history-card .card-scene:not(.is-flipped):not(.is-loading):hover .card-flipper {
  transform: none;
}

.draw-history-detail {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 16px 60px;
}

.draw-history-date {
  text-align: center;
  color: #5F5E5A;
  font-size: 0.85rem;
  margin-bottom: 12px;
}

.draw-history-question {
  text-align: center;
  color: #1D9E75;
  font-style: italic;
  font-size: 1rem;
  margin-bottom: 28px;
}

.draw-history-back {
  text-align: center;
  margin-top: 40px;
}

.draw-history-err {
  text-align: center;
  color: #c94040;
  padding: 40px;
}

/* ── Card detail modal ───────────────────────── */
.tarot-modal-content {
  background-color: #E1F5EE;
  border: 1px solid #9FE1CB;
  color: #2C2C2A;
}

.tarot-modal-header {
  border-bottom: 1px solid #9FE1CB;
}

.tarot-modal-header .modal-title {
  color: #1D9E75;
}

.tarot-modal-inner {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.tarot-modal-img-wrap {
  flex: 0 0 auto;
}

.tarot-modal-img {
  width: 330px;
  border-radius: 6px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.6);
}

.tarot-modal-img.card-reversed {
  transform: rotate(180deg);
}

.tarot-modal-text {
  flex: 1 1 auto;
}

.tarot-modal-text .card-keywords {
  color: #1D9E75;
  font-size: 0.85em;
  margin-bottom: 16px;
}

.tarot-modal-text .interp-text {
  color: #2C2C2A;
  line-height: 1.7;
}

.tarot-modal-close-bottom {
  display: none;
}

@media (max-width: 600px) {
  .tarot-modal-inner {
    flex-direction: column;
    align-items: center;
  }

  .tarot-modal-img {
    width: 180px;
  }

  .tarot-modal-text {
    width: 100%;
  }

  .tarot-modal-close-bottom {
    display: block;
    width: 100%;
    margin-top: 16px;
  }
}

.popup_parent_mask {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.4);
    z-index: 9999;
    cursor: default;
}

/* Popup page — pin form buttons to bottom of iframe viewport */
.popup-page .formButtonsInline {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #ddd;
    padding: 10px 20px;
    z-index: 100;
}

/* Prevent form content from being obscured by the fixed button bar */
.popup-page .outerBody {
    padding-bottom: 60px;
}
