/* Stationery design. Base rules, responsive layouts, and print styles. */
:root {
  --ink: #272d2b;
  --muted: #5e655d;
  --pale: #eceee5;
  --serif: Georgia,'Batang','바탕',serif;
  --sans: Arial,'Malgun Gothic','맑은 고딕',sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 28px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.7 var(--sans);
  -webkit-font-smoothing: antialiased;
}

button, input, select {
  font: inherit;
  color: inherit;
}

button, a, summary {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

button:disabled {
  opacity: .55;
  cursor: wait;
}

a {
  color: inherit;
  text-underline-offset: 5px;
}

button, a, input, select, summary {
  outline-offset: 5px;
}

:focus-visible {
  outline: 2px solid var(--accent);
}

[hidden] {
  display: none!important;
}

::selection {
  background: #e8c9b8;
  color: var(--ink);
}

p {
  margin-top: 0;
}

h1, h2, h3 {
  margin-top: 0;
}

h2 {
  font: normal 36px/1.35 var(--serif);
  letter-spacing: -1.2px;
  margin-bottom: 0;
}

h3 {
  font-size: 16px;
  line-height: 1.5;
}

.shell {
  max-width: 1320px;
  padding-left: 56px;
  padding-right: 56px;
  margin: auto;
}

.header {
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}

.site-title {
  display: flex;
  align-items: center;
  gap: 22px;
  text-decoration: none;
}

.header nav {
  display: flex;
  gap: 30px;
  align-items: center;
}

.header nav>a {
  text-decoration: none;
}

.header nav>a:hover {
  color: var(--accent);
}

.language {
  border: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  font-size: 14px;
  padding: 9px 13px;
  min-height: 42px;
  white-space: nowrap;
}

.language span {
  margin-left: 16px;
}

.hero {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 65px;
  align-items: center;
  padding: 56px 0 50px;
}

.hero-copy {
  padding: 5px 0;
}

.eyebrow {
  font-size: 14px;
  letter-spacing: 1.8px;
  line-height: 1.8;
  font-weight: 600;
  margin: 0 0 22px;
}

.hero .eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  letter-spacing: 1.9px;
}

h1 {
  font: normal clamp(58px,5.7vw,80px)/1.02 var(--serif);
  letter-spacing: -4px;
  margin: 0 0 24px;
}

h1 em {
  font-weight: normal;
  color: var(--accent);
}

.lede {
  color: var(--muted);
  margin: 0 0 24px;
}

.hero-link {
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  gap: 36px;
  align-items: center;
  padding: 0 0 8px;
  border-bottom: 1px solid var(--ink);
}

.hero-link>span:last-child {
  font-size: 22px;
  font-weight: normal;
}

.hero-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.hero-visual {
  margin: 0;
  position: relative;
  align-self: stretch;
  min-height: 330px;
}

.hero-visual img {
  display: block;
  position: absolute;
  object-fit: cover;
}

.studio {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  padding: 34px 0 64px;
  align-items: start;
}

.intro, .preview-column {
  min-width: 0;
}

.intro {
  padding-right: 0;
}

.preview-column {
  border-left: 1px solid var(--line);
  padding-left: 40px;
}

.panel-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 25px;
}

.panel-heading h2 {
  font-size: 29px;
  letter-spacing: -1px;
}

#name-form {
  scroll-margin-top: 28px;
}

.step-label {
  font-size: 14px;
  letter-spacing: 1.2px;
  font-weight: bold;
}

.input-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.field {
  min-width: 0;
}

.field label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 7px;
}

.optional {
  font-size: 14px;
  font-weight: 400;
  color: var(--muted);
  margin-left: 5px;
}

input:not([type=radio]), select {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 11px 12px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 2px;
}

input::placeholder {
  color: #898c84;
}

input:focus, select:focus {
  border-color: var(--ink);
}

#given, #family {
  font-size: 17px;
}

.small-fields {
  margin-top: 16px;
}

.small-fields select {
  font-size: 14px;
  padding: 8px 9px;
}

.gender-field {
  margin-top: 16px;
}

.gender-field select {
  font-size: 14px;
}

#gender-hint {
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
  margin: 6px 0 0;
}

