/* ── Nimikyltti Plugin CSS ── */

.nk-app {
    --nk-bg: #f0e8d4;
    --nk-surface: #ffffff;
    --nk-border: rgba(0, 0, 0, 0.542);
    --nk-border-hi: rgba(45, 75, 45, 0.55);
    --nk-forest: #2d4b2d;
    --nk-forest-mid: #3d6b3d;
    --nk-gold: #b8860b;
    --nk-gold-hi: #d4a017;
    --nk-gold-dim: rgba(184, 134, 11, 0.3);
    --nk-text: #1a2e1a;
    --nk-text-mid: #3a5a3a;
    --nk-text-dim: rgba(26, 46, 26, 0.5);
    --nk-ink: #1a1208;
    box-sizing: border-box;
    background: var(--nk-bg);
    font-family: 'Outfit', sans-serif;
    border-radius: 12px;
    overflow: clip;
    background-image: var(--artikkelinTausta);
    color: var(--nk-text);
    max-width: 800px;
    margin: 0 auto;
}

.nk-app *, .nk-app *::before, .nk-app *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── Hero ── */
.nk-hero {
    text-align: center;
    padding: 4rem 2rem 1rem;
    position: relative;
}
.nk-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 1px; height: 3rem;
  background: linear-gradient(to bottom, transparent, var(--nk-gold-dim));
}
.nk-hero-eyebrow {
    font-size: 2.25rem;
    color: var(--tummaFonttiVari);
    font-family: "Cinzel";
}
.nk-hero-title {
    font-size: clamp(2.8rem, 6vw, 5rem);
    line-height: 0.92;
    color: var(--nk-text);
}
.nk-hero-title em {
  font-style: italic;
  color: var(--nk-gold);
}
.nk-hero-sub {
    margin-top: 1.2rem;
    font-weight: 300;
    color: var(--tummaFonttiVari);
    font-family: var(--sivustonPerusFontti);
    font-size: 1.1rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}
.nk-hero-line {
  width: 50px; height: 1px;
  background: linear-gradient(to right, transparent, var(--nk-gold), transparent);
  margin: 2rem auto 0;
}

/* ── Layout ── */
.nk-workspace {
  display: flex;
  flex-direction: column;
  max-width: 680px;
  margin: 0 auto;
  padding: 0 2rem 4rem;
}

/* ── Form side ── */
.nk-form-side {
  padding: 0 0 2rem 0;
}
.nk-section-label {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-family: var(--otsikkoFontti);
    font-size: 1.25rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--tummaFonttiVari);
    margin-bottom: 1.2rem;
    margin-top: 2rem;
    font-weight: 600;
}
.nk-section-label:first-child { margin-top: 0; }
.nk-section-label::after {
  content: '';
  flex: 1; height: 1px;
  background: var(--nk-border);
}
.nk-field { margin-bottom: 1.2rem; }
.nk-field label {
    display: block;
    font-family: var(--otsikkoFontti);
    font-size: 1.25rem;
    color: var(--tummaFonttiVari);
    margin-bottom: 1.2rem;
    margin-top: 0.5rem;
    font-weight: 600;
}

label.nk-btn-add-tag.nk-avatar-upload-label {
    font-size: 1rem;
}
.nk-field input[type="text"],
.nk-field input[type="url"] {
  width: 100%;
  background: var(--nk-surface);
  border: 1.5px solid rgba(45, 75, 45, 0.2);
  border-radius: 8px;
  padding: 0.7rem 1rem;
  color: var(--nk-text);
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  outline: none;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.nk-field input:focus {
  border-color: var(--nk-forest-mid);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(45, 75, 45, 0.1);
}
.nk-field input::placeholder { color: rgba(26, 46, 26, 0.3); }



/* ── Emoji picker ── */
.nk-emoji-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}
.nk-emoji-btn {
  font-size: 1.35rem;
  width: 2.4rem;
  height: 2.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1.5px solid rgba(45,75,45,0.15);
  background: rgba(45,75,45,0.04);
  cursor: pointer;
  transition: all 0.15s;
  line-height: 1;
  padding: 0;
  font-family: 'Segoe UI Emoji', 'Apple Color Emoji', sans-serif;
}
.nk-emoji-btn:hover {
  background: rgba(45,75,45,0.12);
  border-color: var(--nk-forest-mid);
  transform: scale(1.14);
}
.nk-emoji-btn.nk-active {
  background: rgba(45,75,45,0.16);
  border-color: var(--nk-forest);
  box-shadow: 0 0 0 2px rgba(45,75,45,0.18);
  transform: scale(1.08);
}
.nk-emoji-none-btn {
  font-size: 0.7rem;
  font-family: 'DM Mono', monospace;
  color: var(--nk-text-dim);
  width: 2.4rem;
  height: 2.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1.5px dashed rgba(45,75,45,0.2);
  background: transparent;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
  line-height: 1.2;
  padding: 2px;
}
.nk-emoji-none-btn:hover {
  border-color: var(--nk-forest-mid);
  color: var(--nk-text-mid);
}
.nk-emoji-none-btn.nk-active {
  border-style: solid;
  border-color: var(--nk-forest);
  color: var(--nk-text-mid);
  background: rgba(45,75,45,0.06);
}

/* ── Badge toggles ── */
.nk-badges-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
  margin-bottom: 1rem;
}
.nk-badges-grid .badge-toggle { position: relative; }
.nk-badges-grid .badge-toggle input[type="checkbox"] {
  position: absolute; opacity: 0; width: 0; height: 0;
}
.nk-badges-grid .badge-toggle label {
    display: flex;
    font-family: var(--sivustonPerusFontti);
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.25rem 0.25rem 0.25rem 0.5rem;
    font-size: 1rem;
    transition: all 0.15s;
    user-select: none;
    text-transform: none;
    letter-spacing: normal;
    border: 1.5px solid rgba(45, 75, 45, 0.15);
    border-radius: 8px;
    background: rgba(45, 75, 45, 0.04);
    color: var(--tummaFonttiVari);
}
.nk-badges-grid .badge-toggle label:hover {
    border-color: var(--nk-forest);
    color: #0d200d;
    background: #9fd0b0;
}
.nk-badges-grid .badge-toggle input:checked + label {
    background: rgba(45, 75, 45, 0.16);
    border-color: var(--nk-forest);
    box-shadow: 0 0 0 2px rgba(45, 75, 45, 0.18);
}

/* ── Custom tags ── */
.nk-custom-tag-row { display: flex; gap: 0.5rem; margin-bottom: 0.6rem; }
.nk-custom-tag-row input { flex: 1; }
.nk-btn-add-tag {
  padding: 0.7rem 1rem;
  background: rgba(45,75,45,0.08);
  border: 1.5px solid rgba(45,75,45,0.3);
  border-radius: 8px;
  color: var(--nk-forest);
  font-family: 'DM Mono', monospace;
  font-size: 0.85rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
  font-weight: 600;
}
.nk-btn-add-tag:hover { background: rgba(45,75,45,0.16); border-color: var(--nk-forest); }
.nk-custom-tags-list { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.nk-custom-tag-chip {
    display: flex;
    font-family: var(--sivustonPerusFontti);
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.25rem 0.25rem 0.25rem 0.5rem;
    font-size: 1rem;
    transition: all 0.15s;
    user-select: none;
    text-transform: none;
    letter-spacing: normal;
    border: 1.5px solid rgba(45, 75, 45, 0.15);
    border-radius: 8px;
    background: rgba(45, 75, 45, 0.04);
    color: var(--tummaFonttiVari);
}
.nk-custom-tag-chip button {
  background: none;
  border: none;
  color: rgba(45,75,45,0.4);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0;
  transition: color 0.15s;
}
.nk-custom-tag-chip button:hover { color: var(--nk-forest); }

/* ── Theme grid ── */
.nk-theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 0.6rem;
  margin-bottom: 1rem;
}
.nk-theme-swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  transition: transform 0.15s;
}
.nk-theme-swatch:hover { transform: scale(1.06); }
.nk-theme-swatch-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2.5px solid transparent;
  position: relative;
  transition: border-color 0.15s, box-shadow 0.15s;
  overflow: hidden;
}
.nk-theme-swatch-circle::after {
  content: '\2713';
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  color: rgba(255,255,255,0.9);
  opacity: 0;
  transition: opacity 0.15s;
}
.nk-theme-swatch.active .nk-theme-swatch-circle {
  border-color: var(--nk-forest);
  box-shadow: 0 0 0 3px var(--nk-gold-dim);
}
.nk-theme-swatch.active .nk-theme-swatch-circle::after { opacity: 1; }
/* Vaalealle teemalle tumma checkmark */
.nk-theme-swatch.nk-swatch-light .nk-theme-swatch-circle::after {
  color: rgba(0,0,0,0.7);
}
.nk-theme-swatch-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  color: var(--nk-text-dim);
  text-align: center;
  line-height: 1.2;
}
/* ── Print button ── */
.nk-btn-print {
    width: 100%;
    margin-top: 1.8rem;
    padding: 1rem 1.5rem;
    border: none;
    font-size: 1rem;
    text-transform: uppercase;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--navigaatioPainikkeidenTausta, var(--nk-forest));
    color: var(--navigaatioLinkkienVari, #e8f5e8);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 700;
    letter-spacing: 0.1em;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15), 0px 0.4rem #0d200d;
}
.nk-btn-print:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
    box-shadow: 0 8px 24px rgba(45,75,45,0.35), 0px 0.4rem #0d200d;
    background-color: black;
}

