/* 算了喵 - 竖屏简约线条可爱风 + 玄学猫元素 */

:root {
  --bg: #faf6f0;
  --surface: #ffffff;
  --surface-hover: #fef9f3;
  --border: #e8dccf;
  --border-active: #d4c4ab;
  --accent: #e8917e;
  --accent-soft: #fbe5df;
  --gold: #c4a882;
  --gold-light: #efe3d5;
  --text: #3d3226;
  --text-secondary: #8c7b6b;
  --text-muted: #b8a898;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 2px 12px rgba(61, 50, 38, 0.06);
  --shadow-hover: 0 4px 20px rgba(61, 50, 38, 0.10);
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  font-size: 16px;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font);
  background: #f0ebe0;
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  justify-content: center;
}

.app-container {
  width: 100%;
  max-width: 360px;
  min-height: 100dvh;
  background: var(--bg);
  background-image: url('../img/bg.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  overflow-x: hidden;
  margin: 0 auto;
}
.app-container::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(250, 246, 240, 0.82);
  z-index: 0;
  pointer-events: none;
}
.app-container > * {
  position: relative;
  z-index: 1;
}

@media (min-width: 400px) {
  .app-container {
    margin: 16px auto;
    border-radius: 12px;
    box-shadow: 0 0 40px rgba(61, 50, 38, 0.12);
  }
}

/* ===== Pages ===== */
.page {
  display: none;
  padding: 20px 16px 32px;
  min-height: 100%;
  animation: fadeIn 0.3s ease;
}
.page.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== Home Header ===== */
.home-header {
  text-align: center;
  padding: 32px 0 16px;
}
.home-header .hero-cat {
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
}
.cat-head-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 4px;
}
.cat-head-img {
  width: 90px;
  height: auto;
}
.app-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 4px;
}
.app-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
  letter-spacing: 2px;
}
.decoration-line {
  width: 50px;
  height: 1.5px;
  background: var(--gold);
  margin: 12px auto;
  position: relative;
}
.decoration-line::before,
.decoration-line::after {
  content: '◆';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 7px;
  color: var(--gold);
}
.decoration-line::before { left: -18px; }
.decoration-line::after { right: -18px; }

