body {
  background: #fff;
  font-family: "Comfortaa", sans-serif;
}

* {
  box-sizing: border-box;
}

aside.context {
  text-align: center;
  color: #333;
  line-height: 1.7;
}
aside.context a {
  text-decoration: none;
  color: #333;
  padding: 3px 0;
  border-bottom: 1px dashed;
}
aside.context a:hover {
  border-bottom: 1px solid;
}
aside.context .explanation {
  max-width: 700px;
  margin: 3em auto 0;
}
aside.context .name-of-pattern {
  text-align: center;
  font: 700 50px Amatic SC;
}
aside.context button {
  background: none;
  border: 3px solid #000;
  padding: 1em 1.5em;
  margin: 2em auto;
  font: 700 20px/1 Comfortaa;
  cursor: pointer;
  position: relative;
}
aside.context button:before {
  content: '';
  transition: .3s ease;
  width: 0;
  height: 100%;
  position: absolute;
  background: #000;
  top: 0;
  left: 0;
  z-index: -1;
}
aside.context button:hover {
  color: #fff;
}
aside.context button:hover:before {
  width: 100%;
}
aside.context button:focus {
  outline: none;
}

footer {
  text-align: center;
  margin: 2em auto;
  width: 100%;
}
footer a {
  text-decoration: none;
  display: inline-block;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: transparent;
  border: 1px dashed #333;
  color: #333;
  margin: 5px;
}
footer a:hover {
  background: rgba(255, 255, 255, 0.1);
}
footer a .icons {
  margin-top: 12px;
  display: inline-block;
  font-size: 20px;
}

.main-content {
  margin: 5em auto 7em;
  max-width: 800px;
  position: relative;
  perspective: 800px;
}

.bathtub {
  position: absolute;
  width: 480px;
  right: 5%;
  bottom: -20%;
  transform: scaleX(-1);
}

.plant {
  position: absolute;
  width: 200px;
  left: -10px;
  bottom: 50px;
}
.plant .pot {
  position: absolute;
  background: #444;
  width: 90px;
  height: 140px;
  bottom: -80px;
  left: 50%;
  border-radius: 50% 50% 80% 80% / 100%;
  margin-left: -45px;
  overflow: hidden;
}
.plant .pot:before {
  content: "";
  border-radius: inherit;
  border-left: 35px solid rgba(0, 0, 0, 0.1);
  position: absolute;
  transform: rotate(15deg);
  top: 0;
  left: -10px;
  height: inherit;
  width: inherit;
}

.floor {
  transform-origin: top center;
  transform: rotateX(78deg);
  background: #f3f3f3;
  width: 800px;
  height: 150px;
  bottom: -150px;
  position: absolute;
  left: 0;
}

.bathroom-tiles {
  height: 450px;
  width: 100%;
  display: grid;
  overflow: hidden;
}

.default {
  background: #f5f5f5;
  grid: repeat(11, 1fr)/repeat(20, 1fr);
  grid-gap: 4px;
  padding: 4px;
}
.default div {
  background: #fff;
  border-radius: 6px;
}

.batman {
  background: #999;
  grid: repeat(3, 1fr)/repeat(5, 1fr);
  grid-gap: 3px;
  padding: 3px;
}
.batman div {
  background: #777;
}
.batman div:nth-child(n+16) {
  display: none;
}
.batman + .floor {
  background: #444;
}

.rustic {
  background: #eee;
  grid-gap: 4px;
  grid: 55% 5px 1fr/repeat(18, 1fr);
}
.rustic div {
  background: #f9f9f9;
}
.rustic div:nth-child(1) {
  background: #C69D7D;
  grid-column: 1 / span 18;
}
.rustic div:nth-child(2) {
  background: #907654;
  grid-column: 1 / span 18;
  margin-top: -5px;
}
.rustic div:nth-child(n + 21) {
  display: none;
}
.rustic + .floor {
  background: #d4b38f;
}

