:root {
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  background: #0d0f12;
  color: #f4f0e6;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
}

a {
  color: inherit;
}

.app-shell {
  min-height: 100vh;
  padding: 0 22px 80px;
}

.topbar {
  width: min(680px, 100%);
  margin: 0 auto;
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid #2a2e35;
}

.home-link {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid #3c424d;
  border-radius: 10px;
  text-decoration: none;
  font-size: 16px;
  flex: 0 0 auto;
}

.brand {
  flex: 1 1 auto;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .06em;
}

.session-count {
  margin: 10px 0 0;
  color: #8f98a6;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .06em;
}

#app {
  width: min(680px, 100%);
  margin: 0 auto;
}

.screen {
  display: none;
  padding-top: 40px;
}

.screen.active {
  display: block;
}

.kicker {
  margin: 0 0 10px;
  color: #ffb454;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .16em;
}

h1 {
  margin: 0;
  color: #f4f0e6;
  font-size: clamp(32px, 8vw, 56px);
  line-height: 1.08;
  letter-spacing: -.04em;
  font-weight: 950;
}

.lead {
  max-width: 620px;
  margin: 22px 0 0;
  color: #b9c0ca;
  font-size: 16px;
  line-height: 1.8;
}

.lead strong {
  color: #f4f0e6;
}

.axis-legend {
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.axis-legend-item {
  border: 1px solid #323741;
  padding: 12px 10px;
  text-align: center;
}

.axis-legend-item span {
  display: block;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .1em;
  color: #8f98a6;
}

.axis-legend-item strong {
  display: block;
  margin-top: 4px;
  font-size: 13px;
}

.self-rate-block {
  margin-top: 28px;
  border: 1px solid #323741;
  padding: 20px;
  background: #14171b;
}

.self-rate-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #c6ccd5;
  font-size: 14px;
  line-height: 1.5;
  font-weight: 800;
}

.self-rate-head strong {
  color: #ffb454;
  font-size: 28px;
  line-height: 1;
}

.range {
  width: 100%;
  margin: 18px 0 8px;
  accent-color: #ffb454;
}

.range-labels {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #7f8996;
  font-size: 12px;
  font-weight: 800;
}

.primary-button {
  width: 100%;
  min-height: 60px;
  margin-top: 24px;
  border: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffb454;
  color: #14100a;
  padding: 0 20px;
  font: inherit;
  font-size: 16px;
  font-weight: 950;
  -webkit-tap-highlight-color: transparent;
}

.primary-button span {
  font-size: 22px;
}

.secondary-button {
  width: 100%;
  min-height: 54px;
  margin-top: 12px;
  border: 1px solid #3c424d;
  background: transparent;
  color: #dfe3e8;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 850;
  -webkit-tap-highlight-color: transparent;
}

.swipe-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.progress-label {
  color: #ffb454;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .12em;
}

.progress-count {
  color: #818b98;
  font-size: 12px;
  font-weight: 800;
}

.progress-bar {
  height: 4px;
  background: #232830;
  margin-bottom: 24px;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: #ffb454;
  transition: width .25s ease;
}

.deck {
  position: relative;
}

.card {
  position: relative;
  min-height: 220px;
  background: #f2ecde;
  color: #17191c;
  border: 1px solid #d1c9b9;
  padding: 24px;
  box-shadow: 8px 8px 0 #252930;
  touch-action: pan-y;
  cursor: grab;
  user-select: none;
  will-change: transform;
  transition: transform .2s ease;
}

.card:active {
  cursor: grabbing;
}

.card-axis {
  color: #7b7469;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .14em;
}

.card-scene {
  margin: 16px 0 0;
  font-size: clamp(16px, 3.6vw, 19px);
  line-height: 1.7;
  font-weight: 750;
}

.card-ask {
  margin: 18px 0 0;
  padding: 14px 16px;
  background: #181a1d;
  color: #fff4ec;
  border-left: 5px solid #ffb454;
  font-size: clamp(16px, 3.6vw, 20px);
  line-height: 1.5;
  font-weight: 900;
}

.card-hint {
  position: absolute;
  top: 20px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .08em;
  border: 2px solid currentColor;
  transform: rotate(-8deg);
  opacity: 0;
  transition: opacity .1s linear;
  pointer-events: none;
}

.card-hint-accept {
  right: 20px;
  color: #2f8f5b;
}

.card-hint-decline {
  left: 20px;
  color: #c54d3b;
}