.pronunciation-details {
  font-size: 14px;
  color: var(--muted);
  margin: 13px 0 22px;
}

.pronunciation-details summary {
  cursor: pointer;
  min-height: 44px;
  padding: 10px 0;
}

.pronunciation-details[open] summary {
  margin-bottom: 8px;
}

.pronunciation-details p {
  line-height: 1.8;
}

.pronunciation-details input {
  font-size: 14px;
  min-height: 42px;
}

.theme-field {
  margin: 0;
  padding: 0;
  border: 0;
}

.theme-field legend {
  padding: 0;
  margin-bottom: 12px;
}

.theme-options {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 8px;
}

.theme-options label {
  position: relative;
  cursor: pointer;
}

.theme-options input {
  position: absolute;
  opacity: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}

.theme-options span {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 2px;
  font-size: 14px;
  background: transparent;
  transition: background .15s,border-color .15s;
}

.theme-options b {
  font-size: 18px;
  font-weight: 400;
}

.theme-options i {
  font-style: normal;
}

.theme-options input:checked+span {
  background: #f0e2d8;
  border-color: #b45a43;
  color: #893820;
}

.theme-options input:focus-visible+span {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.theme-options label:hover span {
  border-color: #aaafa0;
}

.style-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
  margin: 13px 0 17px;
}

.style-row select {
  width: auto;
  max-width: 64%;
  min-height: 44px;
  border: 0;
  padding: 5px 0;
  background: transparent;
  font-size: 14px;
}

.primary {
  border: 1px solid var(--green);
  background: var(--green);
  color: var(--white);
  border-radius: 2px;
  padding: 16px 20px;
  min-height: 54px;
  font-size: 14px;
  transition: background .2s;
}

.primary:hover {
  background: #3e5147;
}

.create {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.create>span:last-child {
  font-size: 24px;
  line-height: 1;
}

.card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--muted);
}

.card-topline>span:last-child {
  font-size: 20px;
  line-height: 1;
}

.card-stage {
  position: relative;
}

.name-card {
  position: relative;
  color: var(--ink);
  padding: 24px 26px 18px;
  min-height: 400px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.card-label {
  justify-content: space-between;
  gap: 10px;
}

.card-label>span:last-child {
  color: var(--accent);
}

.card-ornament {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 5px;
}

.card-hangul {
  font: normal clamp(48px,5vw,70px)/1.3 var(--serif);
  letter-spacing: 9px;
  margin: 4px -9px 6px 0;
  text-align: center;
  word-break: keep-all;
}

.card-hanja {
  font: normal 22px/1.5 var(--serif);
  letter-spacing: 11px;
  margin-right: -11px;
  text-align: center;
  color: #6f7669;
}

.card-roman {
  text-align: center;
  color: var(--muted);
  margin-top: 7px;
}

.card-rule {
  height: 1px;
  margin: 23px auto 17px;
}

.card-meaning {
  font: normal 19px/1.5 var(--serif);
  text-align: center;
  color: var(--accent);
  overflow-wrap: anywhere;
}

.card-bottom {
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 12px;
  margin-top: auto;
  color: var(--muted);
}

.source-name {
  overflow-wrap: anywhere;
}

.name-guidance {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.9;
  margin: 20px 0 13px;
}

.quick-choices>p {
  font-size: 14px;
  margin: 0 0 10px;
  color: var(--muted);
}

.quick-choice-grid {
  display: grid;
  gap: 8px;
}

.quick-choice-grid button {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 2px;
}

.quick-choice-grid button:hover {
  background: var(--pale);
  border-color: var(--green);
}

.quick-choice-grid strong {
  display: block;
  font: normal 19px var(--serif);
}

.quick-choice-grid small {
  display: block;
  color: var(--muted);
  margin-top: 7px;
  overflow-wrap: anywhere;
}

.preview-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 17px;
}

.secondary {
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 2px;
  padding: 10px 13px;
  font-size: 14px;
  min-height: 44px;
}

.secondary:hover {
  background: var(--pale);
  border-color: var(--green);
}

.preview-actions .secondary {
  flex: 1;
}

.text-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  padding: 8px 0;
  min-height: 40px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 32px;
  margin-bottom: 34px;
}

