/* Светът на знанията, the second look of the maps (index.html: look(), mapOf(); the pictures: tools/world_map.py).
   Its signs, title boards and the home's bar are drawn like its design's (assets/world/src/design.webp): light wooden
   boards with dark round letters, a round badge in the island's colour at their left end, a navy bar over the sky.
   The settings' picker of the two looks is here too. */

/* ---------- the signs ---------- */
.bay-stage.look-world .bay-plank {
  --c: #2f8f3f;                                                            /* its badge's colour (the islands': below) */
  font: 800 clamp(11px, calc(1.75 * var(--u)), 38px)/1.08 "Rubik", "Nunito", "Segoe UI", sans-serif;
  color: #3b2614; text-shadow: 0 .05em 0 rgba(255, 250, 235, .75); letter-spacing: 0; text-align: left;
  padding: .6em 1.05em .62em 2.45em; border-radius: .55em; border: .1em solid #b07a43;
  background: linear-gradient(180deg, #fff6de 0%, #f8e3b6 48%, #eecb8e 100%);
  box-shadow: inset 0 .08em 0 rgba(255, 255, 255, .85), inset 0 -.12em 0 rgba(160, 105, 50, .3), 0 .2em 0 #a46d38, 0 .45em .6em rgba(8, 50, 90, .35);
}
.bay-stage.look-world .bay-plank::before, .bay-stage.look-world .bay-plank::after { display: none; }
.bay-stage.look-world .bay-plank .nm { display: block; }
.bay-stage.look-world .bay-plank small { font: 800 .64em/1.1 "Nunito", "Segoe UI", sans-serif; color: #8a5524; margin-top: .22em; text-shadow: none; }
/* the badge: a white picture on the home map, the level's emoji or the chest on an island's */
.bay-stage.look-world .bay-plank .ico {
  position: absolute; left: -1.08em; top: 50%; transform: translateY(-50%); width: 3em; height: 3em; border-radius: 50%;
  display: grid; place-items: center; font-size: 1em; line-height: 1; text-shadow: none;
  background: radial-gradient(circle at 38% 30%, color-mix(in srgb, var(--c) 55%, #fff), var(--c) 58%, color-mix(in srgb, var(--c) 70%, #000));
  border: .17em solid #fff3d6; box-shadow: 0 0 0 .07em #b07a43, inset 0 -.15em .3em rgba(0, 0, 0, .22), 0 .25em .45em rgba(8, 50, 90, .4);
  animation: none;
}
.bay-stage.look-world .bay-plank .ico svg { width: 60%; height: 60%; filter: drop-shadow(0 .05em 0 rgba(0, 0, 0, .25)); }
.bay-stage.look-world.nmap-stage:not(.tmap-stage) .bay-plank .ico { font-size: 1.32em; width: 2.27em; height: 2.27em; left: -.82em; }
.bay-stage.look-world .bay-plank .tag:not(.me) { top: -.95em; right: -.6em; font-size: .52em; border-color: #fff; }
.bay-stage.look-world .bay-plank.soon { filter: saturate(.7) brightness(.97); }
.bay-stage.look-world .bay-plank.soon:hover, .bay-stage.look-world .bay-plank.soon.hot { filter: saturate(.85); }
.bay-stage.look-world.tmap-stage .bay-plank { font-size: clamp(11px, calc(1.6 * var(--u)), 34px); }
.bay-stage.look-world.tmap-stage .bay-plank.soon { font-size: clamp(10px, calc(1.35 * var(--u)), 28px); }
.bay-stage.look-world.tmap-stage .bay-plank:not(.soon) .ico { box-shadow: 0 0 0 .07em #b07a43, 0 0 .9em rgba(255, 214, 80, .95), 0 .25em .45em rgba(8, 50, 90, .4); animation: worldGlow 1.8s ease-in-out infinite; }
@keyframes worldGlow { 50% { box-shadow: 0 0 0 .07em #b07a43, 0 0 1.7em rgba(255, 214, 80, .5), 0 .25em .45em rgba(8, 50, 90, .4); } }

/* the islands' colours: the home map's subjects, Човекът и природата's levels, the chests */
.bay-stage.look-world [data-s="bg"] { --c: #8d45c8; }
.bay-stage.look-world [data-s="math"] { --c: #2a6fd8; }
.bay-stage.look-world [data-s="nat"] { --c: #2f8f3f; }
.bay-stage.look-world [data-s="soc"] { --c: #f2811d; }
.bay-stage.look-world [data-s="en"] { --c: #d8343f; }
.bay-stage.look-world [data-s="tre"] { --c: #e9a21a; }
.bay-stage.look-world [data-s="ship"] { --c: #1b9fb5; }
.bay-stage.look-world [data-s="I1"] { --c: #c06a32; }
.bay-stage.look-world [data-s="I2"] { --c: #2481d6; }
.bay-stage.look-world [data-s="I3"] { --c: #2f8f3f; }
.bay-stage.look-world [data-s="I4"] { --c: #e58a1f; }
.bay-stage.look-world [data-s="I5"] { --c: #e2477e; }
.bay-stage.look-world [data-s="I6"] { --c: #7a62c9; }
.bay-stage.look-world.tmap-stage .bay-plank { --c: #f4bf3a; }

/* ---------- the title board of an island (the home's is painted) ---------- */
.bay-stage.look-world .bay-title {
  --u: min(.45cqw, 1.45vw); left: 50% !important; top: calc(66px + env(safe-area-inset-top, 0px)) !important; width: auto !important;
  min-height: 0; padding: calc(1 * var(--u)) calc(4.2 * var(--u)) calc(1.1 * var(--u)) calc(8 * var(--u));
  transform: translateX(-50%) rotate(-1.5deg); transform-origin: 50% 0;
  border: calc(.28 * var(--u)) solid #a8743d; border-radius: calc(1.4 * var(--u));
  background: linear-gradient(180deg, #fff6de, #f7e0b0 55%, #ebc78a);
  box-shadow: inset 0 calc(.2 * var(--u)) 0 #fff, 0 calc(.4 * var(--u)) 0 #a46d38, 0 calc(.9 * var(--u)) calc(1.3 * var(--u)) rgba(8, 50, 90, .35);
}
.bay-stage.look-world .bay-title::before, .bay-stage.look-world .bay-title::after {
  content: "🌿"; top: 50%; width: auto; height: auto; background: none; font-size: calc(4.4 * var(--u)); line-height: 1;
  filter: drop-shadow(0 calc(.2 * var(--u)) 0 rgba(0, 0, 0, .2));
}
.bay-stage.look-world .bay-title::before { left: calc(-2.6 * var(--u)); transform: translateY(-50%) rotate(-30deg) scaleX(-1); }
.bay-stage.look-world .bay-title::after { right: calc(-2.6 * var(--u)); transform: translateY(-50%) rotate(30deg); }
.bay-stage.look-world .bay-title .pencil { width: calc(5 * var(--u)); }
.bay-stage.look-world .bay-title .brand-big { font: 800 calc(4.2 * var(--u))/1 "Rubik", "Nunito", sans-serif; color: #2e1d10; text-shadow: 0 calc(.15 * var(--u)) 0 rgba(255, 255, 255, .8); }
.bay-stage.look-world .bay-title .sub { font: 700 calc(1.75 * var(--u))/1.1 "Rubik", "Nunito", sans-serif; color: #5d3d1e; text-shadow: none; }
@media (max-width: 760px) { .bay-stage.look-world.nmap-stage:not(.tmap-stage) .bay-title { top: calc(112px + env(safe-area-inset-top, 0px)) !important; } }

/* ---------- the home map fills the screen; the bar floats over its sky, as in the design ---------- */
body.nmap-on .hmap .bay-swipe:not([hidden]) { display: block; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
body.hmap-on .ihud .brand > span { display: none; }                       /* the painted title names the world */
@media (max-width: 1000px) { body.hmap-on .ihud.main .ih-name { display: none; } }
body.hmap-on .ihud.main .ih-btn {
  color: #fff; border-color: #fff; --mv-hole: #1f62c4;
  background: radial-gradient(circle at 35% 30%, #67b0f4, #1f62c4 62%, #154a99); box-shadow: 0 4px 0 #0e3a7a, 0 4px 14px rgba(0, 0, 0, .25);
}
body.hmap-on .ihud.main .ih-btn svg { filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .25)); }
body.hmap-on .ihud.main .ih-btn:hover:not(:disabled) { background: radial-gradient(circle at 35% 30%, #80c0f8, #2a70d2 62%, #1a55a8); }
body.hmap-on .ihud.main .ih-btn:active:not(:disabled), body.hmap-on .ihud.main .ih-av:active:not(:disabled) { box-shadow: 0 2px 0 #0e3a7a; }
body.hmap-on .ihud.main .ih-av { border-color: #fff; background: radial-gradient(circle at 40% 35%, #fff, #e3f2ff 55%, #a9d3ff); box-shadow: 0 0 0 3px #1f62c4, 0 4px 14px rgba(0, 0, 0, .3); }
body.hmap-on .ihud.main .ih-name {
  color: #fff; font-size: 18px; padding: 9px 18px; border-radius: 99px; background: linear-gradient(180deg, #1d4f8f, #12376b);
  border: 2px solid #6f9fe0; box-shadow: inset 0 2px 0 rgba(255, 255, 255, .25), 0 3px 10px rgba(0, 0, 0, .22);
}
body.hmap-on .ihud.main .ih-name:empty { display: none; }

/* ---------- the settings: the two looks, as pictures ---------- */
.set-looks { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; padding: 2px 0 14px; border-bottom: 2px dashed rgba(128, 128, 128, .25); }
.set-looks button { display: flex; flex-direction: column; gap: 7px; padding: 7px 7px 9px; border-radius: 16px; font-size: 15px; font-weight: 800; line-height: 1.15; box-shadow: 0 3px 0 var(--line); }
.set-looks img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 11px; border: 2px solid rgba(43, 45, 66, .25); }
.set-looks button[aria-pressed="true"] { background: var(--pencil); }
.set-looks button[aria-pressed="true"] span::before { content: "✔ "; }

/* ---------- the sections' maps of the math and bank islands (js/core/app.js: sectionMap) ---------- */
/* a long name breaks onto two lines (the signs stand closer than the nature map's); the badge has the section's colour */
.bay-stage.smap-stage .bay-plank .nm { white-space: normal; max-width: 9.2em; text-wrap: balance; }
.bay-stage.smap-stage .bay-plank small { white-space: nowrap; }
