/* v3: calmer hierarchy, readable controls, and compact wallet. */
:root { --text-muted: #78685e; --primary: #d95518; --primary-hover: #bd4410; --primary-deep: #a93a0c; }
button:focus-visible, [tabindex="0"]:focus-visible, a:focus-visible { outline: 3px solid #216bba; outline-offset: 4px; }
button:disabled { cursor: default; opacity: .65; }
button[aria-busy="true"] { opacity: .7; cursor: progress; }
button[aria-busy="true"]::after { content: ''; display: inline-block; width: 12px; height: 12px; margin-left: 6px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: busySpin .7s linear infinite; }
@keyframes busySpin { to { transform: rotate(360deg); } }
.has-modal { overflow: hidden; }
.mode-badge { font-size: 11px; padding: 5px 9px; background: #edf6ef; color: #25663b; border-color: #c9decf; flex-shrink: 0; cursor: default; }
.mode-badge.is-demo { color: #8d530b; background: #fff4dc; border-color: #eed7a9; }
.section-title { font-size: clamp(20px, 2vw, 26px); line-height: 1.35; letter-spacing: -.03em; }
.section-header-bar { align-items: flex-start; gap: 16px; margin-bottom: 6px; }
.section-subtitle-muted { font-size: 13px; line-height: 1.7; }
.bento-hero-card { box-shadow: none; padding: 14px 16px; }
.vault-bento-card { padding: 12px; box-shadow: none; gap: 8px; }
.vault-rule-tag { background: transparent; border: 0; font-size: 12px; min-height: 32px; padding: 4px 6px; }
.currency-tile { padding: 9px 7px; display: grid; grid-template-columns: 22px 1fr; column-gap: 5px; row-gap: 0; align-items: center; text-align: left; box-shadow: none; }
.currency-tile .tile-top { grid-row: 1 / 3; margin: 0; }
.currency-tile .currency-svg-icon { width: 22px; height: 22px; }
.currency-tile .tile-value { font-size: 20px; line-height: 1.25; }
.currency-tile .tile-name { font-size: 12px; font-weight: 600; }
.currency-tile .tile-sub, .currency-tile .tile-progress-track, .currency-tile .mint-ready-pill, .vault-Quick-btn { display: none; }
.wish-goal-card { display: flex; align-items: flex-start; gap: 12px; padding: 16px; border: 1px solid #e5d9c8; border-radius: var(--radius-lg); background: linear-gradient(145deg,#fffaf0,#fff); }
.goal-icon { font-size: 24px; flex: 0 0 auto; }
.wish-goal-card strong { display: block; font-size: 14px; line-height: 1.5; }
.mobile-wish-goal { display: none; }
.goal-content { flex: 1; min-width: 0; }
.goal-label { display: block; font-size: 11px; color: var(--text-secondary); margin-bottom: 4px; }
.goal-status { display: block; font-size: 12px; color: var(--text-secondary); margin-top: 5px; }
.goal-track { height: 5px; background: #eee5d9; border-radius: 10px; overflow: hidden; margin-top: 10px; }
.goal-track span { display: block; height: 100%; background: var(--primary); border-radius: inherit; }
.text-button { display: inline-flex; align-items: center; justify-content: center; color: var(--primary-deep); font-size: 12px; font-weight: 700; min-height: 36px; padding: 5px 0; }
.task-card { box-shadow: 0 2px 0 #e8ded2; align-items: center; padding: 17px; gap: 14px; }
.task-name { font-size: 16px; line-height: 1.6; }
.task-meta { font-size: 13px; line-height: 1.6; gap: 5px 8px; }
.checkin-btn { min-height: 44px; min-width: 88px; justify-content: center; }
.makeup-btn { min-height: 36px; font-size: 12px; padding: 4px 8px; }
.filter-pill { min-height: 40px; }
.empty-state .btn { margin-top: 16px; }
.load-error { padding: 18px; border: 1px solid #e8b9b0; border-radius: 16px; background: #fff4f0; }
.load-error p { margin: 6px 0 12px; font-size: 13px; }
.forge-hero-banner { box-shadow: none; background: #fff; color: var(--text-main); border-color: var(--border-light); padding: 8px 14px; flex-direction: row; flex-wrap: nowrap; align-items: center; gap: 12px; }
.forge-banner-info { flex: 1 1 0; min-width: 0; }
.forge-banner-actions { flex: 0 0 auto; align-self: center; }
.forge-banner-actions .btn { flex: 0 0 auto; white-space: nowrap; }
.forge-rate-pills { display: none; }
.forge-banner-desc { color: var(--text-secondary); line-height: 1.5; font-size: 14px; white-space: nowrap; overflow-x: auto; scrollbar-width: none; }
.forge-banner-desc::-webkit-scrollbar { display: none; }
.purchase-success { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 16px; border: 1px solid #a8d4b3; border-radius: 16px; background: #f0f9f2; }
.purchase-success strong { font-size: 14px; }
.purchase-success p { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }
.purchase-success .btn { flex-shrink: 0; }
.reward-card { cursor: default; padding: 16px 13px 8px; }
.reward-redeem { width: 100%; justify-content: center; min-height: 44px; margin-top: 5px; font-size: 13px; white-space: normal; }
.reward-redeem:disabled { background: var(--bg-subtle); color: var(--text-secondary); opacity: 1; box-shadow: none; }
.reward-desc-snippet { font-size: 12px; line-height: 1.6; min-height: 38px; }
.reward-tier-ribbon { font-size: 11px; }
.review-intro { margin-bottom: 4px; }
.review-intro .section-title { font-size: 19px; }
.admin-tabs { padding-bottom: 8px; }
.admin-tab { min-height: 44px; }
.inventory-item { flex-wrap: wrap; }
.inventory-info { min-width: 100px; }
.inventory-actions .btn { min-height: 44px; }
.modal-overlay { padding: max(14px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom)); }
.modal { max-height: 88dvh; overscroll-behavior: contain; }
.modal-close { min-width: 40px; min-height: 40px; }
.form-input, .form-select { font-size: 16px; }
.btn { min-height: 44px; }
.bottom-nav { bottom: max(12px, env(safe-area-inset-bottom)); }
.nav-item { min-height: 48px; }
.task-list, .bounty-list { grid-template-columns: 1fr; }
.reward-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
@media (min-width: 760px) {
  .app-shell { max-width: 1280px; gap: 32px; padding: 32px 28px 44px; }
  .app-sidebar { width: 292px; top: 28px; }
  .app-main { container: content / inline-size; }
  .app-sidebar .bottom-nav { margin-top: 4px; box-shadow: none; }
  .section-header-bar { flex-direction: column; }
  .section-header-bar .filter-pills { align-self: flex-start; }
  .app-sidebar .bento-hero-card { flex-wrap: wrap; }
  .hero-greeting { font-size: 16px; }
}
@container content (min-width: 700px) {
  .task-list, .bounty-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .reward-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 759px) {
  .app-shell { padding: 14px 16px calc(104px + env(safe-area-inset-bottom)); gap: 22px; }
  .app-sidebar { gap: 10px; }
  .app-sidebar .wish-goal-card { display: none; }
  .mobile-wish-goal { display: flex; margin-top: 18px; }
  .bento-hero-card { padding: 11px 14px; }
  .hero-ring-box { gap: 8px; }
  .vault-bento-card { padding: 8px 10px; gap: 4px; }
  .vault-header-row { display: none; }
  .currency-tile { border: 0; background: transparent; padding: 3px 5px; }
  .currency-tile .tile-value { font-size: 18px; }
  .currency-tile .tile-name { font-size: 11px; }
  .section-header-bar { gap: 13px; }
  .section-title { font-size: 23px; }
  .task-card { padding: 14px 12px; gap: 10px; }
  .task-icon-wrap { width: 38px; height: 38px; font-size: 21px; border-radius: 12px; }
  .task-name { font-size: 15px; }
  .task-type-tag { display: none; }
  .checkin-btn { min-width: 76px; padding: 9px; }
  .task-meta { font-size: 12px; }
  .forge-hero-banner { padding: 6px 10px; gap: 8px; }
  .forge-banner-desc { font-size: 13px; }
  .purchase-success { flex-wrap: wrap; }
  .bounty-card-top { flex-wrap: wrap; }
  .bounty-footer { align-items: flex-start; gap: 10px; }
}
@media (max-width: 360px) {
  .app-shell { padding-left: 10px; padding-right: 10px; }
  .task-card { display: grid; grid-template-columns: 34px 1fr; }
  .task-card .checkin-btn { grid-column: 2; justify-self: start; }
  .reward-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .stars-container, .encouragement-popup { display: none; }
}

.section-header-bar.task-header { flex-direction: row; flex-wrap: nowrap; align-items: center; gap: 8px; }
.task-completion { margin: 0; font-size: 14px; font-weight: 700; line-height: 1.5; color: var(--text-secondary); white-space: nowrap; }
.task-header .filter-pills { align-self: center; flex-shrink: 0; padding-bottom: 0; }
@media (max-width: 400px) {
  .task-completion { font-size: 13px; }
  .task-header .filter-pills { gap: 4px; }
  .task-header .filter-pill { font-size: 12px; padding: 6px 8px; }
}
