:root {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #1c2d4c;
  background: #315bb7;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --ink: #1c2d4c;
  --muted: #7c879d;
  --blue: #315bb7;
  --purple: #7c67ec;
  --button-blue: #3e73c7;
  --button-blue-hover: #2f60ad;
  --pale-blue: #e8f1ff;
  --pale-blue-hover: #dceaff;
  --line: #e8ebf2;
  --paper: #fff;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(ellipse at 10% 2%, #6886dc 0, transparent 35%), radial-gradient(ellipse at 95% 75%, #5249ac 0, transparent 36%), #315bb7;
}
.app-shell { width: min(100% - 48px, 1080px); margin: 0 auto; padding: 34px 0 60px; }
header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 25px; }
h1 { margin: 0; color: #fff; font-size: clamp(32px, 5vw, 42px); font-weight: 750; letter-spacing: -1.5px; line-height: 1; }
.new-plan-button, .primary-button, .start-button, .add-button {
  border: 0; border-radius: 11px; background: var(--button-blue); color: #fff;
  font: 600 13px system-ui, sans-serif; cursor: pointer; transition: .18s ease;
}
.new-plan-button { height: 43px; padding: 0 16px; background: #5f87d58a; border: 1px solid #aac6ff70; backdrop-filter: blur(10px); }
.new-plan-button span { margin-right: 5px; font-size: 18px; vertical-align: -1px; }
.new-plan-button:hover { background: #6f98e8a8; }
.layout { display: grid; grid-template-columns: 245px minmax(0, 1fr); gap: 17px; align-items: start; }
.plan-list { display: grid; gap: 8px; padding: 10px; border: 1px solid #ffffff36; border-radius: 19px; background: #ffffff17; backdrop-filter: blur(14px); }
.plan-choice {
  position: relative; display: grid; grid-template-columns: 39px minmax(0, 1fr); align-items: center; gap: 10px;
  width: 100%; padding: 11px; text-align: left; color: #fff; border: 1px solid transparent;
  border-radius: 13px; background: transparent; cursor: pointer; font: inherit; transition: .18s ease;
}
.icon-mark { display: grid; place-items: center; font-size: 19px; font-weight: 700; line-height: 1; }
.icon-mark[data-icon="weights"] { font-size: 12px; letter-spacing: -3px; }
.menu-icon { grid-column: 1; grid-row: 1 / span 2; display: grid; place-items: center; width: 37px; height: 37px; padding: 8px; border-radius: 12px; background: #ffffff20; color: #fff; }
.plan-choice strong { grid-column: 2; align-self: end; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 650; }
.plan-choice span { grid-column: 2; align-self: start; margin-top: -2px; color: #d7e0fb; font-size: 10px; }
.plan-choice:hover { background: #ffffff18; }
.plan-choice.selected { color: var(--ink); border-color: #ffffff80; background: #fff; box-shadow: 0 7px 20px #172c6740; }
.plan-choice.selected span { color: var(--muted); }
.plan-choice.selected .menu-icon { background: linear-gradient(145deg, #c4baff, #7f75eb 60%, #5184d9); color: #fff; }
.empty-plans { padding: 5px 8px; color: #e3e9ff; font-size: 12px; }
.editor { min-width: 0; overflow: hidden; padding: 26px; border: 1px solid #ffffffaa; border-radius: 23px; background: #fbfcff; box-shadow: 0 22px 60px #1c32664c; }
.title-row { display: flex; align-items: center; gap: 12px; padding-bottom: 10px; }
.header-icon { flex: none; width: 37px; height: 37px; padding: 8px; border-radius: 12px; background: linear-gradient(145deg, #c4baff, #7f75eb 60%, #5184d9); color: #fff; }
.icon-picker { display: flex; align-items: center; gap: 6px; margin: 0 0 15px 49px; }
.icon-picker-label { margin-right: 4px; color: #8994aa; font-size: 10px; }
.icon-choice { display: grid; place-items: center; width: 29px; height: 29px; padding: 6px; border: 1px solid transparent; border-radius: 8px; background: #f1f2f8; color: #7d87a0; cursor: pointer; }
.icon-choice .icon-mark { width: 100%; height: 100%; font-size: 16px; }
.icon-choice .icon-mark[data-icon="weights"] { font-size: 11px; letter-spacing: -3px; }
.icon-choice:hover { border-color: #c8c1fb; background: #eeecff; color: #7064cf; }
.icon-choice.active { border-color: #a89ff1; background: #eeecff; color: #685cc7; box-shadow: 0 0 0 2px #eeecff; }
.plan-title { min-width: 0; flex: 1; padding: 0; border: 0; outline: none; background: transparent; color: var(--ink); font: 720 23px system-ui, sans-serif; letter-spacing: -.65px; }
.plan-title:focus { box-shadow: 0 1px 0 var(--purple); }
.delete-button { padding: 7px; border: 0; background: transparent; color: #929bb0; font: 500 11px system-ui, sans-serif; cursor: pointer; }
.delete-button:hover, .remove-button:hover { color: #b34f69; }
.plan-art { position: relative; display: flex; align-items: center; justify-content: space-between; min-height: 136px; overflow: hidden; padding: 19px 23px; border-radius: 17px; isolation: isolate; }
.plan-art.art-timed { color: #fff; background: linear-gradient(112deg, #8778f2 0%, #786be6 45%, #514fae 100%); }
.plan-art.art-reps { color: #17375b; background: linear-gradient(112deg, #c8ebf0 0%, #a9dbeb 47%, #a99ced 100%); }
.cover-facts { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 13px; }
.cover-count { display: flex; align-items: baseline; gap: 8px; }
.cover-count strong { font-size: 42px; font-weight: 750; letter-spacing: -2px; line-height: 1; }
.cover-count span { font-size: 11px; font-weight: 600; opacity: .82; }
.cover-mode { padding: 7px 10px; border: 1px solid #ffffff50; border-radius: 8px; background: #ffffff22; font-size: 10px; font-weight: 650; backdrop-filter: blur(5px); }
.art-reps .cover-mode { border-color: #ffffff75; background: #ffffff58; }
.abstract-art { position: absolute; z-index: 1; inset: 0; overflow: hidden; }
.abstract-art::before { content: ""; position: absolute; width: 180px; height: 180px; right: 17%; top: -96px; border: 1px solid #ffffff42; border-radius: 50%; box-shadow: 0 0 0 15px #ffffff0c, 0 0 0 32px #ffffff0c, 0 0 0 49px #ffffff0b; }
.art-orb { position: absolute; display: block; border-radius: 50%; }
.orb-one { width: 114px; height: 114px; right: 16%; top: 27px; background: linear-gradient(140deg, #f2d6ff, #c29cf7 47%, #5f73df); box-shadow: inset -12px -12px 24px #4648b738, inset 8px 8px 18px #fff6; }
.orb-two { width: 55px; height: 55px; right: 9%; top: 10px; background: linear-gradient(145deg, #b2eeed, #76bce7 60%, #9a91f2); box-shadow: inset -7px -7px 14px #4f59bb30, 0 8px 20px #303e9b2b; }
.art-loop { position: absolute; width: 125px; height: 53px; right: 8%; bottom: 3px; transform: rotate(-28deg); border: 10px solid #ffdbeb9c; border-radius: 50%; filter: blur(.4px); }
.art-reps .orb-one { background: linear-gradient(145deg, #f3c7df, #ef9fb9 50%, #796fe3); }
.art-reps .orb-two { right: 11%; background: linear-gradient(145deg, #fff4c0, #f6b987 65%, #a978dd); }
.art-reps .art-loop { border-color: #ecfff8a8; }
.settings { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding: 19px 0 17px; border-bottom: 1px solid var(--line); }
.check-setting { display: flex; align-items: center; gap: 7px; cursor: pointer; white-space: nowrap; font-size: 12px; font-weight: 600; }
.check-setting input { width: 16px; height: 16px; margin: 0; accent-color: var(--purple); }
.number-setting { display: flex; align-items: center; gap: 6px; color: #65718a; font-size: 11px; white-space: nowrap; }
.number-setting input { width: 64px; height: 32px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); text-align: center; font: 13px system-ui, sans-serif; }
.unit { color: #929bb0; }
.list-heading { display: flex; align-items: center; gap: 8px; margin: 19px 0 10px; }
.list-heading h2 { margin: 0; font-size: 15px; letter-spacing: -.2px; }
.count-pill { padding: 3px 8px; border-radius: 20px; background: #eeecff; color: #7064cf; font-size: 10px; font-weight: 700; }
.exercise-list { display: grid; gap: 7px; }
.exercise-item { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 7px 9px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.exercise-number { display: grid; flex: none; place-items: center; width: 27px; height: 27px; border-radius: 8px; background: var(--pale-blue); color: #3568b5; font-size: 10px; font-weight: 700; }
.exercise-item input, .add-form input { min-width: 0; height: 36px; padding: 0 8px; border: 1px solid transparent; border-radius: 7px; outline: none; background: transparent; color: var(--ink); font: 13px system-ui, sans-serif; }
.exercise-name { flex: 1; }
.exercise-target { width: 140px; }
.exercise-item input::placeholder, .add-form input::placeholder { color: #a0aabd; }
.remove-button { flex: none; width: 27px; height: 27px; border: 0; border-radius: 7px; background: transparent; color: #909bb0; font-size: 20px; line-height: 1; cursor: pointer; }
.add-form { display: flex; gap: 8px; margin-top: 10px; }
.add-form input { flex: 1; border-color: var(--line); background: #fff; }
.add-button { flex: none; padding: 0 13px; background: var(--pale-blue); color: #315f9f; }
.add-button:hover { background: var(--pale-blue-hover); }
.start-button { width: 100%; height: 46px; margin-top: 19px; background: var(--button-blue); text-align: center; }
.start-button:hover, .primary-button:hover { background: var(--button-blue-hover); transform: translateY(-1px); }
.start-button:disabled { opacity: .45; cursor: not-allowed; }
.small-dialog, .session-dialog { width: min(100% - 32px, 390px); padding: 24px; border: 0; border-radius: 19px; background: #fff; color: var(--ink); box-shadow: 0 24px 90px #14244866; }
.small-dialog::backdrop, .session-dialog::backdrop { background: #18274699; backdrop-filter: blur(4px); }
.small-dialog form { position: relative; }
.small-dialog h2 { margin: 0 0 18px; font-size: 21px; letter-spacing: -.5px; }
.dialog-close { padding: 5px; border: 0; background: transparent; color: #7c879d; font-size: 24px; line-height: 1; cursor: pointer; }
.small-dialog .dialog-close { position: absolute; top: -8px; right: -7px; }
.field { display: grid; gap: 6px; color: #65718a; font-size: 11px; }
.field input { height: 42px; padding: 0 11px; border: 1px solid var(--line); border-radius: 9px; font: 14px system-ui, sans-serif; }
.field input:focus, .number-setting input:focus, .exercise-item input:focus, .add-form input:focus { outline: 2px solid #8072e638; border-color: #9185e0; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.quiet-button, .primary-button { height: 40px; padding: 0 14px; border-radius: 9px; font: 600 12px system-ui, sans-serif; cursor: pointer; }
.quiet-button { border: 1px solid #d6e4f9; background: var(--pale-blue); color: #315f9f; }
.primary-button { border: 0; background: var(--button-blue); color: #fff; }
.primary-button.wide { width: 100%; justify-content: center; }
.primary-button span { margin-left: 10px; font-size: 16px; }
.session-dialog { width: min(100% - 32px, 420px); }
.session-top { display: flex; align-items: center; justify-content: space-between; }
.live-pill { color: #7163d0; font-size: 9px; font-weight: 700; letter-spacing: 1px; }
.live-pill span { display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: #8d82ed; }
.progress-track { height: 4px; overflow: hidden; margin: 16px 0 25px; border-radius: 5px; background: #e9eaf2; }
.progress-track span { display: block; width: 0; height: 100%; border-radius: 5px; background: #8b7af0; transition: width .25s; }
.eyebrow { margin: 0 0 7px; color: #8792a8; font-size: 10px; font-weight: 700; letter-spacing: 1px; }
.session-dialog h2 { margin: 0; font-size: 28px; letter-spacing: -.8px; }
.session-target { min-height: 20px; margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.timer-panel { padding: 20px 0 4px; text-align: center; }
.timer-panel strong { color: #7163d0; font-size: 48px; font-variant-numeric: tabular-nums; letter-spacing: -1px; line-height: 1; }
.session-message { padding: 22px 0 4px; text-align: center; font-weight: 650; }
.session-actions { display: grid; gap: 8px; margin-top: 22px; }
[hidden] { display: none !important; }
@media (max-width: 700px) {
  .app-shell { width: min(100% - 24px, 580px); padding: 24px 0 40px; }
  .layout { grid-template-columns: 1fr; gap: 11px; }
  .plan-list { display: flex; gap: 7px; overflow-x: auto; padding: 8px; border-radius: 15px; }
  .plan-choice { width: auto; min-width: 145px; padding: 9px; }
  .editor { padding: 19px; border-radius: 19px; }
  .plan-art { min-height: 120px; }
  .plan-title { font-size: 20px; }
  .settings { gap: 10px 14px; }
  .exercise-target { width: 112px; }
  .new-plan-button { height: 39px; padding: 0 12px; font-size: 12px; }
}
@media (max-width: 410px) {
  .exercise-item { gap: 6px; padding: 6px; }
  .exercise-number { width: 24px; height: 24px; }
  .exercise-item input { padding: 0 5px; font-size: 12px; }
  .exercise-target { width: 100px; }
  .add-form { gap: 5px; }
  .add-button { padding: 0 9px; font-size: 11px; }
}

/* Artwork thumbnails replace the former plan symbols. */
.plan-choice { grid-template-columns: 58px minmax(0, 1fr); gap: 10px; }
.menu-thumb { grid-column: 1; grid-row: 1 / span 2; display: block; width: 54px; height: 54px; border-radius: 11px; object-fit: cover; box-shadow: 0 3px 9px #172c6732; }
.title-row { padding-bottom: 10px; }
.header-thumb { flex: none; width: 54px; height: 54px; border-radius: 13px; object-fit: cover; box-shadow: 0 4px 12px #273b6530; }
.art-picker { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; margin: 0 0 14px 66px; }
.art-picker-label { grid-column: 1 / -1; color: #7e8aa3; font-size: 10px; }
.art-choice { width: 100%; aspect-ratio: 1; overflow: hidden; padding: 0; border: 2px solid transparent; border-radius: 11px; background: #e9eaf2; cursor: pointer; transition: .15s ease; }
.art-choice:hover { transform: translateY(-1px); }
.art-choice.active { border-color: #4b7fd1; box-shadow: 0 0 0 2px #4b7fd127; }
.art-choice-image { display: block; width: 100%; height: 100%; object-fit: cover; }
.plan-art { min-height: 170px; padding: 20px 24px; background: linear-gradient(120deg, #485bd1, #ae4fc3); }
.plan-art.art-sunrise { background: linear-gradient(120deg, #ec8d18, #f45f54); }
.plan-art.art-weights { background: linear-gradient(120deg, #df6338, #a83a84); }
.plan-art.art-kettlebell { background: linear-gradient(120deg, #d83d42, #a43081); }
.plan-art.art-timer { background: linear-gradient(120deg, #9c4dc2, #564dc3); }
.plan-art.art-rope { background: linear-gradient(120deg, #bc3290, #7050bd); }
.plan-art.art-mat { background: linear-gradient(120deg, #10a9c8, #226ab4); }
.plan-art.art-shoe { background: linear-gradient(120deg, #119aa8, #315fb5); }
.plan-art.art-bike { background: linear-gradient(120deg, #348c2a, #197f6e); }
.plan-cover { position: absolute; z-index: 1; top: 50%; right: 18px; display: block; width: 136px; height: 136px; transform: translateY(-50%); border-radius: 19px; object-fit: contain; box-shadow: 0 8px 24px #12224b45; }
.plan-art::after { content: ""; position: absolute; z-index: 2; inset: 0; background: linear-gradient(90deg, #1d286850 0%, #26307220 44%, transparent 70%); }
.cover-facts { z-index: 3; color: #fff; text-shadow: 0 1px 9px #12205d75; }
.cover-count strong { font-size: 45px; }
.cover-mode { border-color: #ffffff70; background: #252a6870; }
.menu-thumb, .header-thumb { background: linear-gradient(135deg, #f58b9e, #6c68db 55%, #3bb8c4); }
@media (max-width: 700px) {
  .plan-choice { grid-template-columns: 54px minmax(0, 1fr); min-width: 158px; }
  .menu-thumb { width: 50px; height: 50px; }
  .header-thumb { width: 48px; height: 48px; }
  .art-picker { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-left: 60px; }
  .plan-art { min-height: 145px; }
  .plan-cover { right: 12px; width: 112px; height: 112px; border-radius: 16px; }
}
@media (max-width: 410px) {
  .art-picker { margin-left: 0; }
  .plan-art { min-height: 132px; padding: 16px; }
  .plan-cover { right: 10px; width: 98px; height: 98px; border-radius: 14px; }
  .cover-count strong { font-size: 38px; }
}
.plan-options { position: relative; z-index: 4; margin: 0 0 10px; }
.plan-options summary { display: inline-flex; align-items: center; gap: 7px; padding: 6px 9px; border: 1px solid transparent; border-radius: 8px; color: #7e8aa3; cursor: pointer; font-size: 11px; list-style: none; user-select: none; }
.plan-options summary::-webkit-details-marker { display: none; }
.plan-options summary::after { content: "⌄"; margin-left: 2px; color: #9aa3b6; font-size: 12px; }
.plan-options[open] summary { border-color: #e4e7ef; background: #f7f8fb; }
.menu-dots { color: #818ca2; font-size: 17px; letter-spacing: 1px; line-height: 10px; }
.menu-caption { font-weight: 550; }
.plan-menu-panel { display: flex; align-items: end; justify-content: space-between; gap: 15px; margin: 4px 0 12px; padding: 12px; border: 1px solid #e9ebf2; border-radius: 13px; background: #f7f8fb; }
.plan-menu-panel .art-picker { grid-template-columns: repeat(4, 48px); gap: 7px; margin: 0; }
.plan-menu-panel .art-picker-label { margin-bottom: 2px; }
.plan-menu-panel .art-choice { width: 48px; height: 48px; aspect-ratio: auto; border-radius: 9px; }
.plan-menu-panel .delete-button { align-self: end; flex: none; border-radius: 7px; color: #aa5965; }
.plan-menu-panel .delete-button:hover { background: #fbe9ec; color: #983d4c; }
.cover-copy { position: relative; z-index: 3; display: flex; max-width: 63%; flex-direction: column; gap: 15px; }
.cover-title { min-width: 0; margin: 0; }
.plan-title { display: block; width: 100%; padding: 2px 0; color: #fff; font-size: clamp(22px, 3vw, 29px); font-weight: 750; letter-spacing: -.8px; text-shadow: 0 2px 12px #15204f72; }
.plan-title:focus { box-shadow: 0 1px 0 #ffffffa0; }
.cover-facts { align-items: flex-start; }
.cover-count strong { font-size: 39px; }
.plan-art { justify-content: flex-start; }
.plan-cover { z-index: 1; width: 142px; height: 142px; border-radius: 22px; object-fit: cover; }
.plan-art::after { z-index: 2; background: linear-gradient(90deg, #1d286875 0%, #26307242 48%, transparent 76%); }
@media (max-width: 700px) {
  .plan-menu-panel { align-items: flex-end; }
  .cover-copy { max-width: 66%; }
  .plan-cover { width: 116px; height: 116px; border-radius: 18px; }
}
@media (max-width: 410px) {
  .plan-menu-panel { align-items: flex-start; flex-direction: column; }
  .plan-menu-panel .art-picker { grid-template-columns: repeat(4, 45px); }
  .plan-menu-panel .art-choice { width: 45px; height: 45px; }
  .cover-copy { max-width: 70%; gap: 11px; }
  .plan-cover { right: 9px; width: 94px; height: 94px; border-radius: 14px; }
}
.check-setting input { accent-color: var(--button-blue); }
.remove-button { background: var(--pale-blue); color: #55739f; }
.remove-button:hover { background: #fbe9ec; }
.delete-button { border-radius: 7px; background: var(--pale-blue); color: #496b9c; }
.delete-button:hover { background: var(--pale-blue-hover); color: #9a4653; }
.count-pill { background: var(--pale-blue); color: #3568b5; }
.plan-options summary:hover { background: var(--pale-blue); color: #315f9f; }
.art-choice { background: var(--pale-blue); }
