/* Smocza Matematyka — Kącik Dorosłego (js/screens/parent.js).
 * Adult zone: texts >= 18 px, calm parchment look, fixed px sizes (the text-size setting must not move this layout;
 * only the live preview in "Wygląd" uses the child-zone tokens on purpose).
 */

.pp {
  position: absolute;
  inset: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 20px;
  line-height: 1.3;
  --pp-warn-ink: #9c5300;
  --pp-warn-ink: color-mix(in srgb, var(--err) 50%, var(--ink));
}
.pp input {
  -webkit-user-select: text;
  user-select: text;
}
.pp-hidden {
  display: none !important;
}
/* visually hidden, still clickable from script (Safari ignores .click() on display:none file inputs) */
.pp-file {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}

/* ---------- buttons inside the adult zone (fixed sizes) ---------- */

.pp .pp-btn {
  font-size: 20px;
  min-height: 60px;
  padding: 0 24px;
  border-radius: 16px;
  gap: 10px;
}
.pp .pp-btn.btn-secondary {
  border-width: 2px;
}
.pp .pp-btn .ico {
  width: 28px;
  height: 28px;
}
.pp .pp-btn-sm {
  min-height: 56px;
  font-size: 19px;
  padding: 0 20px;
}
.pp .pp-btn-big {
  min-height: 72px;
  font-size: 22px;
  padding: 0 32px;
}
.pp .pp-btn.btn-danger {
  background: var(--err);
  color: var(--ink);
}
.pp .pp-btn:disabled {
  opacity: 0.4;
  filter: grayscale(0.5);
}
.pp-link {
  border: 0;
  background: none;
  padding: 8px 4px;
  font: inherit;
  font-size: 18px;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  min-height: 44px;
}

/* ---------- the gate ---------- */

.pp-gate-screen {
  background:
    radial-gradient(circle at 18% 88%, rgba(123, 92, 214, 0.08) 0, rgba(123, 92, 214, 0) 260px),
    radial-gradient(ellipse at 50% 42%, var(--panel-2) 0%, var(--bg) 55%, var(--bg-2) 100%);
}
.pp .pp-gate-back {
  position: absolute;
  left: 24px;
  top: 24px;
  min-height: 72px;
  font-size: 22px;
}
.pp-gate-card {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 720px;
  padding: 26px 40px 30px;
  background: var(--panel);
  border: 3px solid var(--line);
  border-radius: 32px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.pp-gate-head {
  display: flex;
  align-items: center;
  gap: 18px;
  align-self: stretch;
}
.pp-gate-badge {
  flex: none;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--night);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
}
.pp-gate-title {
  font-size: 32px;
}
.pp-gate-sub {
  margin: 2px 0 0;
  font-size: 20px;
  color: var(--ink-soft);
}
.pp-gate-row {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 100px;
  margin-top: 6px;
}
.pp-gate-problem {
  font-family: var(--font-num);
  font-size: 64px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--ink);
}
.pp-gate-row .numin-display {
  min-width: 200px;
  height: 88px;
  font-size: 54px;
}
.pp-gate-msg {
  min-height: 26px;
  font-size: 19px;
  color: var(--ink-soft);
  text-align: center;
}
.pp-gate-msg.warn {
  color: var(--pp-warn-ink);
  font-weight: 700;
}
.pp-gate-keys .keypad-phone {
  grid-auto-rows: 84px;
}
.pp-gate-screen.is-locked .pp-gate-problem {
  color: var(--pp-warn-ink);
}
.pp-gate-screen.is-locked .pp-gate-badge {
  background: var(--err-soft);
  color: var(--pp-warn-ink);
}
.pp-gate-dragon {
  position: absolute;
  left: 40px;
  bottom: 18px;
  pointer-events: none;
}

/* ---------- panel frame ---------- */

