/* /public/css/flowwrite.css */

html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
}

#study-system-outer {
    background: #fff;
    border-radius: 22px;
    border: 2px solid #dbd6f2;
    box-shadow: 0 8px 32px rgba(80, 60, 115, 0.08);
    padding: 0 0 32px 0;
    max-width: 800px;
    margin: 50px auto 0 auto;
    box-sizing: border-box;
    margin-bottom: 50px;
}
#study-header-bar {
    width: 100%;
    background: #40536a;
    border-top-left-radius: 18px;
    border-top-right-radius: 18px;
    height: 62px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-width: 0;
    box-sizing: border-box;
    box-shadow: 0 1.5px 6px #0000000c;
}
#study-header-align {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    min-width: 0;
}

.study-select-container {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    padding-left: 10px;
}
#topic-tooltip {
    display: none;
    position: absolute;
    left: 50%;
    top: -30px;
    transform: translateX(-50%);
    background: #222a38;
    color: #fff;
    padding: 4px 12px;
    border-radius: 7px;
    font-size: 1em;
    white-space: nowrap;
    z-index: 11111;
}
.study-select-container select {
    padding: 7px 21px 7px 11px;
    border-radius: 8px;
    font-size: 1.08em;
    border: none;
    appearance: none;
    background: #fff;
    color: #313131;
    box-shadow: 0 1px 2px #1c25311c;
    transition: outline 0.22s;
    font-weight: 500;
}
.study-select-container select:focus {
    outline: 2px solid #80bfff;
}
.study-topic-label {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 1.31em;
    font-weight: bold;
    text-align: center;
    user-select: none;
    pointer-events: none;
    letter-spacing: 0.01em;
}
.study-dropdown-parent {
    position: relative;
    padding-right: 15px;
}
.study-settings-btn {
    background: none;
    border: none;
    padding: 0 5px;
    cursor: pointer;
    outline: none;
    display: flex;
    align-items: center;
    border-radius: 5px;
    transition: background 0.17s;
    box-shadow: none;
}
.study-settings-btn:hover {
    background: #536a8b36;
}
.study-settings-btn img {
    width: 31px;
    height: 31px;
    filter: invert(0.8);
}
#settings-tooltip {
    display: none;
    position: absolute;
    top: -36px;
    left: 50%;
    transform: translateX(-50%);
    background: #2d3447;
    color: #fff;
    white-space: nowrap;
    font-size: 1em;
    border-radius: 7px;
    padding: 4px 12px;
    z-index: 11111;
    box-shadow: 0 2px 12px #2222;
}
#settings-dropdown.settings-dropdown-nice {
    display: none;
    position: absolute;
    right: 0;
    min-width: 240px;
    background: linear-gradient(135deg, #535965 0%, #9298a3 54%, #383b41 100%);
    border-radius: 12px;
    margin-top: 8px;
    box-shadow:
        0 3px 18px #2b2b2b36,
        0 1px 5px #7a8ea533;
    z-index: 1111;
    font-size: 1.1em;
    padding: 12px 12px 12px 12px;
    border: 1px solid #e1e5eb;
}

#settings-dropdown.settings-dropdown-nice.show {
    display: block;
    animation: dropdownIn 0.22s cubic-bezier(0.19, 1.22, 0.35, 1);
}
.settings-title {
    background: linear-gradient(97deg, #b3bbca 60%, #8d98ad 100%);
    font-size: 1.19em;
    font-weight: 600;
    letter-spacing: 0.01em;
    padding: 12px 0 14px 0;
    color: #27324b;
    text-align: center;
    border-radius: 18px 18px 14px 14px;
    border-bottom: 1.5px solid #909bb0;
    margin: 14px 18px 14px 18px;
    box-shadow: 0 2px 10px #a2acc233;
}
.settings-row {
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin-top: 12px;
    justify-content: center;
    width: 100%;
    text-align: center;
    display: flex;
}
.settings-row label {
    font-size: 1.07em;
    color: #263561;
    padding-bottom: 2px;
    font-weight: 700;
    text-align: center;
    width: 100%;
    display: block;
}

#toggle-counts-row label {
    font-weight: 700 !important;
}
#toggle-def-mode {
    font-size: 1.13em;
    padding: 8px 24px;
    border-radius: 8px;
    font-weight: 500;
    background: #eae7fc;
    border: 1.5px solid #c3c3ec;
    cursor: pointer;
    margin: 0 auto 4px auto;
    display: block;
}
#text-fontsize-panel {
    display: none;
    margin: 0 auto 16px auto;
    max-width: 800px;
    padding-top: 10px;
}
#text-fontsize-panel > div {
    background: #f6f7fb;
    border: 1.2px solid #e0eaff;
    border-radius: 10px;
    padding: 18px 22px 10px 22px;
}
#text-fontsize-panel > div > div {
    font-weight: 600;
    color: #243065;
    font-size: 1.12em;
    margin-bottom: 10px;
    text-align: center;
    letter-spacing: 0.01em;
}
#definition-fontsize {
    font-size: 1.09em;
    padding: 8px 30px 8px 12px;
    border-radius: 6px;
    width: 100%;
    max-width: 230px;
    display: block;
    margin: 0 auto;
}
#study-system {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    margin: 0;
    width: 100%;
    box-sizing: border-box;
}
#words-ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 750px;
    list-style: none;
    padding: 0;
    margin: 0;
    margin-top: 30px;
    max-height: 520px;
    overflow-y: overlay;
    overscroll-behavior: contain;
    position: relative;
    scrollbar-width: thin;
    scrollbar-color: #b7b9e7af transparent;
    z-index: 0;
    padding: 18px 3px 18px 3px;
    box-sizing: content-box;
}

#words-ul::-webkit-scrollbar {
    width: 22px;
    background: transparent;
    position: absolute;
    z-index: 99;
    pointer-events: auto;
}

#words-ul::-webkit-scrollbar-thumb {
    background: #b7b9e7cc;
    border-radius: 12px;
    min-height: 60px;
    margin: 0;
    border: none;
    background-clip: padding-box;
}