.section-heading .eyebrow {
  color: var(--accent);
  margin-bottom: 10px;
  font-size: 14px;
}

.section-intro {
  font-size: 14px;
  line-height: 1.85;
  color: var(--muted);
  max-width: 330px;
  margin: 0;
}

.method-section, .examples-section, .result-section {
  padding: 58px 0;
  border-top: 1px solid var(--line);
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(4,1fr);
}

.method-grid article {
  padding: 0 25px;
  border-left: 1px solid var(--line);
}

.method-grid article:first-child {
  padding-left: 0;
  border: 0;
}

.method-grid article:last-child {
  padding-right: 0;
}

.method-no {
  font: normal 30px var(--serif);
  color: #a7ae9f;
}

.method-grid h3 {
  font-size: 14px;
  margin: 15px 0 12px;
}

.method-grid p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.9;
  margin-bottom: 18px;
}

.method-example {
  font-size: 14px;
  color: var(--accent);
}

.inline-link {
  display: inline-block;
  font-size: 14px;
  margin-top: 28px;
}

.example-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 15px;
}

.example-card {
  border: 1px solid transparent;
  border-radius: 0;
  text-align: left;
  padding: 23px;
  transition: transform .2s,border-color .2s;
}

.example-card:hover {
  transform: translateY(-3px);
  border-color: #9b9f91;
}

.example-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
}

.example-card strong {
  font: normal 29px/1.5 var(--serif);
  display: block;
  margin: 20px 0 9px;
}

.example-hanja {
  font: normal 14px var(--serif);
  color: var(--muted);
  letter-spacing: 2px;
  margin-left: 10px;
}

.example-card small {
  font-size: 14px;
  color: #62685f;
  line-height: 1.8;
  display: block;
}

.hiddink {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 19px 0;
  margin-top: 28px;
}

.hiddink summary {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  cursor: pointer;
  font-size: 14px;
}

.hiddink summary>span:last-child {
  font-size: 14px;
  color: var(--muted);
}

.hiddink>div {
  padding-top: 20px;
  max-width: 820px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.9;
}

.hiddink a {
  font-size: 14px;
}

.library-section {
  padding: 0 0 50px;
}

.library-section summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  cursor: pointer;
}

.library-section .eyebrow {
  font-size: 14px;
  color: var(--accent);
  margin-bottom: 10px;
}

.library-section h2 {
  font-size: 29px;
}

.library-open {
  font-size: 32px;
  font-weight: 300;
}

.library-body {
  padding-top: 25px;
}

.library-body>p {
  max-width: 730px;
  font-size: 14px;
  color: var(--muted);
}

.library-body label {
  font-size: 14px;
  display: block;
  margin-bottom: 8px;
}

.library-body input {
  max-width: 520px;
}

.hanja-grid {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.hanja-tile {
  padding: 17px;
  border: 1px solid var(--line);
  min-width: 0;
}

.hanja-tile strong {
  font: normal 34px var(--serif);
}

.hanja-tile .reading {
  font-size: 14px;
  margin-left: 10px;
}

.hanja-tile p {
  font-size: 14px;
  color: var(--muted);
  margin: 10px 0 0;
  overflow-wrap: anywhere;
}

.core-badge {
  font-size: 14px;
  background: var(--pale);
  color: var(--green);
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
  padding: 3px 6px;
  margin-top: 12px;
}

.cross-link {
  display: flex;
  align-items: center;
  gap: 28px;
  background: var(--green);
  color: var(--paper);
  padding: 36px 38px;
  margin-bottom: 50px;
  overflow: hidden;
}

.cross-link .eyebrow {
  font-size: 14px;
  margin-bottom: 7px;
  color: #bfcbbf;
}

.cross-link h2 {
  font-size: 28px;
  margin-bottom: 10px;
}

.cross-link a {
  font-size: 14px;
}

.cross-icon {
  font-size: 40px;
  color: #d6a08b;
}

.cross-mark {
  margin-left: auto;
  font: normal 53px var(--serif);
  letter-spacing: 5px;
  white-space: nowrap;
  color: #aab9a7;
}

.footer {
  display: flex;
  align-items: center;
  gap: 26px;
  border-top: 1px solid var(--line);
  padding-top: 28px;
  padding-bottom: 35px;
}

.footer>span {
  font-size: 14px;
  color: var(--muted);
}

.footer>div {
  margin-left: auto;
  display: flex;
  gap: 24px;
  font-size: 14px;
}

.footer a {
  text-decoration: none;
}

.name-anatomy {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 14px;
  margin-bottom: 27px;
}

.character-block {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 24px;
}

.surname-block {
  background: var(--pale);
}

.char-role {
  font-size: 14px;
  letter-spacing: 1px;
  color: var(--muted);
}

.big-char {
  font: normal 47px var(--serif);
  display: inline-block;
  margin: 15px 0 9px;
}

.hangul-reading {
  font: normal 23px var(--serif);
  margin-left: 13px;
}

.char-meaning {
  font-size: 14px;
  margin-bottom: 6px;
}

.character-block small {
  font-size: 14px;
  color: var(--muted);
}

.process-interpretation {
  font: normal 22px/1.7 var(--serif);
  color: var(--accent);
}

.process-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 28px;
}