.blue-seas {
  background: #fff;
  grid: repeat(3, 1fr) repeat(2, 2fr) 1fr 2fr repeat(3, 1fr)/repeat(4, 1fr);
}
.blue-seas div {
  background: #ebebd3;
  box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.5);
}
.blue-seas div:nth-child(-n + 4) {
  background: #155268;
}
.blue-seas div:nth-child(n + 13) {
  background: #2d7289;
}
.blue-seas div:nth-child(n + 21) {
  background: #ebebd3;
}
.blue-seas div:nth-child(n + 29) {
  background: #155268;
}
.blue-seas div:nth-child(n + 33) {
  background: #ebebd3;
}
.blue-seas div:nth-child(n + 37) {
  background: #155268;
}
.blue-seas div:nth-child(n + 41) {
  display: none;
}
.blue-seas + .floor {
  background: #2d7289;
}

.striped {
  grid: 1fr/repeat(10, 1fr);
  background: #fef0c7;
}
.striped div:nth-child(odd) {
  background: #fee9ab;
}
.striped div:nth-child(n + 10) {
  display: none;
}
.striped + .floor {
  background: #eaba6b;
}

.chiangmai {
  background: #f3f3f3;
  grid: repeat(3, 1fr) 60px/repeat(6, 1fr);
  grid-gap: 2px;
  padding: 2px;
}
.chiangmai div {
  background: #e5e1db;
  border-radius: 3px;
}
.chiangmai div:nth-child(n + 19) {
  background: #bcaf97;
}
.chiangmai div:nth-child(n + 25) {
  display: none;
}
.chiangmai + .floor {
  background: #e5e1db;
}

.horizontal {
  grid: repeat(8, 70px)/1fr;
}
.horizontal div {
  background: #f9f9f9;
  box-shadow: inset 0 2px 2px rgba(0, 0, 0, 0.15);
}
.horizontal div:nth-child(n + 8) {
  display: none;
}
.horizontal + .floor {
  background: #ddedf6;
}

.horizontal-color {
  grid: repeat(10, 50px)/1fr;
  background: #85ccca;
}
.horizontal-color div:nth-child(odd) {
  background: #c2e5e4;
}
.horizontal-color div:nth-child(n + 10) {
  display: none;
}
.horizontal-color + .floor {
  background: #85ccca;
}

.brick {
  background: #fff;
  grid: repeat(10, 1fr)/repeat(6, 1fr);
  grid-gap: 2px;
}
.brick div {
  background: #ddd;
}
.brick div:nth-child(n + 7) {
  margin-left: -50%;
  margin-right: 50%;
}
.brick div:nth-child(n + 13) {
  margin-left: 0;
  margin-right: 0;
}
.brick div:nth-child(n + 19) {
  margin-left: -50%;
  margin-right: 50%;
}
.brick div:nth-child(n + 25) {
  margin-left: 0;
  margin-right: 0;
}
.brick div:nth-child(n + 31) {
  margin-left: -50%;
  margin-right: 50%;
}
.brick div:nth-child(n + 37) {
  margin-left: 0;
  margin-right: 0;
}
.brick div:nth-child(n + 43) {
  margin-left: -50%;
  margin-right: 50%;
}
.brick div:nth-child(n + 49) {
  margin-left: 0;
  margin-right: 0;
}
.brick div:nth-child(n + 55) {
  margin-left: -50%;
  margin-right: 50%;
}
.brick div:nth-child(n + 61) {
  margin-left: 0;
  margin-right: 0;
}
.brick div:nth-child(66), .brick div:nth-child(12) {
  grid-column: 6;
  grid-row: 2;
}
.brick div:nth-child(67), .brick div:nth-child(24) {
  grid-column: 6;
  grid-row: 4;
}
.brick div:nth-child(68), .brick div:nth-child(36) {
  grid-column: 6;
  grid-row: 6;
}
.brick div:nth-child(69), .brick div:nth-child(48) {
  grid-column: 6;
  grid-row: 8;
}
.brick div:nth-child(70), .brick div:nth-child(60) {
  grid-column: 6;
  grid-row: 10;
}
.brick div:nth-child(n + 66) {
  margin-left: 51%;
}
.brick div:nth-child(n + 71) {
  display: none;
}
.brick + .floor {
  background: #f5f5f5;
}

