.dream-page {
  min-height: 100svh;
  color: #e8edf3;
  font: 15px/1.6 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(ellipse at 50% 0, #071725 0, #000 56%);
}
.dream-workspace { width: min(880px, 100%); margin: 0 auto; padding: 0 32px; }
.dream-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 112px; }
.dream-brand { color: #f6f8fb; font: 900 17px/1.4 Orbitron, sans-serif; letter-spacing: .14em; text-decoration: none; }
.dream-brand span { color: var(--dream-accent); }
.dream-header__link, .dream-footer a { color: #8b9bad; text-decoration: none; }
.dream-header__link { font-size: 13px; }
.dream-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px 20px; }
.dream-nav form { margin: 0; }
.dream-logout { padding: 0; border: 0; background: none; font-family: inherit; line-height: inherit; cursor: pointer; }
.dream-header__link:hover, .dream-footer a:hover { color: #e8edf3; }
.dream-intro { padding: 48px 0 30px; max-width: 650px; }
.dream-eyebrow { margin: 0 0 14px; color: #64b5dc; font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.dream-intro h1 { margin: 0 0 18px; font-size: clamp(29px, 5vw, 44px); line-height: 1.2; letter-spacing: -.035em; font-weight: 600; }
.dream-form { padding: 26px; border: 1px solid #1b2a36; border-radius: 16px; background: #080e14d9; }
.dream-field-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.dream-field-heading label { font-size: 13px; font-weight: 600; }
.dream-counter { flex-shrink: 0; color: #7f91a4; font-size: 11px; font-variant-numeric: tabular-nums; }
.dream-form textarea { display: block; width: 100%; min-height: 210px; padding: 16px; border: 1px solid #263544; border-radius: 9px; background: #020609; color: #e8edf3; resize: vertical; font: inherit; }
.dream-form textarea::placeholder { color: #627489; }
.dream-form textarea:focus { outline: 2px solid #0ea5e973; outline-offset: 2px; border-color: var(--dream-accent); }
.dream-form textarea[readonly] { background: #080e14; color: #c3d0dc; resize: vertical; }
.dream-form-footer a.dream-submit { text-decoration: none; }
.dream-form textarea[aria-invalid="true"] { border-color: #dc7d79; }
.dream-form > .legal-check { margin-top: 18px; }
.dream-style-picker { min-width: 0; margin: 24px 0 0; padding: 0; border: 0; }
.dream-style-picker legend { padding: 0; font-size: 13px; font-weight: 600; }
.dream-style-help, .dream-style-count { margin: 6px 0 12px; color: #8b9bad; font-size: 12px; }
.dream-style-count { margin: 10px 0 0; font-variant-numeric: tabular-nums; }
.dream-avatar-warning { margin: 10px 0 0; padding: 11px 13px; border: 1px solid #6a522d; border-radius: 8px; background: #302718; color: #f0ce90; font-size: 13px; line-height: 1.5; }
.dream-avatar-price { flex-shrink: 0; margin-left: auto; color: #f0ce90; font-size: 13px; font-weight: 650; }
.dream-crystal-cost { margin-top: 12px; padding: 12px 13px; border: 1px solid #24465b; border-radius: 8px; background: #0b1d2a; color: #bde5f7; font-size: 13px; line-height: 1.6; }
.dream-style-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.dream-style-choice { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 10px 12px; border: 1px solid #263544; border-radius: 8px; color: #b3c1cf; font-size: 13px; cursor: pointer; }
.dream-style-choice input { flex-shrink: 0; width: 16px; height: 16px; margin: 0; accent-color: #38bdf8; }
.dream-style-choice:has(input:checked) { border-color: #3188ac; background: #0c2737; color: #e8edf3; }
.dream-style-choice:has(input:disabled:not(:checked)) { opacity: .45; cursor: default; }
.dream-style-choice:has(input:focus-visible) { outline: 2px solid var(--dream-accent); outline-offset: 2px; }
.dream-style-picker:disabled .dream-style-choice { cursor: default; }
.dream-form-footer { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 16px; margin-top: 20px; }
.dream-submit { display: inline-flex; align-items: center; justify-content: center; gap: 20px; flex-shrink: 0; min-height: 44px; padding: 11px 20px; border: 1px solid #4ec0ed; border-radius: 8px; background: #0ea5e9; color: #00121e; font: 650 14px/1.4 system-ui, sans-serif; cursor: pointer; transition: background .15s; }
.dream-submit:hover { background: #38bdf8; }
.dream-submit:disabled { cursor: wait; opacity: .65; }
.dream-page a:focus-visible, .dream-page button:focus-visible, .dream-page summary:focus-visible { outline: 2px solid var(--dream-accent); outline-offset: 5px; }
.dream-error { color: #ffb5aa; font-size: 13px; }
.dream-error .errorlist { padding-left: 18px; margin-bottom: 0; }
.dream-service-error { padding: 16px 20px; border: 1px solid #6e3737; border-radius: 10px; background: #2c141466; }
.dream-notice, .dream-progress { color: #b3c1cf; font-size: 13px; }
.dream-results { margin-top: 44px; }
.dream-results-heading { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px 20px; }
.dream-results-heading h2 { margin: 0; font-size: 23px; font-weight: 600; letter-spacing: -.025em; }
.dream-results-heading h2 span, .dream-other-results summary span { color: #8b9bad; font-size: 13px; margin-left: 8px; }
.dream-results-heading p { margin: 0; color: #8b9bad; font-size: 12px; }
.dream-metric-help { margin: 14px 0 22px; color: #8b9bad; font-size: 12px; }
.dream-metric-help code { font-size: 11px; }
.dream-match-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.dream-match { min-width: 0; padding: 20px; border: 1px solid #20303d; border-radius: 12px; background: #0a1016; overflow-wrap: anywhere; }
.dream-match-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.dream-match-title h3 { margin: 0; font-size: 17px; line-height: 1.4; font-weight: 600; }
.dream-match-title > span { flex-shrink: 0; color: #68bcd4; font-size: 10px; }
.dream-match-path { margin: 6px 0 0; color: #7997af; font-size: 11px; }
.dream-match-description { margin: 12px 0 18px; color: #8b9bad; font-size: 12px; }
.dream-match-metrics { display: grid; gap: 5px; margin: 18px 0 12px; font-size: 11px; }
.dream-match-metrics > div { display: flex; justify-content: space-between; gap: 12px; }
.dream-match-metrics dt { color: #8b9bad; }
.dream-match-metrics dd { margin: 0; font-variant-numeric: tabular-nums; color: #e8edf3; }
.dream-probability { display: block; width: 100%; height: 5px; border: 0; border-radius: 4px; background: #20303d; }
.dream-probability::-webkit-meter-bar { height: 5px; border: 0; border-radius: 4px; background: #20303d; }
.dream-probability::-webkit-meter-optimum-value { border-radius: 4px; background: #0ea5e9; }
.dream-probability::-moz-meter-bar { border-radius: 4px; background: #0ea5e9; }
.dream-other-results { margin-top: 26px; }
.dream-other-results summary { padding: 12px 0; color: #b7c5d3; cursor: pointer; font-size: 13px; }
.dream-match--absent { background: #080b0f; border-color: #1b242d; }
.dream-match--absent .dream-match-title > span { color: #8b9bad; }
.dream-empty { padding: 24px; border: 1px dashed #263544; border-radius: 12px; }
.dream-empty h3 { margin: 0 0 8px; font-size: 16px; }
.dream-empty p, .dream-model { color: #8b9bad; font-size: 12px; margin: 0; }
.dream-model { margin-top: 24px; }
.dream-interpretation { margin-top: 36px; padding: 26px; border: 1px solid #263b4c; border-radius: 14px; background: #08121a; }
.dream-interpretation-status { color: #8b9bad; font-size: 12px; margin: 16px 0 0; }
.dream-interpretation-status[data-error="true"] { color: #ffb5aa; }
.dream-interpretation-text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.85; }
.dream-interpretation-text:not(:empty) { margin-top: 20px; }
.dream-footer { display: flex; justify-content: space-between; gap: 20px; padding: 40px 0 28px; color: #536477; font-size: 11px; }
.dream-history-list { display: grid; gap: 16px; }
.dream-history-card, .dream-saved-description { padding: 24px; border: 1px solid #20303d; border-radius: 12px; background: #0a1016; overflow-wrap: anywhere; }
.dream-history-card h2, .dream-saved-description h2, .dream-interpretation > h2 { margin: 0; font-size: 20px; font-weight: 600; }
.dream-history-card h2 a { color: #e8edf3; text-decoration: none; }
.dream-history-card h2 a:hover { color: #64b5dc; }
.dream-history-date, .dream-history-status, .dream-pagination { color: #8b9bad; font-size: 12px; }
.dream-history-date { margin: 0 0 10px; }
.dream-history-preview { color: #b3c1cf; font-size: 14px; }
.dream-history-status { margin: 16px 0 0; }
.dream-pagination { display: flex; justify-content: center; gap: 24px; margin-top: 28px; }
.dream-history-action { margin-top: 28px; }
.dream-history-action a { text-decoration: none; }
.dream-delete-form { margin-top: 36px; padding-top: 24px; border-top: 1px solid #20303d; }
.dream-delete-form p { margin: 0 0 12px; color: #8b9bad; font-size: 12px; line-height: 1.6; }
.dream-delete-button { padding: 11px 16px; border: 1px solid #70413f; border-radius: 8px; background: #241416; color: #f0aaa4; font: inherit; font-size: 13px; cursor: pointer; }
.dream-delete-button:hover { background: #371c20; border-color: #ad6660; }
.dream-delete-button:focus-visible { outline: 2px solid #f0aaa4; outline-offset: 3px; }
.dream-saved-text { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 16px; }
[hidden] { display: none !important; }
@media (max-width: 600px) {
  .dream-workspace { padding: 0 20px; }
  .dream-header { min-height: 84px; gap: 12px; }
  .dream-brand { font-size: 13px; }
  .dream-header__link { font-size: 11px; }
  .dream-intro { padding-top: 30px; }
  .dream-form { padding: 18px; }
  .dream-form textarea { min-height: 240px; font-size: 16px; }
  .dream-style-options { grid-template-columns: minmax(0, 1fr); }
  .dream-form-footer { flex-direction: column; align-items: stretch; gap: 16px; }
  .dream-submit { width: 100%; }
  .dream-match-list { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { .dream-submit { transition: none; } }

.dream-privacy-option { display: grid; grid-column: 1; gap: 10px; }
.dream-privacy-option label { display: inline-flex; align-items: flex-start; gap: 8px; font-size: 14px; cursor: pointer; }
.dream-privacy-option input { flex: 0 0 17px; width: 17px; height: 17px; margin: 2px 0 0; accent-color: #0ea5e9; }
.dream-form-footer .dream-submit { grid-column: 2; grid-row: 1; justify-self: end; align-self: end; }
@media (max-width: 600px) {
  .dream-form-footer { grid-template-columns: minmax(0, 1fr); }
  .dream-privacy-option label { grid-column: 1; grid-row: auto; }
  .dream-form-footer .dream-submit { grid-column: 1; grid-row: auto; justify-self: stretch; }
}

.dream-review-limit { display: flex; align-items: center; gap: 12px; margin-top: 12px; color: #aabccc; font-size: 13px; }
.dream-review-limit select { min-width: 64px; padding: 6px 10px; border: 1px solid #344657; border-radius: 6px; background: #0b1722; color: #dbe8f2; font: inherit; }
.dream-review-limit select:disabled { opacity: .4; }