.pp-top {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  height: 80px;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 0 20px 0 14px;
  background: var(--night);
  color: #fff;
  border-bottom: 5px solid var(--gold);
  z-index: 2;
}
.pp .pp-exit {
  min-height: 58px;
  padding: 0 22px 0 16px;
  font-size: 20px;
}
.pp-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.pp-title .ico {
  color: var(--gold);
}
.pp-top > * {
  flex: none;
  white-space: nowrap;
}
.pp-top > .pp-spacer {
  flex: 1 1 0;
  min-width: 0;
}
.pp-top-slot {
  display: flex;
  align-items: center;
}
.pp-top > .pp-chip {
  flex: 0 1 auto;
  min-width: 120px;
}
.pp-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 56px;
  padding: 0 20px 0 6px;
  border-radius: 40px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 20px;
  font-weight: 700;
  white-space: nowrap;
}
.pp-chip-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pp-chip > :first-child:not(.pp-chip-text) {
  width: 44px;
  height: 44px;
  flex: none;
}
.pp .pp-top-limit {
  min-height: 52px;
  font-size: 18px;
  padding: 0 18px;
  border: 0;
  background: var(--accent-soft);
  color: var(--ink);
}
.pp-top-note {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 700;
  color: var(--gold);
}
.pp-top-warn {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 52px;
  padding: 0 16px;
  border: 0;
  border-radius: 14px;
  background: var(--err);
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
}

.pp-nav {
  position: absolute;
  left: 0;
  top: 80px;
  bottom: 0;
  width: 256px;
  padding: 22px 14px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--bg-2);
  border-right: 3px solid var(--line);
}
.pp-tab {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  height: 64px;
  padding: 0 16px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 20px;
  font-weight: 700;
  text-align: left;
  transition: background 0.15s;
}
.pp-tab .ico {
  width: 30px;
  height: 30px;
  flex: none;
}
.pp-tab.on {
  background: var(--panel);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.pp-tab.on::before {
  content: '';
  position: absolute;
  left: -2px;
  top: 14px;
  bottom: 14px;
  width: 6px;
  border-radius: 6px;
  background: var(--gold);
}
.pp-tab.on .ico {
  color: var(--gold-deep);
}
.pp-tab:active {
  transform: translateY(2px);
}
.pp-tab-reset {
  margin-top: auto;
}
.pp-tab-reset .ico {
  color: var(--pp-warn-ink);
}

.pp-content {
  position: absolute;
  left: 256px;
  top: 80px;
  right: 0;
  bottom: 0;
  padding: 20px 28px 22px;
  display: flex;
  flex-direction: column;
}
.pp-head {
  flex: none;
  display: flex;
  align-items: baseline;
  gap: 18px;
  margin-bottom: 18px;
  white-space: nowrap;
}
.pp-h2 {
  font-size: 28px;
}
.pp-desc {
  margin: 0;
  font-size: 19px;
  color: var(--ink-soft);
  overflow: hidden;
  text-overflow: ellipsis;
}
.pp-body {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.pp-cols {
  display: flex;
  gap: 24px;
  flex: 1;
  min-height: 0;
}
.pp-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.pp-col-wide {
  flex: 1.55;
}
.pp-card {
  background: var(--panel);
  border: 2px solid var(--line);
  border-radius: 22px;
  padding: 18px 22px 20px;
  box-shadow: 0 2px 0 rgba(42, 34, 56, 0.06);
}
.pp-card-title {
  font-size: 22px;
  margin-bottom: 12px;
}
.pp-col > .pp-card:last-child {
  flex: 1;
}
.pp-h4 {
  margin: 0 0 8px;
  font-size: 20px;
}
.pp-text {
  margin: 0 0 12px;
  font-size: 19px;
  line-height: 1.4;
}
.pp-note {
  margin: 0 0 12px;
  font-size: 18px;
  line-height: 1.4;
  color: var(--ink-soft);
}
.pp-note.warn {
  color: var(--pp-warn-ink);
  font-weight: 700;
}
.pp-hint {
  font-size: 18px;
  color: var(--ink-soft);
  line-height: 1.35;
}
.pp-msg {
  min-height: 24px;
  font-size: 18px;
  line-height: 1.35;
}
.pp-msg.warn {
  color: var(--pp-warn-ink);
  font-weight: 700;
}
.pp-msg.ok {
  color: var(--ink);
}

/* ---------- form controls ---------- */

.pp-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}
.pp-label {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink-soft);
}
.pp-label-gap {
  display: block;
  margin-top: 10px;
  margin-bottom: 6px;
}
.pp-input {
  width: 100%;
  height: 56px;
  padding: 0 16px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: #fff;
  font: inherit;
  font-size: 22px;
  color: var(--ink);
  outline: none;
}
.pp-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.pp-input::placeholder {
  color: #b9ae98;
}

