/* web/tarot/client/styles.css */
*, *:before, *:after {
  box-sizing: border-box;
}

:root {
  --bg: #0d0c14;
  --surface: #eff1f30d;
  --border: #eff1f31a;
  --text: #e8e6f0;
  --text-muted: #e8e6f08c;
  --accent: #9b7fd4;
  --danger: #ff8b8b;
  --nav-height: 48px;
}

html, body {
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  margin: 0;
  padding: 0;
  font-family: Nunito, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Noto Sans, Ubuntu, Cantarell, Helvetica Neue, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

#root {
  min-height: 100dvh;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  font-size: inherit;
}

input, textarea {
  font-family: inherit;
  font-size: inherit;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  outline: none;
  border-radius: 8px;
  width: 100%;
  padding: .4rem .6rem;
}

input:focus, textarea:focus {
  border-color: #eff1f34d;
}

.app-loading {
  display: flex;
  color: var(--text-muted);
  justify-content: center;
  align-items:  center;
  min-height: 100dvh;
  font-size: 1.5rem;
}

.nav {
  position: sticky;
  z-index: 10;
  height: var(--nav-height);
  display: flex;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  background: #0d0c14e0;
  align-items:  center;
  gap: .25rem;
  padding: 0 1rem;
  top: 0;
}

.nav-brand {
  letter-spacing: .04em;
  color: var(--text);
  margin-right: .5rem;
  font-family: Outfit, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Noto Sans, Ubuntu, Cantarell, Helvetica Neue, sans-serif;
  font-size: 1rem;
  font-weight: 600;
}

.nav-link {
  display: flex;
  color: var(--text-muted);
  border-radius: 8px;
  align-items:  center;
  gap: .3rem;
  padding: .3rem .6rem;
  transition: color .12s, background .12s;
  font-size: .85rem;
}

.nav-link:hover {
  color: var(--text);
  background: var(--surface);
}

.nav-link.active {
  color: var(--text);
}

.nav-spacer {
  flex: 1;
}

.nav-logout {
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  background: none;
  border: none;
  border-radius: 8px;
  align-items:  center;
  gap: .3rem;
  padding: .3rem .6rem;
  transition: color .12s, background .12s;
  font-size: .85rem;
}

.nav-logout:hover {
  color: var(--text);
  background: var(--surface);
}

.page {
  max-width: 860px;
  margin: 0 auto;
  padding: 2rem 1.25rem;
}

.page-title {
  margin: 0 0 1.5rem;
  font-family: Outfit, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Noto Sans, Ubuntu, Cantarell, Helvetica Neue, sans-serif;
  font-size: 1.35rem;
  font-weight: 600;
}

.login-wrap {
  display: flex;
  justify-content: center;
  align-items:  center;
  min-height: 100dvh;
  padding: 1.5rem;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  width: 100%;
  max-width: 320px;
}

.login-title {
  text-align: center;
  letter-spacing: .06em;
  margin: 0 0 .25rem;
  font-family: Outfit, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Noto Sans, Ubuntu, Cantarell, Helvetica Neue, sans-serif;
  font-size: 1.4rem;
  font-weight: 600;
}

.login-btn {
  color: var(--text);
  cursor: pointer;
  background: #eff1f31f;
  border: 1px solid #eff1f333;
  border-radius: 999px;
  padding: .55rem 1rem;
  transition: background .15s;
  font-size: .9rem;
}

.login-btn:hover:not(:disabled) {
  background: #eff1f333;
}

.login-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.login-error {
  color: var(--danger);
  text-align: center;
  margin: 0;
  font-size: .85rem;
}

.home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: .75rem;
  margin-top: .5rem;
}

.home-card {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  border-radius: 14px;
  flex-direction: column;
  gap: .3rem;
  padding: 1rem;
  transition: background .15s, border-color .15s;
}

.home-card:hover {
  background: #eff1f317;
  border-color: #eff1f32e;
}

.home-card-icon {
  margin-bottom: .1rem;
  font-size: 1.4rem;
}

.home-card-title {
  font-family: Outfit, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Noto Sans, Ubuntu, Cantarell, Helvetica Neue, sans-serif;
  font-size: .95rem;
  font-weight: 600;
}

.home-card-subtitle {
  color: var(--text-muted);
  font-size: .78rem;
}

