/* Kozmoz Cafe Staff: plain CSS, mobile-first. No inline styles anywhere (CSP). */
:root {
  --paper: #f6f3ec; --card: #fffdf8; --ink: #21201c; --muted: #6a665c; --line: #ddd6c6;
  --green: #2f5d50; --green-dark: #20443a; --mine: #fde7a8; --mine-ink: #5a4200;
  --red: #b3392b; --today: #2f5d50;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 17px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Yu Gothic", Roboto, sans-serif;
}
a { color: var(--green-dark); }
h1 { font-size: 1.5rem; margin: .2rem 0 .6rem; line-height: 1.2; }
h2 { font-size: 1.2rem; margin: 0 0 .5rem; }
h3 { font-size: 1.05rem; margin: 1rem 0 .3rem; }
main { max-width: 960px; margin: 0 auto; padding: 12px 14px 40px; }
.muted { color: var(--muted); font-weight: 400; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.top {
  background: var(--green); color: #fff; padding: 10px 14px; display: flex;
  justify-content: space-between; align-items: baseline; gap: 12px;
}
.top .brand { color: #fff; text-decoration: none; font-weight: 800; font-size: 1.1rem; }
.top .brand span { font-weight: 400; opacity: .85; }
.nav { display: flex; background: var(--card); border-bottom: 2px solid var(--line); overflow-x: auto; }
.nav a {
  flex: 1; text-align: center; padding: 11px 8px; text-decoration: none; color: var(--ink);
  font-weight: 600; white-space: nowrap; border-bottom: 4px solid transparent;
}
.nav a[aria-current="page"] { border-bottom-color: var(--green); background: #fff; }
/* Phones: all five tabs fit on one line (no sideways scrolling to find Devices). */
@media (max-width: 480px) {
  .nav a { flex: 1 1 0; min-width: 0; padding: 10px 2px; font-size: .8rem; letter-spacing: -.01em; }
  .nav .badge { font-size: .7rem; min-width: 1.2em; }
}
.badge {
  display: inline-block; min-width: 1.4em; padding: 0 .35em; border-radius: 1em; background: var(--red);
  color: #fff; font-size: .8rem; text-align: center; line-height: 1.5;
}
.banner {
  background: #fff4cc; padding: 10px 14px; display: flex; gap: 12px; align-items: center;
  justify-content: space-between; border-bottom: 1px solid var(--line);
}
.banner[hidden], [hidden] { display: none !important; }
.foot { text-align: center; padding: 20px 10px 30px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin: 0 0 14px; }
.card h2 a { text-decoration: none; }
.plain { list-style: none; margin: 0; padding: 0; }
.plain li { padding: 4px 0; }
label { display: block; font-weight: 600; margin: 10px 0 4px; }
.check { font-weight: 400; display: flex; gap: 8px; align-items: center; }
input[type=text], input[type=date], textarea, select {
  width: 100%; padding: 10px; font: inherit; border: 1px solid var(--line); border-radius: 8px; background: #fff;
}
.code-input { font-size: 1.6rem; letter-spacing: .3em; text-align: center; }
button {
  font: inherit; font-weight: 700; padding: 10px 18px; margin-top: 10px; border: 0; border-radius: 8px;
  background: var(--green); color: #fff; cursor: pointer;
}
button:disabled { opacity: .6; }
button.small { padding: 6px 12px; margin-top: 0; font-size: .9rem; }
button.danger { background: var(--red); }
.error { background: #fde4df; color: #7a1f14; padding: 8px 12px; border-radius: 8px; }
.notice { background: #e3f1e6; color: #1d4a28; padding: 8px 12px; border-radius: 8px; }
.late { color: var(--red); }
.tag { font-size: .75rem; background: #e6e1d3; border-radius: 4px; padding: 1px 6px; font-weight: 600; }
.tag.late { background: #fde4df; }
.bigcode { font-size: 2.4rem; letter-spacing: .25em; font-weight: 800; text-align: center; margin: .3rem 0; }

/* messages */
.msg { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin: 0 0 10px; }
.msg header { font-size: .9rem; }
.msg p { margin: .2rem 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.system { background: #eef2f0; }
.msg.announce { border-left: 5px solid var(--green); }

/* requests */
.req { padding: 8px 0; border-top: 1px solid var(--line); }
.req:first-of-type { border-top: 0; }
.status { float: right; font-size: .8rem; font-weight: 700; padding: 1px 8px; border-radius: 10px; background: #e6e1d3; }
.s-approved { background: #cfe8d3; } .s-declined { background: #f5d1cb; } .s-seen { background: #dbe6f2; }

/* calendar */
.monthbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.monthbar h1, .monthbar h3 { margin: 0; text-align: center; flex: 1; }
.arrow { font-size: 2rem; line-height: 1; padding: 0 14px; text-decoration: none; }
.arrow.off { color: var(--line); }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; margin: 8px 0; }
.wd { text-align: center; font-size: .8rem; font-weight: 700; color: var(--muted); padding: 2px 0; }
.cell {
  display: block; min-height: 64px; background: var(--card); border: 1px solid var(--line);
  border-radius: 6px; padding: 2px 3px; text-decoration: none; color: var(--ink); overflow: hidden;
}
.cell.off { background: transparent; border-color: transparent; }
.cell.today { border: 2px solid var(--today); }
.cell.today .num { background: var(--today); color: #fff; border-radius: 50%; }
.num { display: inline-block; min-width: 1.5em; text-align: center; font-weight: 700; font-size: .85rem; }
.shift { display: block; font-size: .72rem; line-height: 1.25; padding: 0 2px; border-radius: 3px; margin-top: 1px; overflow-wrap: anywhere; }
.shift.mine { background: var(--mine); color: var(--mine-ink); font-weight: 700; }
.shift .ini { display: none; }
.details { margin-top: 10px; }
.day-detail { display: none; }
.day-detail li.mine { background: var(--mine); border-radius: 6px; padding-left: 6px; }
.only-phone { display: none; }
.daybox { position: relative; min-height: 44px; text-align: center; padding: 0; cursor: pointer; margin: 0; font-weight: 400; }
.daybox input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.daybox span { display: block; padding: 10px 0; font-weight: 700; }
.daybox input:checked + span { background: var(--green); color: #fff; border-radius: 5px; }
.daybox input:focus-visible + span { outline: 3px solid #f2b632; }
.slotday .num { display: block; text-align: left; }
.slotday .closed { font-size: .72rem; }
.slotday.past { opacity: .5; }
.slot { display: flex; align-items: center; gap: 3px; margin: 2px 0; font-size: .72rem; font-weight: 400; cursor: pointer; line-height: 1.2; }
.slot input { margin: 0; flex: none; width: 18px; height: 18px; }
.slot .ini { display: none; font-weight: 700; }

@media (max-width: 640px) {
  .cell { min-height: 54px; }
  .slot .full { display: none; }
  .slot .ini { display: inline; }
  .slotday .closed { font-size: .62rem; }
  .shift .full { display: none; }
  .shift .ini { display: inline; }
  .shift { display: inline-block; margin-right: 2px; font-size: .68rem; }
  .only-phone { display: block; }
  .day-detail:target { display: block; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }
}
@media (min-width: 641px) {
  .cell { min-height: 96px; }
}