#words-ul > * {
    position: relative;
    z-index: 1;
}
.study-word-box {
    background: #fff;
    border-radius: 14px;
    border: 1.5px solid #e0e0e6;
    box-shadow: 0 2px 8px rgba(80, 60, 115, 0.04);
    padding: 6px 20px;
    display: flex;
    align-items: stretch;
    gap: 25px;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
}
.study-word-box > div[style*="flex-direction: column"] {
    margin-left: auto !important;
    margin-right: 0 !important;
    align-self: center !important;
}
.word-label {
    width: 300px;
    max-height: 125px;
    overflow-y: auto;
    overflow-x: hidden;
    text-overflow: unset;
    font-weight: bold;
    font-size: 20px;
    color: #483177;
    word-break: break-all;
    overflow-wrap: break-word;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.4;
    box-sizing: border-box;
    flex-shrink: 0;
    min-height: 68px;
    text-align: center;
    white-space: normal;
    overscroll-behavior: contain;
    padding-left: 5px;
    margin-right: -25px !important;
}

.word-label + .word-audio-btn {
    margin-bottom: 110px !important;
    margin-left: 5px !important;
}

@media (max-width: 800px) {
    .word-label + .word-audio-btn {
        margin-bottom: 60px !important;
        margin-left: 2px !important;
    }
    .word-label {
        padding-left: 20px;
    }
}

.study-word-box > div[style*="flex-direction: column"] {
    width: 370px !important;
    min-width: 370px !important;
    max-width: 370px !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    align-self: flex-start !important;
}

.definition-input {
    width: 360px;
    min-width: 360px;
    max-width: 360px;
    left: 6px !important;
    min-height: 68px;
    max-height: 68px;
    height: auto;
    overflow-y: auto;
    resize: none;
    font-size: 1em;
    padding: 10px;
    border: 1.2px solid #d6d5df;
    border-radius: 6px;
    background: #faf9fe;
    outline: none;
    transition:
        box-shadow 0.12s,
        border-color 0.12s;
    box-sizing: border-box;
    flex-shrink: 0;
    align-self: stretch;
    display: flex;
    align-items: center;
    text-align: left !important;
}
.study-word-box.active-wordbox {
    box-shadow: 0 0 0 3px #2196f366;
    border-color: #81b5ff;
    z-index: 5;
    position: relative;
}
@media (max-width: 800px) {
    #study-system-outer {
        max-width: 97vw;
        padding: 0vw 1vw 4vw 1vw;
        margin-right: 15px;
    }
    #study-system-outer > div {
        overscroll-behavior: auto !important;
    }
    #words-ul {
        overscroll-behavior: auto !important;
    }
    #study-system {
        max-width: 99vw;
        padding: 14vw 2vw 0 2vw;
    }
    #words-ul {
        max-width: 99vw;
        margin-top: -40px !important;
    }
    .study-word-box {
        flex-direction: column;
        gap: 10px;
        padding: 11px 4px;
    }
    .word-label,
    .definition-input {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }
    .definition-input {
        min-width: 0;
    }
}

#study-modal-overlay {
    display: none;
    align-items: center;
    justify-content: center;
    position: fixed;
    z-index: 100001;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(40, 35, 70, 0.28);
    transition: background 0.25s;
}
#study-modal-popup {
    background: #fff;
    box-shadow: 0 12px 40px #3332;
    border-radius: 13px;
    padding: 36px 40px 28px 34px;
    position: relative;
    max-width: 400px;
    min-width: 215px;
    min-height: 90px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: fadePopupIn 0.2s;
}
#study-modal-xbtn {
    position: absolute;
    top: 10px;
    right: 12px;
    font-size: 2em;
    background: none;
    border: none;
    color: #552257;
    opacity: 0.74;
    cursor: pointer;
    font-weight: bold;
    z-index: 10;
    padding: 0 5px;
    line-height: 1;
}
#study-modal-xbtn:hover {
    opacity: 1;
    color: #c13f28;
}
#study-modal-content {
    margin-top: 4px;
    margin-bottom: 3px;
    font-size: 1.18em;
    color: #34225a;
    text-align: center;
    max-width: 98vw;
    max-height: 500px;
    overflow-y: auto;
    word-break: break-word;
    white-space: pre-wrap;
}

#study-modal-content .audio-btn,
#study-modal-content .popup-audio-btn {
    position: static !important;
    left: 0 !important;
    margin-bottom: 4px;
    display: inline-block;
}
#study-modal-content .popup-title {
    display: flex;
    align-items: center;
    gap: 7px;
    justify-content: center;
}

.popup-title {
    font-size: 1.17em;
    font-weight: 600;
    margin-bottom: 9px;
    color: #2a4397;
    letter-spacing: 0.02em;
}
.study-extra-btn {
    background: #edefff;
    border: 1.1px solid #bfc5d7;
    border-radius: 7px;
    padding: 4px 8px;
    font-size: 0.98em;
    font-weight: 500;
    color: #432e77;
    cursor: pointer;
    margin: 0;
    line-height: 1.2;
    box-shadow: 0 1px 2px #bbb2;
    transition:
        background 0.16s,
        border-color 0.16s;
}
.study-extra-btn:hover,
.study-extra-btn:focus {
    background: #e4f2fb;
    border-color: #8dc4ff;
}
.box-bottom-btns {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3px !important;
    margin-bottom: 0;
}
.study-extra-btn:hover,
.study-extra-btn:focus {
    background: #e4f2fb;
    border-color: #8dc4ff;
}
@keyframes fadePopupIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#fullscreen-popup-btns .study-extra-btn {
    padding: 4px 12px;
    font-size: 0.97em;
    margin: 0;
    border-radius: 7px;
    min-width: 63px;
}
#fullscreen-popup-btns {
    gap: 7px !important;
}

#fullscreen-popup-btns .study-extra-btn {
    padding: 4px 12px;
    font-size: 0.97em;
    min-width: 63px;
}
#fullscreen-popup-btns {
    gap: 6px !important;
}

