:root {
  --pink: #FF4F8B;
  --yellow: #FFC93C;
  --teal: #2EC4B6;
  --purple: #7B5CFF;
  --orange: #FF8A3D;
  --sky: #3DA5FF;
  --ink: #1F1B2E;
  --muted: #6B6880;
  --line: #ECE8F5;
  --soft: #F6F3FC;
  --card: #FFFFFF;
  --accent: #FFB321;
  --accent-dark: #F29E00;
  --danger: #E5484D;
  --shadow: 0 10px 30px rgba(55, 30, 100, 0.12);
  --shadow-sm: 0 3px 10px rgba(55, 30, 100, 0.1);
  --page-bg: linear-gradient(135deg, #FFDDE9 0%, #FFF3C9 50%, #D4F6F1 100%);
  --display: 'Fredoka', 'Nunito', system-ui, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--page-bg);
  background-color: #FFF3E6;
  background-attachment: fixed;
}
body.modal-open { overflow: hidden; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 3px solid var(--purple); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.15; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 10px; }
.skip:focus { left: 8px; }
.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 14px rgba(55, 30, 100, 0.08);
}
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); font-family: var(--display); font-size: 24px; font-weight: 600; flex-shrink: 0; }
.brand b, .brand-text b { color: var(--pink); font-weight: 700; }
.brand i, .brand-text i { font-style: normal; color: var(--purple); font-weight: 700; }
.brand .logo { width: 34px; height: 34px; transition: transform 0.6s cubic-bezier(.2, .9, .3, 1.3); }
.brand:hover .logo { transform: rotate(270deg); }
.nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  padding: 8px 14px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  white-space: nowrap;
  transition: background 0.15s;
}
.nav a:hover { background: var(--soft); }
.nav a.active { background: linear-gradient(135deg, var(--pink), var(--purple)); color: #fff; }
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  flex-shrink: 0;
}
.icon-btn:hover { background: var(--soft); }
.icon-btn .i { width: 26px; height: 26px; }
.icon-btn.small { width: 34px; height: 34px; }
.icon-btn.small .i { width: 22px; height: 22px; }

/* ---------- all tools menu ---------- */
.tools-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  padding: 8px 14px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-weight: 800;
  white-space: nowrap;
}
.tools-btn .i { width: 16px; height: 16px; transition: transform 0.2s; }
.tools-btn[aria-expanded='true'] { background: linear-gradient(135deg, var(--pink), var(--purple)); border-color: transparent; color: #fff; }
.tools-btn[aria-expanded='true'] .i { transform: rotate(90deg); }
.tools-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 16px;
  z-index: 35;
  width: min(760px, calc(100vw - 32px));
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 12px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 20px 50px rgba(55, 30, 100, 0.22);
  animation: rise 0.18s ease-out;
}
.tools-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
}
.tools-menu a span { font-size: 22px; }
.tools-menu a:hover, .tools-menu a.active { background: var(--soft); }
.tools-menu a.active { color: var(--pink); }