div#nk-app {
    margin-top: 5rem;
}

/* ── Preview side ── */
.nk-preview-side {
    padding: 2rem 0 2rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}
.nk-preview-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--nk-forest-mid);
  align-self: flex-start;
}

/* ── Nameplate card ── */
.nk-nameplate {
    width: 370px;
    min-height: 246px;
    border-radius: 10px;
    padding: 45px 20px 16px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 0 rgba(255,255,255,0.06) inset, 0 20px 50px rgba(0,0,0,0.6), 0 0 0 1px rgba(0,0,0,0.3);
    transition: background 0.3s, color 0.3s;
}
.nk-nameplate::before {
  content: '';
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
  opacity: 0.25;
  pointer-events: none;
}
.nk-nameplate.overflow {
  box-shadow: 0 20px 50px rgba(0,0,0,0.6), 0 0 0 2px #e07030;
}

/* Card layout */
.nk-np-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.nk-np-left { flex: 1; min-width: 0; display: flex; align-items: flex-start; gap: 10px; }
.nk-np-emoji {
  font-size: 38px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 0;
  display: inline-block;
  width: 1.1em;
  text-align: center;
  font-family: 'Segoe UI Emoji', 'Apple Color Emoji', sans-serif;
}
.nk-np-avatar {
    width: 70px;
    height: 70px;
    border-radius: 5%;
    object-fit: cover;
    flex-shrink: 0;
    margin-top: 0;
}
.nk-np-name-group { flex: 1; min-width: 0; }
.nk-np-name {
  font-family: 'Cinzel', serif;
  font-weight: 900;
  font-size: 30px;
  line-height: 0.9;
  letter-spacing: -0.01em;
  word-break: break-word;
  hyphens: auto;
}
.nk-np-sub { display: flex; align-items: baseline; gap: 5px; margin-top: 6px; flex-wrap: wrap; }
.nk-np-nick { font-family: 'DM Mono', monospace; font-size: 0.95rem; letter-spacing: 0.08em; }
.nk-np-sep  { font-family: 'Lora', serif; font-size: 9px; opacity: 0.3; }
.nk-np-title { font-family: 'Lora', serif; font-size: 10px; font-style: italic; opacity: 0.6; }
.nk-np-qr { flex-shrink: 0; display: flex; flex-direction: column; align-items: center; }
.nk-np-qr canvas, .nk-np-qr img { display: block; border-radius: 3px; }
.nk-np-divider { height: 1px; opacity: 0.2; margin: 10px 0 8px; background: currentColor; }
.nk-np-badges {
  display: flex; flex-wrap: wrap; gap: 6px;
  flex: 1; align-content: flex-start; margin-top: 6px;
}
.np-badge {
  font-family: 'Lora', serif;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  padding: 4px 9px;
  border-radius: 2px;
  border: 1px solid currentColor;
  color: inherit;
  opacity: 1;
}



/* Avatar upload */
.nk-avatar-upload-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.nk-avatar-upload-label {
  cursor: pointer;
  text-align: center;
}
.nk-avatar-filename {
  font-family: 'DM Mono', monospace;
  font-size: 0.8rem;
  color: var(--nk-text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 160px;
}
.nk-avatar-remove-btn {
  font-size: 0.8rem !important;
  padding: 0.4rem 0.7rem !important;
  color: #a33 !important;
  border-color: rgba(170,51,51,0.3) !important;
}


input#nk-f-custom-emoji {
    max-width: 200px;
}

/* ── Themes (CSS custom properties) ── */

/* Yhteinen perus: kaikki teemat perivät nämä ellei ylikirjoiteta */
.nk-nameplate {
  --nkt-bg: #ffffff;
  --nkt-color: #1a1208;
  --nkt-divider: currentColor;
  --nkt-badge-font: 'Lora', serif;
  --nkt-badge-size: 0.95rem;
  --nkt-badge-radius: 2px;
  --nkt-badge-border: 1px solid currentColor;
  --nkt-badge-bg: transparent;
  --nkt-badge-color: inherit;
  --nkt-badge-padding: 4px 9px;
  --nkt-badge-letter-spacing: 0.04em;
  --nkt-name-font: 'Cinzel', serif;
  --nkt-nick-font: 'DM Mono', monospace;
  --nkt-bg-image: none;
  --nkt-bg-size: cover;
  --nkt-bg-position: center;
  --nkt-bg-repeat: no-repeat;
}

/* ── Parchment (oletus) ── */
.nk-theme-parchment {
  --nkt-bg: #ffffff;
  --nkt-color: #000000;
  --nkt-badge-radius: 2px;
  --nkt-badge-border: 1px solid currentColor;
  --nkt-badge-bg: transparent;
  --nkt-badge-color: inherit;
  --nkt-bg-image: none;
}