#fullscreen-draw-canvas {
    max-width: 96vw;
    max-height: 76vh;
    width: 100%;
    height: auto;
    aspect-ratio: 1250/660;
    transition:
        width 0.18s,
        height 0.18s;
}
@media (max-width: 900px), (max-height: 800px) {
    #fullscreen-draw-canvas {
        max-width: 99vw;
        max-height: 68vh;
    }
}
@media (max-width: 600px) {
    #fullscreen-draw-canvas {
        max-width: 99vw;
        max-height: 58vh;
    }
    #study-system-outer {
        margin-right: 10px;
    }
}
/* Optionally: shrink toolbar/popup panel if you want */
#fullscreen-toolbar-bar,
#fullscreen-draw-toolbar-panel {
    max-width: 99vw;
    flex-wrap: wrap;
    margin-left: -10px;
}

#fullscreen-draw-outer {
    align-items: flex-start;
    padding-top: 48px;
    margin-left: -5px !important;
}

#draw-toolbar-panel .toolbar-item:last-child {
    margin-right: 0;
}
@media (max-width: 800px) {
    #draw-toolbar-panel .toolbar-undo-redo-row {
        margin-left: 10px !important;
        justify-content: center;
        width: 100%;
    }
}

#fullscreen-exit-btn {
    margin-left: -8px !important;
    width: auto !important;
    height: 55px !important;
}

.drawing-canvas.active-canvas {
    box-shadow: 0 0 0 3px #2196f366;
    border-color: #81b5ff;
    z-index: 5;
}

.box-bottom-btns,
.study-extra-btn {
    position: relative;
    z-index: 10;
}

.star-btn:hover,
#fullscreen-star-btn:hover {
    filter: drop-shadow(0 0 4px #fdb90066);
    opacity: 1;
}

.audio-btn {
    transition: filter 0.13s;
}
.audio-btn:hover,
#fullscreen-audio-btn:hover {
    filter: drop-shadow(0 0 4px #2196f399);
    opacity: 1;
}

.audio-btn:not(.word-audio-btn) {
    font-size: 0.98em !important;
    width: 19px !important;
    height: 19px !important;
    min-width: 19px !important;
    min-height: 19px !important;
    max-width: 19px !important;
    max-height: 19px !important;
    line-height: 19px !important;
    padding: 0 !important;
}

#fullscreen-toolbar-4square button {
    width: 30px;
    height: 30px;
    padding: 0;
    font-size: 1em;
    border-radius: 7px;
    min-width: 0;
}
#fullscreen-toolbar-4square .fullscreen-btn {
    font-size: 1.06em;
}

#fullscreen-toolbar-4square button {
    min-width: 0;
    width: auto;
    height: 28px;
    border-radius: 7px;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 0.99em;
    padding: 0 2px;
}
#fullscreen-toolbar-4square .fullscreen-btn {
    font-size: 0.99em;
    min-width: 0;
}
#fullscreen-toolbar-4square > div button {
    min-width: 0;
    width: 30px;
    height: 28px;
    padding: 0;
}

.draw-area-wrap {
    border: 1.4px solid #e6e5ee;
    border-radius: 7px;
    background: #faf9fe;
    box-shadow: 0 2px 7px #b3aadb0c;
    transition: border-color 0.14s;
}
.study-word-box.active-wordbox .draw-area-wrap {
    border-color: #81b5ff !important;
    box-shadow: 0 0 0 2.5px #81b5ff55;
}
.draw-area-wrap:focus-within {
    border-color: #9986ff;
}

@media (max-width: 700px) {
    div[style*="border: 1.4px solid"] {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        height: auto !important;
    }
}

/* Show faint border around canvas+input area only */
.drawing-canvas,
.definition-input {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
}

/* FAINT border using parent (defWrap) :before pseudo-element */
.study-word-box > div[style*="position: relative"]::before {
    content: "";
    display: block;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 90px;
    background: #faf9fe;
    border: 1.4px solid #e6e5ee;
    border-radius: 7px;
    box-sizing: border-box;
    box-shadow: 0 2px 7px #b3aadb0c;
    z-index: 0;
    pointer-events: none;
}
.study-word-box.active-wordbox > div[style*="position: relative"]::before {
    border-color: #81b5ff !important;
    box-shadow: 0 0 0 2.5px #81b5ff55;
}
@media (max-width: 800px) {
    .study-word-box > div[style*="position: relative"]::before {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        height: 68px !important;
    }
}

/* For even smaller screens, further limit and shrink more */
@media (max-width: 900px) {
    #fullscreen-word-label {
        max-width: 86vw;
        font-size: clamp(0.56em, 6vw, 1.42em);
    }
}

.audio-btn.word-audio-btn {
    z-index: 99 !important;
    position: absolute !important;
    pointer-events: auto !important;
}

.audio-btn.audio-playing {
    box-shadow:
        0 0 0 2px #7ca0fd,
        0 0 12px 2px #73e1fa77;
    filter: drop-shadow(0 0 5px #7ca0fdcc);
    background: #dbeaff;
}

#draw-size-select,
#draw-color-select,
#toggle-eraser-btn,
#definition-fontsize,
#fullscreen-definition-fontsize,
#toggle-def-overlay,
#fullscreen-toggle-def-overlay {
    max-width: 130px !important;
    min-width: 60px !important;
    width: 100% !important;
}

#fullscreen-toggle-def-overlay {
    width: 64px !important;
    min-width: 64px !important;
    max-width: 64px !important;
    box-sizing: border-box !important;
    text-align: center !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}
@media (max-width: 800px) {
    #draw-size-select,
    #draw-color-select,
    #toggle-eraser-btn,
    #definition-fontsize,
    #fullscreen-definition-fontsize,
    #toggle-def-overlay,
    #fullscreen-toggle-def-overlay {
        max-width: 120px !important;
        min-width: 60px !important;
        width: 100% !important;
    }
}

#fullscreen-word-audio-btn {
    border-radius: 50%;
    transition:
        background 0.13s,
        box-shadow 0.13s;
}

#audio-word-lock {
    flex-shrink: 0 !important;
}