.pp-seg {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 4px;
  padding: 4px;
  border-radius: 16px;
  background: var(--bg-2);
  box-shadow: inset 0 1px 2px rgba(42, 34, 56, 0.08);
}
.pp-seg-btn {
  min-width: 78px;
  height: 52px;
  padding: 0 16px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 19px;
  font-weight: 700;
  white-space: nowrap;
}
.pp-seg-btn.on {
  background: var(--gold);
  color: var(--ink);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.12);
}
.pp-seg-btn:active {
  transform: translateY(2px);
}
.pp-seg-wide {
  display: flex;
}
.pp-seg-wide .pp-seg-btn {
  flex: 1;
}

.pp-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
  padding: 6px 0;
  border-top: 2px solid var(--panel-2);
}
.pp-card-title + .pp-row {
  border-top: 0;
}
.pp-row-text {
  min-width: 0;
}
.pp-row-label {
  font-size: 20px;
  font-weight: 700;
}
.pp-card-rows {
  padding: 6px 24px;
}
.pp-card-rows .pp-row {
  min-height: 70px;
  padding: 7px 0;
}
.pp-card-rows .pp-row:first-child {
  border-top: 0;
}
.pp-card-rows .pp-hint {
  white-space: nowrap;
}

.pp-stepper {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 16px;
  background: var(--bg-2);
}
.pp-step-btn {
  width: 56px;
  height: 52px;
  border: 0;
  border-radius: 12px;
  background: var(--panel);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.1);
}
.pp-step-btn:disabled {
  opacity: 0.35;
}
.pp-step-val {
  min-width: 76px;
  text-align: center;
  font-family: var(--font-num);
  font-size: 24px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.pp-rate {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.pp-rate .pp-link {
  padding: 0 8px;
  min-height: 44px;
}

.pp-pager {
  display: flex;
  align-items: center;
  gap: 10px;
}
.pp-page-btn {
  width: 60px;
  height: 52px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
}
.pp-page-btn:disabled {
  opacity: 0.35;
}
.pp-page-num {
  min-width: 64px;
  text-align: center;
  font-size: 19px;
  font-weight: 700;
  font-family: var(--font-num);
}
.pp-btnrow {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ---------- modal (adult) ---------- */

.pp-modal .modal {
  min-width: 560px;
  max-width: 720px;
  padding: 30px 40px;
}
.pp-modal .modal-title {
  font-size: 30px;
}
.pp-modal .modal-body {
  font-size: 20px;
  line-height: 1.4;
}
.pp-modal .btn {
  font-size: 20px;
  min-height: 60px;
}

/* ---------- Profil ---------- */

.pp-sample {
  margin-top: 4px;
  padding: 12px 14px 14px 18px;
  border-radius: 16px;
  background: var(--gold-soft);
}
.pp-sample-label {
  font-size: 18px;
  color: var(--ink-soft);
  margin-bottom: 4px;
}
.pp-sample-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.pp-sample-text {
  flex: 1;
  min-width: 0;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.pp-names {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 8px 0 12px;
}
.pp-name {
  height: 54px;
  padding: 0 6px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
  white-space: nowrap;
}
.pp-name.on {
  background: var(--gold);
  border-color: var(--gold-deep);
}
.pp-name:active {
  transform: translateY(2px);
}
.pp-card-dragon .pp-msg {
  margin-top: 4px;
}
.pp-savebar {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
  margin-top: 18px;
}
.pp-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 19px;
  color: var(--ink-soft);
}
.pp-status.ok {
  color: var(--ink);
  font-weight: 700;
}
.pp-status .ico {
  color: var(--gold-deep);
}
.pp .pp-save {
  min-width: 200px;
  min-height: 64px;
}
.pp .pp-save:not(.is-dirty) {
  background: var(--panel);
  border: 2px solid var(--line);
}

/* ---------- Głos ---------- */

.pp-phrases {
  display: flex;
  gap: 16px;
}
.pp-card-tests {
  flex: none;
  margin-top: 20px;
  padding-bottom: 18px;
}
.pp-card-tests .pp-phrase {
  flex: 1;
  min-height: 76px;
}
.pp-phrase {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 60px;
  padding: 8px 16px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  color: var(--ink);
  font-size: 19px;
  text-align: left;
}
.pp-phrase .ico {
  color: var(--accent);
  flex: none;
}
.pp-phrase.playing {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.pp-phrase:active {
  transform: translateY(2px);
}
.pp-radios {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pp-radio {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 60px;
  padding: 0 16px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  color: var(--ink);
  font-size: 19px;
  text-align: left;
}
.pp-radio.on {
  border-color: var(--gold-deep);
  background: var(--gold-soft);
}
.pp-radio-dot {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 3px solid var(--line);
  background: #fff;
}
.pp-radio.on .pp-radio-dot {
  border-color: var(--gold-deep);
  box-shadow: inset 0 0 0 5px #fff;
  background: var(--gold-deep);
}
.pp-radio-label {
  flex: 1;
  min-width: 0;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pp-radio-sub {
  flex: none;
  font-size: 18px;
  color: var(--ink-soft);
}
.pp-voice-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 14px;
}
.pp-help .pp-note {
  margin-bottom: 10px;
}
.pp-help-item {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.45;
  color: var(--ink-soft);
}
.pp-help-os {
  color: var(--ink);
  font-size: 19px;
}
.pp-step {
  white-space: nowrap;
  color: var(--ink);
}
.pp-help .pp-link {
  padding-left: 0;
}

/* ---------- Wygląd ---------- */

.pp-tiles {
  display: flex;
  gap: 16px;
}
.pp-tile {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 132px;
  padding: 12px;
  border: 3px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  color: var(--ink);
}
.pp-tile.on {
  border-color: var(--gold-deep);
  background: var(--gold-soft);
  box-shadow: 0 0 0 3px var(--gold) inset;
}
.pp-tile:active {
  transform: translateY(2px);
}
.pp-tile-aa {
  font-weight: 700;
  line-height: 1.05;
  height: 46px;
  display: flex;
  align-items: flex-end;
}
.pp-tile-label {
  font-size: 20px;
  font-weight: 700;
}
.pp-tile-sub {
  font-size: 18px;
  color: var(--ink-soft);
}
.pp-motion-ico {
  color: var(--accent);
  margin-bottom: 4px;
}
.pp-card-fill {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.pp-card-fill .pp-tiles {
  flex: 1;
  align-items: center;
}
.pp-card-fill .pp-tile {
  min-height: 140px;
}
.pp-card-foot {
  margin: 14px 0 0;
}
.pp-card-preview {
  display: flex;
  flex-direction: column;
}
/* a picture of the child's screen, not a control */
.pp-preview {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 22px;
  padding: 18px 14px;
  border-radius: 18px;
  background: var(--bg);
  border: 2px dashed var(--line);
  pointer-events: none;
}
.pp .pp-preview-bubble {
  min-height: 0;
  padding-bottom: 16px;
  overflow: visible;
}
.pp .pp-preview-bubble::after {
  content: '';
  position: absolute;
  bottom: -18px;
  left: 44px;
  border: 14px solid transparent;
  border-top-color: var(--ink);
  border-bottom: 0;
}
.pp-preview-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
}
.pp-preview-dragon {
  flex: none;
  margin-left: -4px;
}
.pp .pp-preview-btn {
  flex: none;
  margin-bottom: 6px;
}
.pp-body-wyglad .pp-col-wide {
  flex: 1.4;
}

/* ---------- Misje ---------- */

.pp-missions {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 20px 24px;
  min-height: 0;
}
.pp-mission {
  display: flex;
  flex-direction: column;
  padding: 16px 22px 18px;
}
.pp-mission-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 6px;
}
.pp-mission-head .pp-card-title {
  margin: 0;
}
.pp-mission-gem {
  width: 56px;
  height: 56px;
  flex: none;
}
.pp-mission-gem svg {
  width: 56px;
  height: 56px;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.2));
}
.pp-mission-desc {
  margin: 0 0 6px;
  font-size: 19px;
  line-height: 1.35;
}
.pp-mission-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
}
.pp-mission.done {
  background: var(--gold-soft);
  border-color: #f0d98a;
}
.pp-done {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  font-size: 19px;
  font-weight: 700;
}
.pp-done .ico {
  color: var(--gold-deep);
}

/* ---------- Postępy ---------- */

.pp-subnav {
  flex: none;
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  padding: 4px;
  border-radius: 16px;
  background: var(--bg-2);
  align-self: flex-start;
}
.pp-subtab {
  height: 50px;
  padding: 0 18px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 19px;
  font-weight: 700;
  white-space: nowrap;
}
.pp-subtab.on {
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.1);
}
.pp-subpage {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.pp-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}
.pp-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 18px;
  border-radius: 18px;
  background: var(--panel);
  border: 2px solid var(--line);
}
.pp-stat-label {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink-soft);
  line-height: 1.25;
}
.pp-stat-value {
  font-family: var(--font-num);
  font-size: 32px;
  white-space: nowrap;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  margin-top: auto;
}
.pp-stat-sub {
  font-size: 18px;
  color: var(--ink-soft);
  line-height: 1.25;
}
.pp-stats-small .pp-stat {
  flex-direction: row-reverse;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  padding: 10px 16px;
  min-height: 76px;
}
.pp-stats-small .pp-stat-value {
  flex: none;
  margin: 0;
  font-size: 32px;
  min-width: 44px;
  text-align: center;
}
.pp-stat.gold {
  background: var(--gold-soft);
  border-color: #f0d98a;
}
.pp-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 26px;
  margin: 0 0 14px;
  font-size: 19px;
  color: var(--ink-soft);
}
.pp-line b {
  color: var(--ink);
  font-family: var(--font-num);
}
.pp-card-notaught {
  background: var(--panel-2);
  padding: 14px 22px 16px;
}
.pp-card-notaught .pp-card-title {
  margin-bottom: 6px;
}
.pp-daystrip {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 16px;
}
.pp-daystrip-text {
  flex: none;
  width: 158px;
}
.pp-key-gap {
  margin-left: 10px;
}
.pp-daystrip-text .pp-hint {
  white-space: nowrap;
}
.pp-days {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(14, 1fr);
  gap: 6px;
}
.pp-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 60px;
  border-radius: 14px;
  background: var(--panel);
  border: 2px solid var(--line);
  color: var(--ink-soft);
  line-height: 1.1;
}
.pp-day-w {
  font-size: 18px;
}
.pp-day-n {
  font-family: var(--font-num);
  font-size: 18px;
  font-weight: 700;
}
.pp-day.work {
  background: var(--gold);
  border-color: var(--gold-deep);
  color: var(--ink);
}
.pp-day.open {
  border-color: #b9ae98;
  border-style: dashed;
}
.pp-day.today {
  box-shadow: 0 0 0 3px var(--accent-soft), 0 0 0 5px var(--accent);
}
.pp-card-notaught .pp-text {
  margin: 0;
}

