:root {
  font-family:Arial,Helvetica,sans-serif;
  color:#24282a;
  background:#f6f5f0;
  --purple:#68509d;
  --line:#e1e1d9;
  --muted:#767970}
* {
  box-sizing:border-box}
body {
  margin:0}
button,a {
  -webkit-tap-highlight-color:transparent}
button {
  font:inherit;
  cursor:pointer}
a {
  color:inherit}
button:focus-visible,a:focus-visible {
  outline:3px solid #8064b6;
  outline-offset:4px}
button:disabled {
  opacity:.55;
  cursor:wait}
[hidden] {
  display:none!important}
.site-header {
  max-width:1280px;
  margin:auto;
  min-height:91px;
  padding:20px 44px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  border-bottom:1px solid var(--line);
  gap:20px}
.brand {
  display:flex;
  align-items:center;
  text-decoration:none;
  font-size:28px;
  font-weight:800;
  letter-spacing:-1.5px}
.brand-dot {
  color:var(--purple)}
.brand-icon {
  position:relative;
  background:#ddd7eb;
  color:#514071;
  width:35px;
  height:35px;
  border-radius:11px 11px 13px 13px;
  margin-right:10px;
  display:grid;
  place-items:center;
  font-size:27px;
  line-height:1;
  padding-top:4px;
  letter-spacing:-3px}
.brand-icon span {
  position:absolute;
  top:4px;
  left:11px;
  font:bold 8px Arial;
  letter-spacing:2px}
.header-label,.prototype-tag,.collection-label,.word-category,.part-label,.edition-note,.site-footer {
  font-size:10px;
  letter-spacing:1.6px;
  font-weight:600}
.header-label {
  color:#74786f}
.prototype-tag {
  border:1px solid #d8d8d0;
  border-radius:25px;
  padding:10px 14px;
  letter-spacing:.3px;
  color:#5d625a;
  font-size:11px;
  white-space:nowrap}
.prototype-tag span {
  margin-left:15px}
main {
  max-width:690px;
  margin:0 auto;
  padding:32px 22px 20px}
.collection-label {
  color:#777c71;
  display:flex;
  align-items:center;
  gap:10px;
  font-size:9px;
  letter-spacing:1.7px}
.mini-dot {
  width:6px;
  height:6px;
  background:#8e9b78;
  border-radius:50%}
.rule {
  width:26px;
  height:1px;
  background:#c6c9bc}
.toolbar {
  display:flex;
  justify-content:center;
  margin:22px 0 24px}
.mode-switch {
  padding:5px;
  border:1px solid #e2e1d9;
  border-radius:14px;
  background:#eae9e2;
  display:flex;
  gap:3px}
.mode-switch button {
  display:flex;
  gap:9px;
  justify-content:center;
  align-items:center;
  min-height:44px;
  padding:11px 18px;
  border:0;
  border-radius:9px;
  color:#65695f;
  background:transparent;
  font-size:12px;
  white-space:nowrap}
.mode-switch button[aria-pressed=true] {
  background:#fff;
  color:#4f3a7a;
  box-shadow:0 2px 5px #24282a0c}
.mode-switch svg,.print-button svg {
  width:17px;
  height:17px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.5;
  stroke-linecap:round;
  stroke-linejoin:round;
  flex-shrink:0}
.word-card {
  background:#fff;
  border:1px solid var(--line);
  border-radius:21px;
  box-shadow:0 8px 28px #32332604;
  overflow:hidden}
.word-heading {
  text-align:center;
  padding:27px 22px 21px}
.word-category {
  color:#919586;
  font-size:8px;
  letter-spacing:2px;
  margin:0 0 12px}
h1 {
  font-family:Georgia,'Times New Roman',serif;
  font-size:clamp(32px,5.8vw,49px);
  line-height:1.2;
  font-weight:normal;
  letter-spacing:-1.5px;
  margin:0 0 9px}
.translation {
  color:#7b7b75;
  font-size:15px;
  line-height:1.5;
  margin:0}
.artwork {
  margin:0 32px;
  display:flex;
  justify-content:center;
  background:#f7f6f2;
  border-radius:12px;
  overflow:hidden}
.artwork img {
  display:block;
  max-width:100%;
  width:auto;
  height:auto;
  max-height:490px;
  object-fit:contain}
.artwork #coloring-image {
  display:none}
body[data-mode=coloring] #illustration-image {
  display:none}
body[data-mode=coloring] #coloring-image {
  display:block}
body[data-mode=coloring] .artwork {
  background:white;
  outline:1px solid #eee}
.word-parts {
  margin:25px 32px 0;
  padding:20px 0 24px;
  border-top:1px solid #e9e9e3;
  display:grid;
  grid-template-columns:1fr 1fr;
  align-items:start;
  text-align:center}
.part-group+ .part-group {
  border-left:1px solid #e8e8e2}
.part-label {
  font-size:8px;
  color:#8a8d83;
  letter-spacing:1.5px;
  display:block;
  margin-bottom:9px}
.part-group p {
  font-size:20px;
  line-height:1.3;
  letter-spacing:-.4px;
  margin:0}
.plus {
  color:#a69ab7;
  margin:0 5px;
  font-weight:400}
.below-card {
  min-height:67px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:18px}
.edition-note {
  font-size:8px;
  letter-spacing:1.7px;
  color:#92958b}
.print-button {
  border:0;
  border-radius:10px;
  background:#68509d;
  color:white;
  min-height:46px;
  padding:12px 17px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  font-size:12px}
.print-button:hover {
  background:#533e82}
.print-button>span {
  margin-left:9px}
.status {
  margin:0;
  text-align:center;
  font-size:12px;
  color:#6c6254;
  line-height:1.5}
.status:empty {
  display:none}
.site-footer {
  max-width:1192px;
  margin:0 auto;
  padding:20px 25px 25px;
  border-top:1px solid var(--line);
  color:#96998e;
  display:flex;
  justify-content:space-between;
  gap:20px;
  font-weight:400;
  font-size:9px;
  letter-spacing:1px}
.site-footer span:first-child {
  letter-spacing:0;
  font-size:11px}
.no-script {
  text-align:center;
  font-size:14px;
  padding:10px}
body[data-mode=coloring] .edition-note {
  color:#7d8176}

@media(max-width:600px) {
  .site-header {
  padding:18px 22px;
  min-height:76px}
.brand {
  font-size:25px}
.header-label {
  display:none}
.prototype-tag {
  font-size:10px;
  padding:8px 11px}
.prototype-tag span {
  margin-left:8px}
main {
  padding:23px 16px 10px}
.toolbar {
  margin:20px 0}
.mode-switch {
  width:100%;
  max-width:370px}
.mode-switch button {
  flex:1;
  padding:11px 8px;
  font-size:11px;
  gap:6px}
.word-heading {
  padding:25px 12px 20px}
.word-category {
  font-size:7px;
  margin-bottom:10px}
h1 {
  font-size:clamp(30px,7.7vw,42px);
  letter-spacing:-1px}
.translation {
  font-size:14px}
.artwork {
  margin:0 16px}
.artwork img {
  width:100%;
  max-height:none}
.word-parts {
  margin:20px 16px 0;
  padding:18px 0 22px}
.part-group p {
  font-size:clamp(15px,4.5vw,20px)}
.plus {
  margin:0 2px}
.part-label {
  font-size:7px}
.below-card {
  min-height:75px;
  gap:12px}
.print-button {
  font-size:11px;
  padding:12px}
.edition-note {
  font-size:7px;
  letter-spacing:1px}
.site-footer {
  padding:18px 22px}
.site-footer span:last-child {
  font-size:8px}
}

@page {
  size:A4 portrait;
  margin:12mm}

@media print {
  html,body {
  background:white!important;
  margin:0!important;
  padding:0!important;
  color:black!important;
  width:auto}
.site-header,.collection-label,.toolbar,.below-card,.status,.site-footer,noscript {
  display:none!important}
main {
  max-width:none!important;
  margin:0!important;
  padding:0!important;
  width:186mm!important}
.word-card {
  display:grid!important;
  grid-template-rows:30mm 218mm 18mm;
  gap:2mm;
  width:186mm;
  height:270mm;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
  overflow:visible;
  break-inside:avoid;
  page-break-inside:avoid}
.word-heading {
  padding:0!important;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center}
.word-category {
  display:none!important}
h1 {
  font-size:28pt!important;
  line-height:1.15!important;
  margin:0 0 2mm!important;
  color:black!important;
  letter-spacing:-.5pt}
.translation {
  font-size:12pt!important;
  color:#333!important;
  margin:0!important}
.artwork {
  margin:0!important;
  padding:0!important;
  display:flex!important;
  align-items:center;
  justify-content:center;
  border:0!important;
  border-radius:0!important;
  outline:0!important;
  background:white!important;
  height:218mm;
  width:186mm;
  overflow:visible}
.artwork #illustration-image {
  display:none!important}
.artwork #coloring-image {
  display:block!important;
  width:163.5mm!important;
  height:218mm!important;
  max-width:none!important;
  max-height:none!important;
  object-fit:contain}
.word-parts {
  margin:0!important;
  padding:3mm 0 0!important;
  border-top:1px solid #aaa;
  align-items:center}
.part-label {
  display:none!important}
.part-group p {
  font-size:15pt!important;
  color:black!important}
.part-group+ .part-group {
  border-left:1px solid #aaa}
.plus {
  color:#444!important;
  margin:0 2mm!important}
}


/* Sharing controls are outside the vocabulary card and print layout. */
.share-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin: 0 0 18px; }
.share-button, .copy-button, .download-card { min-height: 46px; border-radius: 10px; padding: 13px 23px; font-size: 13px; text-align: center; }
.share-button { border: 1px solid #68509d; background: #68509d; color: #fff; }
.copy-button, .download-card { border: 1px solid #d8d2e1; background: #fff; color: #58447f; }
.share-button:hover { background: #533e82; }
#copy-fallback { width: 100%; padding: 12px; font-size: 14px; }
@media print { .share-actions { display: none !important; } }

/* Gallery sits outside the approved card and never appears on paper. */
.word-gallery { display:flex; flex-wrap:wrap; gap:8px; margin:20px 0 0; }
.word-gallery button, .word-navigation button {
  min-height:44px; border:1px solid #d8d2e1; border-radius:10px;
  background:white; color:#58447f; padding:10px 14px; font-size:13px;
}
.word-gallery button { flex:1; white-space:nowrap; }
.word-gallery button[aria-pressed=true] { background:#ebe6f3; border-color:#9380b5; }
.word-navigation { display:flex; justify-content:space-between; gap:12px; margin-top:18px; }
.word-navigation button { flex:1; }
@media screen and (max-width:600px) {
  body[data-word=feierabend] #english-parts { font-size:14px; padding:0 5px; }
}
@media print { .word-gallery, .word-navigation { display:none !important; } }

/* Search and directory surround the unchanged card template. */
.app-nav { display:flex; gap:20px; font-size:12px; white-space:nowrap; }
.app-nav a { text-decoration:none; color:#58447f; }
.search-view { padding:55px 0 50px; }
.hero { text-align:center; margin-bottom:32px; }
.hero h1 { font-size:clamp(54px,12vw,78px); }
.tagline { max-width:440px; margin:18px auto 0; font:24px/1.4 Georgia,serif; }
.search-form { max-width:540px; margin:auto; position:relative; }
input[type=search] { width:100%; border:1px solid #d8d2e1; border-radius:12px; padding:19px 18px; background:white; color:#24282a; font:16px Arial,sans-serif; }
input:focus-visible { outline:3px solid #b6a3d4; outline-offset:3px; }
.primary-action { border:0; background:#68509d; color:white; border-radius:10px; padding:16px 20px; min-height:48px; font-size:15px; }
.search-form>.primary-action { width:100%; margin-top:12px; }
.primary-action:hover { background:#533e82; }
.search-note { text-align:center; color:#767970; font-size:12px; line-height:1.5; }
.secondary-actions { display:flex; justify-content:center; flex-wrap:wrap; gap:12px 24px; margin:22px 0; align-items:center; }
.secondary-actions button,.secondary-actions a { border:0; background:transparent; color:#58447f; padding:10px 0; font:14px Arial; cursor:pointer; }
.suggestions { position:absolute; top:62px; left:0; right:0; background:white; z-index:2; border:1px solid #d8d2e1; border-radius:12px; box-shadow:0 8px 24px #24282a12; overflow:hidden; }
.suggestions button { display:block; width:100%; padding:16px; text-align:left; background:white; border:0; color:#58447f; }
.suggestions button:hover,.suggestions button:focus { background:#ebe6f3; }
.missing-view { border:1px solid var(--line); border-radius:20px; background:white; padding:26px; margin-top:32px; text-align:center; }
.missing-view h2 { font:28px/1.25 Georgia,serif; }
.missing-view p { line-height:1.6; color:#767970; }
.searched-word { overflow-wrap:anywhere; font-weight:bold; }
#request-status { font-size:13px; }
#directory-view { padding:30px 0; }
#directory-view h1 { font-size:38px; margin-bottom:28px; }
#directory-view label { display:block; font-size:13px; margin-bottom:10px; }
#directory-count { font-size:13px; color:#767970; }
.directory-list { padding:0; list-style:none; }
.directory-list a { display:flex; flex-direction:column; gap:8px; padding:20px; margin-bottom:10px; background:white; border:1px solid var(--line); border-radius:12px; text-decoration:none; }
.directory-list a:hover { border-color:#9380b5; }
.directory-list strong { font:23px Georgia,serif; }
.directory-list span { font-size:14px; color:#767970; line-height:1.5; }
.directory-pages { display:flex; justify-content:space-between; align-items:center; }
.directory-pages button { padding:12px 16px; border:1px solid #d8d2e1; border-radius:10px; background:white; color:#58447f; }
.visually-hidden { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
@media(max-width:600px) {
 .site-header { flex-wrap:wrap; gap:16px; }
 .app-nav { gap:16px; font-size:11px; }
 .search-view { padding:35px 0 25px; }
 .tagline { font-size:23px; }
}
@media print {
 .app-nav,#search-view,#directory-view { display:none!important; }
}

/* Keep a submitted search result visible rather than below the first viewport. */
#missing-view, #card-view { scroll-margin-top:16px; }
#missing-title:focus { outline:none; }
