/* Yachu Attend: phone-first layout, 16px gutter, cream/ink tokens. */
:root {
  --bg: #FAF6EE;
  --surface: #FFFDF8;
  --text: #1F1B16;
  --text-muted: #6B645A;
  --border: #E6DFD2;
  --accent: #1F1B16;
  --accent-soft: #F1EBDF;
  --in: #2E6B3F;
  --out: #A63D2F;
  --warn: #8A5A00;
  --warn-soft: #FDF0D5;
  --on-accent: #FAF6EE;
  --radius: 12px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px; line-height: 1.45;
}
#app { max-width: 480px; margin: 0 auto; padding: 0 16px 96px; }
header.topbar {
  position: sticky; top: 0; z-index: 10; background: var(--bg);
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.brand { font-weight: 700; font-size: 18px; }
.top-actions { display: flex; gap: 8px; align-items: center; }
.iconbtn {
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  border-radius: 999px; padding: 8px 12px; font-size: 14px; cursor: pointer;
}
.badge {
  background: var(--out); color: #fff; border-radius: 999px;
  font-size: 12px; padding: 2px 8px; margin-left: 4px; font-weight: 700;
}
.offlinebar {
  display: none; background: var(--warn-soft); color: var(--warn);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 8px 12px; margin: 12px 0 0; font-size: 14px;
}
.offlinebar.show { display: block; }
/* Sync-denied banner: persistent RED, stays until dismissed (outside #app). */
.deniedbanner {
  display: none; background: #b3261e; color: #fff;
  padding: 10px 14px; font-size: 14px;
  position: sticky; top: 0; z-index: 60;
}
.deniedbanner .btn { margin-left: 8px; background: #fff; color: #b3261e; border: none; }
.holiday-banner {
  display: none; background: var(--accent); color: var(--on-accent);
  border-radius: var(--radius); padding: 10px 14px; margin: 12px 0 0; font-size: 14px;
}
.holiday-banner.show { display: block; }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; margin-top: 16px;
}
.bigbtn {
  display: block; width: 100%; border: none; border-radius: 16px;
  background: var(--accent); color: var(--on-accent);
  font-size: 22px; font-weight: 700; padding: 26px 16px; cursor: pointer;
  margin-top: 16px;
}
.bigbtn:active { transform: scale(0.99); }
.bigbtn.out { background: var(--out); }
.bignote { font-size: 13px; color: var(--text-muted); margin-top: 8px; text-align: center; }
.times { display: flex; gap: 12px; margin-top: 12px; }
.timebox {
  flex: 1; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px; text-align: center;
}
.timebox .lbl { font-size: 12px; color: var(--text-muted); }
.timebox .val { font-size: 20px; font-weight: 700; }
.tag {
  display: inline-block; font-size: 12px; font-weight: 700; border-radius: 999px;
  padding: 2px 10px; margin-left: 6px; vertical-align: middle;
}
.tag.late { background: var(--warn-soft); color: var(--warn); }
.tag.outside { background: var(--warn-soft); color: var(--warn); }
.tag.unknown { background: var(--accent-soft); color: var(--text-muted); }
.tag.ok { background: #E4EFE6; color: var(--in); }
h2 { font-size: 17px; margin: 24px 0 8px; }
.row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); }
.row:last-child { border-bottom: none; }
.muted { color: var(--text-muted); font-size: 14px; }
.small { font-size: 13px; }
input[type=text], input[type=password], input[type=time], input[type=date], textarea, select {
  width: 100%; font-size: 16px; padding: 12px; border: 1px solid var(--border);
  border-radius: var(--radius); background: var(--surface); color: var(--text); margin: 6px 0;
}
textarea { min-height: 64px; resize: vertical; }
.btn {
  display: inline-block; border: 1px solid var(--border); background: var(--surface);
  color: var(--text); border-radius: var(--radius); padding: 12px 18px;
  font-size: 16px; font-weight: 600; cursor: pointer; margin: 6px 4px 6px 0;
}
.btn.primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.btn.danger { background: var(--out); border-color: var(--out); color: #fff; }
.btn:disabled { opacity: 0.5; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.chip {
  border: 1px solid var(--border); background: var(--surface); border-radius: 999px;
  padding: 10px 14px; font-size: 15px; cursor: pointer;
}
.chip.on { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.qtyrow { display: flex; gap: 8px; align-items: center; margin: 4px 0; }
.qtyrow input { width: 90px; margin: 0; }
.err { color: var(--out); font-size: 14px; margin-top: 8px; }
.nav { display: flex; gap: 4px; margin-top: 16px; border-top: 1px solid var(--border); padding-top: 12px; }
.nav button {
  flex: 1; border: none; background: none; color: var(--text-muted);
  font-size: 14px; font-weight: 600; padding: 10px 4px; cursor: pointer;
}
.nav button.on { color: var(--text); border-top: 2px solid var(--accent); }
.photothumb { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); margin: 4px; }
#loginwrap { max-width: 400px; margin: 8vh auto 0; }
.login-note { font-size: 13px; color: var(--text-muted); margin-top: 16px; }
.hidden { display: none !important; }