/* ===== Feature Cards ===== */
.feature-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 0 4px;
}
.feature-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  white-space: nowrap;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  font-family: var(--font);
  color: var(--text);
  position: relative;
  overflow: hidden;
}
.feature-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-hover);
  transform: translateY(-1px);
}
.feature-card:active {
  transform: scale(0.98);
  background: var(--surface-hover);
}
.fc-icon {
  font-size: 32px;
  flex-shrink: 0;
}
.fc-name {
  font-size: 18px;
  font-weight: 600;
  flex-shrink: 0;
  width: 75px;
}
.fc-desc {
  font-size: 13px;
  color: var(--text-secondary);
  flex: 1;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fc-arrow {
  font-size: 18px;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* ===== Home Footer ===== */
.home-footer {
  text-align: center;
  padding: 8px 20px 2px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.8;
}
.footer-paws {
  margin-top: 8px;
  letter-spacing: 8px;
}
.footer-paws img {
  width: 11px;
  height: 11px;
  vertical-align: 10px;
}

/* ===== Page Headers ===== */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.page-header h2 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 2px;
}
.page-intro {
  font-size: 14px;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 20px;
}
.header-spacer { width: 36px; }

/* ===== Buttons ===== */
.btn-primary {
  display: block;
  width: 100%;
  padding: 14px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  letter-spacing: 2px;
  transition: all 0.2s;
  margin-top: 16px;
}
.btn-primary:hover { background: #e07d6a; }
.btn-primary:active {
  transform: scale(0.97);
  background: #d4705d;
}
.btn-secondary {
  display: block;
  width: 100%;
  padding: 12px;
  background: var(--surface);
  color: var(--accent);
  border: 1.5px solid var(--accent-soft);
  border-radius: var(--radius);
  font-size: 15px;
  cursor: pointer;
  font-family: var(--font);
  margin-top: 12px;
  transition: all 0.2s;
}
.btn-secondary:hover { background: var(--surface-hover); }
.btn-share {
  display: block;
  width: 100%;
  padding: 12px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 15px;
  cursor: pointer;
  font-family: var(--font);
  margin-top: 16px;
  transition: all 0.2s;
  font-weight: 600;
}
.btn-share:active { transform: scale(0.97); opacity: 0.9; }
.share-modal-btn.copy:hover { background: #ede6db; }
.share-modal-btn.download:hover { opacity: 0.9; }
.share-modal-btn:active { transform: scale(0.97); }
.btn-back {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 15px;
  cursor: pointer;
  padding: 6px 10px;
  font-family: var(--font);
  border-radius: 8px;
  transition: all 0.2s;
}
.btn-back:hover { background: var(--gold-light); }

/* ===== Chat Interface ===== */
.chat-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 8px;
}
.chat-msg {
  display: flex;
  gap: 8px;
  max-width: 92%;
}
.chat-msg.bot { align-self: flex-start; }
.chat-msg.user { align-self: flex-end; flex-direction: row-reverse; }
.chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  overflow: hidden;
}
.chat-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.chat-bubble {
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 15px;
  line-height: 1.6;
  word-break: break-word;
}
.chat-msg.bot .chat-bubble {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top-left-radius: 4px;
  color: var(--text);
}
.chat-msg.user .chat-bubble {
  background: var(--accent-soft);
  border-top-right-radius: 4px;
  color: var(--text);
}
.chat-typing {
  display: flex;
  gap: 4px;
  padding: 10px 14px;
}
.chat-typing span {
  width: 6px; height: 6px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: chatDot 1.4s infinite;
}
.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes chatDot {
  0%, 60%, 100% { opacity: 0.3; transform: scale(1); }
  30% { opacity: 1; transform: scale(1.3); }
}

/* ===== Chat Input Area ===== */
.chat-input-area {
  padding: 10px 0 0;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}
.chat-input-row {
  display: flex;
  gap: 8px;
}
.chat-input-row input {
  flex: 1;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  font-size: 15px;
  font-family: var(--font);
  color: var(--text);
  background: var(--surface);
  outline: none;
}
.chat-input-row input:focus { border-color: var(--accent); }
.chat-send-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: white;
  font-size: 16px;
  cursor: pointer;
  flex-shrink: 0;
  font-family: var(--font);
}
.chat-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chat-choice-btn {
  padding: 10px 18px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  font-size: 14px;
  cursor: pointer;
  font-family: var(--font);
  color: var(--text);
  transition: all 0.2s;
}
.chat-choice-btn:hover { border-color: var(--accent); background: var(--surface-hover); }
.chat-choice-btn.selected { border-color: var(--accent); background: var(--accent-soft); }

/* Back button */
.chat-back-row {
  margin-top: 8px;
  text-align: center;
}
.chat-back-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  padding: 4px 10px;
  font-family: var(--font);
  letter-spacing: 1px;
  transition: color 0.2s;
}
.chat-back-btn:hover {
  color: var(--accent);
}

.chat-select-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.chat-select-group select {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  font-size: 15px;
  font-family: var(--font);
  color: var(--text);
  background: var(--surface);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='%238c7b6b'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.chat-select-group select:focus { outline: none; border-color: var(--accent); }
.chat-confirm-btn {
  padding: 10px 24px;
  border: none;
  border-radius: 20px;
  background: var(--accent);
  color: white;
  font-size: 15px;
  cursor: pointer;
  font-family: var(--font);
  align-self: flex-end;
}

/* ===== Loading ===== */
.loading-animation {
  text-align: center;
  padding: 60px 20px;
}
.cat-loader {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
}
.cat-paw {
  font-size: 24px;
  animation: pawBounce 0.8s infinite;
}
.cat-paw:nth-child(1) { animation-delay: 0s; }
.cat-paw:nth-child(2) { animation-delay: 0.15s; }
.cat-paw:nth-child(3) { animation-delay: 0.3s; }
@keyframes pawBounce {
  0%, 100% { transform: translateY(0) scale(1); }
  30% { transform: translateY(-12px) scale(1.1); }
  60% { transform: translateY(0) scale(0.95); }
}
.loading-animation p {
  font-size: 15px;
  color: var(--text-secondary);
}

/* ===== Bazi Result ===== */
.info-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.info-chip {
  display: inline-block;
  padding: 6px 12px;
  background: var(--gold-light);
  border-radius: 20px;
  font-size: 13px;
  color: var(--text);
  border: 1px solid var(--gold);
}
.info-chip-accent {
  background: #fff3e0;
  border-color: #ff9800;
  color: #e65100;
}
.info-chip-warn {
  background: #fce4ec;
  border-color: #e91e63;
  color: #c62828;
}
.section-title {
  font-size: 16px;
  font-weight: 600;
  margin: 16px 0 10px;
  padding-left: 10px;
  border-left: 3px solid var(--accent);
  letter-spacing: 1px;
}

/* ===== Bazi Table ===== */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 8px;
}
.bazi-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  font-size: 15px;
}
.bazi-table th,
.bazi-table td {
  padding: 10px 6px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.bazi-table th {
  background: var(--gold-light);
  font-weight: 600;
  font-size: 13px;
  color: var(--text-secondary);
  letter-spacing: 1px;
}
.bazi-table tr:last-child td { border-bottom: none; }
.stem-cell {
  font-weight: 700;
  color: var(--accent);
  font-size: 18px;
}

/* ===== Dayun ===== */
.dayun-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 0 8px;
  -webkit-overflow-scrolling: touch;
}
.dayun-chip {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  min-width: 72px;
}
.dayun-age {
  font-size: 11px;
  color: var(--text-muted);
}
.dayun-gz {
  font-size: 18px;
  font-weight: 600;
  margin-top: 2px;
}