.pp-islands {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.pp-island {
  position: relative;
  padding: 10px 10px 8px 14px;
  border-radius: 14px;
  background: var(--panel);
  border: 2px solid var(--line);
  overflow: hidden;
  min-height: 92px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.pp-island::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  background: var(--isl);
}
.pp-island-name {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.15;
}
.pp-island-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.pp-island-num {
  font-family: var(--font-num);
  font-size: 19px;
  font-weight: 700;
}
.pp-island.empty {
  opacity: 0.55;
}

.pp-table {
  flex: none;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  background: var(--panel);
  border: 2px solid var(--line);
  overflow: hidden;
}
.pp-tr {
  display: grid;
  align-items: center;
  min-height: 50px;
  border-top: 1px solid var(--panel-2);
  position: relative;
}
.pp-tr.pp-th {
  min-height: 42px;
  background: var(--panel-2);
  border-top: 0;
}
.pp-th .pp-td {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink-soft);
}
.pp-td {
  padding: 4px 12px;
  font-size: 19px;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pp-td-wrap {
  white-space: normal;
  line-height: 1.3;
}
.pp-td-name {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}
.pp-td-name > span {
  overflow: hidden;
  text-overflow: ellipsis;
}
.pp-table-mod .pp-td-name {
  white-space: normal;
  line-height: 1.2;
}
.pp-table-mod .pp-td-name > span {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.pp-table-mod .pp-tr {
  grid-template-columns: 2.25fr 0.9fr 1.15fr 1.1fr 1fr 2.2fr;
}
.pp-table-mod .pp-tr:not(.pp-th)::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: var(--isl);
}
.pp-table-mod .pp-tr.idle .pp-td {
  color: #a49b88;
}
.pp-mod-dot {
  flex: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.15);
}
.pp-td-recent {
  display: flex;
  align-items: center;
  gap: 10px;
}
.pp-recent-num {
  font-family: var(--font-num);
  font-weight: 700;
  min-width: 64px;
}
.pp-dots {
  display: inline-grid;
  grid-template-columns: repeat(10, 9px);
  gap: 3px;
}
.pp-dots i,
.pp-key {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
}
.pp-dots i.z,
.pp-key.z {
  background: var(--gold-deep);
}
.pp-dots i.p,
.pp-key.p {
  background: transparent;
  box-shadow: inset 0 0 0 2px #b9ae98;
}
.pp-key {
  width: 12px;
  height: 12px;
  vertical-align: 0;
}
.pp-table-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 12px;
  min-height: 52px;
}
.pp-empty {
  padding: 20px;
  font-size: 19px;
  color: var(--ink-soft);
}
.pp-empty-big {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-radius: 20px;
  border: 2px dashed var(--line);
  font-size: 22px;
  margin-bottom: 16px;
}
.pp-empty-big .pp-btn {
  font-size: 20px;
}

