/* Pianoku: the app's own look. Every colour is a skin variable, so the page can change its whole
   look the way the app does (the 30 palettes are written into the page by lib/pkskins.mjs).
   The values below are the Apricot skin, used before a skin is set and on the privacy/terms pages. */
:root {
  --bg: #ffe9d8;
  --line: #f9d4b6;
  --panel: #fff7f0;
  --case: #f7b48e;
  --edge: #e2946a;
  --white: #fffaf3;
  --wedge: #f1dcc8;
  --black: #ee9a6e;
  --accent: #e0703e;
  --ink: #5e3420;
  --soft: #9a6c55;
  --icon: #af5933;
  --tiko: #fffdf9;
  --face: #5e3420;
  --rod: #5e3420;
  --weight: #f07f4c;
  --tikobase: #f7b48e;
  --tikobaseedge: #e2946a;
  --tikopivot: #5e3420;
  --fill: #f9d4b6;
  --raised: #fff7f0;
  --onaccent: #ffffff;
  --shadow: rgba(226, 148, 106, 0.33);
  --sky: none;
  --display: 'Comfortaa', ui-rounded, 'SF Pro Rounded', system-ui, sans-serif;
  --font: 'Urbanist', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --gut: 22px;      /* the space kept free at the sides, wider on a phone than the site's 16px */
  --tfade: 1.4s;    /* how long a change of look takes to settle (owner, 2026-11-06) */
}
/* While a visitor is trying the looks (hovering or tapping a skin icon) the change is quick, so
   it answers the finger; the page's own drift keeps the calmer --tfade above. */
html.pk-quick { --tfade: 0.3s; }
/* Tiko's swing, in degrees to each side. Registered as a number so it can grow and shrink
   smoothly instead of jumping mid-swing. */
