/* xp.css */
:root{
  --face:#ece9d8; --edge:#aca899; --frame:#0831d9; --sel:#316ac5; --link:#0033cc;
  --title:linear-gradient(#0997ff,#0053ee 8%,#0050ee 40%,#06f 88%,#06f 93%,#005bff 95%,#003dd7 96%,#003dd7);
  --title-idle:linear-gradient(#7697e7,#7e9ee3 8%,#94afe8 40%,#97b4e9 88%,#82a5e4 93%,#7c9fe2 95%,#7996de);
  --bar:36px;
  --ui:Tahoma,Verdana,'Segoe UI',sans-serif; --head:'Trebuchet MS',Tahoma,sans-serif;
}
*{box-sizing:border-box;margin:0}
[hidden]{display:none!important}
html,body{height:100%}
body{font:400 13px/1.4 var(--ui);color:#000;overflow:hidden;
  background:radial-gradient(120% 70% at 30% 118%,#5aa81e 0 38%,#3f8f14 46%,transparent 47%),radial-gradient(110% 60% at 85% 112%,#79c12d 0 40%,#4a9a17 49%,transparent 50%),radial-gradient(40% 16% at 22% 20%,#fff9 0,transparent 70%),radial-gradient(34% 12% at 68% 12%,#fff8 0,transparent 70%),linear-gradient(#2468d8,#6aa9ee 55%,#b7d8f6 78%)}
button,input,select{font:inherit;color:inherit}
button{cursor:pointer}
img{display:block}
.grow{flex:1;min-width:0}

/* brand */
.brand{font:700 44px/1 'Franklin Gothic Medium',var(--head);letter-spacing:-.02em;display:flex;align-items:flex-start;gap:4px;color:#fff}
.brand sup{font:700 .4em var(--head);color:#f26522}
.brand i,.start i{align-self:center;width:1em;height:1em;margin-right:.25em;border-radius:.14em;transform:rotate(-8deg);background:linear-gradient(225deg,#fff 0 22%,#d9f99d 22% 24%,transparent 24%),linear-gradient(#a3e635,#4d9a12);box-shadow:0 0 0 .07em #fff,.06em .1em .12em #0006}

/* boot + login */
.boot,.login{position:fixed;inset:0;z-index:50;display:flex}
.boot{background:#000;flex-direction:column;align-items:center;justify-content:center;gap:42px}
.boot-bar{width:150px;height:14px;border:1px solid #b2b2b2;border-radius:4px;overflow:hidden;position:relative}
.boot-bar::after{content:"";position:absolute;top:2px;width:30px;height:8px;background:repeating-linear-gradient(90deg,#2b56d8 0 8px,transparent 8px 11px);animation:boot 1.1s linear infinite}
@keyframes boot{from{left:-34px}to{left:150px}}
.login{background:linear-gradient(#00309c 0 11%,#f79a3e 11% 11.4%,#5a7edc 11.4%,#6b8be6 50%,#5a7edc 88.6%,#f79a3e 88.6% 89%,#00309c 89%);color:#fff;align-items:center;justify-content:center}
.login>div{flex:1;max-width:420px;padding:0 34px}
.login-left{text-align:right;border-right:1px solid #ffffff66}
.login-left .brand{justify-content:flex-end;font-size:30px;margin-bottom:14px}
.login-left h2{font:italic 700 38px/1.1 var(--head);margin-top:6px}
.login-left p{font-size:15px}
.user{display:flex;align-items:center;gap:14px;padding:10px;border:0;border-radius:8px;width:100%;text-align:left;color:#fff;background:linear-gradient(90deg,#003399,transparent)}
.user:hover{background:linear-gradient(90deg,#0a46c8,transparent)}
.user img{width:72px;height:72px;object-fit:contain;background:#fff;border:3px solid #fc0;border-radius:6px}
.user b{display:block;font:400 22px var(--head)}
.user small{font-size:12px;color:#dbe6ff}
.login footer{position:absolute;left:28px;right:28px;bottom:3.2%;display:flex;justify-content:space-between;font-size:12px}
.login a{color:#fff}

/* desktop */
.desktop{position:fixed;inset:0 0 var(--bar) 0;overflow:hidden}
.icons{position:absolute;left:8px;top:10px;display:flex;flex-direction:column;gap:14px;width:84px}
.icons button,.icons a{background:none;border:0;color:#fff;font-size:12px;line-height:1.2;text-shadow:1px 1px 2px #000;padding:2px}
/* An icon that is a link: the way to the other version of the game. It looks and stands like the others. */
.icons a{display:block;text-align:center;text-decoration:none;cursor:pointer}
.icons i{display:block;font:normal 34px/1.15 sans-serif;filter:drop-shadow(1px 2px 2px #0006)}
.icons button:hover span,.icons button:focus-visible span,.icons a:hover span,.icons a:focus-visible span{background:var(--sel);outline:1px dotted #fff}

/* windows */
.win{position:absolute;display:flex;flex-direction:column;min-width:240px;min-height:120px;background:var(--face);border:3px solid var(--frame);border-top:0;border-radius:9px 9px 3px 3px;box-shadow:0 14px 40px #0006}
.win.idle{border-color:#7a96df;box-shadow:0 8px 22px #0004}
.win.min{display:none}
@media(min-width:901px){.win:not(.dialog):not(.max){resize:both;overflow:hidden}}
.win.max{inset:0!important;width:auto!important;height:auto!important;border-radius:0}
.titlebar{flex:none;display:flex;align-items:center;gap:6px;height:29px;margin:0 -3px;padding:0 5px 0 8px;border-radius:8px 8px 0 0;background:var(--title);color:#fff;font:700 13px var(--head);text-shadow:1px 1px #0f1089;cursor:default;user-select:none;touch-action:none}
.win.idle .titlebar{background:var(--title-idle);text-shadow:none}
.win.max .titlebar{border-radius:0}
.titlebar span{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.titlebar button{flex:none;width:21px;height:21px;padding:0;border:1px solid #fff;border-radius:3px;color:#fff;font:700 11px/1 var(--ui);background:radial-gradient(circle at 30% 25%,#7aa2f5,#2a5fe0 60%,#1c46c0)}
.titlebar button:hover{filter:brightness(1.18)}
.titlebar button[data-act=close]{background:radial-gradient(circle at 30% 25%,#f0a08c,#d5452a 55%,#b02a12)}
.win>.titlebar~*{min-height:0}

#w-wall{left:100px;top:10px;right:374px;bottom:10px}
/* The wizard keeps one height whatever it shows (its picture gives way), so the chat under it starts where it always did. */
#w-case{right:12px;top:10px;width:350px;height:424px}
#w-msn{right:12px;top:440px;bottom:10px;width:350px}
#w-stickers{left:130px;top:44px;width:min(780px,calc(100vw - 160px));height:min(560px,calc(100vh - 110px))}
#w-catalog{left:170px;top:70px;width:min(780px,calc(100vw - 200px));height:min(560px,calc(100vh - 130px))}
#w-cases{left:210px;top:56px;width:min(720px,calc(100vw - 240px));height:min(520px,calc(100vh - 120px))}
#w-rules{left:250px;top:84px;width:min(560px,calc(100vw - 280px));height:min(460px,calc(100vh - 150px))}
#w-leaders{left:290px;top:36px;width:min(430px,calc(100vw - 320px));height:min(560px,calc(100vh - 100px))}
.dialog{left:50%;top:32%;width:360px;transform:translateX(-50%);min-height:0}

/* controls */
.btn{background:linear-gradient(#fff,#ecebe5 86%,#d8d0c4);border:1px solid #003c74;border-radius:3px;padding:3px 12px;min-height:23px;white-space:nowrap}
.btn:hover:not(:disabled){box-shadow:inset 0 0 0 2px #f8b636}
.btn:active:not(:disabled){background:linear-gradient(#d8d0c4,#ecebe5)}
.btn.def{box-shadow:inset 0 0 0 2px #98b8ea;font-weight:700}
.btn:disabled{color:#aca899;border-color:#c9c7ba;cursor:default}
input[type=search],select{background:#fff;border:1px solid #7f9db9;padding:3px 6px;min-height:23px;border-radius:0}
:focus-visible{outline:1px dotted #000;outline-offset:2px}
.toolbar{flex:none;display:flex;flex-wrap:wrap;align-items:center;gap:6px;padding:5px 8px;border-bottom:1px solid var(--edge);box-shadow:0 1px 0 #fff}
.toolbar input{flex:1;min-width:120px}
.statusbar{flex:none;display:flex;gap:2px;padding:2px;border-top:1px solid #fff;font-size:12px}
.statusbar>span{padding:2px 8px;border:1px solid;border-color:var(--edge) #fff #fff var(--edge);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.statusbar a{color:var(--link)}
.pages{display:flex;align-items:center;gap:6px}
.pages button{border:0;background:none;color:var(--link);text-decoration:underline;padding:0}
.pages button:disabled{color:var(--edge);text-decoration:none}

/* The wall's status bar. Its first cell says what a paste at this place would do, and that is read whole or it is no
   use: the longest lines are 580 points in Tahoma and 660 in a font that stands in for it, more than the cell had
   in a window narrower than 950. So the bar follows the width of the wall's own window, whoever set it (the size of
   the browser, the player's drag of its corner, full size): wide, one row as before; narrower, the first cell takes a
   row of its own; narrower than 690, that row holds two lines. The height is set, not left to the text: a bar that
   grew and shrank with every line would resize the wall under the pointer. On a phone the wall keeps its height
   whatever the bar does, so there the two lines are the least and a third comes when a small screen needs it. */
#w-wall{container:wall/inline-size}
@container wall (max-width:939px){
  #w-wall .statusbar{flex-wrap:wrap}
  #placementStatus{flex:1 1 100%}
  #coordinates{flex:1}
}
@container wall (max-width:689px){
  #placementStatus{white-space:normal;height:calc(2.8em + 6px)}
  @media(max-width:900px){#placementStatus{height:auto;min-height:calc(2.8em + 6px)}}
}
/* Brought into sight on a phone (xp.js, when a paste starts to wait for its second tap), the bar stops clear of the
   taskbar with its second row. */
#placementStatus{scroll-margin:8px 0 calc(var(--bar) + 34px)}
/* wall */
.canvas-wrap{position:relative;flex:1;min-height:0;background:#fff;border:1px solid #808080;margin:0 2px;overflow:hidden}
#wallCanvas{display:block;width:100%;height:100%;cursor:grab;touch-action:none}
#wallCanvas.panning{cursor:grabbing}
#wallCanvas.armed{cursor:crosshair}
.armed{display:flex;align-items:center;gap:6px;padding:1px 4px 1px 2px;border:1px solid #7f9db9;background:#fff;max-width:100%}
.armed img{width:24px;height:24px;object-fit:contain}
.armed b{max-width:140px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.armed small{color:#555;white-space:nowrap}
.armed .btn{padding:0 7px}
.caption{position:absolute;left:14px;top:14px;display:flex;align-items:center;gap:14px;height:34px;padding:0 6px 0 12px;border:1px solid var(--frame);border-radius:8px;background:var(--title);color:#fff;font:700 17px var(--head);text-shadow:1px 1px #0f1089;box-shadow:0 8px 24px #0005;max-width:calc(100% - 28px)}
.caption span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.caption button{width:21px;height:21px;padding:0;border:1px solid #fff;border-radius:3px;color:#fff;font:700 11px/1 var(--ui);background:radial-gradient(circle at 30% 25%,#f0a08c,#d5452a 55%,#b02a12)}
.tip{position:absolute;z-index:3;pointer-events:none;background:#ffffe1;border:1px solid #000;padding:5px 8px;font-size:12px;max-width:230px;box-shadow:2px 2px 3px #0004}
.tip b{display:block}
.tip .hp{height:6px;margin-top:4px;background:#fff;border:1px solid #686868}
.tip .hp i{display:block;height:100%;background:var(--c)}
.tip small{display:block;margin-top:4px;color:#555}
/* the mark of a club member, next to a nick wherever one is shown */
mark.club{background:none;color:#8a6d0b;font-weight:700;white-space:nowrap}
.clippy{position:absolute;left:12px;bottom:10px;z-index:2;display:flex;align-items:flex-end;gap:6px}
.clippy>i{font:normal 54px/1 sans-serif;transform:rotate(18deg);filter:drop-shadow(2px 3px 2px #0005);position:relative}
.clippy>i::after{content:"👀";position:absolute;left:13px;top:11px;font-size:16px;transform:rotate(-18deg)}
.clippy>div{position:relative;background:#ffffe1;border:1px solid #000;border-radius:10px;padding:9px 12px;max-width:250px;margin-bottom:32px;box-shadow:2px 3px 6px #0004}
.clippy>div::after{content:"";position:absolute;left:-9px;bottom:14px;width:16px;height:16px;background:#ffffe1;border:solid #000;border-width:0 0 1px 1px;transform:rotate(45deg)}
.clippy b{display:block;margin-bottom:5px}
.clippy button{display:block;border:0;background:none;color:var(--link);text-align:left;padding:1px 0 1px 14px;position:relative}
.clippy button::before{content:"●";position:absolute;left:0;top:5px;color:#3a8a1a;font-size:8px}
.clippy button:hover{text-decoration:underline}

/* wizard */
.wizard{flex:1;display:flex;background:#fff;border-bottom:1px solid var(--edge)}
.wizard aside{flex:none;width:92px;padding:12px 10px;color:#fff;font:700 12px/1.35 var(--head);background:linear-gradient(#0a3fb5,#3f7df0 60%,#7aa9f6)}
.wizard aside small{display:block;margin-top:8px;font:400 11px var(--ui);opacity:.9}
.wizard-main{flex:1;min-width:0;padding:10px 12px 12px;min-height:318px;display:flex;flex-direction:column}
.wizard-main>*{flex:none}
.wizard-main>button{align-self:flex-start}
.wizard-main h3{font:700 18px/1.15 var(--head)}
.wizard-main p{font-size:12px;color:#444}
/* The picture takes the room the text leaves: 132px where the window is as tall as its content (a phone), less in the
   fixed window of the desktop, more when that window is stretched. */
.wizard-main>.case-pic{flex:1 1 132px;min-height:48px;max-height:150px;display:flex;justify-content:center;margin:2px 0}
.case-pic .case-image-frame{display:block;height:100%;aspect-ratio:1}
.case-pic .case-image-frame img{width:100%;height:100%;object-fit:contain}
.progress{height:18px;padding:2px;background:#fff;border:1px solid #686868;border-radius:4px;box-shadow:inset 1px 1px 2px #0003;display:flex}
.progress i{-webkit-mask:repeating-linear-gradient(90deg,#000 0 8px,transparent 8px 10px);mask:repeating-linear-gradient(90deg,#000 0 8px,transparent 8px 10px);background:linear-gradient(#fff8,transparent 40%,#0002),var(--c,#2ed12e)}
.linkish{border:0;background:none;padding:0;color:var(--link);text-decoration:underline;font-size:12px}
/* The bar of the guarantee: a caption and a progress bar in the legendary's gold, filled by the script through --fill
   (0 to 1). It says nothing in numbers; the count is its tooltip and its balloon. */
.wizard-main button.luck{display:block;align-self:stretch;margin:8px 0 6px;border:0;background:none;padding:0;font-size:11px;line-height:1.35;color:#444;text-align:left;cursor:help}
.luck .progress{display:block;height:16px;margin-top:3px}
.luck .progress i{display:block;width:calc(var(--fill,0)*100%);height:100%;--c:#e8b21c;transition:width .5s steps(8)}
.drop button.luck{margin:12px 0 0;text-align:center}
/* The free daily case line in the wizard. */
.wizard-main .daily{display:block;margin:8px 0 0;font-size:12px;color:#555}.wizard-main .daily.ready{color:#1a7a1a;font-weight:700}
/* The streak's free case in the side column: a yellow note, the way this desktop writes a hint. */
.wizard aside .side-free{display:block;width:100%;margin-top:12px;padding:4px 5px;border:1px solid #000;border-radius:3px;background:#ffffe1;color:#000;font:400 11px/1.3 var(--ui);text-align:left;box-shadow:1px 2px 3px #0004}
.wizard aside button.side-free{color:var(--link);text-decoration:underline}
/* The drop gives way the same way: its picture shrinks before the text can run over the buttons below. */
.wizard-main>.drop{flex:0 1 auto;min-height:0;display:flex;flex-direction:column;text-align:center}
.drop>*{flex:none}
.drop h3{overflow-wrap:anywhere}
.drop img{flex:0 1 auto;min-height:48px;width:128px;height:128px;object-fit:contain;margin:6px auto}
.drop .rar{font:700 12px var(--head);color:var(--c)}
.drop .row{display:flex;flex-wrap:wrap;justify-content:center;gap:6px;margin-top:10px}
.unpack{padding-top:60px;text-align:center}
.unpack .progress{margin:14px 6px}
.unpack .progress i{width:0;animation:fill 1.5s steps(18) forwards}
@keyframes fill{to{width:100%}}
.wizard-foot{display:flex;gap:6px;padding:8px 10px}
.wizard-foot .btn{padding-inline:8px}

/* messenger */
#w-msn{background:#eef3fa}
.msn-to{flex:none;padding:5px 12px;font-size:12px;color:#444;background:#fff;border-bottom:1px solid #9db7dc}
.msn-feed{flex:1;list-style:none;padding:8px 12px;margin:8px 10px 0;overflow:hidden;background:#fff;border:1px solid #9db7dc;border-radius:6px;display:flex;flex-direction:column;justify-content:flex-end}
.msn-feed li{animation:pop .3s}
.msn-feed em{display:block;font-style:normal;color:#777;font-size:11px}
/* A message is its sticker and its words in a row. The words are one piece of that row and wrap inside it: styled as a
   row themselves, «ударил стикером», the name and the number stood in three columns. */
.msn-feed li>span{display:flex;align-items:center;gap:6px;padding-left:10px;margin-bottom:5px}
.msn-feed img{width:26px;height:26px;object-fit:contain;flex:none}
.msn-feed b{color:var(--c)}
.msn-foot{flex:none;padding:6px 12px 8px;font-size:11px;color:#666}
@keyframes pop{from{opacity:0;transform:translateY(8px)}}

/* explorer */
.explorer{flex:1;display:flex;min-height:0}
.taskpane{flex:none;width:190px;padding:10px;overflow:auto;background:linear-gradient(#7ba2e7,#6375d6);color:#fff;font-size:12px}
.taskpane .card{background:#d6dff7;color:#000;border-radius:4px 4px 0 0;overflow:hidden}
.taskpane .card h4{padding:5px 9px;background:linear-gradient(90deg,#fff,#c6d3f7);color:#215dc6;font:700 12px var(--ui);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.taskpane .card div{padding:9px}
.taskpane .card img{width:100%;height:110px;object-fit:contain;background:#fff;border:1px solid #9db7dc;margin-bottom:8px}
.taskpane .card p{margin-bottom:3px}
.taskpane .card .rar{font-weight:700;color:var(--c)}
.taskpane .card .btn{display:block;width:100%;margin-top:7px}
.taskpane .card .linkish{margin-top:8px}
.grid{flex:1;min-width:0;overflow:auto;background:#fff;border-left:1px solid #7f9db9;padding:10px;display:grid;grid-template-columns:repeat(auto-fill,minmax(92px,1fr));gap:6px;align-content:start}
.grid.cases{grid-template-columns:repeat(auto-fill,minmax(128px,1fr));border-left:0}
.grid.loading{opacity:.5}
.item{position:relative;border:1px solid transparent;background:none;padding:6px 4px 5px;text-align:center;font-size:11px;line-height:1.25;border-radius:3px;border-bottom:3px solid var(--c,transparent)}
.item:hover{background:#e8f0fb}
.item.on{background:#c1d2ee;border-color:var(--sel);border-bottom-color:var(--c,var(--sel))}
.item img,.item .case-image-frame{width:68px;height:68px;object-fit:contain;margin:0 auto 4px}
.item .case-image-frame{display:block}
.item .case-image-frame img{width:100%;height:100%;margin:0}
.cases .item img,.cases .item .case-image-frame{width:104px;height:104px}
.item span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.item em{position:absolute;right:3px;top:3px;font-style:normal;background:#ffffe1;border:1px solid #000;border-radius:3px;padding:0 4px;font-size:10px}
.item small{display:block;color:#666}
.empty{grid-column:1/-1;padding:30px 10px;text-align:center;color:#555}

/* leaders: one list in groups, as Explorer shows a folder arranged in groups */
.toolbar .hint{font-size:11px;color:#555;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.leaders{flex:1;overflow:auto;background:#fff;border:1px solid #7f9db9;margin:0 2px;padding:0 10px 10px}
.leaders h4{margin:10px 0 4px;padding-bottom:3px;font:700 12px var(--ui);color:#0c327d;background:linear-gradient(90deg,#7ba2e7,#fff 85%) left bottom/100% 1px no-repeat}
.leaders ol{list-style:none;padding:0;counter-reset:place}
.leaders li{counter-increment:place}
.leaders li>*{display:grid;grid-template-columns:20px minmax(0,1fr) auto;align-items:center;gap:8px;width:100%;padding:3px 6px;border:1px solid transparent;border-radius:0;background:none;text-align:left;font-size:12px}
.leaders li>*::before{content:counter(place);color:#666;text-align:right}
.leaders li>button{grid-template-columns:20px 32px minmax(0,1fr) auto}
.leaders li>button:hover,.leaders li>button:focus-visible{background:var(--sel);border-color:#1c3f7c;color:#fff;outline:0}
.leaders li>button:hover *,.leaders li>button:focus-visible *,.leaders li>button:hover::before,.leaders li>button:focus-visible::before{color:#fff}
.leaders img{width:32px;height:32px;object-fit:contain}
.leaders span{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.leaders strong,.leaders small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.leaders small{color:#555}
.leaders b{white-space:nowrap}
.leaders .none{padding:3px 6px;color:#555;font-size:12px}

/* notepad + dialogs */
.notepad{flex:1;overflow:auto;background:#fff;border:1px solid #7f9db9;margin:0 2px 2px;padding:8px 10px;font:400 13px/1.5 'Lucida Console','Courier New',monospace;white-space:pre-wrap}
.dialog-body{display:flex;gap:12px;padding:14px 14px 8px}
.dialog-body>i{flex:none;width:32px;height:32px;border-radius:50%;color:#fff;font:700 20px/32px var(--ui);font-style:normal;text-align:center;box-shadow:0 1px 3px #0006}
.dialog-body .stop{background:radial-gradient(circle at 35% 30%,#ff9a8a,#d81e05)}
.dialog-body .ask{background:radial-gradient(circle at 35% 30%,#8ab8ff,#1c4fc0)}
.dialog-body p{margin-top:4px}
.dialog-body select{margin-top:8px;width:100%}
.dialog-foot{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px;padding:6px 14px 12px}
/* sticker properties: the sheet a click on a sticker opens */
.props img{flex:none;width:64px;height:64px;object-fit:contain;background:#fff;border:1px solid #7f9db9}
.props>div{flex:1;min-width:0}
.props>div>b{display:block;overflow-wrap:anywhere}
.props .rar{margin-top:2px;font-size:12px;color:#444}
.props .rar::before{content:"";display:inline-block;width:9px;height:9px;margin-right:5px;background:var(--c);border:1px solid #0007}
.props dl{display:grid;grid-template-columns:auto minmax(0,1fr);gap:4px 10px;margin-top:9px;padding-top:9px;border-top:1px solid var(--edge);box-shadow:inset 0 1px #fff}
.props dt{color:#444}
.props .hp{height:8px;margin-top:3px;background:#fff;border:1px solid #686868}
.props .hp i{display:block;height:100%;background:var(--c)}
.props .note{margin-top:9px;padding-top:9px;border-top:1px solid var(--edge);box-shadow:inset 0 1px #fff;font-size:12px;color:#444}
.props .note b{color:#b02a12}
.props .note.gone{color:#b02a12;font-weight:700}

/* saving progress: the panel drawn by save.js, in its window and on the login screen */
.save-panel{display:grid;gap:8px;justify-items:start;min-width:0}.save-panel p{margin:0}
.save-panel .save-note{font-size:11px;color:#555}.save-panel .save-error{color:#c00}.save-panel .save-done{color:#1a7a2e}
.save-panel .save-google{min-height:44px}.save-panel .save-actions{display:flex;flex-wrap:wrap;gap:8px}
.save-panel button{background:linear-gradient(#fff,#ecebe5 86%,#d8d0c4);border:1px solid #003c74;border-radius:3px;padding:3px 12px;min-height:23px;color:#000}
.login-save{margin-top:14px;padding:10px;font-size:12px}.login-save .save-note{color:#dbe6ff}
/* The login screen has the same link in its footer, whether saving is offered or not. */
.login-save .save-privacy{display:none}
.login-save .save-done{color:#c9ffd2}.login-save .save-error{color:#ffd0c8}

/* taskbar */
.taskbar{position:fixed;left:0;right:0;bottom:0;z-index:30;height:var(--bar);display:flex;align-items:stretch;gap:4px;color:#fff;background:linear-gradient(#1f2f86 0,#3165c4 3%,#3682e5 6%,#4490e6 10%,#3883e5 12%,#2b71e0 15%,#2663da 18%,#235bd6 20%,#2258d5 23%,#2157d6 38%,#245ddb 54%,#2562df 86%,#245fdc 89%,#2158d4 92%,#1d4ec0 95%,#1941a5 98%)}
.start{flex:none;display:flex;align-items:center;border:0;padding:0 22px 2px 10px;font:italic 700 19px/1 var(--head);color:#fff;text-shadow:1px 1px 2px #0008;border-radius:0 10px 10px 0;background:radial-gradient(circle at 20% 0,#7fd17a,#3c9a3c 45%,#2d7f2d);box-shadow:inset 0 2px 3px #b8f0b0,inset -3px -2px 4px #1a5a1a,2px 0 4px #0006}
.start:hover{filter:brightness(1.1)}
.start i{font-size:20px;font-style:normal}
.tasks{flex:1;min-width:0;display:flex;align-items:center;gap:3px;margin-left:6px;overflow:hidden}
.tasks button{flex:0 1 160px;min-width:40px;height:26px;padding:0 8px;border:0;border-radius:3px;color:#fff;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;background:linear-gradient(#3c81f3,#3b7ded 60%,#2b6ad9);box-shadow:inset 1px 1px 0 #6aa4ff,inset -1px -1px 0 #1a48b0}
.tasks button.on{background:linear-gradient(#1e52b7,#1c4aa8);box-shadow:inset 1px 1px 2px #0d2f7a}
.tray{flex:none;display:flex;align-items:center;gap:10px;padding:0 12px;font-size:12px;border-left:1px solid #092e51;box-shadow:inset 1px 0 0 #18bbff;background:linear-gradient(#0c59b9 0,#139ee9 6%,#18b5f2 10%,#139beb 14%,#1290e8 19%,#0d8dea 63%,#0d9ff1 81%,#0f9eed 88%,#119be9 91%,#1392e2 94%,#137ed7 97%,#095bc9)}
.tray button{border:0;background:none;color:#fff;padding:2px 4px;border-radius:3px}
.tray button:hover{background:#ffffff33}
.tray button span{color:#ffe44d}
/* the charge: a battery with a cell per waiting sticker, then their number or the time to the next one */
.tray .charge{display:flex;align-items:center;gap:7px;font-variant-numeric:tabular-nums}
.tray .charge b{font-weight:400}
.tray .charge.ready b{font-weight:700}
.tray .charge:disabled{opacity:.6;cursor:default}
.battery{position:relative;display:flex;gap:1px;height:12px;padding:1px;border:1px solid #fff;border-radius:2px;box-shadow:0 1px 1px #0005}
.battery::after{content:"";position:absolute;right:-4px;top:2px;width:2px;height:6px;background:#fff;border-radius:0 1px 1px 0}
.battery span{width:3px;background:#ffffff38}
.battery span.on{background:linear-gradient(#e2ffb0,#7be53a 45%,#3fae12)}

/* start menu */
/* Never taller than the room above the taskbar: on a short screen (a phone on its side, a small window) the name and
   the footer stay and the list between them scrolls. */
.start-menu{position:fixed;left:0;bottom:var(--bar);z-index:31;width:270px;max-height:calc(100vh - var(--bar));max-height:calc(100dvh - var(--bar));display:flex;flex-direction:column;border:2px solid #1a56c9;border-bottom:0;border-radius:8px 8px 0 0;background:#fff;box-shadow:4px -2px 14px #0006;overflow:hidden}
.start-menu header,.start-menu footer{flex:none}
.start-menu header{display:flex;align-items:center;gap:10px;padding:8px 10px;color:#fff;font:700 15px var(--head);text-shadow:1px 1px 1px #0008;background:linear-gradient(#1868ce,#0e60cb 12%,#1164cf 20%,#1667cf 32%,#1b6cd3 33%,#1e70d9 47%,#2476dc 54%,#297ae0 60%,#3482e3 65%,#3786e5 77%,#428ee9 79%,#4791eb 90%,#4791eb)}
.nick-button{display:flex;align-items:center;gap:6px;min-width:0;padding:0;border:0;background:none;color:inherit;font:inherit;text-shadow:inherit}
.nick-button b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.nick-button span{font-size:12px;opacity:.8}
.nick-button:hover:not(:disabled) b{text-decoration:underline}.nick-button:disabled span{display:none}
.start-menu header form{min-width:0}.start-menu header input{width:100%;height:24px;padding:0 5px;border:1px solid #7f9db9;font:400 13px var(--body,Tahoma,sans-serif);color:#000;background:#fff}
.start-menu header img{width:42px;height:42px;object-fit:contain;background:#fff;border:2px solid #dbe6ff;border-radius:4px}
.start-menu header mark.club{flex:none;margin-left:auto;color:#ffe44d;font:700 12px var(--ui)}
.start-items{flex:1 1 auto;min-height:0;padding:6px;overflow-y:auto;overscroll-behavior:contain}
.start-items button{display:flex;align-items:center;gap:10px;width:100%;border:0;background:none;padding:6px 8px;text-align:left;font-weight:700}
.start-items button:hover{background:var(--sel);color:#fff}
.start-items i{font:normal 22px/1 sans-serif}
.start-menu footer{display:flex;justify-content:space-between;align-items:center;padding:7px 10px;background:linear-gradient(#4282d6,#3b85e0 3%,#418ae3 5%,#418ae3 17%,#3c87e2 21%,#3786e4 26%,#3482e3 29%,#2e7ee1 39%,#2374df 49%,#2072db 57%,#196edb 62%,#176bd8 72%,#1468d5 75%,#1165d2 83%,#0f61cb 88%)}
.start-menu footer a,.start-menu footer button{color:#fff;border:0;background:none;font-size:12px}
@media(max-height:520px){
  .start-menu header{padding:5px 10px}
  .start-menu header img{width:30px;height:30px}
  .start-items{padding:4px 6px}
  .start-items button{padding:3px 8px}
  .start-items i{font-size:18px}
}

/* balloon + cascade */
.balloon{position:fixed;right:16px;bottom:calc(var(--bar) + 14px);z-index:32;width:280px;background:#ffffe1;border:1px solid #000;border-radius:10px;padding:10px 26px 10px 12px;box-shadow:2px 4px 10px #0005;cursor:pointer;animation:pop .25s}
.balloon::after{content:"";position:absolute;right:34px;bottom:-9px;width:16px;height:16px;background:#ffffe1;border:solid #000;border-width:0 1px 1px 0;transform:rotate(45deg)}
.balloon b{display:block;margin-bottom:3px}
/* Away from home (xp.js moves it off the Start menu and off dialogs) the balloon points at nothing. */
.balloon.top{top:8px;bottom:auto}
.balloon.left{left:16px;right:auto}
.balloon.top::after,.balloon.left::after{display:none}
.balloon button{position:absolute;right:6px;top:5px;border:0;background:none;font-size:11px}
.cascade{position:fixed;inset:0;z-index:40;pointer-events:none}
.cascade.on{pointer-events:auto;cursor:pointer;background:#0a7a0a}

@media(max-width:900px){
  body{overflow:auto}
  .desktop{position:static;overflow:visible;padding:8px 8px calc(var(--bar) + 12px)}
  .icons{position:static;flex-direction:row;width:auto;gap:4px;overflow-x:auto;margin-bottom:8px}
  .icons button,.icons a{flex:none;width:76px}
  .win,.dialog{position:relative;inset:auto!important;left:auto!important;top:auto!important;width:auto!important;height:auto!important;transform:none;margin-bottom:10px;z-index:auto!important}
  .win.max{position:fixed;inset:0 0 var(--bar) 0!important;z-index:20!important;margin:0}
  #w-wall .canvas-wrap{height:62vh;flex:none}
  .explorer{flex-direction:column;max-height:70vh}
  .taskpane{width:auto}
  .taskpane .card img{height:80px}
  .msn-feed{height:170px;flex:none}
  .dialog{position:fixed;left:8px!important;right:8px!important;top:22%!important;z-index:25!important;max-height:calc(76% - var(--bar))}
  .dialog>.dialog-body{overflow:auto}
  /* Dialogs share one place on a phone: the one opened last (an error over the sheet it is about) lies on top. */
  .dialog:not(.idle){z-index:26!important}
  /* A window brought into view stops clear of the taskbar. The leaders list keeps one height, loaded or not, so the
     window is already its full size when the page scrolls to it. */
  .win{scroll-margin:8px 0 calc(var(--bar) + 8px)}
  .leaders{flex:none;height:60vh}
  .win.max .leaders{flex:1;height:auto}
  .toolbar .hint{white-space:normal}
  /* Room for the charge in the tray; the strip of windows scrolls sideways instead of losing its last buttons. */
  .start{padding:0 9px 2px 6px}
  .tray{gap:4px;padding:0 6px}
  .tray button{padding:2px}
  .tray .charge{gap:5px}
  .battery span{width:2px}
  .tasks{margin-left:3px;overflow-x:auto;scrollbar-width:none}
  .tasks::-webkit-scrollbar{display:none}
  .tasks button{flex:none;width:40px;font-size:0}
  .tasks button::first-letter{font-size:15px}
  .login{flex-direction:column;gap:20px}
  .login>div{flex:none}
  .login-left{text-align:center;border:0}
  .login-left .brand{justify-content:center}
  .caption{font-size:14px;height:30px}
  /* On a phone the balloon is under the dialogs and the Start menu, whatever its place: a tap on them is theirs.
     Moved to the top it takes the width of the screen, to be as low as it can. */
  .balloon{z-index:24}
  .balloon.top{left:8px;right:8px;width:auto}
}
/* The welcome screen on a low screen (a phone held sideways, a low window): the two halves stand side by side, as on
   a desktop, and everything on them is smaller, so the logo, the name, the way to save progress and the footer are
   all in sight at once and none lies on another. (Stacked, they were taller than the screen: the logo went off its
   top and Google's button and the note under it were printed over the footer.) Each half keeps to the light part
   between the two dark bands; what still does not fit there scrolls inside its half. */
@media(max-height:520px) and (min-width:500px){
  .login{flex-direction:row;gap:0}
  .login>div{flex:1 1 0;max-width:420px;max-height:76%;overflow-y:auto;padding:0 18px}
  .login>.login-left{flex:0 1 36%;text-align:right;border-right:1px solid #ffffff66}
  .login-left .brand{justify-content:flex-end;font-size:22px;margin-bottom:8px}
  .login-left p{font-size:13px}
  .login-left h2{font-size:clamp(18px,3.4vw,24px);margin-top:4px}
  .user{gap:10px;padding:6px 8px}
  .user img{width:48px;height:48px;border-width:2px}
  .user b{font-size:18px}
  .login-save{margin-top:6px;padding:4px 8px}
  .login-save .save-panel{gap:5px}
  .login footer{left:18px;right:18px;bottom:2.4%}
}
@media(prefers-reduced-motion:reduce){*{animation:none!important}.luck .progress i{transition:none}}
/* ---------- the player's own avatar (avatar.js) ---------- */
/* By a nick, in the tip, in a sticker's sheet and in the leaders: a square as tall as the line it stands in. Its box
   is there before the picture is, and stays when no picture comes, so the line never moves. */
.nick-avatar,.leaders img.nick-avatar,.props img.nick-avatar{display:inline-block;box-sizing:border-box;flex:none;width:14px;height:14px;margin:-1px 5px -1px 0;vertical-align:-2px;border:1px solid #7f9db9;border-radius:0;background:#fff;object-fit:cover}
/* The picture of the account at the top of the Start menu is a button, as it was in Windows: it opens the window below. */
.avatar-button{flex:none;padding:0;border:0;background:none;line-height:0;border-radius:4px}
.avatar-button:hover img,.avatar-button:focus-visible img{border-color:#fc0}
.start-menu header img[data-avatar=own],.user img[data-avatar=own],.avatar-large [data-avatar=own],.avatar-sample .avatar>[data-avatar=own]{image-rendering:pixelated}
.start-menu header img,.user img{object-fit:cover}
@media(min-width:901px){#w-avatar{width:400px}}
.avatar-panel{flex:1;min-width:0;display:grid;gap:9px;justify-items:start}.avatar-panel p{margin:0}
.avatar-stage{display:flex;flex-wrap:wrap;align-items:center;gap:14px;width:100%}
.avatar-large{flex:none;width:128px;height:128px;border:1px solid #7f9db9;background:#fff;box-shadow:inset 0 0 0 2px #fff}
.avatar-large .avatar-pic{display:block;width:100%;height:100%;object-fit:cover}
.avatar-seen{flex:1 1 140px;min-width:0;display:grid;gap:8px}
.avatar-caption{font-weight:700;color:#0c327d}
.avatar-sample{display:flex;align-items:center;flex-wrap:wrap;gap:0 8px;min-width:0}
.avatar-sample small{flex-basis:100%;font-size:11px;color:#555}
.avatar-sample .avatar{flex:none;width:42px;height:42px;border:2px solid #dbe6ff;border-radius:4px;background:#fff;overflow:hidden;box-shadow:0 0 0 1px #1868ce}
.avatar-sample .avatar>*{display:block;width:100%;height:100%;object-fit:cover}
.avatar-sample-nick{gap:0}.avatar-sample-nick span{white-space:pre}.avatar-sample-nick b{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:400}
.avatar-text{font-size:12px;color:#444}
.avatar-price{font-weight:700}.avatar-price.owned{font-weight:400;color:#1a7a2e}
.avatar-short{font-size:12px;color:#b02a12;font-weight:700}
/* The foot (what was said last, and the buttons) stays in sight when the window is too low for the whole panel and
   scrolls inside itself, as on a phone: the rest goes under it. */
.avatar-foot{position:sticky;bottom:-8px;z-index:1;justify-self:stretch;display:grid;gap:6px;margin-bottom:-8px;padding:6px 0 8px;background:var(--face)}
.avatar-actions{display:flex;flex-wrap:wrap;gap:8px}
.avatar-panel button{background:linear-gradient(#fff,#ecebe5 86%,#d8d0c4);border:1px solid #003c74;border-radius:3px;padding:3px 12px;min-height:23px;color:#000;white-space:nowrap}
.avatar-panel button:hover:not(:disabled){box-shadow:inset 0 0 0 2px #f8b636}
.avatar-panel button.main{box-shadow:inset 0 0 0 2px #98b8ea;font-weight:700}
.avatar-panel button:disabled{color:#aca899;border-color:#c9c7ba;cursor:default;box-shadow:none}
.avatar-note{font-size:12px;color:#555}.avatar-note.bad{color:#b02a12}
@media(pointer:coarse){.avatar-panel button{min-height:40px;padding:6px 16px}.avatar-button{position:relative}.avatar-button::after{content:"";position:absolute;inset:-4px}}
/* ---------- tasks of the day, the streak of days and achievements (quests.js) ---------- */
/* The mark in the tray, next to the battery: a sheet with two ticks. While something waits to be taken it is lit and
   carries the number of such things; the same number stands at the end of the line in the Start menu. */
.tray .quests-mark{display:flex;align-items:center;gap:3px}
.quests-mark svg{width:16px;height:16px;fill:#ffffff2e;stroke:#fff;stroke-width:1.3;stroke-linejoin:round;stroke-linecap:round;opacity:.85}
.quests-mark.ready svg{opacity:1;filter:drop-shadow(0 0 2px #ffe44d)}
.quests-mark.ready svg path:first-child{fill:#ffe44d}
.quests-mark.ready svg path+path{fill:none;stroke:#0c327d}
.quests-mark svg path+path{fill:none}
.quests-mark b{color:#ffe44d;font-variant-numeric:tabular-nums}
.quests-mark b:empty,.start-items .wait:empty{display:none}
.start-items .wait{margin-left:auto;min-width:18px;padding:0 5px;border:1px solid #000;border-radius:3px;background:#ffffe1;color:#000;font-size:11px;line-height:15px;text-align:center}
/* The mark by a nick, in the leaders and in the window itself: a sign and the number of achievements taken. */
.nick-badge,.leaders span.nick-badge{display:inline;margin-left:.35em;color:#8a6d0b;font-weight:700;white-space:nowrap}
/* Coins that have just arrived while the window is open are seen where the coins always are, in the tray: what came
   stands over the number for a moment, as a yellow note, and then the number swells. (Above the tray it would lie
   under the balloon that says the same.) */
#balanceButton{position:relative}
#balanceButton b{display:inline-block}
#balanceButton.gain b{animation:coin-swell .7s ease-out 1.2s both}
#balanceButton.gain::after{content:attr(data-gain);position:absolute;inset:0 -3px;display:grid;place-items:center;border:1px solid #000;border-radius:3px;background:#ffffe1;color:#1a7a1a;font-weight:700;white-space:nowrap;opacity:0;animation:coin-note 1.5s ease-out forwards;pointer-events:none}
@keyframes coin-swell{0%{transform:scale(1)}35%{transform:scale(1.3)}100%{transform:scale(1)}}
@keyframes coin-note{0%{opacity:0;transform:scale(.8)}12%{opacity:1;transform:scale(1.12)}24%{transform:scale(1)}75%{opacity:1}100%{opacity:0}}
@media(prefers-reduced-motion:reduce){#balanceButton.gain::after{animation:none}}

/* The window «Задания»: this desktop's tab control with two tabs, «Задания» (today's tasks and the week of the streak)
   and «Достижения»; a tab carries the number of things in it that wait, on a yellow note. Both pages lie one over the
   other, so the window keeps one size. A row is its words, this desktop's progress bar (a piece a step), how far it
   is, and at its end what it pays, the button that takes it, or a tick. What a row, a cell or a heading has more to
   say is a yellow note by it, under the pointer that rests on it or on a tap. */
@media(min-width:901px){#w-quests{width:540px;top:8%}}
#w-quests .dialog-body{padding:10px 12px 6px}
.quests-panel{position:relative;flex:1;min-width:0;display:grid;align-content:start}
.quests-none,.quests-doubt{font-size:12px;color:#444}
.quests-doubt{margin-bottom:8px;color:#b02a12;font-weight:700}
.quest-tabs{position:relative;z-index:1;display:flex;align-items:flex-end;gap:2px;padding-left:3px}
.quests-panel .quest-tab{display:flex;align-items:center;gap:6px;min-height:21px;margin-bottom:-1px;padding:2px 10px;border:1px solid #919b9c;border-bottom:0;border-radius:3px 3px 0 0;background:linear-gradient(#fff,#ecebe5);color:#000;font:400 12px var(--ui);white-space:nowrap}
.quests-panel .quest-tab:hover:not(.on){box-shadow:inset 0 2px 0 #f8b636}
.quests-panel .quest-tab.on{min-height:24px;padding-inline:12px;background:#fcfcfe;box-shadow:inset 0 2px 0 #f8b636}
.quest-tab b{min-width:16px;padding:0 4px;border:1px solid #000;border-radius:3px;background:#ffffe1;font-size:11px;font-weight:400;line-height:13px;text-align:center}
.quest-panes{display:grid;padding:8px 10px 10px;border:1px solid #919b9c;background:#fcfcfe}
.quest-pane{grid-area:1/1;min-width:0;display:grid;align-content:start;gap:10px}
.quest-pane.off{visibility:hidden}
.quests-part{display:grid;align-content:start;gap:5px;min-width:0}
.quests-title{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:22px;min-width:0;padding-bottom:2px;background:linear-gradient(90deg,#7ba2e7,#7ba2e700 92%) left bottom/100% 1px no-repeat}
.quests-title h3{flex:none;font:700 12px var(--ui);color:#0c327d}
.quests-title small{font-size:11px;color:#555;font-variant-numeric:tabular-nums;white-space:nowrap}
.quest-rows{list-style:none;padding:0}
.quest-row{display:grid;grid-template-columns:minmax(0,170px) minmax(0,1fr) 62px 124px;align-items:center;gap:0 10px;min-height:30px;margin:0 -4px;padding:0 4px;font-size:12px}
.quest-name{min-width:0;line-height:1.25}
.quest-row.claimed .quest-name,.quest-row.claimed .quest-count{color:#808080}
/* The progress bar of this desktop, in the gold of the guarantee's bar. */
.quest-bar{display:flex;gap:2px;min-width:0;height:14px;padding:1px;border:1px solid #686868;border-radius:3px;background:#fff;box-shadow:inset 1px 1px 1px #0002}
.quest-bar i{flex:1;--c:#e8b21c;background:linear-gradient(#fff8,transparent 40%,#0002) 0 0/calc(var(--fill,0)*100%) 100% no-repeat,linear-gradient(var(--c),var(--c)) 0 0/calc(var(--fill,0)*100%) 100% no-repeat;-webkit-mask:repeating-linear-gradient(90deg,#000 0 6px,transparent 6px 8px);mask:repeating-linear-gradient(90deg,#000 0 6px,transparent 6px 8px)}
.quest-bar i+i{margin-left:3px}
.quest-bar .ready{--c:#f8b636}
.quest-count{color:#555;font-size:11px;font-variant-numeric:tabular-nums;text-align:right;white-space:nowrap}
.quest-pay{justify-self:end;font-weight:700;color:#5c4300;white-space:nowrap}
.quest-got{justify-self:end;display:grid;place-items:center;width:16px;height:16px;color:#21a121}
.quest-got svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2.2}
/* The button keeps one width whatever it says, «Секунду…» too, so a press moves nothing. */
/* A row whose reward waits is itself what is pressed (quests.js): it is lit the way a thing under the pointer is on
   this desktop, selected while pressed, and where a button would stand it says «Забрать +10 ◎» as a link does. The
   day of the week whose prize waits is pressed the same way. */
.quest-claim{justify-self:end;min-width:108px;color:var(--link);font-weight:700;text-align:right;text-decoration:underline;white-space:nowrap}
.quests-panel .press[tabindex]{cursor:pointer}
.quest-row.press{background:#fff4c9;box-shadow:inset 0 0 0 1px #f8b636}
.quest-row.press:active{background:var(--sel)}
.quest-row.press:active>*{color:#fff}
.streak-mark.press:active{background:var(--sel);color:#fff}
.streak-mark.going{opacity:.5}
.quests-panel .press[aria-disabled=true]{cursor:default;opacity:.6}
@media(hover:hover){.quest-row.press:not([aria-disabled=true]):hover{box-shadow:inset 0 0 0 2px #f8b636}.streak-mark.press:not([aria-disabled=true]):hover{background:#ffe9a3}}
/* The way to a free case that waits is an ordinary button of this desktop, in the streak's place for one. */
.quests-panel .quest-free{flex:none;min-height:23px;padding:3px 12px;border:1px solid #003c74;border-radius:3px;background:linear-gradient(#fff,#ecebe5 86%,#d8d0c4);color:#000;white-space:nowrap}
.quests-panel .quest-free:hover:not(:disabled){box-shadow:inset 0 0 0 2px #f8b636}
.quests-panel .quest-free:active:not(:disabled){background:linear-gradient(#d8d0c4,#ecebe5)}
.quests-panel .quest-free:disabled{color:#aca899;border-color:#c9c7ba;cursor:default}
.quests-panel .quest-link{justify-self:end;min-height:23px;padding:0;border:0;background:none;color:var(--link);text-decoration:underline;white-space:nowrap}
.quests-panel .quest-link:disabled{color:var(--edge);cursor:default}

/* A thing that has more to say has a note (quests.js shows it, and gives the thing a place for the keyboard, shown by the dotted
   frame): the pointer over it is the one that asks, and a row whose note shows is selected the way a list out of
   focus selects. The note is this desktop's yellow one, by the thing pressed, under it or over it, with a tail that
   points at it (--at, from the script); empty, it is nothing at all. */
.quests-panel [tabindex]{cursor:help;-webkit-tap-highlight-color:transparent}
.quests-panel [tabindex]:focus-visible,.quests-panel .quest-tab:focus-visible{outline:1px dotted #000;outline-offset:2px}
.quests-panel .quest-row:focus-visible,.quests-panel .streak-mark:focus-visible,.quests-panel .quest-tab:focus-visible{outline-offset:-3px}
.quest-row.noted{background:var(--face)}
@media(hover:hover){.quest-note{pointer-events:none}}
.quest-note{position:absolute;z-index:3;left:0;top:0;width:max-content;max-width:100%;padding:4px 8px;border:1px solid #000;border-radius:3px;background:#ffffe1;box-shadow:2px 3px 4px #0005;color:#000;font:400 12px/1.4 var(--ui);white-space:pre-line;cursor:default}
.quest-note::before{content:"";position:absolute;left:var(--at,20px);top:-5px;width:7px;height:7px;margin-left:-4px;border:solid #000;border-width:1px 0 0 1px;background:inherit;transform:rotate(45deg)}
.quest-note.up::before{top:auto;bottom:-5px;border-width:0 1px 1px 0}
.quest-note:empty{padding:0;border:0;box-shadow:none}
.quest-note:empty::before{content:none}

/* The week of the streak: seven cells, each with what its day gives. A day paid is green and ticked; one whose prize
   waits is lit the way a button under the pointer is; today's is selected; the seventh is a case. Under them, only
   while there is something to take, the button that takes it or the one that leads to the cases. */
.streak-marks{list-style:none;display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px;padding:0}
.streak-mark{position:relative;display:grid;place-items:center;height:30px;border:1px solid #aca899;background:#fff;color:#555;font-size:11px;font-variant-numeric:tabular-nums;white-space:nowrap}
.streak-mark.paid{background:#e3f4dc;border-color:#5aa02c;color:#1a7a1a}
.streak-mark.paid::after{content:"✓";position:absolute;top:-1px;right:2px;font-size:9px;font-weight:700}
.streak-mark.due{background:#fff4c9;box-shadow:inset 0 0 0 2px #f8b636;color:#000;font-weight:700}
.streak-mark.next{color:#000}
.streak-mark.today{border-color:#1c3f7c;outline:1px solid #1c3f7c}
.streak-mark svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.3;stroke-linejoin:round;stroke-linecap:round}
.streak-mark.case{color:#8a6d0b}
.quest-acts{display:flex;align-items:center;justify-content:flex-end;gap:8px;margin-top:3px}
@media(pointer:coarse){.quests-panel .quest-tab{min-height:30px}.quests-panel .quest-tab.on{min-height:33px}.quests-panel .quest-free{min-height:30px}.quests-panel .quest-link{min-height:30px}}
/* On a phone the window stands at the top of the screen and may take all of it above the taskbar, so that it is
   whole at once where the screen allows; where it does not, the window scrolls inside itself. On a wide one (a phone
   on its side, a tablet) it keeps the width it has on a desktop, in the middle of the screen. */
@media(max-width:900px){
  #w-quests{top:6px!important;max-height:calc(100% - var(--bar) - 12px);max-height:calc(100dvh - var(--bar) - 12px)}
  #w-quests{left:50%!important;right:auto!important;width:min(540px,calc(100% - 16px))!important;transform:translateX(-50%)}
  #w-quests .dialog-body{padding:8px 10px 4px}
  #w-quests .dialog-foot{padding:4px 10px 8px}
}
/* A narrow phone: a row is two lines, its words and what it pays over its bar and its count; the mark in the tray
   is without its number, so that the strip of windows keeps its room (the number is in the Start menu). */
@media(max-width:480px){
  .quest-panes{padding:6px 8px 8px}
  .quest-row{grid-template-columns:minmax(0,1fr) auto;gap:2px 8px;min-height:52px;padding-block:4px}
  .quest-row>:nth-child(1){grid-area:1/1}.quest-row>:nth-child(2){grid-area:2/1/3/3;margin-right:74px}.quest-row>:nth-child(3){grid-area:2/2}.quest-row>:nth-child(4){grid-area:1/2;min-height:26px}
  .quest-row+.quest-row{border-top:1px solid var(--face)}
}
@media(max-width:420px){
  .quests-mark b{display:none}
}
/* A low screen (a small phone, a phone on its side): the window a little higher. */
@media(max-width:900px) and (max-height:640px){
  #w-quests{top:4px!important;max-height:calc(100% - var(--bar) - 8px);max-height:calc(100dvh - var(--bar) - 8px)}
  #w-quests .dialog-body{padding-top:5px}
}
.save-panel .save-telegram{display:inline-block;margin-top:6px;padding:4px 12px;border:1px solid #003c74;border-radius:3px;background:#2aabee;color:#fff;text-decoration:none}
