@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Ma+Shan+Zheng&display=swap");

:root {
  --paper: #f4efe4;
  --paper-deep: #e9e1d1;
  --card: #fbf8f0;
  --ink: #1b1d21;
  --ink-soft: #4a4e55;
  --jade: #2f7d6b;
  --jade-soft: #a8cdbd;
  --cinnabar: #c53a2c;
  --cinnabar-deep: #9e2c21;
  --gold: #c59a3c;
  --line: rgba(27, 29, 33, 0.16);
  --shadow: 0 18px 44px rgba(66, 52, 36, 0.12);
  --kai: "Ma Shan Zheng", "Kaiti SC", "STKaiti", "KaiTi", "Noto Serif SC", serif;
  --sans: "Inter", "PingFang SC", "Hiragino Sans GB", system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--paper);
  background-image: url("assets/paper-texture.svg");
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.5;
  min-height: 100vh;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.page-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(244, 239, 228, 0.9);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}

.seal-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background: var(--cinnabar);
  color: #fff;
  font-family: var(--kai);
  font-size: 19px;
  flex: 0 0 auto;
}

.brand-mark-img {
  display: block;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
}

.brand-name {
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0;
}

.top-nav {
  display: flex;
  gap: 4px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang-switch {
  display: flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(27, 29, 33, 0.04);
}

.lang-btn {
  min-height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
}

.lang-btn.is-active {
  background: var(--ink);
  color: #fff;
}

.nav-link {
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font-weight: 600;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 8px;
}

.nav-link:hover {
  color: var(--ink);
  background: rgba(27, 29, 33, 0.06);
}

main {
  flex: 1;
}

.view {
  display: none;
  position: relative;
}

.view.is-active {
  display: block;
  animation: view-in 0.25s ease;
}

.view.is-active::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: url("assets/brush-marks.svg");
  background-size: 520px auto;
  background-position: center top;
  background-repeat: no-repeat;
  opacity: 0.34;
  pointer-events: none;
}

@keyframes view-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

::selection {
  background: var(--jade);
  color: #fff;
}

:focus-visible {
  outline: 3px solid var(--jade);
  outline-offset: 2px;
}

.btn:active,
.icon-btn:active,
.option-btn:active,
.surname-btn:active,
.lang-btn:active,
.nav-link:active {
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 26px 16px 72px;
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  font-weight: 700;
  color: var(--cinnabar);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--cinnabar);
  color: #fff;
}

.btn-primary:hover {
  background: var(--cinnabar-deep);
  box-shadow: 0 8px 18px rgba(197, 58, 44, 0.24);
}

.btn-ink {
  background: var(--ink);
  color: #fff;
}

.btn-ink:hover {
  background: #303238;
}

.btn-ghost {
  background: var(--card);
  border-color: var(--line);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--jade);
  color: var(--jade);
}

.btn-large {
  min-height: 52px;
  padding: 0 26px;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
}

.icon-btn:hover {
  border-color: var(--jade);
  color: var(--jade);
}

.icon-btn svg {
  width: 20px;
  height: 20px;
}

.text-btn {
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font-weight: 600;
  min-height: 44px;
  padding: 0 8px;
  border-radius: 8px;
}

.text-btn:hover {
  color: var(--cinnabar);
}

.is-hidden {
  display: none !important;
}

/* Quiz */

.quiz-shell {
  max-width: 780px;
}

.quiz-intro {
  min-height: 62vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 28px 0;
}

.quiz-intro h1,
.result-copy h2,
.card-head h2 {
  letter-spacing: 0;
}

.quiz-intro h1 {
  font-size: clamp(34px, 9vw, 58px);
  line-height: 1.08;
  margin: 12px 0 16px;
}

.lead-copy {
  max-width: 560px;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.65;
  margin: 0;
}

.quiz-intro .btn {
  align-self: flex-start;
  margin-top: 24px;
}

.quiz-flow {
  padding: 22px 0;
}

.quiz-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.progress-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
  flex: 1;
  justify-content: center;
}

.progress-track {
  height: 8px;
  border-radius: 99px;
  background: rgba(27, 29, 33, 0.1);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--jade);
  transition: width 0.25s ease;
}