.process-card {
  border: 1px solid var(--line);
  padding: 24px;
  min-width: 0;
}

.process-card .step-label {
  color: var(--muted);
}

.process-card h3 {
  font-size: 16px;
  margin: 10px 0 12px;
}

.process-card p {
  font-size: 14px;
  line-height: 1.9;
  color: var(--muted);
  margin-bottom: 11px;
}

.process-card small {
  font-size: 14px;
  color: var(--muted);
}

.process-card .process-interpretation {
  font-size: 18px;
  color: var(--accent);
}

.process-card .filter-note {
  background: var(--pale);
  padding: 8px 10px;
}

.result-details {
  border-top: 1px solid var(--line);
  margin-top: 27px;
  padding-top: 18px;
}

.result-details>summary {
  cursor: pointer;
  font-size: 14px;
  min-height: 36px;
}

.score-list {
  margin-top: 28px;
}

.score-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 14px;
}

.score-heading h3 {
  margin: 0;
}

.score-heading small, .score-legend {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.9;
}

.score-legend {
  margin: 12px 0;
}

.candidate {
  display: grid;
  grid-template-columns: 28px minmax(100px,1fr) 65px 60px;
  gap: 18px;
  align-items: center;
  padding: 16px 10px;
  border-top: 1px solid var(--line);
}

.candidate.selected {
  background: var(--pale);
  border: 1px solid #aeb6a6;
}

.rank {
  font: italic 20px var(--serif);
  color: var(--muted);
}

.candidate-name {
  font-size: 18px;
}

.candidate-hanja {
  display: block;
  font-size: 14px;
  color: var(--muted);
  letter-spacing: 2px;
}

.candidate small {
  font-size: 14px;
  color: var(--muted);
}

.candidate .total {
  font-size: 14px;
  text-align: right;
}

.candidate button {
  font-size: 14px;
  background: var(--white);
  border: 1px solid var(--line);
  padding: 7px;
  min-height: 44px;
}

.error {
  font-size: 14px;
  border-left: 3px solid var(--accent);
  padding: 11px 13px;
  background: #f0e0d8;
  color: #743c2d;
  margin: 14px 0;
}

.error-action {
  border: 1px solid var(--accent);
  background: var(--white);
  font-size: 14px;
  padding: 5px 10px;
  min-height: 36px;
  margin-left: 4px;
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--green);
  color: var(--white);
  padding: 14px 22px;
  max-width: 90vw;
  width: max-content;
  font-size: 14px;
  z-index: 20;
  box-shadow: 0 5px 24px #242b2720;
  word-break: keep-all;
}

.skip {
  position: absolute;
  top: -100px;
  left: 20px;
  z-index: 30;
  padding: 10px;
  background: var(--white);
}

.skip:focus {
  top: 10px;
}

#share-fallback {
  padding-top: 15px;
}

#share-fallback label, #share-fallback input {
  font-size: 14px;
}

.doc-page {
  max-width: 900px;
  padding-top: 50px;
  padding-bottom: 60px;
}

.doc-page h1 {
  font-size: 51px;
  line-height: 1.2;
  margin-bottom: 30px;
}

.doc-page h2 {
  font-size: 27px;
  margin: 35px 0 15px;
}