.audio-btn.audio-playing {
    box-shadow:
        0 0 0 0px #7ca0fd,
        0 0 0 px #dbeaff55;
    border-radius: 50%;
    filter: drop-shadow(0 0 3px #5e8cffcc);
    background: #eaf4ff;
    transition:
        box-shadow 0.13s,
        background 0.18s;
}
/*Dropdown labels*/

.fs-tooltip {
    visibility: hidden;
    background: #222a38e6;
    color: #fff;
    border-radius: 6px;
    padding: 3px 13px;
    font-size: 0.97em;
    position: absolute;
    left: 50%;
    top: -32px;
    transform: translateX(-50%);
    white-space: nowrap;
    z-index: 999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
}
.fs-tooltip-parent:hover .fs-tooltip,
.fs-tooltip-parent:focus-within .fs-tooltip {
    visibility: visible;
    opacity: 1;
}
.fs-tooltip-parent {
    position: relative;
    display: inline-block;
}
.fs-tooltip-parent .fs-tooltip {
    top: -25px; /* default is -32px, use positive for below */
}

#draw-toolbar-panel .toolbar-item:last-child {
    margin-right: 0;
}
#draw-toolbar-panel select,
#draw-toolbar-panel button:not(.toolbar-undo-btn):not(.toolbar-redo-btn),
#draw-toolbar-panel input {
    width: 100%;
    height: 38px;
    font-size: 1.09em;
    box-sizing: border-box;
    border-radius: 6px;
    margin: 0;
    padding: 0 8px;
    appearance: none;
    border: 1.1px solid #bfc5d7;
    background: #faf9fe;
    color: #33225a;
    transition:
        border-color 0.14s,
        box-shadow 0.14s;
}
#draw-toolbar-panel select:focus,
#draw-toolbar-panel button:not(.toolbar-undo-btn):not(.toolbar-redo-btn):focus {
    outline: 2px solid #a7bcff;
    border-color: #7fa8ff;
}
#draw-toolbar-panel .toolbar-undo-redo-row button {
    width: 38px;
    min-width: 38px;
    max-width: 38px;
    height: 38px;
    min-height: 38px;
    max-height: 38px;
    border-radius: 8px;
    border: 2.2px solid #92bfff;
    background: #f4f8ff;
    color: #267efe;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.33em;
    margin: 0;
    box-shadow: 0 1.5px 7px #b3caf722;
    display: flex;
    align-items: center;
    justify-content: center;
    transition:
        background 0.15s,
        border 0.13s,
        color 0.13s;
}
#draw-toolbar-panel .toolbar-undo-redo-row button:hover {
    background: #e6f0ff;
    border-color: #457aff;
    color: #1b53bb;
}

#draw-toolbar-panel .toolbar-undo-redo-row {
    display: flex;
    flex-direction: row;
    gap: 5px;
    margin-left: 15px;
    width: 100%;
    justify-content: center;
    align-items: center;
}

#draw-toolbar-panel .toolbar-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 5px;
    width: 100%;
}

#draw-toolbar-panel .toolbar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1 1 0;
    min-width: 0;
    max-width: none;
    width: 100%;
    margin: 0 !important;
    box-sizing: border-box;
    margin-bottom: 8px;
}

#draw-toolbar-panel .toolbar-label {
    display: block;
    width: 100%;
    text-align: center;
    margin: 0 0 6px 0;
    font-size: 1em;
    font-weight: 500;
    min-width: 0;
}

@media (max-width: 800px) {
    .toolbar-label {
        margin-right: 5px !important;
    }
}
@media (max-width: 800px) {
    .toolbar-label {
        margin-left: 10px !important;
    }
}
@media (max-width: 500px) {
    .toolbar-label {
        margin-right: 15px !important;
    }
}
@media (max-width: 800px) {
    .audio-btn.word-audio-btn {
        left: -4px !important;
    }
}

#draw-toolbar-panel .toolbar-item:last-child .toolbar-label {
    padding-left: 12px;
}

@media (max-width: 800px) {
    #draw-toolbar-panel .toolbar-item:last-child .toolbar-label {
        padding-left: 4px;
    }
}

@media (max-width: 800px) {
    .study-word-box {
        flex-direction: column;
        align-items: center !important;
        text-align: center !important;
    }
    .word-label {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        text-align: center !important;
        margin: 0 auto 7px auto !important;
        display: block !important;
        align-self: center !important;
        justify-content: center !important;
    }
    .study-word-box > div[style*="flex-direction: column"] {
        margin: 0 auto !important;
        align-items: center !important;
    }
}

@media (max-width: 800px) {
    #draw-toolbar-panel {
        margin-left: auto !important;
        margin-right: auto !important;
        display: block !important;
        width: 100% !important;
        max-width: 99vw !important;
        text-align: center !important;
    }
}

/* === FULLSCREEN WORD LABEL FIX === */
#audio-word-lock {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    flex: 1 1 0 !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin-left: 36px !important; /* NEW: pushes all (audio+label) right, no overlap */
    margin-right: 0 !important;
    padding: 0 !important;
    background: transparent !important;
}
#fullscreen-word-label-wrap {
    display: flex !important;
    align-items: center !important;
    flex: 1 1 0 !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    overflow: visible !important;
}
#fullscreen-word-label {
    width: 100% !important;
    min-width: 250px !important;
    max-width: 100% !important;
    background: #fff !important;
    font-size: 1.25em !important;
    font-weight: 700 !important;
    color: #483177 !important;
    border-radius: 10px !important;
    padding: 5px 13px 5px 10px !important;
    display: block !important;
    text-align: left !important;
    box-shadow: 0 1px 5px #c5ceee22 !important;
    max-height: 2.5em !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    word-break: break-all !important;
    overflow-wrap: anywhere !important;
    white-space: normal !important;
    text-overflow: unset !important;
    margin: 0 !important;
    scrollbar-width: thin !important;
    scrollbar-color: #aaa #eee !important;
}
#fullscreen-word-label::-webkit-scrollbar {
    width: 12px !important;
    background: #eee !important;
}
#fullscreen-word-label::-webkit-scrollbar-thumb {
    background: #b6b6c7 !important;
    border-radius: 8px !important;
}
#fullscreen-word-label::-webkit-scrollbar-track {
    background: #eee !important;
    border-radius: 8px !important;
}
#audio-word-lock {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    flex: 1 1 0 !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
}

