:root {
  font: 16px system-ui, sans-serif;
  color: #172e3d;
  background: #edf3f5;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  max-width: 42rem;
  margin: auto;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
}
header, .console { flex: none; }
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding: .45rem .7rem;
  background: #123047;
  color: white;
}
header div { display: flex; align-items: center; gap: .5rem; }
h1, h2 { font-size: 1.05rem; margin: 0; }
header a { color: white; display: grid; place-items: center; min-height: 44px; }
main { flex: 1; min-height: 0; overflow: auto; padding: .65rem; }
.setup, .observations, details {
  padding: .6rem;
  margin-bottom: .55rem;
  background: white;
  border: 1px solid #c5d3d9;
  border-radius: .45rem;
}
fieldset { border: 0; padding: 0; margin: .45rem 0 0; display: flex; gap: .5rem; }
fieldset label { display: flex; align-items: center; min-height: 44px; padding-right: .4rem; }
input[type="radio"] { margin-right: .4rem; accent-color: #07576b; width: 18px; height: 18px; }
.points { display: grid; grid-template-columns: 1fr 1fr; gap: .55rem; }
.points input { width: 100%; min-height: 44px; border: 1px solid #879da8; border-radius: .3rem; padding: .35rem; font: inherit; }
#project-details input { display: block; width: 100%; min-height: 44px; padding: .35rem; font: inherit; margin: .2rem 0 .55rem; }
#create-project { width: 100%; margin: .6rem 0; }
#project-list { display: grid; gap: .5rem; }
#project-list button { display: grid; text-align: left; gap: .35rem; padding: .7rem; }
#project-list small { font-weight: normal; }
.project-heading { display: flex; align-items: center; gap: .5rem; margin-bottom: .5rem; }
#project-title { overflow-wrap: anywhere; }
#confirm-time { width: 100%; min-height: 64px; font-size: 1.3rem; margin-top: .35rem; touch-action: manipulation; }
#projects, #observation { min-width: 0; }
table { width: 100%; border-collapse: collapse; text-align: center; font-variant-numeric: tabular-nums; }
th, td { border-bottom: 1px solid #d7e1e5; padding: .22rem; }
th { font-size: .85rem; }
button {
  font: inherit; font-weight: 650; min-height: 44px; padding: .3rem .45rem;
  border: 1px solid #879da8; border-radius: .35rem; background: white; color: inherit; cursor: pointer;
}
button:active { background: #cbebf1; color: #123047; }
:focus-visible { outline: 3px solid #bd5c07; outline-offset: 2px; }
button:disabled { opacity: .56; cursor: default; }
.primary { background: #07576b; color: white; border-color: #07576b; }
.console { border-top: 1px solid #879da8; padding: .35rem .4rem max(.4rem, env(safe-area-inset-bottom)); background: #e0edf0; }
.status, .entry { display: flex; align-items: center; justify-content: space-between; gap: .4rem; }
.status { min-height: 44px; margin-bottom: .25rem; }
#status { margin-right: auto; }
#saved { font-size: .75rem; white-space: nowrap; }
#stop-clock { font-size: .84rem; white-space: nowrap; }
#waiting button { width: 100%; }
#waiting button + button { margin-top: .25rem; }
.entry { background: white; padding: .3rem .45rem; border: 2px solid #07576b; margin-bottom: .25rem; }
#angle { font-size: 1.35rem; font-weight: 750; font-variant-numeric: tabular-nums; }
.pad, .actions { display: grid; gap: .25rem; }
.pad { grid-template-columns: repeat(3, 1fr); gap: .35rem; }
.pad button { min-height: 64px; font-size: 1.7rem; touch-action: manipulation; }
.pad button:active, .pad button.key-accepted { background: #07576b; color: white; }
.pad button:disabled { opacity: .5; }
.actions { grid-template-columns: 1fr 1.45fr; margin-top: .25rem; }
.actions button { min-height: 54px; touch-action: manipulation; }
#save { font-variant-numeric: tabular-nums; }
summary { cursor: pointer; min-height: 40px; padding: .45rem 0; font-weight: 650; }
pre { overflow: auto; font-size: .92rem; background: #edf3f5; padding: .5rem; }
#message { color: #862321; margin: .3rem 0; }
#message:empty { display: none; }
#metadata-error { color: #862321; }
#metadata-error:empty { display: none; }
#input-help { margin: .2rem 0 0; font-size: .78rem; }
.observations button { width: 100%; font-variant-numeric: tabular-nums; }
