/* ============================================================
   ANDROID 4.4 KITKAT SHELL
   ============================================================ */

/* Roboto is the real KitKat system font. Bundled locally rather than
   pulled from the Google Fonts CDN so the site works offline and over
   file://. One variable file covers every weight used here. */
@font-face {
  font-family: "Roboto";
  src: url("fonts/roboto-var.woff2") format("woff2-variations"),
       url("fonts/roboto-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ------------------------------------------------------------
   TOKENS
   ------------------------------------------------------------ */
#kitkat-shell {
  --status-h:   25px;
  --nav-h:      48px;
  --blue:       #33b5e5;
  --ink:        #212121;
  --ink-2:      #727272;
  --divider:    #e0e0e0;
  --scrim:      rgba(0, 0, 0, .86);
  --font:       Roboto, "Helvetica Neue", Arial, sans-serif;

  font-family: var(--font);
  font-size: 14px;
  color: #fff;
  background: #0d0a1a;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* KitKat's translucent system bars sit over the wallpaper. */
.kk-wallpaper {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 26% 18%, rgba(255, 176, 108, .40), transparent 46%),
    radial-gradient(circle at 74% 72%, rgba(126, 96, 214, .45), transparent 55%),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, .07), transparent 60%),
    linear-gradient(158deg, #34215c 0%, #1d1237 42%, #0c0918 100%);
}

/* ------------------------------------------------------------
   STATUS BAR
   ------------------------------------------------------------ */
.kk-statusbar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: var(--status-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .2px;
  background: linear-gradient(180deg, rgba(0, 0, 0, .45), rgba(0, 0, 0, .12));
  z-index: 400;
  pointer-events: none;
}
.kk-status-icons { display: flex; align-items: center; gap: 6px; opacity: .95; }
.kk-status-icons svg { height: 12px; width: auto; color: #fff; }
.kk-status-icons svg.kk-batt { height: 14px; }

/* ------------------------------------------------------------
   LAUNCHER
   ------------------------------------------------------------ */
.kk-launcher {
  position: absolute;
  inset: var(--status-h) 0 var(--nav-h) 0;
  display: flex;
  flex-direction: column;
  transition: transform .18s ease, opacity .18s ease;
}
.kk-launcher.is-behind { transform: scale(.94); opacity: 0; pointer-events: none; }

.kk-searchbar {
  flex: none;
  margin: 12px 12px 4px;
  height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  background: rgba(255, 255, 255, .92);
  border-radius: 2px;
  color: var(--ink-2);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .3);
}
.kk-searchbar .kk-g {
  font-size: 19px;
  font-weight: 500;
  color: #4285f4;
  line-height: 1;
}
.kk-searchbar input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
}
.kk-searchbar input::placeholder { color: var(--ink-2); }
.kk-searchbar svg { width: 20px; height: 20px; flex: none; color: var(--ink-2); }

.kk-pages { flex: 1; min-height: 0; display: flex; overflow: hidden; touch-action: pan-y; }
.kk-pages-track {
  display: flex;
  width: 100%;
  transition: transform .25s cubic-bezier(.2, .8, .3, 1);
}
.kk-pages-track.is-dragging { transition: none; }
.kk-page {
  flex: 0 0 100%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-content: start;
  gap: 14px 4px;
  padding: 14px 8px;
}

.kk-app {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 4px 2px;
  background: none;
  border: 0;
  font: inherit;
  color: #fff;
  transition: transform .12s ease;
}
.kk-app:active { transform: scale(.9); }
.kk-app svg { width: 48px; height: 48px; flex: none; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .4)); }
.kk-app span {
  font-size: 12px;
  font-weight: 400;
  line-height: 1.2;
  text-align: center;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .85);
  word-break: break-word;
}

/* A folder tile stacks its children inside a translucent disc. */
.kk-folder-tile {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .35);
  display: grid;
  grid-template: 1fr 1fr / 1fr 1fr;
  gap: 2px;
  padding: 5px;
  flex: none;
}
.kk-folder-tile svg { width: 100%; height: 100%; }

