* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, "Segoe UI", Arial, sans-serif;
  background: linear-gradient(160deg, #0f2027 0%, #203a43 50%, #2c5364 100%);
  min-height: 100vh; color: #f0f4f8;
}
#app { max-width: 640px; margin: 0 auto; padding: 16px; }
header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
h1 { font-size: 1.3rem; }
#menu-wrap { position: relative; }
#menu-btn { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.25); color: #f0f4f8; font-size: 20px; line-height: 1; border-radius: 8px; cursor: pointer; min-width: 44px; min-height: 40px; padding: 4px 12px; }
#menu-panel { position: absolute; top: calc(100% + 6px); inset-inline-end: 0; background: #1b2b34; border: 1px solid rgba(255,255,255,.18); border-radius: 10px; box-shadow: 0 8px 28px rgba(0,0,0,.45); padding: 12px 14px; min-width: 230px; z-index: 60; display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.menu-email { font-size: .78rem; opacity: .7; direction: ltr; text-align: end; }
#menu-panel .logout { font-size: .85rem; }
.logout { color: #9ecfff; }
.hidden { display: none !important; }
#loading { text-align: center; padding: 40px; opacity: .7; }
#login { text-align: center; padding: 60px 20px; }
#login p { margin-bottom: 20px; }
.google-btn {
  display: inline-block; background: #fff; color: #333; padding: 12px 24px;
  border-radius: 8px; text-decoration: none; font-weight: 600;
}
#add-form { background: rgba(255,255,255,.08); border-radius: 12px; padding: 12px; margin-bottom: 14px; }
#f-title { width: 100%; padding: 10px; border-radius: 8px; border: none; margin-bottom: 8px; font-size: 1rem; }
.form-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.form-row select, .form-row input[type=date], .form-row input[type=time], .form-row input[type=text], .form-row input.time-input {
  padding: 8px; border-radius: 8px; border: none; font-size: .85rem; flex: 1; min-width: 80px;
}
.form-row button[type=submit] { padding: 8px 18px; border: none; border-radius: 8px; background: #4a9eff; color: #fff; font-weight: 600; cursor: pointer; }
.chk { display: flex; align-items: center; gap: 6px; font-size: .82rem; opacity: .9; }
.linkish { background: none; border: none; color: #9ecfff; cursor: pointer; font-size: .82rem; }
#f-more textarea, .edit-form textarea {
  width: 100%; padding: 8px; border-radius: 8px; border: none; font-size: .85rem;
  margin-bottom: 6px; font-family: inherit; resize: vertical;
}
#filters { display: flex; gap: 8px; margin-bottom: 10px; }
#filters button {
  flex: 1; padding: 8px; border: 1px solid rgba(255,255,255,.25); background: transparent;
  color: #f0f4f8; border-radius: 20px; cursor: pointer; font-size: .9rem;
}
#filters button.active { background: #4a9eff; border-color: #4a9eff; }
.future-toggle { margin-bottom: 12px; }
.task {
  background: rgba(255,255,255,.09); border-radius: 12px;
  padding: 12px; margin-bottom: 10px; border-right: 5px solid #888;
}
.task.prio-high { border-right-color: #ff8c42; }
.task.prio-normal { border-right-color: #4a9eff; }
.task.prio-low { border-right-color: #8a9ba8; }
.task.done { opacity: .45; }
.task.done .t-title { text-decoration: line-through; }
.t-head { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.t-body { flex: 1; }
.t-title { font-weight: 600; margin-bottom: 4px; }
.t-meta { font-size: .75rem; display: flex; gap: 8px; flex-wrap: wrap; opacity: .85; }
.tag { background: rgba(255,255,255,.12); border-radius: 8px; padding: 1px 8px; }
.tag.overdue { background: #c0392b; font-weight: 700; }
.tag.origin { background: rgba(155,89,182,.55); }
.tag.daily-remind { background: rgba(22,160,133,.55); }
.t-actions { display: flex; flex-direction: column; gap: 6px; }
.t-actions button {
  border: none; border-radius: 8px; padding: 6px 12px; cursor: pointer; font-size: .8rem;
}
.btn-done { background: #27ae60; color: #fff; }
.btn-edit { background: rgba(255,255,255,.14); color: #f0f4f8; }
.btn-del { background: rgba(255,255,255,.14); color: #f0f4f8; }
.t-details { margin-top: 10px; border-top: 1px solid rgba(255,255,255,.12); padding-top: 8px; }
.t-notes { font-size: .82rem; opacity: .75; margin-bottom: 6px; white-space: pre-wrap; }
.checklist { margin: 6px 0; }
.checklist label { display: flex; gap: 8px; align-items: center; font-size: .85rem; padding: 3px 0; cursor: pointer; }
.checklist label.done span { text-decoration: line-through; opacity: .6; }
.attachments { margin: 6px 0; font-size: .82rem; }
.attachments a { color: #9ecfff; }
.edit-form { background: rgba(255,255,255,.06); border-radius: 10px; padding: 10px; margin-top: 8px; }
.edit-form .form-row button { padding: 8px 14px; border: none; border-radius: 8px; cursor: pointer; font-size: .85rem; }
.btn-save { background: #4a9eff; color: #fff; font-weight: 600; }
.btn-cancel { background: rgba(255,255,255,.14); color: #f0f4f8; }

#sync-btn { padding: 10px 14px; min-height: 44px; border: 1px solid rgba(255,255,255,.3); background: rgba(255,255,255,.1); color: #f0f4f8; border-radius: 8px; cursor: pointer; font-size: .85rem; }
#sync-btn:disabled { opacity: .5; }
#sync-status { font-size: .78rem; opacity: .8; }
.tag.shadow-tag { background: #b9770e; font-weight: 700; }
.task.shadow { outline: 2px dashed #b9770e; outline-offset: -2px; }
.shadow-note { background: rgba(185,119,14,.18); border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; line-height: 1.5; }
.shadow-note a { color: #f5b041; }
.shadow-banner { background: rgba(185,119,14,.25); border: 1px solid #b9770e; border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; line-height: 1.5; font-size: 14px; }

/* DoneConfirm parity bar */
.done-confirm { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 6px; margin: 8px 0 2px; padding: 8px; width: 100%; box-sizing: border-box; background: #fff8e6; border: 1px solid #e5c97a; border-radius: 8px; }
.done-confirm .dc-q { font-size: 13px; margin-left: 4px; color: #4a3f1a; width: 100%; }
.done-confirm button { border: none; border-radius: 6px; padding: 6px 10px; font-size: 13px; cursor: pointer; background: #e8e8e8; }
.done-confirm .dc-next { background: #27ae60; color: #fff; }
.done-confirm .dc-delete { background: #c0392b; color: #fff; }
.done-confirm .dc-cancel { background: #999; color: #fff; }

/* Mobile readability: keep hint text visible instead of clipped */
#f-time { flex: 1 1 90px; min-width: 90px; }
.form-row select { flex: 1 1 auto; min-width: 96px; }
#f-origin { flex: 1 1 120px; min-width: 120px; }
#f-due, #f-skip-until { flex: 0 1 auto; }

.add-toggle { width: 100%; padding: 12px; margin-bottom: 10px; border: 1px dashed #5a7a8c; border-radius: 8px; background: transparent; color: #9fd4ff; font-size: 16px; font-weight: 600; cursor: pointer; }
.add-toggle:active { background: rgba(159,212,255,.08); }
