/* gleemoo — components. Tokens only: every colour, radius, shadow, duration
   and font here resolves through var(--tp-*). */

/* ------------------------------------------------------------- app shell */
.shell{
  width:100%;
  max-width:760px;
  margin:0 auto;
  min-height:100dvh;
  background:var(--tp-canvas);
  display:flex;
  flex-direction:column;
  position:relative;
}

.topbar{
  position:sticky;
  top:0;
  z-index:30;
  display:flex;
  align-items:center;
  gap:10px;
  padding:14px 16px 12px;
  background:var(--tp-canvas);
  border-bottom:var(--tp-bw) solid var(--tp-line);
}

.topbar h1{font-size:20px;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* Brand lockup: the gleemoo mark plus the wordmark. The wordmark uses the
   body face, not Bungee — the logo is a lowercase geometric sans, and Bungee
   caps beside the mark reads as a different brand. */
.brand{
  display:inline-flex;
  align-items:center;
  gap:9px;
  font-family:var(--tp-font-body);
  font-weight:800;
  text-transform:none;
  letter-spacing:-.028em;
  font-size:22px;
  line-height:1;
  flex:0 0 auto;
}
.brand-mark{
  width:26px;height:26px;flex:0 0 auto;display:block;
}
.brand-name{padding-top:.08em}
.brand-lg{font-size:27px;gap:11px}
.brand-lg .brand-mark{width:34px;height:34px}

.iconbtn{
  display:inline-grid;
  place-items:center;
  width:44px;height:44px;
  border-radius:var(--tp-r-sm);
  border:var(--tp-bw) solid transparent;
  background:transparent;
  color:var(--tp-ink);
  cursor:pointer;
  position:relative;
  transition:transform var(--tp-dur) var(--tp-ease),
             background var(--tp-dur) var(--tp-ease),
             border-color var(--tp-dur) var(--tp-ease);
}
.iconbtn:hover{background:var(--tp-surf-2);border-color:var(--tp-line)}
.iconbtn:active{transform:scale(var(--tp-press))}

.iconbtn .dot{
  position:absolute;top:7px;right:8px;
  min-width:17px;height:17px;padding:0 4px;
  display:grid;place-items:center;
  border-radius:var(--tp-r-btn);
  background:var(--tp-bad);
  color:var(--tp-acc-ink);
  border:2px solid var(--tp-canvas);
  font-size:10px;font-weight:800;line-height:1;
}

.page{
  flex:1;
  padding:16px 16px calc(96px + env(safe-area-inset-bottom));
  display:flex;
  flex-direction:column;
  gap:16px;
  min-width:0;
}

.page-flush{padding-left:0;padding-right:0}

/* ------------------------------------------------------------ typography */
.h-display{font-size:var(--tp-hero);line-height:.92}
.h-xl{font-size:30px}
.h-lg{font-size:24px}
.h-md{font-size:19px}
.h-sm{font-size:16px}
.eyebrow{
  font-family:var(--tp-font-mono);
  font-size:11px;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:var(--tp-mute);
}
.muted{color:var(--tp-mute)}
.mono{font-family:var(--tp-font-mono);font-variant-numeric:tabular-nums}
.tabular{font-variant-numeric:tabular-nums}
.small{font-size:13px}
.tiny{font-size:11.5px}
.strong{font-weight:800}
.center{text-align:center}
.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.clamp-2{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}

/* ---------------------------------------------------------------- layout */
.stack{display:flex;flex-direction:column;gap:12px}
.stack-lg{gap:20px}
.stack-sm{gap:8px}
.row{display:flex;align-items:center;gap:10px;min-width:0}
.row-top{align-items:flex-start}
.between{display:flex;align-items:center;justify-content:space-between;gap:10px;min-width:0}
.wrap{flex-wrap:wrap}
.grow{flex:1;min-width:0}
.grid-2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.grid-3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.divider{height:var(--tp-bw);background:var(--tp-line);opacity:.16;border-radius:2px}

/* ----------------------------------------------------------------- cards */
.card{
  background:var(--tp-surf);
  border:var(--tp-bw) solid var(--tp-line);
  border-radius:var(--tp-r);
  box-shadow:var(--tp-sh);
  padding:16px;
  min-width:0;
}
.card-tight{padding:12px}
.card-flat{box-shadow:none}
.card-acc{background:var(--tp-acc);color:var(--tp-acc-ink);border-color:var(--tp-line)}
.card-acc .muted,.card-acc .eyebrow{color:inherit;opacity:.8}
.card-grad{background:var(--tp-grad);color:var(--tp-acc-ink)}
.card-grad .muted,.card-grad .eyebrow{color:inherit;opacity:.82}

/* The one hero tile in a bento grid. */
.tile-hero{
  grid-column:1 / -1;
  background:var(--tp-grad);
  color:var(--tp-acc-ink);
  display:flex;
  flex-direction:column;
  gap:6px;
}
.tile-hero .eyebrow{color:inherit;opacity:.85}

.amount{
  font-family:var(--tp-font-display);
  font-size:34px;
  line-height:1;
  letter-spacing:var(--tp-track-display);
}
.amount-sm{font-size:22px}

.stat-row{display:flex;gap:10px;flex-wrap:wrap}
.stat{
  flex:1 1 120px;
  background:var(--tp-surf-2);
  border:var(--tp-bw) solid var(--tp-line);
  border-radius:var(--tp-r-sm);
  padding:10px 12px;
  min-width:0;
}
.stat b{display:block;font-family:var(--tp-font-display);font-size:18px;letter-spacing:var(--tp-track-display);text-transform:var(--tp-case-display)}
.stat span{font-size:12px;color:var(--tp-mute)}

/* --------------------------------------------------------------- buttons */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:46px;
  padding:11px 20px;
  border-radius:var(--tp-r-btn);
  border:var(--tp-bw) solid var(--tp-line);
  background:var(--tp-acc);
  color:var(--tp-acc-ink);
  font-weight:800;
  font-size:15px;
  cursor:pointer;
  box-shadow:var(--tp-sh-sm);
  transition:transform var(--tp-dur) var(--tp-ease), box-shadow var(--tp-dur) var(--tp-ease);
  text-align:center;
  white-space:nowrap;
}
.btn:hover{transform:translate(-1px,-1px);box-shadow:var(--tp-sh)}
.btn:active{transform:scale(var(--tp-press));box-shadow:none}
.btn[disabled],.btn.is-disabled{opacity:.45;pointer-events:none}
.btn-block{width:100%}
.btn-ghost{
  background:var(--tp-surf);
  color:var(--tp-ink);
}
.btn-quiet{
  background:transparent;
  color:var(--tp-ink);
  box-shadow:none;
  border-color:transparent;
}
.btn-quiet:hover{background:var(--tp-surf-2);border-color:var(--tp-line);transform:none}
.btn-acc2{background:var(--tp-acc-2);color:var(--tp-ink)}
.btn-danger{background:var(--tp-bad);color:var(--tp-acc-ink)}
.btn-sm{min-height:38px;padding:8px 14px;font-size:13.5px}
.btn-xs{min-height:32px;padding:5px 11px;font-size:12px;box-shadow:none}
.btn-block + .btn-block{margin-top:0}