.doc-page p, .doc-page li {
  font-size: 14px;
  line-height: 1.95;
  color: #526153;
}

.doc-page table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
  margin: 20px 0;
}

.doc-page td, .doc-page th {
  padding: 12px;
  text-align: left;
  border: 1px solid var(--line);
}

.doc-page code {
  font-size: 14px;
  background: var(--pale);
  padding: 2px 5px;
}

.doc-page li {
  margin-bottom: 10px;
}

html[lang=ko] h1 {
  font-size: clamp(44px,4.6vw,64px);
  line-height: 1.28;
  letter-spacing: -2.8px;
}

html[lang=ko] h1 em {
  font-style: normal;
}

html[lang=ko] h2 {
  font-size: 29px;
  letter-spacing: -1.2px;
}

html[lang=ko] .panel-heading h2 {
  font-size: 25px;
}

html[lang=ko] .card-meaning {
  font-size: 20px;
}

html[lang=ko] .cross-link h2 {
  font-size: 25px;
}

@media(min-width:1400px) {
  .hero {
    gap: 88px;
  }

  .studio {
    gap: 90px;
  }
}

@media(max-width:1100px) {
  .shell {
    padding-left: 36px;
    padding-right: 36px;
  }

  .hero {
    gap: 40px;
  }

  .studio {
    gap: 36px;
  }

  .preview-column {
    padding-left: 28px;
  }

  .card-stage {
    padding: 18px;
  }

  .name-card {
    padding: 22px 19px 18px;
  }

  .card-hangul {
    font-size: 59px;
  }

  .method-grid article {
    padding: 0 18px;
  }
}

@media(max-width:800px) {
  .shell {
    padding-left: 24px;
    padding-right: 24px;
  }

  .header {
    height: 82px;
  }

  .site-title {
    gap: 15px;
  }

  .header nav {
    gap: 20px;
  }

  .header nav>a {
    font-size: 14px;
  }

  .hero {
    padding: 37px 0 35px;
    gap: 28px;
  }

  .hero-visual {
    min-height: 315px;
  }

  .hero h1 {
    font-size: 57px;
    letter-spacing: -3px;
  }

  html[lang=ko] .hero h1 {
    font-size: 42px;
    letter-spacing: -2px;
  }

  .hero .eyebrow {
    font-size: 14px;
    letter-spacing: 1.3px;
  }

  .hero-visual figcaption {
    font-size: 14px;
    padding: 12px;
  }

  .studio {
    gap: 28px;
    grid-template-columns: 1fr;
    padding-top: 29px;
  }

  .intro, .preview-column {
    width: 100%;
    max-width: 540px;
    margin: auto;
  }

  .preview-column {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 30px 0 0;
  }

  .panel-heading {
    margin-bottom: 24px;
  }

  .name-card {
    padding: 28px 30px 22px;
    min-height: 450px;
  }

  .card-hangul {
    font-size: 78px;
  }

  .card-ornament {
    height: 76px;
  }

  .card-meaning {
    font-size: 23px;
  }

  .method-grid {
    grid-template-columns: 1fr 1fr;
    gap: 30px 0;
  }

  .method-grid article:nth-child(3) {
    padding-left: 0;
    border: 0;
  }

  .method-grid article:nth-child(2) {
    padding-right: 0;
  }

  .section-heading {
    display: block;
    margin-bottom: 27px;
  }

  .section-intro {
    margin-top: 15px;
    max-width: 460px;
  }

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

  .example-hanja {
    display: block;
    margin: 5px 0 0;
  }

  .process-grid {
    grid-template-columns: 1fr;
  }

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

  .cross-mark {
    display: none;
  }

  .cross-link {
    padding: 28px;
  }

  .cross-link h2 {
    font-size: 25px;
  }

  .footer>span {
    display: none;
  }

  .method-section, .examples-section, .result-section {
    padding: 42px 0;
  }

  .name-anatomy {
    grid-template-columns: 1fr 1fr;
  }

  .surname-block {
    grid-column: 1/-1;
  }

  .surname-block .big-char {
    font-size: 29px;
    margin: 7px 0;
  }

  .surname-block small {
    display: block;
  }

  .character-block {
    padding: 19px;
  }
}