@property --amp { syntax: '<number>'; inherits: true; initial-value: 16; }
*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: light; background: var(--bg); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 500 1rem/1.6 var(--font); -webkit-font-smoothing: antialiased; }
html, body { transition: background-color var(--tfade) ease; }
main { outline: none; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-family: var(--display); }
p { margin: 0; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 10px; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: var(--panel); padding: 8px 14px; border-radius: 12px; z-index: 10; }
.skip:focus { left: 8px; }
.i { width: 1.2em; height: 1.2em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
svg.i[fill='currentColor'] { fill: currentColor; stroke: none; }

.pk {
  position: relative; overflow: clip; min-height: 100vh; color: var(--ink);
  background-color: var(--bg); background-image: var(--sky); background-repeat: no-repeat; background-size: 100% 100vh;
  transition: background-color var(--tfade) ease, color var(--tfade) ease;
}
.pk-h2 { font-size: clamp(1.9rem, 5vw, 3.2rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.08; text-align: center; }
.pk-lead { margin: 14px auto 0; max-width: 46ch; text-align: center; color: var(--soft); font-size: clamp(1rem, 2vw, 1.15rem); }

/* ---------- hero ---------- */
.pk-hero { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; text-align: center; padding: clamp(32px, 7vh, 72px) var(--gut) clamp(40px, 6vw, 72px); }
.pk-hero__in { display: flex; flex-direction: column; align-items: center; }
.pk-tiko { width: clamp(132px, 19vw, 196px); cursor: pointer; -webkit-tap-highlight-color: transparent; transition: --amp 0.55s var(--ease); }
/* Tiko himself never tilts: only his arm swings and his face moves (owner, 2026-11-06) */
.tiko { width: 100%; height: auto; overflow: visible; }
.tk-shadow { fill: var(--ink); opacity: 0.1; }
.tk-base { fill: var(--tikobase); }
.tk-base2 { fill: var(--tikobaseedge); }
.tk-shell { fill: var(--tiko); }
.tk-rod { fill: var(--rod); }
.tk-hub { fill: var(--tikopivot); }
.tk-weight { fill: var(--weight); }
.tk-face { transform: translate(var(--ex, 0px), var(--ey, 0px)); transition: transform 0.3s var(--ease); }
.tk-eye { fill: var(--face); transform-box: fill-box; transform-origin: center; }
.tk-mouth { fill: none; stroke: var(--face); stroke-width: 3; stroke-linecap: round; transform-box: fill-box; transform-origin: center top; transform: scale(var(--smile, 1)); transition: transform 0.3s var(--spring); }
.tk-arm { transform-origin: 100px 36px; transform: rotate(-12deg); }
.pk-tiko.is-near { --smile: 1.22; }
.pk-tiko.is-happy { --smile: 1.5; }
@media (prefers-reduced-motion: no-preference) {
  /* Tiko keeps time. He swings wider while you are on him, but never faster: changing the beat
     restarts the animation and makes him jump. */
  .tk-arm { animation: tick 0.833s ease-in-out infinite alternate; }
  .tk-eye { animation: blink 5.2s infinite; }
  @keyframes tick { from { transform: rotate(calc(var(--amp, 16) * -1deg)); } to { transform: rotate(calc(var(--amp, 16) * 1deg)); } }
  @keyframes blink { 0%, 95%, 100% { transform: scaleY(1); } 97% { transform: scaleY(0.1); } }
}
.pk-logo {
  margin-top: 16px; font-size: clamp(3.2rem, 11vw, 6.4rem); font-weight: 700; line-height: 1; letter-spacing: -0.01em; color: var(--ink);
  -webkit-text-stroke: 0.045em var(--ink); paint-order: stroke fill; transition: color var(--tfade) ease, -webkit-text-stroke-color var(--tfade) ease;
}
.pk-tag { font-family: var(--display); margin-top: 14px; font-size: clamp(1.05rem, 2.4vw, 1.4rem); font-weight: 700; color: var(--soft); max-width: 32ch; }
.pk-soon {
  display: inline-flex; align-items: center; gap: 0.6em; margin-top: 28px; min-height: 54px; padding: 0 1.6em; border-radius: 18px;
  font: 700 1.0625rem/1 var(--display); text-decoration: none; transition: background-color var(--tfade) ease, color var(--tfade) ease, transform 0.4s var(--spring), box-shadow 0.4s;
}
.pk-soon { background: var(--fill); color: var(--icon); }
/* Google's official badge, used exactly as Google supplies it (never recoloured, cropped or redrawn); 60 px tall, with the margin as its clear space */
.pk-play { display: inline-block; margin-top: 28px; border-radius: 8px; transition: transform 0.4s var(--spring); }
.pk-play img { display: block; height: 60px; width: auto; }
:where(html:not(.touch)) .pk-play:hover { transform: translateY(-3px); }
.pk-note { margin-top: 12px; font-size: 0.9rem; color: var(--soft); }

/* ---------- a screen of the app (a short silent loop) ---------- */
.pk-screen {
  position: relative; z-index: 1; width: 100%; border-radius: clamp(16px, 2.2vw, 28px); overflow: hidden; background: var(--panel);
  box-shadow: 0 2px 6px var(--shadow), 0 24px 50px -18px var(--shadow), 0 60px 110px -40px var(--shadow);
  transition: background-color var(--tfade) ease, box-shadow var(--tfade) ease, transform 0.6s var(--ease);
}
.pk-vid { display: block; width: 100%; height: auto; aspect-ratio: 2.5 / 1; object-fit: cover; background: var(--panel); }
.pk-screen--hero { width: min(100%, 1020px); margin-top: clamp(32px, 6vw, 64px); }
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .pk-screen--hero { animation: lift linear both; animation-timeline: view(); animation-range: entry 0% cover 40%; }
    @keyframes lift { from { transform: perspective(1800px) rotateX(9deg) scale(0.93); } to { transform: none; } }
  }
}

/* ───────── the app's own interface, under "Pick a look"
   The same markup and the same class names as the Pianoku web version (its css/app.css), scoped to
   .pk-app and painted with the skin variables above, so this is the app itself in whatever look the
   page is wearing. It is a picture: nothing in it can be tapped. Keep in step with the app's CSS. */
/* The box keeps the app's shape (2.5 : 1, a wide phone). Inside it every size is a multiple of
   --vh, one per cent of the app's height, exactly as in the app's own CSS — so this is the app at
   1120 x 448 dp, shrunk to whatever room the page gives it, on a phone as on a desktop. */