/* ---------- page heading ---------- */
.page-head {
  max-width: 1500px;
  margin: 0 auto;
  padding: 16px 18px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 14px;
}
.page-head h1 { margin: 0; font-size: clamp(22px, 2.6vw, 30px); text-wrap: balance; }
.page-head p { margin: 0; opacity: 0.75; font-weight: 600; max-width: 70ch; }
.page-dark .page-head { color: #fff; }

.not-found { max-width: 640px; padding-block: 60px; }
.not-found h1 { margin: 0 0 10px; font-size: 30px; }
.not-found a { color: var(--purple); font-weight: 800; }
.not-found li { margin-bottom: 6px; }

/* ---------- main layout ---------- */
.app {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 18px;
  padding: 18px;
  max-width: 1500px;
  margin: 0 auto;
}
.app.panel-hidden { grid-template-columns: minmax(0, 1fr); }
.app.panel-hidden .panel { display: none; }

.stage {
  --tool-bg: rgba(255, 255, 255, 0.55);
  position: relative;
  height: calc(100vh - 100px);
  min-height: 540px;
  border-radius: 28px;
  background: var(--tool-bg);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 70px;
  outline: none;
}
.stage:fullscreen { height: 100vh; border-radius: 0; background: var(--page-bg); background-color: #FFF3E6; }
.stage::backdrop { background: #FFF3E6; }

.banner { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 12px; max-width: 100%; }
.banner h2 {
  margin: 0;
  font-size: clamp(22px, 3vw, 34px);
  text-align: center;
  padding: 6px 22px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  overflow-wrap: anywhere;
}
.banner img { max-height: 52px; max-width: 140px; border-radius: 10px; }
.spin-count {
  position: absolute;
  top: 16px;
  left: 18px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-sm);
  font-weight: 700;
  font-size: 14px;
}
.spin-count b { color: var(--pink); font-size: 16px; }

.wheel-wrap {
  --btn: #1F1B2E;
  --btn-ink: #fff;
  position: relative;
  width: min(100%, calc(100vh - 250px), 760px);
  min-width: 260px;
  aspect-ratio: 1;
  container-type: inline-size;
  flex-shrink: 0;
}
.wheel-wrap canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 18px 50px rgba(55, 30, 100, 0.22), 0 0 0 6px rgba(255, 255, 255, 0.6);
}
.is-spinning .wheel-wrap canvas { cursor: default; }

.spin-btn {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 17%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 50%;
  background: var(--btn);
  color: var(--btn-ink);
  font-family: var(--display);
  font-weight: 700;
  font-size: 18px;
  font-size: max(13px, 3.6cqw);
  letter-spacing: 0.02em;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28), inset 0 -4px 0 rgba(0, 0, 0, 0.15);
  transition: background 0.6s, color 0.6s;
  z-index: 2;
}
/* The pointer: a triangle on top of the button marks the winning slice. */
.spin-btn::before {
  content: '';
  position: absolute;
  left: 50%;
  top: -27%;
  width: 46%;
  height: 40%;
  transform: translateX(-50%);
  background: var(--btn);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  transition: background 0.6s;
  z-index: -1;
}
.spin-btn span { position: relative; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15); }
.spin-btn:hover { filter: brightness(1.08); }
.spin-btn:active { transform: translate(-50%, -50%) scale(0.95); }
.spin-btn.stop { background: var(--danger); color: #fff; }
.spin-btn.stop::before { background: var(--danger); }
.wheel-wrap.animate .spin-btn { animation: pulse 1.6s ease-in-out infinite; }
.is-spinning .wheel-wrap.animate .spin-btn { animation: none; }
@keyframes pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.08); }
}