.pp-facts {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  margin-bottom: 16px;
}
.pp-fgrid {
  --cell: 31px;
  display: grid;
  gap: 2px;
}
.pp-fgrid-add {
  --cell: 34px;
}
.pp-fh {
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--cell);
  font-family: var(--font-num);
  font-size: 18px;
  font-weight: 700;
  color: var(--ink-soft);
}
.pp-fcorner {
  color: var(--ink);
  font-size: 22px;
}
.pp-fc {
  height: var(--cell);
  border-radius: 6px;
}
.pp-fc.b0 {
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
}
.pp-fc.b1 {
  background: #fff4cf;
  box-shadow: inset 0 0 0 1px #f0dfa4;
}
.pp-fc.b2 {
  background: #ffe28a;
}
.pp-fc.b3 {
  background: #ffcb3d;
}
.pp-fc.b4 {
  background: var(--gold-deep);
}
.pp-fc.b5 {
  background: #7a5200;
}
.pp-fside {
  flex: 1;
  min-width: 0;
  padding: 14px 16px 12px;
  border-radius: 18px;
  background: var(--panel);
  border: 2px solid var(--line);
}
.pp-fbig {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 18px;
  color: var(--ink-soft);
}
.pp-fbig b {
  font-family: var(--font-num);
  font-size: 36px;
  color: var(--ink);
}
.pp-fbig span {
  white-space: nowrap;
}
.pp-fcount {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 0;
  border-top: 1px solid var(--panel-2);
  font-size: 18px;
}
.pp-fcount b {
  font-family: var(--font-num);
}
.pp-fside .pp-hint {
  margin: 10px 0 0;
}
.pp-legend-row {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 8px;
}
.pp-legend-row .pp-row-label {
  font-size: 19px;
}
.pp-legend {
  display: flex;
  gap: 18px;
}
.pp-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  white-space: nowrap;
}
.pp-legend-item .pp-fc {
  width: 24px;
  height: 24px;
  flex: none;
}