/* ===== Analysis Box ===== */
.analysis-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--text);
  margin-top: 8px;
  margin-bottom: 12px;
}
.analysis-box h3 {
  font-size: 17px;
  color: var(--accent);
  margin: 12px 0 6px;
}
.analysis-box h4 {
  font-size: 15px;
  color: var(--text);
  margin: 8px 0 4px;
}
.analysis-box strong {
  color: var(--accent);
}
.streaming-cursor {
  animation: blink 1s step-end infinite;
  color: var(--accent);
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
.analysis-fallback {
  color: var(--text-secondary);
  font-size: 14px;
}

/* ===== Daily Fortune ===== */
.daily-hero {
  text-align: center;
  padding: 20px 0;
}
.daily-hero-img { width: 110px; height: auto; }
.daily-date {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 8px;
}

/* ===== Xiao Liu Ren ===== */
.xlr-palm-img-wrap {
  text-align: center;
  margin: 0 0 16px;
}
.xlr-palm-img {
  width: 160px;
  height: auto;
  border-radius: var(--radius-sm);
}
.xlr-result-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
}
.xlr-lunar-info {
  margin-bottom: 16px;
}
.lunar-label {
  font-size: 13px;
  color: var(--text-muted);
  display: block;
}
.lunar-value {
  font-size: 17px;
  font-weight: 600;
}
.xlr-position {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: 6px;
  margin: 16px 0;
  padding: 12px;
  border-radius: var(--radius-sm);
}
.xlr-ji {
  color: #5a8a4a;
  background: #eff8eb;
  border: 2px solid #b8d4a8;
}
.xlr-xiong {
  color: #c45656;
  background: #fdf2f2;
  border: 2px solid #f0c0c0;
}
.xlr-fortune {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
  font-style: italic;
}
.xlr-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 16px 0;
  padding: 12px;
  background: var(--bg);
  border-radius: var(--radius-sm);
}
.xlr-info-item {
  text-align: center;
}
.xlr-label {
  font-size: 12px;
  color: var(--text-muted);
  display: block;
}
.xlr-val {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
}
.xlr-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 12px;
  line-height: 1.7;
}
.xlr-meaning {
  font-size: 15px;
  font-weight: 600;
  margin-top: 16px;
  padding: 12px;
  background: var(--gold-light);
  border-radius: var(--radius-sm);
  line-height: 1.6;
}

/* ===== Utility ===== */
.xlr-detail { margin: 8px 0; }

/* ===== Responsive Adjustments ===== */
@media (max-width: 340px) {
  .feature-card { padding: 12px 14px; gap: 8px; }
  .fc-icon { font-size: 26px; }
  .fc-name { font-size: 15px; }
  .fc-desc { font-size: 11px; }
  .bazi-table { font-size: 13px; }
  .bazi-table th, .bazi-table td { padding: 6px 3px; }
  .xlr-position { font-size: 28px; }
}

/* ===== Feature Icon Images ===== */
.fc-icon img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}
.page-icon {
  width: 24px;
  height: 24px;
  vertical-align: middle;
  object-fit: contain;
  margin-right: 2px;
}
.btn-icon {
  width: 20px;
  height: 20px;
  vertical-align: middle;
  object-fit: contain;
  margin-right: 4px;
}
.cat-paw img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

