:root{
  --bg:#050505;
  --panel:#111111;
  --panel-2:#191919;
  --panel-3:#222222;
  --text:#f4f4f4;
  --muted:#a7a7a7;
  --soft:#747474;
  --line:#303030;
  --line-2:#454545;
  --active:#ffffff;
  --danger:#5e1d1d;
}

*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}

html,body{min-height:100%}

body{
  margin:0;
  color:var(--text);
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  background:
    radial-gradient(circle at 25% -10%,#2c2c2c 0,#050505 42%),
    linear-gradient(180deg,#090909,#050505);
}

button,input,select{font:inherit;font-size:16px}

button{
  cursor:pointer;
  user-select:none;
  -webkit-appearance:none;
  appearance:none;
  touch-action:manipulation;
}

button:disabled{
  cursor:not-allowed;
  opacity:.36;
}

input,select{
  width:100%;
  border:1px solid var(--line);
  border-radius:15px;
  padding:12px 14px;
  color:var(--text);
  background:#080808;
  outline:none;
}

input:focus,select:focus{
  border-color:#e5e5e5;
  box-shadow:0 0 0 3px #ffffff1a;
}

.app{
  width:min(1060px,100%);
  margin:0 auto;
  padding:24px 16px 42px;
}

.hero{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:22px;
  margin-bottom:16px;
  border:1px solid var(--line);
  border-radius:30px;
  background:#101010;
}

.eyebrow{
  color:var(--muted);
  letter-spacing:.22em;
  font-size:11px;
  font-weight:850;
  text-transform:uppercase;
  margin-bottom:10px;
}

h1,h2,h3,p{margin:0}

h1{
  font-size:clamp(36px,5.6vw,62px);
  line-height:.94;
  letter-spacing:-.06em;
  font-weight:920;
}

h2{
  font-size:25px;
  letter-spacing:-.04em;
}

h3{
  font-size:18px;
}

.header-menu{
  display:flex;
  gap:8px;
  padding:6px;
  border:1px solid var(--line);
  border-radius:20px;
  background:#070707;
}

.header-menu button{
  border:0;
  border-radius:15px;
  padding:11px 14px;
  color:var(--muted);
  background:transparent;
}

.header-menu button.active{
  color:var(--text);
  background:#141414;
  box-shadow:inset 0 0 0 2px #ededed;
  font-weight:900;
}

.tabs{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:8px;
  padding:8px;
  border:1px solid var(--line);
  border-radius:24px;
  background:#101010;
  margin-bottom:20px;
}

.tab{
  border:0;
  border-radius:17px;
  padding:13px 10px;
  color:var(--muted);
  background:transparent;
}

.tab:hover,.header-menu button:hover{
  color:var(--text);
  background:#1b1b1b;
}

.tab.active{
  color:#050505;
  font-weight:900;
  background:#ededed;
}

.panel{
  min-height:360px;
}

.toolbar,.section-head,.card{
  border:1px solid var(--line);
  background:#101010;
}

.toolbar,.section-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
  border-radius:26px;
  padding:16px;
  margin-bottom:24px;
}

.period-control,.stepper,.segmented,.actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.toolbar-label{
  color:var(--muted);
  font-size:12px;
  margin-bottom:3px;
}

.icon-btn,.stepper button,.segmented button,.primary,.danger,.actions button{
  border:1px solid var(--line-2);
  border-radius:15px;
  padding:11px 14px;
  color:var(--text);
  background:#1a1a1a;
}

.icon-btn{
  width:44px;
  aspect-ratio:1;
  padding:0;
}

.stepper,.segmented{
  padding:5px;
  border-radius:19px;
  background:#070707;
  border:1px solid var(--line);
}

.stepper span{
  padding-left:8px;
  color:var(--muted);
  font-size:13px;
}

.stepper strong{
  min-width:28px;
  text-align:center;
}

.segmented button.active{
  color:#050505;
  font-weight:900;
  background:#ededed;
}

.primary{
  color:#050505;
  font-weight:900;
  background:#ededed;
  border-color:#ededed;
}

.danger{
  background:#541d1d;
  border-color:#7a2d2d;
}

.ring-grid{
  width:min(860px,100%);
  margin:0 auto;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:26px;
}

.time-ring{
  width:min(100%,360px);
  aspect-ratio:1/1;
  margin:0 auto;
  position:relative;
  border-radius:50%;
  border:2px solid #303030;
  color:var(--text);
  text-align:center;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:30px 24px 56px;
  background:#151515;
  transition:border-color .16s ease,background .16s ease;
}

.time-ring:hover{
  transform:translateY(-2px);
  background:#1b1b1b;
}

.time-ring.active{
  border-color:#f4f4f4;
  background:#202020;
  animation:none;
}

@keyframes ringPulse{
  0%,100%{transform:scale(1)}
  50%{transform:scale(1.015)}
}

.tag-ring{
  background:#141414;
  border-color:#3a3a3a;
}

.tag-ring:hover{
  background:#1b1b1b;
}

.tag-ring.active{
  border-color:#d8d8d8;
  background:#202020;
}

.ring-title{
  max-width:88%;
  font-size:clamp(19px,2.6vw,28px);
  line-height:1.05;
  font-weight:900;
  letter-spacing:-.05em;
}

.tagline{
  color:var(--muted);
  font-size:12px;
  max-width:82%;
  min-height:16px;
}

.ring-time{
  font-weight:950;
  font-size:clamp(18px,2.6vw,28px);
  letter-spacing:-.05em;
}

.ring-percent{
  color:var(--muted);
  font-size:12px;
  font-weight:750;
  letter-spacing:.02em;
}

.ring-state{
  color:var(--muted);
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.13em;
  font-weight:800;
}

.active .ring-state{
  color:#ffffff;
}

.reward{
  position:absolute;
  left:50%;
  bottom:16px;
  transform:translateX(-50%);
  max-width:86%;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:5px;
  white-space:nowrap;
  padding:7px 11px;
  border-radius:999px;
  color:#eeeeee;
  background:#050505;
  border:1px solid #444444;
  font-size:17px;
  line-height:1;
}

.reward span{
  color:#ffffff;
  font-size:14px;
  font-weight:950;
  margin-left:2px;
}

.list,.session-list{
  display:grid;
  gap:14px;
}

.card{
  border-radius:24px;
  padding:18px;
}

.list-item{
  cursor:pointer;
  transition:.16s ease;
}

.list-item:hover{
  transform:translateY(-2px);
  border-color:#606060;
}

.list-item.active{
  border-color:#ededed;
}

.list-item b{
  font-size:18px;
}

.list-item p{
  color:var(--muted);
  margin-top:8px;
  line-height:1.45;
}

.date-group{
  display:grid;
  gap:10px;
}

.date-divider{
  display:flex;
  align-items:center;
  gap:12px;
  margin:10px 0 2px;
  color:#ededed;
  font-size:13px;
  font-weight:900;
  letter-spacing:.08em;
}

.date-divider:before,.date-divider:after{
  content:"";
  height:1px;
  flex:1;
  background:#303030;
}

.session-row{
  display:grid;
  grid-template-columns:1fr auto auto;
  align-items:center;
  gap:14px;
  padding:15px 16px;
  border:1px solid var(--line);
  border-radius:20px;
  background:#101010;
  cursor:pointer;
}

.session-row:hover{
  border-color:#606060;
}

.session-row.active{
  border-color:#ededed;
}

.session-time{
  color:var(--muted);
  font-weight:750;
}

.pill{
  display:inline-flex;
  vertical-align:middle;
  margin-left:8px;
  padding:4px 8px;
  border-radius:999px;
  color:#050505;
  background:#ededed;
  font-size:11px;
  font-weight:900;
}

.challenge{
  margin-top:12px;
  padding:12px 14px;
  border-left:3px solid #ededed;
  border-radius:14px;
  color:#eeeeee;
  background:#1a1a1a;
}

.form{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:16px;
  margin:18px 0;
}

label{
  display:grid;
  gap:8px;
  color:#d0d0d0;
  font-size:13px;
  font-weight:650;
}

label.check{
  display:flex;
  align-items:center;
  gap:10px;
  padding:13px 14px;
  border-radius:18px;
  border:1px solid var(--line);
  background:#080808;
}

label.check input{
  width:auto;
}

dialog{
  width:min(760px,92vw);
  border:1px solid #555555;
  border-radius:28px;
  padding:24px;
  color:var(--text);
  background:#101010;
}

dialog::backdrop{
  background:#000c;
}

.actions{
  justify-content:flex-end;
  margin-top:20px;
  padding-top:18px;
  border-top:1px solid var(--line);
}

.debug-actions{
  justify-content:flex-start;
  border-top:0;
  padding-top:0;
  margin:14px 0;
}

.muted{
  color:var(--muted);
}

.warn{
  color:#ffffff;
  margin-top:10px;
}

.debug{
  margin-top:28px;
  border-style:dashed;
}

pre{
  white-space:pre-wrap;
  overflow:auto;
  max-height:320px;
  padding:14px;
  border-radius:18px;
  background:#060606;
  border:1px solid var(--line);
}

@media(max-width:760px){
  .app{padding:18px 12px 34px}
  .hero{padding:18px;border-radius:26px;align-items:flex-start;flex-direction:column}
  .header-menu{width:100%;display:grid;grid-template-columns:repeat(3,1fr)}
  .tabs{grid-template-columns:repeat(3,1fr)}
  .ring-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
  .time-ring{padding:18px 12px 46px}
  .reward{bottom:10px;font-size:14px;padding:6px 9px}
  .tagline{font-size:10px}
  .ring-state{font-size:10px}
  .session-row{grid-template-columns:1fr;gap:6px}
}
.gap-box{
  border:1px solid var(--line);
  border-radius:24px;
  background:#101010;
  padding:16px;
  margin-bottom:22px;
}

.gap-box h3{
  margin-bottom:12px;
}

.gap-list{
  display:grid;
  gap:10px;
}

.gap-row{
  display:grid;
  grid-template-columns:1fr auto;
  gap:12px;
  align-items:center;
  width:100%;
  text-align:left;
  border:1px dashed #555555;
  border-radius:18px;
  padding:14px 15px;
  color:var(--text);
  background:#0a0a0a;
}

.gap-row:hover{
  border-style:solid;
  background:#171717;
}

.preset-row{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top:6px;
}

.preset-row button{
  border:1px solid var(--line-2);
  border-radius:999px;
  padding:8px 11px;
  color:var(--text);
  background:#1a1a1a;
}
.block-list{
  width:min(900px,100%);
  margin:0 auto;
  display:grid;
  gap:12px;
}

.time-block{
  position:relative;
  overflow:hidden;
  width:100%;
  min-height:76px;
  border:2px solid #4b4b4b;
  border-radius:22px;
  color:var(--text);
  background:#0b0b0b;
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;
  gap:14px;
  padding:15px 17px;
  text-align:left;
  isolation:isolate;
  transform:none;
  transition:border-color .14s ease,background .14s ease;
}

.time-block:hover{
  background:#101010;
}

.time-block.active{
  border-color:#f4f4f4;
  background:#111111;
}

.time-block.tag-block{
  border-style:dashed;
}

.block-fill{
  position:absolute;
  inset:0 auto 0 0;
  width:0;
  background:#2a2a2a;
  z-index:-1;
  transition:width .24s ease;
}

.time-block.active .block-fill{
  background:#353535;
}

.block-icon{
  width:34px;
  height:34px;
  border:1px solid #555555;
  border-radius:999px;
  display:grid;
  place-items:center;
  color:#f4f4f4;
  background:#050505;
  font-weight:900;
  line-height:1;
}

.time-block.active .block-icon{
  border-color:#f4f4f4;
}

.block-main{
  min-width:0;
  display:grid;
  gap:5px;
}

.block-title{
  font-size:20px;
  line-height:1.1;
  font-weight:900;
  letter-spacing:-.035em;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.block-meta{
  display:flex;
  gap:10px;
  align-items:center;
  color:var(--muted);
  font-size:13px;
  font-weight:750;
}

.block-percent{
  color:#d0d0d0;
}

.block-reward{
  flex:0 0 auto;
  justify-self:end;
  display:inline-flex;
  align-items:center;
  justify-content:flex-end;
  gap:5px;
  width:auto;
  min-width:max-content;
  max-width:none !important;
  height:34px;
  padding:0 10px !important;
  overflow:visible !important;
  white-space:nowrap;
  border-radius:999px;
  border:1px solid #555555;
  background:#050505;
  color:#f4f4f4;
  font-size:16px;
  line-height:1;
}

.block-reward span{
  font-size:13px;
  font-weight:950;
}

@media(max-width:760px){
  .block-list{gap:10px}
  .time-block{
    min-height:68px;
    grid-template-columns:auto 1fr auto;
    gap:10px;
    padding:13px 13px;
    border-radius:19px;
  }
  .block-title{font-size:17px}
  .block-icon{width:30px;height:30px}
  .block-reward{
    max-width:86px;
    font-size:13px;
    padding:6px 8px;
  }
}
.filter-shell{
  width:min(900px,100%);
  margin:0 auto 14px;
}

.filter-toggle{
  width:100%;
  min-height:54px;
  display:grid;
  grid-template-columns:auto auto 1fr;
  gap:10px;
  align-items:center;
  border:1px solid var(--line);
  border-radius:20px;
  padding:12px 14px;
  color:var(--text);
  background:#101010;
  text-align:left;
}

.filter-toggle:hover{
  background:#151515;
}

.filter-icon{
  width:30px;
  height:30px;
  display:grid;
  place-items:center;
  border:1px solid var(--line-2);
  border-radius:999px;
  color:#f4f4f4;
  background:#050505;
  font-weight:900;
}

.filter-title{
  font-weight:900;
}

.filter-summary{
  justify-self:end;
  color:var(--muted);
  font-size:13px;
  font-weight:750;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.filter-shell .toolbar{
  margin:10px 0 18px;
}

.block-reward{
  overflow:hidden !important;
  max-width:190px !important;
  min-width:0;
  height:34px;
  padding:0 10px !important;
  justify-content:flex-end;
  border-color:#444444;
}

.reward-flames{
  flex:0 0 auto;
  display:inline-block;
  white-space:nowrap;
  overflow:visible;
  direction:ltr;
  letter-spacing:0;
  padding:0;
  margin:0;
  font-size:16px;
  line-height:1;
}

.reward-count{
  position:static;
  flex:0 0 auto;
  display:inline-block;
  min-width:auto;
  height:auto;
  padding:0;
  margin:0 0 0 2px;
  border:0;
  border-radius:0;
  color:#f4f4f4 !important;
  background:transparent;
  font-size:13px !important;
  font-weight:950;
  line-height:1;
}

.header-menu button,
.tab,
.time-block{
  -webkit-tap-highlight-color:transparent;
}

.header-menu button:not(.active):active,
.tab:not(.active):active{
  color:var(--text);
  background:#1b1b1b;
}

@media(max-width:760px){
  .filter-summary{font-size:12px}
  .block-reward{
    height:32px;
    padding:0 8px !important;
    font-size:14px;
  }
  .reward-flames{
    font-size:14px;
    letter-spacing:0;
  }
  .reward-count{
    font-size:12px !important;
  }
}


.header-menu button:focus,
.header-menu button:focus-visible,
.tab:focus,
.tab:focus-visible{
  outline:none;
}

@media(hover:none){
  .tab:hover,
  .header-menu button:hover{
    background:transparent;
    color:var(--muted);
  }

  .tab.active:hover{
    color:#050505;
    background:#ededed;
  }

  .header-menu button.active:hover{
    color:var(--text);
    background:#141414;
  }
}
