:root {
  --ink: #49392c;
  --green: #416953;
  --line: #dfceb1;
  --cream: #fffaf0;
  --gold: #c59847;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: radial-gradient(ellipse at 0 0, #e6eedc, transparent 50%), #faf4e7;
  color: var(--ink);
  font-family: 'KaiTi-CJK', 'LXGW WenKai Lite', serif;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input {
  touch-action: manipulation;
}
button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 17px;
  background: #fffdf7;
  color: var(--green);
  cursor: pointer;
}
button:hover {
  background: #edf1e4;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
button:focus-visible,
a:focus-visible,
input:focus,
select:focus {
  outline: 3px solid #b58a3b;
  outline-offset: 3px;
}
.primary {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
.primary:hover {
  background: #30513f;
}
.plain {
  background: transparent;
  border: 0;
}
.secondary {
  background: #f5ead5;
  color: #664b29;
}
.link {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  padding: 12px 20px;
  min-height: 46px;
}
nav {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: auto;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
}
nav > a {
  color: var(--green);
  text-decoration: none;
}
nav > span {
  font-size: 17px;
}
main {
  max-width: 1080px;
  margin: auto;
  padding: 30px 24px;
}
header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 12px 0 32px;
}
header > img {
  width: 118px;
  height: 118px;
  object-fit: contain;
}
h1 {
  font-size: 35px;
  font-weight: 500;
  letter-spacing: 2px;
  margin: 10px 0;
}
h2 {
  font-size: 25px;
  font-weight: 500;
  margin: 15px 0;
}
p {
  line-height: 1.7;
}
.eyebrow {
  font-size: 12px;
  letter-spacing: 2px;
  color: #8b7c55;
  margin: 0;
}
.methods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}
.panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fffdf6;
  padding: 30px;
  box-shadow: 0 10px 30px #7d65230b;
}
.step {
  display: inline-block;
  background: #eff3e5;
  color: #56704a;
  font-size: 12px;
  border: 1px solid #d4dfc0;
  border-radius: 16px;
  padding: 4px 12px;
  letter-spacing: 2px;
}
.code-panel .step {
  background: #fff0d0;
  color: #9a7433;
  border-color: #ead1a2;
}
.panel > p {
  color: #86765b;
  font-size: 15px;
}
.google-panel {
  min-height: 370px;
}
.google-panel #google-button {
  margin: 26px 0 15px;
  min-height: 44px;
}
#google-unavailable {
  background: #f4f0e7;
  border-radius: 12px;
  padding: 14px;
  font-size: 14px;
  color: #836d4a;
  line-height: 1.8;
}
.small {
  font-size: 12px !important;
  color: #8a7b63;
  line-height: 1.8;
}
.code-panel form {
  display: grid;
  gap: 12px;
}
label {
  font-size: 14px;
}
input,
select {
  min-height: 44px;
  background: #fffdf7;
  border: 1px solid #d7c8ae;
  border-radius: 10px;
  padding: 9px 12px;
  min-width: 0;
}
#student-code {
  width: 100%;
  font-family: ui-monospace, monospace;
  letter-spacing: 8px;
  font-size: 30px;
  text-align: center;
  height: 65px;
  color: #79512d;
  background: #fffcf2;
}
#student-code::placeholder {
  letter-spacing: 6px;
  color: #c3b493;
}
.show-code {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: #8b7a5a;
}
.show-code input {
  width: 16px;
  height: 16px;
  min-height: 16px;
}
.keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.keypad button {
  font-family: Georgia, serif;
  font-size: 27px;
  min-height: 59px;
  border-radius: 12px;
  box-shadow: 0 2px 0 #ddcfb8;
  color: #5e604a;
}
.keypad .small-key {
  font-family: inherit;
  font-size: 15px;
}
.keypad button:active {
  transform: translateY(2px);
  box-shadow: none;
}
#code-submit {
  font-size: 18px;
  min-height: 51px;
}
#message {
  padding: 0 12px;
  margin: 0 0 20px;
  text-align: center;
  min-height: 0;
}
#message:empty {
  display: none;
}
#message.error {
  color: #a32f22;
  background: #fff0df;
  border: 1px solid #e5c5a1;
  border-radius: 12px;
  padding: 14px;
}
.notice {
  background: #f8ecd3;
  border: 1px solid #dfc798;
  border-radius: 12px;
  padding: 13px 18px;
  margin-bottom: 20px;
  font-size: 13px;
  line-height: 1.7;
}
.readiness {
  margin: 30px 0 0;
  border-top: 1px solid var(--line);
  padding: 22px 4px;
  color: #826e50;
  font-size: 14px;
  line-height: 1.9;
}
.readiness summary {
  cursor: pointer;
  font-size: 16px;
}
.readiness a,
footer a {
  color: var(--green);
}
code {
  font-family: ui-monospace, monospace;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.configuration-chip {
  display: inline-block;
  margin: 5px 8px 0 0;
  padding: 4px 10px;
  background: #e8eddc;
  border-radius: 8px;
  font-size: 12px;
}
.configuration-chip.missing {
  background: #f5e5cf;
  color: #946333;
}
.identity {
  display: flex;
  gap: 25px;
  align-items: center;
  justify-content: center;
  background: #fffdf4;
  border: 1px solid #d6c494;
  padding: 32px;
  border-radius: 24px;
  margin: 0 0 25px;
}
.identity h2 {
  font-size: 32px;
}
.identity p {
  overflow-wrap: anywhere;
}
.portrait {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: #efe1bc;
  border: 6px double #c59a4d;
  flex: none;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}
.portrait img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.portrait span {
  font-size: 45px;
  color: #ac8742;
}
.actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.teacher-panel {
  margin: 25px 0;
}
.teacher-panel form {
  display: grid;
  gap: 12px;
  max-width: 400px;
}
.filters {
  display: flex;
  gap: 14px;
  align-items: end;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.filters label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 150px;
}
.roster-row {
  display: grid;
  grid-template-columns: 24px minmax(130px, 1fr) minmax(190px, 1.6fr) auto;
  gap: 12px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid #e6dac4;
  font-size: 14px;
}
.roster-row .choose {
  width: 18px;
  height: 18px;
  min-height: 18px;
}
.roster-row p {
  margin: 2px 0;
  font-size: 12px;
  color: #958164;
}
.roster-row .email-input {
  width: 100%;
  font-family: system-ui, sans-serif;
  font-size: 13px;
}
.roster-row .row-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.roster-row button {
  padding: 7px 10px;
  font-size: 12px;
}
.issued-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
  margin-top: 18px;
}
.login-card {
  border: 2px solid #c7ab72;
  background: #fffaf0;
  border-radius: 14px;
  padding: 20px;
  text-align: center;
  break-inside: avoid;
}
.login-card h4 {
  font-size: 23px;
  margin: 0 0 8px;
}
.login-card .number {
  font:
    700 24px/1.8 ui-monospace,
    monospace;
  letter-spacing: 3px;
  color: #80502d;
  user-select: all;
}
.login-card p {
  font-size: 11px;
  margin: 6px 0;
  color: #8e7851;
}
.login-card .site {
  font:
    12px/1.6 system-ui,
    sans-serif;
}
.assessment-entry {
  margin: 15px 0;
}
footer {
  text-align: center;
  color: #a08b66;
  font-size: 12px;
  margin: 30px 0 5px;
  line-height: 1.9;
}
[hidden] {
  display: none !important;
}
@media (max-width: 720px) {
  main {
    padding: 20px 16px;
  }
  nav {
    padding: 0 12px;
  }
  nav > span {
    font-size: 14px;
  }
  nav > a {
    font-size: 13px;
  }
  header {
    gap: 13px;
    justify-content: flex-start;
    padding-bottom: 22px;
  }
  header > img {
    width: 75px;
    height: 90px;
  }
  h1 {
    font-size: 25px;
    letter-spacing: 1px;
  }
  header p {
    font-size: 13px;
  }
  .methods {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .panel {
    padding: 24px;
    border-radius: 20px;
  }
  .google-panel {
    min-height: 0;
  }
  h2 {
    font-size: 23px;
  }
  .google-panel #google-button {
    margin: 20px 0 12px;
  }
  .identity {
    padding: 23px 18px;
    gap: 16px;
    flex-direction: column;
    text-align: center;
  }
  .identity h2 {
    font-size: 27px;
  }
  .portrait {
    width: 110px;
    height: 110px;
  }
  .identity .actions {
    justify-content: center;
  }
  .roster-row {
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 8px;
  }
  .roster-row .email-editor,
  .roster-row .row-actions {
    grid-column: 2;
  }
  .roster-row .row-actions button {
    flex: 1;
  }
  .issued-cards {
    grid-template-columns: 1fr 1fr;
  }
  .login-card {
    padding: 15px 8px;
  }
  .login-card .number {
    font-size: 20px;
    letter-spacing: 1px;
  }
  .login-card h4 {
    font-size: 21px;
  }
  .filters label {
    min-width: 0;
    flex: 1;
  }
  .filters {
    gap: 8px;
  }
  .readiness {
    font-size: 13px;
  }
  #student-code {
    font-size: 28px;
    letter-spacing: 6px;
  }
}
@media (max-width: 360px) {
  nav .plain {
    padding: 6px;
    font-size: 12px;
  }
  header > img {
    width: 57px;
  }
  h1 {
    font-size: 22px;
  }
  .panel {
    padding: 20px;
  }
  #student-code {
    font-size: 25px;
    letter-spacing: 4px;
  }
  .issued-cards {
    grid-template-columns: 1fr;
  }
  .keypad button {
    min-height: 54px;
  }
}
@media print {
  body {
    background: white;
  }
  body > * {
    display: none !important;
  }
  body > main {
    display: block !important;
    padding: 0;
    margin: 0;
    max-width: none;
  }
  main > * {
    display: none !important;
  }
  #teacher-panel {
    display: block !important;
    border: 0;
    box-shadow: none;
    padding: 0;
  }
  #teacher-panel > * {
    display: none !important;
  }
  #issued-section {
    display: block !important;
  }
  #issued-section > h3 {
    display: none;
  }
  .issued-cards {
    grid-template-columns: repeat(3, 1fr);
    gap: 10mm;
  }
  .login-card {
    border: 1px solid #777;
    border-radius: 0;
    background: white;
    color: black;
    padding: 8mm 4mm;
  }
  .login-card h4 {
    font-size: 19pt;
  }
  .login-card .number {
    font-size: 18pt;
    color: black;
  }
  .login-card p {
    color: black;
  }
  nav,
  footer {
    display: none !important;
  }
}