.kk-dots { flex: none; display: flex; justify-content: center; gap: 7px; padding: 6px 0 10px; }
.kk-dots i {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .35);
  transition: background .2s ease;
}
.kk-dots i.is-active { background: #fff; }

.kk-dock {
  flex: none;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 8px 10px 12px;
  background: rgba(0, 0, 0, .22);
  border-top: 1px solid rgba(255, 255, 255, .10);
}
/* Dock tiles are icon-only — but the All Apps wrapper is a span too. */
.kk-dock .kk-app > span:not(.kk-allapps) { display: none; }
.kk-allapps {
  width: 48px; height: 48px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: rgba(255, 255, 255, .92);
}
.kk-allapps svg { width: 26px !important; height: 26px !important; color: #4a4a4a; filter: none !important; }

/* ------------------------------------------------------------
   FOLDER OVERLAY
   ------------------------------------------------------------ */
.kk-folder {
  position: absolute;
  inset: var(--status-h) 0 var(--nav-h) 0;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, .55);
  z-index: 300;
}
.kk-folder.is-open { display: flex; animation: kk-fade .15s ease; }
.kk-folder-name {
  font-size: 15px;
  margin-bottom: 12px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .8);
}
.kk-folder-panel {
  width: min(86%, 320px);
  background: rgba(245, 245, 245, .95);
  border-radius: 3px;
  padding: 16px 10px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px 4px;
  animation: kk-pop .16s cubic-bezier(.2, .9, .3, 1);
}
.kk-folder-panel .kk-app { color: var(--ink); }
.kk-folder-panel .kk-app span { text-shadow: none; }

@keyframes kk-pop { from { transform: scale(.7); opacity: 0; } }
@keyframes kk-fade { from { opacity: 0; } }

/* ------------------------------------------------------------
   ALL APPS DRAWER
   ------------------------------------------------------------ */
