/* PIKABINGO ([ykk_bingo]) – look from the Ykkösbingo design canvas, in the site's own fonts (Montserrat + system UI). */
.ykk-bingo {
  --bingo-bg: #E6EFF9; --bingo-ink: #13233A; --bingo-blue: #1E5AA8; --bingo-line: #C3D4EA;
  --bingo-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --bingo-head: Montserrat, Arial, sans-serif;
  background: var(--bingo-bg); color: var(--bingo-ink); font-family: var(--bingo-font);
  border-radius: 24px; padding: 40px; margin: 0 auto 32px; max-width: 880px; box-sizing: border-box;
  display: flex; flex-direction: column; gap: 22px;
}
.ykk-bingo *, .ykk-bingo *::before, .ykk-bingo *::after { box-sizing: border-box; }
/* The card starts right under the site header: no theme padding above it, flat top edge against the header */
body.ykk-bingo-page main#content { padding-top: 0 !important; margin-top: 0 !important; }
body.ykk-bingo-page .page-content > .ykk-bingo:first-child, body.ykk-bingo-page .page-content > p:first-child + .ykk-bingo { margin-top: 0; }
body.ykk-bingo-page .ykk-bingo { border-top-left-radius: 0; border-top-right-radius: 0; }
.ykk-bingo p { margin: 0; }

/* Header */
.ykk-bingo__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; }
.ykk-bingo__titles { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ykk-bingo .ykk-bingo__kicker { font-size: 14px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--bingo-blue); }
.ykk-bingo .ykk-bingo__title { margin: 0 !important; padding: 0 !important; font: 800 clamp(44px, 11vw, 96px)/.9 var(--bingo-head) !important; letter-spacing: -.03em !important;
  color: var(--bingo-ink) !important; text-transform: none !important; text-align: left !important; }
.ykk-bingo .ykk-bingo__intro { font-size: 17px; line-height: 1.45; max-width: 520px; }
.ykk-bingo__badge { flex: none; width: 124px; height: 124px; border-radius: 50%; border: 13px solid var(--bingo-blue); display: flex; align-items: center; justify-content: center; }
/* A short badge (the default "1") is drawn big; longer texts like 5,5 get the smaller size */
.ykk-bingo__badge span { font: 800 32px/1 var(--bingo-head); color: var(--bingo-blue); }
.ykk-bingo__badge.is-big span { font-size: 70px; margin-top: -4px; }

/* Card */
.ykk-bingo__grid { display: grid; grid-template-columns: repeat(var(--bingo-n, 5), minmax(0, 1fr)); gap: 8px; }
.ykk-bingo__cell {
  position: relative; aspect-ratio: 1 / 1; min-height: 0; height: auto; margin: 0; padding: 10px; border-radius: 12px; border: 2px solid var(--bingo-line) !important; background: #fff !important;
  color: var(--bingo-ink) !important; display: flex; align-items: center; justify-content: center; text-align: center; overflow: hidden;
  font: 500 15px/1.28 var(--bingo-font) !important; font-size: calc(15px * var(--bingo-scale, 1)) !important;
  letter-spacing: 0 !important; text-transform: none !important; box-shadow: none !important;
  cursor: pointer; -webkit-tap-highlight-color: transparent; hyphens: manual; -webkit-hyphens: manual; overflow-wrap: normal; word-break: normal;
  transition: border-color .15s ease, transform .1s ease;
}
/* Squares are always 1:1; bingo.js (fitCells) shrinks a long text until it fits without breaking words.
   Only if even the smallest size cannot hold a word does the cell get .is-tight and may break inside it. */
.ykk-bingo__cell .ykk-bingo__text { display: block; width: 100%; }
.ykk-bingo__cell.is-tight { overflow-wrap: anywhere; }