.stage-hint {
  margin: 18px 0 0;
  padding: 4px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
  font-size: 14px;
}
kbd { font-family: inherit; font-weight: 700; padding: 1px 7px; border-radius: 6px; background: #fff; border: 1px solid var(--line); box-shadow: 0 1px 0 var(--line); }

.stage-tools { position: absolute; display: flex; flex-direction: column; gap: 10px; z-index: 3; }
.stage-tools.tr { top: 16px; right: 16px; }
.stage-tools.br { bottom: 16px; right: 16px; }
.tool-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border: 0;
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s;
}
.tool-btn:hover { transform: translateY(-2px); }
.tool-btn .i { width: 26px; height: 26px; }
.tool-btn.dark { background: var(--ink); color: #fff; }
.tool-btn.round { border-radius: 50%; }
.tool-btn .dot { position: absolute; top: -4px; right: -4px; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); border: 2px solid #fff; }

/* ---------- side panel ---------- */
.panel {
  position: sticky;
  top: 82px;
  height: calc(100vh - 100px);
  min-height: 540px;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border-radius: 24px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.panel-tabs { display: flex; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.ptab {
  flex: 1;
  padding: 14px 10px 12px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: none;
  font-family: var(--display);
  font-size: 18px;
  font-weight: 500;
  color: var(--muted);
}
.ptab.active { color: var(--ink); border-bottom-color: var(--accent); font-weight: 600; }
.badge { display: inline-block; min-width: 24px; padding: 0 7px; border-radius: 999px; background: var(--soft); color: var(--muted); font-family: 'Nunito', sans-serif; font-size: 13px; font-weight: 800; }
.ptab.active .badge { background: var(--pink); color: #fff; }
.ppane { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px 12px; flex: 1; min-height: 0; overflow: auto; }
#pane-inputs { overflow: hidden; }

.wheel-picker { display: flex; gap: 6px; }
.wheel-picker select { flex: 1; min-width: 0; }
select, input[type='text'], input[type='email'], input:not([type]), input[type='number'], textarea {
  border: 2px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 8px 10px;
  min-width: 0;
}
select { padding-right: 28px; }
select:focus, input:focus, textarea:focus { border-color: var(--purple); outline: none; }
textarea { width: 100%; resize: vertical; line-height: 1.5; }
.field { display: flex; flex-direction: column; gap: 4px; font-weight: 700; font-size: 14px; }
.field > span { color: var(--muted); }
.field input, .field textarea, .field select { font-weight: 600; font-size: 16px; }
.field-label { margin: 14px 0 8px; font-weight: 700; }

.mini {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--muted);
  flex-shrink: 0;
}
.mini:hover:not(:disabled) { color: var(--ink); border-color: #D9D3EA; }
.mini:disabled { opacity: 0.4; }
.mini .i { width: 18px; height: 18px; }

.mode-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  padding: 10px 12px;
  border-radius: 14px;
  background: linear-gradient(135deg, #FFF0F6, #F1EDFF);
  font-weight: 700;
  font-size: 14px;
}
.mode-box .inline { display: inline-flex; align-items: center; gap: 6px; }
.mode-box input[type='number'] { width: 76px; padding: 5px 8px; }
.mode-box select { padding: 5px 26px 5px 8px; }
.mode-box input[type='checkbox'] { width: 18px; height: 18px; accent-color: var(--pink); }
.mode-box input[type='date'] { padding: 5px 8px; }
.mode-box textarea { width: 100%; font-weight: 600; font-size: 14px; }
.mode-box.wide { flex-direction: column; align-items: stretch; }
.mode-box .mode-note { margin: 0; font-weight: 600; }
.mode-box .score { padding: 4px 10px; border-radius: 999px; background: #fff; }
.mode-box .score b { color: var(--pink); }
.upload-label { cursor: pointer; }
.upload-label .i { width: 16px; height: 16px; }
.entry .thumb { width: 30px; height: 30px; border-radius: 6px; object-fit: cover; flex-shrink: 0; border: 1px solid var(--line); }
.entry .thumb.flag { height: 22px; object-fit: contain; border-radius: 3px; }
.entry .thumb.swatch { display: block; }

.add-row { display: flex; gap: 8px; }
.add-row input { flex: 1; font-size: 16px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border: 0;
  border-radius: 12px;
  font-weight: 800;
  white-space: nowrap;
  transition: transform 0.12s, filter 0.12s, opacity 0.2s;
}
.btn:hover:not(:disabled) { filter: brightness(1.05); transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn.primary { background: var(--pink); color: #fff; }
.btn.accent { background: var(--accent); color: #fff; font-size: 18px; min-width: 150px; padding: 12px 24px; }
.btn.accent:disabled { opacity: 0.35; }
.btn.big { width: 100%; font-size: 19px; padding: 14px; }
.btn.small { padding: 6px 12px; font-size: 14px; }
.btn.ghost { background: transparent; color: #fff; border: 2px solid rgba(255, 255, 255, 0.8); }
.btn.ghost-dark { background: #fff; color: var(--ink); border: 2px solid var(--line); cursor: pointer; }

.toolbar { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
}
.chip-btn .i { width: 16px; height: 16px; }
.chip-btn:hover { border-color: #D9D3EA; background: var(--soft); }
.chip-btn { position: relative; }
.chip-btn input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none; }
.chip-btn.on { background: var(--purple); border-color: var(--purple); color: #fff; }
.chip-btn:focus-within { outline: 3px solid var(--purple); outline-offset: 2px; }
.chip-btn.danger { color: var(--danger); }

.presets { display: flex; gap: 6px; overflow-x: auto; align-items: center; padding-bottom: 2px; scrollbar-width: thin; flex-shrink: 0; }
.preset { flex-shrink: 0; border: 0; border-radius: 999px; padding: 4px 10px; background: var(--soft); font-size: 13px; font-weight: 700; white-space: nowrap; }
.preset:hover { background: #ECE5FF; }

.entry-list { list-style: none; margin: 0; padding: 2px; flex: 1; min-height: 120px; overflow-y: auto; }
.entry {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 4px 4px 8px;
  border-left: 5px solid var(--c, transparent);
  border-radius: 10px;
  margin-bottom: 4px;
  background: #fff;
}
.entry:hover { background: var(--soft); }
.entry .num { width: 22px; text-align: right; color: var(--muted); font-size: 13px; font-weight: 700; flex-shrink: 0; }
.entry .en { width: 18px; height: 18px; accent-color: var(--pink); flex-shrink: 0; }
.entry .txt { flex: 1; border-color: transparent; background: var(--soft); padding: 7px 10px; font-weight: 600; }
.entry .txt:hover { border-color: var(--line); }
.entry.off .txt { text-decoration: line-through; color: var(--muted); }
.entry .wt { width: 58px; padding: 6px; text-align: center; }
.entry .pct { width: 44px; font-size: 12px; font-weight: 800; color: var(--purple); text-align: right; flex-shrink: 0; }
.entry .cnt { padding: 2px 7px; border-radius: 999px; background: #FFF1D6; color: #9A5B00; font-size: 12px; font-weight: 800; flex-shrink: 0; }
.entry .mini { width: 30px; height: 30px; border: 0; background: transparent; }
.entry .mini:hover { background: #fff; }
.entry .del:hover { color: var(--danger); }
.empty { text-align: center; color: var(--muted); margin: 20px 0; }
.panel-foot { font-size: 13px; color: var(--muted); text-align: center; flex-shrink: 0; }

.results-head { display: flex; justify-content: space-between; align-items: center; font-weight: 700; }
.mini-title { margin: 8px 0 0; font-size: 16px; }
.tally, .history { list-style: none; margin: 0; padding: 0; }
.tally li { display: grid; grid-template-columns: minmax(0, 1fr) 1fr auto; align-items: center; gap: 10px; padding: 5px 0; }
.t-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-bar { height: 10px; border-radius: 999px; background: var(--soft); overflow: hidden; }
.t-bar span { display: block; height: 100%; border-radius: 999px; }
.history li { display: flex; align-items: center; gap: 10px; padding: 7px 4px; border-bottom: 1px solid var(--line); }
.h-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.h-text { flex: 1; font-weight: 700; overflow-wrap: anywhere; }

/* ---------- team maker ---------- */
.teams {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
  max-width: 1300px;
  margin: 0 auto;
  min-height: calc(100vh - 100px);
}
.card { background: var(--card); border-radius: 24px; box-shadow: var(--shadow); padding: 22px; }
.teams-form h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; font-size: 28px; }
.teams-form h2 .i { width: 30px; height: 30px; color: var(--pink); }
.teams-form form { display: flex; flex-direction: column; gap: 12px; }
.teams-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.link-btn { align-self: flex-start; border: 0; background: none; color: var(--purple); font-weight: 800; padding: 0; text-decoration: underline; text-underline-offset: 3px; }
.teams-out-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.teams-out-head h2 { margin: 0; padding: 4px 16px; background: rgba(255, 255, 255, 0.85); border-radius: 999px; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.teams-placeholder { grid-column: 1 / -1; display: grid; place-items: center; min-height: 300px; border: 3px dashed rgba(123, 92, 255, 0.35); border-radius: 24px; background: rgba(255, 255, 255, 0.5); font-family: var(--display); font-size: 22px; color: var(--muted); }
.team { background: #fff; border-radius: 18px; overflow: hidden; box-shadow: var(--shadow-sm); animation: pop-in 0.45s cubic-bezier(.2, .9, .3, 1.3) both; }
.team h3 { margin: 0; padding: 12px 16px; background: var(--c); display: flex; justify-content: space-between; align-items: center; font-size: 20px; }
.team h3 { color: var(--ink); }
.team h3 small { font-family: 'Nunito', sans-serif; font-size: 13px; padding: 1px 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.75); color: #1F1B2E; }
.team ul { margin: 0; padding: 10px 16px 14px 34px; font-weight: 700; }
.team li { padding: 3px 0; }
@keyframes pop-in { from { opacity: 0; transform: scale(0.85) translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- info ---------- */
.info { max-width: 1100px; margin: 30px auto 40px; padding: 0 18px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.info h2 { margin: 0 0 12px; font-size: 28px; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature { background: #fff; border-radius: 20px; padding: 18px; box-shadow: var(--shadow-sm); border-top: 6px solid var(--c); }
.feature > span { font-size: 30px; }
.feature h3 { margin: 6px 0 4px; font-size: 20px; }
.feature p { margin: 0; color: var(--muted); }
.faq details { border-top: 1px solid var(--line); padding: 12px 0; }
.faq details:first-of-type { border-top: 0; }
.faq summary { font-weight: 800; cursor: pointer; font-size: 17px; }
.faq summary::marker { color: var(--pink); }
.faq p { margin: 8px 0 0; color: var(--muted); }
.footer {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px 24px;
  background: rgba(255, 255, 255, 0.92);
  font-weight: 700;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer-links a { color: var(--purple); text-decoration: none; }
.footer-links a:hover { text-decoration: underline; text-underline-offset: 3px; }
.footer-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 20px; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.footer-legal a { color: var(--muted); text-decoration: none; }
.footer-legal a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.tools-menu .tools-all { grid-column: 1 / -1; justify-content: center; margin-top: 4px; border-top: 1px solid var(--line); border-radius: 0 0 12px 12px; color: var(--purple); }

/* ---------- tools hub, about, contact and legal pages ---------- */
.static {
  max-width: 1100px;
  margin: 20px auto 48px;
  padding-inline: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
}
.prose { max-width: 820px; width: 100%; justify-self: center; }
.prose h2 { margin: 26px 0 8px; font-size: 24px; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { max-width: 72ch; }
.prose ul { padding-left: 22px; }
.prose li { margin-bottom: 8px; }
.prose a:not(.btn) { color: var(--purple); font-weight: 700; text-underline-offset: 3px; }
.legal h2 { font-size: 21px; }
.tool-group h2 { margin: 0 0 12px; font-size: 24px; padding: 4px 16px; display: inline-block; border-radius: 999px; background: rgba(255, 255, 255, 0.85); }
.page-dark .tool-group h2 { color: var(--ink); }
.tool-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.tool-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px;
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}
.tool-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.tool-icon { display: grid; place-items: center; width: 52px; height: 52px; flex-shrink: 0; border-radius: 16px; background: var(--soft); font-size: 28px; }
.tool-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tool-text b { font-family: var(--display); font-size: 19px; font-weight: 600; }
.tool-text span { color: var(--muted); font-size: 15px; }
.contact-form { display: flex; flex-direction: column; gap: 14px; margin: 18px 0; }
.contact-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.contact-form .btn { align-self: flex-start; }
.hp { position: absolute; left: -9999px; }
.article-head { margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.article-head h1 { margin: 0 0 6px; font-size: clamp(26px, 3vw, 34px); text-wrap: balance; }
.article-head p { margin: 0; color: var(--muted); font-weight: 600; }
.article h2 { margin: 22px 0 8px; font-size: 24px; }
.article h2:first-child { margin-top: 0; }
.article p, .article li { max-width: 72ch; }
.article ol, .article ul { padding-left: 22px; }
.article li { margin-bottom: 6px; }
.article a { color: var(--purple); font-weight: 700; text-underline-offset: 3px; }
.noscript { max-width: 600px; margin: 20px auto; padding: 14px 18px; border-radius: 14px; background: #fff; font-weight: 700; text-align: center; }

/* ---------- modals ---------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: rgba(31, 27, 46, 0.5);
  animation: fade 0.18s ease-out;
}
@keyframes fade { from { opacity: 0; } }
.modal {
  width: min(640px, 100%);
  max-height: min(820px, calc(100vh - 24px));
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
  animation: rise 0.22s cubic-bezier(.2, .9, .3, 1.2);
}
@keyframes rise { from { transform: translateY(16px) scale(0.98); opacity: 0; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 18px 22px 12px; }
.modal-head h2 { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; margin: 0; font-size: 28px; font-weight: 500; }
.modal-head h2 .i { width: 30px; height: 30px; }
.modal-head h2 small { font-family: 'Nunito', sans-serif; font-size: 14px; color: var(--ink); font-weight: 600; }
.close { border: 0; background: none; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; flex-shrink: 0; }
.close:hover { background: var(--soft); }
.close .i { width: 24px; height: 24px; }
.modal-body { padding: 16px 22px; overflow-y: auto; flex: 1; }
.modal-foot { display: flex; justify-content: center; padding: 14px 22px 20px; }

.tabs-wrap { position: relative; display: flex; align-items: stretch; margin: 0 22px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stabs { display: flex; overflow-x: auto; scrollbar-width: none; scroll-behavior: smooth; flex: 1; }
.stabs::-webkit-scrollbar { display: none; }
.stabs button {
  flex-shrink: 0;
  max-width: 130px;
  padding: 12px 16px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: none;
  font-size: 18px;
  line-height: 1.1;
  color: var(--ink);
}
.stabs button.active { font-weight: 800; border-bottom-color: var(--accent); }
.tab-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}
#tabLeft { left: -4px; }
#tabRight { right: -4px; }
.tab-arrow.hide { display: none; }

.slider-row { margin-bottom: 16px; }
.slider-row label { display: block; font-size: 18px; margin-bottom: 6px; }
.slider-row.disabled { opacity: 0.45; }
input[type='range'] { -webkit-appearance: none; appearance: none; width: 100%; height: 26px; background: transparent; padding: 0; border: 0; }
input[type='range']::-webkit-slider-runnable-track { height: 5px; border-radius: 3px; background: #CFCBD8; }
input[type='range']::-moz-range-track { height: 5px; border-radius: 3px; background: #CFCBD8; }
input[type='range']::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; margin-top: -11.5px; border-radius: 50%; background: var(--ink); border: 0; cursor: pointer; }
input[type='range']::-moz-range-thumb { width: 28px; height: 28px; border-radius: 50%; background: var(--ink); border: 0; cursor: pointer; }
input[type='range']:disabled::-webkit-slider-thumb { cursor: default; }

.check-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 9px 0; font-size: 18px; cursor: pointer; }
.check-row small { font-size: 13px; color: var(--muted); }
.chk {
  -webkit-appearance: none;
  appearance: none;
  width: 40px;
  height: 40px;
  margin: 0;
  border: 2px solid #CFCBD8;
  border-radius: 8px;
  background: #fff;
  flex-shrink: 0;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.chk:checked {
  border-color: #3A3646;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='%233A3646' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 72% no-repeat;
}

.sound-row { display: grid; grid-template-columns: 92px 40px 44px minmax(0, 1fr); align-items: center; gap: 8px; margin-bottom: 12px; font-size: 18px; }
.sound-row select { width: 100%; background: #F1F1F1; border-color: #F1F1F1; padding: 10px 12px; }
.play-btn { width: 40px; height: 40px; border: 0; background: none; color: var(--accent); display: grid; place-items: center; border-radius: 10px; }
.play-btn:hover { background: #FFF4DC; }
.play-btn .i { width: 26px; height: 26px; }
.upload-btn { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: #FFE3A6; color: var(--accent-dark); cursor: pointer; }
.upload-btn:hover { background: #FFD47A; }
.upload-btn:focus-within { outline: 3px solid var(--purple); }

.theme-row { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; font-size: 18px; }
.theme-row select { flex: 1; background: #F1F1F1; border-color: #F1F1F1; padding: 12px 14px; font-size: 18px; }
.swatch-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px 14px; }
.swatch-grid.four { grid-template-columns: repeat(4, 1fr); }
.sw { border: 0; padding: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.sw-prev { display: block; width: 100%; aspect-ratio: 1; border-radius: 8px; overflow: hidden; border: 1px solid #DDD8E8; transition: transform 0.15s, box-shadow 0.15s; }
.sw:hover .sw-prev { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.sw.sel .sw-prev { box-shadow: 0 0 0 3px var(--accent); }
.sw-prev .fill { display: block; width: 100%; height: 100%; }
.sw-prev .checker { background: repeating-conic-gradient(#E9E6F0 0% 25%, #fff 0% 50%) 0 0 / 16px 16px; }
.sw-prev .checker span { display: block; width: 100%; height: 100%; }
.sw-prev .bars { display: flex; flex-direction: column; width: 100%; height: 100%; }
.sw-prev .bars span { flex: 1; }
.sw-label { display: flex; align-items: center; gap: 7px; font-size: 15px; font-weight: 600; text-align: left; }
.radio { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #CFCBD8; flex-shrink: 0; background: #fff; }
.sw.sel .radio { border-color: #3A3646; box-shadow: inset 0 0 0 4px #fff; background: #3A3646; }
.color-row { display: flex; align-items: center; gap: 12px; margin-top: 16px; font-weight: 700; }
input[type='color'] { width: 52px; height: 38px; padding: 2px; border: 2px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; }
.color-dots { display: flex; flex-wrap: wrap; gap: 10px; }
.cdot { width: 42px; height: 42px; border-radius: 50%; border: 2px solid rgba(0, 0, 0, 0.12); }
.cdot.sel { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--accent); }
.custom-colors { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.cc { position: relative; }
.cc input { width: 60px; height: 60px; }
.cc-del { position: absolute; top: -8px; right: -8px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; display: grid; place-items: center; }
.cc-del .i { width: 12px; height: 12px; }
.cc-add { display: inline-flex; align-items: center; gap: 6px; height: 60px; padding: 0 14px; border: 2px dashed #CFCBD8; border-radius: 10px; background: none; font-weight: 700; }
.cc-preview { display: flex; width: 100%; height: 40px; border-radius: 10px; overflow: hidden; margin-top: 6px; }
.cc-preview span { flex: 1; }
.logo-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.logo-row img { max-height: 60px; max-width: 140px; border-radius: 8px; border: 1px solid var(--line); }

/* ---------- result popup ---------- */
.result-overlay { background: rgba(31, 27, 46, 0.55); z-index: 60; }
.result-box { display: flex; flex-direction: column; align-items: center; gap: 12px; width: min(760px, 100%); }
.result-card {
  --win: #2D6A1E;
  position: relative;
  width: 100%;
  min-height: min(56vh, 520px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 8px solid var(--win);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  animation: winner 0.55s cubic-bezier(.2, .9, .3, 1.35);
}
@keyframes winner { from { transform: scale(0.6); opacity: 0; } }
.result-main { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px 24px 10px; text-align: center; }
.result-text { margin: 0; font-family: var(--display); font-weight: 700; font-size: clamp(44px, 10vw, 104px); line-height: 1.05; overflow-wrap: anywhere; }
.result-sub { margin: 14px 0 2px; font-size: 20px; }
.result-image { max-width: min(260px, 60%); max-height: 34vh; margin-bottom: 16px; border-radius: 14px; object-fit: contain; box-shadow: var(--shadow-sm); }
.result-image.flag { border-radius: 4px; border: 1px solid var(--line); }
.result-swatch { display: block; width: min(180px, 50%); aspect-ratio: 1; margin-bottom: 16px; border-radius: 22px; border: 1px solid rgba(0, 0, 0, 0.1); box-shadow: var(--shadow-sm); }
.result-text.question { font-size: clamp(28px, 5vw, 48px) !important; color: var(--muted); }
.result-prompt { max-width: 34ch; margin: 14px auto 4px; padding: 12px 18px; border-radius: 16px; background: var(--soft); font-size: clamp(18px, 2.4vw, 24px); font-weight: 800; text-wrap: balance; }
.result-quiz { margin-top: 14px; }
.result-main .link-btn { align-self: center; margin-bottom: 6px; }
.quiz-grade { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.btn.good { background: #06A77D; color: #fff; }
.btn.bad { background: var(--danger); color: #fff; }
.result-icons { display: flex; gap: 2px; }
.result-brand { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 14px; font-family: var(--display); font-size: 20px; }
.result-brand .logo { width: 24px; height: 24px; }
.pill-check { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border: 1.5px solid rgba(255, 255, 255, 0.85); border-radius: 999px; color: #fff; font-size: 20px; cursor: pointer; }
.pill-check input { width: 22px; height: 22px; accent-color: var(--accent); }
.result-actions { display: flex; gap: 12px; }

/* ---------- toast & confetti ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 80;
  transform: translate(-50%, 20px);
  max-width: calc(100% - 32px);
  padding: 12px 20px;
  border-radius: 14px;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  box-shadow: var(--shadow);
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.confetti-canvas { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 70; }

/* ---------- touch ---------- */
html { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.wheel-wrap canvas { touch-action: pan-y; } /* horizontal swipes spin the wheel, vertical ones still scroll */
.hint-touch { display: none; }
@media (hover: none) and (pointer: coarse) {
  .hint-mouse { display: none; }
  .hint-touch { display: inline; }
}
@media (hover: none) {
  .tool-btn:hover, .btn:hover:not(:disabled), .sw:hover .sw-prev, .brand:hover .logo { transform: none; }
}

/* Floating spin button for small screens, shown when the wheel is scrolled out of view. */
.spin-fab {
  position: fixed;
  right: calc(16px + env(safe-area-inset-right, 0px));
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 40;
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border: 4px solid #fff;
  border-radius: 50%;
  background: var(--pink);
  color: #fff;
  font-family: var(--display);
  font-size: 17px;
  font-weight: 700;
  box-shadow: 0 10px 26px rgba(255, 79, 139, 0.45);
  animation: rise 0.22s cubic-bezier(.2, .9, .3, 1.2);
}

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .app, .teams {
    grid-template-columns: minmax(0, 1fr);
    padding-block: 12px;
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
  }
  /* Title and tools share a row above the wheel; hint and sound/full screen share one below. */
  .stage {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "banner tr" "count count" "wheel wheel" "hint br";
    align-items: center;
    gap: 10px 8px;
    height: auto;
    min-height: 0;
    padding: 12px;
  }
  .banner { grid-area: banner; justify-content: flex-start; margin: 0; min-width: 0; }
  .banner h2 { text-align: left; font-size: clamp(18px, 4.6vw, 26px); padding: 6px 16px; }
  .banner img { max-height: 40px; }
  .spin-count { grid-area: count; position: static; justify-self: start; }
  .stage-tools { position: static; flex-direction: row; gap: 8px; }
  .stage-tools.tr { grid-area: tr; justify-self: end; }
  .stage-tools.br { grid-area: br; justify-self: end; }
  .tool-btn { width: 46px; height: 46px; }
  .tool-btn .i { width: 24px; height: 24px; }
  .wheel-wrap {
    grid-area: wheel;
    justify-self: center;
    width: min(100%, 620px, calc(100vh - 170px));
    width: min(100%, 620px, calc(100svh - 170px));
    min-width: min(100%, 260px);
  }
  .stage-hint { grid-area: hint; justify-self: start; margin: 0; font-size: 13px; }
  .stage:fullscreen { align-content: center; padding: 16px max(16px, env(safe-area-inset-left, 0px)); }
  .panel { position: static; height: auto; min-height: 0; }
  #pane-inputs { overflow: visible; }
  .entry-list { max-height: none; overflow: visible; flex: none; min-height: 0; }
    .page-head { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .static { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .info { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
}

@media (max-width: 640px) {
  /* The header scrolls away on phones so the wheel gets the screen. */
  .topbar {
    position: relative;
    top: auto;
    flex-wrap: wrap;
    gap: 4px 10px;
    padding-block: 8px 6px;
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
  }
  .brand { font-size: 21px; }
  .brand .logo { width: 30px; height: 30px; }
  .page-head { padding-top: 12px; }
  .page-head h1 { font-size: 21px; }
  .page-head p { font-size: 14px; }
  .article h2 { font-size: 21px; }
  .features { grid-template-columns: minmax(0, 1fr); }
  .contact-form .row { grid-template-columns: minmax(0, 1fr); }
  .prose h2, .tool-group h2 { font-size: 21px; }
  .tool-card { padding: 14px; }
  #openSettings { margin-left: auto; }
  .nav {
    order: 3;
    flex-basis: 100%;
    margin-inline: -16px;
    padding-inline: 16px;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 28px), transparent);
    mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 28px), transparent);
  }
  .nav a { padding: 7px 13px; font-size: 14px; }
  .tools-btn { padding: 6px 12px; font-size: 14px; }
  .tools-menu { right: 12px; left: 12px; width: auto; grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 70vh; overflow-y: auto; }
  .tools-menu a { padding: 9px 8px; font-size: 14px; gap: 8px; }
  .stage { border-radius: 22px; padding: 10px; }
  .stage-hint { padding: 4px 10px; }

  .panel { border-radius: 20px; }
  .ptab { padding: 12px 8px 10px; }
  .ppane { padding: 12px; }
  .toolbar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -12px; padding: 2px 12px; }
  .toolbar::-webkit-scrollbar { display: none; }
  .chip-btn { flex-shrink: 0; padding: 8px 13px; }
  .presets { margin-inline: -12px; padding-inline: 12px; scrollbar-width: none; }
  .preset { padding: 7px 12px; }
  .mini { width: 44px; height: 44px; }
  .entry { padding-left: 6px; gap: 4px; }
  .entry .num { display: none; }
  .entry .en { width: 22px; height: 22px; margin: 0 4px; }
  .entry .mini { width: 40px; height: 40px; }
  .add-row .btn { padding-inline: 14px; }
  /* iOS zooms into inputs with text smaller than 16px. */
  input, select, textarea { font-size: 16px; }

    .info h2 { font-size: 24px; }
  .footer { padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px)); }

  /* Dialogs become bottom sheets. */
  .overlay:not(.result-overlay) { align-items: flex-end; padding: 0; }
  .modal {
    width: 100%;
    max-height: 92vh;
    max-height: 92svh;
    border-radius: 22px 22px 0 0;
    animation: sheet 0.28s cubic-bezier(.2, .9, .3, 1);
  }
  .modal::before { content: ''; align-self: center; width: 44px; height: 5px; margin-top: 8px; border-radius: 3px; background: var(--line); flex-shrink: 0; }
  .modal.confirm { width: 100%; }
  .modal-head { padding-top: 10px; }
  .modal-head h2 { font-size: 23px; }
  .modal-head, .modal-body { padding-left: 16px; padding-right: 16px; }
  .modal-foot { padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
  .modal-foot .btn { flex: 1; max-width: 360px; }
  .tabs-wrap { margin: 0 16px; }
  .stabs button { font-size: 16px; padding: 10px 12px; }
  .check-row, .slider-row label, .sound-row, .theme-row { font-size: 16px; }
  .chk { width: 36px; height: 36px; }
  .sound-row { grid-template-columns: 74px 36px 40px minmax(0, 1fr); gap: 6px; }
  .swatch-grid { gap: 12px 10px; }
  .swatch-grid.four { grid-template-columns: repeat(3, 1fr); }
  .sw-label { font-size: 13px; }

  .result-card { min-height: 44vh; min-height: 44svh; border-width: 6px; }
  .result-sub { font-size: 17px; }
  .result-actions { width: 100%; justify-content: center; }
  .result-actions .btn { flex: 1; max-width: 220px; }
}
@keyframes sheet { from { transform: translateY(100%); } }

/* The narrowest phones: keep the logo, All tools and settings on one row. */
@media (max-width: 360px) {
  .topbar { gap: 4px 6px; }
  .brand { font-size: 18px; gap: 6px; }
  .brand .logo { width: 26px; height: 26px; }
  .tools-btn { padding: 5px 9px; font-size: 13px; }
  .tools-btn .i { display: none; }
  #openSettings { width: 36px; height: 36px; }
}

/* Phones held sideways: wheel on the left, everything else beside it. */
@media (max-height: 500px) and (orientation: landscape) {
  .topbar { position: relative; top: auto; }
  .stage {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: repeat(4, auto) 1fr;
    grid-template-areas: "wheel banner" "wheel count" "wheel tr" "wheel br" "wheel hint";
    align-items: start;
    gap: 10px 20px;
  }
  .wheel-wrap { width: min(calc(100vh - 48px), 60vw); width: min(calc(100svh - 48px), 60vw); min-width: 200px; }
  .stage-tools.tr, .stage-tools.br { justify-self: start; }
  .stage-hint { align-self: end; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* Weights mode needs room for the weight box, so drop the less important bits. */
.entry-list.weights .entry .num,
.entry-list.weights .entry .dup { display: none; }
.entry .txt { min-width: 70px; }
.entry-list.weights .entry .wt { width: 50px; padding: 6px 2px; }
.entry-list.weights .entry .pct { width: 38px; }

.modal.confirm { width: min(420px, 100%); }
.modal.confirm .modal-body { padding-top: 22px; font-size: 18px; font-weight: 700; }
.modal.confirm .modal-body p { margin: 0; }
.modal.confirm .modal-foot { justify-content: flex-end; gap: 10px; }
.btn.danger { background: var(--danger); color: #fff; }
