body { font-family: system-ui, sans-serif; max-width: 1000px; margin: 1.5rem auto; padding: 0 1rem; color: #222; }
h1 { margin-bottom: .3rem; }
section { border: 1px solid #e3e3e3; border-radius: 10px; padding: 1rem 1.2rem; margin: 1.2rem 0; }
h2 { margin-top: 0; }
table { border-collapse: collapse; width: 100%; font-size: 14px; margin-bottom: .8rem; }
th, td { padding: .4rem .55rem; border-bottom: 1px solid #eee; text-align: left; }
th { background: #f5f5f5; }
input, select { padding: .4rem; margin: .15rem; }
.form-row { display: flex; flex-wrap: wrap; gap: .3rem; align-items: flex-end; margin-top: .5rem; }
.fld { display: inline-flex; flex-direction: column; font-size: 12px; color: #555; margin: .15rem .5rem .15rem 0; }
.fld input, .fld select { font-size: 14px; margin-top: 2px; padding: .35rem; }
button { padding: .4rem .9rem; border: none; border-radius: 6px; cursor: pointer; }
.add { background: #16706b; color: #fff; }
.del { background: #fbeaea; color: #a00; border: 1px solid #e5b7b7; font-size: 12px; padding: .2rem .5rem; }
.edit { background: #eef4ff; color: #06c; border: 1px solid #bcd; font-size: 12px; padding: .2rem .5rem; margin-right: .25rem; }
.archived { opacity: .5; }
.hint, small.hint { color: #888; }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
a { color: #16706b; }
.topbar { display: flex; align-items: center; justify-content: space-between; }
.menu-wrap { position: relative; }
.hamburger { font-size: 1.5rem; background: none; border: none; cursor: pointer; line-height: 1; padding: .3rem .6rem; }
.menu { display: none; position: absolute; right: 0; top: 2.5rem; background: #fff; border: 1px solid #ddd;
        border-radius: 8px; box-shadow: 0 4px 14px rgba(0,0,0,.14); min-width: 210px; z-index: 30; overflow: hidden; }
.menu.open { display: block; }
.menu a { display: block; padding: .65rem .95rem; text-decoration: none; color: #222; font-size: .95rem; }
.menu a:hover { background: #f2fbfa; }
.menu a.active { font-weight: 600; background: #f2fbfa; }
#who { color: #666; margin: .3rem 0; font-size: .9rem; }
#err { display: none; margin: .6rem 0; padding: .5rem .8rem; border-radius: 6px; background: #fbeaea; color: #a00; }

/* Mobile: let wide tables scroll instead of overflowing; tighten spacing. */
@media (max-width: 640px) {
  body { margin: .8rem auto; }
  h1 { font-size: 1.4rem; }
  section { padding: .8rem 1rem; }
  table { display: block; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
  .fld { margin: .15rem .35rem .15rem 0; }
  .fld input, .fld select { min-width: 0; }
  input, select { max-width: 100%; }
}
