.v2 body.pk-page {
  --canvas: #211927;
  --surface: #2a2033;
  --surface-2: #34263e;
  --surface-3: #412e4a;
  --line: #513e5d;
  --line-strong: #735775;
  --text: #fff0df;
  --text-2: #dec9df;
  --text-3: #b99abc;
  --blue: #ffb66d;
  --blue-soft: #473024;
  --bg: var(--canvas);
  --bg-warm: var(--surface-2);
  --paper: var(--surface);
  --ink: var(--text);
  --ink-soft: var(--text-2);
  --ink-faint: var(--text-3);
  --rule: var(--line);
  --popup-bg: var(--surface);
  --nav-warm-surface: var(--surface);
  --nav-warm-muted: var(--surface-2);
  --nav-warm-border: var(--line);
  --nav-warm-shadow: #100b1780;
  --nav-card-surface: var(--surface);
  --nav-card-hover: var(--surface-2);
  --shadow-sm: 0 2px 8px #100b1750;
  --shadow-md: 0 12px 32px #100b1780;
  color-scheme: dark;
  margin: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--canvas);
  color: var(--text);
}
.pk-page .theme-toggle { display: none; }
.pk-footer { display: flex; flex-shrink: 0; align-items: center; justify-content: space-between; gap: 12px; min-height: 24px; padding: 3px 20px; background: var(--surface); color: var(--text-3); font-size: 10px; }
.pk-footer nav { display: flex; gap: 14px; }
.pk-footer a { color: var(--text-2); text-decoration: none; }
.pk-footer a:hover { color: var(--blue); }
.pk-footer a:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.pk-main { width: 100%; max-width: 1500px; margin: 0 auto; padding: 12px 24px 16px; display: flex; flex: 1; flex-direction: column; min-height: 0; gap: 12px; }
.pk-intro { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-shrink: 0; }
.pk-back { color: #d3b6d6; font-size: 12px; font-weight: 650; text-decoration: none; }
.pk-intro h1 { font-size: clamp(22px, 3vw, 30px); letter-spacing: -.05em; line-height: 1.1; margin: 0; color: #fff1db; }
.pk-intro h1 em { font-family: Georgia, serif; color: #ffae62; }
.pk-workshop { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto auto; flex: 1; min-height: 0; background: #302336; border: 1px solid #5b3e59; border-radius: 22px; box-shadow: 0 22px 70px #100b1740; overflow: hidden; }
.pk-toolbar { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; align-items: center; padding: 10px; border-bottom: 1px solid #5b3e59; }
.pk-tools { display: contents; }
#pkExample { grid-column: 1 / 4; grid-row: 1; }
#pkShare { grid-column: 4 / 7; grid-row: 1; }
#pkUndo { grid-column: 1 / 3; grid-row: 2; }
#pkClear { grid-column: 3 / 5; grid-row: 2; }
#pkDownload { grid-column: 5 / 7; grid-row: 2; }
.pk-page button { border: 1px solid #785574; border-radius: 10px; background: #412e46; color: #fff0dc; padding: 10px 14px; font: inherit; font-size: 13px; font-weight: 650; cursor: pointer; min-height: 44px; }
.pk-page button:hover:not(:disabled) { background: #59405d; border-color: #e7b384; }
.pk-page button:disabled { opacity: .4; cursor: default; }
.pk-workshop button.pk-primary { background: #ffae62; color: #321b20; border-color: #ffae62; }
.pk-workshop button.pk-primary:hover:not(:disabled) { background: #ffc386; }
.pk-page button:focus-visible, .pk-workshop select:focus-visible, .pk-back:focus-visible { outline: 3px solid #ffd78b; outline-offset: 3px; }
.pk-stage { min-width: 0; min-height: 0; background: #201727; }
#pkPoster { width: 100%; height: 100%; display: block; }
.pk-bottom { display: flex; align-items: stretch; justify-content: space-between; gap: 16px; min-height: 0; padding: 10px 16px 0; }
#pkPicker { flex: 1; min-width: 0; }
#pkPicker label { display: block; font-size: 12px; color: #d6bdd7; margin-bottom: 6px; }
.pk-picker-row { display: flex; gap: 8px; }
.pk-picker-row select { width: 100%; min-width: 0; border: 1px solid #785574; border-radius: 10px; background: #211927; color: #ffefd9; font: inherit; font-size: 14px; padding: 10px; min-height: 44px; }
.pk-selection { display: flex; flex: 1; flex-direction: column; min-width: 0; min-height: 0; }
.pk-count { margin: 0 0 6px; font-size: 12px; line-height: normal; color: #d6bdd7; }
.pk-count strong { color: #ffb567; font-variant-numeric: tabular-nums; }
.pk-selected { display: flex; gap: 6px; height: 50px; min-height: 0; margin: 0; padding: 2px; overflow: auto; list-style: none; }
.pk-selected li { flex-shrink: 0; }
.pk-selected button { white-space: nowrap; padding: 8px 10px; }
.pk-selected button span { color: #ffba7d; margin-left: 6px; }
.pk-selected .pk-empty { flex-shrink: 1; align-self: center; color: #b69cb8; font-size: 12px; }
.pk-page .pk-mobile-selected { display: none; }
.pk-status { min-height: 2.8em; margin: 8px 16px 10px; font-size: 12px; line-height: 1.4; color: #f0c897; }
.pk-status[data-error="true"] { color: #ffb9b9; }
.pk-help { width: min(540px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 24px; border: 1px solid #785574; border-radius: 20px; background: #302336; color: #ffefd9; }
.pk-help::backdrop { background: #100b17bd; backdrop-filter: blur(5px); }
.pk-help form { margin-top: 18px; text-align: right; }
.pk-help a { color: #ffca8e; }
.pk-help h2 { margin-top: 0; }
.pk-help p { font-size: 14px; line-height: 1.6; }
.pk-selected-dialog { position: fixed; inset: auto 0 0; width: min(560px, 100%); max-width: 100%; height: min(65dvh, 560px); max-height: calc(100dvh - 24px); margin: 0 auto; padding: 18px 16px calc(16px + env(safe-area-inset-bottom, 0px)); border-radius: 22px 22px 0 0; overflow: hidden; }
.pk-selected-dialog[open] { display: flex; flex-direction: column; }
.pk-selected-heading { display: flex; flex-shrink: 0; align-items: center; justify-content: space-between; gap: 12px; }
.pk-selected-heading h2 { margin: 0; font-size: 18px; }
.pk-selected-heading form { margin: 0; }
.pk-selected-dialog > p { flex-shrink: 0; color: var(--text-2); font-size: 12px; }
.pk-selected-dialog .pk-selected { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; flex: 1; height: auto; gap: 8px; overscroll-behavior: contain; }
.pk-selected-dialog .pk-selected li { min-width: 0; }
.pk-selected-dialog .pk-selected button { width: 100%; min-height: 48px; text-align: left; white-space: normal; }
.pk-selected-dialog .pk-empty { grid-column: 1 / -1; }
.pk-help label { display: block; font-size: 12px; margin-bottom: 8px; }
#pkShareUrl { display: block; width: 100%; padding: 12px; margin-bottom: 12px; background: #211927; border: 1px solid #785574; border-radius: 10px; color: #ffefd9; font: inherit; }
#pkShareUrl:focus-visible { outline: 3px solid #ffd78b; outline-offset: 3px; }
.pk-how h2 { font-size: 26px; color: #ffdbb0; margin: 0 0 14px; }
.pk-how p { font-size: 14px; line-height: 1.9; color: #d6bdd7; }
.pk-how b { color: #ffdbb0; }
.pk-how p.pk-footnote { color: #b69cb8; font-size: 12px; }
@media (min-width: 1000px), (min-width: 700px) and (max-height: 600px) {
  .pk-workshop { grid-template-columns: minmax(0, 1fr) 250px; grid-template-rows: auto minmax(0, 1fr) auto; }
  .pk-stage { grid-column: 1; grid-row: 1 / -1; border-right: 1px solid #5b3e59; }
  .pk-toolbar { grid-column: 2; grid-row: 1; display: flex; flex-direction: column; align-items: stretch; padding: 16px; }
  .pk-tools { display: grid; grid-template-columns: 1fr 1fr; }
  #pkExample { grid-column: 1 / -1; grid-row: auto; }
  #pkUndo, #pkClear { grid-column: auto; grid-row: auto; }
  .pk-bottom { grid-column: 2; grid-row: 2; flex-direction: column; align-items: stretch; justify-content: flex-start; }
  #pkPicker { flex: none; }
  .pk-selected { flex: 1; height: auto; flex-direction: column; }
  .pk-selected button { width: 100%; text-align: left; white-space: normal; }
  .pk-picker-row { flex-direction: column; }
  .pk-status { grid-column: 2; grid-row: 3; }
}
@media (max-width: 680px) {
  .pk-main { padding: 8px 10px 10px; gap: 8px; }
  .pk-intro { gap: 8px; }
  .pk-page button { font-size: 12px; padding: 8px 10px; }
  .pk-toolbar { padding: 8px; gap: 6px; }
  .pk-tools { display: contents; }
  .pk-bottom { gap: 8px; padding: 8px 10px 0; }
  .pk-page .pk-mobile-selected { display: inline-flex; flex: 0 0 auto; align-self: flex-end; align-items: center; gap: 8px; color: #ffd9a8; border-color: #9c6a42; }
  .pk-mobile-selected span { min-width: 24px; padding: 3px 6px; border-radius: 7px; background: #ffb567; color: #321b20; font-size: 12px; font-weight: 750; font-variant-numeric: tabular-nums; }
  .pk-count, .pk-selected .pk-empty { font-size: 11px; }
  .pk-status { margin: 6px 10px 8px; font-size: 11px; }
}
@media (max-width: 640px) {
  .v2 body.pk-page.has-bottom-nav { padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-height: 600px) and (min-width: 700px) {
  .pk-workshop { grid-template-columns: minmax(0, 1fr) 300px; }
  .pk-main { gap: 6px; padding-top: 6px; padding-bottom: 8px; }
  .pk-intro h1 { font-size: 22px; }
  .pk-toolbar { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); padding: 8px; gap: 6px; }
  .pk-tools { display: contents; }
  #pkExample { grid-column: 1 / 4; grid-row: 1; }
  #pkShare { grid-column: 4 / 7; grid-row: 1; }
  #pkUndo { grid-column: 1 / 3; grid-row: 2; }
  #pkClear { grid-column: 3 / 5; grid-row: 2; }
  #pkDownload { grid-column: 5 / 7; grid-row: 2; }
  .pk-toolbar button { font-size: 11px; padding: 6px; }
  .pk-picker-row { flex-direction: row; }
  .pk-bottom { padding-top: 6px; gap: 8px; flex-direction: row; }
  #pkPicker { flex: 1; }
  .pk-selected { flex-direction: row; flex: none; height: 48px; }
  .pk-selected button { width: auto; white-space: nowrap; }
}