/* ── Palapeli ── */
.nk-theme-palapeli {
  --nkt-bg: #111111;
  --nkt-color: #ffffff;
  --nkt-badge-radius: 8px;
  --nkt-badge-border: 1px solid rgb(129 97 28);
  --nkt-badge-bg: rgb(94 63 20 / 25%);
  --nkt-badge-color: #ffffff;
  --nkt-badge-font: var(--sivustonPerusFontti);
  --nkt-badge-size: 0.95rem;
  --nkt-badge-letter-spacing: 0.06em;
  --nkt-bg-image:url("data:image/svg+xml,<svg id='patternId' width='100%' height='100%' xmlns='http://www.w3.org/2000/svg'><defs><pattern id='a' patternUnits='userSpaceOnUse' width='160' height='160' patternTransform='scale(1) rotate(25)'><rect x='0' y='0' width='100%' height='100%' fill='%23543a14ff'/><path d='M121.5 39.5V9.169c0-2.827 1.724-4.707 3.473-5.602l.707-.362c2.086-1.068 4.702-.631 6.359 1.026l1.985 1.985c1.349 1.349 3.235 2.018 5.14 2.128 12.336 0 12.336-18.505 0-18.505M40.75 39.499V9.17c0-2.827-1.724-4.707-3.473-5.602l-.707-.362c-2.086-1.068-4.702-.631-6.359 1.026l-1.985 1.985c-1.349 1.349-3.236 2.018-5.14 2.128-12.336 0-12.336-18.505 0-18.505m146.575 111.248c0-12.337-18.505-12.337-18.505 0 .11 1.904.78 3.79 2.128 5.139l1.985 1.985c1.657 1.657 2.094 4.273 1.026 6.36l-.362.706c-.895 1.75-2.775 3.474-5.602 3.474l-30.33-.001m49.66-63.086c0 12.336-18.505 12.336-18.505 0 .11-1.904.78-3.791 2.128-5.14l1.985-1.985c1.657-1.657 2.094-4.273 1.026-6.359l-.362-.707c-.895-1.749-2.775-3.474-5.602-3.473h-30.33m19.162 130.344c12.337 0 12.337-18.505 0-18.505-1.631 0-3.99.98-5.139 2.128l-1.985 1.985c-1.656 1.656-4.274 2.094-6.36 1.027l-.706-.362c-2.086-1.069-3.474-3.258-3.474-5.602v-34.302l.001-26.228c0-2.344-1.427-4.458-3.473-5.602l-.707-.361a5.83 5.83 0 00-6.36 1.026l-1.984 1.985c-1.144 1.152-3.508 2.128-5.14 2.128-12.336 0-12.336-18.505 0-18.505 1.904.11 3.715.86 5.14 2.128l1.985 1.985a5.812 5.812 0 006.359 1.026l.707-.362c1.287-1.485 3.473-2.775 3.473-5.602v-30.33M23.086 168.343c-12.336 0-12.336-18.505 0-18.505 1.632 0 3.992.98 5.14 2.128l1.985 1.985c1.656 1.656 4.274 2.094 6.359 1.027l.707-.362c2.086-1.069 3.474-3.258 3.474-5.602l-.001-34.302V88.485c0-2.344 1.387-4.533 3.473-5.602l.707-.361c2.085-1.068 4.703-.63 6.359 1.026l1.985 1.985c1.148 1.148 3.508 2.128 5.14 2.128 12.336 0 12.336-18.505 0-18.505-1.905.11-3.791.78-5.14 2.128l-1.985 1.985c-1.657 1.657-4.273 2.094-6.36 1.026l-.706-.362c-1.75-.895-3.474-2.775-3.474-5.602v-30.33m80.75 80.749H91.17c-2.827 0-4.707 1.724-5.602 3.473l-.362.707c-1.068 2.086-.631 4.702 1.026 6.359l1.985 1.985c1.349 1.349 2.018 3.236 2.128 5.14 0 12.336-18.505 12.336-18.505 0 0-1.632.98-3.992 2.128-5.14l1.985-1.985c1.656-1.656 2.094-4.274 1.026-6.359l-.361-.707c-1.069-2.086-3.258-3.474-5.602-3.473h-60.53c-2.344 0-4.533-1.387-5.602-3.473l-.362-.707c-1.067-2.085-.63-4.703 1.027-6.359l1.985-1.985c1.148-1.148 2.128-3.508 2.128-5.14 0-12.336-18.505-12.336-18.505 0M121.5 38H91.169c-2.827 0-4.707-1.724-5.602-3.473l-.362-.707c-1.068-2.086-.631-4.702 1.026-6.359l1.985-1.985c1.349-1.349 2.018-3.235 2.128-5.14C90.344 8 71.84 8 71.84 20.337c0 1.632.977 3.994 2.128 5.14.663.66 1.343 1.305 1.985 1.985 1.608 1.703 2.003 4.23 1.026 6.36-.11.24-.233.474-.361.706C75.48 36.577 73.359 38 71.015 38H36.712L10.485 38c-2.344 0-4.533 1.387-5.602 3.473-.12.236-.24.471-.362.707-1.067 2.085-.63 4.703 1.027 6.36l1.985 1.984c1.148 1.148 2.128 3.508 2.128 5.14C9.66 68-8.844 68-8.844 55.664'  stroke-width='1' stroke='%231310102b' fill='none'/></pattern></defs><rect width='800%' height='800%' transform='translate(0,0)' fill='url(%23a)'/></svg>");
}

/* ── Kuunkajo ── */
.nk-theme-midnight {
  --nkt-bg: #0f1923;
  --nkt-color: #d9d9d9;
  --nkt-badge-radius: 10px;
  --nkt-badge-border: 1px solid rgba(200,190,160,0.4);
  --nkt-badge-bg: rgba(200,190,160,0.08);
  --nkt-badge-color: #d9d9d9;
  --nkt-badge-font: var(--sivustonPerusFontti);
  --nkt-badge-size: 0.95rem;
  --nkt-bg-image: none;
}

/* ── Sakset ── */
.nk-theme-sakset {
  --nkt-bg: #1b2e22;
  --nkt-color: #000000;
  --nkt-badge-radius: 14px;
  --nkt-badge-border: 1px solid #ff480057;
  --nkt-badge-bg: #ff92309c;
  --nkt-badge-color: #000000;
  --nkt-badge-font: var(--sivustonPerusFontti);
  --nkt-badge-size: 0.95rem;
  --nkt-bg-image: url("data:image/svg+xml,<svg id='patternId' width='100%' height='100%' xmlns='http://www.w3.org/2000/svg'><defs><pattern id='a' patternUnits='userSpaceOnUse' width='50' height='50' patternTransform='scale(2) rotate(0)'><rect x='0' y='0' width='100%' height='100%' fill='%23ff6500ff'/><path d='M0 3a22 22 0 1 0 22 22c0-1.15-.17-2.24-.34-3.33-.36-.06-.74-.05-1.1-.12-.32-.07-.62-.21-.94-.29.23 1.21.38 2.46.38 3.74A20 20 0 1 1 0 5.01c1.28 0 2.53.15 3.74.37-.08-.32-.23-.62-.3-.95-.06-.35-.04-.74-.1-1.1C2.24 3.17 1.15 3 0 3Zm50 0a22 22 0 0 0-22 22c0 1.15.17 2.24.34 3.33.36.06.74.05 1.1.12.32.07.62.21.94.29A20.02 20.02 0 0 1 30 25 20 20 0 0 1 50 5.01 20 20 0 1 1 50 45a20.1 20.1 0 0 1-3.74-.38c.08.33.23.62.3.95.06.35.04.73.1 1.1 1.1.16 2.2.33 3.34.33a22 22 0 1 0 0-44ZM0 7a18 18 0 1 0 18 18c0-1.54-.25-3.01-.61-4.43-.31-.12-.65-.17-.95-.3-.52-.22-.98-.54-1.48-.8A15.87 15.87 0 0 1 16 25 16 16 0 1 1 0 9c1.95 0 3.8.4 5.53 1.04-.26-.5-.58-.95-.8-1.48-.13-.3-.18-.64-.3-.94A17.86 17.86 0 0 0 0 7Zm50 0a18 18 0 0 0-18 18c0 1.54.25 3.01.61 4.43.32.12.66.17.96.3.52.22.97.54 1.47.8A15.87 15.87 0 0 1 34 25a16 16 0 1 1 16 16c-1.95 0-3.8-.4-5.53-1.04.26.5.58.95.8 1.48.13.3.18.64.3.95 1.41.36 2.88.61 4.43.61a18 18 0 0 0 0-36ZM0 11a14 14 0 1 0 14 14 13.9 13.9 0 0 0-2.23-7.52c-.8-.61-1.61-1.21-2.32-1.93-.72-.7-1.32-1.52-1.93-2.33A13.9 13.9 0 0 0 0 11Zm50 0a14 14 0 0 0-14 14 13.9 13.9 0 0 0 2.23 7.52c.8.61 1.62 1.21 2.33 1.92s1.31 1.53 1.92 2.33A13.9 13.9 0 0 0 50 39a14 14 0 0 0 0-28ZM0 13.03A11.94 11.94 0 0 1 12 25a12 12 0 0 1-24 0A12 12 0 0 1 0 13.03Zm50 0A11.94 11.94 0 0 1 62 25a12 12 0 0 1-24 0 12 12 0 0 1 12-11.97ZM0 15a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm50 0a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM0 17a8 8 0 1 1 0 16 8 8 0 0 1 0-16zm50 0a8 8 0 1 1 0 16 8 8 0 0 1 0-16zM0 19a6 6 0 1 0 0 12 6 6 0 0 0 0-12Zm50 0a6 6 0 1 0 0 12 6 6 0 0 0 0-12zM0 21a4 4 0 1 1 0 8 4 4 0 0 1 0-8zm50 0a4 4 0 1 1 0 8 4 4 0 0 1 0-8z'  stroke-width='1' stroke='none' fill='%23c50d0d1c'/><path d='M25-22a22 22 0 1 0 0 44c1.15 0 2.24-.17 3.33-.34.06-.36.05-.74.12-1.1.07-.32.21-.62.29-.94-1.21.23-2.46.38-3.74.38A20 20 0 1 1 45 0c0 1.28-.15 2.52-.38 3.74.33-.08.62-.23.95-.3.35-.06.73-.04 1.1-.1.16-1.1.33-2.19.33-3.34a22 22 0 0 0-22-22Zm0 4a18 18 0 1 0 0 36c1.54 0 3.01-.25 4.43-.61.12-.31.17-.65.3-.95.22-.52.54-.98.8-1.48A15.87 15.87 0 0 1 25 16 16 16 0 1 1 41 0c0 1.95-.4 3.8-1.04 5.53.5-.26.95-.58 1.48-.8.3-.13.64-.18.95-.3.36-1.41.61-2.88.61-4.43a18 18 0 0 0-18-18Zm0 4a14 14 0 0 0 0 28 13.9 13.9 0 0 0 7.52-2.23c.61-.8 1.21-1.61 1.92-2.32.71-.72 1.53-1.32 2.33-1.93A13.9 13.9 0 0 0 39 0a14 14 0 0 0-14-14Zm0 2.03A11.94 11.94 0 0 1 37 0a12 12 0 0 1-24 0 12 12 0 0 1 12-11.97ZM25-10a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm0 2a8 8 0 1 1 0 16 8 8 0 0 1 0-16zm0 2a6 6 0 1 0 0 12 6 6 0 0 0 0-12zm0 2a4 4 0 1 1 0 8 4 4 0 0 1 0-8zm0 32c-1.15 0-2.24.17-3.33.34-.06.36-.05.74-.12 1.1-.07.33-.21.63-.3.95 1.22-.23 2.46-.38 3.75-.38A20 20 0 1 1 5 50c0-1.28.15-2.52.38-3.74-.33.08-.62.23-.95.3-.35.06-.73.04-1.1.1C3.17 47.77 3 48.85 3 50a22 22 0 1 0 22-22Zm0 4c-1.54 0-3.01.26-4.43.63-.12.3-.17.63-.3.93-.22.52-.54.98-.8 1.48A15.87 15.87 0 0 1 25 34 16 16 0 1 1 9 50c0-1.95.4-3.8 1.04-5.53-.5.26-.95.58-1.48.8-.3.13-.64.18-.95.3A17.84 17.84 0 0 0 7 50a18 18 0 1 0 18-18Zm0 4a13.9 13.9 0 0 0-7.52 2.23c-.61.8-1.21 1.62-1.93 2.33-.7.71-1.52 1.31-2.33 1.92A13.9 13.9 0 0 0 11 50a14 14 0 1 0 14-14Zm0 2.03A11.94 11.94 0 0 1 37 50a12 12 0 0 1-24 0 12 12 0 0 1 12-11.97ZM25 40a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm0 2a8 8 0 1 1 0 16 8 8 0 0 1 0-16zm0 2a6 6 0 1 0 0 12 6 6 0 0 0 0-12zm0 2a4 4 0 1 1 0 8 4 4 0 0 1 0-8z'  stroke-width='1' stroke='none' fill='%23c50d0d26'/></pattern></defs><rect width='800%' height='800%' transform='translate(0,0)' fill='url(%23a)'/></svg>");
}

