/* Shuji 0.2.2: shared visual rhythm, readable secondary text, touch-first controls. */
:root { --muted: #657469; --line: #e2e9e2; --paper: #f4f7f3; --radius: 20px; }
body { -webkit-font-smoothing: antialiased; }
.page-heading p, .hero-copy p, .muted, .stat-sub, .modal-description,
.list-item p, .login-note, .login-box > .muted, .field small,
.stat-bottom, .stat-number small, .large-number small { color: #657469; }
.page-heading .eyebrow { color: #647c6b; font-size: 10px; letter-spacing: 1.8px; margin-bottom: 8px; }
.page-heading h1 { letter-spacing: .2px; font-weight: 650; }
.panel, .stat-card { box-shadow: 0 3px 14px #24453104; }
.panel-heading h3 { font-size: 15px; }
.panel-heading h3 small, .section-title .section-label { color: #6c7d70; }
.btn { min-height: 40px; border-radius: 12px; font-size: 12px; transition: background .15s, box-shadow .15s; }
.btn.primary { box-shadow: 0 4px 10px #284f3d13; }
.btn.small { min-height: 36px; font-size: 12px; }
.text-button { font-size: 12px; }
.icon-button { color: #486454; }
.top-actions .avatar { display: inline-flex; width: 40px; height: 40px; border: 1px solid #d9e4d7; background: #eaf0e4; font-weight: 600; }
.breadcrumbs { color: #657469; }
.breadcrumbs strong { font-weight: 600; }
.section-title h2 { font-size: 17px; }
.section-title > span, .section-title > p { color: #657469; }
.card-label { color: #536c5a; }
.record-button { color: #325a42; background: #edf3e8; }
.stat-bottom .green { color: #4a6d3f; }
.stat-bottom span[style] { color: #536f75 !important; }
.hero-copy .pill { color: #4f6849; }
.hero-progress h3 { font-size: 14px; font-weight: 600; }
.hero-progress .progress-caption { color: #d0dfc9; }
.subnav { gap: 8px; padding: 5px 0 12px; border-bottom: 0; scrollbar-width: thin; scrollbar-color: #a5b7a4 transparent; }
.subnav button { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 16px; font-size: 13px; color: #5e7263; }
.subnav button.active { color: #fff; background: var(--green); border-color: var(--green); font-weight: 600; }
.segments button { color: #5d715d; }
.segments button.selected { color: #284f3d; }
.inline-stat { color: #657469; font-size: 13px; }
.inline-stat strong { color: #365540; font-size: 13px; }
.todo-text strong { font-size: 13px; line-height: 1.7; }
.todo-text small { font-size: 11px; color: #647367; line-height: 1.8; }
.todo-row { gap: 10px; }
.check-button { min-width: 30px; width: 30px; height: 30px; border-color: #b9cbb1; }
.icon-text { min-width: 38px; min-height: 40px; font-size: 17px; color: #57735f; border-radius: 10px; }
.icon-text:hover { background: #f0f4eb; }
.todo-row .tag { font-size: 11px; }
.todo-row.completed .todo-text strong { color: #6e7c70; }
.month-cell { font-size: 13px; color: #546b5d; border-radius: 12px; }
.month-cell.selected { background: var(--green); color: white; border-color: var(--green); font-weight: 700; }
.month-cell.selected .dot { background: #dce8bd; }
.month-cell.today:not(.selected) { box-shadow: inset 0 0 0 1px #52774d; }
.weekday { color: #647367; }
.field > span { color: #4e6555; }
.field input, .field select, .field textarea { border-radius: 12px; background: #fafcf9; border-color: #d9e3d8; color: #253e30; }
.field input:focus, .field select:focus, .field textarea:focus { background: white; border-color: #6d8f70; }
.field input::placeholder, .field textarea::placeholder { color: #7c897e; }
.password-field { display: block; position: relative; width: 100%; }
.password-field input { width: 100%; padding-right: 66px; }
.password-toggle { position: absolute; right: 4px; top: 3px; bottom: 3px; border: 0; border-radius: 8px; background: transparent; min-width: 54px; color: #375b43; font-size: 13px; }
.password-toggle:hover { background: #edf3e8; }
.modal-header { background: #fcfdfa; }
.modal-header h2 { font-weight: 650; }
.modal-description { font-size: 13px; }
.modal .form-actions { border-top: 1px solid var(--line); padding: 16px 0 0; }
.form-error:not(:empty), .login-error:not(:empty) { background: #fff3ef; border: 1px solid #f1d8ce; color: #9b4738; padding: 12px; border-radius: 10px; font-size: 13px; }
.form-error:empty { min-height: 0; margin: 0; }
.discard-notice { border: 1px solid #e8ccb5; border-radius: 14px; padding: 16px; margin-top: 16px; background: #fff8ee; color: #72543a; font-size: 14px; line-height: 1.7; }
.discard-notice > div { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.quick-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.quick-grid .life-card { display: flex; flex-direction: column; align-items: flex-start; text-align: left; padding: 20px; gap: 14px; background: #f6f9f2; border-color: #e4ebdc; border-radius: 16px; min-width: 0; }
.quick-grid .life-card h3 { margin: 0; font-size: 14px; line-height: 1.6; }
.quick-grid .life-icon { background: white; }
.empty { color: #657469; font-size: 13px; line-height: 1.9; padding: 28px 16px; background: #f8faf5; border-radius: 14px; }
.empty-icon { color: #607e53; }
.login-mobile-brand { display: none; }
.login-links button { font-size: 13px; color: #3e644b; min-height: 44px; }
.login-divider { color: #657469; font-size: 12px; }
.login-note { font-size: 12px; }
.table-hint { display: none; }
#toast { font-size: 14px; width: max-content; max-width: calc(100vw - 32px); box-shadow: 0 8px 28px #19332126; }
@media (hover: none) { .stat-card:hover { transform: none; } }
@media (max-width: 700px), (pointer: coarse) {
  main { padding: 24px 16px 28px; }
  .page-heading { gap: 16px; margin-bottom: 20px; }
  .page-heading h1 { font-size: 25px; margin-bottom: 6px; }
  .page-heading p { font-size: 13px; }
  .page-heading .heading-actions { width: 100%; gap: 8px; }
  .heading-actions .btn { padding: 10px 14px; font-size: 13px; }
  .heading-actions .btn.primary { margin-left: auto; }
  .topbar { background: #fcfdfb; }
  .breadcrumbs { font-size: 13px; }
  .hero { gap: 12px; margin-bottom: 20px; }
  .hero-story { min-height: 0; }
  .hero-copy { padding: 20px 22px; }
  .hero-copy .pill { font-size: 10px; letter-spacing: .3px; }
  .hero-copy h2 { font-size: 23px; margin: 10px 0 12px; line-height: 1.55; letter-spacing: .5px; }
  .hero-copy p { display: none; }
  .hero-copy .text-button { font-size: 12px; min-height: 36px; gap: 18px; }
  .hero-progress { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 6px 16px; min-height: 0; padding: 18px 20px; }
  .hero-progress h3 { grid-column: 1; grid-row: 1; font-size: 14px; margin: 0; line-height: 1.6; }
  .hero-progress h3 span { display: none; }
  .hero-progress .progress-caption { grid-column: 1; grid-row: 2; font-size: 12px; line-height: 1.8; margin: 0; }
  .progress-body { grid-column: 2; grid-row: 1 / 3; display: block; }
  .progress-body p { display: none; }
  .progress-ring { width: 64px; height: 64px; }
  .progress-ring:before { inset: 5px; }
  .progress-ring > span { font-size: 21px; }
  .overview-stats { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .overview-stats .stat-card { padding: 16px 14px; display: flex; flex-direction: column; }
  .overview-stats .card-top { gap: 8px; margin-bottom: 12px; align-items: center; flex-wrap: wrap; }
  .overview-stats .card-label { font-size: 13px; gap: 5px; }
  .overview-stats .record-button { min-height: 36px; font-size: 12px; padding: 5px 8px; }
  .overview-stats .stat-number { font-size: 28px; letter-spacing: -.7px; }
  .overview-stats .stat-number small { margin-left: 4px; }
  .overview-stats .stat-sub { font-size: 12px; line-height: 1.8; margin: 8px 0 14px; min-height: 44px; }
  .overview-stats .stat-bottom { gap: 3px; font-size: 11px; line-height: 1.7; align-items: flex-start; flex-direction: column; }
  .overview-stats .spark-bars { height: 28px; margin-top: auto; }
  .overview-stats .metric-link { inset: 92px 0 0; }
  .section-title { gap: 8px; margin: 22px 0 12px; }
  .section-title h2 { font-size: 17px; }
  .section-title .text-button { font-size: 12px; }
  .section-title > span { font-size: 12px; }
  .panel { padding: 20px 18px; }
  .panel-heading { gap: 12px; margin-bottom: 18px; }
  .panel-heading h3 { font-size: 16px; }
  .subnav { margin-bottom: 18px; }
  .subnav button { min-height: 44px; font-size: 14px; }
  .muted, .list-item p, .trend-bottom, .inline-stat, .stat-sub { font-size: 13px; line-height: 1.8; }
  .summary-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .summary-grid .summary-click { padding: 18px 14px; }
  .summary-grid .card-label { flex-wrap: wrap; font-size: 13px; gap: 6px; }
  .summary-grid .privacy-label { font-size: 11px; color: #49684e; }
  .summary-grid .large-number { font-size: 25px; margin: 12px 0 8px; }
  .summary-grid .summary-click:last-child { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
  .summary-grid .summary-click:last-child .large-number { margin: 0; grid-column: 2; grid-row: 1 / 3; }
  .summary-grid .summary-click:last-child .muted { margin: 0; }
  .table-scroll { margin: 0; }
  .table-scroll table { min-width: 560px; }
  .table-scroll th, .table-scroll td { font-size: 13px; padding: 14px 12px; }
  .table-scroll .actions { flex-wrap: nowrap; }
  .table-scroll .btn { white-space: nowrap; min-height: 40px; }
  .table-hint { display: block; color: #657469; font-size: 12px; margin: 0 0 10px; }
  .chart-legend { color: #647367; font-size: 11px; flex-wrap: wrap; gap: 8px 14px; }
  .line-chart text { fill: #657469; font-size: 11px; }
  .trend-bottom { flex-wrap: wrap; gap: 8px; }
  .todo-row { flex-wrap: wrap; }
  .todo-row .todo-text { flex: 1; min-width: 100px; }
  .todo-row .tag { display: none; }
  .calendar-day span { color: #647367; font-size: 11px; }
  .calendar-day.selected span { color: #e2edda; }
  .month-cell { padding: 5px; font-size: 13px; }
  .life-card p { font-size: 12px; color: #657469; }
  .life-card h3 { font-size: 14px; }
  .login-page { background: radial-gradient(ellipse at 90% 0, #dfebd6, transparent 60%), #f7faf4; }
  .login-art { display: none; }
  .login-main { display: flex; flex-direction: column; justify-content: flex-start; align-items: center; padding: 32px 24px; }
  .login-main:before { content: none; }
  .login-mobile-brand { display: flex; align-items: center; align-self: flex-start; gap: 12px; margin: 0 0 34px; }
  .login-mobile-brand img { width: 46px; height: 46px; }
  .login-mobile-brand > span { font-size: 25px; font-weight: 700; letter-spacing: 3px; }
  .login-mobile-brand small { display: block; color: #5b745d; font-size: 11px; letter-spacing: 1px; margin-top: 3px; font-weight: 400; }
  .login-box { width: 100%; max-width: 420px; }
  .login-box h2 { font-size: 27px; font-weight: 650; }
  .login-box > .eyebrow { font-size: 10px; letter-spacing: 1.6px; color: #647c6b; }
  .login-box > .muted { font-size: 14px; margin-bottom: 28px; }
  .login-box .field { margin-bottom: 20px; }
  .login-box .field input { min-height: 52px; background: #ffffffcc; }
  .login-box .btn { min-height: 52px; border-radius: 14px; }
  .login-links { gap: 12px; flex-wrap: wrap; margin: 10px 0; }
  .login-error:empty { min-height: 0; margin: 0 0 18px; }
  .login-divider { margin: 20px 0; }
  .quick-grid .life-card { padding: 18px 14px; }
}
@media (max-width: 350px) {
  .overview-stats .stat-card { padding: 14px 12px; }
  .overview-stats .stat-number { font-size: 26px; }
  .hero-progress { padding: 16px; gap: 6px 12px; }
  .breadcrumbs { font-size: 12px; gap: 5px; }
  .breadcrumbs { max-width: 130px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