/* ---------------------------------------------------------------- avatars */
.avatar{
  --size:44px;
  width:var(--size);height:var(--size);
  flex:0 0 auto;
  border-radius:50%;
  border:var(--tp-bw) solid var(--tp-line);
  background:var(--tp-surf-2);
  display:grid;
  place-items:center;
  overflow:hidden;
  font-family:var(--tp-font-display);
  font-size:calc(var(--size) * .34);
  letter-spacing:0;
  color:var(--tp-ink);
  text-transform:uppercase;
}
.avatar img{width:100%;height:100%;object-fit:cover;filter:var(--tp-img-filter)}
.avatar-sm{--size:34px}
.avatar-lg{--size:72px}
.avatar-xl{--size:92px}
.avatar-me{border-color:var(--tp-acc);box-shadow:0 0 0 3px var(--tp-acc-2)}

.avatar-stack{display:flex}
.avatar-stack .avatar{margin-left:-10px;box-shadow:0 0 0 3px var(--tp-surf)}
.avatar-stack .avatar:first-child{margin-left:0}

/* ----------------------------------------------------------------- badges */
.badge{
  display:inline-flex;
  align-items:center;
  gap:5px;
  padding:3px 9px;
  border-radius:var(--tp-r-btn);
  border:var(--tp-bw) solid var(--tp-line);
  background:var(--tp-surf-2);
  font-family:var(--tp-font-mono);
  font-size:10.5px;
  letter-spacing:.08em;
  text-transform:uppercase;
  font-weight:700;
  white-space:nowrap;
}
.badge-acc{background:var(--tp-acc);color:var(--tp-acc-ink)}
.badge-gold{background:var(--tp-acc-2);color:var(--tp-ink)}
.badge-good{background:var(--tp-good);color:var(--tp-acc-ink)}
.badge-bad{background:var(--tp-bad);color:var(--tp-acc-ink)}
.badge-plain{background:transparent}

.chip{
  display:inline-flex;align-items:center;gap:6px;
  padding:7px 12px;
  border-radius:var(--tp-r-btn);
  border:var(--tp-bw) solid var(--tp-line);
  background:var(--tp-surf);
  font-size:13px;font-weight:700;
  cursor:pointer;
  white-space:nowrap;
}
.chip.is-on{background:var(--tp-ink);color:var(--tp-bg)}
.chip-row{display:flex;gap:8px;overflow-x:auto;padding:2px 0 4px;scrollbar-width:none}
.chip-row::-webkit-scrollbar{display:none}

/* ----------------------------------------------------------------- forms */
.field{display:flex;flex-direction:column;gap:6px;min-width:0}
.field > label,.label{
  font-family:var(--tp-font-mono);
  font-size:11px;letter-spacing:.12em;
  text-transform:uppercase;
  color:var(--tp-mute);
}
.input,.select,.textarea{
  width:100%;
  min-height:48px;
  padding:12px 14px;
  border-radius:var(--tp-r-sm);
  border:var(--tp-bw) solid var(--tp-line);
  background:var(--tp-surf);
  color:var(--tp-ink);
  font-size:15px;
  transition:box-shadow var(--tp-dur) var(--tp-ease);
}
.input::placeholder,.textarea::placeholder{color:var(--tp-mute);opacity:.75}
.input:focus,.select:focus,.textarea:focus{
  outline:none;
  box-shadow:var(--tp-sh-sm);
}
.textarea{min-height:92px;resize:vertical;line-height:1.4}
.select{
  appearance:none;
  background-image:linear-gradient(45deg,transparent 50%,currentColor 50%),linear-gradient(135deg,currentColor 50%,transparent 50%);
  background-position:calc(100% - 20px) 51%,calc(100% - 14px) 51%;
  background-size:6px 6px,6px 6px;
  background-repeat:no-repeat;
  padding-right:40px;
}
.hint{font-size:12px;color:var(--tp-mute)}
.field-error{font-size:12.5px;color:var(--tp-bad);font-weight:700}
/* minmax(0,1fr) is load-bearing: an uncapped auto column lets a wide child
   (.form-split's 180px pairs) widen the whole form past a phone screen. */
.form-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:14px}
.form-split{display:grid;gap:14px;grid-template-columns:repeat(auto-fit,minmax(180px,1fr))}
.form-grid > *,.form-split > *{min-width:0}
.check{display:flex;align-items:center;gap:10px;font-size:14px;cursor:pointer}
.check input{width:20px;height:20px;accent-color:var(--tp-acc)}

/* file picker that looks like a drop zone */
.uploader{
  position:relative;
  border:var(--tp-bw) dashed var(--tp-line);
  border-radius:var(--tp-r);
  background:var(--tp-surf-2);
  min-height:132px;
  display:grid;
  place-items:center;
  gap:6px;
  text-align:center;
  padding:18px;
  cursor:pointer;
  overflow:hidden;
}
.uploader input[type=file]{position:absolute;inset:0;opacity:0;cursor:pointer;width:100%;height:100%}
.uploader.has-preview{padding:0;border-style:solid}
.uploader img{width:100%;height:100%;max-height:260px;object-fit:cover}
.uploader .uploader-icon{color:var(--tp-acc)}

/* --------------------------------------------------------------- progress */
.progress{
  height:12px;
  border-radius:var(--tp-r-btn);
  border:var(--tp-bw) solid var(--tp-line);
  background:var(--tp-surf-2);
  overflow:hidden;
}
.progress > i{
  display:block;
  height:100%;
  background:var(--tp-grad);
  border-radius:var(--tp-r-btn);
  transition:width var(--tp-dur-slow) var(--tp-ease);
}
.progress.is-done > i{background:var(--tp-good)}
.progress-sm{height:8px}

/* Conic star ring: the % is a single CSS variable set inline by the view. */
.ring{
  --pct:0;
  --ring-size:96px;
  width:var(--ring-size);height:var(--ring-size);
  border-radius:50%;
  background:conic-gradient(var(--tp-acc) calc(var(--pct) * 1%), var(--tp-surf-2) 0);
  border:var(--tp-bw) solid var(--tp-line);
  display:grid;place-items:center;
  flex:0 0 auto;
  position:relative;
}
.ring::before{
  content:'';
  position:absolute;inset:9px;
  border-radius:50%;
  background:var(--tp-surf);
  border:var(--tp-bw) solid var(--tp-line);
}
.ring > *{position:relative;z-index:1;text-align:center;line-height:1}
/* The centre disc is a surface colour, so the labels take the ink that belongs
   to that surface. Inheriting instead made them white-on-white whenever a ring
   sat on a gradient card (the star ladder's 0% badge was invisible). */
