/* The Idle Hands - styles

   Last updated: 2026-10-29 by Claude for Grá
   Change:  v9. Search box and a fifth button on the bar; Double Shot
            heading; minutes beside the points; edit and add forms; the
            Tab's list of jobs with no time set.
   Before:  v7 undo on the toast, specials, history, what's new.
   Deployed version: (fill in after uploading)
*/
:root{
  --board:#1b2a22; --board-deep:#14201a; --board-worn:#243528;
  --chalk:#f1ede0; --chalk-dim:#b9b7a4; --chalk-amber:#e6bd5c; --chalk-rose:#dd8d86;
  --wood:#573c22; --wood-hi:#7b5730; --wood-lo:#31200f; --ale:#a9702a;
  --bar:74px;
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;padding:0}
body{
  background:#241708;
  background-image:
    repeating-linear-gradient(96deg,rgba(0,0,0,.28) 0 2px,rgba(255,255,255,.03) 2px 5px,rgba(0,0,0,.16) 5px 9px),
    linear-gradient(170deg,#3a2612,#1b1005);
  font-family:'Caveat',ui-rounded,system-ui,sans-serif;
  color:var(--chalk); min-height:100vh;
  padding:10px 10px calc(var(--bar) + env(safe-area-inset-bottom,0px) + 16px);
  padding-top:calc(10px + env(safe-area-inset-top,0px));
}
.frame{
  max-width:540px;margin:0 auto;position:relative;border-radius:5px;padding:13px;
  background:repeating-linear-gradient(91deg,var(--wood-lo) 0 3px,var(--wood) 3px 11px,var(--wood-hi) 11px 13px,var(--wood) 13px 22px);
  box-shadow:0 2px 0 rgba(255,255,255,.10) inset,0 -3px 0 rgba(0,0,0,.45) inset,0 16px 34px rgba(0,0,0,.62);
}
.frame::after{content:"";position:absolute;inset:7px;border-radius:3px;
  box-shadow:0 0 0 1px rgba(0,0,0,.5),0 0 14px rgba(0,0,0,.45) inset;pointer-events:none}
.board{
  position:relative;overflow:hidden;border-radius:3px;padding:18px 15px 24px;min-height:62vh;
  background:
    radial-gradient(120% 70% at 20% 8%,rgba(255,255,255,.055),transparent 60%),
    radial-gradient(90% 60% at 85% 95%,rgba(255,255,255,.035),transparent 60%),
    linear-gradient(158deg,var(--board-worn),var(--board) 40%,var(--board-deep));
  box-shadow:0 0 44px rgba(0,0,0,.55) inset;
}
.board::before{content:"";position:absolute;inset:0;pointer-events:none;opacity:.16;mix-blend-mode:overlay;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='260' height='260'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4'/></filter><rect width='260' height='260' filter='url(%23n)' opacity='.5'/></svg>")}
.board::after{content:"";position:absolute;inset:0;pointer-events:none;opacity:.5;filter:blur(3px);
  background:
    radial-gradient(38% 9% at 72% 22%,rgba(233,238,220,.09),transparent 70%),
    radial-gradient(46% 7% at 28% 58%,rgba(233,238,220,.07),transparent 70%),
    radial-gradient(30% 11% at 60% 81%,rgba(233,238,220,.06),transparent 70%)}
.board>*{position:relative;z-index:2}
.ring{position:absolute;z-index:3;pointer-events:none;width:130px;height:130px;right:-18px;top:86px;opacity:.5;transform:rotate(-9deg)}

.sign{text-align:center;padding-bottom:4px}
.sign h1{
  font-family:'Amatic SC',cursive;font-weight:700;font-size:clamp(38px,11vw,54px);
  line-height:.86;margin:0;color:var(--chalk);
  text-shadow:0 0 1px rgba(241,237,224,.9),0 0 9px rgba(241,237,224,.18);
  -webkit-mask-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='m'><feTurbulence type='fractalNoise' baseFrequency='.7' numOctaves='3'/><feColorMatrix type='matrix' values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1.5 1.15'/></filter><rect width='200' height='200' filter='url(%23m)'/></svg>");
  -webkit-mask-size:200px 200px;
}
.strip{font-size:17px;color:var(--chalk-amber);margin:2px 0 0;letter-spacing:.3px}
.rule{display:block;width:100%;height:12px;margin:4px 0 2px;overflow:visible}
.rule path{fill:none;stroke:var(--chalk-dim);stroke-width:1.7;stroke-linecap:round;opacity:.72;filter:url(#rough)}

.tab{display:flex;gap:9px;margin:10px 0 4px}
.drinker{flex:1;padding:8px 9px 10px;border-radius:2px;background:rgba(255,255,255,.028);
  box-shadow:0 0 0 1px rgba(241,237,224,.13) inset;cursor:pointer;border:0;color:inherit;
  font-family:inherit;text-align:left}
.drinker.active{box-shadow:0 0 0 2px var(--chalk-amber) inset;background:rgba(230,189,92,.07)}
.drinker h2{margin:0;font-family:'Amatic SC',cursive;font-weight:700;font-size:26px;line-height:1;
  display:flex;justify-content:space-between;align-items:baseline;gap:6px}
.drinker h2 span{font-family:'Caveat',cursive;font-size:19px;color:var(--chalk-amber);font-weight:600}
.tally{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px;min-height:24px;align-items:flex-end}
.tally path{stroke:var(--chalk-amber);stroke-width:2.1;fill:none;stroke-linecap:round;filter:url(#rough)}
.owed{font-size:16px;color:var(--chalk-dim);margin:4px 0 0;line-height:1.2}

.settle{font-size:18px;color:var(--chalk-dim);margin:8px 2px 4px;line-height:1.35}
.settle b{color:var(--chalk-amber);font-weight:600}
.empty{font-family:'Amatic SC',cursive;font-weight:700;font-size:30px;color:var(--chalk);
  text-align:center;margin:34px 6px 6px;line-height:1.05}
.spend{background:none;border:0;font-family:'Caveat',cursive;font-size:19px;color:var(--chalk);
  padding:6px 14px;border-radius:2px;box-shadow:0 0 0 1px rgba(241,237,224,.2) inset;cursor:pointer;margin:6px 0 2px}
.spend:disabled{color:var(--chalk-dim);opacity:.5;cursor:default}

section{margin-top:16px}
.head{display:flex;align-items:baseline;gap:8px;cursor:pointer;margin-top:20px}
.head h3{margin:0;font-family:'Amatic SC',cursive;font-weight:700;font-size:31px;line-height:.9;color:var(--chalk)}
.head .when{font-size:17px;color:var(--chalk-dim);flex:1}
.head.late h3{color:var(--chalk-rose)}
.head .caret{font-size:17px;color:var(--chalk-dim)}

ul{list-style:none;margin:7px 0 0;padding:0}
li{display:flex;align-items:flex-start;gap:9px;padding:9px 2px;position:relative;
  border-bottom:1px dotted rgba(241,237,224,.14)}
li:last-child{border-bottom:0}
li.done .name,li.done .meta,li.done .pts,li.done .rates{opacity:.34}
li.done .glass .fill{opacity:.15}

.tapzone{display:flex;align-items:flex-start;gap:9px;flex:1;min-width:0;background:none;border:0;
  color:inherit;font-family:inherit;text-align:left;padding:0;cursor:pointer}
.tapzone:focus-visible{outline:2px dashed var(--chalk-amber);outline-offset:3px}
.glass{flex:0 0 auto;width:19px;height:25px;margin-top:2px}
.glass path,.glass line{stroke:var(--chalk-dim);stroke-width:1.6;fill:none;stroke-linecap:round;filter:url(#rough)}
.glass .fill{fill:var(--ale);stroke:none;opacity:.62}
.body{flex:1;min-width:0}
.name{font-size:22px;line-height:1.14;color:var(--chalk);display:block}
.meta{font-size:16px;color:var(--chalk-dim);line-height:1.25;display:block;margin-top:1px}
.meta em{font-style:normal;color:var(--chalk-rose)}
.meta b{font-weight:600;color:var(--chalk-amber)}
.meta i{font-style:normal;opacity:.75}

.side{flex:0 0 auto;display:flex;flex-direction:column;align-items:flex-end;gap:3px;margin-top:1px}
.pts{font-size:19px;color:var(--chalk-amber);transform:rotate(-2deg);line-height:1}
.rates{display:flex;gap:4px}
.chip{background:none;border:0;font-family:'Caveat',cursive;font-size:16px;color:var(--chalk-dim);
  padding:1px 5px;border-radius:2px;box-shadow:0 0 0 1px rgba(241,237,224,.16) inset;cursor:pointer;line-height:1.3}
.chip.mine{color:var(--chalk);box-shadow:0 0 0 1px rgba(230,189,92,.5) inset}
.more{background:none;border:0;color:var(--chalk-dim);font-size:20px;cursor:pointer;padding:0 4px;line-height:1;
  font-family:'Caveat',cursive}

.tags{margin-top:6px}
.tags li{justify-content:space-between;align-items:center;font-size:20px}
.tags em{font-style:normal;color:var(--chalk-amber);font-size:17px}

.strike{position:absolute;left:0;right:0;top:50%;height:14px;overflow:visible;pointer-events:none}
.strike path{fill:none;stroke:var(--chalk);stroke-width:2.6;stroke-linecap:round;opacity:.88;
  filter:url(#rough);stroke-dasharray:320;stroke-dashoffset:320}
li.done .strike path{animation:draw .42s cubic-bezier(.5,.05,.35,1) forwards}
@keyframes draw{to{stroke-dashoffset:0}}
.dust{position:absolute;pointer-events:none;width:6px;height:6px;border-radius:50%;background:var(--chalk);opacity:.85}
@keyframes puff{to{transform:translate(var(--dx),var(--dy)) scale(.2);opacity:0}}

.bottom{margin-top:12px;display:flex;flex-wrap:wrap;gap:8px}
.cloth{background:none;border:0;cursor:pointer;font-family:'Caveat',cursive;font-size:18px;
  color:var(--chalk-dim);padding:6px 13px;border-radius:2px;box-shadow:0 0 0 1px rgba(241,237,224,.18) inset}
.cloth:active{background:rgba(255,255,255,.05)}
.status{text-align:center;font-size:15px;color:var(--chalk-dim);margin:18px 0 0;opacity:.8;min-height:18px}

/* the bar, always there — nothing to scroll for */
.nav{
  position:fixed;left:0;right:0;bottom:0;z-index:40;display:flex;
  padding:0 4px calc(env(safe-area-inset-bottom,0px));
  background:repeating-linear-gradient(91deg,var(--wood-lo) 0 3px,var(--wood) 3px 11px,var(--wood-hi) 11px 13px,var(--wood) 13px 22px);
  box-shadow:0 2px 0 rgba(255,255,255,.10) inset,0 -14px 30px rgba(0,0,0,.55);
}
.nav button{
  flex:1;background:none;border:0;cursor:pointer;color:var(--chalk-dim);
  font-family:'Amatic SC',cursive;font-weight:700;font-size:21px;letter-spacing:.3px;
  padding:16px 1px 15px;position:relative;min-width:0;
}
.nav button.on{color:var(--chalk)}
.nav button.on::after{
  content:"";position:absolute;left:18%;right:18%;bottom:9px;height:2px;border-radius:2px;
  background:var(--chalk-amber);opacity:.9;filter:url(#rough);
}
.addbtn{
  position:fixed;z-index:41;right:16px;
  bottom:calc(var(--bar) + env(safe-area-inset-bottom,0px) + 14px);
  width:54px;height:54px;border-radius:50%;border:0;cursor:pointer;
  font-family:'Amatic SC',cursive;font-weight:700;font-size:38px;line-height:1;
  color:var(--chalk);background:linear-gradient(158deg,var(--board-worn),var(--board-deep));
  box-shadow:0 0 0 2px var(--wood),0 0 0 3px rgba(241,237,224,.22),0 8px 18px rgba(0,0,0,.6);
}
.addbtn[hidden]{display:none}

/* sheet */
.scrim{position:fixed;inset:0;background:rgba(10,6,2,.72);z-index:50;display:flex;
  align-items:flex-end;justify-content:center;padding:12px}
.sheet{width:100%;max-width:460px;border-radius:4px;padding:16px;
  margin-bottom:calc(env(safe-area-inset-bottom,0px));
  background:linear-gradient(158deg,var(--board-worn),var(--board) 45%,var(--board-deep));
  box-shadow:0 0 0 2px var(--wood),0 -8px 40px rgba(0,0,0,.7);max-height:84vh;overflow:auto}
.sheet h4{font-family:'Amatic SC',cursive;font-weight:700;font-size:30px;margin:0 0 4px;line-height:1}
.sheet p{font-size:17px;color:var(--chalk-dim);margin:0 0 12px;line-height:1.3}
.sheet button.opt{display:block;width:100%;text-align:left;background:none;border:0;color:var(--chalk);
  font-family:'Caveat',cursive;font-size:20px;padding:10px 8px;cursor:pointer;
  border-bottom:1px dotted rgba(241,237,224,.16)}
.sheet button.opt:disabled{color:var(--chalk-dim);opacity:.45;cursor:default}
.sheet button.opt span{float:right;color:var(--chalk-amber);font-size:17px}
.stepper{display:flex;align-items:center;gap:14px;justify-content:center;margin:8px 0 14px}
.stepper button{width:46px;height:46px;border-radius:50%;background:none;cursor:pointer;
  box-shadow:0 0 0 1px rgba(241,237,224,.25) inset;border:0;color:var(--chalk);font-size:26px;font-family:'Caveat',cursive}
.stepper .val{font-family:'Amatic SC',cursive;font-weight:700;font-size:48px;min-width:56px;text-align:center;line-height:1}
.scale{font-size:16px;color:var(--chalk-dim);text-align:center;margin:10px 0 2px;line-height:1.3}
.sheet input,.sheet select{width:100%;background:rgba(255,255,255,.05);border:0;color:var(--chalk);
  font-family:'Caveat',cursive;font-size:19px;padding:11px 9px;border-radius:2px;margin-bottom:9px;
  box-shadow:0 0 0 1px rgba(241,237,224,.18) inset}
.sheet input[type=date]{min-height:46px}
.close{margin-top:10px}

@media (prefers-reduced-motion:reduce){
  li.done .strike path{animation:none;stroke-dashoffset:0}
  .dust{display:none}
}

.filters{position:absolute;width:0;height:0}
.nowt{font-size:16px;color:var(--chalk-dim)}
.amber{color:var(--chalk-amber);font-weight:600}

.toast{
  position:fixed;z-index:39;left:12px;right:80px;
  bottom:calc(var(--bar) + env(safe-area-inset-bottom,0px) + 12px);
  margin:0;padding:8px 12px;border-radius:3px;font-size:16px;line-height:1.25;
  color:var(--chalk);background:rgba(20,32,26,.94);
  box-shadow:0 0 0 1px rgba(241,237,224,.2),0 6px 18px rgba(0,0,0,.5);
  opacity:0;transform:translateY(6px);pointer-events:none;
  transition:opacity .18s ease,transform .18s ease;
}
.toast.show{opacity:1;transform:translateY(0)}
.head.plain{cursor:default}

/* v7: undo on the toast */
.toast.undoable{pointer-events:auto;display:flex;align-items:center;gap:10px}
.toast .undo{margin-left:auto;flex:0 0 auto;background:none;border:0;cursor:pointer;
  font-family:'Caveat',cursive;font-size:20px;font-weight:600;color:var(--chalk-amber);
  padding:3px 12px;border-radius:2px;box-shadow:0 0 0 1px rgba(230,189,92,.55) inset}
.toast .undo:active{background:rgba(230,189,92,.12)}

/* v7: specials and history */
.head.special h3{color:var(--chalk-amber)}
.switch{display:flex;gap:6px;margin:10px 0 2px}
.switch .chip{font-size:18px;padding:3px 13px}
li.hist{flex-wrap:wrap}
li.hist .body{padding-left:2px}
.again{flex-basis:100%;display:flex;gap:6px;justify-content:flex-end;margin-top:1px}
.again .chip{font-size:16px;padding:2px 9px}
.more-hist{margin-top:8px}

/* v7: what's new */
.news{margin:2px 0 6px;padding:0}
.news li{display:block;font-size:18px;line-height:1.3;color:var(--chalk);padding:8px 2px}

/* v9: Double Shot, minutes beside points */
.head.double h3{color:var(--chalk-amber)}
.head.double h3::after{content:" ×2";font-family:'Caveat',cursive;font-size:20px;color:var(--chalk-dim)}
.pts small{font-size:15px;color:var(--chalk-dim);margin-left:6px;display:inline-block;transform:rotate(2deg)}

/* v9: search */
input.search{width:100%;margin:14px 0 4px;background:rgba(255,255,255,.05);border:0;color:var(--chalk);
  font-family:'Caveat',cursive;font-size:22px;padding:11px 12px;border-radius:2px;
  box-shadow:0 0 0 1px rgba(241,237,224,.24) inset;-webkit-appearance:none;appearance:none}
input.search:focus{outline:none;box-shadow:0 0 0 2px rgba(230,189,92,.6) inset}
input.search::placeholder{color:var(--chalk-dim);opacity:.8}

/* v9: edit and add forms */
.form label{display:block;font-size:16px;color:var(--chalk-dim);margin:2px 0 3px}
.sheet textarea{width:100%;background:rgba(255,255,255,.05);border:0;color:var(--chalk);resize:vertical;
  font-family:'Caveat',cursive;font-size:19px;padding:9px;border-radius:2px;margin-bottom:9px;
  box-shadow:0 0 0 1px rgba(241,237,224,.18) inset}
.row2{display:flex;gap:8px;align-items:baseline}
.row2 > span{font-size:18px;color:var(--chalk-dim)}
.row2 .grow{flex:1;min-width:0}
.row2 input[type=number]{flex:0 0 90px}
.row2 .grow input{width:100%}
[hidden]{display:none !important}
#f-err{color:var(--chalk-rose);min-height:0;margin:0}
#f-err:empty{display:none}

/* v9: the Tab's jobs with no time set, and Away */
.head.sub{margin-top:6px}
.head.sub .when{font-size:18px;line-height:1.35}
ul.untimed li{padding:0}
.fix{display:block;width:100%;text-align:left;background:none;border:0;color:inherit;cursor:pointer;
  font-family:inherit;padding:8px 2px}
.fix .name{font-size:20px}
.cloth:disabled{opacity:.45;cursor:default}