.home-card--dim {
  opacity: .5;
  pointer-events: none;
}

.reading-loading {
  display: flex;
  color: var(--text-muted);
  justify-content: center;
  align-items:  center;
  min-height: 40vh;
}

.reading-error {
  color: var(--danger);
  margin: 0;
}

.page-error {
  color: var(--danger);
  margin: 0 0 1rem;
  font-size: .88rem;
}

.page-empty {
  color: var(--text-muted);
  margin: 2rem 0;
  font-size: .9rem;
}

.home-chart-summary {
  color: var(--text-muted);
  margin: -.75rem 0 1.25rem;
  font-size: .88rem;
}

.home-banner {
  display: block;
  color: var(--accent);
  text-decoration: none;
  background: #9b7fd41f;
  border: 1px solid #9b7fd44d;
  border-radius: 10px;
  margin-bottom: 1.25rem;
  padding: .6rem .9rem;
  transition: background .15s;
  font-size: .88rem;
}

.home-banner:hover {
  background: #9b7fd433;
}

.home-recent {
  margin-top: 2rem;
}

.home-section-title {
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 .75rem;
  font-family: Outfit, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Noto Sans, Ubuntu, Cantarell, Helvetica Neue, sans-serif;
  font-size: .82rem;
  font-weight: 600;
}

.history-filters {
  display: flex;
  flex-wrap: wrap;
  align-items:  center;
  gap: .5rem;
  margin-bottom: 1.25rem;
}

.filter-select {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  border-radius: 8px;
  width: auto;
  padding: .3rem .5rem;
  font-size: .85rem;
}

.filter-date {
  --buncss-light: ;
  --buncss-dark: initial;
  color-scheme: dark;
  width: auto;
  padding: .3rem .5rem;
  font-size: .85rem;
}

.filter-reset {
  color: var(--text-muted);
  cursor: pointer;
  background: none;
  border: none;
  border-radius: 6px;
  padding: .3rem .5rem;
  transition: color .12s;
  font-size: .82rem;
}

.filter-reset:hover {
  color: var(--text);
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.history-row {
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: pointer;
  display: flex;
  color: var(--text);
  border-radius: 10px;
  flex-direction: column;
  gap: .25rem;
  width: 100%;
  padding: .65rem .9rem;
  transition: background .13s, border-color .13s;
}

.history-row:hover {
  background: #eff1f317;
  border-color: #eff1f32e;
}

.history-row-meta {
  display: flex;
  flex-wrap: wrap;
  align-items:  center;
  gap: .4rem;
  font-size: .8rem;
}

.history-row-date {
  color: var(--text-muted);
}

.history-row-spread {
  color: var(--text);
  font-weight: 500;
}

.history-row-theme {
  color: var(--accent);
  background: #9b7fd426;
  border: 1px solid #9b7fd440;
  border-radius: 6px;
  padding: 0 .4rem;
  font-size: .75rem;
}

.history-row-profile {
  color: var(--text-muted);
  font-size: .78rem;
}

.history-row-question {
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: .85rem;
}

.yn-form {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  margin-bottom: 1.75rem;
}

.yn-question-input {
  font-size: 1rem;
}

.yn-mode-toggle {
  display: flex;
  gap: .4rem;
}

.yn-mode-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 8px;
  padding: .3rem .75rem;
  transition: background .13s, border-color .13s, color .13s;
  font-size: .85rem;
}

.yn-mode-btn.is-active {
  color: var(--accent);
  background: #9b7fd426;
  border-color: #9b7fd44d;
}

.yn-mode-btn:hover:not(.is-active) {
  color: var(--text);
  background: #eff1f314;
}

.yn-submit {
  align-self:  flex-start;
}

.yn-result {
  margin-bottom: 2rem;
}

.yn-result-question {
  color: var(--text-muted);
  margin: 0 0 1rem;
  font-size: .9rem;
}

.yn-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.yn-card {
  display: flex;
  flex-direction: column;
  align-items:  center;
  gap: .4rem;
}

.yn-card-img-wrap {
  width: 80px;
}

.yn-card-img {
  display: block;
  border-radius: 6px;
  width: 80px;
}

.yn-card-img.is-reversed {
  transform: rotate(180deg);
}