.brick-lg {
  background: #fff;
  grid: repeat(6, 1fr)/repeat(5, 1fr);
}
.brick-lg div {
  background: #ffede1;
  box-shadow: inset 0 2px 2px rgba(0, 0, 0, 0.1);
}
.brick-lg div:nth-child(n + 6) {
  margin-left: -50%;
  margin-right: 50%;
}
.brick-lg div:nth-child(n + 11) {
  margin-left: 0;
  margin-right: 0;
}
.brick-lg div:nth-child(n + 16) {
  margin-left: -50%;
  margin-right: 50%;
}
.brick-lg div:nth-child(n + 21) {
  margin-left: 0;
  margin-right: 0;
}
.brick-lg div:nth-child(n + 26) {
  margin-left: -50%;
  margin-right: 50%;
}
.brick-lg div:nth-child(n + 31) {
  margin-left: 0;
  margin-right: 0;
}
.brick-lg div:nth-child(10), .brick-lg div:nth-child(32) {
  grid-column: 5;
  grid-row: 2;
}
.brick-lg div:nth-child(20), .brick-lg div:nth-child(33) {
  grid-column: 5;
  grid-row: 4;
}
.brick-lg div:nth-child(30), .brick-lg div:nth-child(34) {
  grid-column: 5;
  grid-row: 6;
}
.brick-lg div:nth-child(n + 32) {
  margin-left: 51%;
}
.brick-lg div:nth-child(n + 35) {
  display: none;
}
.brick-lg div:nth-child(3), .brick-lg div:nth-child(6), .brick-lg div:nth-child(10), .brick-lg div:nth-child(12), .brick-lg div:nth-child(15), .brick-lg div:nth-child(19), .brick-lg div:nth-child(22), .brick-lg div:nth-child(24), .brick-lg div:nth-child(26), .brick-lg div:nth-child(28) {
  background: #d8dbe2;
}
.brick-lg div:nth-child(2), .brick-lg div:nth-child(5), .brick-lg div:nth-child(8), .brick-lg div:nth-child(11), .brick-lg div:nth-child(14), .brick-lg div:nth-child(17), .brick-lg div:nth-child(21), .brick-lg div:nth-child(33), .brick-lg div:nth-child(25), .brick-lg div:nth-child(29) {
  background: #68747A;
}
.brick-lg + .floor {
  background: #68747A;
}

.brownery {
  background: #ddd;
  grid: 55% 15px repeat(6, 32px)/repeat(25, 1fr);
}
.brownery div {
  background: #f9f9f9;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.1);
  border-radius: 2px;
}
.brownery div:nth-child(-n + 25) {
  background: #bca371;
  box-shadow: inset 0 1px 2px #9a865d;
  border-radius: 0;
}
.brownery div:nth-child(26) {
  grid-column: span 25;
}
.brownery div:nth-child(n + 177) {
  display: none;
}
.brownery + .floor {
  background: #ddd;
}

.weird-cells {
  background: #ededed;
  grid-gap: 2px;
  grid: repeat(5, 20%)/repeat(20, 1fr);
  padding: 2px;
}
.weird-cells div {
  background: #fff;
}
.weird-cells div:nth-child(n + 101) {
  display: none;
}
.weird-cells + .floor {
  background: #f1f1f1;
}

.blue-whale {
  background: #fff;
  grid: repeat(21, auto)/repeat(10, 1fr);
  grid-gap: 2px;
}
.blue-whale div {
  background: #6DD3CE;
}
.blue-whale div:nth-child(even) {
  background: #87DBD6;
}
.blue-whale div:nth-child(17n) {
  background: #46ACC2;
}
.blue-whale div:nth-child(8n) {
  backgorund: #89CAD8;
}
.blue-whale div:nth-child(16n) {
  background: #59C3C3;
}
.blue-whale div:nth-child(7n+2) {
  background: #4BC6B9;
}
.blue-whale + .floor {
  background: #46ACC2;
}