.pp-table-mis .pp-tr {
  grid-template-columns: 1.85fr 2.65fr 1.6fr 0.7fr 0.9fr;
  min-height: 72px;
}
/* at most 3 lines per cell (examples 2), so 5 rows always fit */
.pp-table-mis .pp-td-wrap,
.pp-table-mis .pp-td-ex {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  padding-top: 0;
  padding-bottom: 0;
  margin: 4px 0;
}
.pp-table-mis .pp-td-ex {
  -webkit-line-clamp: 2;
}
.pp-table-mis .pp-td-name .pp-sub-hint {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pp-table-mis .pp-td-name > div {
  min-width: 0;
}
.pp-table-mis .pp-td-name {
  white-space: normal;
  line-height: 1.2;
}
.pp-table-mis .pp-tr.pp-th {
  min-height: 42px;
}
.pp-sub-hint {
  font-size: 18px;
  font-weight: 400;
  color: var(--ink-soft);
}
/* examples may contain words (e.g. WORD_FORM) — Arial Rounded has no Polish letters, so the text font */
.pp-td-ex {
  font-family: var(--font);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  white-space: normal;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.pp-queue {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 10px;
}
.pp-tag {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 14px;
  border-radius: 18px;
  background: var(--accent-soft);
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
  white-space: nowrap;
}

.pp-table-jr .pp-tr {
  grid-template-columns: 118px 1.6fr 2.5fr 2.7fr 1.15fr;
  min-height: 62px;
}
/* at most 3 lines per cell, so 5 rows always fit */
.pp-table-jr .pp-td-wrap {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  padding-top: 0;
  padding-bottom: 0;
  margin: 4px 0;
}
.pp-td-mood {
  color: var(--ink-soft);
  white-space: normal;
  line-height: 1.2;
}
.pp-table-jr .pp-tr.pp-th {
  min-height: 42px;
}
.pp-table-jr .pp-tr.day-start:not(:nth-child(2)) {
  border-top: 2px solid var(--line);
}
.pp-td-day {
  font-weight: 700;
}
.pp-td-note {
  font-style: italic;
}


.pp-place-head {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 14px;
}
.pp-place-head .pp-hint {
  flex: 1;
}
.pp-riddles {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(6, auto);
  grid-template-columns: 1fr 1fr;
  gap: 8px 24px;
}
.pp-riddle {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 48px;
  padding: 0 16px 0 10px;
  border-radius: 14px;
  background: var(--panel);
  border: 2px solid var(--line);
}
.pp-riddle-n {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-num);
  font-weight: 700;
  font-size: 18px;
  flex: none;
}
.pp-riddle-name {
  flex: 1;
  min-width: 0;
  font-size: 19px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pp-riddle-mark {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink-soft);
}
.pp-riddle.ok {
  background: var(--gold-soft);
  border-color: #f0d98a;
}
.pp-riddle.ok .pp-riddle-mark {
  color: var(--ink);
}
.pp-riddle.ok .pp-riddle-mark .ico {
  color: var(--gold-deep);
}
.pp-riddle.none {
  opacity: 0.6;
}
.pp-unlocked {
  margin: 16px 0 0;
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink-soft);
}
.pp-unlocked .pp-row-label {
  font-size: 19px;
  color: var(--ink);
}
.pp-unl {
  white-space: nowrap;
}
.pp-unl b {
  color: var(--ink);
}

