/* CLAUDE 10-09: the Editor tab's home on a phone and the Add media picker (phoneed.js; the owner, 10-09, CapCut 9 on an
   iPhone). Everything is inside the phone query (below 768 px): above it #phEd and the dialogs are never shown and the
   desktop Video Editor page is exactly as it was. Our own artwork and tokens: dark surfaces, one green accent. */

.ph-ed,
dialog.ph-full {
  display: none;
}

@media (max-width: 767.98px) {
  .ph-ed {
    display: block;
    padding: 4px 0 8px;
  }
  /* the desktop start cards, projects, tools, presets and shortcut list are the desktop page's; the templates gallery stays */
  .ed-home > :is(.ed-hero, .ed-section-head, #edProjects, #edTools, .ed-more, .db-note) {
    display: none;
  }
  body.ph-modal #home {
    overflow: hidden; /* iOS scrolls the page behind a modal otherwise */
  }
  .ph-ed :is(button):focus-visible,
  dialog.ph-full :is(button, input, summary):focus-visible,
  dialog.ph-full .pv-track:focus-visible {
    outline: 3px solid #6dff3d;
    outline-offset: 2px;
  }

  /* ----- hero ----- */
  .ph-hero {
    position: relative;
    isolation: isolate;
    min-height: 184px;
    aspect-ratio: 16 / 10;
    max-height: 260px;
    border: 1px solid #1f261f;
    border-radius: 22px;
    overflow: hidden;
    background: #0d110d;
  }
  .ph-slide {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    gap: 6px;
    width: 100%;
    margin: 0;
    padding: 18px 16px 18px 18px;
    border: 0;
    border-radius: 0;
    text-align: left;
    color: #fff;
    opacity: 0;
    visibility: hidden;
    transition:
      opacity 0.45s ease,
      visibility 0s linear 0.45s;
    -webkit-tap-highlight-color: transparent;
  }
  .ph-slide.on {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.45s ease;
  }
  .ph-slide.s-clip {
    background:
      radial-gradient(120% 90% at 85% 8%, rgba(83, 252, 24, 0.36), transparent 60%),
      linear-gradient(160deg, #11210f, #0b0d0b);
  }
  .ph-slide.s-captions {
    background:
      radial-gradient(110% 90% at 12% 0%, rgba(83, 252, 24, 0.3), transparent 55%),
      linear-gradient(200deg, #152215, #0b0d0b);
  }
  .ph-slide.s-voice {
    background:
      radial-gradient(100% 100% at 82% 100%, rgba(125, 255, 79, 0.3), transparent 60%),
      linear-gradient(135deg, #0f1c15, #0b0d0b);
  }
  .ph-art {
    position: absolute;
    top: 16px;
    right: 58px;
    width: 38%;
    max-width: 160px;
    pointer-events: none;
  }
  .ph-art svg {
    display: block;
    width: 100%;
    height: auto;
  }
  .ph-chip {
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(83, 252, 24, 0.16);
    color: #8dff66;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }
  .ph-slide b {
    max-width: 70%;
    font-size: 24px;
    font-weight: 750;
    line-height: 1.12;
    letter-spacing: -0.4px;
  }
  .ph-slide b span {
    color: #8dff66;
  }
  .ph-slide small {
    max-width: 58%; /* the slide dots sit at the right of this line */
    color: #cdd6cd;
    font-size: 13.5px;
    line-height: 1.35;
  }
  .ph-find {
    position: absolute;
    z-index: 2;
    top: 8px;
    right: 8px;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.42);
    color: #fff;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
  }
  .ph-i {
    width: 22px;
    height: 22px;
  }
  .ph-i.big {
    width: 32px;
    height: 32px;
    color: #8dff66;
  }
  .ph-dots {
    position: absolute;
    z-index: 2;
    right: 4px;
    bottom: 2px;
    display: flex;
  }
  #phHero .ph-dots button {
    display: grid;
    place-items: center;
    width: 36px;
    min-width: 44px;
    padding: 0;
    border: 0;
    background: transparent;
  }
  .ph-dots i {
    width: 8px;
    height: 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.4);
    transition:
      width 0.25s ease,
      background-color 0.25s ease;
  }
  .ph-dots [aria-current] i {
    width: 22px;
    background: #53fc18;
  }

  /* ----- New video / Edit photo ----- */
  .ph-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 14px;
  }
  /* #phEd / #phPick in front of what sets a size over 44 px: phone.css's 44 px rule for buttons has an id in it */
  #phEd button.ph-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    gap: 2px;
    min-height: 140px;
    padding: 14px;
    border: 1px solid #262b26;
    border-radius: 20px;
    background: #131713;
    color: #f3f3f3;
    text-align: left;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.12s ease;
  }
  .ph-card:active,
  .ph-tool:active,
  .ph-proj:active .ph-th {
    transform: scale(0.97);
  }
  .ph-card b {
    font-size: 17px;
    font-weight: 700;
  }
  .ph-card small {
    min-height: 2.6em; /* two lines in both cards, so the two titles sit on one line */
    color: #a3ada6;
    font-size: 12.5px;
    line-height: 1.3;
  }
  .ph-card-ico {
    position: absolute;
    top: 12px;
    left: 14px;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.07);
    color: #8dff66;
  }
  .ph-card-ico svg {
    width: 24px;
    height: 24px;
  }
  #phEd button.ph-new {
    border-color: transparent;
    background: linear-gradient(160deg, #6dff30, #3fdd0e);
    color: #061000;
  }
  .ph-new small {
    color: rgba(6, 16, 0, 0.74);
  }
  .ph-new .ph-card-ico {
    background: rgba(6, 16, 0, 0.14);
    color: #061000;
  }

  /* ----- headings, recent projects, tools ----- */
  .ph-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 24px 2px 10px;
  }
  .ph-head h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 650;
    letter-spacing: -0.2px;
  }
  .ph-head:focus,
  #edTemplates:focus {
    outline: none;
  }
  #edTemplates {
    margin-top: 24px;
  }
  .ph-recent {
    display: flex;
    gap: 10px;
    margin: 0 -16px;
    padding: 0 16px 4px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scroll-padding: 0 16px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .ph-recent::-webkit-scrollbar {
    display: none;
  }
  .ph-proj {
    flex: none;
    display: block;
    width: 112px;
    padding: 0;
    border: 0;
    background: none;
    color: #f3f3f3;
    text-align: left;
    scroll-snap-align: start;
    -webkit-tap-highlight-color: transparent;
  }
  .ph-th {
    position: relative;
    display: block;
    width: 112px;
    height: 112px;
    border: 1px solid #262b26;
    border-radius: 16px;
    overflow: hidden;
    background: #151a15;
    transition: transform 0.12s ease;
  }
  .ph-th img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  .ph-th i {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: rgba(83, 252, 24, 0.5);
    font-size: 30px;
    font-style: normal;
    font-weight: 700;
  }
  .ph-th img + i {
    display: none;
  }
  .ph-proj b {
    display: block;
    margin-top: 6px;
    overflow: hidden;
    font-size: 13px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .ph-proj small {
    display: block;
    color: #a3ada6;
    font-size: 12px;
  }
  .ph-all .ph-th {
    display: grid;
    place-items: center;
    border-style: dashed;
    border-color: #364336;
    color: #8dff66;
  }
  .ph-all .ph-th svg {
    width: 30px;
    height: 30px;
  }
  .ph-empty {
    width: 100%;
    margin: 0;
    padding: 18px 16px;
    border: 1px dashed #364336;
    border-radius: 16px;
    color: #a3ada6;
    font-size: 14px;
    line-height: 1.45;
  }
  .ph-tools {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
  #phEd button.ph-tool {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 96px;
    padding: 12px 6px;
    border: 1px solid #232823;
    border-radius: 18px;
    background: #131713;
    color: #e8efe8;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    -webkit-tap-highlight-color: transparent;
    transition:
      transform 0.12s ease,
      background-color 0.12s ease;
  }
  #phEd .ph-tool:active {
    background: #1a201a;
  }
  .ph-ti {
    width: 28px;
    height: 28px;
    color: #7dff4f;
  }

  /* ----- full-screen dialogs ----- */
  dialog.ph-full {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    overflow: hidden;
    background: #0b0d0b;
    color: #f3f3f3;
  }
  dialog.ph-full[open] {
    display: flex;
    flex-direction: column;
    animation: ph-up 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  }
  dialog.ph-full.closing {
    animation: ph-down 0.22s ease-in forwards;
  }
  dialog.ph-full::backdrop {
    background: #000;
  }
  @keyframes ph-up {
    from {
      transform: translateY(100%);
    }
  }
  @keyframes ph-down {
    to {
      transform: translateY(100%);
    }
  }
  dialog.ph-full [hidden] {
    display: none !important;
  }
  .pk-main {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-height: 0;
  }
  .pk-top {
    display: grid;
    grid-template-columns: 44px 1fr 44px;
    align-items: center;
    gap: 4px;
    min-height: 56px;
    padding: max(6px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) 4px
      max(8px, env(safe-area-inset-left));
  }
  .pk-top h2 {
    margin: 0;
    overflow: hidden;
    font-size: 17px;
    font-weight: 650;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .pk-x {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #fff;
  }
  .pk-x:active {
    background: rgba(255, 255, 255, 0.1);
  }
  .pk-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .pk-why {
    margin: 0 16px 6px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(83, 252, 24, 0.1);
    color: #bff5a6;
    font-size: 13.5px;
    line-height: 1.4;
  }
  .pk-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    padding: 4px 12px 8px;
  }
  #phPick .pk-tabs button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 56px;
    padding: 6px 4px;
    border: 1px solid transparent;
    border-radius: 14px;
    background: #131713;
    color: #b8c2b8;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.15;
  }
  .pk-tabs button .ph-i {
    width: 20px;
    height: 20px;
  }
  .pk-tabs button[aria-selected='true'] {
    border-color: rgba(83, 252, 24, 0.45);
    background: rgba(83, 252, 24, 0.13);
    color: #8dff66;
  }
  /* the Library tab carries the Premium pill on the free plan (stock videos are a Premium feature: pro.js, editor.css) */
  .pro-free #phPick .pk-tabs button[data-pro] {
    position: relative;
  }
  .pro-free #phPick .pk-tabs button[data-pro]::after {
    position: absolute;
    top: -6px;
    right: 6px;
    margin: 0;
  }
  .pk-subs {
    display: flex;
    gap: 4px;
    padding: 0 12px;
    border-bottom: 1px solid #1d231d;
  }
  .pk-subs button {
    padding: 0 14px;
    border: 0;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    background: transparent;
    color: #a3ada6;
    font-size: 14.5px;
    font-weight: 650;
  }
  .pk-subs button[aria-selected='true'] {
    border-bottom-color: #53fc18;
    color: #fff;
  }
  .pk-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 8px 0 16px;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  .pk-find {
    padding: 4px 12px 8px;
  }
  .pk-find input,
  .pk-search input {
    box-sizing: border-box;
    width: 100%;
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid #262b26;
    border-radius: 22px;
    background: #131713;
    color: #f3f3f3;
  }
  .pk-search {
    padding: 4px 12px 6px;
  }
  .pj-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px 10px;
    padding: 4px 16px 24px;
  }
  .pj-grid .ph-proj,
  .pj-grid .ph-th {
    width: 100%;
  }
  .pj-grid .ph-th {
    height: auto;
    aspect-ratio: 1;
  }
  .pj-grid .ph-empty {
    grid-column: 1 / -1;
  }

  /* the phone pane */
  .pk-big {
    display: flex;
    align-items: center;
    gap: 14px;
    width: calc(100% - 24px);
    margin: 8px 12px 12px;
    padding: 18px 16px;
    border: 1.5px dashed #3a4d3a;
    border-radius: 20px;
    background: #111611;
    color: #f3f3f3;
    text-align: left;
  }
  .pk-big span {
    display: grid;
    gap: 3px;
  }
  .pk-big b {
    font-size: 17px;
    font-weight: 700;
  }
  .pk-big small {
    color: #a3ada6;
    font-size: 13px;
    line-height: 1.35;
  }
  .pk-note {
    margin: 0 16px 14px;
    color: #a3ada6;
    font-size: 13px;
    line-height: 1.5;
  }

  /* the grids and their tiles */
  .pk-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
  }
  .pk-tile {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: #151915;
    content-visibility: auto;
    contain-intrinsic-size: auto 120px;
  }
  .pk-open {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    -webkit-tap-highlight-color: transparent;
  }
  .pk-open img,
  .pk-open video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
  }
  .pk-open::after {
    content: '';
    position: absolute;
    inset: auto 0 0;
    height: 38px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.6));
    pointer-events: none;
  }
  .pk-dur {
    position: absolute;
    z-index: 1;
    right: 6px;
    bottom: 5px;
    color: #fff;
    font-size: 11.5px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 1px 3px #000;
  }
  .pk-tile.picked .pk-open::before {
    content: '';
    position: absolute;
    z-index: 1;
    inset: 0;
    box-shadow: inset 0 0 0 3px #53fc18;
    pointer-events: none;
  }
  .pk-tile.trimmed::after {
    content: 'Trimmed';
    position: absolute;
    z-index: 1;
    left: 6px;
    bottom: 5px;
    padding: 2px 6px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.65);
    color: #8dff66;
    font-size: 10.5px;
    font-weight: 700;
    pointer-events: none;
  }
  .pk-sel {
    position: absolute;
    z-index: 2;
    top: 0;
    right: 0;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    -webkit-tap-highlight-color: transparent;
  }
  .pk-sel i {
    position: absolute;
    top: 8px;
    right: 8px;
    box-sizing: border-box;
    width: 24px;
    height: 24px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.35);
    color: #061000;
    font-size: 13px;
    font-style: normal;
    font-weight: 800;
    line-height: 20px;
    text-align: center;
    transition:
      background-color 0.12s ease,
      transform 0.12s ease;
  }
  .pk-tile.picked .pk-sel i,
  .pk-sel.picked i {
    border-color: #53fc18;
    background: #53fc18;
  }
  .pk-sel:active i {
    transform: scale(0.9);
  }
  .pk-tile.picked .pk-sel i:empty::before,
  .pk-sel.picked i:empty::before {
    content: '✓';
  }
  .pk-skel {
    background: #171d17;
    animation: pk-pulse 1.4s ease-in-out infinite; /* CLAUDE 10-11: opacity (composited), not a repainted gradient */
  }
  @keyframes pk-pulse {
    50% {
      opacity: 0.55;
    }
  }
  .pk-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 44px 28px;
    color: #a3ada6;
    font-size: 14px;
    line-height: 1.45;
    text-align: center;
  }
  .pk-empty b {
    color: #f3f3f3;
    font-size: 16px;
  }
  .pk-empty p {
    margin: 0;
  }
  .pk-empty button,
  .pk-more {
    padding: 0 22px;
    border: 1px solid #364336;
    border-radius: 22px;
    background: #151a15;
    color: #8dff66;
    font-weight: 650;
  }
  .pk-more {
    display: block;
    width: calc(100% - 24px);
    margin: 14px 12px 4px;
  }
  .pk-chips {
    display: flex;
    gap: 8px;
    padding: 2px 12px 10px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .pk-chips::-webkit-scrollbar {
    display: none;
  }
  .pk-chip {
    flex: none;
    padding: 0 16px;
    border: 1px solid #262b26;
    border-radius: 22px;
    background: #131713;
    color: #cdd6cd;
    font-size: 13.5px;
    font-weight: 600;
  }
  .pk-chip[aria-pressed='true'] {
    border-color: rgba(83, 252, 24, 0.5);
    background: rgba(83, 252, 24, 0.14);
    color: #8dff66;
  }
  .pk-credit {
    margin: 14px 16px 0;
    color: #8c968c;
    font-size: 12px;
    line-height: 1.4;
  }

  .pk-msg {
    margin: 0;
    padding: 10px 16px;
    background: #17201a;
    color: #cdd6cd;
    font-size: 13.5px;
    line-height: 1.4;
  }
  .pk-msg.bad {
    background: #2a1717;
    color: #ffb4b4;
  }

  /* the footer: what is picked and the Add button */
  .pk-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px max(16px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom))
      max(16px, env(safe-area-inset-left));
    border-top: 1px solid #1d231d;
    background: #0e110e;
  }
  .pk-sum {
    min-width: 0;
    color: #a3ada6;
    font-size: 13.5px;
    line-height: 1.3;
  }
  .pk-sum.bad {
    color: #ff9a9a;
  }
  dialog.ph-full .pk-add {
    flex: none;
    height: 48px;
    padding: 0 30px;
    border: 0;
    border-radius: 24px;
    background: #232823;
    color: #7c867c;
    font-size: 16px;
    font-weight: 750;
    transition:
      background-color 0.18s ease,
      color 0.18s ease,
      transform 0.12s ease;
  }
  dialog.ph-full .pk-add.on {
    background: #53fc18;
    color: #061000;
  }
  dialog.ph-full .pk-add.on:active {
    transform: scale(0.96);
  }
  dialog.ph-full .pk-add.done {
    background: transparent;
    box-shadow: inset 0 0 0 2px #53fc18;
    color: #8dff66;
  }

  /* ----- the layers over the picker: preview and progress ----- */
  .pk-prev,
  .pk-work {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    background: #0b0d0b;
  }
  .pk-prev {
    animation: ph-fade 0.2s ease-out;
  }
  @keyframes ph-fade {
    from {
      opacity: 0;
    }
  }
  .pv-stage {
    position: relative;
    display: grid;
    flex: 1;
    min-height: 0;
    place-items: center;
    background: #000;
  }
  .pv-stage video,
  .pv-stage > img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
  }
  .pv-tap {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 0;
    background: transparent;
  }
  .pv-nopv {
    position: absolute;
    right: 16px;
    bottom: 12px;
    left: 16px;
    margin: 0;
    color: #cdd6cd;
    font-size: 13px;
    text-align: center;
  }
  .pv-sel {
    position: relative;
    justify-self: end;
  }
  .pv-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    /* room right of the bar for the end handle's 44 px grab area */
    padding: 12px max(48px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left));
  }
  .pv-play {
    flex: none;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #1b211b;
    color: #fff;
  }
  .pv-track {
    position: relative;
    flex: 1;
    height: 52px;
    margin: 0 0 0 6px;
    border-radius: 10px;
    background: #1a1f1a;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
  }
  .pv-clip {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border-radius: 10px;
  }
  .pv-strip {
    position: absolute;
    inset: 0;
    background: center / 100% 100% no-repeat;
  }
  .pv-kept {
    position: absolute;
    top: 0;
    bottom: 0;
    box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.62);
  }
  .pv-track.trimming .pv-kept {
    border-block: 3px solid #53fc18;
  }
  .pv-h {
    position: absolute;
    top: -4px;
    bottom: -4px;
    display: none;
    width: 44px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }
  .pv-track.trimming .pv-h {
    display: block;
  }
  .pv-ha {
    transform: translateX(-100%);
  }
  dialog.ph-full .pv-h:focus-visible {
    outline: none; /* the whole 44 px box is the grab area: the ring goes on the visible bar instead */
  }
  .pv-h:focus-visible::before {
    box-shadow: 0 0 0 3px #fff;
  }
  .pv-h::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 16px;
    background: #53fc18;
  }
  .pv-ha::before {
    right: 0;
    border-radius: 8px 0 0 8px;
  }
  .pv-hb::before {
    left: 0;
    border-radius: 0 8px 8px 0;
  }
  .pv-h::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 3px;
    height: 18px;
    margin-top: -9px;
    border-radius: 2px;
    background: #061000;
  }
  .pv-ha::after {
    right: 6.5px;
  }
  .pv-hb::after {
    left: 6.5px;
  }
  .pv-head {
    position: absolute;
    top: -6px;
    bottom: -6px;
    width: 3px;
    margin-left: -1.5px;
    border-radius: 2px;
    background: #fff;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5);
    pointer-events: none;
  }
  .pv-meta {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 8px max(18px, env(safe-area-inset-right)) 0 max(18px, env(safe-area-inset-left));
    color: #a3ada6;
    font-size: 12.5px;
  }
  .pv-meta p {
    margin: 0;
  }
  .pv-meta .pv-time {
    flex: none;
    color: #a3ada6;
    font-family: inherit;
    font-size: 12.5px;
    font-variant-numeric: tabular-nums;
  }
  .pv-photo {
    padding: 14px 20px 0;
  }
  .pv-photo label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
  }
  .pv-photo input {
    width: 100%;
    accent-color: #53fc18;
  }
  .pv-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px max(16px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom))
      max(16px, env(safe-area-inset-left));
  }
  .pv-foot .pk-add {
    margin-left: auto;
  }
  .pv-trim {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 48px;
    padding: 0 20px;
    border: 1px solid #364336;
    border-radius: 24px;
    background: #151a15;
    color: #f3f3f3;
    font-size: 15px;
    font-weight: 650;
  }
  .pv-trim[aria-pressed='true'] {
    border-color: #53fc18;
    background: rgba(83, 252, 24, 0.14);
    color: #8dff66;
  }
  .pk-work {
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(11, 13, 11, 0.96);
  }
  .pk-work-card {
    display: grid;
    gap: 12px;
    justify-items: center;
    width: 100%;
    max-width: 340px;
    text-align: center;
  }
  .pk-work-card b {
    font-size: 18px;
  }
  .pk-work-card small {
    min-height: 2.6em;
    color: #a3ada6;
    font-size: 14px;
    line-height: 1.4;
  }
  .pk-work.bad small {
    color: #ffb4b4;
  }
  .pk-work progress {
    width: 100%;
    height: 8px;
    border: 0;
    border-radius: 4px;
    accent-color: #53fc18;
  }
  .pk-spin {
    width: 34px;
    height: 34px;
    border: 3px solid #2a342a;
    border-top-color: #53fc18;
    border-radius: 50%;
    animation: pk-turn 0.9s linear infinite;
  }
  @keyframes pk-turn {
    to {
      transform: rotate(360deg);
    }
  }
  .pk-work-btns button {
    padding: 0 22px;
    border: 1px solid #364336;
    border-radius: 24px;
    background: #151a15;
    color: #f3f3f3;
    font-weight: 650;
  }
  .pk-work-btns .primary {
    border-color: transparent;
    background: #53fc18;
    color: #061000;
  }

  /* style.css gives every button a grey :hover, which on a phone sticks after a tap and wipes a gradient or a photo's
     overlay: these keep their own look when hovered */
  :is(#phEd, dialog.ph-full)
    :is(.ph-proj, .ph-dots button, .pk-x, .pk-subs button, .pk-open, .pk-sel, .pv-tap, .pv-h):hover {
    background: transparent;
  }
  #phEd .ph-slide.s-clip:hover {
    background:
      radial-gradient(120% 90% at 85% 8%, rgba(83, 252, 24, 0.36), transparent 60%),
      linear-gradient(160deg, #11210f, #0b0d0b);
  }
  #phEd .ph-slide.s-captions:hover {
    background:
      radial-gradient(110% 90% at 12% 0%, rgba(83, 252, 24, 0.3), transparent 55%),
      linear-gradient(200deg, #152215, #0b0d0b);
  }
  #phEd .ph-slide.s-voice:hover {
    background:
      radial-gradient(100% 100% at 82% 100%, rgba(125, 255, 79, 0.3), transparent 60%),
      linear-gradient(135deg, #0f1c15, #0b0d0b);
  }
  #phEd .ph-find:hover {
    background: rgba(0, 0, 0, 0.42);
  }
  #phEd .ph-card:hover,
  #phEd .ph-tool:hover,
  #phPick .pk-tabs button:hover,
  .pk-chip:hover {
    background: #131713;
  }
  #phEd .ph-new:hover {
    background: linear-gradient(160deg, #6dff30, #3fdd0e);
  }
  #phPick .pk-tabs button[aria-selected='true']:hover {
    background: rgba(83, 252, 24, 0.13);
  }
  .pk-chip[aria-pressed='true']:hover,
  .pv-trim[aria-pressed='true']:hover {
    background: rgba(83, 252, 24, 0.14);
  }
  .pk-big:hover {
    background: #111611;
  }
  .pk-empty button:hover,
  .pk-more:hover,
  .pv-trim:hover,
  .pk-work-btns button:hover {
    background: #151a15;
  }
  .pv-play:hover {
    background: #1b211b;
  }
  dialog.ph-full .pk-add:hover {
    background: #232823;
  }
  dialog.ph-full .pk-add.on:hover,
  .pk-work-btns .primary:hover {
    background: #53fc18;
  }
  dialog.ph-full .pk-add.done:hover {
    background: transparent;
  }

  /* the recorder */
  .rc-body {
    padding: 4px 16px 16px;
  }
  .rc-done {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px max(12px, env(safe-area-inset-bottom));
    border-top: 1px solid #1d231d;
    background: #0e110e;
    color: #cdd6cd;
    font-size: 14px;
  }
}

@media (max-width: 767.98px) and (prefers-reduced-motion: reduce) {
  dialog.ph-full[open],
  dialog.ph-full.closing,
  .pk-prev,
  .pk-skel,
  .pk-spin {
    animation: none;
  }
  .ph-slide,
  .ph-slide.on,
  .ph-card,
  .ph-tool,
  .ph-th,
  .ph-dots i,
  .pk-sel i,
  dialog.ph-full .pk-add {
    transition: none;
  }
  .pk-spin {
    border-top-color: #53fc18;
    border-right-color: #53fc18;
  }
}
