:root {
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #29263b;
  background: #f5f3fc;
  font-synthesis: none;
  line-height: 1.5;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.app { width: min(100% - 40px, 760px); margin: 72px auto 36px; }
.page-header { margin-bottom: 32px; }
.eyebrow { font-size: 11px; font-weight: 750; letter-spacing: .15em; color: #65548c; }
h1 { font-size: clamp(36px, 7vw, 48px); letter-spacing: -.04em; line-height: 1.2; margin: 14px 0 12px; }
h1 span { color: #7753c5; }
.page-header p { color: #655f75; margin: 0; }
.card { padding: 32px; background: #fff; border: 1px solid #e7e1f0; border-radius: 22px; box-shadow: 0 10px 40px #30224b08; }
form > label { display: block; font-size: 14px; font-weight: 650; margin-bottom: 10px; }
.form-row { display: flex; gap: 12px; }
input[type="text"] { width: 100%; min-width: 0; padding: 13px 15px; border: 1px solid #bdb5ce; border-radius: 10px; color: inherit; background: #fff; }
input::placeholder { color: #746d80; }
.add-button { flex-shrink: 0; border: 0; border-radius: 10px; background: #6541ad; color: white; padding: 13px 18px; font-size: 14px; font-weight: 650; }
.add-button:hover { background: #52308f; }
button:focus-visible, input:focus-visible { outline: 3px solid #8961ce; outline-offset: 4px; }
input[aria-invalid="true"] { border-color: #af3030; }
.input-error { color: #a12626; font-size: 14px; margin: 8px 0 0; }
.warning { border: 1px solid #cda352; border-radius: 10px; background: #fff6df; color: #654412; padding: 12px; font-size: 14px; }
.list-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 32px 0 12px; }
h2 { font-size: 16px; margin: 0; }
#task-count { font-size: 12px; background: #f2eef9; color: #635376; padding: 5px 10px; border-radius: 20px; }
.empty-state { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 30px 8px; margin: 0; border: 1px dashed #ded6eb; border-radius: 12px; text-align: center; }
.empty-icon { display: grid; place-items: center; width: 44px; height: 44px; background: #f0eaf9; color: #7753b8; border-radius: 14px; font-size: 23px; margin-bottom: 6px; }
.empty-state strong { font-weight: 600; font-size: 15px; }
.empty-state > span:last-child { color: #71687f; font-size: 13px; }
#task-list { list-style: none; margin: 0; padding: 0; }
.task-row { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid #eeeaf3; }
.task-row:last-child { border-bottom: 0; }
.task-label { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; cursor: pointer; padding: 5px 0; }
.task-label input { appearance: auto; width: 22px; height: 22px; margin: 0; flex-shrink: 0; accent-color: #6541ad; cursor: pointer; }
.task-title { overflow-wrap: anywhere; }
.task-state { font-size: 11px; color: #71687f; }
.is-completed .task-title { text-decoration: line-through; color: #756b83; }
.is-completed .task-state { color: #42674e; }
.delete-button { color: #8f333e; background: #fff5f5; border: 1px solid transparent; border-radius: 8px; padding: 10px 12px; min-height: 44px; font-size: 12px; }
.delete-button:hover { background: #ffe8e8; border-color: #edc5c5; }
footer { text-align: center; margin-top: 24px; color: #71687f; font-size: 12px; line-height: 1.8; }
noscript { display: block; margin-top: 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 560px) {
  .app { width: calc(100% - 28px); margin-top: 36px; }
  .card { padding: 22px 18px; border-radius: 16px; }
  .form-row { flex-direction: column; }
  .task-row { flex-wrap: wrap; gap: 4px 10px; }
  .task-label { flex-basis: calc(100% - 70px); }
  .task-state { order: 3; margin-left: 34px; }
  .delete-button { flex-shrink: 0; }
  .list-heading { margin-top: 26px; }
}
input[type="email"], input[type="password"] { display: block; width: 100%; min-width: 0; padding: 13px 15px; border: 1px solid #bdb5ce; border-radius: 10px; color: inherit; background: #fff; }
#auth-form > label { margin-top: 18px; }
#auth-form .add-button { width: 100%; margin-top: 10px; }
.intro, .hint { color: #655f75; }
.intro { margin: 10px 0 20px; }
.hint { font-size: 12px; margin: 10px 0; }
.text-button { color: #6541ad; background: transparent; border: 1px solid #ded6eb; border-radius: 9px; padding: 10px 12px; min-height: 44px; font-size: 14px; }
.text-button:hover { background: #f5f3fc; }
#mode-switch { width: 100%; margin-top: 14px; }
.account-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 22px; margin-bottom: 22px; border-bottom: 1px solid #eeeaf3; font-size: 13px; }
.account-bar span { min-width: 0; overflow-wrap: anywhere; }
.account-bar strong { display: block; }
#logout { flex-shrink: 0; }
.refresh-button { display: block; margin: 22px auto 0; font-size: 12px; }
button:disabled, input:disabled { cursor: wait; opacity: .65; }
#progress { color: #6541ad; font-size: 14px; }
@media (max-width: 560px) {
  .account-bar { align-items: flex-start; flex-direction: column; gap: 10px; }
  .list-heading { flex-wrap: wrap; }
}