.ring b{font-family:var(--tp-font-display);font-size:22px;display:block;color:var(--tp-ink)}
.ring span{font-size:10px;color:var(--tp-mute);font-family:var(--tp-font-mono);letter-spacing:.08em;text-transform:uppercase}

/* ------------------------------------------------------------- tab bar */
.tabbar{
  position:fixed;
  left:50%;
  transform:translateX(-50%);
  bottom:0;
  z-index:40;
  width:100%;
  max-width:760px;
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:2px;
  padding:8px 8px calc(8px + env(safe-area-inset-bottom));
  background:var(--tp-surf);
  border-top:var(--tp-bw) solid var(--tp-line);
}
.tab{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:3px;
  min-height:52px;
  border-radius:var(--tp-r-sm);
  color:var(--tp-mute);
  font-size:10.5px;
  font-weight:800;
  letter-spacing:.04em;
  text-transform:uppercase;
  position:relative;
  transition:transform var(--tp-dur) var(--tp-ease),color var(--tp-dur) var(--tp-ease);
}
.tab:active{transform:scale(var(--tp-press))}
.tab .ico{width:24px;height:24px}
.tab.is-on{color:var(--tp-ink);background:var(--tp-surf-2)}
.tab.is-on .ico{stroke-width:2.6}
.tab.is-on::after{
  content:'';position:absolute;top:2px;width:18px;height:3px;border-radius:2px;background:var(--tp-acc);
}
.tab .dot{
  position:absolute;top:4px;right:calc(50% - 20px);
  min-width:16px;height:16px;padding:0 4px;
  display:grid;place-items:center;
  border-radius:var(--tp-r-btn);
  background:var(--tp-bad);color:var(--tp-acc-ink);
  font-size:9.5px;border:2px solid var(--tp-surf);
}

/* --------------------------------------------------------------- flashes */
.flash-stack{
  position:fixed;
  top:12px;left:50%;transform:translateX(-50%);
  z-index:80;
  width:min(680px,calc(100% - 24px));
  display:flex;flex-direction:column;gap:8px;
  pointer-events:none;
}
.flash{
  pointer-events:auto;
  display:flex;align-items:flex-start;gap:10px;
  padding:12px 14px;
  background:var(--tp-surf);
  border:var(--tp-bw) solid var(--tp-line);
  border-radius:var(--tp-r-sm);
  box-shadow:var(--tp-sh);
  font-size:13.5px;
  animation:tp-up var(--tp-dur-slow) var(--tp-ease) both;
}
.flash .ico{color:var(--tp-acc)}
.flash-error .ico{color:var(--tp-bad)}
.flash-success{border-left-width:8px;border-left-color:var(--tp-good)}
.flash-error{border-left-width:8px;border-left-color:var(--tp-bad)}
.flash button{margin-left:auto;background:none;border:0;cursor:pointer;color:var(--tp-mute);padding:2px}

/* ---------------------------------------------------------------- empties */
.empty{
  text-align:center;
  padding:34px 20px;
  border:var(--tp-bw) dashed var(--tp-line);
  border-radius:var(--tp-r);
  background:var(--tp-surf);
  display:flex;flex-direction:column;align-items:center;gap:8px;
}
.empty .empty-ico{
  width:56px;height:56px;border-radius:50%;
  display:grid;place-items:center;
  background:var(--tp-surf-2);
  border:var(--tp-bw) solid var(--tp-line);
  color:var(--tp-acc);
}
.empty h3{font-size:16px}
.empty p{font-size:13.5px;color:var(--tp-mute);max-width:34ch}

.skeleton{
  background:linear-gradient(90deg,var(--tp-surf-2) 25%,var(--tp-surf) 37%,var(--tp-surf-2) 63%);
  background-size:400% 100%;
  animation:tp-shimmer 1.4s linear infinite;
  border-radius:var(--tp-r-sm);
  min-height:14px;
}
@keyframes tp-shimmer{from{background-position:100% 0}to{background-position:-100% 0}}

/* ------------------------------------------------------------------ misc */
.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;
}
.hr{border:0;height:var(--tp-bw);background:var(--tp-line);opacity:.18;margin:4px 0}
.link{color:var(--tp-acc);font-weight:800;text-decoration:underline;text-underline-offset:3px}
.link-quiet{font-weight:800;text-decoration:underline;text-underline-offset:3px}
.pill-amount{
  display:inline-flex;align-items:center;gap:6px;
  padding:6px 11px;border-radius:var(--tp-r-btn);
  border:var(--tp-bw) solid var(--tp-line);
  background:var(--tp-acc-2);color:var(--tp-ink);
  font-weight:800;font-size:13px;white-space:nowrap;
}
.pill-amount .ico{width:16px;height:16px}
/* ------------------------------------------------------------------ feed */
.stories{
  display:flex;gap:12px;overflow-x:auto;
  padding:2px 16px 8px;
  scrollbar-width:none;
}
.stories::-webkit-scrollbar{display:none}
/* The add tile is a <button>; without this reset it inherits the UA button
   background (light) and glows white on the dark canvas. */