/* ── Red ── */
.nk-theme-red {
  --nkt-bg: #1b2e22;
  --nkt-color: #ffffff;
  --nkt-badge-radius: 8px;
  --nkt-badge-border: 1px solid #e57919;
  --nkt-badge-bg: #00000017;
  --nkt-badge-color: #ffffff;
  --nkt-badge-font: var(--sivustonPerusFontti);
  --nkt-badge-size: 0.95rem;
  --nkt-bg-image: url("data:image/svg+xml,<svg id='patternId' width='100%' height='100%' xmlns='http://www.w3.org/2000/svg'><defs><pattern id='a' patternUnits='userSpaceOnUse' width='30' height='40' patternTransform='scale(2) rotate(20)'><rect x='0' y='0' width='100%' height='100%' fill='%23ae3030ff'/><path d='M1.624 19.09l6.597-1.595a.503.503 0 11.238.98L2.145 20l6.314 1.526a.504.504 0 01-.238.98l-6.597-1.595 3.426 3.426a3.813 3.813 0 005.386 0l1.1-1.1a4.584 4.584 0 000-6.475l-1.1-1.099a3.814 3.814 0 00-5.386 0zM-.911 18.377l-1.595-6.597a.504.504 0 11.98-.237L0 17.856l1.526-6.313a.503.503 0 11.98.237L.911 18.377l3.426-3.426a3.813 3.813 0 000-5.386l-1.1-1.099A4.548 4.548 0 000 7.125a4.547 4.547 0 00-3.238 1.341l-1.099 1.099a3.813 3.813 0 000 5.386zM-11.535 16.763a4.584 4.584 0 000 6.476l1.1 1.099a3.813 3.813 0 005.385 0l3.426-3.426-6.597 1.595a.501.501 0 01-.609-.371.504.504 0 01.372-.609l6.313-1.526-6.313-1.526a.504.504 0 11.237-.98l6.597 1.595-3.426-3.426a3.796 3.796 0 00-2.693-1.113c-.975 0-1.95.37-2.693 1.113zM.911 21.625l1.595 6.597a.504.504 0 11-.98.237L0 22.146l-1.526 6.313a.505.505 0 01-.98-.237l1.595-6.597-3.426 3.426a3.813 3.813 0 000 5.386l1.1 1.099a4.584 4.584 0 006.475 0l1.099-1.099a3.813 3.813 0 000-5.386zM31.624 19.09l6.597-1.595a.503.503 0 11.238.98L32.145 20l6.314 1.526a.504.504 0 01-.238.98l-6.597-1.595 3.426 3.426a3.813 3.813 0 005.386 0l1.1-1.1a4.584 4.584 0 000-6.475l-1.1-1.099a3.814 3.814 0 00-5.386 0zM29.089 18.377l-1.595-6.597a.504.504 0 11.98-.237L30 17.856l1.526-6.313a.503.503 0 11.98.237l-1.595 6.597 3.426-3.426a3.813 3.813 0 000-5.386l-1.1-1.099A4.548 4.548 0 0030 7.125a4.547 4.547 0 00-3.238 1.341l-1.099 1.099a3.813 3.813 0 000 5.386zM18.465 16.763a4.584 4.584 0 000 6.476l1.1 1.099a3.813 3.813 0 005.385 0l3.426-3.426-6.597 1.595a.501.501 0 01-.609-.371.504.504 0 01.372-.609l6.313-1.526-6.313-1.526a.504.504 0 11.237-.98l6.597 1.595-3.426-3.426a3.796 3.796 0 00-2.693-1.113c-.975 0-1.95.37-2.693 1.113zM30.911 21.625l1.595 6.597a.504.504 0 11-.98.237L30 22.146l-1.526 6.313a.505.505 0 01-.98-.237l1.595-6.597-3.426 3.426a3.813 3.813 0 000 5.386l1.1 1.099a4.584 4.584 0 006.475 0l1.099-1.099a3.813 3.813 0 000-5.386zM16.624 39.09l6.597-1.595a.503.503 0 11.238.98L17.145 40l6.314 1.526a.504.504 0 01-.238.98l-6.597-1.595 3.426 3.426a3.813 3.813 0 005.386 0l1.1-1.1a4.584 4.584 0 000-6.475l-1.1-1.099a3.814 3.814 0 00-5.386 0zM14.089 38.377l-1.595-6.597a.504.504 0 11.98-.237L15 37.856l1.526-6.313a.503.503 0 11.98.237l-1.595 6.597 3.426-3.426a3.813 3.813 0 000-5.386l-1.1-1.099A4.548 4.548 0 0015 27.125a4.547 4.547 0 00-3.238 1.341l-1.099 1.099a3.813 3.813 0 000 5.386zM3.465 36.763a4.584 4.584 0 000 6.476l1.1 1.099a3.813 3.813 0 005.385 0l3.426-3.426-6.597 1.595a.501.501 0 01-.609-.371.504.504 0 01.372-.609l6.313-1.526-6.313-1.526a.504.504 0 11.237-.98l6.597 1.595-3.426-3.426a3.796 3.796 0 00-2.693-1.113c-.975 0-1.95.37-2.693 1.113zM15.911 41.625l1.595 6.597a.504.504 0 11-.98.237L15 42.146l-1.526 6.313a.505.505 0 01-.98-.237l1.595-6.597-3.426 3.426a3.813 3.813 0 000 5.386l1.1 1.1a4.584 4.584 0 006.475 0l1.099-1.1a3.813 3.813 0 000-5.386zM16.624-.91l6.597-1.595a.503.503 0 11.238.98L17.145 0l6.314 1.526a.504.504 0 01-.238.98L16.624.912l3.426 3.426a3.813 3.813 0 005.386 0l1.1-1.1a4.584 4.584 0 000-6.475l-1.1-1.099a3.814 3.814 0 00-5.386 0zM14.089-1.623L12.494-8.22a.504.504 0 11.98-.237L15-2.144l1.526-6.313a.503.503 0 11.98.237l-1.595 6.597 3.426-3.426a3.813 3.813 0 000-5.386l-1.1-1.099A4.548 4.548 0 0015-12.875a4.547 4.547 0 00-3.238 1.341l-1.099 1.099a3.813 3.813 0 000 5.386zM3.465-3.237a4.584 4.584 0 000 6.476l1.1 1.099a3.813 3.813 0 005.385 0L13.376.912 6.779 2.507a.501.501 0 01-.609-.371.504.504 0 01.372-.609L12.855.001 6.542-1.525a.504.504 0 11.237-.98L13.376-.91 9.95-4.336a3.796 3.796 0 00-2.693-1.113c-.975 0-1.95.37-2.693 1.113zM15.911 1.625l1.595 6.597a.504.504 0 11-.98.237L15 2.146 13.474 8.46a.505.505 0 01-.98-.237l1.595-6.597-3.426 3.426a3.813 3.813 0 000 5.386l1.1 1.099a4.584 4.584 0 006.475 0l1.099-1.099a3.813 3.813 0 000-5.386z'  stroke-width='1' stroke='none' fill='%23c940136a'/></pattern></defs><rect width='800%' height='800%' transform='translate(0,0)' fill='url(%23a)'/></svg>");
}

