:root { color-scheme: light; font-family: system-ui, -apple-system, sans-serif; color: #26382e; background: #f4f6f1; font-synthesis: none; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100svh; padding: 24px; }
body:has(.card) { display: grid; place-items: center; }
button, input, textarea, select { font: inherit; }
button { padding: 12px 18px; border: 1px solid #d5ded3; border-radius: 11px; background: white; color: inherit; cursor: pointer; transition: background .15s; }
button:hover { background: #edf2e9; }
button:disabled { opacity: .55; cursor: default; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid #81a57d; outline-offset: 3px; }
.primary-button { background: #386645; border-color: #386645; color: white; font-weight: 600; }
.primary-button:hover { background: #2e5539; }
.quiet-button { padding: 9px 12px; border-color: transparent; background: transparent; color: #657364; font-size: 14px; }
.brand { display: flex; align-items: center; gap: 9px; color: #365940; font-size: 15px; font-weight: 750; letter-spacing: -.02em; margin: 0; }
.brand-mark { display: inline-grid; place-items: center; width: 29px; height: 29px; border-radius: 9px; color: white; background: #386645; font-size: 19px; }
h1 { font-size: clamp(27px, 5vw, 38px); line-height: 1.2; letter-spacing: -.045em; }
p { line-height: 1.6; }
.card { width: min(100%, 450px); padding: 36px 28px; background: white; border: 1px solid #e0e6dc; border-radius: 24px; text-align: center; box-shadow: 0 12px 45px #293e2910; }
.card .brand { justify-content: center; }
.card h1 { margin: 18px 0; }
.card > p:not(.brand) { color: #6b7869; }
.login-mark { display: inline-grid; place-items: center; width: 70px; height: 70px; margin-top: 40px; color: #a1791d; font-size: 40px; border-radius: 23px; background: #fbf2d9; }
.google-button { display: flex; justify-content: center; min-height: 44px; margin-top: 28px; }
.login-note { margin-top: 28px; font-size: 12px; }
#status { font-size: 14px; min-height: 24px; margin: 10px 0; color: #5d7257; overflow-wrap: anywhere; }
.workspace { max-width: 780px; margin: 0 auto; }
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 8px 0 34px; }
.balance { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 10px 0 28px; }
.balance h1 { margin: 6px 0 0; }
.eyebrow { font-size: 13px; color: #7a8775; margin: 0; }
.gold-badge { display: flex; flex-shrink: 0; align-items: center; gap: 13px; padding: 14px 22px; border-radius: 18px; border: 1px solid #eadcb2; background: #fcf5df; color: #84631b; }
.coin { display: inline-grid; place-items: center; width: 33px; height: 33px; border: 2px solid #d0a44a; border-radius: 50%; color: #a1781e; background: #f6df93; font-size: 23px; }
#gold { display: block; font-size: 25px; line-height: 1.1; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; max-width: 180px; }
.gold-label { font-size: 12px; }
.balance-inventory { display: grid; gap: 7px; flex-shrink: 0; }
.pet-counts { display: flex; justify-content: center; gap: 16px; font-size: 13px; }
.pet-counts > span { display: flex; align-items: center; gap: 5px; }
.pet-counts img { width: 27px; height: 27px; object-fit: contain; }
.pet-counts strong { font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.world-navigation { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: -8px 0 22px; }
.world-navigation p { color: #657364; font-size: 12px; margin: 0; }
.world-link { color: #386645; font-size: 14px; font-weight: 650; text-decoration: none; border-radius: 6px; }
.world-link:hover { text-decoration: underline; }
.world-link:focus-visible { outline: 3px solid #81a57d; outline-offset: 4px; }
.task-panel { background: white; border: 1px solid #e0e6dc; border-radius: 22px; overflow: hidden; box-shadow: 0 7px 28px #293e2906; }
.list-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 25px; border-bottom: 1px solid #ecf0e8; }
h2 { font-size: 17px; margin: 0; letter-spacing: -.02em; }
.list-toolbar p { font-size: 12px; color: #7b8875; margin: 5px 0 0; }
.list-toolbar button { font-size: 14px; flex-shrink: 0; }
.count { font-size: 12px; font-weight: 500; color: #6a7e60; background: #eff3ea; padding: 3px 7px; border-radius: 7px; margin-left: 5px; }
.count:empty { display: none; }
.task-list { list-style: none; margin: 0; padding: 0 25px; }
.task-row { display: flex; align-items: center; gap: 15px; padding: 21px 0; border-bottom: 1px solid #edf0e9; }
.task-row:last-child { border-bottom: 0; }
.task-content { flex: 1; min-width: 0; }
.task-title { display: block; text-align: left; width: 100%; padding: 2px 0; border: 0; border-radius: 3px; background: none; font-weight: 600; line-height: 1.45; overflow-wrap: anywhere; }
.task-title:hover { color: #386645; background: none; }
.task-description { margin: 5px 0 0; font-size: 13px; line-height: 1.55; color: #7b8577; overflow-wrap: anywhere; }
.task-description.expanded { white-space: pre-wrap; }
.complete-button { flex-shrink: 0; max-width: 140px; font-size: 13px; padding: 10px 12px; color: white; background: #2d7a3e; border-color: #2d7a3e; transition: background-color .6s, color .6s; }
.complete-button:disabled { opacity: 1; background: #eff2ed !important; border-color: #d5ded3 !important; color: #63705f !important; }
.task-meta { margin: 8px 0 0; color: #778371; font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; }
.empty-state { text-align: center; padding: 50px 20px; }
.empty-mark { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 18px; background: #eef3e8; color: #6e9662; font-size: 28px; }
.empty-state h3 { margin: 18px 0 8px; font-size: 18px; }
.empty-state p { font-size: 14px; color: #7b8875; margin: 0 0 22px; }
#loading { padding: 30px; font-size: 14px; text-align: center; color: #7b8875; }
.status-line { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.footnote { font-size: 12px; color: #899482; text-align: center; margin-top: 25px; }
dialog { width: min(calc(100% - 32px), 520px); max-height: calc(100svh - 32px); overflow-y: auto; padding: 28px; border: 1px solid #e0e6dc; border-radius: 20px; color: inherit; box-shadow: 0 22px 80px #13231330; }
dialog::backdrop { background: #1d2c1f66; backdrop-filter: blur(3px); }
.dialog-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.dialog-heading h2 { font-size: 21px; }
.icon-button { border: 0; padding: 3px 10px; font-size: 25px; color: #7b8875; }
label { display: block; font-size: 14px; font-weight: 600; margin: 19px 0 8px; }
.optional { font-size: 12px; color: #8c9687; font-weight: 400; margin-left: 5px; }
input, textarea, select { display: block; width: 100%; padding: 12px; border: 1px solid #d8e0d3; border-radius: 10px; background: #fcfdfb; color: inherit; }
input::placeholder, textarea::placeholder { color: #9aa493; font-size: 13px; }
textarea { resize: vertical; min-height: 100px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.form-error { color: #a44635; font-size: 13px; margin: 12px 0 0; }
@media (max-width: 520px) {
  body { padding: 16px; }
  .topbar { padding: 4px 0 24px; }
  .balance { margin-top: 5px; gap: 10px; }
  .eyebrow { font-size: 11px; max-width: 175px; }
  .gold-badge { padding: 11px 13px; gap: 8px; }
  #gold { font-size: 22px; max-width: 110px; }
  .coin { width: 27px; height: 27px; font-size: 18px; }
  .list-toolbar { flex-wrap: wrap; padding: 20px 16px; gap: 15px; }
  .list-toolbar > div { flex: 1; min-width: 120px; }
  .list-toolbar button { padding: 10px 12px; }
  .task-list { padding: 0 16px; }
  .task-row { gap: 12px; }
  .task-title { font-size: 14px; }
  .task-description { font-size: 12px; }
  .complete-button { font-size: 12px; padding: 10px; }
  .card { padding: 30px 20px; }
  dialog { padding: 22px; }
}
@media (prefers-reduced-motion: reduce) { button { transition: none; } }

.check-label { display: flex; align-items: center; gap: 9px; font-weight: 500; }
.check-label input { width: 18px; height: 18px; padding: 0; accent-color: #386645; }
.deadline-inputs { display: grid; grid-template-columns: 1.1fr 1fr; gap: 12px; }
.deadline-inputs > div { min-width: 0; }
.deadline-inputs input { min-width: 0; font-size: 14px; padding: 10px; }
.field-hint { color: #788571; font-size: 12px; line-height: 1.5; margin: 9px 0 0; }
.field-label { font-size: 14px; font-weight: 600; margin: 19px 0 8px; }
.schedule-add { margin-top: 13px; font-size: 13px; width: 100%; border-style: dashed; background: #f7f9f4; }
#schedule-settings { min-width: 0; padding: 15px; margin: 14px 0 0; border: 1px solid #dce4d6; border-radius: 12px; }
.schedule-heading { display: flex; justify-content: space-between; align-items: center; }
.schedule-heading legend { font-size: 14px; font-weight: 600; }
.calendar-options { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.calendar-option { position: relative; cursor: pointer; text-align: center; margin: 0; min-width: 0; font-size: 12px; }
.calendar-option input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; opacity: 0; cursor: pointer; }
.calendar-option span { display: block; border: 1px solid #d8e0d3; border-radius: 8px; padding: 9px 0; background: #fcfdfb; }
.calendar-option input:checked + span { border-color: #386645; background: #386645; color: white; }
.calendar-option input:focus-visible + span { outline: 3px solid #81a57d; outline-offset: 2px; }
.month-mode-row { display: flex; align-items: center; gap: 10px; margin-top: 9px; }
.month-mode-row label { margin: 0; width: 25px; flex-shrink: 0; font-size: 12px; }
.month-mode-row select { font-size: 12px; padding: 9px; min-width: 0; }
@media (max-width: 380px) {
  .deadline-inputs { grid-template-columns: 1fr; gap: 0; }
  #schedule-settings { padding: 10px; }
  .calendar-options { gap: 3px; }
  .task-row { flex-wrap: wrap; }
  .task-content { flex-basis: 100%; }
  .complete-button { max-width: none; }
}