.story{
  display:flex;flex-direction:column;align-items:center;gap:8px;width:68px;flex:0 0 auto;
  background:transparent;border:0;padding:0;color:inherit;font:inherit;cursor:pointer;
}
.story .ring{--ring-size:62px;background:conic-gradient(var(--tp-acc-2) calc(var(--pct,100) * 1%),var(--tp-surf-2) 0)}
.story .ring::before{inset:6px}
.story .avatar{--size:48px}
.story span{font-size:10.5px;color:var(--tp-mute);max-width:68px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* Add-a-status tile: a dashed accent ring reads as "new" in both appearances,
   where a flat surface ring disappeared into the dark canvas. */
.story-add .ring{background:var(--tp-surf-2);border-style:dashed;border-color:var(--tp-acc)}
.story-add .ring::before{inset:6px}
.story-add .plus{
  position:relative;z-index:1;width:36px;height:36px;border-radius:50%;
  display:grid;place-items:center;background:var(--tp-acc);color:var(--tp-acc-ink);
}
.story-add .plus .ico{width:20px;height:20px}

.post{
  background:var(--tp-surf);
  border:var(--tp-bw) solid var(--tp-line);
  border-radius:var(--tp-r);
  box-shadow:var(--tp-sh-sm);
  overflow:hidden;
}
.post-head{display:flex;align-items:center;gap:10px;padding:12px 14px}
.post-head .grow{min-width:0}
.post-head .name{font-weight:800;font-size:14.5px;line-height:1.15}
.post-head .meta{font-size:11.5px;color:var(--tp-mute);display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.post-media{
  position:relative;
  background:var(--tp-surf-2);
  border-top:var(--tp-bw) solid var(--tp-line);
  border-bottom:var(--tp-bw) solid var(--tp-line);
  aspect-ratio:4 / 3;
  overflow:hidden;
}
.post-media img{
  width:100%;height:100%;object-fit:cover;
  filter:var(--tp-img-filter);
  transition:transform var(--tp-dur-slow) var(--tp-ease);
}
.post-media:hover img{transform:scale(1.02)}
.post-media .media-tag{
  position:absolute;left:10px;top:10px;
  background:var(--tp-surf);border:var(--tp-bw) solid var(--tp-line);
  border-radius:var(--tp-r-btn);padding:4px 10px;font-size:11px;font-weight:800;
}
.post-body{padding:12px 14px 4px;font-size:14.5px;line-height:1.45;overflow-wrap:anywhere}
.post-actions{
  display:flex;align-items:center;gap:4px;
  padding:6px 8px 8px;
}
.act{
  display:inline-flex;align-items:center;gap:6px;
  padding:8px 11px;border-radius:var(--tp-r-btn);
  border:var(--tp-bw) solid transparent;
  background:transparent;color:var(--tp-mute);
  font-size:12.5px;font-weight:800;cursor:pointer;
  transition:transform var(--tp-dur) var(--tp-ease),color var(--tp-dur) var(--tp-ease),background var(--tp-dur) var(--tp-ease);
  min-height:40px;
}
.act .ico{width:19px;height:19px}
.act:hover{background:var(--tp-surf-2);color:var(--tp-ink);border-color:var(--tp-line)}
.act:active{transform:scale(var(--tp-press))}
.act.is-on{color:var(--tp-bad)}
.act.is-on .ico{fill:currentColor}
.act-acc{margin-left:auto;color:var(--tp-ink)}

.comment-list{display:flex;flex-direction:column;gap:10px;padding:4px 14px 14px}
.comment{display:flex;gap:8px;align-items:flex-start}
.comment .bubble{
  background:var(--tp-surf-2);
  border:var(--tp-bw) solid var(--tp-line);
  border-radius:var(--tp-r-sm);
  padding:8px 11px;font-size:13.5px;min-width:0;overflow-wrap:anywhere;
}
.comment .bubble b{display:block;font-size:12px;margin-bottom:2px}
.comment-form{display:flex;gap:8px;align-items:flex-end;padding:0 14px 14px}
.comment-form .input{min-height:44px;padding:10px 12px}

/* ---------------------------------------------------------------- sheets */
.sheet-backdrop{
  position:fixed;inset:0;background:rgba(11,15,38,.55);
  z-index:60;display:none;
  animation:tp-fade var(--tp-dur) var(--tp-ease) both;
}
.sheet-backdrop.is-open{display:block}
/* Centred with auto margins, never a transform: the open animation is a
   transform, and an animated transform REPLACES the element's own. Centring
   with translateX(-50%) here made the sheet animate to translateY(0) — which
   drops the -50% — leaving it pinned at left:50% and half off the screen. */
.sheet{
  position:fixed;
  left:0;right:0;bottom:0;
  margin-inline:auto;
  width:100%;max-width:760px;
  z-index:61;
  background:var(--tp-surf);
  border:var(--tp-bw) solid var(--tp-line);
  border-bottom:0;
  border-radius:var(--tp-r-lg) var(--tp-r-lg) 0 0;
  padding:8px 16px calc(20px + env(safe-area-inset-bottom));
  display:none;
  max-height:88dvh;
  overflow-y:auto;
}
.sheet.is-open{display:block;animation:tp-sheet var(--tp-dur-slow) var(--tp-ease) both}
.sheet-handle{width:46px;height:5px;border-radius:3px;background:var(--tp-line);opacity:.4;margin:2px auto 12px}
.sheet h2{font-size:18px;margin-bottom:2px}

/* ------------------------------------------------------------------ chat */
.chat-list{display:flex;flex-direction:column}
.chat-row{
  display:flex;align-items:center;gap:12px;
  padding:12px 16px;
  border-bottom:1px solid color-mix(in oklab, var(--tp-line) 22%, transparent);
  transition:background var(--tp-dur) var(--tp-ease);
}
.chat-row:hover{background:var(--tp-surf)}
.chat-row .grow{min-width:0}
.chat-row .who{display:flex;align-items:center;gap:6px}
.chat-row .who b{font-size:14.5px}
.chat-row .preview{font-size:13px;color:var(--tp-mute);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.chat-row .when{font-size:10.5px;color:var(--tp-mute);font-family:var(--tp-font-mono);text-align:right;flex:0 0 auto}
.chat-row .unread{
  display:inline-grid;place-items:center;min-width:20px;height:20px;padding:0 6px;
  border-radius:var(--tp-r-btn);background:var(--tp-acc);color:var(--tp-acc-ink);
  font-size:11px;font-weight:800;
}
.chat-row .unread:empty{display:none}

/* The composer is fixed at 76px and stands ~70px tall, so the tail of the
   conversation needs room for both or the newest bubble hides behind it. */
.thread{
  flex:1;display:flex;flex-direction:column;
  min-height:calc(100dvh - 72px);
  padding-bottom:calc(176px + env(safe-area-inset-bottom));
}
.thread-body{
  flex:1;display:flex;flex-direction:column;gap:8px;
  padding:14px 16px;
}
.bubble-row{display:flex;gap:8px;align-items:flex-end}
.bubble-row.mine{justify-content:flex-end}
.bubble-row .msg{
  max-width:78%;
  padding:10px 13px;
  border-radius:var(--tp-r);
  border:var(--tp-bw) solid var(--tp-line);
  background:var(--tp-surf);
  font-size:14.5px;
  overflow-wrap:anywhere;
  box-shadow:var(--tp-sh-sm);
}
.bubble-row.mine .msg{background:var(--tp-acc);color:var(--tp-acc-ink)}
.bubble-row .stamp{font-size:10px;color:var(--tp-mute);font-family:var(--tp-font-mono);margin-bottom:4px}
.bubble-row.mine .stamp{text-align:right}

.composer{
  position:fixed;bottom:calc(76px + env(safe-area-inset-bottom));
  left:50%;transform:translateX(-50%);
  width:100%;max-width:760px;
  display:flex;gap:8px;align-items:flex-end;
  padding:10px 12px;
  background:var(--tp-surf);
  border-top:var(--tp-bw) solid var(--tp-line);
  z-index:35;
}
.composer .input{min-height:46px;border-radius:var(--tp-r-btn);padding:11px 16px}
.composer .send{
  width:48px;height:48px;border-radius:50%;
  display:grid;place-items:center;flex:0 0 auto;
  background:var(--tp-acc);color:var(--tp-acc-ink);
  border:var(--tp-bw) solid var(--tp-line);
  cursor:pointer;box-shadow:var(--tp-sh-sm);
}
.composer .send:active{transform:scale(var(--tp-press))}
.thread-goal{
  font-size:12px;background:var(--tp-surf-2);
  border:var(--tp-bw) solid var(--tp-line);
  border-radius:var(--tp-r-sm);
  padding:8px 10px;margin:10px 16px 0;
}

/* ---------------------------------------------------------------- reward */
.task{
  display:flex;align-items:center;gap:12px;
  padding:12px;
  border:var(--tp-bw) solid var(--tp-line);
  border-radius:var(--tp-r-sm);
  background:var(--tp-surf);
}
.task + .task{margin-top:8px}
.task .task-ico{
  width:42px;height:42px;border-radius:var(--tp-r-sm);
  display:grid;place-items:center;flex:0 0 auto;
  background:var(--tp-surf-2);border:var(--tp-bw) solid var(--tp-line);
  color:var(--tp-acc);
}
.task.is-done{background:color-mix(in oklab,var(--tp-good) 12%,var(--tp-surf))}
.task.is-done .task-ico{background:var(--tp-good);color:var(--tp-acc-ink)}
.task .task-body{flex:1;min-width:0}
.task .task-title{font-weight:800;font-size:14px}
.task .task-meta{font-size:11.5px;color:var(--tp-mute);display:flex;gap:6px;align-items:center;flex-wrap:wrap}
.task .task-pay{font-weight:800;font-size:13px;white-space:nowrap}

.hub-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.hub-link{
  display:flex;flex-direction:column;gap:8px;
  padding:14px;border-radius:var(--tp-r);
  border:var(--tp-bw) solid var(--tp-line);
  background:var(--tp-surf);box-shadow:var(--tp-sh-sm);
  transition:transform var(--tp-dur) var(--tp-ease),box-shadow var(--tp-dur) var(--tp-ease);
  min-height:104px;
}
.hub-link:hover{transform:translate(-1px,-1px);box-shadow:var(--tp-sh)}
.hub-link .hub-ico{
  width:38px;height:38px;border-radius:var(--tp-r-sm);
  display:grid;place-items:center;
  background:var(--tp-acc-2);color:var(--tp-ink);
  border:var(--tp-bw) solid var(--tp-line);
}
.hub-link b{font-size:14px}
.hub-link span{font-size:11.5px;color:var(--tp-mute)}

.star-row{
  display:flex;align-items:center;gap:12px;
  padding:11px 0;
  border-bottom:1px solid color-mix(in oklab,var(--tp-line) 20%, transparent);
}
.star-row:last-child{border-bottom:0}
.star-badge{
  width:44px;height:44px;flex:0 0 auto;
  display:grid;place-items:center;
  border-radius:50%;
  border:var(--tp-bw) solid var(--tp-line);
  background:var(--tp-surf-2);
  font-family:var(--tp-font-mono);font-weight:700;font-size:13px;
}
.star-row.is-done .star-badge{background:var(--tp-acc-2);color:var(--tp-ink);animation:tp-breathe 3.4s var(--tp-ease) infinite}
.star-row.is-current .star-badge{background:var(--tp-acc);color:var(--tp-acc-ink)}

.ladder{display:flex;gap:8px;align-items:flex-end;padding:6px 0 2px;overflow-x:auto}
.rung{
  flex:1 0 auto;width:40px;display:flex;flex-direction:column;align-items:center;gap:5px;
}
.rung .bar{
  width:100%;border-radius:var(--tp-r-sm) var(--tp-r-sm) 0 0;
  border:var(--tp-bw) solid var(--tp-line);border-bottom:0;
  background:var(--tp-surf-2);
  min-height:14px;
}
.rung.is-done .bar{background:var(--tp-acc)}
.rung.is-current .bar{background:var(--tp-acc-2)}
.rung span{font-size:10px;color:var(--tp-mute);font-family:var(--tp-font-mono)}

.money-row{
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  padding:11px 0;border-bottom:1px solid color-mix(in oklab,var(--tp-line) 18%, transparent);
}
.money-row:last-child{border-bottom:0}
.money-row .m-desc{font-size:13.5px;min-width:0}
.money-row .m-desc small{display:block;color:var(--tp-mute);font-size:11px}
.money-row .m-amt{font-weight:800;font-variant-numeric:tabular-nums;white-space:nowrap}
.m-amt.pos{color:var(--tp-good)}
.m-amt.neg{color:var(--tp-bad)}

/* --------------------------------------------------------------- profile */
.profile-hero{
  display:flex;flex-direction:column;align-items:center;gap:10px;
  text-align:center;padding:22px 16px;
  background:var(--tp-grad);color:var(--tp-acc-ink);
  border-bottom:var(--tp-bw) solid var(--tp-line);
  position:relative;overflow:hidden;
}
.profile-hero .avatar{--size:92px;border-color:var(--tp-acc-ink);box-shadow:0 0 0 4px rgba(253,252,248,.25)}
.profile-hero h1{font-size:24px}
.profile-hero .handle{font-family:var(--tp-font-mono);font-size:12px;opacity:.9}
.profile-hero .bio{max-width:44ch;font-size:13.5px;opacity:.95}

.menu-list{display:flex;flex-direction:column;background:var(--tp-surf);border:var(--tp-bw) solid var(--tp-line);border-radius:var(--tp-r);overflow:hidden;box-shadow:var(--tp-sh-sm)}
.menu-item{
  display:flex;align-items:center;gap:12px;
  padding:14px 16px;
  border-bottom:1px solid color-mix(in oklab,var(--tp-line) 20%, transparent);
  min-height:56px;
  background:var(--tp-surf);
  transition:background var(--tp-dur) var(--tp-ease);
}
.menu-item:last-child{border-bottom:0}
.menu-item:hover{background:var(--tp-surf-2)}
.menu-item .m-ico{
  width:36px;height:36px;border-radius:var(--tp-r-sm);
  display:grid;place-items:center;flex:0 0 auto;
  background:var(--tp-surf-2);border:var(--tp-bw) solid var(--tp-line);
}
.menu-item .grow b{display:block;font-size:14.5px}
.menu-item .grow span{font-size:11.5px;color:var(--tp-mute)}
.menu-item .chev{color:var(--tp-mute)}

/* ----------------------------------------------------------------- groups */
.group-card{
  display:flex;gap:12px;align-items:flex-start;
  padding:14px;border:var(--tp-bw) solid var(--tp-line);
  border-radius:var(--tp-r);background:var(--tp-surf);
  box-shadow:var(--tp-sh-sm);
}
.group-cover{
  width:56px;height:56px;border-radius:var(--tp-r-sm);flex:0 0 auto;
  display:grid;place-items:center;
  background:var(--tp-grad);color:var(--tp-acc-ink);
  border:var(--tp-bw) solid var(--tp-line);
  font-family:var(--tp-font-display);font-size:20px;
}

/* ---------------------------------------------------------------- contest */
.contest-hero{
  position:relative;
  border:var(--tp-bw) solid var(--tp-line);
  border-radius:var(--tp-r);
  overflow:hidden;
  background:var(--tp-grad);color:var(--tp-acc-ink);
  box-shadow:var(--tp-sh);
  padding:20px;
  display:flex;flex-direction:column;gap:8px;
}
.contest-hero .prize{
  font-family:var(--tp-font-display);font-size:40px;line-height:1;
  letter-spacing:var(--tp-track-display);
}
.contest-hero .countdown{font-family:var(--tp-font-mono);font-size:12px;letter-spacing:.08em;text-transform:uppercase}
.entry-rank{
  position:absolute;top:10px;left:10px;z-index:2;
  width:30px;height:30px;border-radius:50%;
  display:grid;place-items:center;
  background:var(--tp-surf);color:var(--tp-ink);
  border:var(--tp-bw) solid var(--tp-line);
  font-family:var(--tp-font-mono);font-weight:700;font-size:12px;
}
.entry-card{position:relative}
.entry-card.is-leader{border-color:var(--tp-acc);box-shadow:0 0 0 3px var(--tp-acc-2),var(--tp-sh)}

/* ------------------------------------------------------------------ admin */
.admin-shell{display:grid;grid-template-columns:230px minmax(0,1fr);min-height:100dvh}
.admin-side{
  background:var(--tp-ink);
  color:var(--tp-bg);
  padding:18px 14px;
  display:flex;flex-direction:column;gap:6px;
  border-right:var(--tp-bw) solid var(--tp-line);
  position:sticky;top:0;height:100dvh;overflow-y:auto;
}
.admin-side .brand{color:var(--tp-bg);margin-bottom:14px;font-size:19px}
.admin-side .brand .brand-mark{width:23px;height:23px}
.admin-side .brand:hover{opacity:.9}
.admin-link{
  display:flex;align-items:center;gap:10px;
  padding:10px 12px;border-radius:var(--tp-r-sm);
  font-size:13.5px;font-weight:700;
  color:var(--tp-bg);opacity:.78;
  border:2px solid transparent;
}
.admin-link:hover{opacity:1;background:rgba(255,255,255,.08)}
.admin-link.is-on{opacity:1;background:var(--tp-bg);color:var(--tp-ink);border-color:var(--tp-line)}
.admin-link .ico{width:18px;height:18px}
.admin-main{padding:22px;display:flex;flex-direction:column;gap:18px;min-width:0}
.admin-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.admin-head h1{font-size:24px}

.kpi-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:12px}
.kpi{
  background:var(--tp-surf);border:var(--tp-bw) solid var(--tp-line);
  border-radius:var(--tp-r);padding:14px;box-shadow:var(--tp-sh-sm);
}
.kpi .k-label{font-family:var(--tp-font-mono);font-size:10.5px;letter-spacing:.1em;text-transform:uppercase;color:var(--tp-mute)}
.kpi .k-value{font-family:var(--tp-font-display);font-size:26px;letter-spacing:var(--tp-track-display);text-transform:var(--tp-case-display);line-height:1.1;margin-top:4px}
.kpi .k-note{font-size:11.5px;color:var(--tp-mute);margin-top:2px}

.table-wrap{overflow-x:auto;border:var(--tp-bw) solid var(--tp-line);border-radius:var(--tp-r);background:var(--tp-surf);box-shadow:var(--tp-sh-sm)}
table.data{width:100%;border-collapse:collapse;font-size:13px;min-width:640px}
table.data th{
  text-align:left;padding:10px 12px;
  background:var(--tp-surf-2);
  border-bottom:var(--tp-bw) solid var(--tp-line);
  font-family:var(--tp-font-mono);font-size:10.5px;
  letter-spacing:.1em;text-transform:uppercase;
  white-space:nowrap;
}
table.data td{padding:10px 12px;border-bottom:1px solid color-mix(in oklab,var(--tp-line) 18%, transparent);vertical-align:middle}
table.data tr:last-child td{border-bottom:0}
table.data tr:hover td{background:color-mix(in oklab,var(--tp-surf-2) 45%, transparent)}
.cell-user{display:flex;align-items:center;gap:8px;min-width:0}
.cell-user b{display:block;font-size:13px}
.cell-user span{font-size:11px;color:var(--tp-mute)}
.inline-form{display:inline-flex;align-items:center;gap:6px;flex-wrap:wrap}
.inline-form .input{min-height:36px;padding:6px 9px;font-size:12.5px;width:120px}

/* ---------------------------------------------------------------- landing */
.landing{max-width:1080px;margin:0 auto;padding:0 20px 80px}
.landing-nav{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:20px 0}
.landing-nav .links{display:flex;gap:18px;font-size:13.5px;font-weight:700;color:var(--tp-mute)}
.landing-nav .links a:hover{color:var(--tp-ink)}

.hero{
  display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr);
  gap:28px;align-items:center;padding:26px 0 40px;
}
.hero h1{font-size:clamp(38px,6vw,60px);line-height:.94}
.hero .lede{font-size:16px;color:var(--tp-mute);max-width:46ch;margin-top:14px}
.hero-cta{display:flex;gap:10px;flex-wrap:wrap;margin-top:22px}
.hero-badge{display:flex;align-items:center;gap:10px;margin-top:18px;font-size:12.5px;color:var(--tp-mute)}
.hero-visual{
  position:relative;
  border:var(--tp-bw) solid var(--tp-line);
  border-radius:var(--tp-r-lg);
  box-shadow:var(--tp-sh);
  background:var(--tp-grad);
  color:var(--tp-acc-ink);
  padding:20px;
  display:flex;flex-direction:column;gap:12px;
  min-height:320px;
  overflow:hidden;
}
.hero-visual .hv-top{display:flex;align-items:center;gap:8px;font-family:var(--tp-font-mono);font-size:11px;letter-spacing:.1em;text-transform:uppercase;opacity:.9}
.hero-visual .hv-amount{font-family:var(--tp-font-display);font-size:52px;line-height:.95}
.hero-visual .hv-list{display:flex;flex-direction:column;gap:8px;margin-top:auto}
.hero-visual .hv-item{display:flex;align-items:center;justify-content:space-between;gap:10px;background:rgba(253,252,248,.16);border:2px solid rgba(253,252,248,.55);border-radius:var(--tp-r-sm);padding:8px 10px;font-size:12.5px;font-weight:700}
.hero-visual .hv-item b{font-family:var(--tp-font-mono)}

.section{padding:34px 0;border-top:var(--tp-bw) solid var(--tp-line)}
.section-head{display:flex;align-items:flex-end;justify-content:space-between;gap:14px;flex-wrap:wrap;margin-bottom:18px}
.section-head h2{font-size:clamp(24px,3.4vw,32px)}
.section-head p{font-size:13.5px;color:var(--tp-mute);max-width:52ch}

.bento{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.bento .cell{
  border:var(--tp-bw) solid var(--tp-line);border-radius:var(--tp-r);
  background:var(--tp-surf);box-shadow:var(--tp-sh-sm);padding:16px;
  display:flex;flex-direction:column;gap:8px;min-height:132px;
}
.bento .cell.wide{grid-column:span 2}
.bento .cell.dark{background:var(--tp-ink);color:var(--tp-bg)}
.bento .cell.dark .muted{color:inherit;opacity:.7}
.bento .cell.acc{background:var(--tp-acc-2);color:var(--tp-ink)}
.bento .cell .big{font-family:var(--tp-font-display);font-size:34px;line-height:1}

.pay-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.pay-card{
  border:var(--tp-bw) solid var(--tp-line);border-radius:var(--tp-r-lg);
  background:var(--tp-surf);box-shadow:var(--tp-sh);padding:20px;
  display:flex;flex-direction:column;gap:10px;position:relative;
}
.pay-card.is-featured{background:var(--tp-ink);color:var(--tp-bg)}
.pay-card.is-featured .muted{color:inherit;opacity:.72}
.pay-card .price{font-family:var(--tp-font-display);font-size:38px;line-height:1}
.pay-card ul{margin:0;padding-left:18px;font-size:13.5px;display:flex;flex-direction:column;gap:6px}
.pay-card .tag{position:absolute;top:-13px;right:16px}

.task-table{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.task-line{
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  padding:11px 14px;background:var(--tp-surf);border:var(--tp-bw) solid var(--tp-line);
  border-radius:var(--tp-r-sm);font-size:13.5px;
}
.task-line b{font-family:var(--tp-font-mono);white-space:nowrap}

.steps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;counter-reset:step}
.step{background:var(--tp-surf);border:var(--tp-bw) solid var(--tp-line);border-radius:var(--tp-r);padding:16px;box-shadow:var(--tp-sh-sm);position:relative}
.step::before{
  counter-increment:step;content:counter(step);
  font-family:var(--tp-font-display);font-size:26px;
  display:block;margin-bottom:6px;color:var(--tp-acc);
}

.landing-footer{
  border-top:var(--tp-bw) solid var(--tp-line);
  padding:22px 0 0;display:flex;justify-content:space-between;gap:14px;flex-wrap:wrap;
  font-size:12.5px;color:var(--tp-mute);
}

/* ------------------------------------------------------------------- auth */
/* One column by default: the artwork panel is hidden below 900px, and a
   fixed two-column grid would still hand it half of a phone screen. */
.auth-wrap{
  min-height:100dvh;
  display:grid;
  grid-template-columns:minmax(0,1fr);
  max-width:1080px;margin:0 auto;
}
.auth-side{
  background:var(--tp-grad);color:var(--tp-acc-ink);
  padding:40px 36px;
  display:none;flex-direction:column;justify-content:space-between;
  border-right:var(--tp-bw) solid var(--tp-line);
}
.auth-side .quote{font-family:var(--tp-font-display);font-size:clamp(26px,3.4vw,38px);line-height:.98;max-width:20ch}
.auth-main{
  padding:28px 22px 60px;
  display:flex;flex-direction:column;gap:18px;
  max-width:480px;width:100%;margin:0 auto;justify-content:center;
  min-height:100dvh;
}
.auth-main h1{font-size:clamp(28px,7vw,38px)}
.auth-switch{display:flex;gap:6px;background:var(--tp-surf-2);border:var(--tp-bw) solid var(--tp-line);border-radius:var(--tp-r-btn);padding:4px}
.auth-switch a{
  flex:1;text-align:center;padding:9px 12px;border-radius:var(--tp-r-btn);
  font-size:12.5px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--tp-mute);
}
.auth-switch a.is-on{background:var(--tp-surf);color:var(--tp-ink);box-shadow:var(--tp-sh-sm)}
.auth-legal{font-size:11.5px;color:var(--tp-mute);text-align:center;line-height:1.5}
.auth-trust{display:flex;gap:14px;flex-wrap:wrap;font-size:11.5px;color:var(--tp-mute)}
.auth-trust span{display:inline-flex;align-items:center;gap:6px}

/* ---------------------------------------------------------------- toasts */
.toast-stack{
  position:fixed;left:50%;transform:translateX(-50%);
  bottom:calc(98px + env(safe-area-inset-bottom));
  z-index:90;width:min(420px,calc(100% - 24px));
  display:flex;flex-direction:column;gap:8px;pointer-events:none;
}
.toast{
  pointer-events:auto;
  display:flex;align-items:center;gap:10px;
  padding:12px 14px;
  border:var(--tp-bw) solid var(--tp-line);
  border-radius:var(--tp-r-btn);
  background:var(--tp-ink);color:var(--tp-bg);
  font-size:13px;font-weight:700;
  box-shadow:var(--tp-sh);
  animation:tp-pop var(--tp-dur-slow) var(--tp-ease) both;
}
.toast .ico{width:18px;height:18px;color:var(--tp-acc-2)}
.toast.is-error{background:var(--tp-bad);color:var(--tp-acc-ink)}
.toast.is-error .ico{color:inherit}

/* ------------------------------------------------------------ responsive */
@media (min-width:900px){
  .auth-wrap{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
  .auth-side{display:flex}
  .page{padding:22px 22px 120px}
  .tabbar{max-width:760px}
  /* The artwork panel carries the wordmark, so the form must not repeat it
     right next to it — on a phone the panel is hidden and this one is the
     only brand on the page. */
  .auth-main > .brand{display:none}
}

/* Centring a form taller than the screen pushes its top out of reach, so on
   small viewports the auth panel starts at the top and scrolls normally. */
@media (max-width:899px){
  .auth-main{justify-content:flex-start;padding:30px 18px 56px}
}

@media (max-width:899px){
  .hero{grid-template-columns:minmax(0,1fr);padding-top:8px}
  .hero-visual{min-height:260px;order:-1}
  .bento{grid-template-columns:repeat(2,minmax(0,1fr))}
  .bento .cell.wide{grid-column:span 2}
  .steps{grid-template-columns:minmax(0,1fr)}
  .admin-shell{grid-template-columns:minmax(0,1fr)}
  /* The sidebar becomes an off-canvas drawer: the nav no longer eats the top
     of a phone screen, and the menu button is always within thumb reach. */
  .admin-bar{
    display:flex;align-items:center;gap:8px;
    position:sticky;top:0;z-index:40;
    margin:-16px -16px 0;
    padding:8px 12px;
    background:var(--tp-canvas);
    border-bottom:var(--tp-bw) solid var(--tp-line);
  }
  .admin-bar .brand{font-size:20px}
  .admin-side{
    position:fixed;top:0;left:0;bottom:0;
    width:min(282px,84vw);height:100dvh;
    flex-direction:column;flex-wrap:nowrap;gap:6px;
    padding:16px 14px;
    border-right:var(--tp-bw) solid var(--tp-line);
    border-bottom:0;
    transform:translateX(-102%);
    transition:transform 260ms var(--tp-ease);
    z-index:62;
    box-shadow:4px 0 0 rgba(0,0,0,.35);
  }
  .admin-side.is-open{transform:translateX(0)}
  .admin-side .brand{width:auto;margin-bottom:14px}
  .admin-nav-close{display:grid;place-self:end;color:var(--tp-bg);border-color:transparent}
  .admin-nav-close:hover{background:rgba(255,255,255,.12);border-color:transparent}
  .admin-scrim{
    display:block;position:fixed;inset:0;z-index:61;
    background:rgba(11,15,38,.55);
    opacity:0;pointer-events:none;
    transition:opacity 200ms var(--tp-ease);
  }
  .admin-scrim.is-open{opacity:1;pointer-events:auto}
  .admin-link{font-size:13.5px;padding:10px 12px}
  .admin-main{padding:16px}
}

@media (max-width:560px){
  .bento{grid-template-columns:minmax(0,1fr)}
  .bento .cell.wide{grid-column:span 1}
  .pay-grid{grid-template-columns:minmax(0,1fr)}
  .task-table{grid-template-columns:minmax(0,1fr)}
  .landing{padding:0 14px 60px}
  .landing-nav .links{display:none}
  .h-display{font-size:42px}
  .hub-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
/* ---------------------------------------------------------------- money --
   The display face (Bungee) has no naira glyph, so a bare money figure
   rendered in display type falls back mid-number and reads as "N0".
   money_html() wraps the symbol in .mny-cur, which uses the body face. */
.mny{white-space:nowrap;font-variant-numeric:tabular-nums}
.mny-cur{
  font-family:var(--tp-font-body);
  font-size:.62em;
  font-weight:600;
  letter-spacing:0;
  margin-right:.1em;
  vertical-align:.06em;
  opacity:.85;
}
.amount .mny-cur,
.h-lg .mny-cur{font-size:.52em}

/* ------------------------------------------------- password reveal ------ */
/* app.js wraps every input[type=password] in .pw-wrap and appends the button,
   so new password fields get the toggle for free. */
.pw-wrap{position:relative;display:block}
.pw-wrap > .input{padding-right:52px}
.pw-toggle{
  position:absolute;top:50%;right:4px;transform:translateY(-50%);
  width:40px;height:40px;
  display:grid;place-items:center;
  border:0;border-radius:var(--tp-r-sm);
  background:transparent;color:var(--tp-mute);
  cursor:pointer;
  transition:color var(--tp-dur) var(--tp-ease), background var(--tp-dur) var(--tp-ease);
}
.pw-toggle:hover{color:var(--tp-ink);background:var(--tp-surf-2)}
.pw-toggle:focus-visible{outline:3px solid var(--tp-acc);outline-offset:-1px}
.pw-toggle[aria-pressed="true"]{color:var(--tp-ink)}

/* ------------------------------------------------- admin drawer chrome -- */
/* The drawer chrome is phone-only, so it is hidden from 900px up rather than
   globally: these rules sit after the responsive block in the file, and a
   global display:none would win over the media query by source order. */
@media (min-width:900px){
  .admin-bar,
  .admin-nav-close,
  .admin-scrim{display:none}
}
/* The drawer is a modal surface on a phone: the page behind it must not scroll
   under the thumb. The class is only ever set while the drawer is open. */
body.admin-nav-open{overflow:hidden}
/* ------------------------------------------------------- confirm dialog -- */
/* In-app replacement for window.confirm(). Injected by app.js, so every
   confirm in the app — admin and member — looks and behaves the same.
   Centred by grid, never by a transform, and the open animation runs on the
   card so it cannot fight the placement (see the `.sheet` note above). */
.confirm-layer{
  position:fixed;inset:0;z-index:120;
  display:none;
  place-items:center;
  padding:20px;
}
.confirm-layer.is-open{display:grid}
.confirm-scrim{
  position:absolute;inset:0;
  background:rgba(11,15,38,.62);
  animation:tp-fade var(--tp-dur) var(--tp-ease) both;
}
.confirm-card{
  position:relative;z-index:1;
  width:100%;max-width:404px;
  max-height:calc(100dvh - 40px);
  overflow-y:auto;
  background:var(--tp-surf);
  border:var(--tp-bw) solid var(--tp-line);
  border-radius:var(--tp-r-lg);
  box-shadow:var(--tp-sh);
  padding:20px;
  display:flex;flex-direction:column;gap:10px;
  animation:tp-pop var(--tp-dur-slow) var(--tp-ease) both;
}
.confirm-ico{
  width:46px;height:46px;flex:0 0 auto;
  border-radius:50%;
  display:grid;place-items:center;
  background:var(--tp-acc-2);color:var(--tp-ink);
  border:var(--tp-bw) solid var(--tp-line);
}
.confirm-ico svg{width:24px;height:24px;stroke:currentColor;fill:none;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.confirm-card.is-danger .confirm-ico{
  background:color-mix(in oklab,var(--tp-bad) 16%,var(--tp-surf));
  color:var(--tp-bad);
  border-color:var(--tp-bad);
}
.confirm-card h2{font-size:19px;line-height:1.2}
.confirm-card p{font-size:14px;line-height:1.5;color:var(--tp-mute);overflow-wrap:anywhere}
.confirm-actions{display:flex;gap:8px;margin-top:8px}
.confirm-actions .btn{flex:1 1 0;min-width:0;padding-left:12px;padding-right:12px}
/* The page behind a dialog must not scroll under the thumb. */
body.confirm-open{overflow:hidden}