/* ── Aatelinen ── */
.nk-theme-aatelinen {
  --nkt-bg: #eed9ff;
  --nkt-color: #ffffff;
  --nkt-badge-radius: 8px;
  --nkt-badge-border: 1px solid #eed9ff;
  --nkt-badge-bg: #4d2c8c;
  --nkt-badge-color: #ffffff;
  --nkt-badge-font: var(--sivustonPerusFontti);
  --nkt-badge-size: 0.95rem;
  --nkt-bg-image: url("data:image/svg+xml,<svg id='patternId' width='100%' height='100%' xmlns='http://www.w3.org/2000/svg'><defs><pattern id='a' patternUnits='userSpaceOnUse' width='60' height='60' patternTransform='scale(1) rotate(0)'><rect x='0' y='0' width='100%' height='100%' fill='%234d2b8cff'/><path d='M6.13-.002.005 6.125v1.059L6.59 13.77l.013-.014 16.243 16.24L6.617 46.23.535 40.15l10.147-10.153L.004 19.318v1.037l9.644 9.641-9.646 9.65v1.03L12.73 53.402l-6.082 6.082-6.127-6.127.014-.015-.533-.531v1.06l6.127 6.127h1.055l6.586-6.584-.012-.012 16.246-16.246L46.236 53.39l-6.082 6.082-10.15-10.15-10.68 10.677h1.033l9.647-9.644 9.646 9.644h1.034l12.722-12.723 6.082 6.082-6.125 6.125-.013-.011-.528.527h1.057l6.123-6.123V52.81l-6.58-6.58-.016.015L37.16 29.996 53.393 13.77l6.082 6.082-10.15 10.144 10.677 10.678v-1.031l-9.647-9.647 9.647-9.64v-1.038L47.279 6.596 53.361.514l6.13 6.127-.016.013.527.53V6.123L53.879-.002h-1.057l-6.586 6.586.014.012-16.244 16.246L13.77 6.607l6.082-6.08 10.153 10.15L40.684-.001H39.65l-9.646 9.647-9.647-9.647h-1.03L6.601 12.723.52 6.64 6.646.514l.012.013.528-.529H6.13zm7.114 7.113 16.76 16.76 16.762-16.76 6.127 6.127-16.764 16.758 16.764 16.762-6.127 6.127-16.76-16.76-16.762 16.76-6.127-6.127 16.758-16.762L7.117 13.238l6.127-6.127z'  stroke-width='1' stroke='none' fill='%2385409c7b'/></pattern></defs><rect width='800%' height='800%' transform='translate(0,0)' fill='url(%23a)'/></svg>");
}