#fullscreen-word-audio-btn {
    position: absolute !important;
    left: 0 !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    margin: 0 !important;
    z-index: 2 !important;
}

#fullscreen-word-label-wrap {
    display: flex !important;
    align-items: center !important;
    flex: 1 1 0 !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin-left: 38px !important; /* space for button width */
    padding: 0 !important;
    background: transparent !important;
    overflow: visible !important;
    position: relative !important;
}

/*Fix toolbar going over word*/
#fullscreen-draw-toolbar-panel {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 17px;
    min-width: 0;
}

#audio-word-lock {
    min-width: 300px;
    flex-basis: 300px !important;
    flex-shrink: 0 !important;
}

#fullscreen-word-label {
    min-width: 300px;
    max-width: 100%;
}

@media (max-width: 900px) {
    #fullscreen-draw-toolbar-panel {
        flex-direction: column;
        align-items: stretch;
    }
    #audio-word-lock,
    #fullscreen-word-label {
        min-width: 0;
        width: 100%;
        flex-basis: 100%;
    }
}
/*Fix toolbar going over word*/

@media (max-width: 990px) {
    #fullscreen-draw-outer {
        padding-top: 130px !important;
    }
}

@media (max-width: 947px) {
    #fullscreen-draw-outer {
        padding-top: 160px !important;
    }
}

@media (max-width: 610px) {
    #fullscreen-draw-outer {
        padding-top: 220px !important;
    }
}

#fullscreen-word-prev:hover,
#fullscreen-word-next:hover {
    background: #d4e5ff !important;
    border-color: #8dc4ff !important;
}

.audio-btn.popup-audio-btn {
    position: relative !important;
    left: -12px !important;
    margin-right: 8px !important;
}
.audio-btn,
.popup-audio-btn {
    vertical-align: middle;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

#fullscreen-overlay-audio-btn-2 {
    position: absolute;
    top: 15px;
    left: 65px;
    z-index: 11111;
    color: #4452be;
    background: none;
    border: none;
    font-size: 1.24em;
    cursor: pointer;
    opacity: 0.88;
    line-height: 1;
    padding: 0 2px 0 1px;
}

/*Text going under border box*/

#fullscreen-definition-overlay {
    overflow-y: auto !important;
    top: 2px !important;
    height: 99% !important;
    box-sizing: border-box !important;
    resize: none !important;
    padding-top: 36px !important;
    padding-bottom: 28px !important;
    border-radius: 20px !important;
}

#fullscreen-definition-overlay {
    display: block !important;
}

#fullscreen-definition-overlay {
    /* Prevent overflow above border */
    max-height: 76vh !important;
}

/* Optional mobile adjustment */
@media (max-width: 900px) {
    #fullscreen-definition-overlay {
        max-height: 68vh !important;
    }
}
@media (max-width: 600px) {
    #fullscreen-definition-overlay {
        max-height: 58vh !important;
    }
}

.drag-handle {
    position: relative;
    left: -8px;
    top: 2px;
    z-index: 11;
    cursor: grab;
    opacity: 0.97;
    transition: color 0.14s;
}
.drag-handle:active {
    color: #9b87df;
}
.study-word-box {
    transition: boxadow 0.14s;
}

#study-system {
    margin-top: -40px;
}

/*Move sets*/

.arrow-wrap {
    position: absolute !important;
    left: 3px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 2000 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 30px !important;
    pointer-events: none !important;
}
@media (max-width: 800px) {
    .arrow-wrap {
        left: -172px !important;
    }
}
.arrow-wrap button {
    pointer-events: auto !important;
    z-index: 2222 !important;
    font-size: 1.34em !important;
    width: 20px !important;
    height: 50px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 0 !important;
    min-height: 0 !important;
    background: #f3f6fdcc !important;
    border: 1.4px solid #dccfff !important;
    border-radius: 7px !important;
    color: #483177 !important;
    opacity: 0.87 !important;
    margin: 0 !important;
    box-shadow: 0 0 2px #e0e9f622 !important;
    padding: 0 !important;
    cursor: pointer !important;
    transition:
        background 0.15s,
        opacity 0.17s,
        color 0.16s;
}
.arrow-wrap button:hover {
    opacity: 1 !important;
    color: #1687ef !important;
    background: #eaf4ff !important;
}

.set-number-label {
    user-select: none !important;
    pointer-events: none !important;
    padding: 0 0px !important;
}

#speech-rate-select,
#speech-voice-select {
    padding: 9px 19px 9px 11px;
    border-radius: 8px;
    font-size: 1.12em;
    border: 1.3px solid #bfc5d7;
    background: #faf9fe;
    color: #33225a;
    font-weight: 500;
    width: 100%;
    max-width: 220px;
    outline: none;
    transition:
        border-color 0.15s,
        box-shadow 0.14s;
    box-shadow: 0 1px 3px #1c25311a;
    appearance: none;
}
#speech-rate-select:focus,
#speech-voice-select:focus {
    border-color: #7fa8ff;
    outline: 2px solid #a7bcff;
}
#speech-rate-select,
#speech-voice-select {
    max-width: 220px !important;
    min-width: 220px !important;
    width: 220px !important;
}

#outer-bg-select,
#toolbar-bg-select,
#wordbox-bg-select,
#definput-bg-select #outer-bg-select,
#toolbar-bg-select,
#wordbox-bg-select,
#definput-bg-select {
    appearance: none;
    font-size: 1.09em;
    border-radius: 8px;
    border: 1.4px solid #bfc5d7;
    padding: 8px 38px 8px 14px;
    margin: 0 0 8px 0;
    width: 100%;
    max-width: 220px;
    background: #faf9fe;
    color: #322a4d;
    font-weight: 500;
    transition:
        border 0.15s,
        box-shadow 0.14s;
    box-sizing: border-box;
    box-shadow: 0 1px 3px #2221;
    outline: none;
}
#outer-bg-select:focus,
#toolbar-bg-select:focus,
#wordbox-bg-select:focus,
#definput-bg-select:focus {
    border-color: #7fa8ff;
    outline: 2px solid #a7bcff;
}