@media(max-width:560px) {
  .shell {
    padding-left: 20px;
    padding-right: 20px;
  }

  .header {
    height: 75px;
    gap: 16px;
  }

  .header nav {
    gap: 16px;
  }

  .header nav>a:first-child {
    display: none;
  }

  .language {
    padding: 7px 10px;
  }

  .language span {
    margin-left: 9px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 31px 0 30px;
  }

  .hero-copy {
    padding: 0;
  }

  .hero .eyebrow {
    margin-bottom: 18px;
    font-size: 14px;
  }

  .hero h1 {
    font-size: 66px;
    line-height: 1.03;
    margin-bottom: 19px;
  }

  html[lang=ko] .hero h1 {
    font-size: 48px;
    line-height: 1.23;
  }

  .lede {
    font-size: 14px;
    line-height: 1.9;
    max-width: 340px;
    margin-bottom: 16px;
  }

  .hero-link {
    font-size: 14px;
    padding-bottom: 5px;
  }

  .hero-visual {
    min-height: 0;
    aspect-ratio: 1.75;
  }

  .hero-visual img {
    object-position: 50% 54%;
  }

  .hero-visual figcaption>span:last-child {
    display: block;
    font-size: 14px;
    letter-spacing: .7px;
  }

  .studio {
    padding-top: 25px;
    padding-bottom: 40px;
  }

  .panel-heading h2 {
    font-size: 26px;
  }

  html[lang=ko] .panel-heading h2 {
    font-size: 24px;
  }

  .step-label {
    font-size: 14px;
    letter-spacing: 1px;
  }

  .small-fields select {
    font-size: 14px;
  }

  .theme-options span {
    gap: 6px;
  }

  .name-card {
    min-height: 410px;
    padding: 24px 19px 19px;
  }

  .card-hangul {
    font-size: clamp(43px,16vw,67px);
    letter-spacing: 7px;
    margin-right: -7px;
  }

  .card-label {
    font-size: 14px;
    letter-spacing: .8px;
  }

  .card-hanja {
    font-size: 21px;
  }

  .card-meaning {
    font-size: 20px;
  }

  .card-bottom {
    font-size: 14px;
  }

  .preview-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .preview-actions .text-button {
    grid-column: 1/-1;
  }

  .quick-choice-grid strong {
    font-size: 19px;
  }

  .name-guidance {
    font-size: 14px;
  }

  .section-heading h2, html[lang=ko] .section-heading h2 {
    font-size: 27px;
  }

  .section-intro {
    font-size: 14px;
  }

  .method-grid article {
    padding: 0 16px;
  }

  .method-grid p {
    font-size: 14px;
  }

  .example-grid {
    gap: 10px;
  }

  .example-meta {
    font-size: 14px;
  }

  .example-card strong {
    margin-top: 17px;
  }

  .hiddink summary {
    flex-direction: column;
    gap: 5px;
  }

  .hiddink summary>span:last-child {
    font-size: 14px;
  }

  .library-section h2, html[lang=ko] .library-section h2 {
    font-size: 23px;
  }

  .cross-link {
    gap: 20px;
    padding: 24px;
  }

  .cross-link h2, html[lang=ko] .cross-link h2 {
    font-size: 22px;
  }

  .cross-icon {
    font-size: 31px;
  }

  .footer {
    gap: 15px;
  }

  .footer>div {
    gap: 16px;
    font-size: 14px;
  }

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

  .candidate {
    grid-template-columns: 24px minmax(0,1fr) 42px max-content;
    gap: 8px;
    padding: 13px 7px;
  }

  .candidate-name {
    font-size: 16px;
  }

  .score-heading {
    align-items: start;
    flex-direction: column;
    gap: 5px;
  }

  .process-card {
    padding: 20px;
  }

  .character-block {
    padding: 16px;
  }

  .process-interpretation {
    font-size: 19px;
  }

  .doc-page h1 {
    font-size: 38px;
  }

  .doc-page table {
    min-width: 640px;
  }
}

.lede, .section-intro, .card-meaning, html[lang=ko] p {
  word-break: keep-all;
  overflow-wrap: break-word;
}