.chess {
  background: #f9f9f9;
  grid: repeat(6, 1fr)/repeat(11, 1fr);
  grid-gap: 2px;
}
.chess div {
  background: #EDD9B0;
}
.chess div:nth-child(odd) {
  background: #F3E5CA;
}
.chess div:nth-child(n+67) {
  display: none;
}
.chess + .floor {
  background: #E5B25D;
}

.github {
  background: #f2f7f2;
  grid: 30% repeat(5, 22px) 1fr/repeat(32, 1fr);
  grid-gap: 3px;
}
.github div {
  background: #c6e48b;
}
.github div:nth-child(3n) {
  background: #7bc96f;
}
.github div:nth-child(7n) {
  background: #239a3b;
}
.github div:nth-child(12n) {
  background: #196127;
}
.github div:nth-child(1), .github div:nth-child(162) {
  grid-column: span 32;
  background: #f2f7f2;
}
.github div:nth-child(n+163) {
  display: none;
}
.github + .floor {
  background: #c6e48b;
}

.jungle {
  grid: repeat(11, 1fr)/repeat(20, 1fr);
  grid-auto-flow: dense;
  grid-gap: 2px;
}
.jungle div {
  background: #A3F7B5;
}
.jungle div:nth-child(5n) {
  grid-column: span 2;
}
.jungle div:nth-child(-6n+120) {
  grid-row: span 2;
}
.jungle div:nth-child(3n) {
  background: #40C9A2;
}
.jungle div:nth-child(2n) {
  background: #2F9C95;
}
.jungle div:nth-child(4n) {
  background: #ADE25D;
}
.jungle div:nth-child(6n) {
  background: #00BFB2;
}
.jungle div:nth-child(7n) {
  background: #26C485;
}
.jungle div:nth-child(8n) {
  background: #5DD39E;
}
.jungle div:nth-child(4) {
  grid-column: 2 / span 3;
  grid-row: 2 /span 3;
  background: #2F9C95;
}
.jungle div:nth-child(26) {
  grid-column: 9 / span 3;
  grid-row: 5 / span 3;
  background: #40C9A2;
}
.jungle div:nth-child(31) {
  grid-column: 5 / span 3;
  grid-row: 8 / span 3;
  background: #ADE25D;
}
.jungle div:nth-child(33) {
  grid-column: 18 / span 3;
  grid-row: 3 / span 3;
  background: #5DD39E;
}
.jungle div:nth-child(n+138) {
  display: none;
}
.jungle + .floor {
  background: #2F9C95;
}

.slanted {
  grid: repeat(12, 60px)/repeat(7, 120px);
  grid-auto-flow: column;
}
.slanted div {
  background: #E8F1F2;
  transform: rotate(-20deg);
  margin-left: -18%;
  margin-right: 5%;
  margin-top: -14%;
  margin-bottom: 16%;
  box-shadow: inset 0 0 1px 1px rgba(0, 0, 0, 0.25);
}
.slanted div:nth-child(n+90) {
  display: none;
}
.slanted + .floor {
  background: #f7f7f7;
}

.space {
  grid: 10% repeat(12, 25px)/20% repeat(18, 25px);
  background: #2D93AD;
}
.space div:nth-child(44), .space div:nth-child(50), .space div:nth-child(64), .space div:nth-child(68), .space div:nth-child(82), .space div:nth-child(83), .space div:nth-child(84), .space div:nth-child(85), .space div:nth-child(86), .space div:nth-child(87), .space div:nth-child(88), .space div:nth-child(100), .space div:nth-child(101), .space div:nth-child(103), .space div:nth-child(104), .space div:nth-child(105), .space div:nth-child(107), .space div:nth-child(108), .space div:nth-child(118), .space div:nth-child(119), .space div:nth-child(120), .space div:nth-child(121), .space div:nth-child(122), .space div:nth-child(123), .space div:nth-child(124), .space div:nth-child(125), .space div:nth-child(126), .space div:nth-child(127), .space div:nth-child(128), .space div:nth-child(137), .space div:nth-child(139), .space div:nth-child(140), .space div:nth-child(141), .space div:nth-child(142), .space div:nth-child(143), .space div:nth-child(144), .space div:nth-child(145), .space div:nth-child(147), .space div:nth-child(156), .space div:nth-child(158), .space div:nth-child(164), .space div:nth-child(166), .space div:nth-child(178), .space div:nth-child(179), .space div:nth-child(181), .space div:nth-child(182) {
  background: #99C24D;
}
.space + .floor {
  background: #C1E2F0;
}