.yn-card-name {
  text-align: center;
  color: var(--text-muted);
  max-width: 80px;
  font-size: .78rem;
}

.yn-verdict-pill {
  text-transform: uppercase;
  letter-spacing: .06em;
  border-radius: 999px;
  padding: .15rem .5rem;
  font-size: .7rem;
  font-weight: 600;
}

.yn-verdict-pill--yes {
  color: #7de09a;
  background: #64c87826;
}

.yn-verdict-pill--no {
  color: var(--danger);
  background: #ff646426;
}

.yn-verdict-pill--maybe {
  color: #d4c06a;
  background: #c8b46426;
}

.yn-verdict {
  margin-bottom: .5rem;
  font-family: Outfit, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Noto Sans, Ubuntu, Cantarell, Helvetica Neue, sans-serif;
  font-size: 2rem;
  font-weight: 600;
}

.yn-verdict--yes {
  color: #7de09a;
}

.yn-verdict--no {
  color: var(--danger);
}

.yn-verdict--maybe {
  color: #d4c06a;
}

.yn-reason {
  color: var(--text-muted);
  margin: 0;
  font-size: .9rem;
}

.yn-history {
  margin-top: 2rem;
}

.yn-history-title {
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 .75rem;
  font-family: Outfit, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Noto Sans, Ubuntu, Cantarell, Helvetica Neue, sans-serif;
  font-size: .82rem;
  font-weight: 600;
}

.yn-history-list {
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.yn-history-row {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .5rem;
  padding: .45rem .75rem;
  font-size: .82rem;
}

.yn-history-date {
  color: var(--text-muted);
  white-space: nowrap;
}

.yn-history-cards {
  color: var(--text);
  flex: 1;
}

.yn-history-question {
  color: var(--text-muted);
  width: 100%;
  font-style: italic;
}

.btn {
  display: inline-flex;
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  background: #eff1f31a;
  border-radius: 8px;
  align-items:  center;
  padding: .4rem .75rem;
  transition: background .15s;
  font-size: .85rem;
}

.btn:hover {
  background: #eff1f329;
}

.btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #0d0c14;
  font-weight: 600;
}

.btn--primary:hover {
  background: #b094e0;
  border-color: #b094e0;
}

.btn--danger {
  color: var(--danger);
}

.btn--danger:hover {
  background: #ff8b8b1f;
  border-color: #ff8b8b4d;
}

.btn:disabled, .btn[disabled] {
  opacity: .5;
  cursor: not-allowed;
  pointer-events: none;
}

.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items:  center;
  gap: .75rem;
  margin-bottom: 1.5rem;
}

.page-header .page-title {
  flex: 1;
  min-width: 0;
  margin: 0;
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.profiles-list {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.profile-row {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  border-radius: 12px;
  align-items:  center;
  gap: .75rem;
  padding: .75rem 1rem;
  transition: background .15s, border-color .15s;
}

.profile-row:hover {
  background: #eff1f317;
  border-color: #eff1f32e;
}

.profile-row-info {
  flex: 1;
  min-width: 0;
}

.profile-row-name {
  display: flex;
  align-items:  center;
  gap: .4rem;
  font-family: Outfit, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Noto Sans, Ubuntu, Cantarell, Helvetica Neue, sans-serif;
  font-size: .95rem;
  font-weight: 600;
}

.profile-row-meta {
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: .15rem;
  font-size: .8rem;
}

.profile-badge {
  background: var(--accent);
  color: #0d0c14;
  text-transform: uppercase;
  letter-spacing: .06em;
  border-radius: 4px;
  flex-shrink: 0;
  padding: .1rem .35rem;
  font-size: .68rem;
  font-weight: 700;
}

.profile-row-chevron {
  color: var(--text-muted);
  flex-shrink: 0;
  font-size: 1rem;
  line-height: 1;
}

.profile-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: .75rem;
  padding: 1rem;
}

.profile-section-title {
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--text-muted);
  margin: 0 0 .75rem;
  font-family: Outfit, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Noto Sans, Ubuntu, Cantarell, Helvetica Neue, sans-serif;
  font-size: .75rem;
  font-weight: 600;
}

.profile-field-grid {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: .35rem 1rem;
  font-size: .9rem;
}

