:root {
  --bg: #1a1512;
  --card: rgba(255, 255, 255, 0.03);
  --card-border: rgba(255, 255, 255, 0.1);
  --card-border-soft: rgba(255, 255, 255, 0.06);
  --ink: #ffffff;
  --ink-dim: rgba(255, 255, 255, 0.6);
  --ink-faint: rgba(255, 255, 255, 0.35);
  --ink-ghost: rgba(255, 255, 255, 0.22);
  --accent: #c9828d;
  --accent-soft: rgba(201, 130, 141, 0.12);
  --radius-lg: 24px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Unbounded', ui-sans-serif, system-ui, sans-serif;
  font-weight: 300;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-family: 'Unbounded', sans-serif;
  font-weight: 500;
  margin: 0;
}

.lang-kk,
.lang-kk .name-pill,
.lang-kk .message {
  font-family: 'Spectral', Georgia, serif;
}

.lang-kk .title {
  font-family: 'Pacifico', cursive;
  font-weight: 400;
  font-size: 26px;
  line-height: 1.5;
}

.lang-kk .message {
  font-weight: 700;
}

.lang-kk .message strong {
  font-weight: 800;
}

.brand .kk-part {
  font-family: 'Pacifico', cursive;
  font-weight: 400;
  font-size: 15px;
  text-transform: none;
  letter-spacing: normal;
  color: var(--accent);
}

.glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.glow::before {
  content: '';
  position: absolute;
  top: -6%;
  left: 50%;
  transform: translateX(-50%);
  width: 60vw;
  height: 60vw;
  max-width: 420px;
  max-height: 420px;
  border-radius: 50%;
  background: var(--accent);
  filter: blur(90px);
  opacity: 0.22;
}

.page {
  width: 100%;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 18px 48px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-faint);
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 26px;
}

.brand .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.brand-logo {
  width: 30px;
  height: auto;
  color: var(--ink-faint);
  flex-shrink: 0;
  transition: color 0.2s ease;
}

.brand:hover .brand-logo,
.brand:active .brand-logo {
  color: var(--accent);
}

.brand-logo svg {
  width: 100%;
  height: auto;
  display: block;
}

.card {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 40px 28px 34px;
  text-align: center;
  backdrop-filter: blur(20px);
}

.icon {
  width: 42px;
  height: 42px;
  margin: 0 auto 18px;
  color: var(--accent);
}

.icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.title {
  font-size: 20px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
}

.subtitle {
  font-size: 11px;
  font-weight: 300;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 22px;
}

.message {
  font-size: 14px;
  font-weight: 300;
  line-height: 1.75;
  color: var(--ink-dim);
  text-align: left;
}

.message p {
  margin: 0 0 14px;
}

.message p:last-child {
  margin-bottom: 0;
}

.message strong {
  color: var(--ink);
  font-weight: 500;
}

.message em {
  font-style: normal;
  font-weight: 500;
  color: var(--accent);
}

.divider {
  width: 32px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  margin: 22px auto;
  opacity: 0.55;
}

.footer-note {
  margin-top: 26px;
  font-size: 10px;
  font-weight: 300;
  color: var(--ink-faint);
  text-align: center;
  line-height: 1.6;
}

.message::after {
  content: '';
  display: block;
  clear: both;
}

.teacher-photo {
  float: right;
  width: 92px;
  margin: 0 0 10px 14px;
}

.teacher-photo img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.45));
}

.name-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 999px;
  padding: 6px 16px 6px 12px;
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.name-pill-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--accent);
}

.name-pill-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* --- print sheet --- */
.print-page {
  background: #fff;
  color: #1a1510;
  min-height: 100vh;
  padding: 24px;
  font-family: 'Unbounded', sans-serif;
  font-weight: 300;
}

.print-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
  flex-wrap: wrap;
}

.print-header h1 {
  font-size: 15px;
  font-weight: 500;
}

.print-btn {
  font-family: 'Unbounded', sans-serif;
  font-weight: 400;
  font-size: 11px;
  border: 1px solid #1a1510;
  background: #1a1510;
  color: #fff;
  border-radius: var(--radius-md);
  padding: 10px 16px;
  cursor: pointer;
}

.print-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 16px;
}

.print-card {
  border: 1px dashed #c9c0b2;
  border-radius: 14px;
  padding: 14px;
  text-align: center;
  page-break-inside: avoid;
  break-inside: avoid;
}

.print-card img {
  width: 100%;
  height: auto;
  border-radius: 6px;
}

.print-card .pname {
  font-size: 12px;
  font-weight: 500;
  margin-top: 10px;
}

.print-card .psubject {
  font-size: 10px;
  font-weight: 300;
  color: #6b6155;
}

.print-card .plink {
  font-size: 8px;
  font-weight: 300;
  color: #9a8f7e;
  margin-top: 4px;
  word-break: break-all;
}

@media print {
  .print-btn {
    display: none;
  }
  body {
    background: #fff;
  }
  .print-header {
    display: none;
  }
  .print-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8mm;
  }
  .print-card {
    aspect-ratio: 1 / 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4mm;
    padding: 5mm;
    border: 1px dashed #c9c0b2;
    border-radius: 0;
    page-break-inside: avoid;
    break-inside: avoid;
  }
  .print-card img {
    width: 72%;
    height: auto;
  }
  .print-card .pname {
    font-size: 11px;
    margin-top: 0;
  }
  .print-card .psubject,
  .print-card .plink {
    display: none;
  }
}

.not-found .card {
  max-width: 360px;
}

.site-footer {
  width: 100%;
  max-width: 440px;
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--card-border-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  font-size: clamp(8px, 2.2vw, 10px);
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--ink-faint);
}

.site-footer a {
  color: inherit;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 4px;
}

.site-footer .footer-line {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  white-space: nowrap;
  gap: 7px;
}

.site-footer .footer-logo {
  width: 17px;
  height: auto;
  color: var(--ink);
  flex-shrink: 0;
  transition: color 0.2s ease;
}

.site-footer .footer-line:hover .footer-logo,
.site-footer .footer-line:active .footer-logo {
  color: var(--accent);
}

.site-footer .footer-logo svg {
  width: 100%;
  height: auto;
  display: block;
}

.site-footer .dev-logo {
  width: 15px;
  height: auto;
  color: var(--ink);
  flex-shrink: 0;
  transition: transform 0.2s ease, filter 0.2s ease, color 0.2s ease;
}

.site-footer .footer-line:hover .dev-logo,
.site-footer .footer-line:active .dev-logo {
  color: var(--accent);
  transform: scale(1.25);
  filter: drop-shadow(0 0 6px rgba(167, 139, 250, 0.7));
}

.site-footer .dev-logo svg {
  width: 100%;
  height: auto;
  display: block;
}