#ui-accent-select {
    appearance: none;
    font-size: 1.09em;
    border-radius: 8px;
    border: 1.4px solid #bfc5d7;
    padding: 8px 38px 8px 14px;
    margin: 0 0 8px 0;
    width: 100%;
    max-width: 220px;
    background: #faf9fe;
    color: #322a4d;
    font-weight: 500;
    transition:
        border 0.15s,
        box-shadow 0.14s;
    box-sizing: border-box;
    box-shadow: 0 1px 3px #2221;
    outline: none;
}

select:hover,
select:focus {
    cursor: pointer !important;
}

#fullscreen-word-prev:hover,
#fullscreen-word-next:hover,
#fullscreen-toggle-def-overlay:hover,
#toggle-def-overlay:hover {
    cursor: pointer !important;
}

#toggle-counts-row label {
    font-size: 1.07em;
    color: #263561;
    padding-bottom: 2px;
    font-weight: 500;
    text-align: center;
    width: 100%;
    display: block;
}
#toggle-counts-btn {
    font-size: 1em;
    padding: 8px 0;
    border-radius: 8px;
    border: 1.5px solid #c3c3ec;
    background: #eae7fc;
    color: #483177;
    width: 100%;
    max-width: 220px;
    min-width: 220px;
    box-sizing: border-box;
    font-weight: 500;
    cursor: pointer;
    margin: 0 auto 2px auto;
    display: block;
    transition:
        background 0.13s,
        color 0.14s,
        border 0.13s;
}

#topic-dropdown:hover,
select:hover,
.settings-dropdown-nice select:hover {
    box-shadow:
        0 0 0 2px #5dacff,
        0 2px 12px 0 #4bb9ff44;
    border: 1px solid #63b7ff !important;
    color: #3e3e3e;
    background: linear-gradient(98deg, #6f7b8c 0%, #345d8b 100%) !important;
    transition:
        box-shadow 0.16s,
        border 0.16s,
        background 0.16s,
        color 0.12s;
}

#outer-bg-select option,
#toolbar-bg-select option,
#wordbox-bg-select option,
#ui-accent-select option,
#speech-rate-select option,
#speech-voice-select option,
#topic-dropdown option,
#draw-size-select option,
#draw-color-select option,
#definition-fontsize option,
#fullscreen-draw-size-select option,
#fullscreen-draw-color-select option,
#fullscreen-definition-fontsize option,
#toggle-eraser-btn option,
#fullscreen-toggle-eraser-btn option {
    color: #222 !important;
    background: #fff !important;
}

#toggle-counts-btn:hover,
#toggle-numbers-btn:hover,
#reset-word-order-btn:hover,
#shuffle-word-order-btn:hover,
#small-undo-btn:hover,
#small-redo-btn:hover,
#fullscreen-undo-btn:hover,
#fullscreen-redo-btn:hover,
#fullscreen-toggle-def-overlay:hover,
#toggle-def-overlay:hover {
    box-shadow:
        0 0 6px 1px #7ca0fd44,
        0 2px 12px 0 #7ca0fd22;
    border-color: #8dc4ff !important;
}

.study-word-box {
    transition:
        transform 0.36s cubic-bezier(0.29, 1.54, 0.46, 0.94),
        box-shadow 0.14s,
        background 0.16s;
    will-change: transform;
}
.study-word-box.moving {
    z-index: 1111;
    box-shadow:
        0 8px 32px #5e99ff40,
        0 2px 18px #736ec860;
    background: #f7f8ff;
}

#topic-search-input {
    width: 185px !important;
    min-width: 100px !important;
    max-width: 245px !important;
    word-break: break-all !important;
    white-space: normal !important;
    display: block;
}
#topics-dropdown-list {
    word-break: break-all !important;
    white-space: normal !important;
}

#topic-search-input,
#topic-dropdown-btn {
    height: 36px !important;
    box-sizing: border-box;
}

#topic-search-input:focus,
#topic-dropdown-btn:focus {
    outline: none !important;
    box-shadow: none !important;
    border-color: #3d4157 !important;
}

#topic-dropdown-btn {
    margin-left: -1px;
}

#topics-dropdown-list > div {
    border-radius: 7px;
    margin: 2px 3px;
    box-sizing: border-box;
    /* add box-shadow only on 'current' or hover, not by default */
}
#topics-dropdown-list > div:hover {
    background: #e9f2ff !important;
    box-shadow:
        0 0 0 2.5px #80bcfa88,
        0 0 5px #3587ef55;
    border-radius: 7px;
}
#topics-dropdown-list > div.current-topic {
    background: #d8ebff !important;
    box-shadow:
        0 0 0 2.5px #1e9af8ab,
        0 0 18px #2196f366;
    border-radius: 7px;
    position: relative;
    z-index: 33;
}
#topics-dropdown-list {
    left: 10px !important;
}
@media (max-width: 500px) {
    #topics-dropdown-list {
        left: 40px !important;
    }
}

.study-topic-label {
    max-width: 320px;
    overflow-wrap: break-word;
    word-break: break-all;
    white-space: normal;
    text-overflow: ellipsis;
    overflow: hidden;
    font-size: 24px;
    font-weight: bold;
    box-sizing: border-box;
}

@media (max-width: 800px) {
    .study-topic-label {
        width: 300px;
        font-size: 23px;
        margin-left: 80px;
    }
    #fullscreen-definition-overlay {
        left: 0 !important;
        width: 100vw !important;
        min-width: 100vw !important;
        max-width: 100vw !important;
        box-sizing: border-box !important;
        margin: 0 !important;
    }
    #fullscreen-overlay-audio-btn-2 {
        top: 15px;
        left: 20px;
    }
}