/* ===== Disclaimer ===== */
.disclaimer {
  text-align: center;
  padding: 14px 12px;
  margin-top: 16px;
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.8;
  border: 1.5px dashed var(--accent);
}
.disclaimer .dis-emoji {
  font-size: 16px;
}

/* ===== Date-Time Picker ===== */
.datetime-picker {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 14px;
}
.dtp-scroll-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}
.dtp-scroll-row-2 {
  align-items: flex-end;
}
.dtp-field {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dtp-label {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  letter-spacing: 1px;
}
.dtp-select {
  width: 100%;
  padding: 8px 4px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  text-align: center;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%238c7b6b'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 4px center;
  padding-right: 18px;
  cursor: pointer;
}
.dtp-select:focus {
  border-color: var(--accent);
  outline: none;
}
.dtp-shichin-val {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  padding: 8px 4px;
  text-align: center;
  background: var(--accent-soft);
  border-radius: 10px;
  display: block;
}
.dtp-location-row {
  margin-bottom: 12px;
}
.dtp-location-input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  outline: none;
}
.dtp-location-input:focus {
  border-color: var(--accent);
}
.dtp-location-input::placeholder {
  color: var(--text-muted);
  font-size: 13px;
}
.dtp-confirm-btn {
  display: block;
  width: 100%;
  padding: 12px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 24px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  letter-spacing: 2px;
  transition: all 0.2s;
}
.dtp-confirm-btn:hover { background: #e07d6a; }
.dtp-confirm-btn:active { transform: scale(0.97); }

/* ===== Home Credits ===== */
.home-credits {
  text-align: center;
  padding: 7px 16px 28px;
  margin: -3px auto 0 auto;
  border-top: 1px solid rgba(196, 168, 130, 0.2);
}
.credits-block {
  display: inline-block;
  text-align: left;
}
.credits-line {
  font-size: 9px;
  color: #b8a898;
  line-height: 1.8;
  letter-spacing: 1px;
  display: flex;
}
.cr-label {
  display: inline-block;
  width: 120px;
  flex-shrink: 0;
}
.cr-name {
  display: inline-block;
}
.credits-contact {
  margin-top: 0px;
  padding-top: 0px;
}
.credits-contact a {
  color: #b8a898;
  text-decoration: none;
}
.credits-contact a:hover {
  color: var(--accent);
}

/* ===== Question Area ===== */
.question-area {
  margin-top: 8px;
  margin-bottom: 8px;
}
.question-hint {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  line-height: 1.6;
}
.question-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}
.q-sug-label {
  font-size: 12px;
  color: var(--text-muted);
  width: 100%;
  margin-bottom: 2px;
}
.q-sug-btn {
  padding: 6px 12px;
  border: 1px solid var(--gold);
  border-radius: 16px;
  background: var(--gold-light);
  font-size: 12px;
  color: var(--text);
  cursor: pointer;
  font-family: var(--font);
  transition: all 0.2s;
  white-space: nowrap;
}
.q-sug-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.q-sug-used {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}
.question-input-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}
.question-text-input {
  flex: 1;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  font-size: 14px;
  font-family: var(--font);
  color: var(--text);
  background: var(--surface);
  outline: none;
}
.question-text-input:focus { border-color: var(--accent); }
.question-text-input:disabled { background: var(--bg); color: var(--text-muted); }
.question-send-btn {
  padding: 10px 20px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 20px;
  font-size: 14px;
  cursor: pointer;
  font-family: var(--font);
  transition: all 0.2s;
  white-space: nowrap;
}
.question-send-btn:hover { background: #e07d6a; }
.question-send-btn:disabled { background: var(--text-muted); cursor: default; }
.question-counter {
  font-size: 12px;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 12px;
}
.question-answers {
  max-height: 400px;
  overflow-y: auto;
  margin-bottom: 12px;
}
.q-a-pair {
  margin-bottom: 12px;
  animation: fadeIn 0.3s ease;
}
.q-user {
  padding: 8px 14px;
  background: var(--accent-soft);
  border-radius: 12px 12px 4px 12px;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 6px;
  display: inline-block;
  max-width: 90%;
}
.q-answer {
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px 12px 12px 4px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
}
.q-loading {
  color: var(--text-muted);
  font-style: italic;
}
.q-answer strong { color: var(--accent); }
.question-share-prompt {
  text-align: center;
  padding: 16px;
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  border: 1.5px dashed var(--accent);
}
.question-share-prompt p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.question-share-note {
  font-size: 13px;
}

/* ===== 天选小猫模块 ===== */
.tianxuan-cat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 18px;
  text-align: center;
  margin-top: 8px;
  margin-bottom: 12px;
}
.tianxuan-cat-name {
  font-size: 30px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 14px;
  letter-spacing: 3px;
}
.tianxuan-cat-img-wrap {
  margin-bottom: 14px;
}
.tianxuan-cat-img {
  width: 170px;
  height: auto;
  border-radius: var(--radius-sm);
}
.tianxuan-cat-tags {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.tianxuan-cat-tag {
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--bg);
  padding: 4px 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
}
.tianxuan-cat-slogan {
  font-size: 14px;
  font-weight: 700;
  font-style: italic;
  color: var(--text);
  margin-bottom: 14px;
  line-height: 1.6;
  padding: 0 4px;
  text-align: center;
}
.tianxuan-cat-interpret {
  text-align: left;
  font-size: 12px;
  line-height: 1.8;
  color: var(--text);
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}
.tianxuan-cat-interpret p {
  margin: 0;
}