.profile-field-label {
  color: var(--text-muted);
}

.chart-summary-line {
  color: var(--accent);
  margin: 0 0 1rem;
  font-size: .9rem;
}

.chart-big-three {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 1rem;
}

.chart-placement-pill {
  background: #9b7fd41f;
  border: 1px solid #9b7fd44d;
  border-radius: 8px;
  padding: .35rem .7rem;
}

.chart-placement-pill-label {
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-muted);
  display: block;
  margin-bottom: .1rem;
  font-size: .68rem;
}

.chart-placement-pill-value {
  font-family: Outfit, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Noto Sans, Ubuntu, Cantarell, Helvetica Neue, sans-serif;
  font-size: .9rem;
  font-weight: 600;
}

.planet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: .4rem;
  margin-bottom: 1rem;
}

.planet-cell {
  border: 1px solid var(--border);
  background: #eff1f308;
  border-radius: 8px;
  padding: .4rem .6rem;
}

.planet-cell-name {
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
  font-size: .72rem;
}

.planet-cell-sign {
  font-family: Outfit, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Noto Sans, Ubuntu, Cantarell, Helvetica Neue, sans-serif;
  font-size: .88rem;
  font-weight: 600;
}

.planet-cell-detail {
  color: var(--text-muted);
  font-size: .75rem;
}

.chart-section-label {
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-muted);
  margin: .75rem 0 .4rem;
  font-size: .72rem;
}

.houses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: .3rem;
}

.house-cell {
  display: flex;
  gap: .4rem;
  font-size: .82rem;
}

.house-cell-num {
  color: var(--text-muted);
  min-width: 2rem;
}

.numerology-tarot {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: .5rem;
  margin-bottom: .75rem;
}

.numerology-card {
  background: #9b7fd41a;
  border: 1px solid #9b7fd440;
  border-radius: 10px;
  padding: .6rem .75rem;
}

.numerology-card-label {
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-muted);
  margin-bottom: .2rem;
  font-size: .68rem;
}

.numerology-card-value {
  font-family: Outfit, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Noto Sans, Ubuntu, Cantarell, Helvetica Neue, sans-serif;
  font-size: 1rem;
  font-weight: 600;
}

.numerology-card-sub {
  color: var(--text-muted);
  margin-top: .1rem;
  font-size: .75rem;
}

.numerology-core {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: .4rem;
}

.numerology-num {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .4rem .6rem;
}

.numerology-num-label {
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
  font-size: .68rem;
}

.numerology-num-value {
  font-family: Outfit, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Noto Sans, Ubuntu, Cantarell, Helvetica Neue, sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
}

.city-autocomplete {
  position: relative;
}

.city-dropdown {
  position: absolute;
  border: 1px solid var(--border);
  overflow: hidden;
  z-index: 100;
  background: #1c1a28;
  border-radius: 8px;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  box-shadow: 0 4px 16px #0006;
}

.city-option {
  display: block;
  text-align: left;
  border: none;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  background: none;
  width: 100%;
  padding: .5rem .75rem;
  transition: background .1s;
  font-size: .85rem;
}

.city-option:last-child {
  border-bottom: none;
}

.city-option:hover {
  background: var(--surface);
}

.profile-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 560px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: .3rem;
}

.form-label {
  color: var(--text-muted);
  font-size: .82rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
}

@media (width <= 480px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.form-error {
  color: var(--danger);
  margin: 0;
  font-size: .85rem;
}

.form-actions {
  display: flex;
  align-items:  center;
  gap: .5rem;
}

.confirm-overlay {
  position: fixed;
  display: flex;
  z-index: 200;
  background: #0009;
  justify-content: center;
  align-items:  center;
  padding: 1.5rem;
  inset: 0;
}

.confirm-box {
  border: 1px solid var(--border);
  background: #1c1a28;
  border-radius: 16px;
  width: 100%;
  max-width: 360px;
  padding: 1.5rem;
}

.confirm-title {
  margin: 0 0 .5rem;
  font-family: Outfit, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Noto Sans, Ubuntu, Cantarell, Helvetica Neue, sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
}

.confirm-body {
  color: var(--text-muted);
  margin: 0 0 1.25rem;
  font-size: .9rem;
  line-height: 1.6;
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: .5rem;
}