@media (max-width: 650px) {
    .study-topic-label {
        width: 250px;
        font-size: 19px;
    }
}

@media (max-width: 590px) {
    .study-topic-label {
        width: 200px;
        font-size: 17px;
    }
}

@media (max-width: 540px) {
    .study-topic-label {
        width: 150px;
        font-size: 17px;
    }
}

#topic-dropdown-btn:hover,
#topic-dropdown-btn:focus {
    background: #292b36 !important;
    color: #fff !important;
}

#unstar-all-btn {
    font-size: 1em;
    padding: 8px 0;
    border-radius: 8px;
    border: 1.5px solid #c3c3ec;
    background: #eae7fc;
    color: #483177;
    width: 100%;
    max-width: 220px;
    min-width: 220px;
    box-sizing: border-box;
    font-weight: 500;
    cursor: pointer;
    margin: 0 auto 2px auto;
    display: block;
    transition:
        background 0.13s,
        color 0.14s,
        border 0.13s;
}
#unstar-all-btn:hover {
    box-shadow:
        0 0 6px 1px #ffe97a44,
        0 2px 12px 0 #ffe97a22;
    border-color: #ffe97a !important;
    background: #fffce0;
    color: #7a6100;
}

#unstar-all-row {
    margin-top: 0 !important;
    gap: 0 !important;
    padding: 0 !important;
}

#fullscreen-draw-toolbar-panel,
#fullscreen-toolbar-4square,
#fullscreen-toolbar-dropdown-grid {
    gap: 3px !important;
    row-gap: 4px !important;
}

#fullscreen-toolbar-dropdown-grid > div,
#fullscreen-draw-toolbar-panel > div[style*="flex-direction: column"] {
    margin-top: 0px !important;
}

@media (max-width: 800px) {
    #note-inject-here {
        left: -3px !important;
        position: relative !important;
    }
}

@media (max-width: 500px) {
    #study-header-align {
        flex-direction: column !important;
        align-items: stretch !important;
        width: 100% !important;
        position: relative !important;
        min-width: 0 !important;
        height: auto !important;
    }
    .study-select-container {
        width: 100% !important;
        max-width: 100vw !important;
        min-width: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        margin: 10px 0 0 -35px !important; /* keep */
        padding: 0 12vw 0 12vw !important;
        box-sizing: border-box !important;
        z-index: 11 !important;
    }
    .study-dropdown-parent {
        position: absolute !important;
        right: 0 !important;
        top: 12px !important;
        margin: 0 !important;
        padding-right: 13px !important;
        z-index: 20 !important;
    }
    .study-topic-label {
        position: static !important;
        left: 0 !important;
        top: 0 !important;
        transform: none !important;
        display: block !important;
        margin: 9px 0 0 0 !important; /* tightened space above */
        padding: 0 12vw !important;
        width: 100vw !important;
        max-width: 100vw !important;
        box-sizing: border-box !important;
        overflow-wrap: break-word !important;
        word-break: break-all !important;
        white-space: normal !important;
        text-align: center !important;
        background: none !important;
        z-index: 10 !important;
        font-size: 18px !important;
    }
    #study-header-bar {
        height: 90px !important; /* keep */
        min-height: 90px !important;
        padding-bottom: 0.5em !important;
        position: relative;
    }

    /*Button moving fix START*/

    #draw-toolbar-panel .toolbar-row {
        gap: 30px !important;
    }
    #draw-toolbar-panel .toolbar-item {
        min-width: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        margin-bottom: 0 !important;
        box-sizing: border-box !important;
        flex: 1 1 0 !important;
        max-width: none !important;
    }
    #draw-toolbar-panel .toolbar-label {
        font-size: 12px !important;
        margin-bottom: 2px !important;
        margin-top: 0 !important;
        min-width: 0 !important;
        padding: 0 !important;
    }
    #draw-toolbar-panel select,
    #draw-toolbar-panel button:not(.toolbar-undo-btn):not(.toolbar-redo-btn),
    #draw-toolbar-panel input {
        height: 30px !important;
        min-height: 30px !important;
        width: 50px !important;
        min-width: 50px !important;
        font-size: 10px !important;
        border-radius: 5px !important;
        padding: 0 6px !important;
    }
    #draw-toolbar-panel .toolbar-undo-redo-row button {
        width: 30px !important;
        height: 30px !important;
        min-width: 30px !important;
        min-height: 30px !important;
        font-size: 1.02em !important;
        border-radius: 6px !important;
    }
    #draw-toolbar-panel .toolbar-row {
        align-items: flex-end !important;
    }
    #draw-toolbar-panel .toolbar-item {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: flex-end !important;
        height: 50px !important;
    }

    #draw-toolbar-panel .toolbar-undo-redo-row {
        margin-left: 10px !important; /* shift buttons right */
        gap: 7px !important;
    }
    #draw-toolbar-panel .toolbar-item:last-child .toolbar-label {
        margin-left: -20px !important; /* shift label left */
    }

    #draw-toolbar-panel .toolbar-row button,
    #draw-toolbar-panel .toolbar-row select,
    #draw-toolbar-panel .toolbar-row input {
        margin-left: -8px !important;
    }

    #draw-toolbar-panel {
        padding-bottom: 20px !important;
    }

    /*Button moving fix END*/
}

#settings-dropdown.settings-dropdown-nice {
    max-height: 370px !important;
    overflow-y: auto !important;
}

@media (max-width: 800px) {
    .word-label {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        height: 53px !important;
        min-height: 53px !important;
        max-height: 53px !important;
        display: block !important;
        text-align: center !important;
        margin: 0 auto 7px auto !important;
        align-self: center !important;
        justify-content: center !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        white-space: normal !important;
        scrollbar-width: thin !important;
        scrollbar-color: #aaa #eee !important;
    }
    .word-label::-webkit-scrollbar {
        width: 9px !important;
        background: #eee !important;
    }
    .word-label::-webkit-scrollbar-thumb {
        background: #b6b6c7 !important;
        border-radius: 6px !important;
    }
    .study-word-box > div[style*="flex-direction: column"] {
        transform: scale(1) !important;
        transform-origin: top left !important;
        min-width: 0 !important;
        max-width: none !important;
        height: auto !important;
        margin-left: 0px !important;
        left: 150px;
    }
    .arrow-wrap {
        top: 44px !important;
    }

    #fullscreen-word-label {
        max-width: 92vw !important;
        min-width: 0 !important;
        white-space: normal !important;
        word-break: break-all !important;
        overflow-wrap: break-word !important;
        text-overflow: unset !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        display: block !important;
    }
}