.choice-row {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.choice-button {
  min-height: 56px;
  border: 1px solid #353b45;
  background: #15181d;
  color: #dfe3e8;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 900;
  -webkit-tap-highlight-color: transparent;
}

.choice-decline {
  border-color: #5a2b27;
  color: #ff9d8f;
}

.choice-accept {
  border-color: #2b4a34;
  color: #a9e6bf;
}

.choice-button:disabled {
  opacity: .4;
  cursor: default;
}

.insight {
  margin-top: 16px;
  padding: 14px 16px;
  border-left: 4px solid #5fd8ff;
  background: #151b20;
  color: #cbd3dc;
  font-size: 14px;
  line-height: 1.7;
  font-weight: 700;
}

.next-button {
  width: 100%;
  min-height: 56px;
  margin-top: 14px;
  border: 0;
  background: #f2ecde;
  color: #14171b;
  cursor: pointer;
  font: inherit;
  font-size: 15px;
  font-weight: 900;
  -webkit-tap-highlight-color: transparent;
}

h2 {
  margin: 0;
  font-size: clamp(28px, 6vw, 42px);
  line-height: 1.1;
  letter-spacing: -.03em;
  font-weight: 950;
}

.type-card {
  margin-top: 24px;
  padding: 24px;
  background: #f2ecde;
  color: #17191c;
  box-shadow: 8px 8px 0 #252930;
}

.type-card span {
  color: #7b7469;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .14em;
}

.type-card h3 {
  margin: 10px 0 0;
  font-size: clamp(22px, 5vw, 32px);
  line-height: 1.2;
  letter-spacing: -.02em;
  font-weight: 950;
}

.type-card p {
  margin: 12px 0 0;
  font-size: 15px;
  line-height: 1.8;
  font-weight: 700;
}

.axis-bars {
  margin-top: 22px;
  display: grid;
  gap: 12px;
}

.axis-bar-row {
  display: grid;
  grid-template-columns: 56px 1fr 40px;
  align-items: center;
  gap: 10px;
}

.axis-bar-label {
  color: #c6ccd5;
  font-size: 13px;
  font-weight: 850;
}

.axis-bar-track {
  height: 14px;
  background: #1c2027;
  border: 1px solid #323741;
  overflow: hidden;
}

.axis-bar-fill {
  height: 100%;
}

.axis-bar-value {
  text-align: right;
  color: #8f98a6;
  font-size: 12px;
  font-weight: 850;
}

.axis-note {
  margin-top: 12px;
  color: #98a2af;
  font-size: 12.5px;
  line-height: 1.7;
}

.gap-box {
  margin-top: 16px;
  padding: 16px 18px;
  border: 1px solid #323741;
  color: #b9c0ca;
  font-size: 13.5px;
  line-height: 1.75;
}

.compare-box {
  margin-top: 14px;
  padding: 16px 18px;
  border: 1px solid #2b4a34;
  background: #101a14;
  color: #cfe9d8;
  font-size: 13.5px;
  line-height: 1.75;
}

.rule-box {
  margin-top: 20px;
  padding: 20px;
  background: #14171b;
  border: 1px solid #323741;
}

.rule-box span {
  color: #ffb454;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .14em;
}

.rule-box p {
  margin: 10px 0 0;
  font-size: 15px;
  line-height: 1.8;
  font-weight: 720;
  color: #e6e9ed;
}

.share-button {
  width: 100%;
  min-height: 60px;
  margin-top: 24px;
  border: 0;
  cursor: pointer;
  background: #ffb454;
  color: #14100a;
  font: inherit;
  font-size: 16px;
  font-weight: 950;
  -webkit-tap-highlight-color: transparent;
}

.share-button:disabled {
  opacity: .55;
  cursor: default;
}

.share-feedback {
  margin-top: 10px;
  color: #8f98a6;
  font-size: 12.5px;
  line-height: 1.6;
  min-height: 1em;
}

.share-preview {
  width: 100%;
  margin-top: 14px;
  display: block;
  border: 1px solid #323741;
}

.weak-block {
  margin-top: 28px;
  padding: 18px;
  border: 1px dashed #3c424d;
}

.weak-block p {
  margin: 0 0 12px;
  color: #b9c0ca;
  font-size: 13.5px;
  line-height: 1.7;
}

.result-actions {
  margin-top: 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.result-actions button {
  min-height: 50px;
  display: grid;
  place-items: center;
  background: #15181d;
  color: #cfd5dc;
  border: 1px solid #353b45;
  cursor: pointer;
  font: inherit;
  font-size: 12.5px;
  font-weight: 850;
  -webkit-tap-highlight-color: transparent;
}

.mini-result {
  margin-top: 16px;
  padding: 16px 18px;
  border: 1px solid #323741;
  background: #14171b;
}

.mini-result span {
  color: #5fd8ff;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .14em;
}

.mini-result p {
  margin: 8px 0 0;
  color: #dfe3e8;
  font-size: 14px;
  line-height: 1.7;
}

@media (max-width: 640px) {
  .app-shell {
    padding: 0 14px 60px;
  }

  .screen {
    padding-top: 30px;
  }

  .card, .type-card {
    padding: 18px;
    box-shadow: 5px 5px 0 #252930;
  }

  .choice-row {
    grid-template-columns: 1fr;
  }

  .result-actions {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .card, .progress-bar-fill {
    transition: none;
  }
}