.question-title {
  font-size: clamp(24px, 6vw, 36px);
  line-height: 1.25;
  margin: 30px 0 22px;
  letter-spacing: 0;
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.option-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  min-height: 128px;
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  text-align: left;
  box-shadow: 0 2px 0 rgba(27, 29, 33, 0.05);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.option-btn:hover {
  border-color: var(--jade);
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(47, 125, 107, 0.14);
}

.option-emoji {
  font-size: 32px;
  line-height: 1;
}

/* Result */

.result-shell {
  max-width: 1080px;
  display: grid;
  gap: 30px;
}

.result-copy {
  padding: 10px 2px;
}

.result-copy h2 {
  font-size: clamp(30px, 7vw, 46px);
  line-height: 1.15;
  margin: 10px 0 4px;
}

.result-name-line {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 18px 0 8px;
}

.result-name {
  font-family: var(--kai);
  font-size: clamp(64px, 18vw, 118px);
  line-height: 1.05;
}

.seal-result {
  width: 50px;
  height: 50px;
  font-size: 26px;
}

.result-pinyin {
  margin: 6px 0;
  color: var(--jade);
  font-size: 20px;
  font-weight: 700;
}

.result-meaning {
  max-width: 540px;
  margin: 10px 0 0;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.65;
}

.result-surname {
  max-width: 540px;
  margin: 8px 0 0;
  color: var(--cinnabar);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.55;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.share-panel {
  align-self: start;
  width: 100%;
}

.share-card {
  width: 100%;
  max-width: 440px;
  aspect-ratio: 4 / 5;
  margin: 0 auto;
}

.share-card-inner {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.share-card-inner::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(197, 58, 44, 0.5);
  border-radius: 4px;
  pointer-events: none;
}

.share-top {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.share-brand {
  color: var(--cinnabar);
  font-weight: 700;
}

.share-seal {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 5px;
  background: var(--cinnabar);
  color: #fff;
  font-family: var(--kai);
  font-size: 18px;
}

.share-brand-img {
  display: block;
  width: 34px;
  height: 34px;
}

.share-name {
  position: relative;
  font-family: var(--kai);
  font-size: clamp(64px, 21vw, 120px);
  line-height: 1.05;
  text-align: center;
  margin: 8px 0 0;
}

.share-pinyin {
  position: relative;
  text-align: center;
  color: var(--jade);
  font-weight: 700;
  font-size: 18px;
}

.share-persona {
  position: relative;
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  margin-top: 10px;
}

.share-meaning {
  position: relative;
  max-width: 320px;
  margin: 8px auto 12px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.55;
}

.share-surname {
  position: relative;
  margin-top: 4px;
  text-align: center;
  color: var(--cinnabar);
  font-size: 13px;
  font-weight: 700;
}

.share-foot {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
}

.share-url {
  color: var(--cinnabar);
}

.share-watermark {
  position: absolute;
  right: 10px;
  bottom: 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--ink);
  opacity: 0.16;
}

.share-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}

/* Card page */

.card-shell {
  max-width: 1000px;
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
}

.card-head h2 {
  font-size: clamp(28px, 6vw, 42px);
  line-height: 1.15;
  margin: 8px 0 0;
}

.script-toggle {
  display: flex;
  flex: 0 0 auto;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(27, 29, 33, 0.04);
}

.script-toggle button {
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-soft);
  font-weight: 600;
}

.script-toggle button.is-active {
  background: var(--ink);
  color: #fff;
}

.card-hero {
  display: grid;
  gap: 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  box-shadow: var(--shadow);
}

.name-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 200px;
}

.card-name {
  font-family: var(--kai);
  font-size: clamp(74px, 20vw, 152px);
  line-height: 1.12;
  text-align: center;
}

.seal-card {
  width: 46px;
  height: 46px;
  font-size: 24px;
}

.stroke-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stroke-stage {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 180px;
  padding: 14px;
  border: 1px dashed rgba(27, 29, 33, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(rgba(244, 239, 228, 0.55), rgba(244, 239, 228, 0.55)),
    url("assets/paper-texture.svg");
}

.hw-box {
  width: 128px;
  height: 128px;
  display: grid;
  place-items: center;
}

.hw-box svg {
  width: 100%;
  height: 100%;
}

.fallback-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.35);
}

.fallback-char {
  font-family: var(--kai);
  font-size: 80px;
  line-height: 1;
  opacity: 0;
}

.fallback-box.animate .fallback-char {
  animation: ink-fade 0.6s ease forwards;
}

