/* The Sky Scouts accounts on every page (build_site.py copies this file to site/acct/kit.css; kit.js makes the elements): the badge
   tab and its menu, the shelf buttons on the books, the toast, and the sign-in sheet. The paper, ink and coral of the landing page's
   notes; the landing page's own colours when they are there (its :root), the same values when they are not. */
.ss-badge { --bc: #ecc66c; display: inline-grid; place-items: center; flex: none; width: 30px; aspect-ratio: 1; border-radius: 50%; background: var(--bc);
  color: #2b2f4a; box-shadow: inset 0 0 0 2px rgba(255, 250, 240, .85), 0 2px 5px rgba(4, 7, 18, .28); }
.ss-badge svg { width: 74%; height: 74%; fill: currentColor; overflow: visible; }
.ss-badge .hl { fill: var(--bc); } .ss-badge .hs { fill: none; stroke: var(--bc); } .ss-badge .lt { fill: #fffaf0; }
.ss-badge.big { width: 46px; } .ss-badge.huge { width: 88px; box-shadow: inset 0 0 0 3px rgba(255, 250, 240, .9), 0 6px 16px rgba(4, 7, 18, .3); }

/* the tab: hangs from the page's top edge like the "Coming soon" one, on the other side */
.ss-me { position: relative; z-index: 30; font-family: var(--font, 'Fredoka', ui-rounded, system-ui, sans-serif); }
.ss-me-top { position: absolute; top: 0; right: var(--gut, 16px); }
@media (max-width: 699.98px) { .ss-me-top { right: auto; left: 16px; } .ss-me-top .ss-menu { right: auto; left: 0; } }
.ss-tab { display: flex; align-items: center; gap: 8px; padding: 6px 12px 7px 7px; border: 0; border-radius: 0 0 16px 16px; background: #f6efdc; color: #2b2f4a;
  font: 600 15px/1 var(--font, 'Fredoka', ui-rounded, system-ui, sans-serif); cursor: pointer;
  box-shadow: 0 8px 18px rgba(4, 7, 18, .4), inset 0 -3px 0 rgba(160, 130, 80, .22); transition: padding .25s; }
.ss-tab:hover, .ss-tab[aria-expanded="true"] { padding-top: 10px; }
.ss-tab:focus-visible { outline: 3px solid #ffe9a0; outline-offset: 2px; }
.ss-tab-name { max-width: 9em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ss-chev { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.ss-tab[aria-expanded="true"] .ss-chev { transform: rotate(180deg); }
@media (max-width: 419.98px) { .ss-me-top .ss-tab-name { display: none; } }
.ss-menu { position: absolute; right: 0; top: calc(100% + 10px); width: 258px; padding: 8px; border-radius: 12px; background: #f8f1df; color: #2b2f4a;
  box-shadow: 0 20px 44px rgba(4, 7, 18, .55), 0 3px 10px rgba(4, 7, 18, .3); }
.ss-menu[hidden] { display: none; }
.ss-menu-head { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 8px 8px 12px;
  margin-bottom: 4px; border-bottom: 2px dotted #d6c7a5; }
.ss-menu-head .ss-badge { grid-row: 1 / 3; }
.ss-menu-head b { font: 600 18px/1.2 var(--hand, 'Fredoka', ui-rounded, sans-serif); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; align-self: end; }
.ss-menu-head small { font-size: 13px; color: #6a6075; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; align-self: start; }
.ss-menu a, .ss-menu button { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 10px 10px; border: 0; border-radius: 8px;
  background: none; color: inherit; font: 500 16px/1.2 var(--font, 'Fredoka', ui-rounded, system-ui, sans-serif); text-decoration: none; text-align: left; cursor: pointer; }
.ss-menu a:hover, .ss-menu button:hover, .ss-menu a:focus-visible, .ss-menu button:focus-visible { background: #ede1c3; outline: none; }
.ss-menu i { font-style: normal; font-size: 13px; font-weight: 600; min-width: 24px; padding: 3px 7px; border-radius: 99px; background: #2b2f4a; color: #f8f1df; text-align: center; }
.ss-menu .ss-menu-out { color: #a8452f; }

/* the shelf button on a book's cover: + to add, a tick in the badge's colour once on the shelf */
.ss-rib { --bc: #ecc66c; position: absolute; z-index: 4; top: -10px; right: calc((100% - var(--cw, 172px)) / 2 - 10px); display: grid; place-items: center;
  width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: #fffaf0; color: #2b2f4a; cursor: pointer;
  box-shadow: 0 3px 0 rgba(150, 120, 80, .45), 0 6px 14px rgba(4, 7, 18, .45); transition: transform .25s var(--ease, ease), background .2s; }
.ss-rib svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.ss-rib .k, .ss-rib.on .p { display: none; } .ss-rib.on .k { display: block; }
.ss-rib.on { background: var(--bc); }
.ss-rib:hover, .ss-rib:focus-visible { transform: scale(1.12); }
.ss-rib:focus-visible { outline: 3px solid #ffe9a0; outline-offset: 2px; }
.book:has(.cover:hover) .ss-rib { transform: translateY(-10px); }
@media (max-width: 699.98px) { .ss-rib { right: calc(var(--gap, 12px) / 2 - 7px); top: -8px; width: 30px; height: 30px; } .ss-rib svg { width: 17px; height: 17px; } }

/* the open book's button, beside "Next book" */
.v-shelf { --bc: #ecc66c; display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px 8px 10px; border: 2px solid var(--ink, #2b2f4a); border-radius: 18px;
  background: transparent; color: var(--ink, #2b2f4a); font: 600 14.5px/1 var(--font, 'Fredoka', ui-rounded, system-ui, sans-serif); cursor: pointer; }
.v-shelf[hidden] { display: none; }
.v-shelf .ss-vmark { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--ink, #2b2f4a); color: #f8f1df; font-size: 14px; }
.v-shelf.on { background: var(--bc); border-color: var(--bc); }
.v-shelf:hover, .v-shelf:focus-visible { transform: translateY(-1px); }
.v-buy { padding: 7px 14px 8px; background: #e2725b; border-color: #e2725b; color: #fffaf0; } .v-buy:disabled { opacity: .75; cursor: default; }

/* the toast */
.ss-toast { position: fixed; z-index: 1000; left: 50%; bottom: 22px; display: flex; align-items: center; gap: 14px; max-width: calc(100vw - 32px); box-sizing: border-box;
  padding: 12px 14px 12px 18px; border-radius: 14px; background: #f8f1df; color: #2b2f4a; font: 500 15.5px/1.35 var(--font, 'Fredoka', ui-rounded, system-ui, sans-serif);
  box-shadow: 0 16px 36px rgba(4, 7, 18, .55); transform: translate(-50%, calc(100% + 40px)); transition: transform .4s var(--ease, ease); pointer-events: none; }
.ss-toast.on { transform: translate(-50%, 0); pointer-events: auto; }
.ss-toast a, .ss-toast button { flex: none; padding: 7px 12px; border: 0; border-radius: 99px; background: #2b2f4a; color: #f8f1df; font: 600 14px/1 inherit;
  font-family: inherit; text-decoration: none; cursor: pointer; }

/* the sign-in sheet */
.ss-dlg { width: min(440px, calc(100vw - 24px)); max-width: none; max-height: calc(100dvh - 24px); padding: 0; border: 0; background: transparent; overflow: visible; color: #2b2f4a; }
.ss-dlg::backdrop { background: rgba(8, 11, 28, .66); backdrop-filter: blur(3px); }
.ss-dlg[open] .ss-card { animation: ss-in .35s var(--ease, ease); }
@keyframes ss-in { from { opacity: 0; transform: translateY(18px) rotate(-.6deg); } }
.ss-card { color-scheme: light; position: relative; max-height: calc(100dvh - 24px); overflow: auto; box-sizing: border-box; padding: 30px clamp(20px, 6vw, 32px) 22px; border-radius: 6px;
  background: #f8f1df repeating-linear-gradient(180deg, transparent 0 31px, rgba(160, 140, 110, .14) 31px 32px);
  box-shadow: 0 30px 60px rgba(4, 7, 18, .6), 0 4px 12px rgba(4, 7, 18, .3); font-family: var(--font, 'Fredoka', ui-rounded, system-ui, sans-serif); }
.ss-x { position: absolute; top: 10px; right: 10px; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%;
  background: transparent; color: #6a6075; cursor: pointer; }
.ss-x svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.ss-x:hover, .ss-x:focus-visible { background: #ede1c3; color: #2b2f4a; outline: none; }
.ss-form { display: grid; gap: 14px; margin: 0; }
.ss-form > p { margin: 0; }
.ss-kick { font: 600 11.5px/1 var(--font, 'Fredoka', sans-serif); letter-spacing: .14em; text-transform: uppercase; color: #a2672a; }
.ss-h { margin: -6px 0 -6px; padding-right: 24px; font: 600 clamp(25px, 6.4vw, 30px)/1.15 var(--hand, 'Fredoka', ui-rounded, sans-serif); color: #2b2f4a; text-wrap: balance; }
.ss-sub { font-size: 16px; line-height: 1.45; color: #5d5670; }
.ss-sub b { color: #2b2f4a; font-weight: 600; word-break: break-all; }
.ss-field { display: grid; gap: 4px; font: 500 15.5px/1.2 var(--hand, 'Fredoka', ui-rounded, sans-serif); color: #6a6075; }
.ss-field input { width: 100%; box-sizing: border-box; padding: 8px 2px 7px; border: 0; border-bottom: 2px dotted #b9a888; border-radius: 0; background: transparent;
  color: #2b2f4a; font: 400 18px/1.3 var(--font, 'Fredoka', ui-rounded, system-ui, sans-serif); }
.ss-field input:focus { outline: none; border-bottom: 2px solid #e2725b; }
.ss-btn { display: block; width: 100%; padding: 14px 20px 15px; border: 0; border-radius: 999px; background: #e2725b; color: #fffaf0; cursor: pointer;
  font: 650 17px/1 var(--font, 'Fredoka', ui-rounded, system-ui, sans-serif); box-shadow: 0 3px 0 #b3513d, 0 8px 16px rgba(120, 50, 30, .25); transition: transform .2s var(--ease, ease); }
.ss-btn:hover, .ss-btn:focus-visible { transform: translateY(-2px); }
.ss-btn:focus-visible { outline: 3px solid #2b2f4a; outline-offset: 3px; }
.ss-btn:disabled { opacity: .65; cursor: progress; transform: none; }
.ss-msg { min-height: 0; font-size: 15px; line-height: 1.4; color: #b3513d; }
.ss-msg:empty { display: none; }
.ss-msg.good { color: #3d7a57; }
.ss-note { font-size: 13.5px; line-height: 1.45; color: #776c62; text-align: center; }
.ss-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ss-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 10px; font-size: 15px; }
.ss-link { padding: 4px 2px; border: 0; background: none; color: #a8452f; font: 500 15px/1.2 var(--font, 'Fredoka', ui-rounded, system-ui, sans-serif); cursor: pointer;
  text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 3px; }
.ss-link:disabled { color: #8e8496; cursor: default; text-decoration: none; }
.ss-dot { color: #b9a888; }

/* six boxes for the code; one real input lies over them (paste and the phone's own code suggestion work) */
.ss-code { position: relative; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(5px, 2vw, 9px); margin: 2px 0; }
.ss-box { display: grid; place-items: center; height: clamp(50px, 14vw, 58px); border: 2px dashed #b9a888; border-radius: 10px; background: rgba(255, 255, 255, .5);
  font: 600 clamp(24px, 7vw, 30px)/1 var(--font, 'Fredoka', ui-rounded, system-ui, sans-serif); color: #2b2f4a; transition: border-color .15s, transform .15s; }
.ss-box:not(:empty) { border-style: solid; border-color: #8e7f63; }
.ss-box.cur { border: 2px solid #e2725b; box-shadow: 0 0 0 3px rgba(226, 114, 91, .2); }
.ss-code-in { position: absolute; inset: 0; width: 100%; height: 100%; box-sizing: border-box; padding: 0; border: 0; background: transparent; color: transparent;
  caret-color: transparent; font-size: 16px; letter-spacing: 2em; outline: none; cursor: text; }
.ss-code-in::selection { background: transparent; }
.ss-code.bad { animation: ss-shake .4s; } .ss-code.bad .ss-box { border-color: #c75a42; }
@keyframes ss-shake { 20% { transform: translateX(-7px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(2px); } }

/* the badge picker */
.ss-pick { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: center; padding: 12px; border-radius: 12px; background: rgba(255, 255, 255, .45);
  border: 2px dotted #d6c7a5; }
.ss-pick-sets { display: grid; gap: 6px; }
.ss-lab { font: 500 14.5px/1.2 var(--hand, 'Fredoka', ui-rounded, sans-serif); color: #6a6075; }
.ss-emb, .ss-col { display: flex; flex-wrap: wrap; gap: 4px; }
.ss-prev .ss-badge.huge { width: 70px; }
.ss-emb button { padding: 2px; border: 2px solid transparent; border-radius: 50%; background: none; cursor: pointer; line-height: 0; }
.ss-emb .ss-badge { width: 32px; }
.ss-emb button[aria-checked="true"] { border-color: #2b2f4a; }
.ss-col button { width: 26px; height: 26px; padding: 0; border: 3px solid #fffaf0; border-radius: 50%; background: var(--sw); cursor: pointer;
  box-shadow: 0 0 0 1px #c9b994; }
.ss-col button[aria-checked="true"] { box-shadow: 0 0 0 2px #2b2f4a; }
.ss-emb button:focus-visible, .ss-col button:focus-visible { outline: 3px solid #e2725b; outline-offset: 1px; }
@media (max-width: 480px) {
  /* six emblems need the whole width on a phone: the preview goes above them */
  .ss-pick { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 8px; text-align: center; }
  .ss-pick-sets { justify-items: center; }
  .ss-emb, .ss-col { justify-content: center; }
  .ss-prev .ss-badge.huge { width: 60px; }
}
@media (max-width: 379.98px) { .ss-pick { grid-template-columns: minmax(0, 1fr); justify-items: center; } }
.ss-check { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: start; font-size: 15px; line-height: 1.4; color: #3f3b52; cursor: pointer; }
.ss-check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: #e2725b; cursor: pointer; }
.ss-check a { color: #a8452f; }

/* signed in: the badge with a burst of little stars */
.ss-done { display: grid; justify-items: center; gap: 12px; padding: 14px 0 10px; text-align: center; }
.ss-done .ss-h { padding: 0; margin: 4px 0 0; }
.ss-done-b { position: relative; display: grid; place-items: center; }
.ss-done-b > .ss-badge { animation: ss-pop .55s var(--ease, ease); }
@keyframes ss-pop { 0% { transform: scale(.3); } 70% { transform: scale(1.12); } }
.ss-burst { position: absolute; inset: 0; pointer-events: none; }
.ss-burst i { position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; margin: -8px; background: #e3b04b; opacity: 0;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); animation: ss-fly 1.1s cubic-bezier(.2, .7, .3, 1) var(--d) forwards; }
.ss-burst i:nth-child(3n) { background: #e2725b; } .ss-burst i:nth-child(3n+1) { background: #6fb3d6; }
@keyframes ss-fly {
  0% { opacity: 0; transform: translate(var(--sx), var(--sy)) scale(.4); }
  12% { opacity: 1; } 65% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--x), var(--y)) rotate(120deg) scale(.8); } }
@media (prefers-reduced-motion: reduce) {
  .ss-dlg[open] .ss-card, .ss-done-b > .ss-badge, .ss-burst i, .ss-code.bad { animation: none; }
  .ss-toast, .ss-rib, .ss-tab { transition: none; }
}
