@font-face {
  font-family: "Marck Script";
  src: url("/assets/MarckScript-Regular.ttf") format("truetype");
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #152e57;
  --quiet: #4d5e75;
  --line: #b9c2c7;
  --paper: #fffdf3;
  --page: #f6efe0;
  --rust: #933a24;
  --yellow: #f9d46a;
  font: 1rem/1.55 system-ui, sans-serif;
  background: var(--page);
  color: var(--ink);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 0; }
a { color: inherit; }
button, input, select, textarea { color: inherit; font: inherit; }
:focus-visible { outline: 3px solid #9d491e; outline-offset: 3px; }

.bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .8rem;
  width: min(1240px, calc(100% - 2rem));
  min-height: 68px;
  margin: auto;
  border-bottom: 1px solid #9dacc0;
}

.brand { display: flex; align-items: center; gap: .38rem; font-size: 1.18rem; font-weight: 750; text-decoration: none; }
.brand img { object-fit: contain; }
.visit { font-size: .88rem; font-weight: 640; }

.shell { width: min(1240px, calc(100% - 2rem)); margin: 2rem auto 6rem; }
.paper {
  padding: clamp(1rem, 3vw, 2rem);
  border: 1px solid #a2adbb;
  border-radius: .45rem;
  background-color: var(--paper);
  background-image: repeating-linear-gradient(0deg, #3c60910a 0 1px, transparent 1px 24px);
  box-shadow: 2px 5px 0 #1c355610;
}

.auth { width: min(100%, 490px); margin: 5vh auto; }
.auth form { display: grid; gap: .9rem; }
.auth button { justify-self: start; }

h1, h2, h3, p { margin: 0; }
h1 { font: 400 clamp(2.4rem, 6vw, 3.65rem)/1.03 "Marck Script", Georgia, serif; }
h2 { font-size: clamp(1.45rem, 3.8vw, 1.8rem); line-height: 1.2; }
h3 { font-size: 1.12rem; line-height: 1.2; }
.hint { color: var(--quiet); font-size: .9rem; }
small { color: var(--quiet); }
p + p { margin-top: .6rem; }
.mast { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 1rem; }
.mast .hint { margin-top: .28rem; overflow-wrap: anywhere; }
.mast-actions, .actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }

button {
  padding: .52rem .9rem;
  min-height: 42px;
  border: 1px solid #7c8fa9;
  border-radius: .28rem;
  color: var(--ink);
  background: #faf8ec;
  font-weight: 680;
  line-height: 1.25;
  cursor: pointer;
}
button:hover:not(:disabled) { background: #fdf0c9; }
button:disabled { opacity: .58; cursor: default; }
.primary { border-color: var(--ink); color: #fffdf8; background: var(--ink); }
.primary:hover:not(:disabled) { background: #28476f; }
.danger { color: var(--rust); border-color: #b88775; }
.plain { min-height: 38px; padding: .38rem .68rem; font-size: .87rem; }
.square { padding: .22rem .6rem; min-width: 38px; min-height: 38px; }

.sections { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: 1.2rem; }
.sections button { flex: 0 1 auto; }
.sections button[aria-current="page"] { border-color: #6e5628; background: #fae29c; box-shadow: inset 0 -3px #19416c; }
.workspace { margin-top: .7rem; min-height: 260px; }
.heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .65rem; margin-bottom: .7rem; }
.stack { display: grid; gap: .8rem; }
.spaced { margin-top: 1rem; }
.muted-row { border-left: 3px solid #e5bf5e; padding: .5rem .75rem; }
.card {
  min-width: 0;
  padding: clamp(.72rem, 2vw, 1rem);
  border: 1px solid var(--line);
  border-radius: .34rem;
  background: #fffef6;
}
.card-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .45rem; align-items: flex-start; margin-bottom: .55rem; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: .75rem; align-items: start; }
.form-grid > .full { grid-column: 1 / -1; }
.form-grid + .actions { margin-top: .75rem; }
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: .85rem; }

label { display: grid; align-content: start; gap: .26rem; min-width: 0; font-size: .87rem; font-weight: 680; }
input, select, textarea {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: .47rem .58rem;
  min-height: 42px;
  border: 1px solid #8898a9;
  border-radius: .29rem;
  background: #fffef8;
  font-size: 1rem;
  font-weight: 450;
}
textarea { min-height: 102px; resize: vertical; }
.check { display: flex; flex-direction: row; gap: .46rem; align-items: center; min-height: 44px; }
.check input { flex: none; padding: 0; width: 1.15rem; min-height: 1.15rem; accent-color: var(--ink); }
.regulation { min-height: min(50vh, 36rem); }

summary { cursor: pointer; min-height: 40px; padding: .32rem 0; font-weight: 670; }
details + details, details .card { margin-top: .55rem; }
.marks { display: inline-flex; flex-wrap: wrap; gap: .35rem; }
.tag { border: 1px solid #a9b5bb; border-radius: 2px; padding: .12rem .36rem; color: var(--quiet); font-size: .77rem; }
.tag.live { color: #245335; border-color: #a1ba9b; background: #e8f1da; }
.item-title { font-weight: 700; overflow-wrap: anywhere; }
.records { display: grid; gap: .5rem; }
.record { display: flex; justify-content: space-between; align-items: center; gap: .7rem; padding: .62rem .8rem; border-bottom: 1px solid var(--line); min-width: 0; }
.record > :first-child { min-width: 0; overflow-wrap: anywhere; }
.record:last-child { border-bottom: 0; }
.score-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(5.2rem, 8rem) auto; align-items: end; gap: .4rem; }
.score-row .item-title { align-self: center; }
.score-row > button { margin-bottom: 2px; }
.people-list { margin: 0; padding: 0; list-style: none; }
.people-list li { padding: .3rem .1rem; overflow-wrap: anywhere; border-bottom: 1px dashed #b7c0c7; }
.people-list li:last-child { border-bottom: 0; }
.notice { position: fixed; right: 1rem; bottom: max(1rem, env(safe-area-inset-bottom)); max-width: min(33rem, calc(100% - 2rem)); padding: .6rem .9rem; border: 1px solid var(--ink); border-radius: .25rem; background: var(--ink); color: white; box-shadow: 0 4px 14px #0002; z-index: 10; overflow-wrap: anywhere; }
.notice:empty { display: none; }
.notice.error { border-color: #642614; background: #792d1d; }
.modal {
  width: min(100% - 1.5rem, 34rem);
  color: var(--ink);
}
.modal::backdrop { background: #13244088; }

@media (max-width: 650px) {
  .shell { margin-top: 1.2rem; width: calc(100% - 1.2rem); }
  .bar { width: calc(100% - 1.2rem); min-height: 58px; }
  .sections button { flex: 1 1 auto; min-height: 42px; padding-inline: .55rem; font-size: .84rem; }
  .split { grid-template-columns: minmax(0, 1fr); }
}
