@font-face{font-family:'Hornbill';src:url('./lib/HappyMonkey-Regular.ttf')}

body{
    margin: 0;
    user-select: none;
    font-family:'Hornbill', sans-serif;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    overflow: hidden;
    }
    
    #full-area {
        width: 100%;
        height: 100vh;
        user-select: none;
        overflow: hidden;
        background: white;
        color: #2a193c;
      }


      #full-area #game-area {
        position: absolute;
        width: 1024px;
        height: 600px;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) scale(1);
        border-radius: 0px;
        overflow: hidden;
        background: url('./media/images/background.png');
        background-repeat: no-repeat;
        background-size: cover;
        background-position: center;
      }

      #game-area {
        display: flex;
      }

      #game-area * {
        box-sizing: border-box;
      }

      .start-screen,
      .editor-screen {
        width: 100%;
        height: 100%;
      }

      .editor-screen {
        position: relative;
        display: flex;
      }

      .start-screen {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        overflow: hidden;
      }

      .celebration-layer {
        position: absolute;
        inset: 0;
        pointer-events: none;
        overflow: hidden;
        z-index: 80;
      }

      .fun-loader {
        position: absolute;
        inset: 0;
        z-index: 120;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(255, 249, 239, 0.92);
        transition: opacity .28s ease, visibility .28s ease;
      }

      .fun-loader.done {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
      }

      .fun-loader-card {
        width: min(420px, 84%);
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 12px;
        padding: 30px 26px;
        border: 5px solid #ffffff;
        border-radius: 30px;
        background: #fff9ef;
        box-shadow: 0 16px 0 rgba(171, 74, 156, 0.2), 0 28px 46px rgba(42, 25, 60, 0.22);
      }

      .fun-loader-mark {
        display: flex;
        align-items: end;
        justify-content: center;
        gap: 10px;
        height: 72px;
      }

      .fun-loader-mark span {
        width: 28px;
        height: 54px;
        border: 4px solid #ffffff;
        border-radius: 14px 14px 8px 8px;
        box-shadow: 0 5px 0 rgba(42, 25, 60, 0.12);
        animation: loaderBounce 680ms ease-in-out infinite;
      }

      .fun-loader-mark span:nth-child(1) {
        background: #4cc1bb;
      }

      .fun-loader-mark span:nth-child(2) {
        background: #ec9b53;
        animation-delay: 110ms;
      }

      .fun-loader-mark span:nth-child(3) {
        background: #b2d235;
        animation-delay: 220ms;
      }

      .fun-loader-mark span:nth-child(4) {
        background: #ab4a9c;
        animation-delay: 330ms;
      }

      .fun-loader-title {
        margin: 0;
        color: #0e70b8;
        font-size: 1.55rem;
        font-weight: 900;
        text-align: center;
      }

      .fun-loader-count {
        margin: 0;
        color: #58585a;
        font-size: 1rem;
        font-weight: 800;
        text-align: center;
      }

      @keyframes loaderBounce {
        0%, 100% {
          transform: translateY(0) rotate(-2deg);
        }
        50% {
          transform: translateY(-13px) rotate(3deg);
        }
      }

      .celebration-piece {
        position: absolute;
        left: 50%;
        top: 54%;
        width: 12px;
        height: 18px;
        border-radius: 3px;
        background: var(--piece-color, #EA9752);
        opacity: 0;
        transform: translate(-50%, -50%) rotate(0deg);
        animation: celebrationPop 900ms cubic-bezier(.18, .84, .3, 1) forwards;
        will-change: transform, opacity;
      }

      .celebration-piece.star {
        border-radius: 0;
        clip-path: polygon(
          50% 0%,
          61% 35%,
          98% 35%,
          68% 57%,
          79% 91%,
          50% 70%,
          21% 91%,
          32% 57%,
          2% 35%,
          39% 35%
        );
      }

      @keyframes celebrationPop {
        0% {
          opacity: 0;
          transform: translate(-50%, -50%) scale(.45) rotate(0deg);
        }
        12% {
          opacity: 1;
        }
        100% {
          opacity: 0;
          transform: translate(
            calc(-50% + var(--tx, 0px)),
            calc(-50% + var(--ty, -120px))
          ) scale(1) rotate(var(--rot, 180deg));
        }
      }

      .safe-clear-modal {
        position: absolute;
        inset: 0;
        display: none;
        align-items: center;
        justify-content: center;
        padding: 24px;
        background: rgba(42, 25, 60, 0.34);
        z-index: 90;
      }

      .safe-clear-modal.open {
        display: flex;
      }

      .safe-clear-card {
        width: min(390px, 88%);
        padding: 24px;
        border: 4px solid #ffffff;
        border-radius: 24px;
        background: #fff9ef;
        text-align: center;
        box-shadow: 0 18px 38px rgba(42, 25, 60, 0.26);
        color: #2a193c;
      }

      .safe-clear-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 58px;
        height: 58px;
        margin: 0 auto 12px;
        border-radius: 50%;
        background: #EA9752;
        color: #ffffff;
        font-size: 2.1rem;
        font-weight: 800;
        box-shadow: 0 6px 0 rgba(132, 39, 123, 0.22);
      }

      .safe-clear-card h2 {
        margin: 0;
        color: #266BB4;
        font-size: 1.8rem;
      }

      .safe-clear-card p {
        margin: 8px 0 18px;
        font-size: 1rem;
      }

      .safe-clear-actions {
        display: flex;
        justify-content: center;
        gap: 12px;
      }

      .safe-clear-actions button {
        min-width: 130px;
        padding: 12px 14px;
        border: none;
        border-radius: 14px;
        font-size: 1rem;
        font-weight: 800;
        box-shadow: 0 5px 0 rgba(42, 25, 60, 0.14);
      }

      .safe-clear-cancel {
        background: #4CBEB8;
        color: #ffffff;
      }

      .safe-clear-confirm {
        background: #EA9752;
        color: #ffffff;
      }

      .start-card {
        position: relative;
        width: 100%;
        height: 100%;
        max-height: 100%;
        background: #9fffd982;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        gap: 8px;
        padding: 54px 24px 76px;
        box-shadow: 0 20px 36px rgba(42, 25, 60, 0.2);
        z-index: 1;
      }

      /* WAVE CONTAINERS */

      .wave-top-track,
      .wave-bottom-track {
        position: absolute;
        left: 0;
        width: 100%;
        height: 54px;
        pointer-events: none;
        overflow: hidden;
        z-index: 2;
      }

      .wave-top-track::before,
      .wave-top-track::after,
      .wave-bottom-track::before,
      .wave-bottom-track::after {
        content: "";
        position: absolute;
        top: 0;
        width: 100%;
        height: 54px;
        background-repeat: no-repeat;
        background-size: 100% 54px;
        will-change: transform;
        animation: waveLoop 26s linear infinite;
      }

      .wave-top-track::before,
      .wave-bottom-track::before {
        left: 0;
      }

      .wave-top-track::after,
      .wave-bottom-track::after {
        left: 100%;
      }

      .wave-top-track {
        top: 0;
      }

      .wave-bottom-track {
        bottom: 0;
      }

      /* TOP WAVE */

      .wave-top-track::before,
      .wave-top-track::after {
        background-image: url("data:image/svg+xml,%3Csvg width='100%25' height='100px' viewBox='0 0 1280 140' preserveAspectRatio='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23b2d235'%3E%3Cpath d='M0 0v100c20 17.3 40 29.51 80 29.51 51.79 0 74.69-48.57 151.75-48.57 73.72 0 91 54.88 191.56 54.88C543.95 135.8 554 14 665.69 14c109.46 0 98.85 87 188.2 87 70.37 0 69.81-33.73 115.6-33.73 55.85 0 62 39.62 115.6 39.62 58.08 0 57.52-46.59 115-46.59 39.8 0 60 22.48 79.89 39.69V0z'/%3E%3C/g%3E%3C/svg%3E");
      }

      /* BOTTOM WAVE */

      .wave-bottom-track::before,
      .wave-bottom-track::after {
        background-image: url("data:image/svg+xml,%3Csvg width='100%25' height='100px' viewBox='0 0 1280 140' preserveAspectRatio='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23b2d235'%3E%3Cpath d='M1280 86c-19.9-17.21-40.08-39.69-79.89-39.69-57.49 0-56.93 46.59-115 46.59-53.61 0-59.76-39.62-115.6-39.62C923.7 53.27 924.26 87 853.89 87c-89.35 0-78.74-87-188.2-87C554 0 543.95 121.8 423.32 121.8c-100.52 0-117.84-54.88-191.56-54.88-77.06 0-100 48.57-151.75 48.57-40 0-60-12.21-80-29.51v54H1280z'/%3E%3C/g%3E%3C/svg%3E");
      }

      @keyframes waveLoop {
        from {
          transform: translate3d(0, 0, 0);
        }
        to {
          transform: translate3d(-100%, 0, 0);
        }
      }
      
      .start-logo {
        align-self: center;
        width: clamp(220px, 36vw, 330px);
        max-height: 80px;
        object-fit: contain;
        display: block;
      }

      .start-title {
        margin: 0;
        font-size: 2rem;
        text-align: center;
        color: #0e70b8;
        font-weight: bold;
      }

      .start-subtitle {
        margin: 0;
        text-align: center;
        font-size: 1rem;
        color: #58585a
      }

      .start-actions {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 16px;
        margin-top: 15px;
        padding-bottom: 0;
      }

      .start-actions .start-create-btn {
        width: auto;
        min-width: 270px;
        padding: 10px 18px;
        border-radius: 999px;
        border: none;
        font-size: 1.05rem;
        box-shadow: 0 5px 0 rgba(42, 25, 60, 0.16);
      }

      .random-design-btn {
        min-width: 185px;
        padding: 10px 18px;
        border: none;
        border-radius: 999px;
        background: #ab4a9c;
        color: #fff9ef;
        font-size: 1rem;
        font-weight: 800;
        box-shadow: 0 5px 0 rgba(42, 25, 60, 0.16);
      }

      .random-design-btn:hover {
        background: #266BB4;
      }

      .start-designs {
        width: min(900px, 100%);
        align-self: center;
        height: 198px;
        z-index: 9;
        position: relative;
        padding-bottom: 22px;
        margin-top: 30px;
      }

      .start-scrollbar {
        position: absolute;
        left: 10px;
        right: 10px;
        bottom: 0;
        height: 14px;
        border: 2px solid rgba(255, 255, 255, 0.76);
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.72);
        box-shadow: inset 0 0 0 1px rgba(42, 25, 60, 0.06);
        cursor: pointer;
      }

      .start-scrollbar-thumb {
        position: absolute;
        top: 2px;
        left: 0;
        bottom: 2px;
        min-width: 54px;
        border-radius: 999px;
        background: #EA9752;
        box-shadow: 0 2px 0 rgba(132, 39, 123, 0.22);
      }

      .start-designs h2 {
        margin: 0;
        text-align: center;
      }

      .start-page-picker {
        display: grid;
        grid-auto-flow: column;
        grid-template-rows: minmax(0, 1fr);
        grid-auto-columns: calc((100% - 28px) / 3);
        gap: 14px;
        height: 100%;
        overflow-x: scroll;
        overflow-y: hidden;
        padding: 5px 6px 10px;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
      }

      .start-page-picker::-webkit-scrollbar {
        display: none;
        width: 0;
        height: 0;
      }

      .start-design-card {
        position: relative;
        width: 100%;
        height: 100%;
        scroll-snap-align: start;
      }

      .start-page-thumb {
        width: 100%;
        height: 100%;
        border-radius: 16px;
        border: 3px solid rgba(255, 255, 255, 0.9);
        background: #fff;
        object-fit: contain;
        cursor: pointer;
        box-shadow: 0 6px 0 rgba(42, 25, 60, 0.12);
        transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
      }

      .start-preview-btn {
        position: absolute;
        right: 8px;
        bottom: 8px;
        z-index: 2;
        width: 38px;
        height: 38px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        border: 3px solid #ffffff;
        border-radius: 50%;
        background: #ab4a9c;
        color: #ffffff;
        box-shadow: 0 4px 0 rgba(42, 25, 60, 0.18);
      }

      .start-preview-btn svg {
        width: 20px;
        height: 20px;
        pointer-events: none;
      }

      .start-preview-btn:hover {
        background: #0e70b8;
        transform: translateY(-2px) rotate(10deg);
      }

      .start-page-thumb:hover {
        transform: translateY(-3px);
      }

      .start-page-thumb.active {
        border-color: #EA9752;
        box-shadow: 0 7px 0 rgba(132, 39, 123, 0.25);
        transform: translateY(-3px);
      }

      .design-loupe {
        position: fixed;
        width: 360px;
        height: 250px;
        padding: 12px;
        border: 4px solid #ffffff;
        border-radius: 20px;
        background: #ffffff;
        box-shadow: 0 18px 36px rgba(42, 25, 60, 0.24);
        pointer-events: none;
        opacity: 0;
        transform: translate(-50%, -104%) scale(0.94);
        transition: opacity .16s ease, transform .16s ease;
        z-index: 12;
      }

      .design-loupe.open {
        opacity: 1;
        transform: translate(-50%, -108%) scale(1);
      }

      .design-loupe img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        display: block;
      }

      .design-loupe::after {
        content: "";
        position: absolute;
        left: 50%;
        top: 100%;
        width: 18px;
        height: 18px;
        background: #ffffff;
        transform: translate(-50%, -9px) rotate(45deg);
      }

      .design-preview-modal {
        position: absolute;
        inset: 0;
        z-index: 90;
        display: none;
        align-items: center;
        justify-content: center;
        padding: 44px;
        background: rgba(42, 25, 60, 0.38);
        backdrop-filter: blur(4px);
      }

      .design-preview-modal.open {
        display: flex;
      }

      .design-preview-card {
        position: relative;
        width: min(620px, 100%);
        max-height: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 16px;
        padding: 24px;
        border: 5px solid #ffffff;
        border-radius: 28px;
        background: #fff9ef;
        box-shadow: 0 18px 0 rgba(171, 74, 156, 0.22), 0 30px 48px rgba(42, 25, 60, 0.28);
      }

      .design-preview-close {
        position: absolute;
        top: 12px;
        right: 12px;
        width: 46px;
        height: 46px;
        padding: 0;
        border: 3px solid #ffffff;
        border-radius: 50%;
        background: #ec9b53;
        color: #ffffff;
        font-size: 1.6rem;
        line-height: 1;
        box-shadow: 0 4px 0 rgba(42, 25, 60, 0.16);
      }

      .design-preview-image {
        width: 100%;
        max-height: 410px;
        object-fit: contain;
        border: 4px solid rgba(76, 193, 187, 0.45);
        border-radius: 22px;
        background: #ffffff;
      }

      .design-preview-choose {
        min-width: 220px;
        padding: 14px 26px;
        border: 0;
        border-radius: 999px;
        background: #b2d235;
        color: #2a193c;
        font-size: 1.3rem;
        font-weight: 900;
        box-shadow: 0 7px 0 rgba(14, 112, 184, 0.22);
      }

      .design-preview-choose:hover {
        background: #4cc1bb;
        color: #ffffff;
      }

      .toolbar {
        width: 300px;
        height: 100%;
        background: #4cc1bb;
        padding: 14px 12px;
        display: flex;
        flex-direction: column;
        gap: 8px;
        border-right: 2px solid rgba(42, 25, 60, 0.2);
        overflow-y: scroll;
      }

      .toolbar h1 {
        margin: 0;
        font-size: 1.6rem;
        letter-spacing: 0.5px;
      }

      .toolbar-subtitle {
        margin: 0;
        font-size: 0.9rem;
      }

      .tool-group {
        background: rgba(255, 250, 240, 0.72);
        border: 1px solid rgba(42, 25, 60, 0.18);
        border-radius: 14px;
        padding: 8px;
        text-align: center;
      }

      .tool-group h2 {
        margin: 8px 0;
        font-size: 0.95rem;
      }

      .create-char-btn {
        width: 100%;
        padding: 10px 12px;
        font-size: 1rem;
        font-weight: bold;
        background: #ec9b53;
        color: #fff4d9;
        border: none;
        border-radius: 10px;
        cursor: pointer;
      }

      .create-char-btn:hover {
        background: #0e70b8;
      }

      .toolbar-char-header {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 10px;
        justify-content: space-between;
      }

      .back-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 50px;
        height: 50px;
        padding: 0;
        border: 3px solid #ffffff;
        border-radius: 18px;
        background: #fff9ef;
        color: #0e70b8;
        box-shadow: 0 7px 0 rgba(14, 112, 184, 0.18), 0 12px 20px rgba(88, 88, 90, 0.12);
        font-size: 0.95rem;
        font-family: inherit;
        transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
      }

      .back-btn:hover {
        background: #ec9b53;
        color: #ffffff;
        transform: translateY(-2px);
        box-shadow: 0 9px 0 rgba(171, 74, 156, 0.22), 0 14px 22px rgba(88, 88, 90, 0.14);
      }

      .back-btn:active {
        transform: translateY(2px);
        box-shadow: 0 4px 0 rgba(14, 112, 184, 0.16), 0 9px 16px rgba(88, 88, 90, 0.1);
      }

      .toolbar-char-logo {
        height: 40px;
        max-width: 188px;
        object-fit: contain;
        display: block;
      }

      .tool-category-panel {
        display: flex;
        flex-direction: column;
        gap: 8px;
        margin-top: 25px;
      }

      .tool-category-tabs {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
      }

      .tool-category-btn {
        min-height: 62px;
        padding: 10px 9px;
        border: 3px solid rgba(255, 255, 255, 0.78);
        border-radius: 18px;
        background: #fff9ef;
        color: #0e70b8;
        font-size: 0.94rem;
        font-weight: 800;
        line-height: 1.05;
        box-shadow: 0 6px 0 rgba(42, 25, 60, 0.16), 0 10px 18px rgba(88, 88, 90, 0.08);
        transition: transform .18s cubic-bezier(.2, .9, .26, 1.25), box-shadow .18s ease, background .18s ease, color .18s ease;
      }

      .tool-category-btn:nth-child(2) {
        color: #84277B;
      }

      .tool-category-btn:nth-child(3) {
        color: #D66B24;
      }

      .tool-category-btn:nth-child(4) {
        color: #237C78;
      }

      .tool-category-btn:hover {
        background: #ffffff;
        transform: translateY(-2px) rotate(-1deg);
        box-shadow: 0 8px 0 rgba(42, 25, 60, 0.14), 0 14px 22px rgba(88, 88, 90, 0.1);
      }

      .tool-category-btn:active {
        transform: translateY(3px) scale(0.97);
        box-shadow: 0 3px 0 rgba(42, 25, 60, 0.14), 0 7px 14px rgba(88, 88, 90, 0.08);
      }

      .tool-category-btn.active {
        background: linear-gradient(135deg, #ec9b53 0%, #ab4a9c 100%);
        color: #fff9ef;
        border-color: #ffffff;
        box-shadow: 0 8px 0 rgba(14, 112, 184, 0.22), 0 0 0 4px rgba(178, 210, 53, 0.22);
        transform: translateY(-3px);
      }

      .tool-picker-stage {
        position: relative;
        height: 300px;
        min-height: 20px;
        padding: 8px 18px 8px 8px;
        border: 2px solid rgba(42, 25, 60, 0.12);
        border-radius: 18px;
        background: rgba(255, 249, 239, 0.72);
      }

      .picker-scrollbar {
        position: absolute;
        top: 14px;
        right: 7px;
        bottom: 14px;
        width: 11px;
        border: 2px solid rgba(255, 255, 255, 0.76);
        border-radius: 999px;
        background: rgba(14, 112, 184, 0.16);
        box-shadow: inset 0 0 0 1px rgba(42, 25, 60, 0.06);
        z-index: 2;
        cursor: pointer;
      }

      .picker-scrollbar-thumb {
        position: absolute;
        top: 0;
        left: 1px;
        right: 1px;
        min-height: 36px;
        border-radius: 999px;
        background: #ec9b53;
        box-shadow: 0 2px 0 rgba(132, 39, 123, 0.22);
      }

      .tool-picker {
        max-height: 382px;
      }

      .tool-picker[hidden] {
        display: none;
      }

      .page-picker {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
        max-height: 200px;
        overflow-y: auto;
        overflow-x: hidden;
      }

      .page-thumb {
        width: 100%;
        aspect-ratio: 1;
        border-radius: 8px;
        border: 2px solid rgba(42, 25, 60, 0.22);
        cursor: pointer;
        transition: transform .2s ease, box-shadow .2s ease;
        object-fit: contain;
        background: #fff;
      }

      .page-thumb:hover {
        transform: translateY(-2px);      
      }

      .page-thumb.active {
        transform: translateY(-2px); 
      }

      .page-picker.design-column {
        display: flex;
        flex-direction: column;
        gap: 8px;
        overflow-y: auto;
        overflow-x: hidden;
        max-height: 460px;
        padding-right: 2px;
      }

      .page-picker.design-column .page-thumb {
        width: 100%;
        height: 168px;
        aspect-ratio: auto;
        object-fit: contain;
        flex: 0 0 auto;
      }

      .pattern-picker {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
        max-height: 280px;
        overflow-y: scroll;
        overflow-x: hidden;
        padding: 5px 4px 12px 3px;
        scrollbar-width: none;
      }

      .pattern-picker::-webkit-scrollbar {
        display: none;
        width: 0;
        height: 0;
      }

      .pattern-thumb {
        width: 100%;
        aspect-ratio: 1;
        display: block;
        box-sizing: border-box;
        border-radius: 14px;
        border: 3px solid rgba(255, 255, 255, 0.88);
        cursor: pointer;
        transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
        object-fit: contain;
        background: #fff;
        box-shadow: 0 5px 0 rgba(42, 25, 60, 0.12);
      }

      .pattern-thumb:hover {
        border-color: #4cc1bb;
        box-shadow: 0 6px 0 rgba(14, 112, 184, 0.18);
      }

      .pattern-thumb.active {
        border-color: #ec9b53;
        box-shadow: 0 6px 0 rgba(132, 39, 123, 0.32);
        transform: none;
      }

      .palette {
        display: grid;
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 8px;
        margin-bottom: 8px;
      }

      .custom-color-label {
        display: block;
        font-size: 0.9rem;
        margin-bottom: 4px;
      }

      #custom-color {
        width: 100%;
        height: 34px;
        border: 1px solid rgba(42, 25, 60, 0.35);
        border-radius: 8px;
        background: #fff9ef;
        cursor: pointer;
      }

      .color-swatch {
        width: 100%;
        aspect-ratio: 1;
        border-radius: 10px;
        border: 2px solid rgba(42, 25, 60, 0.22);
        cursor: pointer;
        transition: transform .2s ease, box-shadow .2s ease;
      }

      .color-swatch.active {
        transform: translateY(-2px);        
      }

      .custom-swatch {
        position: relative;
        background: linear-gradient(135deg, #ff6b6b, #ffd93d, #6bcb77, #4d96ff, #9b59b6);
        padding: 0;
      }

      .custom-swatch span {
        font-size: 1.4rem;
        font-weight: bold;
        color: #2a193c;
        line-height: 1;
        text-shadow: 0 0 3px rgba(255,255,255,0.8);
      }

      .tool-buttons,
      .action-group {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
      }

      .icon-row {
        display: flex;
        flex-direction: row;
        gap: 6px;
        align-items: center;
      }

      .icon-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        padding: 0;
        flex-shrink: 0;
      }

      .icon-btn svg {
        pointer-events: none;
      }

      .icon-separator {
        width: 1px;
        height: 28px;
        background: rgba(42, 25, 60, 0.25);
        flex-shrink: 0;
        margin: 0 2px;
      }

      button {
        border: 1px solid rgba(42, 25, 60, 0.35);
        border-radius: 10px;
        background: #fff9ef;
        color: #2a193c;
        font-family: inherit;
        font-size: 0.92rem;
        padding: 8px 10px;
        cursor: pointer;
        transition: background .2s ease, transform .2s ease;
      }

      button:hover {
        background: #ffe7b6;
      }

      button:active {
        transform: scale(0.98);
      }

      button.active {
        background: #2a193c;
        color: #fff4d9;
      }

      .size-label {
        display: block;
        margin-bottom: 4px;
      }

      #size-range {
        width: 100%;
      }

      .canvas-stage {
        position: relative;
        flex: 1;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 10px;
        background: linear-gradient(160deg, rgba(58, 72, 103, 0.12) 0%, rgba(255, 255, 255, 0.6) 70%);
      }

      .paper-wrap {
        width: 100%;
        height: auto;
        max-height: 100%;
        aspect-ratio: 1000 / 620;
        background: #ffffff;
        border-radius: 12px;
        box-shadow: inset 0 0 0 1px rgba(42, 25, 60, 0.14), 0 20px 36px rgba(42, 25, 60, 0.2);
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 8px;
        position: relative;
        overflow: hidden;
      }

      #drawing-canvas {
        width: 100%;
        height: 100%;
        display: block;
        border-radius: 8px;
        touch-action: none;
        cursor: crosshair;
      }

      #pattern-overlay {
        position: absolute;
        top: 8px; left: 8px; right: 8px; bottom: 8px;
        pointer-events: none;
        border-radius: 8px;
        overflow: hidden;
        z-index: 10;
      }

      .placed-pattern {
        position: absolute;
        pointer-events: auto;
        cursor: grab;
        transform-origin: center center;
      }

      .placed-pattern.selected {
        outline: 2px dashed #2a193c;
        outline-offset: 4px;
      }

      .placed-pattern.dragging {
        cursor: grabbing;
        opacity: 0.7;
      }

      .pattern-handles {
        position: absolute;
        display: none;
        pointer-events: none;
        transform-origin: center center;
        z-index: 12;
      }

      .pattern-handles.active {
        display: block;
      }

      .pattern-handles::before {
        content: "";
        position: absolute;
        inset: -8px;
        border: 2px dashed #266BB4;
        border-radius: 10px;
        pointer-events: none;
      }

      .pattern-handle {
        position: absolute;
        width: 30px;
        height: 30px;
        border: 3px solid #ffffff;
        border-radius: 50%;
        background: #EA9752;
        box-shadow: 0 4px 10px rgba(42, 25, 60, 0.22);
        pointer-events: auto;
        z-index: 13;
      }

      .pattern-resize-handle {
        right: -20px;
        bottom: -20px;
        cursor: nwse-resize;
      }

      .pattern-resize-handle::before,
      .pattern-resize-handle::after {
        content: "";
        position: absolute;
        background: #ffffff;
        border-radius: 999px;
      }

      .pattern-resize-handle::before {
        width: 14px;
        height: 4px;
        left: 6px;
        top: 11px;
      }

      .pattern-resize-handle::after {
        width: 4px;
        height: 14px;
        left: 11px;
        top: 6px;
      }

      .pattern-rotate-handle {
        top: -46px;
        left: 50%;
        transform: translateX(-50%);
        cursor: grab;
        background: #4CBEB8;
      }

      .pattern-rotate-handle::before {
        content: "";
        position: absolute;
        width: 13px;
        height: 13px;
        left: 6px;
        top: 6px;
        border: 3px solid #ffffff;
        border-right-color: transparent;
        border-radius: 50%;
      }

      .pattern-rotate-handle::after {
        content: "";
        position: absolute;
        right: 5px;
        top: 6px;
        width: 0;
        height: 0;
        border-left: 7px solid #ffffff;
        border-top: 5px solid transparent;
        border-bottom: 5px solid transparent;
        transform: rotate(28deg);
      }

      #trash-bin {
        position: absolute;
        bottom: 16px;
        right: 16px;
        width: 48px;
        height: 48px;
        font-size: 28px;
        background: rgba(244, 67, 54, 0.85);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 20;
        box-shadow: 0 4px 12px rgba(0,0,0,0.25);
        transition: transform .2s ease;
      }

      #trash-bin.hover {
        transform: scale(1.25);
        background: rgba(244, 67, 54, 1);
      }

      .pattern-controls {
        display: flex;
        gap: 6px;
        margin-bottom: 8px;
      }

      .pattern-controls button {
        flex: 1;
        padding: 6px 0;
        font-size: 1.1rem;
        text-align: center;
      }
      
      iframe{
        position: absolute;
        width: 1024px;
        height: 600px;
        top: 50%;
        left: 50%;
        transform: translate(-50%,-50%);
        overflow: hidden;
    }

      /* Custom scrollbar */
      * {
        scrollbar-width: thin;
        scrollbar-color: #32A39B transparent;
      }

      ::-webkit-scrollbar {
        width: 6px;
      }

      ::-webkit-scrollbar-track {
        background: transparent;
      }

      ::-webkit-scrollbar-thumb {
        background: #4cc1bb;
        border-radius: 10px;
      }

      ::-webkit-scrollbar-button {
        display: none;
      }
      
    .toolbar {
      position: relative;
      width: 300px;
      height: 100%;
      background: #4cc1bb;
      padding: 14px 12px;
      display: flex;
      flex-direction: column;
      gap: 8px;
      border-right: 2px solid rgba(42, 25, 60, 0.2);
      overflow-y: auto;
      overflow-x: hidden;
    }

    .toolbar-stars {
      position: absolute;
      inset: 0;
      display: block;
      pointer-events: none;
      overflow: hidden;
      z-index: 0;
      opacity: 0.45;
    }

    .toolbar > *:not(.toolbar-stars) {
      position: relative;
      z-index: 1;
    }

    .mascot-helper {
      position: absolute;
      left: 18px;
      top: auto;
      bottom: 18px;
      z-index: 4;
      width: 132px;
      pointer-events: none;
      transform-origin: center bottom;
    }

    .mascot-helper.react {
      animation: mascotPop 560ms cubic-bezier(.2, .9, .26, 1.25);
    }

    .mascot-body {
      position: relative;
      width: 48px;
      height: 48px;
      margin-left: 0;
      border: 4px solid #ffffff;
      border-radius: 50% 50% 44% 44%;
      background: #4cc1bb;
      box-shadow: 0 7px 0 rgba(88, 88, 90, 0.22);
    }

    .mascot-body::before {
      content: "";
      position: absolute;
      left: -9px;
      top: 15px;
      width: 13px;
      height: 20px;
      border-radius: 999px;
      background: #b2d235;
      transform: rotate(-18deg);
    }

    .mascot-body::after {
      content: "";
      position: absolute;
      right: -8px;
      top: 13px;
      width: 13px;
      height: 21px;
      border-radius: 999px;
      background: #ec9b53;
      transform: rotate(18deg);
    }

    .mascot-eye {
      position: absolute;
      top: 16px;
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: #58585a;
    }

    .mascot-eye-left {
      left: 13px;
    }

    .mascot-eye-right {
      right: 13px;
    }

    .mascot-smile {
      position: absolute;
      left: 16px;
      top: 26px;
      width: 16px;
      height: 8px;
      border-bottom: 3px solid #58585a;
      border-radius: 0 0 999px 999px;
    }

    .mascot-bubble {
      position: absolute;
      left: 38px;
      top: -8px;
      min-width: 88px;
      padding: 6px 9px;
      border: 3px solid #ffffff;
      border-radius: 16px;
      background: #ab4a9c;
      color: #ffffff;
      font-size: 0.72rem;
      font-weight: 800;
      line-height: 1.1;
      text-align: center;
      box-shadow: 0 5px 0 rgba(88, 88, 90, 0.18);
      opacity: 0;
      transform: translateY(4px) scale(.96);
      transition: opacity .16s ease, transform .16s ease;
    }

    .mascot-helper.react .mascot-bubble {
      opacity: 1;
      transform: translateY(0) scale(1);
    }

    .mascot-bubble::after {
      content: "";
      position: absolute;
      left: -8px;
      bottom: 7px;
      width: 13px;
      height: 13px;
      background: #ab4a9c;
      border-left: 3px solid #ffffff;
      border-bottom: 3px solid #ffffff;
      transform: rotate(45deg);
    }

    @keyframes mascotPop {
      0% { transform: translateY(0) scale(1); }
      35% { transform: translateY(-9px) scale(1.08); }
      68% { transform: translateY(2px) scale(.98); }
      100% { transform: translateY(0) scale(1); }
    }

    .start-card-stars {
      position: absolute;
      inset: 0;
      pointer-events: none;
      overflow: hidden;
      z-index: 0;
    }

    .start-card > *:not(.start-card-stars) {
      position: relative;
      z-index: 1;
    }

    .start-card-star,
    .toolbar-star {
      position: absolute;
      left: 0;
      top: 0;
      will-change: transform, opacity;
      background: currentColor;
      color: inherit;
      clip-path: polygon(
        50% 0%,
        61% 35%,
        98% 35%,
        68% 57%,
        79% 91%,
        50% 70%,
        21% 91%,
        32% 57%,
        2% 35%,
        39% 35%
      );
    }

    .board-tools {
      position: absolute;
      left: 10.8%;
      top: 86%;
      z-index: 30;
      background: rgba(171, 74, 156, 0.68);
      border: 3px solid rgba(255, 255, 255, 0.62);
      border-radius: 18px;
      padding: 18px 12px 10px;
      box-shadow: 0 10px 24px rgba(42, 25, 60, 0.18);
      backdrop-filter: blur(6px);
      cursor: grab;
    }

    .board-tools::before {
      content: "";
      position: absolute;
      top: 7px;
      left: 50%;
      width: 74px;
      height: 7px;
      border-radius: 999px;
      background:
        radial-gradient(circle, #ffffff 0 2px, transparent 2.5px) 0 0 / 14px 7px,
        rgba(255, 255, 255, 0.34);
      transform: translateX(-50%);
    }

    .board-tools.dragging {
      cursor: grabbing;
    }

    .board-tools .tool-buttons {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .board-tools .icon-btn {
      width: 46px;
      height: 46px;
      border-radius: 12px;
      border: none;
      background: none;
      color: #ffffff;
      position: relative;
      flex-direction: column;
    }

    .board-tools .icon-btn img{
      width: 42px;
      height: 42px;
    }

    .board-tools .icon-btn svg {
      width: 28px;
      height: 28px;
      filter: drop-shadow(0 2px 0 rgba(42, 25, 60, 0.16));
    }

    .board-tools .icon-btn.active {
      background: rgba(255, 255, 255, 0.22);
      box-shadow: 0 0 0 3px #b2d235, 0 5px 0 rgba(42, 25, 60, 0.18);
      transform: translateY(-2px) scale(1.08);
    }

    .tap-pop {
      animation: tapPop 240ms cubic-bezier(.2, .9, .26, 1.25);
    }

    @keyframes tapPop {
      0% { transform: scale(1); }
      45% { transform: scale(1.12); }
      100% { transform: scale(1); }
    }

    .board-tools .icon-btn:disabled,
    .board-tools .icon-btn.is-disabled {
      cursor: default;
      opacity: 0.38;
      filter: grayscale(0.35);
      transform: none;
    }

    .board-tools .icon-btn:disabled:hover,
    .board-tools .icon-btn.is-disabled:hover {
      background: none;
      transform: none;
    }

    .board-tools .icon-separator {
      width: 1px;
      height: 28px;
      background: rgba(42, 25, 60, 0.2);
      margin: 0 4px;
    }

    .board-size-popup {
      position: absolute;
      left: 50%;
      bottom: calc(100% + 14px);
      transform: translateX(-50%);
      width: 190px;
      min-height: 205px;
      background: rgba(255, 248, 240, 0.98);
      border: 1.5px solid rgba(42, 25, 60, 0.14);
      border-radius: 24px;
      box-shadow:
        0 14px 32px rgba(42, 25, 60, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.65);
      display: none;
      align-items: stretch;
      justify-content: center;
      gap: 14px;
      padding: 14px 12px 16px;
      backdrop-filter: blur(10px);
    }

    .brush-type-picker {
      display: grid;
      grid-template-columns: 1fr;
      gap: 7px;
    }

    .brush-type-btn {
      display: flex;
      align-items: center;
      justify-content: center;
      min-height: 30px;
      padding: 6px 8px;
      border: 1.5px solid rgba(42, 25, 60, 0.12);
      border-radius: 999px;
      background: #fff9ef;
      color: #2a193c;
      font-size: 0.78rem;
      font-weight: 700;
      line-height: 1;
      box-shadow: 0 3px 0 rgba(42, 25, 60, 0.1);
      cursor: pointer;
    }

    .brush-type-btn[data-brush="crayon"] {
      color: #D66B24;
    }

    .brush-type-btn[data-brush="marker"] {
      color: #266BB4;
    }

    .brush-type-btn[data-brush="paintbrush"] {
      color: #237C78;
    }

    .brush-type-btn[data-brush="sparkle"] {
      color: #84277B;
    }

    .brush-type-btn[data-brush="rainbow"] {
      background: linear-gradient(90deg, #f44336, #ffeb3b, #4cc1bb, #2196f3, #ab4a9c);
      color: #ffffff;
      text-shadow: 0 1px 2px rgba(42, 25, 60, 0.34);
    }

    .brush-type-btn.active {
      background: #EA9752;
      color: #fff9ef;
      border-color: rgba(255, 255, 255, 0.76);
      transform: translateY(-1px);
      box-shadow: 0 4px 0 rgba(132, 39, 123, 0.26);
    }

    .board-size-control {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 8px;
      width: 100%;
      padding: 2px 4px 0;
    }

    .board-size-popup.open {
      display: flex;
      flex-direction: column;
    }

    .board-size-value {
      font-size: 0.95rem;
      line-height: 1;
      white-space: nowrap;
      text-align: center;
      color: #2a193c;
      font-weight: 700;
      letter-spacing: 0.2px;
    }

    .board-size-range {
    --fill-percent: 0%;
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 28px;
    margin: 0;
    padding: 0;
    background: transparent;
    cursor: pointer;
    display: block;
  }

  /* WebKit */
  .board-size-range::-webkit-slider-runnable-track {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(
      to right,
      #0e70b8 0%,
      #0e70b8 var(--fill-percent),
      rgba(42, 25, 60, 0.18) var(--fill-percent),
      rgba(42, 25, 60, 0.18) 100%
    );
  }

  .board-size-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #0e70b8;
    border: none;
    box-shadow:
      0 2px 6px rgba(20, 130, 227, 0.28),
      0 0 0 4px rgba(20, 130, 227, 0.12);
    margin-top: -7px;
  }

  /* Firefox */
  .board-size-range::-moz-range-track {
    width: 100%;
    height: 8px;
    background: rgba(42, 25, 60, 0.18);
    border-radius: 999px;
    border: none;
  }

  .board-size-range::-moz-range-progress {
    height: 8px;
    background: #0e70b8;
    border-radius: 999px;
  }

  .board-size-range::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #0e70b8;
    border: none;
    box-shadow:
      0 2px 6px rgba(20, 130, 227, 0.28),
      0 0 0 4px rgba(20, 130, 227, 0.12);
  }

    .board-size-popup::after {
      content: "";
      position: absolute;
      left: 50%;
      top: 100%;
      transform: translateX(-50%);
      width: 14px;
      height: 14px;
      background: rgba(255, 248, 240, 0.98);
      border-right: 1.5px solid rgba(42, 25, 60, 0.14);
      border-bottom: 1.5px solid rgba(42, 25, 60, 0.14);
      rotate: 45deg;
      margin-top: -7px;
    }

    .pencil-tool-wrap {
      position: relative;
      flex-shrink: 0;
    }

    .board-color-wrap {
      position: relative;
    }

    .board-color-popup {
      position: absolute;
      left: 50%;
      bottom: calc(100% + 10px);
      transform: translateX(-50%);
      width: 220px;
      background: rgba(255, 249, 239, 0.98);
      border: 1px solid rgba(42, 25, 60, 0.18);
      border-radius: 16px;
      box-shadow: 0 10px 24px rgba(42, 25, 60, 0.18);
      display: none;
      padding: 12px;
      gap: 10px;
    }

    .board-color-popup.open {
      display: flex;
      flex-direction: column;
    }

    .board-palette {
      display: grid;
      grid-template-columns: repeat(6, minmax(0, 1fr));
      gap: 8px;
      margin: 0;
    }

    .board-color-popup #custom-color {
      position: static !important;
      width: 100%;
      height: 36px;
      opacity: 1 !important;
      pointer-events: auto !important;
      border: 1px solid rgba(42, 25, 60, 0.25);
      border-radius: 10px;
      background: #fff9ef;
      cursor: pointer;
    }

    #download-btn{
      border-radius:999px;
      background: linear-gradient(135deg, #b2d235 0%, #4cc1bb 100%);
      color: #ffffff;
      width: 42px;
      height: 42px;
      border: 3px solid rgba(255, 255, 255, 0.82);
      box-shadow: 0 5px 0 rgba(14, 112, 184, 0.24), 0 8px 16px rgba(42, 25, 60, 0.16);
    }

    #download-btn:hover {
      background: linear-gradient(135deg, #ec9b53 0%, #b2d235 100%);
      color: #ffffff;
    }

    @media (orientation: portrait) and (max-width: 760px) {
      #full-area #game-area {
        width: 720px;
        height: 1280px;
        border-radius: 0;
      }

      .start-card {
        gap: 18px;
        padding: 92px 46px 138px;
      }

      .wave-top-track,
      .wave-bottom-track,
      .wave-top-track::before,
      .wave-top-track::after,
      .wave-bottom-track::before,
      .wave-bottom-track::after {
        height: 72px;
        background-size: 100% 72px;
      }

      .start-logo {
        width: 420px;
        max-height: 126px;
      }

      .start-title {
        font-size: 3.05rem;
        line-height: 1.05;
      }

      .start-subtitle {
        max-width: 520px;
        align-self: center;
        font-size: 1.35rem;
        line-height: 1.25;
      }

      .start-designs {
        width: 100%;
        height: 500px;
        padding-bottom: 30px;
      }

      .start-page-picker {
        grid-template-rows: repeat(2, minmax(0, 1fr));
        grid-auto-columns: calc((100% - 28px) / 3);
        gap: 14px;
        padding: 8px 6px 14px;
      }

      .start-page-thumb {
        border-width: 4px;
        border-radius: 22px;
      }

      .start-preview-btn {
        width: 52px;
        height: 52px;
        right: 12px;
        bottom: 12px;
      }

      .start-preview-btn svg {
        width: 27px;
        height: 27px;
      }

      .design-preview-modal {
        padding: 52px;
      }

      .design-preview-card {
        width: 100%;
        padding: 28px;
        border-radius: 34px;
      }

      .design-preview-image {
        max-height: 760px;
      }

      .start-scrollbar {
        left: 16px;
        right: 16px;
        height: 20px;
      }

      .start-scrollbar-thumb {
        top: 3px;
        bottom: 3px;
        min-width: 88px;
      }

      .start-actions {
        flex-direction: column;
        gap: 18px;
      }

      .start-actions .start-create-btn,
      .random-design-btn {
        width: min(500px, 100%);
        min-width: 0;
        padding: 18px 26px;
        border-radius: 24px;
        font-size: 1.42rem;
      }

      .editor-screen {
        flex-direction: column;
        background: #4cc1bb;
      }

      .toolbar {
        width: 100%;
        height: 330px;
        flex: 0 0 330px;
        padding: 14px 18px 12px;
        border-right: 0;
        border-bottom: 4px solid rgba(42, 25, 60, 0.16);
        overflow: hidden;
        background: linear-gradient(180deg, #4cc1bb 0%, #38aca6 100%);
      }

      .toolbar-stars {
        display: none;
      }

      .toolbar-char-header {
        margin-bottom: 10px;
      }

      .back-btn {
        width: 58px;
        height: 58px;
        border-radius: 20px;
      }

      .toolbar-char-logo {
        height: 50px;
        max-width: 430px;
      }

      .tool-category-panel {
        display: flex;
        flex-direction: column;
        gap: 12px;
      }

      .tool-category-tabs {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 10px;
      }

      .tool-category-btn {
        min-height: 62px;
        padding: 9px 7px;
        border-radius: 19px;
        font-size: 20px;
      }

      .tool-picker-stage {
        height: 146px;
        min-height: 146px;
        padding: 10px 10px 20px;
        border-radius: 22px;
      }

      .picker-scrollbar {
        top: auto;
        left: 18px;
        right: 18px;
        bottom: 7px;
        width: auto;
        height: 14px;
      }

      .picker-scrollbar-thumb {
        top: 1px;
        left: 0;
        right: auto;
        min-width: 54px;
        min-height: 0;
        height: 8px;
        transform: translateX(0);
      }

      .tool-picker,
      .pattern-picker {
        max-height: 146px;
      }

      .pattern-picker {
        display: grid;
        grid-auto-flow: column;
        grid-template-columns: none;
        grid-template-rows: minmax(0, 1fr);
        grid-auto-columns: 92px;
        gap: 8px;
        overflow-x: scroll;
        overflow-y: hidden;
        padding: 5px 4px 10px;
      }

      .pattern-thumb {
        height: 100%;
        border-radius: 16px;
      }

      .canvas-stage {
        flex: 1 1 auto;
        min-height: 0;
        padding: 18px 18px 184px;
        align-items: stretch;
        justify-content: center;
        overflow: hidden;
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.84) 0%, rgba(14, 112, 184, 0.08) 100%);
      }

      .paper-wrap {
        width: 100%;
        max-width: 100%;
        height: auto;
        max-height: 100%;
        aspect-ratio: 720 / 1280;
        border-radius: 24px;
        padding: 12px;
        overflow: hidden;
      }

      #drawing-canvas,
      #pattern-overlay {
        border-radius: 16px;
      }

      #drawing-canvas {
        width: 720px;
        max-width: 100%;
        max-height: 100%;
        height: auto;
      }

      .mascot-helper {
        left: 22px;
        bottom: 18px;
        width: 120px;
        opacity: 0.9;
        z-index: 99;
      }

      .mascot-body {
        width: 48px;
        height: 48px;
      }

      .mascot-bubble {
        left: 48px;
        min-width: 112px;
        padding: 9px 12px;
        border-radius: 18px;
        font-size: 0.9rem;
      }

      .board-tools {
        position: absolute;
        inset: auto auto 12px 50% !important;
        width: calc(100% - 28px);
        max-width: 680px;
        transform: none;
        border-radius: 24px;
        padding: 22px 12px 10px;
        background: rgba(171, 74, 157, 0.7);
        cursor: default;
        translate: -50% 0;
      }

      .board-tools::before {
        content: none;
        position: absolute;
        top: 8px;
        left: 50%;
        width: 96px;
        height: 8px;
        border-radius: 999px;
        background:
          radial-gradient(circle, #ffffff 0 2px, transparent 2.5px) 0 0 / 16px 8px,
          rgba(255, 255, 255, 0.36);
        transform: translateX(-50%);
      }

      .board-tools .tool-buttons {
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px;
      }

      .board-tools .icon-btn {
        width: 58px;
        height: 54px;
        border-radius: 14px;
        gap: 2px;
      }

      .board-tools .icon-btn img {
        width: 38px;
        height: 38px;
      }

      .board-tools .icon-btn svg {
        width: 27px;
        height: 27px;
      }

      .icon-btn svg {
        width: 35px;
        height: 35px;
      }

      #download-btn {
        width: 58px;
        height: 64px;
        border-radius: 18px;
        box-shadow: 0 6px 0 rgba(14, 112, 184, 0.24), 0 0 0 3px rgba(255, 255, 255, 0.32);
      }

      .board-tools .icon-btn::after {
        content: attr(data-label);
        display: block;
        max-width: 100%;
        color: #ffffff;
        font-size: 0.66rem;
        font-weight: 900;
        line-height: 1;
        text-align: center;
        text-shadow: 0 1px 2px rgba(42, 25, 60, 0.26);
      }

      .board-size-popup,
      .board-color-popup {
        width: 330px;
        bottom: calc(100% + 14px);
      }

      .board-palette {
        grid-template-columns: repeat(6, minmax(0, 1fr));
      }
    }