/* Loiskis */
.nk-theme-loiske {
  --nkt-bg: #2a0a0a;
  --nkt-color: #000000;
  --nkt-badge-radius: 20px;
  --nkt-badge-border: 1px solid rgb(176 244 255);
  --nkt-badge-bg: rgb(121 205 255);
  --nkt-badge-color: #000000;
  --nkt-badge-font: var(--sivustonPerusFontti);
  --nkt-badge-size: 0.95rem;
  --nkt-badge-letter-spacing: 0.08em;
  --nkt-bg-image: url("data:image/svg+xml,<svg id='patternId' width='100%' height='100%' xmlns='http://www.w3.org/2000/svg'><defs><pattern id='a' patternUnits='userSpaceOnUse' width='35.584' height='30.585' patternTransform='scale(2) rotate(0)'><rect x='0' y='0' width='100%' height='100%' fill='%235abcf8ff'/><path d='M36.908 9.243c-5.014 0-7.266 3.575-7.266 7.117 0 3.376 2.45 5.726 5.959 5.726 1.307 0 2.45-.463 3.244-1.307.744-.811 1.125-1.903 1.042-3.095-.066-.811-.546-1.655-1.274-2.185-.596-.447-1.639-.894-3.162-.546-.48.1-.778.58-.662 1.06.1.48.58.777 1.06.661.695-.149 1.274-.066 1.705.249.364.265.546.645.562.893.05.679-.165 1.308-.579 1.755-.446.48-1.125.744-1.936.744-2.55 0-4.188-1.538-4.188-3.938 0-2.466 1.44-5.347 5.495-5.347 2.897 0 6.008 1.888 6.388 6.058.166 1.804.067 5.147-2.598 7.034a.868.868 0 00-.142.122c-1.311.783-2.87 1.301-4.972 1.301-4.088 0-6.123-1.952-8.275-4.021-2.317-2.218-4.7-4.518-9.517-4.518-4.094 0-6.439 1.676-8.479 3.545.227-1.102.289-2.307.17-3.596-.496-5.263-4.567-7.662-8.159-7.662-5.015 0-7.265 3.574-7.265 7.116 0 3.377 2.45 5.727 5.958 5.727 1.307 0 2.449-.463 3.243-1.308.745-.81 1.126-1.903 1.043-3.095-.066-.81-.546-1.654-1.274-2.184-.596-.447-1.639-.894-3.161-.546-.48.1-.778.58-.662 1.06.099.48.579.777 1.059.66.695-.148 1.275-.065 1.705.25.364.264.546.645.563.893.05.679-.166 1.307-.58 1.754-.447.48-1.125.745-1.936.745-2.549 0-4.188-1.539-4.188-3.939 0-2.466 1.44-5.345 5.495-5.345 2.897 0 6.008 1.87 6.389 6.057.163 1.781.064 5.06-2.504 6.96-1.36.864-2.978 1.447-5.209 1.447-4.088 0-6.124-1.952-8.275-4.021-2.317-2.218-4.7-4.518-9.516-4.518v1.787c4.088 0 6.123 1.953 8.275 4.022 2.317 2.218 4.7 4.518 9.516 4.518 4.8 0 7.2-2.3 9.517-4.518 2.151-2.069 4.187-4.022 8.275-4.022s6.124 1.953 8.275 4.022c2.318 2.218 4.701 4.518 9.517 4.518 4.8 0 7.2-2.3 9.516-4.518 2.152-2.069 4.188-4.022 8.276-4.022s6.123 1.953 8.275 4.022c2.317 2.218 4.7 4.518 9.517 4.518v-1.788c-4.088 0-6.124-1.952-8.275-4.021-2.318-2.218-4.701-4.518-9.517-4.518-4.103 0-6.45 1.683-8.492 3.556.237-1.118.304-2.343.184-3.656-.497-5.263-4.568-7.663-8.16-7.663z'  stroke-width='1' stroke='none' fill='%23009dff3b'/><path d='M23.42 41.086a.896.896 0 01-.729-.38.883.883 0 01.215-1.242c2.665-1.887 2.764-5.23 2.599-7.034-.38-4.187-3.492-6.058-6.389-6.058-4.055 0-5.495 2.88-5.495 5.346 0 2.4 1.639 3.94 4.188 3.94.81 0 1.49-.265 1.936-.745.414-.447.63-1.076.58-1.755-.017-.248-.2-.629-.547-.893-.43-.315-1.026-.398-1.704-.249a.868.868 0 01-1.06-.662.868.868 0 01.662-1.059c1.523-.348 2.566.1 3.161.546.729.53 1.209 1.374 1.275 2.185.083 1.191-.298 2.284-1.043 3.095-.794.844-1.936 1.307-3.244 1.307-3.508 0-5.958-2.35-5.958-5.726 0-3.542 2.25-7.117 7.266-7.117 3.591 0 7.663 2.4 8.16 7.663.347 3.79-.828 6.868-3.344 8.656a.824.824 0 01-.53.182zm0-30.585a.896.896 0 01-.729-.38.883.883 0 01.215-1.242c2.665-1.887 2.764-5.23 2.599-7.034-.381-4.187-3.493-6.058-6.389-6.058-4.055 0-5.495 2.88-5.495 5.346 0 2.4 1.639 3.94 4.188 3.94.81 0 1.49-.266 1.936-.746.414-.446.629-1.075.58-1.754-.017-.248-.2-.629-.547-.894-.43-.314-1.026-.397-1.705-.248A.868.868 0 0117.014.77a.868.868 0 01.662-1.06c1.523-.347 2.566.1 3.161.547.729.53 1.209 1.374 1.275 2.185.083 1.191-.298 2.284-1.043 3.095-.794.844-1.936 1.307-3.244 1.307-3.508 0-5.958-2.35-5.958-5.726 0-3.542 2.25-7.117 7.266-7.117 3.591 0 7.663 2.4 8.16 7.663.347 3.79-.828 6.868-3.344 8.656a.824.824 0 01-.53.182zm29.956 1.572c-4.8 0-7.2-2.3-9.517-4.518-2.151-2.069-4.187-4.022-8.275-4.022S29.46 5.486 27.31 7.555c-2.317 2.218-4.7 4.518-9.517 4.518-4.8 0-7.2-2.3-9.516-4.518C6.124 5.486 4.088 3.533 0 3.533s-6.124 1.953-8.275 4.022c-2.317 2.218-4.7 4.518-9.517 4.518-4.8 0-7.2-2.3-9.516-4.518-2.152-2.069-4.188-4.022-8.276-4.022V1.746c4.8 0 7.2 2.3 9.517 4.518 2.152 2.069 4.187 4.022 8.275 4.022s6.124-1.953 8.276-4.022C-7.2 4.046-4.816 1.746 0 1.746c4.8 0 7.2 2.3 9.517 4.518 2.151 2.069 4.187 4.022 8.275 4.022s6.124-1.953 8.275-4.022c2.318-2.218 4.7-4.518 9.517-4.518 4.8 0 7.2 2.3 9.517 4.518 2.151 2.069 4.187 4.022 8.275 4.022s6.124-1.953 8.275-4.022c2.317-2.218 4.7-4.518 9.517-4.518v1.787c-4.088 0-6.124 1.953-8.275 4.022-2.317 2.234-4.717 4.518-9.517 4.518z'  stroke-width='1' stroke='none' fill='%23d1edff2f'/></pattern></defs><rect width='800%' height='800%' transform='translate(0,0)' fill='url(%23a)'/></svg>");
  /*  */
}