.card-hangul.long-name {
  font-size: clamp(39px,4.3vw,59px);
  letter-spacing: 6px;
  margin-right: -6px;
}

@media(max-width:800px) {
  .card-hangul.long-name {
    font-size: 66px;
  }
}

@media(max-width:560px) {
  .card-hangul.long-name {
    font-size: clamp(36px,12vw,56px);
    letter-spacing: 4px;
    margin-right: -4px;
  }
}

.site-title {
  font: 600 24px/1.4 var(--sans);
  letter-spacing: -.7px;
}

.header nav {
  font-size: 15px;
}

.hero {
  padding-top: 48px;
  padding-bottom: 48px;
}

.lede {
  font-size: 16px;
  line-height: 1.8;
  max-width: 410px;
}

.hero-link {
  font-size: 16px;
}

.studio {
  border-top: 1px solid var(--line);
  padding-top: 32px;
}

.field label, .step-label {
  font-size: 15px;
  letter-spacing: 0;
}

.small-fields select, .gender-field select, .pronunciation-details input, .style-row select {
  font-size: 16px;
}

.small-fields select {
  padding-right: 24px;
}

.theme-options span, .style-row {
  font-size: 15px;
}

.primary, .secondary, .text-button {
  font-size: 16px;
}

.card-topline {
  letter-spacing: 0;
  font-size: 14px;
}

.card-label {
  display: block;
  text-align: center;
  font-size: 14px;
  letter-spacing: 0;
}

.card-roman {
  font-size: 16px;
  letter-spacing: .7px;
}

.card-meaning {
  margin-bottom: 27px;
}

.card-bottom {
  justify-content: center;
  font-size: 14px;
}

.source-name {
  max-width: 100%;
  text-align: center;
}

.name-guidance, .section-intro, .method-grid p, .hiddink>div, .library-body>p, .char-meaning, .process-card p {
  font-size: 15px;
}

.quick-choice-grid {
  grid-template-columns: 1fr;
}

.quick-choice-grid button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  min-height: 58px;
  text-align: left;
}

.quick-choice-grid strong {
  font-size: 23px;
  flex-shrink: 0;
}

.quick-choice-grid small {
  font-size: 14px;
  margin: 0;
  text-align: right;
}

.example-meta {
  font-size: 14px;
}

.footer {
  justify-content: center;
}

.footer nav {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  font-size: 14px;
}

.doc-page .site-title {
  font-size: 22px;
}