.kk-drawer {
  position: absolute;
  inset: var(--status-h) 0 var(--nav-h) 0;
  background: var(--scrim);
  z-index: 320;
  display: none;
  flex-direction: column;
}
.kk-drawer.is-open { display: flex; animation: kk-pop .18s cubic-bezier(.2, .9, .3, 1); }
.kk-drawer-tabs {
  flex: none;
  display: flex;
  justify-content: center;
  gap: 34px;
  padding: 12px 0 0;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .5);
}
.kk-drawer-tabs .is-active { color: #fff; border-bottom: 2px solid var(--blue); padding-bottom: 8px; }
.kk-drawer-grid {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-content: start;
  gap: 20px 4px;
  padding: 22px 8px;
}

/* ------------------------------------------------------------
   SEARCH OVERLAY
   ------------------------------------------------------------ */
.kk-search {
  position: absolute;
  inset: 0 0 var(--nav-h) 0;
  background: #fafafa;
  color: var(--ink);
  z-index: 500;
  display: none;
  flex-direction: column;
}
.kk-search.is-open { display: flex; }
.kk-search-field {
  flex: none;
  margin-top: var(--status-h);
  height: 56px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .22);
}
.kk-search-field svg { width: 22px; height: 22px; flex: none; color: var(--ink-2); }
.kk-search-field input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  font: inherit;
  font-size: 17px;
  color: var(--ink);
}
.kk-suggestions { flex: 1; min-height: 0; overflow: auto; }
.kk-suggestion {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 12px 16px;
  background: #fff;
  border: 0;
  border-bottom: 1px solid var(--divider);
  font: inherit;
  color: var(--ink);
  text-align: left;
}
.kk-suggestion:active { background: #eeeeee; }
.kk-suggestion svg { width: 34px; height: 34px; flex: none; }
.kk-suggestion b { font-weight: 400; font-size: 16px; display: block; }
.kk-suggestion i { font-style: normal; font-size: 12px; color: var(--ink-2); }
.kk-search .kk-empty { padding: 22px 16px; color: var(--ink-2); }

/* ------------------------------------------------------------
   ACTIVITIES
   ------------------------------------------------------------ */
.kk-activity {
  position: absolute;
  inset: var(--status-h) 0 var(--nav-h) 0;
  background: #fafafa;
  color: var(--ink);
  z-index: 200;
  display: flex;
  flex-direction: column;
  animation: kk-pop .17s cubic-bezier(.2, .9, .3, 1);
}
.kk-actionbar {
  flex: none;
  height: 48px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 12px;
  background: #303030;
  color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, .3);
}
.kk-actionbar .kk-up { width: 22px; height: 22px; flex: none; color: #fff; transform: scaleX(.8); }
.kk-actionbar h1 { flex: 1; font-size: 17px; font-weight: 500; letter-spacing: .2px; }
.kk-overflow { flex: none; font-size: 20px; line-height: 1; letter-spacing: 1px; opacity: .9; }
.kk-activity-body { flex: 1; min-height: 0; overflow: auto; background: #fafafa; }
.kk-activity-body iframe { width: 100%; height: 100%; }

.kk-card {
  margin: 12px;
  padding: 20px 18px;
  background: #fff;
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
}
.kk-card svg { width: 56px; height: 56px; margin-bottom: 14px; }
.kk-card h2 { font-size: 19px; font-weight: 400; margin-bottom: 10px; }
.kk-card p { color: var(--ink-2); line-height: 1.6; margin-bottom: 12px; font-size: 14px; }
.kk-bar {
  height: 4px;
  background: #e0e0e0;
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 6px;
}
.kk-bar i { display: block; height: 100%; width: 22%; background: var(--blue); }
.kk-note { font-size: 12px; color: var(--ink-2); }
.kk-link {
  display: inline-block;
  padding: 10px 18px;
  background: var(--blue);
  color: #fff;
  border-radius: 2px;
  text-decoration: none;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .6px;
  font-size: 13px;
}
button.kk-link { border: 0; cursor: pointer; }

.kk-form { margin: 12px; }
.kk-field { margin-bottom: 16px; }
.kk-field label {
  display: block;
  font-size: 12px;
  color: var(--ink-2);
  text-transform: uppercase;
  letter-spacing: .4px;
  margin-bottom: 4px;
}
.kk-field input,
.kk-field textarea {
  display: block;
  width: 100%;
  border: 0;
  border-bottom: 1px solid #ccc;
  outline: 0;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: transparent;
  padding: 8px 2px;
}
.kk-field input:focus,
.kk-field textarea:focus { border-bottom-color: var(--blue); }
.kk-field textarea { resize: vertical; min-height: 90px; font-family: inherit; }

/* ------------------------------------------------------------
   RECENTS
   ------------------------------------------------------------ */
.kk-recents {
  position: absolute;
  inset: var(--status-h) 0 var(--nav-h) 0;
  background: rgba(0, 0, 0, .78);
  z-index: 600;
  display: none;
  flex-direction: column-reverse;
  align-items: center;
  gap: 12px;
  padding: 18px 14px;
  overflow: auto;
}
.kk-recents.is-open { display: flex; animation: kk-fade .15s ease; }
.kk-recents .kk-empty { color: rgba(255, 255, 255, .6); margin: auto; }
.kk-rcard {
  flex: none;
  width: min(94%, 340px);
  background: #fff;
  color: var(--ink);
  border-radius: 2px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .5);
  transition: transform .18s ease, opacity .18s ease;
}
.kk-rcard.is-dismissed { transform: translateX(110%); opacity: 0; }
.kk-rcard-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: #303030;
  color: #fff;
  font-size: 14px;
}
.kk-rcard-head svg { width: 22px; height: 22px; flex: none; }
.kk-rcard-preview {
  height: 96px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: #fafafa;
}
.kk-rcard-preview svg { width: 44px; height: 44px; flex: none; opacity: .85; }
.kk-rcard-preview span { color: var(--ink-2); font-size: 13px; }

/* ------------------------------------------------------------
   NAVIGATION BAR
   ------------------------------------------------------------ */
.kk-navbar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: #000;
  z-index: 700;
}
.kk-navbtn {
  width: 76px;
  height: 100%;
  display: grid;
  place-items: center;
  background: none;
  border: 0;
  color: rgba(255, 255, 255, .85);
}
.kk-navbtn svg { width: 22px; height: 22px; }
.kk-navbtn:active { color: #fff; background: rgba(255, 255, 255, .08); }