@media (max-width: 750px) {
    .study-word-box > div[style*="flex-direction: column"] {
        left: 125px;
    }
}

@media (max-width: 700px) {
    .study-word-box > div[style*="flex-direction: column"] {
        left: 100px;
    }
}

@media (max-width: 650px) {
    .study-word-box > div[style*="flex-direction: column"] {
        left: 75px;
    }
}

@media (max-width: 600px) {
    .study-word-box > div[style*="flex-direction: column"] {
        left: 50px;
    }
}

@media (max-width: 550px) {
    .study-word-box > div[style*="flex-direction: column"] {
        left: 25px;
    }
}

@media (max-width: 475px) {
    .study-word-box > div[style*="flex-direction: column"] {
        transform: scale(0.9) !important;
        transform-origin: top left !important;
        min-width: 0 !important;
        max-width: none !important;
        height: auto !important;
        margin-left: 18.5px !important;
        left: 10px;
    }
    .arrow-wrap {
        top: 34px !important;
        gap: 30px !important;
    }
    .arrow-wrap button {
        font-size: 1.7em !important;
        width: 24px !important;
        height: 64px !important;
        margin-bottom: 10px !important;
    }
}

@media (max-width: 430px) {
    .study-word-box > div[style*="flex-direction: column"] {
        transform: scale(0.8) !important;
        transform-origin: top left !important;
        min-width: 0 !important;
        max-width: none !important;
        height: auto !important;
        margin-left: 37px !important;
        left: -10px;
    }
    .arrow-wrap {
        top: 40.5px !important;
        gap: 30px !important;
    }
    .arrow-wrap button {
        font-size: 1.7em !important;
        width: 28px !important;
        height: 66px !important;
        margin-bottom: 10px !important;
    }
}

@media (max-width: 390px) {
    .study-word-box > div[style*="flex-direction: column"] {
        transform: scale(0.7) !important;
        transform-origin: top left !important;
        min-width: 0 !important;
        max-width: none !important;
        height: auto !important;
        margin-left: 55px !important;
        left: -30px;
    }
    .arrow-wrap {
        top: 43px !important;
        gap: 40px !important;
    }
    .arrow-wrap button {
        font-size: 1.7em !important;
        width: 32px !important;
        height: 70px !important;
        margin-bottom: 10px !important;
    }
}

@media (max-width: 350px) {
    .study-word-box > div[style*="flex-direction: column"] {
        transform: scale(0.6) !important;
        transform-origin: top left !important;
        min-width: 0 !important;
        max-width: none !important;
        height: auto !important;
        margin-left: 74px !important;
        left: -50px;
    }
    .arrow-wrap {
        top: 49px !important;
        gap: 50px !important;
    }
    .arrow-wrap button {
        font-size: 1.7em !important;
        width: 32px !important;
        height: 70px !important;
        margin-bottom: 10px !important;
    }
}

/*Fullscreen shrink buttons*/

@media (max-width: 500px) {
    #fullscreen-draw-toolbar-panel,
    #fullscreen-toolbar-4square,
    #fullscreen-toolbar-dropdown-grid {
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 1px !important;
        row-gap: 5px !important;
    }
    #fullscreen-draw-toolbar-panel
        button:not(#fullscreen-star-btn):not(.audio-btn),
    #fullscreen-draw-toolbar-panel select,
    #fullscreen-toolbar-4square > button:not(.audio-btn),
    #fullscreen-toolbar-dropdown-grid > *:not(.audio-btn),
    #fullscreen-toggle-def-overlay,
    #fullscreen-undo-btn,
    #fullscreen-redo-btn,
    #fullscreen-word-prev,
    #fullscreen-word-next {
        font-size: 8px !important;
        width: 40px !important;
        min-width: 40px !important;
        max-width: 72px !important;
        height: 24px !important;
        padding: 0 !important;
        margin: 0 !important;
        border-radius: 6px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    #fullscreen-toolbar-4square,
    #fullscreen-toolbar-dropdown-grid {
        width: auto !important;
        min-width: 0 !important;
        max-width: 100vw !important;
    }
    #fullscreen-draw-toolbar-panel > div[style*="flex-direction: column"] {
        flex-direction: row !important;
        align-items: center !important;
        gap: 0px !important;
    }
    #fullscreen-undo-btn,
    #fullscreen-redo-btn {
        position: relative !important;
        top: 16px !important;
    }
    #fullscreen-draw-outer {
        padding-top: 200px !important;
    }
    #fullscreen-word-prev,
    #fullscreen-word-next {
        position: relative !important;
        left: 10px !important;
        bottom: 3px !important;
    }
    #fullscreen-star-btn {
        font-size: 25px !important;
        width: 36px !important;
        height: 24px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin-left: 0 !important;
        margin-right: 8px !important;
        position: relative !important;
        left: -157px !important;
        bottom: 1px !important;
        z-index: 33 !important;
    }
}
/*Align BTNs on very small screen*/
@media (max-width: 439px) {
    #fullscreen-toggle-def-overlay,
    #fullscreen-toggle-def-overlay + div {
        position: relative !important;
        left: 19px !important;
    }
    #fullscreen-word-prev,
    #fullscreen-word-next {
        position: relative !important;
        left: 20px !important;
    }
    #fullscreen-star-btn {
        font-size: 25px !important;
        width: 36px !important;
        height: 24px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin-left: 0 !important;
        margin-right: 8px !important;
        position: relative !important;
        left: -145px !important;
        bottom: 1px !important;
        z-index: 33 !important;
    }
}