/* ---------- Kopia zapasowa ---------- */

.pp-banner {
  flex: none;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 60px;
  padding: 8px 20px;
  margin-bottom: 20px;
  border-radius: 16px;
  font-size: 20px;
  font-weight: 700;
}
.pp-banner.ok {
  background: var(--gold-soft);
  border: 2px solid #f0d98a;
}
.pp-banner.ok .ico {
  color: var(--gold-deep);
}
.pp-banner.warn {
  background: var(--err-soft);
  border: 2px solid var(--err);
  color: var(--pp-warn-ink);
}
/* Safari / iPad 7-day storage cap (in place of the "ok" banner) and a damaged save replaced at start */
.pp-alert {
  flex: none;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 10px 20px;
  margin: 0 0 20px;
  border-radius: 16px;
  background: var(--panel-2);
  border: 2px solid var(--line);
  font-size: 18px;
  line-height: 1.35;
}
.pp-banner + .pp-alert,
.pp-alert + .pp-alert {
  margin-top: -6px;
}
.pp-alert > .ico {
  flex: none;
  margin-top: 1px;
  color: var(--pp-warn-ink);
}
.pp-alert b {
  font-size: 19px;
}
.pp-body-kopia.is-previewing .pp-recovered {
  display: none;
}
.pp-alert.warn {
  background: var(--err-soft);
  border-color: var(--err);
}
.pp-alert.warn b {
  color: var(--pp-warn-ink);
}
.pp-last-export {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.35;
}
.pp-last-export > .ico {
  flex: none;
}
.pp-last-export.ok > .ico {
  color: var(--gold-deep);
}
.pp-last-export.warn {
  color: var(--pp-warn-ink);
}
.pp-card-io {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.pp-card-io > .pp-msg {
  margin-top: 14px;
}
.pp-import-intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.pp-import-intro .pp-text {
  margin-bottom: 14px;
}
.pp-import-box {
  align-self: stretch;
  margin-top: 16px;
}
.pp-card-io.is-previewing .pp-import-intro {
  display: none;
}
.pp-card-io.is-previewing .pp-import-box {
  margin-top: 0;
}
.pp-preview-file {
  padding: 14px 18px 16px;
  border-radius: 16px;
  background: var(--panel-2);
  border: 2px solid var(--line);
}
.pp-file-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink-soft);
  margin-bottom: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pp-kv {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 3px 0;
  font-size: 19px;
}
.pp-kv-k {
  color: var(--ink-soft);
}
.pp-kv-v {
  min-width: 0;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pp-preview-file .pp-hint {
  margin: 10px 0 12px;
}

/* ---------- Reset ---------- */

.pp-card-reset {
  width: 680px;
  align-self: center;
  border-color: var(--err);
  margin-top: 6px;
}
.pp-list {
  margin: 0 0 14px;
  padding-left: 26px;
  font-size: 19px;
  line-height: 1.5;
}
.pp .pp-input-word {
  width: 240px;
  font-family: var(--font);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.pp-card-reset .pp-btnrow {
  margin-bottom: 8px;
}
.pp-gate-screen.is-locked .numin-display {
  display: none;
}