.pk-screen--mock { pointer-events: none; container-type: inline-size; aspect-ratio: 2.5 / 1; }
.pk-app {
  position: absolute; inset: 0; display: flex; flex-direction: column; overflow: hidden;
  background: var(--bg); color: var(--ink);
  font-family: var(--display); font-weight: 600; pointer-events: none; -webkit-user-select: none; user-select: none;
  --vh: 0.4cqw;                       /* the box is 2.5 : 1, so 1% of its height is 0.4% of its width */
  --btn: calc(9.6 * var(--vh));
  --gap: calc(2.6 * var(--vh));
  --padx: calc(11.5 * var(--vh));
  --r: calc(2.68 * var(--vh));
  --barH: calc(30 * var(--vh));
  --kw: calc(100cqw / 19); --bw: calc(var(--kw) * 0.6); --mw: calc(100cqw / 52);
  --kradius: calc(1.5625 * var(--vh)); --lip: calc(1.34 * var(--vh));
}
.pk-app, .pk-app * { transition: background-color var(--tfade) ease, color var(--tfade) ease, box-shadow var(--tfade) ease, fill var(--tfade) ease, stroke var(--tfade) ease; }
.pk-app svg { display: block; }
.pk-app i { font-style: normal; }
.pk-app .bar { position: relative; z-index: 3; height: var(--barH); padding: calc(var(--gap) * 1.4) var(--padx) calc(var(--gap) * 1.1); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, auto) minmax(0, 1fr); align-items: center; }
.pk-app .cluster { display: grid; grid-template-columns: repeat(2, var(--btn)); grid-auto-rows: var(--btn); gap: calc(3.2 * var(--vh)) calc(8.5 * var(--vh)); justify-self: start; align-self: center; }
.pk-app .btn { width: var(--btn); height: var(--btn); color: var(--icon); display: grid; place-items: center; }
.pk-app .btn svg { width: 62%; height: 62%; }
.pk-app .center { display: flex; flex-direction: column; align-items: center; gap: calc(4 * var(--vh)); align-self: stretch; justify-content: flex-start; }
.pk-app .toggles { display: flex; gap: calc(4.46 * var(--vh)); }
.pk-app .chip {
  height: calc(var(--btn) * 0.92); min-width: calc(var(--btn) * 1.75); padding: 0 calc(var(--btn) * 0.34);
  border-radius: var(--r); background: var(--fill); color: var(--icon); display: grid; place-items: center;
  font-size: calc(4 * var(--vh)); letter-spacing: 0.06em; font-weight: 700; white-space: nowrap;
}
.pk-app .chip.on { background: var(--icon); color: var(--panel); }
.pk-app .chip.mood { min-width: calc(var(--btn) * 2.6); }
.pk-app .readout { text-align: center; min-height: 1em; }
.pk-app .rd-main { font-size: calc(7.8 * var(--vh)); font-weight: 700; color: var(--icon); line-height: 1.15; letter-spacing: -0.01em; white-space: nowrap; }
.pk-app .right { justify-self: end; align-self: center; display: flex; align-items: center; gap: calc(11.5 * var(--vh)); }
.pk-app .tempo { display: flex; flex-direction: column; align-items: center; }
.pk-app .tarrow { width: calc(var(--btn) * 1.05); height: calc(var(--btn) * 0.62); display: grid; place-items: center; color: var(--icon); }
.pk-app .tarrow svg { width: calc(3.35 * var(--vh)); height: 100%; max-height: calc(3.35 * var(--vh)); opacity: 0.9; }
.pk-app .tarrow.dn svg { transform: rotate(180deg); }
.pk-app .tnum { font-size: calc(6.4 * var(--vh)); font-weight: 600; color: var(--icon); font-variant-numeric: tabular-nums; line-height: 1.1; letter-spacing: -0.02em; }
.pk-app .tiko { --tk: calc(var(--barH) * 0.84); height: var(--tk); width: calc(var(--tk) * 200 / 196); flex: none; position: relative; }
.pk-app .tiko-svg { width: 100%; height: 100%; overflow: visible; }
.pk-app .board { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.pk-app .mini { position: relative; height: calc(9.6 * var(--vh)); overflow: hidden; background: var(--case); flex: none; }
.pk-app .mk { position: absolute; top: 14%; bottom: 8%; left: calc(var(--x) * var(--mw) + 0.134 * var(--vh)); width: calc(var(--mw) - 0.27 * var(--vh)); background: var(--white); border-radius: 0 0 calc(0.45 * var(--vh)) calc(0.45 * var(--vh)); }
.pk-app .mkb { position: absolute; top: 14%; height: 52%; left: calc(var(--x) * var(--mw)); width: calc(var(--mw) * 0.6); background: var(--black); border-radius: 0 0 calc(0.45 * var(--vh)) calc(0.45 * var(--vh)); }
.pk-app .win { position: absolute; top: 0; bottom: 0; left: 26.92%; width: 36.54%; box-shadow: 0 0 0 4000px var(--dim); border-radius: calc(0.67 * var(--vh)); }
.pk-app .felt { flex: none; height: calc(7 * var(--vh)); background: var(--case); position: relative; overflow: hidden; box-shadow: 0 1px 0 var(--edge) inset; }
.pk-app .felt::after { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: min(var(--trimH, 3px), calc(0.8 * var(--vh))); transform: translateY(-50%); background: var(--trim, var(--felt)); opacity: 0.85; }
.pk-app .keywrap { flex: 1; position: relative; overflow: hidden; background: var(--case); min-height: 0; }
.pk-app .keywrap::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: calc(2.23 * var(--vh)); background: linear-gradient(var(--shadow), transparent); z-index: 4; }
.pk-app .keys { position: absolute; inset: 0; }
.pk-app .key { position: absolute; top: 0; }
.pk-app .key.w { bottom: 0; left: calc(var(--x) * var(--kw) + 0.335 * var(--vh)); width: calc(var(--kw) - 0.67 * var(--vh)); background: var(--white); border-radius: 0 0 var(--kradius) var(--kradius); box-shadow: inset 0 calc(-1 * var(--lip)) 0 var(--wedge); }
.pk-app .key.w.down { background: var(--pressw); box-shadow: inset 0 calc(-0.45 * var(--vh)) 0 var(--wedge); }
.pk-app .key.b { height: 62%; left: calc(var(--x) * var(--kw)); width: var(--bw); z-index: 2; background: var(--black); border-radius: 0 0 calc(var(--kradius) * 0.8) calc(var(--kradius) * 0.8); box-shadow: inset 0 calc(-1 * var(--lip) + 0.22 * var(--vh)) 0 var(--bedge); }
/* Tiko, as the app draws him */
.pk-app .tk-shadow { fill: var(--shadow); }
.pk-app .tk-base { fill: var(--tikobase); }
.pk-app .tk-base2 { fill: var(--tikobaseedge); }
.pk-app .tk-shell { fill: var(--tiko); }
.pk-app .tk-rod { fill: var(--rod, var(--face)); }
.pk-app .tk-hub { fill: var(--tikopivot); }
.pk-app .tk-weight { fill: var(--weight); }
.pk-app .tk-eye { fill: var(--face); }
.pk-app .tk-mouth { fill: none; stroke: var(--face); stroke-width: 3; stroke-linecap: round; }
.pk-app .tk-arm { transform-origin: 100px 36px; }
@media (prefers-reduced-motion: no-preference) { .pk-app .tk-arm { animation: tick 0.833s ease-in-out infinite alternate; } }