/* Lehti */
.nk-theme-lehti {
  --nkt-bg: #1c2333;
  --nkt-color: #000000;
  --nkt-badge-radius: 8px;
  --nkt-badge-border: 1px solid rgb(69 94 64);
  --nkt-badge-bg: #b8c57361;
  --nkt-badge-color: #000000;
  --nkt-badge-font: var(--sivustonPerusFontti);
  --nkt-badge-size: 0.95rem;
  --nkt-bg-image: url("data:image/svg+xml,<svg id='patternId' width='100%' height='100%' xmlns='http://www.w3.org/2000/svg'><defs><pattern id='a' patternUnits='userSpaceOnUse' width='60' height='60' patternTransform='scale(3) rotate(0)'><rect x='0' y='0' width='100%' height='100%' fill='%2398b750ff'/><path d='M27.048 0c.18.261.34.514.55.784.258.333.542.667.849 1.008 1.722 1.909 4.248 3.908 7.92 5.594a32.548 32.547 0 0 1-.2-1.459c-.735-1.405-2.132-3.544-4.61-5.927Zm11.084 0c-.02.061-.043.115-.063.177.194.357.388.756.58 1.186A18.02 18.02 0 0 0 40.344 0h-2.21zm-1.475 8.97c-.717 4.48-1.856 7.972-2.736 10.206.058.129.116.254.174.387.852-2.118 1.983-5.485 2.739-9.821a26.757 26.757 0 0 1-.177-.772Zm-15.964 9.563s.115 6.664 8.888 11.879c5.718 10.854 7.544 20.709 7.732 28.522.104.153.21.31.32.488a59.775 59.774 0 0 0-1.026-10.057c.425-.376 5.796-5.34 7.228-17.74 0 0-7.228 4.363-7.261 17.314 0 .077-.006.148-.006.225a63.685 63.684 0 0 0-1.199-5.117 67.564 67.563 0 0 0-3.162-8.872c.353-.361 2.24-2.453 3.59-6.786.052-.165.1-.338.15-.51.567-1.956 1.023-4.322 1.186-7.176 0 0-.912.633-1.959 2.052a14.32 14.319 0 0 0-1.674 2.987c-.93 2.223-1.606 5.263-1.36 9.282a73.945 73.944 0 0 0-2.081-4.345c-.059-.304-1.256-6.09-9.366-12.146ZM20.06 31.01s2.627 6.405 13.18 7.898c0 0-3.148-5.16-13.18-7.898zm1.479 11.43s1.24 4.126 6.5 7.68c.604.41 1.266.807 1.98 1.193 1.885 1.017 4.144 1.939 6.906 2.62 0 0-3.26-6.815-15.386-11.494zm26.643 5.545s-6.728 1.958-10.049 12.013h2.215c2.217-1.989 5.331-5.655 7.835-12.013zM24.75 54.864s.056.402.25 1.058c.275.93.888 2.406 2.048 4.078h4.51c-1.512-1.456-3.426-3.002-5.845-4.53-.32-.202-.625-.405-.963-.606Z'  stroke-width='1' stroke='none' fill='%234f762d1e'/><path d='M35.976 0a39.234 39.234 0 0 0 .19 5.93 32.78 32.78 0 0 0 .49 3.04c.057.268.117.519.178.772 1.001 4.187 2.5 6.33 2.698 6.595-1.782 4.28-2.896 8.291-3.564 11.85-.005-.105-.016-.204-.023-.31-.049.171-.098.344-.149.51.046.04.088.077.118.101a54.862 54.861 0 0 0-.687 5.094 51.625 51.625 0 0 0 .14 10.465 62.893 62.892 0 0 1 1.2 5.115c0-.077.005-.148.005-.225-.23-.82-1.707-6.525-1.077-14.797 11.934-2.466 14.487-9.962 14.487-9.962-10.384 3.53-13.962 8.976-14.48 9.846.012-.145.019-.284.03-.43C36.25 25.305 39.336 12.837 49.748 0h-.379a74.345 74.344 0 0 0-2.257 2.921A24.549 24.548 0 0 0 48.507 0h-2.173c.063 1.858.365 3.037.463 3.348-3.148 4.405-5.478 8.722-7.191 12.8 1.494-6.89.39-11.752-.96-14.784a16.48 16.479 0 0 0-.58-1.187c-.036-.064-.07-.114-.104-.177Zm23.555 1.822c-10.382.594-14.534 4.986-14.534 4.986C55.63 7.541 59.53 1.822 59.53 1.822Zm-31.035 10.76c1.09 6.525 3.273 10.713 5.003 13.16a14.316 14.316 0 0 1 1.675-2.987 21.8 21.8 0 0 0-1.08-3.193c-.057-.132-.115-.257-.174-.387-2.227-4.875-5.424-6.593-5.424-6.593zm27.213.112c-12.834 2.057-17.44 8.046-17.44 8.046 5.695-.187 9.698-1.687 12.427-3.341l-.004-.067.051.039c3.618-2.207 4.966-4.677 4.966-4.677zm-6.826 35.523C46.65 53.394 46.251 57.388 46.338 60h2.172c2.884-7.21.373-11.783.373-11.783zM.118 50.167 0 50.23v2.282c.488-.706.85-1.354 1.076-1.857-.333-.159-.648-.322-.958-.488ZM60 50.23c-7.934 4.104-10.066 8.92-10.18 9.19-.158.193-.29.385-.446.578h.376c.2-.246.385-.493.591-.74 2.196-.744 3.98-1.65 5.41-2.614-.848-1.764-1.003-2.98-1.003-2.98a39.887 39.886 0 0 1 2.65 1.724A14.99 14.99 0 0 0 60 52.512v-2.281Zm-23.854 7.253A46.09 46.089 0 0 0 35.978 60h1.988a12.277 12.277 0 0 0-.654-1.066c-.658-.964-1.166-1.451-1.166-1.451Z'  stroke-width='1' stroke='none' fill='%2332582c18'/><path d='M5.955 0c-.02 1.722.052 3.308.21 4.727a34.195 34.194 0 0 0 .49 3.044c.057.269.118.519.178.772 1.002 4.187 2.501 6.328 2.698 6.593A59.244 59.244 0 0 0 5.97 26.987c-.006-.106-.017-.203-.024-.308-.05.17-.099.343-.15.509l.117.1a54.856 54.855 0 0 0-.685 5.094 51.616 51.616 0 0 0 .14 10.464 62.928 62.928 0 0 1 1.2 5.117c0-.077.005-.148.005-.225-.23-.82-1.708-6.525-1.078-14.798 11.934-2.467 14.488-9.962 14.488-9.962-10.384 3.529-13.964 8.977-14.481 9.848.011-.146.019-.287.031-.432C6.228 24.363 9.144 12.41 18.793 0h-.35c-.444.573-.915 1.15-1.33 1.72.33-.587.619-1.16.88-1.72h-1.584c.12 1.147.315 1.912.389 2.148-3.148 4.405-5.479 8.721-7.191 12.798 1.494-6.891.39-11.751-.96-14.784C8.62.103 8.594.058 8.567 0Zm21.643.784c-8.967.982-12.602 4.825-12.602 4.825 7.524.52 11.665-2.187 13.45-3.818a18.443 18.443 0 0 1-.848-1.007ZM58.495 11.38A38.903 38.902 0 0 0 60 17.446v-4.929c-.876-.78-1.505-1.136-1.505-1.136zm-32.787.115c-12.834 2.056-17.44 8.044-17.44 8.044 13.317-.438 17.44-8.044 17.44-8.044ZM0 12.519v4.931c1.08 3.192 2.38 5.513 3.498 7.092a14.358 14.358 0 0 1 1.675-2.986 21.764 21.764 0 0 0-1.08-3.192 9.668 9.668 0 0 0-.173-.388C2.669 15.236 1.125 13.52 0 12.519Zm18.884 34.497c-2.615 6.058-2.732 10.505-2.473 12.983h1.586c3.687-7.902.887-12.983.887-12.983zm9.155 3.106c-6.335 3.823-8.115 7.851-8.217 8.098-.49.596-.92 1.186-1.377 1.78h.346a73.77 73.768 0 0 1 1.548-1.943c1.83-.621 3.369-1.351 4.657-2.136a7.898 7.898 0 0 1-.248-1.058c.342.201.645.404.965.606 2.071-1.388 3.435-2.886 4.307-4.155a23.193 23.193 0 0 1-1.98-1.192ZM6.145 56.283a44.697 44.696 0 0 0-.188 3.716h2.61a16.122 16.122 0 0 0-.498-1.021 16.038 16.038 0 0 0-.438-.755 12.277 12.277 0 0 0-.318-.488c-.658-.965-1.168-1.452-1.168-1.452Z'  stroke-width='1' stroke='none' fill='%234f762d20'/><path d='M0 0v2.1c1.6 1.424 3.654 2.842 6.367 4.087a32.6 32.6 0 0 1-.198-1.458C5.559 3.564 4.473 1.89 2.723 0Zm8.569 0c.027.058.054.104.08.164.064-.045.149-.115.218-.164H8.57Zm49.365 0A19.823 19.823 0 0 0 60 2.1V0ZM6.656 7.771c-.717 4.48-1.856 7.97-2.736 10.205.058.127.117.253.174.387.852-2.119 1.985-5.484 2.74-9.82-.06-.253-.122-.503-.178-.772Zm44.038 9.558.002.068c.033.655.585 6.879 8.885 11.814.146.276.279.55.419.825v-.807c-.272-1.105-1.893-6.34-9.257-11.858-.018-.014-.031-.027-.05-.04zM7.132 19.503s-.91.633-1.957 2.052A14.34 14.34 0 0 0 3.5 24.54c-.931 2.223-1.607 5.263-1.36 9.283a73.945 73.944 0 0 0-2.082-4.346L0 29.235v.802C5.38 40.564 7.132 50.12 7.314 57.733c.104.153.207.311.318.489a59.795 59.794 0 0 0-1.026-10.06c.425-.375 5.798-5.338 7.23-17.736 0 0-7.228 4.362-7.261 17.312 0 .078-.006.148-.006.225a62.922 62.921 0 0 0-1.199-5.117 67.564 67.563 0 0 0-3.162-8.871c.353-.362 2.238-2.454 3.589-6.787.051-.165.102-.338.151-.51.567-1.955 1.02-4.321 1.184-7.175zm42.93 10.308s2.083 5.045 9.938 7.22v-2.557c-2.062-1.567-5.236-3.38-9.939-4.663ZM0 34.474v2.557c.99.275 2.058.51 3.24.677 0 0-.904-1.458-3.24-3.234zm51.54 6.766s1.54 5.113 8.46 8.86v-4.45c-2.166-1.504-4.928-3.047-8.46-4.41ZM0 45.65v4.45l.117.066c.311.165.627.33.96.49 1.665.8 3.588 1.52 5.85 2.078 0 0-1.657-3.424-6.927-7.084zm18.181 1.135S11.368 48.76 8.07 58.975c.166.309.334.66.5 1.024h.297c2.079-1.495 6.177-5.239 9.315-13.214Zm36.57 6.877s.154 1.218 1.002 2.983c.473.984 1.172 2.14 2.181 3.354H60v-2.586a36 35.999 0 0 0-2.601-2.025 41.5 41.499 0 0 0-2.648-1.726zM0 57.413V60h2.72A31.173 31.172 0 0 0 0 57.413Z'  stroke-width='1' stroke='none' fill='%23ecf3a014'/></pattern></defs><rect width='800%' height='800%' transform='translate(0,0)' fill='url(%23a)'/></svg>");
  /*  */
}