@keyframes ink-fade {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.stroke-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.audio-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 18px;
  padding: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.panel-title {
  margin: 0 0 4px;
  font-weight: 700;
}

.audio-info p:last-child {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.55;
}

.audio-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.card-details {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.detail-block,
.detail-row {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.detail-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 0;
  overflow: hidden;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px;
}

.detail-item + .detail-item {
  border-left: 1px solid var(--line);
}

.detail-label {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.char-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.surname-shell {
  max-width: 1080px;
}

.surname-head {
  max-width: 780px;
  margin: 0 auto 28px;
  text-align: center;
}

.surname-head .lead-copy {
  margin: 0 auto;
}

.surname-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.surname-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.surname-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-height: 148px;
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  text-align: left;
  box-shadow: 0 2px 0 rgba(27, 29, 33, 0.05);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.surname-btn:hover {
  border-color: var(--cinnabar);
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(197, 58, 44, 0.14);
}

.surname-char {
  font-family: var(--kai);
  font-size: 44px;
  line-height: 1;
}

.surname-pinyin {
  color: var(--jade);
  font-size: 14px;
  font-weight: 700;
}

.surname-origin {
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.surname-tag {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 3px 8px;
  border-radius: 99px;
  background: var(--cinnabar);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.surname-story {
  margin: 8px 0 0;
  color: var(--ink-soft);
  line-height: 1.65;
}

.char-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  text-align: center;
}

.char-glyph {
  font-family: var(--kai);
  font-size: 46px;
  line-height: 1;
}

.char-pinyin {
  color: var(--jade);
  font-size: 14px;
  font-weight: 700;
}

.char-meaning {
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.4;
}

.poem-text {
  margin: 8px 0 6px;
  font-family: var(--kai);
  font-size: 22px;
  line-height: 1.7;
}

.poem-source {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
}

.card-description {
  margin: 8px 0 0;
  color: var(--ink-soft);
  line-height: 1.65;
}

.save-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.text-danger {
  color: var(--cinnabar);
}

/* Footer */

.site-footer {
  padding: 26px 16px 40px;
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--ink-soft);
  font-size: 13px;
}

.site-footer p {
  margin: 4px 0;
}

.footer-note {
  opacity: 0.75;
}

/* Modals */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(18, 19, 20, 0.52);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.modal-backdrop.is-hidden {
  display: none;
}

.modal {
  width: min(100%, 430px);
  max-height: 90vh;
  overflow: auto;
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 60px rgba(18, 19, 20, 0.28);
}

.modal h3 {
  margin: 8px 0 10px;
  font-size: 22px;
  line-height: 1.3;
  letter-spacing: 0;
}

.modal p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.55;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.choice-list {
  display: grid;
  gap: 10px;
  margin: 16px 0 12px;
}

.choice-list label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  font-weight: 600;
}

.choice-list input {
  accent-color: var(--jade);
}

textarea {
  width: 100%;
  min-height: 90px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  resize: vertical;
}

/* Toast */

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 60;
  max-width: min(90vw, 420px);
  padding: 12px 18px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  opacity: 0;
  transform: translateX(-50%) translateY(16px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Print / PDF */

.print-card {
  display: none;
}

body.printing .topbar,
body.printing .view,
body.printing .site-footer,
body.printing .modal-backdrop,
body.printing .toast {
  display: none !important;
}

body.printing .print-card {
  display: block !important;
  max-width: 720px;
  margin: 0 auto;
  padding: 34px;
  color: #111;
  background: #fff;
}

.print-card .print-head {
  display: flex;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 2px solid #111;
  font-weight: 700;
}

.print-card h1 {
  font-family: var(--kai);
  font-size: 64px;
  line-height: 1.1;
  text-align: center;
  margin: 20px 0 6px;
}

.print-pinyin {
  text-align: center;
  color: #2f7d6b;
  font-weight: 700;
  margin: 0;
}

.print-persona {
  text-align: center;
  font-weight: 700;
  font-size: 18px;
  margin: 10px 0;
}

.print-meaning {
  text-align: center;
  line-height: 1.55;
  margin: 0 auto 18px;
  max-width: 520px;
}

.print-chars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.print-char {
  border: 1px solid #d8ccb6;
  border-radius: 8px;
  padding: 14px;
  text-align: center;
}

.print-char strong {
  display: block;
  font-family: var(--kai);
  font-size: 42px;
}

.print-char span,
.print-char em {
  display: block;
  font-size: 12px;
  color: #4a4e55;
  font-style: normal;
}

.print-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 18px 0;
}

.print-facts p {
  margin: 0;
  border: 1px solid #d8ccb6;
  border-radius: 8px;
  padding: 12px;
}

.print-surname {
  margin: 12px 0;
  padding: 12px;
  border: 1px solid #d8ccb6;
  border-radius: 8px;
}

.print-surname strong {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
}

.print-facts strong {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
}

blockquote {
  margin: 18px 0;
  padding: 16px;
  border-left: 4px solid #c53a2c;
  background: #faf7f0;
  font-family: var(--kai);
  font-size: 20px;
}

blockquote cite {
  display: block;
  margin-top: 6px;
  font-family: var(--sans);
  font-size: 13px;
  color: #4a4e55;
}

.print-description {
  line-height: 1.6;
}

.print-foot {
  margin-top: 26px;
  padding-top: 12px;
  border-top: 1px solid #d8ccb6;
  text-align: center;
  font-weight: 700;
}

/* Desktop */

@media (max-width: 640px) {
  .topbar {
    flex-wrap: wrap;
    row-gap: 8px;
  }

  .top-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .top-nav {
    gap: 2px;
  }

  .nav-link {
    padding: 0 10px;
  }
}

@media (min-width: 760px) {
  .topbar {
    padding: 12px 28px;
  }

  .container {
    padding: 40px 28px 88px;
  }

  .result-shell {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 440px);
    align-items: center;
  }

  .share-panel {
    justify-self: end;
  }

  .card-hero {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    align-items: center;
  }

  .audio-panel {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .audio-info {
    max-width: 46%;
  }

  .card-details {
    grid-template-columns: 1fr 1fr;
  }

  .surname-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .detail-block:first-child,
  .detail-block:last-child {
    grid-column: 1 / -1;
  }
}