/* ---------- the numbers ---------- */
.pk-stats {
  position: relative; z-index: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(8px, 1.4vw, 18px);
  width: min(100% - var(--gut) * 2, 1020px); margin: clamp(40px, 6vw, 72px) auto 0;
}
.pk-stat { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: clamp(14px, 2.4vw, 26px) 8px; border-radius: 22px; background: var(--panel); transition: background-color var(--tfade) ease; }
.pk-stat b { font-family: var(--display); font-size: clamp(1.6rem, 4.6vw, 2.6rem); font-weight: 700; line-height: 1; letter-spacing: -0.03em; color: var(--icon); }
.pk-stat span { font-size: clamp(0.8rem, 1.6vw, 0.95rem); color: var(--soft); }

/* ---------- what it does ---------- */
.pk-feats { position: relative; z-index: 1; width: min(100% - var(--gut) * 2, 1120px); margin: clamp(60px, 10vw, 140px) auto 0; display: flex; flex-direction: column; gap: clamp(64px, 9vw, 120px); }
.pk-feat { display: grid; grid-template-columns: minmax(230px, 0.72fr) 1fr; gap: clamp(20px, 4vw, 60px); align-items: center; }
.pk-feat:nth-of-type(even) .pk-feat__text { order: 2; }
.pk-num { font-family: var(--display); font-weight: 700; font-size: 0.875rem; letter-spacing: 0.22em; color: var(--accent); opacity: 0.8; }
.pk-feat__text h3 { margin-top: 10px; font-size: clamp(1.5rem, 3.4vw, 2.3rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.12; }
.pk-feat__text p { margin-top: 12px; color: var(--soft); font-size: clamp(1rem, 1.9vw, 1.1rem); line-height: 1.55; max-width: 34ch; }

/* ---------- looks ---------- */
.pk-skins { position: relative; z-index: 1; width: min(100% - var(--gut) * 2, 1120px); margin: clamp(72px, 12vw, 150px) auto 0; display: flex; flex-direction: column; align-items: center; }
.pk-skins .pk-screen { width: min(100%, 1020px); margin-top: clamp(26px, 4vw, 44px); }
.pk-chips { display: grid; grid-template-columns: repeat(10, 1fr); gap: clamp(8px, 1.4vw, 16px); width: 100%; margin-top: clamp(26px, 4vw, 44px); }
.pk-chip { appearance: none; border: 0; padding: 0; background: none; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 6px; font: inherit; color: var(--soft); transition: color 0.3s; }
.pk-chip img { width: 100%; height: auto; aspect-ratio: 1; border-radius: 28%; box-shadow: 0 6px 14px -8px var(--shadow); transition: transform 0.45s var(--spring), box-shadow 0.3s; }
.pk-chip span { font-size: 0.7rem; line-height: 1.2; text-align: center; opacity: 0; transition: opacity 0.25s; }
:where(html:not(.touch)) .pk-chip:hover img, .pk-chip.tap img, .pk-chip[aria-pressed='true'] img { transform: translateY(-5px) scale(1.07); box-shadow: 0 16px 24px -12px var(--shadow); }
:where(html:not(.touch)) .pk-chip:hover span, .pk-chip[aria-pressed='true'] span { opacity: 1; color: var(--ink); }
@media (max-width: 720px) { .pk-chips { grid-template-columns: repeat(5, 1fr); gap: 12px; } .pk-chip span { display: none; } }
@media (max-width: 560px) { .pk-stats { grid-template-columns: repeat(2, 1fr); } }

/* ---------- the last word ---------- */
.pk-close { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; text-align: center; padding: clamp(72px, 12vw, 150px) var(--gut) 0; }
.pk-price { margin-top: 16px; max-width: 46ch; font-family: var(--display); font-weight: 700; color: var(--soft); line-height: 1.6; }

/* ---------- footer ---------- */
.pk-foot { position: relative; z-index: 1; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 26px; padding: clamp(48px, 8vw, 90px) var(--gut) 40px; font-size: 0.9rem; color: var(--soft); }
.pk-foot ul { display: flex; gap: 22px; list-style: none; margin: 0; padding: 0; }
.pk-foot a { text-decoration: none; display: inline-block; padding: 8px 0; }
:where(html:not(.touch)) .pk-foot a:hover, .pk-foot a.tap { color: var(--ink); }
.pk-made { font-family: var(--display); font-weight: 700; }

@media (max-width: 720px) {
  .pk-screen { box-shadow: 0 10px 26px -12px var(--shadow); }
  .pk-feat { grid-template-columns: 1fr; gap: 20px; }
  .pk-feat:nth-of-type(even) .pk-feat__text { order: 0; }
  .pk-feat__text p { max-width: none; }
}

/* ---------- privacy policy and terms ---------- */
.pk--doc { padding: 0 16px; background: var(--bg); }
.pk-doc-head { max-width: 720px; margin: 0 auto; padding-top: clamp(28px, 6vw, 64px); }
.pk-back { display: inline-flex; align-items: center; gap: 0.45em; min-height: 44px; text-decoration: none; font-weight: 700; color: var(--icon); }
.pk-doc-head h1 { margin-top: 10px; font-size: clamp(2rem, 5vw, 3rem); font-weight: 700; }
.pk-updated { margin-top: 6px; color: var(--soft); }
.pk-lang { display: inline-block; margin-top: 10px; font-weight: 700; color: var(--icon); text-underline-offset: 3px; }
.pk-prose { max-width: 720px; margin: 26px auto 0; padding: clamp(22px, 4vw, 40px); background: var(--panel); border-radius: 26px; line-height: 1.7; }
.pk-prose > * + * { margin-top: 0.85em; }
.pk-prose h2 { font-size: 1.2rem; font-weight: 700; color: var(--icon); margin-top: 1.6em; }
.pk-prose ul { padding-left: 1.2em; margin-bottom: 0; }
.pk-prose li + li { margin-top: 0.4em; }
.pk-prose a { color: var(--icon); font-weight: 700; overflow-wrap: anywhere; }
.pk-prose .i--ext { width: 0.8em; height: 0.8em; fill: none; stroke: currentColor; stroke-width: 2; margin-left: 2px; }
.pk-prose p:last-child { color: var(--soft); font-size: 0.9rem; }