/* Hunaja */
.nk-theme-hunaja {
  --nkt-bg: #2b1f00;
  --nkt-color: #000000;
  --nkt-badge-radius: 2rem;
  --nkt-badge-border: 1px solid rgb(111 104 83 / 35%);
  --nkt-badge-bg: #ffd41e;
  --nkt-badge-color: #000000;
  --nkt-badge-font: var(--sivustonPerusFontti);
  --nkt-badge-size: 0.95rem;
  --nkt-bg-image: url("data:image/svg+xml,<svg id='patternId' width='100%' height='100%' xmlns='http://www.w3.org/2000/svg'><defs><pattern id='a' patternUnits='userSpaceOnUse' width='29' height='50.115' patternTransform='scale(2) rotate(0)'><rect x='0' y='0' width='100%' height='100%' fill='%23ffd41dff'/><path d='M14.499 11.82L4.36 5.968l.002-11.706 10.14-5.855L24.638-5.74l-.001 11.707zm0 50.06L4.36 56.029l.002-11.706 10.14-5.855 10.137 5.852-.001 11.707zm14.498-25.117L18.858 30.91l.002-11.707L29 13.349l10.137 5.853-.001 11.706zm-29 0l-10.139-5.852.002-11.707L0 13.349l10.138 5.853-.002 11.706zm14.501-19.905L0 8.488.002-8.257l14.5-8.374L29-8.26l-.002 16.745zm0 50.06L0 58.548l.002-16.745 14.5-8.373L29 41.8l-.002 16.744zM28.996 41.8l-14.498-8.37.002-16.744L29 8.312l14.498 8.37-.002 16.745zm-29 0l-14.498-8.37.002-16.744L0 8.312l14.498 8.37-.002 16.745z'  stroke-linecap='square' stroke-width='1' stroke='%2349270312' fill='none'/></pattern></defs><rect width='800%' height='800%' transform='translate(0,0)' fill='url(%23a)'/></svg>");
  /*  */
}

/* ── Sovelletaan CSS-muuttujat korttiin ── */
.nk-nameplate {
  background-color: var(--nkt-bg) !important;
  background-image: var(--nkt-bg-image) !important;
  background-size: var(--nkt-bg-size) !important;
  background-position: var(--nkt-bg-position) !important;
  background-repeat: var(--nkt-bg-repeat) !important;
  color: var(--nkt-color) !important;
}

.nk-nameplate .nk-np-name {
  font-family: var(--nkt-name-font);
  color: var(--nkt-color);
}
.nk-nameplate .nk-np-nick {
  font-family: var(--nkt-nick-font);
  color: var(--nkt-color);
}
.nk-nameplate .nk-np-divider {
  background: var(--nkt-color);
}
.nk-nameplate .np-badge {
  font-family: var(--nkt-badge-font) !important;
  font-size: var(--nkt-badge-size) !important;
  letter-spacing: var(--nkt-badge-letter-spacing) !important;
  padding: var(--nkt-badge-padding) !important;
  border-radius: var(--nkt-badge-radius) !important;
  border: var(--nkt-badge-border) !important;
  background: var(--nkt-badge-bg) !important;
  color: var(--nkt-badge-color) !important;
  opacity: 1 !important;
}

/* ── Size note ── */
.nk-size-note-wrap { display: flex; flex-direction: column; align-items: center; gap: 0.3rem; }
#nk-size-note { font-family: 'DM Mono', monospace; font-size: 0.72rem; color: var(--nk-text-dim); }
#nk-overflow-warning {
    font-family: 'DM Mono', monospace;
    font-size: 1.25rem;
    margin-top: 1.5rem;
    text-shadow: 0.1rem 0.1rem 0.25rem #fff;
    color: #000000;
    animation: nk-pulse 1.75s ease-in-out infinite;
    text-align: center;
}


@keyframes nk-pulse {
  0%,100% { opacity: 1; }
  50%      { opacity: 0.5; }
}

/* ── Print: 1:1 fyysinen koko ── */
/* Kaksi polkua:
   A) Mobiili – puhdas CSS, ei riipu JS:stä lainkaan
   B) Desktop – JS-kloonattu kortti (body.nk-printing) */
@media print {
  @page { size: auto; margin: 10mm; }

  html, body {
    background: white !important;
    margin: 0 !important; padding: 0 !important;
    height: auto !important; min-height: 0 !important;
    overflow: visible !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* ── A) Puhdas CSS: piilota kaikki sivun osat paitsi kortti ──
     Nämä säännöt toimivat AINA, myös kun JS ei ehdi vaikuttaa */
  #main-navigation,
  #footer,
  .nk-hero,
  .nk-form-side,
  .nk-size-note-wrap,
  .nk-btn-print,
  .nk-section-label,
  .nk-emoji-picker,
  .nk-badges-grid,
  .nk-custom-tag-row,
  .nk-field,
  #artikkelivalikkoToggle,
  .artikkelivalikko-drawer {
    display: none !important;
  }

  /* Nollaa containerien tyylit ettei jää ylimääräistä tilaa */
  #nk-app,
  .nk-workspace,
  .nk-preview-side,
  .container,
  .sivunsisalto,
  .artikkeli-sisalto,
  #content {
    background: none !important;
    background-image: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    overflow: visible !important;
    max-width: none !important;
    width: auto !important;
  }

  /* Kortin tulostusmitat – toimii myös ilman JS-kloonia */
  #nk-nameplate {
    width: 98mm !important;
    min-height: 65mm !important;
    max-height: 65mm !important;
    height: 65mm !important;
    box-shadow: none !important;
    border: 1px solid #bbb !important;
    border-radius: 0 !important;
    transform: none !important;
    padding: 5mm 5.3mm 4.2mm !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* ── B) Desktop: kun JS-klooni on läsnä ── */
  body.nk-printing > *:not(#nk-print-clone) {
    display: none !important;
    height: 0 !important;
    overflow: hidden !important;
    visibility: hidden !important;
  }

  body.nk-printing #main-navigation {
    display: none !important;
    visibility: hidden !important;
    position: absolute !important;
  }

  #nk-print-clone {
    display: flex !important;
    flex-direction: column !important;
    visibility: visible !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    box-shadow: none !important;
    border: 1px solid #bbb !important;
    border-radius: 0 !important;
    padding: 5mm 5.3mm 4.2mm !important;
    margin: 0 !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    transform: none !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* Teemavärit ja badge-tyylit säilyvät tulostuksessa */
  #nk-print-clone,
  #nk-nameplate {
    background-color: var(--nkt-bg) !important;
    background-image: var(--nkt-bg-image) !important;
    background-size: var(--nkt-bg-size) !important;
    background-position: var(--nkt-bg-position) !important;
    background-repeat: var(--nkt-bg-repeat) !important;
    color: var(--nkt-color) !important;
  }
  #nk-print-clone .np-badge {
    font-family: var(--nkt-badge-font) !important;
    font-size: var(--nkt-badge-size) !important;
    letter-spacing: var(--nkt-badge-letter-spacing) !important;
    padding: var(--nkt-badge-padding) !important;
    border-radius: var(--nkt-badge-radius) !important;
    border: var(--nkt-badge-border) !important;
    background: var(--nkt-badge-bg) !important;
    color: var(--nkt-badge-color) !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  #nk-print-clone .nk-np-name {
    font-family: var(--nkt-name-font) !important;
    color: var(--nkt-color) !important;
  }
  #nk-print-clone .nk-np-nick {
    font-family: var(--nkt-nick-font) !important;
    color: var(--nkt-color) !important;
  }
  #nk-print-clone .nk-np-divider {
    background: var(--nkt-color) !important;
  }

  #nk-print-clone *,
  #nk-print-clone *::before,
  #nk-print-clone *::after {
    visibility: visible !important;
    box-sizing: border-box !important;
  }
}

/* ── Mobiili-responsiivisuus ── */

/* Mobiilioverridet poistettu - layout on jo yksisarake */

/* Kortti skaalautuu kun ei mahdu leveydeltä */
@media (max-width: 780px) {

}

/* Pienimmät puhelimet: pienennä kortti ~80% */
@media (max-width: 430px) {
  #nk-nameplate {
    transform: scale(0.78);
    margin-bottom: calc((var(--nk-card-h-px, 246px) * 0.22) * -1);
  }
}

/* Keskikokoiset puhelimet 431–550px: pienennä ~90% */
@media (min-width: 431px) and (max-width: 550px) {
  #nk-nameplate {
    transform: scale(0.88);
    margin-bottom: calc((var(--nk-card-h-px, 246px) * 0.12) * -1);
  }
}
