/* The interactive PS Focus demo on the download page: the app's look rebuilt for the browser, see demo.js.
   Colours and sizes follow app_config.py and the qt/ modules; glass and glow follow qt/docking.py and qt/theme.py */

@property --a { syntax: "<number>"; inherits: true; initial-value: 1; }
@property --g { syntax: "<number>"; inherits: true; initial-value: 0; }

/* Sizes count borders and padding in, as on the website, wherever the demo is shown. Text is the app's point sizes
   at Windows' usual 96 dots per inch: 7, 8, 9, 10, 11, 12, 16, 20 and 30 point are 9.3, 10.7, 12, 13.3, 14.7, 16,
   21.3, 26.7 and 40 pixels */
.psf-demo, .psf-demo *, .psf-demo *::before, .psf-demo *::after { box-sizing: border-box; }
.psf-demo {
  --psf-background: 8, 8, 8;
  --psf-panel: 12, 12, 12;
  --psf-text: #eef3f1;
  --psf-muted: #8d9a98;
  --psf-border: 34, 34, 34;
  --psf-blue: #3d5ce6;
  --psf-green: #22c55e;
  --psf-online: #7d95f5;
  --psf-away: #56659f;
  --psf-name-drawing: #86e3a6;
  --psf-name-online: #aebdfa;
  --psf-name-away: #8993bc;
  --psf-name-offline: #b0b9b7;
  --psf-gold: #f0c33c;
  --psf-red: #e07e75;
  --psf-badge: #e5484d;
  position: relative;
  font-family: "Segoe UI", "Segoe UI Variable", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  color: var(--psf-text);
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* Anything hidden stays hidden, whatever its own display */
.psf-demo [hidden] { display: none !important; }

/* The bar of demo controls above the scene */
.psf-pause-control { font-size: 14px; color: var(--text, #eef3f1); gap: 10px; }
.psf-pause-control .psf-check { width: 16px; height: 16px; }
.psf-controls {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px;
  margin: 0 0 12px; font-size: 14px; color: var(--muted, #8d9a98);
}
.psf-switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; color: var(--text, #eef3f1); font: inherit; background: none; border: 0; padding: 0; }
.psf-switch .psf-track { width: 38px; height: 22px; border-radius: 11px; background: #333; position: relative; transition: background .2s; flex: none; }
.psf-switch .psf-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #eef3f1; transition: transform .2s; }
.psf-switch[aria-checked="true"] .psf-track { background: var(--psf-green); }
.psf-switch[aria-checked="true"] .psf-track::after { transform: translateX(16px); }
.psf-switch:focus-visible .psf-track { outline: 2px solid var(--psf-blue); outline-offset: 2px; }
.psf-slider { display: inline-flex; align-items: center; gap: 10px; }
.psf-slider input { width: 120px; accent-color: var(--psf-blue); }
.psf-hint { flex: 1 1 260px; text-align: right; font-size: 13px; }
/* Only on a phone, see the bands in demo.js */
.psf-scroll-edge { display: none; }
/* The demo's intro: on a phone the window stays put, see `touch` in demo.js, so it asks for taps instead of drags */
.psf-touch-only { display: none; }
@media (max-width: 760px), (pointer: coarse) { .psf-touch-only { display: inline; } .psf-pointer-only { display: none; } }

/* The scene: an art app's plain workspace with the painting on its canvas */
.psf-stage {
  position: relative; overflow: hidden; border-radius: 10px; background: #1e1e1e;
  border: 1px solid #2a2a2a; min-height: 1148px; touch-action: manipulation;
}
.psf-canvas {
  /* A fixed size, tall enough for PS Focus at its biggest to fit over it: a tall slice of the painting, centred on its
     figures, which stays put whatever the window shows */
  position: absolute; top: 24px; right: 24px; left: 344px; height: 1100px;
  background: #111 74% 50% / cover no-repeat; box-shadow: 0 6px 30px rgba(0, 0, 0, .45);
}

/* A quiet caption identifies the painting's role without competing with the app. */
.psf-canvas-label {
  position: absolute; top: 10px; left: 12px; max-width: calc(100% - 24px);
  font-size: 12px; font-weight: 400;
  color: rgba(255, 255, 255, .9); pointer-events: none;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .8);
}

/* A window or panel: every background as see-through as --a, text solid, with a soft glow behind it as --g grows */
.psf-window, .psf-floating {
  position: absolute; width: 300px; --a: 1; --g: 0;
  text-shadow: 0 0 2px rgba(0, 0, 0, var(--g)), 0 0 6px rgba(0, 0, 0, calc(var(--g) * .8));
  transition: --a .3s, --g .3s;
}
/* See-through, every spot is painted once, as the app's window: the window has no background of its own, its rows,
   blocks and the gaps between them each paint theirs, so nothing lies on top of another and turns darker */
.psf-window { left: 24px; top: 24px; background: none; outline: 1px solid rgba(var(--psf-border), max(var(--a), .43)); }
.psf-floating { z-index: 5; }
/* Floating, a panel has no space above it, so snapped panels meet edge to edge */
.psf-floating > .psf-block { margin-top: 0; }
.psf-floating.psf-dragging { z-index: 10; opacity: .97; }
/* While it would dock if let go, as the app */
.psf-floating.psf-docking { opacity: .7; }
/* A panel being moved by its title, or docked, has a blue border, as in the app */
.psf-floating.psf-dragging > .psf-block, .psf-floating.psf-docking > .psf-block { border-color: var(--psf-blue); }

.psf-titlebar { height: 28px; display: flex; align-items: center; padding-left: 8px; font-size: 12px; background: rgba(var(--psf-background), var(--a)); }
.psf-titlebar img { width: 16px; height: 16px; margin-right: 8px; }
.psf-titlebar .psf-spacer { flex: 1; }
.psf-titlebar button { width: 36px; height: 28px; border: 0; background: none; color: var(--psf-text); font: 16px/1 "Segoe UI", system-ui, sans-serif; cursor: pointer; }
.psf-titlebar button:hover { background: rgba(255, 255, 255, .08); }
.psf-titlebar button.psf-close:hover { background: #c42b1c; }

.psf-header { background: rgba(var(--psf-background), var(--a)); height: 34px; display: flex; align-items: center; padding: 0 2px 0 8px; font-size: 13.333px; position: relative; }
.psf-level { display: flex; align-items: center; gap: 4px; }
.psf-badge { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--psf-red); display: grid; place-items: center; font-size: 12px; margin-left: 2px; }
.psf-account { position: absolute; left: 50%; transform: translateX(-50%); max-width: calc(100% - 168px); display: flex; align-items: center; justify-content: center; font-size: 14.667px; color: var(--psf-green); }
.psf-account > .psf-dot { position: absolute; right: calc(100% + 6px); }
.psf-header > .psf-settings { margin-left: auto; }
.psf-account.psf-hidden-name { color: var(--psf-muted); }
/* Names a lighter shade than the line under them, so they read first */
.psf-account-name { cursor: pointer; font-weight: 600; color: var(--psf-name-online); }
.psf-account.psf-in-app .psf-account-name { color: var(--psf-name-drawing); }
.psf-account.psf-hidden-name .psf-account-name, .psf-account.psf-local .psf-account-name { color: inherit; }
.psf-account-text { display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; }
.psf-account-line { position: relative; display: flex; align-items: center; justify-content: center; max-width: 100%; line-height: 18px; }
.psf-account-line > .psf-chevron { position: absolute; left: calc(100% + 2px); }
.psf-account-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.psf-account-status { font-size: 10.667px; line-height: 12px; color: var(--psf-muted); }
.psf-account-status[data-status="online"] { color: var(--psf-away); }
.psf-account-status[data-status="away"] { color: var(--psf-away); }
.psf-account-status[data-status="drawing"] { color: var(--psf-green); }
.psf-name-field { width: 160px; background: #151515; border: 0; border-radius: 4px; color: var(--psf-text); font: 15px inherit; font-family: inherit; text-align: center; padding: 1px 4px; outline: none; }
.psf-name-field::selection { background: #284e45; }
.psf-dot { width: 13px; height: 13px; border-radius: 50%; background: #151515; border: 1px solid rgba(var(--psf-border), 1); }
.psf-dot.psf-reached { background: var(--psf-blue); border-color: var(--psf-blue); }
.psf-icon-button { border: 0; background: none; color: var(--psf-muted); cursor: pointer; border-radius: 4px; padding: 0; display: grid; place-items: center; }
.psf-icon-button:hover, .psf-icon-button.psf-open { background: rgba(var(--psf-border), max(var(--a), .6)); }
.psf-icon-button svg { display: block; }
.psf-chevron { width: 16px; height: 16px; flex: 0 0 16px; }
.psf-settings { width: 22px; height: 18px; letter-spacing: 1px; font-size: 13.333px; line-height: 1; }

.psf-icons { height: 24px; display: flex; justify-content: flex-end; gap: 2px; padding: 2px 4px 0 0; background: rgba(var(--psf-background), var(--a)); }
.psf-icons .psf-icon-button { width: 22px; height: 22px; color: #4f5857; }
.psf-icons .psf-icon-button.psf-on { color: var(--psf-text); }
/* The transparency icon at the row's left end, always lit, dimmed by the setting; its compact slider popup */
.psf-icons .psf-icon-button.psf-transparency { color: var(--psf-text); margin: 0 auto 0 4px; }
.psf-menu.psf-compact { min-width: 0; padding: 0; background: none; border: 0; }
.psf-transparency-popup { display: flex; align-items: center; height: 22px; padding: 0 6px; }
/* Drawn as the app's: a thin track, blue up to the knob and grey after it, and a small white knob */
.psf-transparency-popup input { -webkit-appearance: none; appearance: none; width: 80px; height: 12px; margin: 0; background: none; cursor: pointer; }
.psf-transparency-popup input::-webkit-slider-runnable-track { height: 4px; border-radius: 2px;
  background: linear-gradient(to right, var(--psf-blue) var(--fill, 50%), #222 var(--fill, 50%)); }
.psf-transparency-popup input::-moz-range-track { height: 4px; border-radius: 2px;
  background: linear-gradient(to right, var(--psf-blue) var(--fill, 50%), #222 var(--fill, 50%)); }
.psf-transparency-popup input::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; margin-top: -4px; border: 0; border-radius: 50%; background: var(--psf-text); }
.psf-transparency-popup input::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: var(--psf-text); }
.psf-icons .psf-icon-button.psf-transparency.psf-open:not(:hover) { background: none; }

/* Blocks: the program panel and the modules */
.psf-blocks { padding-bottom: 4px; }
/* The gap above each block, and below the last, in the window's background */
.psf-blocks > * { box-shadow: 0 -2px 0 rgba(var(--psf-background), var(--a)); }
.psf-blocks > :last-child { box-shadow: 0 -2px 0 rgba(var(--psf-background), var(--a)), 0 4px 0 rgba(var(--psf-background), var(--a)); }
/* A block's name strip and body are one background, the strip's darker band painted in it, not over it */
.psf-block { --strip: 27px; margin-top: 2px; background: linear-gradient(rgba(var(--psf-background), var(--a)) var(--strip), rgba(var(--psf-panel), var(--a)) var(--strip)); border: 1px solid rgba(var(--psf-border), max(var(--a), .43)); position: relative; }
.psf-strip { height: 27px; display: flex; align-items: center; padding: 0 8px; font-weight: 600; font-size: 13.333px; border-bottom: 1px solid rgba(var(--psf-border), max(var(--a), .43)); cursor: grab; touch-action: none; }
.psf-strip:hover { background: rgba(16, 16, 16, max(var(--a), .3)); }
.psf-strip .psf-spacer { flex: 1; }
.psf-strip .psf-strip-text { font-weight: 400; color: var(--psf-muted); font-size: 12px; }
.psf-dock { width: 18px; height: 18px; display: none; }
.psf-floating .psf-dock { display: grid; }
/* The space a panel will dock into, as the app's: a blue outline, lightly filled in */
.psf-placeholder { margin-top: 2px; border: 2px solid var(--psf-blue); background: rgba(61, 92, 230, .24); }

.psf-today { --strip: 32px; }
.psf-today .psf-strip { font-weight: 400; font-size: 16px; color: var(--psf-muted); height: 32px; }
.psf-today .psf-strip .psf-two-week { margin-left: auto; font-size: 16px; }
/* Laid out as the app's panel, line for line: the big figure's line starts just under the strip, the two rows of
   detail below it, in the app's sizes (its 30, 10 and 9 point fonts are 40, 13.3 and 12 pixels) */
.psf-today-body { padding: 0 8px 9px; }
.psf-metric { font-size: 40px; font-weight: 600; line-height: 54px; margin-top: -3px; }
.psf-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 13.333px; line-height: 17px; margin-top: 4px; color: var(--psf-muted); }
.psf-row + .psf-row { margin-top: 6px; }
.psf-row .psf-small { font-size: 12px; }
.psf-status { font-weight: 600; font-size: 13.333px; color: var(--psf-muted); }
.psf-status.psf-active { color: var(--psf-green); }

/* The graph */
.psf-graph-head { display: flex; align-items: center; gap: 4px; padding: 5px 9px 0 8px; font-size: 12px; color: var(--psf-muted); }
.psf-graph-head .psf-spacer { flex: 1; }
/* Buttons and cells the app's size: periods 24 by 27, the calendar's 58 and 36 by 27, days 40 by 38 three apart */
.psf-period { border: 0; background: none; color: var(--psf-muted); font-size: 12px; line-height: 1; font-family: inherit; width: 24px; height: 27px; padding: 0; border-radius: 4px; cursor: pointer; }
.psf-period:hover { background: rgba(var(--psf-border), max(var(--a), .6)); }
.psf-period.psf-selected { background: rgba(var(--psf-border), max(var(--a), .6)); color: var(--psf-text); }
.psf-chart-box { position: relative; margin-top: 6px; height: 210px; }
.psf-readout { position: absolute; left: 7px; top: 2px; pointer-events: none; }
.psf-readout b { display: block; font-size: 21.333px; font-weight: 600; line-height: 28px; }
.psf-readout span { position: absolute; left: 1px; top: 32px; white-space: nowrap; font-size: 10.667px; line-height: 14px; color: var(--psf-muted); }
.psf-chart { display: block; width: 298px; height: 210px; }
.psf-chart text { fill: var(--psf-muted); font-size: 10.667px; font-family: inherit; }

/* The calendar */
.psf-cal-head { background: rgba(var(--psf-panel), var(--a)); display: flex; align-items: center; padding: 5px 6px 0 8px; gap: 4px; }
.psf-cal-title { flex: 1; text-align: center; font-size: 16px; }
.psf-cal-button { border: 0; background: none; color: var(--psf-text); font-size: 12px; line-height: 1; font-family: inherit; width: 36px; height: 27px; padding: 0; border-radius: 4px; cursor: pointer; }
.psf-cal-toggle { width: 58px; }
.psf-cal-head .psf-cal-button:last-child { margin-left: 1px; }
.psf-cal-button:hover { background: rgba(var(--psf-border), max(var(--a), .6)); }
.psf-cal-legend { background: rgba(var(--psf-panel), var(--a)); display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--psf-muted); height: 29px; padding: 0 8px; }
.psf-cal-legend .psf-square { width: 13px; height: 13px; border-radius: 3px; background: var(--psf-blue); }
.psf-cal-legend .psf-spacer { flex: 1; }
.psf-weekdays, .psf-days { display: grid; grid-template-columns: repeat(7, 40px); gap: 3px; padding: 0; }
.psf-weekdays { font-size: 12px; color: var(--psf-muted); text-align: center; height: 19px; line-height: 19px; margin-bottom: 1px; background: rgba(var(--psf-background), var(--a)); }
.psf-day { height: 38px; border-radius: 6px; background: rgba(21, 21, 21, var(--a)); position: relative; z-index: 1; font-size: 12px; text-align: center; padding-top: 4px; cursor: pointer; }
.psf-day:hover { background: rgba(34, 34, 34, max(var(--a), .5)); }
.psf-day.psf-blank { background: rgba(16, 16, 16, var(--a)); cursor: default; }
.psf-day.psf-empty { background: none; cursor: default; }
.psf-day.psf-future { cursor: default; }
.psf-day.psf-active { background: var(--psf-blue); }
.psf-day.psf-active:hover { background: #5470ec; }
.psf-day.psf-today-cell:not(.psf-active) { color: var(--psf-blue); font-weight: 600; }
.psf-day .psf-rating { position: absolute; left: 0; right: 0; bottom: 2px; font-size: 10.667px; color: var(--psf-gold); }
.psf-days { padding-bottom: 0; }
/* The year as the app draws it: three months to a row, each 82 tall, its name at the top and its weeks 22 below,
   squares 11 by 8 on a 13 by 9 pitch */
.psf-year { background: rgba(var(--psf-panel), var(--a)); display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 82px; padding: 0; }
.psf-mini { position: relative; text-align: center; }
.psf-mini b { position: absolute; left: 0; right: 0; top: 0; height: 18px; line-height: 18px; font-size: 13.333px; font-weight: 600; }
.psf-mini-grid { position: absolute; top: 24px; left: 50%; transform: translateX(-50%); display: grid; grid-template-columns: repeat(7, 11px); gap: 1px 2px; }
.psf-mini-grid i { width: 11px; height: 8px; border-radius: 2px; background: rgba(21, 21, 21, var(--a)); }
.psf-mini-grid i.psf-active { background: var(--psf-blue); }
.psf-mini-grid i.psf-none { background: none; }
.psf-tip {
  position: absolute; z-index: 20; pointer-events: none; background: #151515; border: 1px solid #2c2c2c; border-radius: 6px;
  padding: 6px 9px; font-size: 12px; white-space: nowrap; text-shadow: none; box-shadow: 0 4px 14px rgba(0, 0, 0, .4);
}

/* Friends */
.psf-friends .psf-strip { gap: 2px; }
.psf-copy { border: 0; background: none; color: var(--psf-muted); font-size: 12px; line-height: 1; font-family: inherit; padding: 4px; border-radius: 4px; cursor: pointer; margin-right: 2px; font-weight: 400; }
.psf-copy:hover { background: rgba(var(--psf-border), max(var(--a), .6)); }
.psf-copy b { color: var(--psf-text); font-weight: 600; }
.psf-copy em { color: var(--psf-green); font-style: normal; }
.psf-person-icon { width: 18px; height: 18px; position: relative; color: var(--psf-muted); }
.psf-count { position: absolute; top: -3px; right: -4px; min-width: 11px; height: 11px; border-radius: 6px; background: var(--psf-badge); color: #fff; font-size: 8px; line-height: 11px; text-align: center; font-weight: 600; text-shadow: none; }
.psf-code-field { display: flex; align-items: center; margin-left: 10px; flex: 1; min-width: 0; background: #151515; border-radius: 4px; height: 20px; }
.psf-code-field input { flex: 1; min-width: 0; background: none; border: 0; color: var(--psf-text); font: 12px inherit; font-family: inherit; padding: 0 6px; outline: none; }
.psf-code-field button { width: 20px; height: 20px; border: 0; background: none; color: var(--psf-green); cursor: pointer; border-radius: 4px; font-size: 13.333px; }
.psf-code-field button:hover { background: #222; }
.psf-friend-list { padding: 4px 8px 6px; max-height: 210px; overflow: auto; scrollbar-width: thin; scrollbar-color: #333 transparent; }
.psf-section { font-size: 12px; color: var(--psf-muted); margin: 6px 0 2px; }
/* A friend's two lines snug together, as the app: the name's line 18 tall, the details' 17, 4 between friends */
.psf-friend { display: grid; grid-template-columns: 27px 1fr auto; grid-template-rows: 18px 17px; align-items: center; padding: 2px 0; }
.psf-friend .psf-lv { width: 17px; height: 17px; border: 1.5px solid var(--psf-red); border-radius: 50%; font-size: 10px; display: grid; place-items: center; margin-top: 1px; }
.psf-friend .psf-name { font-weight: 600; font-size: 14.667px; line-height: 18px; display: flex; align-items: center; gap: 5px; min-width: 0; white-space: nowrap; }
.psf-friend .psf-name.psf-drawing { color: var(--psf-name-drawing); }
.psf-friend .psf-name.psf-online { color: var(--psf-name-online); }
.psf-friend .psf-name.psf-offline { color: var(--psf-name-offline); }
/* Away: the online blue, dimmed */
.psf-friend .psf-name.psf-away { color: var(--psf-name-away); }
.psf-friend .psf-sub.psf-away { color: var(--psf-away); }
.psf-friend .psf-sub.psf-program { color: var(--psf-green); }
.psf-friend .psf-sub.psf-online-today { color: var(--psf-online); }
.psf-friend .psf-zzz { font-size: 9px; color: var(--psf-muted); letter-spacing: 1px; }
.psf-friend .psf-zzz span:nth-child(2) { position: relative; top: -2px; }
.psf-friend .psf-zzz span:nth-child(3) { position: relative; top: -4px; }
.psf-friend .psf-right { text-align: right; font-size: 12px; color: var(--psf-muted); }
/* A long name gives way to the hours beside it, shortened with an ellipsis, as the app */
.psf-friend .psf-name-text { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.psf-friend .psf-right { margin-left: 8px; }
/* The details' line runs under the hours too, as the app */
.psf-friend .psf-sub { grid-column: 2 / 4; font-size: 12px; color: var(--psf-muted); }
.psf-friend .psf-sub-right { text-align: right; font-size: 12px; color: var(--psf-muted); }
.psf-friend.psf-new { animation: psf-flash 1.4s ease-out; }
@keyframes psf-flash { from { background: rgba(34, 197, 94, .25); } to { background: transparent; } }
.psf-request-row { display: flex; align-items: center; gap: 4px; font-size: 12px; margin: 2px 0 6px; }
.psf-request-row span { flex: 1; }
.psf-accept, .psf-decline { border: 0; border-radius: 4px; padding: 3px 8px; font: 12px inherit; font-family: inherit; cursor: pointer; }
.psf-accept { background: #1b4a2d; color: var(--psf-green); }
.psf-decline { background: #5a211d; color: var(--psf-red); }
.psf-accept:hover { background: #24603a; }
.psf-decline:hover { background: #742a25; }
.psf-offline-note { padding: 8px; font-size: 12px; color: var(--psf-muted); }
/* Menus: the status menu, a friend's menu, Settings */
.psf-menu { position: absolute; z-index: 30; min-width: 150px; background: #0c0c0c; border: 1px solid #222; padding: 1px; text-shadow: none; }
.psf-menu button { display: block; width: 100%; text-align: left; border: 0; background: none; color: var(--psf-text); font: 13px inherit; font-family: inherit; padding: 5px 11px; cursor: pointer; }
.psf-menu button small { display: block; font-size: 12px; color: var(--psf-muted); }
.psf-menu button:hover { background: #151515; }
.psf-menu button.psf-current { color: #8ba0f2; }
.psf-menu button.psf-danger { color: var(--psf-red); }
.psf-menu label { display: block; padding: 8px 11px; font-size: 13.333px; }
.psf-menu label input { width: 100%; margin-top: 6px; accent-color: var(--psf-blue); }

.psf-toast {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 40; background: #151515; border: 1px solid #2c2c2c;
  border-radius: 6px; padding: 8px 12px; font-size: 13.333px; color: var(--psf-text); text-shadow: none; pointer-events: none;
  /* One line when it fits, wrapping inside the scene when it does not */
  width: max-content; max-width: calc(100% - 24px); text-align: center; line-height: 1.4;
}

/* Settings, in the window as in the app */
.psf-credit { flex: 1; display: flex; align-items: center; }
.psf-version { font-size: 12px; color: var(--psf-muted); }
.psf-by { flex: 1; text-align: center; color: var(--psf-green); font-size: 14.667px; margin-right: 54px; }
/* The heading's space above it is the page's own, so the page meets the header with no see-through gap */
.psf-settings-page { padding: 6px 8px 8px; background: rgba(var(--psf-background), var(--a)); }
.psf-settings-page h3 { font-size: 26.667px; font-weight: 600; margin: 0 0 6px; color: var(--psf-text); }
.psf-settings-text { font-size: 13.333px; color: var(--psf-muted); margin: 0 0 10px; line-height: 1.35; }
.psf-check-row { display: flex; justify-content: flex-end; gap: 14px; margin: 6px 0; font-size: 12px; color: var(--psf-muted); }
.psf-check-label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.psf-check { width: 14px; height: 14px; border-radius: 4px; border: 2px solid #222; background: #0c0c0c; padding: 0; cursor: pointer; }
.psf-check:hover { background: #222; }
.psf-check.psf-checked { background: var(--psf-blue); border-color: var(--psf-blue); }
.psf-boxed { display: flex; align-items: center; gap: 8px; margin: 4px -8px; padding: 6px 8px; background: rgba(var(--psf-panel), var(--a)); border: 1px solid rgba(var(--psf-border), max(var(--a), .43)); }
.psf-boxed-text { flex: 1; min-width: 0; }
.psf-boxed-text b { display: block; font-size: 13.333px; font-weight: 600; }
.psf-boxed-text span { font-size: 12px; color: var(--psf-muted); }
.psf-boxed input[type=range] { width: 92px; accent-color: var(--psf-blue); }
.psf-orientation { display: flex; align-items: center; gap: 8px; }
.psf-shape { border: 2px solid #3a3a3a; background: none; border-radius: 3px; padding: 0; cursor: pointer; }
.psf-shape:hover { background: #222; }
.psf-shape.psf-chosen { background: var(--psf-text); border-color: var(--psf-text); }
.psf-tall { width: 16px; height: 24px; }
.psf-wide { width: 24px; height: 16px; }
.psf-shape.psf-disabled { opacity: .4; cursor: default; }
.psf-shape.psf-disabled:hover { background: none; }
.psf-backups { margin: 8px -8px 4px; padding: 6px 8px; background: rgba(var(--psf-panel), var(--a)); border: 1px solid rgba(var(--psf-border), max(var(--a), .43)); }
.psf-backups b { display: block; font-size: 13.333px; font-weight: 600; margin-bottom: 4px; }
.psf-backups span { display: block; font-size: 13.333px; color: var(--psf-muted); margin-bottom: 6px; }
.psf-backup-line { font-size: 12px; margin-bottom: 4px; }
.psf-green { color: var(--psf-green); }
.psf-backup-buttons { display: flex; justify-content: space-between; }
.psf-backup-buttons button, .psf-exit { border: 0; background: none; color: var(--psf-accent, #79d6bd); font: 12px inherit; font-family: inherit; padding: 3px 6px; border-radius: 4px; cursor: pointer; }
.psf-backup-buttons button:not(:first-child) { color: var(--psf-muted); }
.psf-backup-buttons button:hover, .psf-exit:hover { background: #222; }
.psf-exit { color: var(--psf-muted); margin-top: 4px; }

/* Landscape: the program panels and modules side by side in one wide strip */
.psf-window.psf-landscape { width: auto; }
.psf-landscape .psf-blocks { display: flex; align-items: stretch; gap: 2px; }
.psf-landscape .psf-blocks > * { width: 300px; flex: none; box-sizing: border-box; margin-top: 0; }
.psf-landscape .psf-friend-list { max-height: none; }

/* Resizing, and a window made shorter or narrower than what it shows */
.psf-grip { position: absolute; left: 0; right: 0; bottom: -3px; height: 6px; cursor: ns-resize; z-index: 3; }
.psf-landscape .psf-grip { left: auto; top: 28px; bottom: 0; right: -3px; width: 6px; height: auto; cursor: ew-resize; }
.psf-window.psf-clipped { overflow: hidden; }
.psf-settings-page:not([hidden]) ~ .psf-grip { display: none; }

/* The landscape column holding the header and icons over the first program panel */
.psf-anchor-column { display: flex; flex-direction: column; width: 300px; flex: none; }
.psf-anchor-column > .psf-block { flex: 1; }

/* Tips: blue arrows pointing at the main features, nudging towards them. The arrow's tip sits on the point given */
.psf-hotspot {
  position: absolute; z-index: 15; width: 22px; height: 22px; padding: 0; border: 0; background: none; cursor: help;
  color: var(--psf-blue); filter: drop-shadow(0 0 1.5px #eef3f1) drop-shadow(0 0 1px #eef3f1);
  --nudge-x: 0px; --nudge-y: 0px; animation: psf-nudge 1.2s ease-in-out infinite;
}
.psf-hotspot svg { display: block; width: 22px; height: 22px; }
.psf-point-right { margin: -11px 0 0 -22px; --nudge-x: 4px; }
.psf-point-left { margin: -11px 0 0 0; --nudge-x: -4px; }
.psf-point-left svg { transform: rotate(180deg); }
.psf-point-up { margin: 0 0 0 -11px; --nudge-y: -4px; }
.psf-point-up svg { transform: rotate(-90deg); }
.psf-point-down { margin: -22px 0 0 -11px; --nudge-y: 4px; }
.psf-point-down svg { transform: rotate(90deg); }
.psf-hotspot.psf-aside { visibility: hidden; }
@keyframes psf-nudge { 0%, 100% { translate: 0 0; } 50% { translate: var(--nudge-x) var(--nudge-y); } }
/* A tip as wide as its words, wrapping only past 230 pixels */
.psf-tip-wrap { white-space: normal; width: max-content; max-width: 230px; line-height: 1.4; }

/* Signed out, and the simulated sign-in */
.psf-account.psf-local { color: var(--psf-muted); font-size: 12px; }
.psf-muted { color: var(--psf-muted); }
.psf-center { text-align: center; margin-top: 8px; }
.psf-backup-buttons .psf-connect { color: var(--psf-green); }
.psf-sheet { position: absolute; inset: 0; z-index: 35; background: rgba(0, 0, 0, .55); display: grid; place-items: center; text-shadow: none; }
.psf-sheet-card { width: 300px; background: #0c0c0c; border: 1px solid #2c2c2c; border-radius: 8px; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.psf-sheet-card b { font-size: 16px; font-weight: 600; }
.psf-sheet-note { font-size: 12px; color: var(--psf-muted); line-height: 1.4; }
.psf-sheet-account { display: flex; align-items: center; gap: 10px; text-align: left; border: 1px solid #222; background: #121212; color: var(--psf-text); border-radius: 6px; padding: 8px 10px; font: 13px inherit; font-family: inherit; cursor: pointer; }
.psf-sheet-account:hover { background: #1a1a1a; }
.psf-sheet-account small { display: block; font-size: 12px; color: var(--psf-muted); }
.psf-avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--psf-blue); display: grid; place-items: center; font-weight: 600; flex: none; }
.psf-sheet-cancel { align-self: flex-end; border: 0; background: none; color: var(--psf-muted); font: 12px inherit; font-family: inherit; padding: 4px 8px; border-radius: 4px; cursor: pointer; }
.psf-sheet-cancel:hover { background: #222; }

/* A day's overview, with its rating */
/* The app's small windows: a title bar over the body, outlined as a Windows window is */
.psf-app-window { position: absolute; z-index: 32; background: #080808; outline: 1px solid #2b2b2b; text-shadow: none; box-shadow: 0 8px 30px rgba(0, 0, 0, .5); }
.psf-app-window .psf-titlebar { background: #080808; }
.psf-day-overview { width: 300px; padding-bottom: 12px; }
/* A friend's details: at least 220 px, each line 26 px apart from the window's left 16 px in, as the app's */
.psf-friend-details { min-width: 220px; }
.psf-details-body { display: flex; flex-direction: column; padding: 12px 32px 12px 16px; background: #0c0c0c; font-size: 13.333px; line-height: 18px; gap: 8px; white-space: nowrap; }
.psf-overview-rows { display: flex; justify-content: space-between; margin: 14px 16px 0; padding: 10px; background: #0c0c0c; border: 1px solid #222; font-size: 12px; }
.psf-overview-empty { margin: 14px 19px 0; font-size: 12px; color: var(--psf-muted); }
.psf-overview-ask { display: block; margin: 14px 19px 6px; font-size: 13.333px; font-weight: 600; }
.psf-stars { display: flex; justify-content: space-between; padding: 0 13px; }
.psf-star { border: 0; background: none; color: #5c5c5c; font-size: 20px; line-height: 1; padding: 2px 1px; cursor: pointer; font-family: "Segoe UI Symbol", "Segoe UI", sans-serif; }
.psf-star.psf-lit { color: var(--psf-gold); }

/* Phones and narrow screens: the painting fills the scene behind the window, and panels stay in it */
@media (max-width: 760px), (pointer: coarse) {
  .psf-canvas { left: 0; top: 0; right: 0; bottom: 0; height: auto; box-shadow: none; }
  .psf-stage { min-height: 640px; }
  .psf-window { left: 50%; transform: translateX(-50%); }
  /* The window is tugged rather than the page scrolled, but for a band down each side; see TUG_REACH in demo.js */
  /* Pinching still zooms the page, so a page zoomed in by mistake can be pinched back out on the window too */
  .psf-window, .psf-window .psf-strip { touch-action: pinch-zoom; }
  .psf-friend-list { touch-action: pan-y pinch-zoom; }
  /* The arrows and their tips a size up, for a finger and a small screen */
  .psf-hotspot, .psf-hotspot svg { width: 30px; height: 30px; }
  /* Stopping a little short of the point, so even at the end of its nudge the bigger arrow does not cover it */
  .psf-point-right { margin: -15px 0 0 -37px; --nudge-x: 5px; }
  .psf-point-left { margin: -15px 0 0 7px; --nudge-x: -5px; }
  .psf-point-up { margin: 7px 0 0 -15px; --nudge-y: -5px; }
  .psf-point-down { margin: -37px 0 0 -15px; --nudge-y: 5px; }
  .psf-tip { font-size: 14px; padding: 8px 11px; }
  .psf-tip-wrap { max-width: 260px; }
  /* At 16 pixels, an iPhone types into a field without zooming the page in */
  .psf-demo input[type="text"] { font-size: 16px; }
  /* A note shows at the foot of the screen, where it is seen, rather than the scene's, which may be out of view */
  .psf-toast { position: fixed; bottom: 24px; max-width: calc(100vw - 32px); font-size: 14px; }
  .psf-scroll-edge { display: block; position: absolute; top: 28px; bottom: 0; width: 22px; z-index: 5; touch-action: pan-y pinch-zoom; }
  .psf-scroll-edge-left { left: 0; }
  .psf-scroll-edge-right { right: 0; }
  .psf-strip { cursor: default; }
  .psf-grip { display: none; }
  .psf-hint { text-align: left; flex-basis: 100%; }
  .psf-slider { flex: 1 1 160px; min-width: 0; }
  .psf-slider input { flex: 1; width: auto; min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .psf-friend.psf-new, .psf-hotspot { animation: none; }
}

/* Stats: labels on the left, values in a column, a narrow note after */
/* Rows as the app's: 19 tall with a pixel under each, the first 21 for its bolder figure, a little more after the first
   figures and before the session summary; labels 8 in from the left, notes 8 in from the right */
.psf-stats { padding: 5px 8px 5px; font-size: 12px; display: block; }
.psf-stat { display: grid; grid-template-columns: 1fr auto 34px; align-items: center; column-gap: 8px; height: 19px; line-height: 19px; margin-bottom: 1px; }
.psf-stat-big { height: 21px; line-height: 21px; }
.psf-stat-big:has(+ .psf-stat .psf-stat-label:empty) { margin-bottom: 0; }
.psf-stat-gap { margin-bottom: 3px; }
.psf-stat-summary { margin-top: 4px; }
.psf-stat-summary .psf-stat-label { white-space: nowrap; }
.psf-stat-summary .psf-stat-note { display: none; }
.psf-stat-label { color: var(--psf-muted); white-space: nowrap; }
.psf-stat-value { text-align: right; display: inline-flex; align-items: center; justify-content: flex-end; gap: 4px; }
.psf-stat-value.psf-bold { font-weight: 600; font-size: 13.333px; }
.psf-stat-value.psf-muted { color: var(--psf-muted); }
.psf-stat-note { color: var(--psf-muted); font-size: 12px; text-align: right; }
.psf-stat-note.psf-up { color: var(--psf-green); }
.psf-stat-note.psf-gold { color: var(--psf-gold); }
.psf-award { display: block; flex: none; }
/* A nickname, typed over a friend's name */
.psf-nick-input { width: 130px; background: #151515; border: 1px solid #2c2c2c; border-radius: 4px; color: var(--psf-text); font: inherit; padding: 1px 5px; outline: none; }

/* The calendar's flame, moon and rating star, drawn as in the app */
.psf-streak-icon { display: block; flex: none; }
.psf-star-icon { display: inline-block; vertical-align: -1px; }
.psf-stat-note .psf-star-icon { vertical-align: -1px; }
/* A block being put in a new order in the window, outlined in blue as in the app */
.psf-block.psf-reordering { border-color: var(--psf-blue); }
/* While anything is dragged: the grabbing hand everywhere, and the tip arrows out of the way */
.psf-stage.psf-moving, .psf-stage.psf-moving * { cursor: grabbing !important; }
.psf-stage.psf-moving .psf-hotspot { visibility: hidden; }
/* The calendar paints each part once: its strip, its heading rows, the weekday band, then the panel between the days */
.psf-calendar { background: none; }
.psf-calendar > .psf-strip { background: rgba(var(--psf-background), var(--a)); }
.psf-days { position: relative; }
.psf-days::before { content: ""; position: absolute; left: 0; top: 0; width: 298px; bottom: 0; background: rgba(var(--psf-panel), var(--a)); -webkit-mask: var(--days-mask) top left / 298px auto no-repeat; mask: var(--days-mask) top left / 298px auto no-repeat; }
/* A friend's rows under the mouse, a faint box behind them, as the app */
.psf-friend { margin: 0 -4px; padding-left: 4px; padding-right: 4px; border-radius: 4px; }
.psf-friend:hover { background: rgba(16, 16, 16, var(--a)); }
.psf-tip { white-space: pre-line; }
.psf-member-since { margin: 8px 0 0; font-size: 12px; color: var(--psf-muted); }