/* "Turn your phone" hint (portrait phones, where landscape gives clearly bigger squares) */
.ykk-bingo__rotate { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 14px; border-radius: 14px; background: var(--bingo-blue); color: #fff; }
.ykk-bingo__rotate[hidden] { display: none; }
.ykk-bingo__rotate svg { flex: none; width: 30px; height: 30px; animation: ykk-bingo-tilt 2.4s ease-in-out infinite; transform-origin: 50% 60%; }
@keyframes ykk-bingo-tilt { 0%, 30% { transform: rotate(0); } 55%, 85% { transform: rotate(-90deg); } 100% { transform: rotate(0); } }
.ykk-bingo .ykk-bingo__rotate p { flex: 1; font-size: 14px; line-height: 1.35; font-weight: 600; }
.ykk-bingo__rotate button { flex: none; width: 36px; height: 36px; padding: 0 !important; border: 0 !important; border-radius: 50% !important;
  background: rgba(255,255,255,.18) !important; color: #fff !important; font: 700 20px/1 var(--bingo-font) !important; cursor: pointer; box-shadow: none !important; }
@media (prefers-reduced-motion: reduce) { .ykk-bingo__rotate svg { animation: none; } }
.ykk-bingo__cell:hover { border-color: var(--bingo-blue) !important; }
.ykk-bingo__cell:active { transform: scale(.97); }
.ykk-bingo__cell:focus-visible { outline: 3px solid var(--bingo-blue); outline-offset: 2px; }
.ykk-bingo__text { position: relative; z-index: 1; }
.ykk-bingo__stamp { position: absolute; left: 50%; top: 50%; width: 82%; aspect-ratio: 1; transform: translate(-50%, -50%) scale(.3); border-radius: 50%;
  background: var(--bingo-stamp, #4A90E2); opacity: 0; transition: transform .18s cubic-bezier(.3,1.6,.6,1), opacity .12s ease; }
.ykk-bingo__cell.is-marked .ykk-bingo__stamp { opacity: .55; transform: translate(-50%, -50%) scale(1); }
.ykk-bingo__cell.is-win { border-color: var(--bingo-ink) !important; }
.ykk-bingo__cell--free { background: var(--bingo-ink) !important; border-color: var(--bingo-ink) !important; color: #fff !important; cursor: pointer;
  font: 800 18px/1.1 var(--bingo-head) !important; font-size: calc(18px * var(--bingo-scale, 1)) !important;
  overflow-wrap: normal !important; word-break: keep-all !important; hyphens: manual !important; -webkit-hyphens: manual !important; padding: 6px 4px; }
/* JS (fitFree) sizes the centre so no word ever breaks; "PRISMA-\nHYPO" keeps its own line break */
.ykk-bingo__freetext { white-space: pre-line; }

/* A−/A+ text size (bingo.js sets --bingo-scale) */
.ykk-bingo__zoom { display: flex; align-items: center; justify-content: flex-end; gap: 6px; margin-bottom: -10px; }
.ykk-bingo__zoom button {
  min-width: 44px; min-height: 40px; padding: 0 10px !important; border-radius: 999px !important; border: 2px solid var(--bingo-ink) !important;
  background: #fff !important; color: var(--bingo-ink) !important; font: 800 16px/1 var(--bingo-head) !important; letter-spacing: 0 !important;
  text-transform: none !important; cursor: pointer; box-shadow: none !important;
}
.ykk-bingo__zoom button:hover:not(:disabled) { background: var(--bingo-ink) !important; color: #fff !important; }
.ykk-bingo__zoom button:disabled { opacity: .35; cursor: default; }
.ykk-bingo__zoom button:focus-visible { outline: 3px solid var(--bingo-blue); outline-offset: 2px; }
.ykk-bingo__zoom-val { min-width: 48px; text-align: center; font-size: 13px; font-weight: 700; color: #34496a; }
.ykk-bingo__cell--free.is-win { box-shadow: 0 0 0 3px var(--bingo-stamp, #4A90E2) !important; }
/* Marked centre: solid light-blue stamp + dark text (the translucent stamp would vanish on the dark tile) */
.ykk-bingo__cell--free .ykk-bingo__freetext { position: relative; z-index: 1; }
.ykk-bingo__cell--free.is-marked { color: var(--bingo-ink) !important; }
.ykk-bingo__cell--free.is-marked .ykk-bingo__stamp { background: #9CC4F2; opacity: 1; width: 92%; }
.ykk-bingo__cell--free:hover { border-color: var(--bingo-stamp, #4A90E2) !important; }

/* Status + new card */
.ykk-bingo__foot { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.ykk-bingo .ykk-bingo__status { font-size: 17px; font-weight: 600; }

/* BINGO! sits in the free band next to the winning line (bingo.js sets left/top/width/height and font size),
   so the line itself stays visible. Only the pill is clickable: it offers a new card. */
.ykk-bingo__board { position: relative; }
.ykk-bingo__boom { position: absolute; inset: 0; z-index: 3; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.ykk-bingo__boom[hidden] { display: none; }
.ykk-bingo__boombtn {
  pointer-events: auto; display: block; margin: 0; padding: .16em .62em !important; border-radius: 999px !important; background: var(--bingo-blue) !important; color: #fff !important;
  border: 4px solid #fff !important; font: 800 64px/1 var(--bingo-head) !important; letter-spacing: -.02em !important; text-transform: none !important; white-space: nowrap; cursor: pointer;
  box-shadow: 0 10px 30px rgba(19,35,58,.35), 0 0 0 6px rgba(74,144,226,.35) !important; transform: rotate(-4deg); transition: transform .15s ease;
}
.ykk-bingo__boombtn:hover { transform: rotate(-4deg) scale(1.04); }
.ykk-bingo__boombtn:focus-visible { outline: 3px solid var(--bingo-ink); outline-offset: 4px; }
.ykk-bingo__boom.is-in .ykk-bingo__boombtn { animation: ykk-bingo-boom .7s cubic-bezier(.2,1.6,.4,1) both; }
@keyframes ykk-bingo-boom { 0% { transform: rotate(-30deg) scale(.2); opacity: 0; } 60% { opacity: 1; } 100% { transform: rotate(-4deg) scale(1); } }

/* Winning line: clearly highlighted while BINGO! sits beside it */
.ykk-bingo .ykk-bingo__cell.is-win { border-color: var(--bingo-blue) !important; box-shadow: 0 0 0 3px var(--bingo-blue), 0 6px 16px rgba(30,90,168,.35) !important; z-index: 1; }
.ykk-bingo .ykk-bingo__cell.is-win .ykk-bingo__stamp { opacity: .8; }
.ykk-bingo .ykk-bingo__cell--free.is-win { box-shadow: 0 0 0 3px var(--bingo-stamp, #4A90E2), 0 6px 16px rgba(30,90,168,.35) !important; }

/* "New card?" dialog opened from the BINGO! pill */
.ykk-bingo > dialog.ykk-bingo__dialog { margin: auto !important; }
.ykk-bingo__dialog { width: min(420px, calc(100vw - 32px)); padding: 22px 20px 18px; border: 0; border-radius: 18px; background: #fff; color: var(--bingo-ink);
  box-shadow: 0 20px 60px rgba(19,35,58,.4); font-family: var(--bingo-font); }
.ykk-bingo__dialog::backdrop { background: rgba(19,35,58,.55); }
.ykk-bingo__dialog form { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.ykk-bingo .ykk-bingo__dialog-title { font: 800 22px/1.2 var(--bingo-head); color: var(--bingo-ink); }
.ykk-bingo__dialog p { font-size: 15px; line-height: 1.45; }
.ykk-bingo__dialog-btns { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.ykk-bingo__dialog-btns button { flex: 1 1 140px; min-height: 48px; padding: 0 18px !important; border-radius: 999px !important; cursor: pointer;
  font: 700 16px/1 var(--bingo-font) !important; letter-spacing: 0 !important; text-transform: none !important; box-shadow: none !important; }
.ykk-bingo__dialog-yes { background: var(--bingo-blue) !important; color: #fff !important; border: 2px solid var(--bingo-blue) !important; }
.ykk-bingo__dialog-no { background: #fff !important; color: var(--bingo-ink) !important; border: 2px solid var(--bingo-ink) !important; }
.ykk-bingo__new {
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 22px !important; border-radius: 999px !important;
  border: 2px solid var(--bingo-ink) !important; background: transparent !important; color: var(--bingo-ink) !important;
  font: 700 16px/1 var(--bingo-font) !important; letter-spacing: 0 !important; text-transform: none !important; cursor: pointer; box-shadow: none !important; flex: none;
}
.ykk-bingo__new:hover { background: var(--bingo-ink) !important; color: #fff !important; }
.ykk-bingo__new svg { width: 20px; height: 20px; }
.ykk-bingo__new.is-spin svg { animation: ykk-bingo-spin .5s ease; }
@keyframes ykk-bingo-spin { to { transform: rotate(360deg); } }
.ykk-bingo__notice { padding: 16px; background: #fff; border-radius: 12px; }

/* KABOOM: full-screen confetti layer (bingo.js), and a gentle pop instead when motion is reduced */
.ykk-bingo__confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 2147483000; }
.ykk-bingo__grid.is-pop { animation: ykk-bingo-pop .45s ease; }
@keyframes ykk-bingo-pop { 40% { transform: scale(1.02); } }

/* Share box: appears with the bingo */
.ykk-bingo__share { display: flex; flex-direction: column; gap: 10px; padding: 18px 20px; border-radius: 16px; background: var(--bingo-ink); color: #fff;
  animation: ykk-bingo-in .35s ease; }
.ykk-bingo__share[hidden] { display: none; }
@keyframes ykk-bingo-in { from { opacity: 0; transform: translateY(8px); } }
.ykk-bingo .ykk-bingo__share-title { font: 800 22px/1.2 var(--bingo-head); }
.ykk-bingo__share-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.ykk-bingo__sbtn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px !important; border-radius: 999px !important;
  border: 2px solid #fff !important; background: transparent !important; color: #fff !important; cursor: pointer; box-shadow: none !important;
  font: 700 16px/1 var(--bingo-font) !important; letter-spacing: 0 !important; text-transform: none !important;
}
.ykk-bingo__sbtn[hidden] { display: none; }
.ykk-bingo__sbtn--main { background: var(--bingo-blue) !important; border-color: #fff !important; color: #fff !important; }
.ykk-bingo__sbtn:hover { filter: brightness(1.08); }
.ykk-bingo__sbtn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.ykk-bingo__sbtn svg { width: 20px; height: 20px; }
.ykk-bingo__sbtn.is-busy { opacity: .7; cursor: progress; }
.ykk-bingo .ykk-bingo__share-hint { font-size: 13.5px; line-height: 1.4; color: rgba(255,255,255,.82); }

/* Suggestion form */
.ykk-bingo__suggest { margin-top: 10px; padding: 24px; background: #fff; border-radius: 16px; display: flex; flex-direction: column; gap: 10px; }
.ykk-bingo .ykk-bingo__suggest h2 { margin: 0 !important; padding: 0 !important; font: 800 24px/1.2 var(--bingo-head) !important; color: var(--bingo-blue) !important; text-transform: none !important; letter-spacing: -.01em; }
.ykk-bingo__suggest > p { font-size: 15px; line-height: 1.45; color: #34496a; }
.ykk-bingo__suggest form { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.ykk-bingo__suggest label { font-size: 14px; font-weight: 700; margin-top: 4px; }
.ykk-bingo__opt { font-weight: 400; color: #4b6080; }
.ykk-bingo__field { position: relative; }
.ykk-bingo__suggest input[type="text"], .ykk-bingo__suggest select {
  width: 100%; min-height: 46px; padding: 10px 70px 10px 14px !important; border: 2px solid var(--bingo-line) !important; border-radius: 12px !important;
  background: #fff !important; color: var(--bingo-ink) !important; font: 400 16px/1.3 var(--bingo-font) !important; box-shadow: none !important; margin: 0;
}
.ykk-bingo__suggest select { padding-right: 14px !important; }
.ykk-bingo__suggest input:focus, .ykk-bingo__suggest select:focus { border-color: var(--bingo-blue) !important; outline: 0; }
.ykk-bingo__chars { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 12px; color: #4b6080; pointer-events: none; }
.ykk-bingo__suggest button[type="submit"] {
  align-self: flex-start; margin-top: 6px; min-height: 48px; padding: 0 24px !important; border: 0 !important; border-radius: 999px !important;
  background: var(--bingo-blue) !important; color: #fff !important; font: 700 16px/1 var(--bingo-font) !important; letter-spacing: 0 !important; text-transform: none !important; cursor: pointer;
}
.ykk-bingo__suggest button[type="submit"]:disabled { opacity: .6; cursor: wait; }
.ykk-bingo .ykk-bingo__msg { font-size: 15px; font-weight: 600; min-height: 1.4em; }
.ykk-bingo .ykk-bingo__msg.is-ok { color: #1e6b34; }
.ykk-bingo .ykk-bingo__msg.is-error { color: #b3261e; }
.ykk-bingo__hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* Phones: the 5×5 grid has to fit ~350px, so cells get small type and grow taller as needed */
@media (max-width: 700px) {
  /* Full screen width: break out of the theme's content gutter; only the card itself goes almost edge to edge */
  /* (100vw + negative 50% margins collapsed the theme's flex column to 0 px, so cancel the known 20 px gutter
     of themify-ultra-child/assets/ykk-mobile-gutter.css instead) */
  .ykk-bingo { width: auto; max-width: none; margin-left: -20px; margin-right: -20px;
    padding: 18px 0 24px; border-radius: 0; gap: 16px; }
  .ykk-bingo > :not(.ykk-bingo__board) { margin-left: 14px; margin-right: 14px; }
  .ykk-bingo__board { margin: 0 4px; }
  .ykk-bingo__head { align-items: flex-start; }
  .ykk-bingo__badge { width: 64px; height: 64px; border-width: 7px; margin-top: 4px; }
  .ykk-bingo__badge span { font-size: 17px; }
  .ykk-bingo__badge.is-big span { font-size: 38px; margin-top: -2px; }
  .ykk-bingo .ykk-bingo__kicker { font-size: 11px; }
  .ykk-bingo .ykk-bingo__intro { font-size: 14.5px; }
  .ykk-bingo__grid { gap: 4px; }
  .ykk-bingo__cell { padding: 3px 2px; border-radius: 8px; border-width: 1.5px !important;
    font-size: calc(10px * var(--bingo-scale, 1)) !important; line-height: 1.15 !important; }
  .ykk-bingo__cell--free { font-size: calc(10px * var(--bingo-scale, 1)) !important; letter-spacing: -.02em !important; padding: 4px 2px; }
  .ykk-bingo__zoom { margin-bottom: -6px; }
  .ykk-bingo__zoom button { min-height: 38px; font-size: 15px !important; }
  .ykk-bingo .ykk-bingo__status { font-size: 15px; }
  .ykk-bingo__foot { flex-direction: column; align-items: stretch; }
  .ykk-bingo__new { justify-content: center; }
  .ykk-bingo__suggest { padding: 18px 14px; }
  .ykk-bingo__share { padding: 16px 14px; }
  .ykk-bingo__sbtn { flex: 1 1 140px; }
}
/* Phones held sideways: full screen width too, card almost edge to edge; type stays at the desktop size (squares are big).
   Above 760 px the theme column has a real width, so the 50% - 50vw break-out is safe there; up to 760 px the
   20 px gutter of ykk-mobile-gutter.css applies (same trick as in portrait). */
@media (orientation: landscape) and (max-height: 500px) {
  .ykk-bingo { max-width: none; padding: 14px 0 22px; border-radius: 0 !important; gap: 14px; }
  .ykk-bingo > :not(.ykk-bingo__board) { margin-left: 16px; margin-right: 16px; }
  .ykk-bingo__board { margin: 0 6px; }
  .ykk-bingo__grid { gap: 6px; }
  .ykk-bingo__cell { padding: 6px; }
}
@media (orientation: landscape) and (max-height: 500px) and (min-width: 761px) {
  .ykk-bingo { width: 100vw; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }
}
@media (orientation: landscape) and (max-height: 500px) and (max-width: 760px) {
  .ykk-bingo { width: auto; margin-left: -20px; margin-right: -20px; }
}
@media (prefers-reduced-motion: reduce) {
  .ykk-bingo__stamp, .ykk-bingo__cell { transition: none; }
  .ykk-bingo__new.is-spin svg { animation: none; }
}

/* Smaller cards (setting "Kortin koko") have bigger squares, so the text starts bigger too.
   bingo.js still shrinks any text that does not fit its square. */
.ykk-bingo--n4 .ykk-bingo__cell { font-size: calc(18px * var(--bingo-scale, 1)) !important; }
.ykk-bingo--n4 .ykk-bingo__cell--free { font-size: calc(22px * var(--bingo-scale, 1)) !important; }
.ykk-bingo--n3 .ykk-bingo__cell { font-size: calc(22px * var(--bingo-scale, 1)) !important; padding: 14px; }
.ykk-bingo--n3 .ykk-bingo__cell--free { font-size: calc(28px * var(--bingo-scale, 1)) !important; }
.ykk-bingo--n3 .ykk-bingo__grid { gap: 10px; }
@media (max-width: 700px) {
  .ykk-bingo--n4 .ykk-bingo__grid { gap: 5px; }
  .ykk-bingo--n4 .ykk-bingo__cell { font-size: calc(12.5px * var(--bingo-scale, 1)) !important; padding: 4px 3px; }
  .ykk-bingo--n4 .ykk-bingo__cell--free { font-size: calc(13px * var(--bingo-scale, 1)) !important; }
  .ykk-bingo--n3 .ykk-bingo__grid { gap: 6px; }
  .ykk-bingo--n3 .ykk-bingo__cell { font-size: calc(16px * var(--bingo-scale, 1)) !important; padding: 6px 5px; }
  .ykk-bingo--n3 .ykk-bingo__cell--free { font-size: calc(18px * var(--bingo-scale, 1)) !important; }
}

/* Logo: PIKA (blue) + BING (ink) + the last O as a blue ring holding "1" (setting "Logon O-kirjain") */
.ykk-bingo .ykk-bingo__logo { margin: 0 !important; padding: 0 !important; font: 800 clamp(46px, 12.6vw, 104px)/.92 var(--bingo-head) !important;
  letter-spacing: -.03em !important; color: var(--bingo-ink) !important; text-transform: none !important; text-align: left !important; }
.ykk-bingo__logo-word { display: inline-flex; align-items: center; white-space: nowrap; }
.ykk-bingo__logo-pika { color: var(--bingo-blue); }
.ykk-bingo__logo-ring { display: inline-flex; align-items: center; justify-content: center; flex: none; box-sizing: border-box;
  width: .8em; height: .8em; margin-left: .08em; border: .14em solid var(--bingo-blue); border-radius: 50%; }
.ykk-bingo__logo-ring span { font-size: .52em; line-height: 1; color: var(--bingo-blue); letter-spacing: 0; transform: translate(-.02em, .02em); }
.ykk-bingo__logo-ring.is-long span { font-size: .3em; }

/* Live bingo counter: right-aligned just above the card */
.ykk-bingo .ykk-bingo__count { align-self: flex-end; text-align: right; margin: 0 0 -12px; font: 800 15px/1.3 var(--bingo-head); color: var(--bingo-blue); }
.ykk-bingo__count.is-bump { animation: ykk-bingo-bump .6s ease; }
@keyframes ykk-bingo-bump { 30% { transform: scale(1.12); } }
@media (max-width: 700px) {
  .ykk-bingo .ykk-bingo__count { font-size: 13.5px; margin-bottom: -10px; }
}
@media (prefers-reduced-motion: reduce) { .ykk-bingo__count.is-bump { animation: none; } }