.mid-grid {
  background: #fff;
  grid-gap: 2px;
  grid: repeat(10, 1fr)/21% 21% repeat(8, 1fr) 21% 21%;
  grid-auto-flow: column;
}
.mid-grid div {
  background: #e4d9c9;
}
.mid-grid div:nth-child(2n) {
  background: #efe0bb;
}
.mid-grid div:nth-child(3n) {
  background: #ffefd8;
}
.mid-grid div:nth-child(4n) {
  background: #ac9c8b;
}
.mid-grid div:nth-child(6n) {
  background: #d4c8b6;
}
.mid-grid div:nth-child(7n) {
  background: #ded7cb;
}
.mid-grid div:nth-child(-n+4), .mid-grid div:nth-child(n+85) {
  grid-row: span 5;
  background: #dad2c9;
}
.mid-grid div:nth-child(n+89) {
  display: none;
}
.mid-grid + .floor {
  background: #f1f1f1;
}

.tiger {
  grid: 100% / .5fr 10px 2fr 5px .5fr 6px .2fr 5px .3fr 8px .6fr 9px 3fr 9px .8fr 5px .3fr 5px .3fr 9px .5fr 3px .6fr 4px 2fr 4px 1fr 4px 1fr;
  background: #FF9F1C;
}
.tiger div:nth-child(even) {
  background: #222;
}
.tiger div:nth-child(n+30) {
  display: none;
}
.tiger + .floor {
  background: #FFCA83;
}

.batman ~ .bathtub svg path:nth-child(1), .batman ~ .bathtub svg path:nth-child(3), .batman ~ .bathtub svg polygon, .blue-seas ~ .bathtub svg path:nth-child(1), .blue-seas ~ .bathtub svg path:nth-child(3), .blue-seas ~ .bathtub svg polygon, .chiangmai ~ .bathtub svg path:nth-child(1), .chiangmai ~ .bathtub svg path:nth-child(3), .chiangmai ~ .bathtub svg polygon, .space ~ .bathtub svg path:nth-child(1), .space ~ .bathtub svg path:nth-child(3), .space ~ .bathtub svg polygon, .jungle ~ .bathtub svg path:nth-child(1), .jungle ~ .bathtub svg path:nth-child(3), .jungle ~ .bathtub svg polygon {
  fill: #f6f6f6;
}
.batman ~ .bathtub svg path:nth-child(2), .batman ~ .bathtub svg path:nth-child(4), .batman ~ .bathtub svg path:nth-child(5), .blue-seas ~ .bathtub svg path:nth-child(2), .blue-seas ~ .bathtub svg path:nth-child(4), .blue-seas ~ .bathtub svg path:nth-child(5), .chiangmai ~ .bathtub svg path:nth-child(2), .chiangmai ~ .bathtub svg path:nth-child(4), .chiangmai ~ .bathtub svg path:nth-child(5), .space ~ .bathtub svg path:nth-child(2), .space ~ .bathtub svg path:nth-child(4), .space ~ .bathtub svg path:nth-child(5), .jungle ~ .bathtub svg path:nth-child(2), .jungle ~ .bathtub svg path:nth-child(4), .jungle ~ .bathtub svg path:nth-child(5) {
  fill: #ddd;
}
.batman ~ .plant .pot, .blue-seas ~ .plant .pot, .chiangmai ~ .plant .pot, .space ~ .plant .pot, .jungle ~ .plant .pot {
  background: #f6f6f6;
}