/* ===== Daily Source Indicator ===== */
.daily-source {
  text-align: center;
  padding: 8px 12px;
  border-radius: 20px;
  font-size: 12px;
  margin-bottom: 14px;
  letter-spacing: 0.5px;
}
#daily-source-tip {
  margin: 12px 16px 0;
}
.daily-source-bazi {
  background: #eff8eb;
  color: #5a8a4a;
  border: 1px solid #b8d4a8;
}
.daily-source-general {
  background: var(--gold-light);
  color: #8c7b6b;
  border: 1px solid var(--gold);
}
.daily-source-tip {
  font-size: 11px;
  color: var(--text-muted);
}

/* ===== Dayun Active Chip ===== */
.dayun-chip-active {
  border-color: var(--border) !important;
  background: var(--surface) !important;
}

/* ===== Footer credit link ===== */
.home-credits a {
  color: #b8a898;
  text-decoration: none;
}

/* ===== XLR Number Form ===== */
.xlr-number-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 4px 0;
}
.xlr-num-row {
  display: flex;
  gap: 8px;
}
.xlr-num-field {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.xlr-num-label {
  font-size: 11px;
  color: var(--text-secondary);
  text-align: center;
}
.xlr-num-input {
  width: 100%;
  padding: 10px 4px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 16px;
  font-family: var(--font);
  color: var(--text);
  background: var(--surface);
  text-align: center;
  outline: none;
  -moz-appearance: textfield;
}
.xlr-num-input::-webkit-inner-spin-button,
.xlr-num-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.xlr-num-input:focus { border-color: var(--accent); }
.xlr-num-submit {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 12px;
  background: var(--accent);
  color: white;
  font-size: 15px;
  font-family: var(--font);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.xlr-num-submit:hover { opacity: 0.9; }

/* ===== Pillar Explanation ===== */
.pillar-explain {
  margin: 14px 0;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.pillar-explain h4 {
  font-size: 13px;
  color: var(--accent);
  margin-bottom: 10px;
  text-align: center;
}
.pillar-explain-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.pillar-explain-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: var(--bg);
  border-radius: 8px;
}
.pe-pillar {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
}
.pe-desc {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.4;
}
.pillar-explain-inline {
  margin-top: 12px;
  margin-bottom: 0;
}

/* ===== Daily Sub Sections (明日喵招 / 本周喵招) ===== */
.daily-sub-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px dashed var(--border);
}
.daily-sub-section .daily-hero {
  padding: 10px 0;
}
.daily-sub-section .daily-hero-img {
  width: 80px;
}

/* ===== Bazi Post-Analysis Nav Links ===== */
.bazi-nav-links {
  text-align: center;
  margin-top: 18px;
}
.bazi-nav-links p {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.bazi-nav-links a {
  display: inline-block;
  padding: 8px 16px;
  background: #fff;
  border-radius: 20px;
  color: #3d3226;
  cursor: pointer;
  font-size: 14px;
  text-decoration: none;
  margin: 4px 6px;
  transition: all 0.2s;
  border: 1px solid var(--border);
}
.bazi-nav-links a:hover {
  border-color: var(--accent);
  background: #fef9f3;
}

/* Scrollbar styling */
::-webkit-scrollbar { height: 4px; width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