@media(max-width:1000px) {
  .small-fields {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .theme-options {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }

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

@media(max-width:800px) {
  .lede {
    font-size: 16px;
  }

  .hero-link {
    font-size: 16px;
  }

  .preview-column {
    padding-top: 28px;
  }

  .method-grid p {
    font-size: 15px;
  }
}

@media(max-width:560px) {
  .header nav>a {
    display: none;
  }

  .site-title {
    font-size: 20px;
  }

  .language {
    font-size: 14px;
  }

  .hero {
    padding-top: 30px;
    padding-bottom: 32px;
  }

  .input-pair {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .style-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .style-row select {
    width: 100%;
    max-width: 100%;
  }

  .theme-options span {
    font-size: 15px;
  }

  .card-label, .card-bottom {
    font-size: 14px;
  }

  .card-roman {
    font-size: 16px;
  }

  .name-guidance, .section-intro {
    font-size: 15px;
  }

  .method-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .method-grid article, .method-grid article:nth-child(2), .method-grid article:nth-child(3) {
    padding: 0 0 24px;
    border: 0;
    border-bottom: 1px solid var(--line);
  }

  .method-grid h3 {
    font-size: 18px;
  }

  .method-example {
    font-size: 15px;
  }

  .example-grid {
    grid-template-columns: 1fr;
  }

  .example-card {
    padding: 22px;
  }

  .example-card strong {
    font-size: 30px;
  }

  .example-card small {
    font-size: 14px;
  }

  .name-anatomy {
    grid-template-columns: 1fr;
  }

  .surname-block {
    grid-column: auto;
  }

  .score-heading h3 {
    font-size: 18px;
  }
}

:root {
  --postal-blue: #607482;
  --postal-red: #a97060;
  --accent: #955d4d;
  --green: #344850;
  --paper: #f6f3ec;
  --white: #fffdf6;
  --line: #d9d6cd;
  --airmail: repeating-linear-gradient(135deg,var(--postal-blue) 0 11px,var(--white) 11px 24px,var(--postal-red) 24px 35px,var(--white) 35px 48px);
}

body::before {
  content: "";
  display: block;
  height: 5px;
  background: var(--airmail);
  opacity: .82;
}

.hero-visual {
  background: var(--white);
  overflow: visible;
  transform: rotate(1.1deg);
  box-shadow: 0 2px 3px #413b3210,0 15px 28px -20px #413b3240;
}

.hero-visual img {
  inset: 13px 13px 20px;
  width: calc(100% - 26px);
  height: calc(100% - 33px);
}

.hero-visual::after {
  content: "";
  position: absolute;
  bottom: 8px;
  left: 13px;
  right: 13px;
  height: 4px;
  background: var(--airmail);
  opacity: .85;
}

.postage-stamp {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 56px;
  height: 70px;
  background: url('./assets/postage-stamp.svg') center/contain no-repeat;
  transform: rotate(-4deg);
  filter: drop-shadow(0 2px 1px #40382a18);
  pointer-events: none;
}

.studio {
  border-top-style: dashed;
}

.card-stage {
  background: #e9e5da url('./assets/envelope-fold.svg') center/100% 100% no-repeat;
  padding: 28px;
}

.name-card {
  border: 5px solid transparent;
  background: linear-gradient(var(--white),var(--white)) padding-box,var(--airmail) border-box;
  box-shadow: 0 3px 6px #413b3210,0 16px 25px -18px #413b3250;
}

.card-ornament {
  height: 90px;
  margin: 5px 0 0;
}

.card-ornament img {
  display: block;
  width: 138px;
  height: auto;
  max-width: 100%;
}

.card-label {
  color: #60717a;
}

.card-rule {
  background: var(--postal-red);
  width: 42px;
}

.card-bottom {
  border-top-style: dashed;
}

.example-card {
  border-top: 3px solid #7f9197;
  background: #eceee8;
}

.example-card:nth-child(3n+2) {
  border-top-color: #b38777;
  background: #f0e9df;
}

.example-card:nth-child(3n) {
  border-top-color: #9b9f8d;
  background: #e9eae2;
}

.footer {
  position: relative;
  border-top-style: dashed;
}

.footer::before {
  content: "";
  position: absolute;
  top: -3px;
  left: calc(50% - 42px);
  width: 84px;
  height: 5px;
  background: var(--airmail);
}

@media(max-width:800px) {
  .card-stage {
    padding: 28px;
  }
}

@media(max-width:560px) {
  .hero-visual {
    transform: rotate(.7deg);
  }

  .hero-visual img {
    inset: 10px 10px 17px;
    width: calc(100% - 20px);
    height: calc(100% - 27px);
  }

  .hero-visual::after {
    left: 10px;
    right: 10px;
    bottom: 6px;
    height: 3px;
  }

  .postage-stamp {
    width: 46px;
    height: 58px;
    right: 16px;
    top: 16px;
  }

  .card-stage {
    padding: 19px;
  }

  .name-card {
    border-width: 4px;
  }

  .card-ornament {
    height: 82px;
  }

  .card-ornament img {
    width: 130px;
  }
}

@media print {
  body::before {
    display: none;
  }
}

@media(prefers-reduced-motion:reduce) {
  html {
    scroll-behavior: auto;
  }

  *, *::before, *::after {
    animation: none!important;
    transition: none!important;
  }
}

@media print {
  .header, .hero, .intro, .panel-heading, .card-topline, .preview-actions, .quick-choices, .name-guidance, .method-section, .examples-section, .library-section, .cross-link, .footer {
    display: none!important;
  }

  .studio {
    display: block;
  }

  .preview-column {
    padding: 0;
    border: 0;
    max-width: 500px;
    margin: auto;
  }

  .card-stage {
    padding: 20px;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .name-card {
    box-shadow: none;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .result-section {
    break-before: page;
  }

  .process-card {
    break-inside: avoid;
  }

  .shell {
    padding: 20px;
  }

  .candidate button {
    display: none;
  }
}
