:root {
  --ground: #f2f2f7;
  --surface: #ffffff;
  --text: #111114;
  --muted: #6b6b76;
  --line: #e5e5ea;
  --accent: #2f5bea;
  --ok-bg: #e7f6ec;
  --ok: #1c7c3c;
  --warn-bg: #fff3dc;
  --warn: #8a5200;
  --bad-bg: #fdecec;
  --bad: #b42318;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI",
    sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.4;
}
.wrap {
  max-width: 520px;
  margin: 0 auto;
  padding: 20px 16px 40px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
h1 {
  margin: 0;
  font-size: 28px;
  letter-spacing: -0.5px;
}
h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.2px;
}
.muted {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}
.card {
  background: var(--surface);
  border-radius: 20px;
  padding: 18px;
  box-shadow:
    0 1px 2px rgba(16, 24, 40, 0.04),
    0 8px 24px rgba(16, 24, 40, 0.06);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.head .logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--line);
}
.head .name {
  font-weight: 600;
  font-size: 17px;
}
.lang {
  margin-left: auto;
  display: flex;
  gap: 4px;
}
.lang button {
  min-width: 44px;
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.lang button[aria-pressed="true"] {
  background: #eaf0ff;
}
.student {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.4px;
}
.big {
  font-size: 40px;
  line-height: 44px;
  font-weight: 700;
  letter-spacing: -1px;
}
.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.chip {
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}
.chip.ok {
  background: var(--ok-bg);
  color: var(--ok);
}
.chip.warn {
  background: var(--warn-bg);
  color: var(--warn);
}
.chip.bad {
  background: var(--bad-bg);
  color: var(--bad);
}
.chip.neutral {
  background: #eaf0ff;
  color: #2447be;
}
.days {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 4px;
}
.day {
  aspect-ratio: 1;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}
.day.P {
  background: var(--ok-bg);
  color: var(--ok);
}
.day.A {
  background: var(--bad-bg);
  color: var(--bad);
}
.day.L {
  background: var(--warn-bg);
  color: var(--warn);
}
.legend {
  display: flex;
  gap: 14px;
  font-size: 12px;
  color: var(--muted);
  flex-wrap: wrap;
}
.row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.row:first-of-type {
  border-top: 0;
}
.row .title {
  font-weight: 600;
  font-size: 15px;
}
.row .sub {
  color: var(--muted);
  font-size: 13px;
}
.row .amt {
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
  text-align: right;
}
.foot {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}
.foot a {
  color: var(--accent);
}
.error {
  text-align: center;
  padding: 40px 12px;
}
.error h1 {
  font-size: 22px;
  margin-bottom: 8px;
}
