html {
    transform-origin: center center;
    transform: scale(1); 
}
body {
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    color:#36364A;
    background-color: #f0f0f0;
}
#app {
    margin-top: 8px;
    margin-bottom: 8px;
    user-drag: none;
    -webkit-user-drag: none;
    -moz-user-select: none;
    -ms-user-select: none; /* IE 10+ */
    -moz-user-select: -moz-none;
    -khtml-user-select: none;
    -webkit-user-select: none;
    user-select: none;
    transition: transform 0.25s ease-out;
}
#canvas-container {      
    position: relative;
    cursor: none !important;
}
canvas {
    top: 0;
    left: 0;
}
.rakugaki_canvas {
    border: 1px solid #505050;
    position: absolute;
}
#cursor {
    position: absolute;
    pointer-events: none;
    border-width: 2px;
    border-style: solid;
    border-color: #FFF;
    border-radius: 50%;
    mix-blend-mode: difference;
}
#controls-top {
    position: relative;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    max-width: 720px;
}
.top-center-status {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
    white-space: pre;
    font-size: 16px;
    color: #AAAAAA;
    letter-spacing: 0.08rem;
    z-index: 1;
}

#drawing-status-label {
    pointer-events: auto;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 0;
    font: inherit;
    color: inherit;
}
.top-left-buttons {
    display: flex;
    gap: 0px;
}
.top-right-buttons {
    display: flex;
    margin-left: auto;
}
#controls_bottom {
    margin-top: 24px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0px;
    max-width: 750px;
}
#logo-button-container {
    margin-top: 40px;
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 0px;
    justify-content: center;
}
#hashtag-line {
    height: 24px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0px;
}
#hashtag-text {
    font-size: 20px;
    color: #AAAAAA;
    letter-spacing: 0.4rem;
    margin-left: 20px;
    text-align: center;
} 
#message-line {
    display: none;
    height: 24px;
    font-size: 20px;
    font-weight: bold;
    color: #AAAAAA;
    letter-spacing: 0.1rem;
    justify-content: center;
    text-align: center;
    margin-left: 16px;
}
button {
    cursor: pointer;
}     
.paint-tool-button {
    height: 42px;
    width: 42px;
    border: 1px solid #36364A;
    border-radius: 4px;
}
.paint-tool-icon {
    height: 100%;
    width: 100%;
}
.color-brush-button {
    height: 42px;
    width: 42px;
    border: 1px solid #36364A;
    border-radius: 4px;
}
#black-pen-button {
    display: flex;
    justify-content: center; 
    align-items: center;
    margin-right: 4px;
    padding: 6px 6px 6px 6px;
    background-color: #36364A;
}     
#black-eraser-button {        
    background-color: #F9F9F9;    
    display: flex;
    justify-content: center; 
    align-items: center;
    padding: 6px 6px 6px 6px;
    margin-right: 16px;
}
#color-eraser-button {
    background-color: #F2EEE6;    
    display: flex;
    justify-content: center; 
    align-items: center;
    padding: 6px 6px 6px 6px;
    margin-left: 4px;
    margin-right: 16px;
}
#undo-button {
    height: 42px;
    width: 42px;
    display: flex;
    justify-content: center; 
    align-items: center;
    border: 0px solid #36364A;
    border-radius: 4px;
    background-color: #f0f0f0;
    padding: 6px;
}
#undo-button:disabled{
    outline: 0px solid #36364A;
} 
#undo-button:hover{
    background-color: #E0E0E0;
}
#undo-button:active{
    padding: 7px;
}
.controls-top-button {
    display: flex;
    justify-content: center; 
    align-items: center;
    height: 32px;
    width: 32px;
    border: 0px solid #36364A;
    border-radius: 4px;
    background-color: #f0f0f0;
    padding: 4px;
    color: #36364A;
}
.controls-top-button:hover{
    background-color: #E0E0E0;
}
.controls-top-button:active{
    opacity: 0.8;
    padding: 5px;
}
.logo-button {
    justify-content: center; 
    align-items: center;
    border: 0px solid #36364A;
    border-radius: 4px;
    background-color: #f0f0f0;
    height: 48px;
    width: 48px;
    margin-left: 4px;
    margin-right: 4px;
    padding: 0px 0px 1px 0px;
}
.copy-hashtag-button {
    display: flex;
    justify-content: center; 
    background-color: #f0f0f0;
    height: 16px;
    width: 16px;
    border:0px;
} 
.copy-hashtag-button .icon{
    opacity: 0;
    height: 100%
} 
.copy-hashtag-button:hover .icon{    
    opacity: 0.3;
} 
.active {
    outline: 3px solid #000000;
    position: relative;
    top: -16px;
    z-index: 10;
    border-radius: 50%;
}
#tool-size {
    width: 88px;
    margin-right: 24px;
    margin-left: 24px;
    vertical-align: middle;
}
#opacity {
    position: relative;
    width: 10px;
    height: 40px;
    vertical-align: middle;
    writing-mode: vertical-lr;
    direction: rtl;
    margin-right: 4px;
}
#palette {
    position: relative;
    top: 12px;
    width: 20px;
    height: 30px;
    cursor: pointer;
    border: 1px solid #36364A;
    border-radius: 4px;
}
#progress-bar-line{
    margin-top: 2px;
    display: flex;
    justify-content: center; 
    visibility: hidden;
}
#progress-bar{
    width: 200px; 
}
#manual-container {
    margin-top: 16px;
    margin-bottom: 16px;
}
#manual-content {
    position: relative;
    width: 720px;
    margin-bottom: 16px;
    color: #36364A;
    border: 1px solid #505050;
    background-color: #F2EEE6;
    box-sizing:border-box;
    padding: 32px 64px;
}
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}
.modal-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgb(18, 18, 21);
    padding: 20px;
    padding-top: 16px;
    border-radius: 4px;
    width: 360px;
    max-height: 90vh;
    user-drag: none;
    -webkit-user-drag: none;
    -moz-user-select: none;
    -ms-user-select: none; /* IE 10+ */
    -moz-user-select: -moz-none;
    -khtml-user-select: none;
    -webkit-user-select: none;
    user-select: none;
}
.dialog-title-container {
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.close-dialog-button{
    background-color: rgb(18, 18, 21);
    color: #9C9CC9;
    justify-content: center; 
    align-items: center;
    height: 32px;
    width: 32px;
    border: 0px solid #36364A;
    font-size: 24px;
}
.close-dialog-button:hover{
    color: #FFFFFF;
}
#destination-server-reset-button {
    height: initial;
    width: initial;
    margin-left:auto;
    padding: 8px;
    justify-content: center; 
    align-items: center;
    font-size: 16px;
    color: #DDD9E8;
    border: 0px solid #36364A;
    background-color: rgb(41, 41, 56);
    border-radius: 4px;
}
#destination-server-select {
    width: 240px;
    height: 42px;
    border: 0px solid #ddd;
    border-radius: 4px;
    background-color: rgb(41, 41, 56);
    text-align-last: center;
    font-size: 16px;
    font-weight: bold;    
    color: #DDD9E8;
    cursor: pointer;
}
.desitination-server-auth-button {
    padding: 0px;
    width: 80px;
    height: 42px;
    background-color: #6364ff;
    color: white;
    font-size: 16px;
    font-weight: bold;    
    border: none;
    border-radius: 4px;
}
.desitination-server-auth-button:disabled {
    background-color: #9999ff;
    cursor: wait;
}
.destination-server-setting-toggle-button {
    padding: 0px;
    margin-left:4px;
    margin-right: 4px;
    width: 21px;
    height: 42px;
    background-color: rgb(41, 41, 56);;
    color: #DDD9E8;
    font-size: 16px; 
    border: none;
    border-radius: 4px;
}
#destination-server-url-input {
    width: 240px;
    height: 42px;
    padding: 0px;
    border: 0px solid #ddd;
    border-radius: 4px;
    background-color: rgb(41, 41, 56);
    text-align-last: center;
    font-size: 16px;   
    color: #DDD9E8;
    cursor: text;
}

.preview-img-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 360px;
    height: 360px;
    overflow: hidden;
    border-radius: 8px;
    margin:auto
}
#preview-img {
    border-radius: 8px;
    border: 0px solid  rgb(18, 18, 21);
}

textarea {
    margin-bottom: 8px;
    margin-top: 8px;
    width: 344px;
    padding: 8px;
    background-color: rgb(41, 41, 56);
    border: 0px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    color: #DDD9E8;
    resize: vertical;
    font-family: inherit;
}
#visibility-select {
    width: 48px;
    height: 32px;
    border: 0px solid #ddd;
    border-radius: 4px;
    padding: 4px;
    background-color: rgb(41, 41, 56);
    font-size: 16px;
    color: #DDD9E8;
    cursor: pointer;
}
.select-container {
    display: flex;
    justify-content: space-between;
}
input[type="checkbox"] {
    display: none;
}
.checkbox-label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 24px;
    margin-left: 8px;
    margin-right: 0px;
    cursor: pointer;
    padding: 4px;
    color: #505050;
    font-size: 16px;
    border: 0px solid #ddd;
    border-radius: 4px;
    background-color: rgb(41, 41, 56);
    filter: grayscale();
}
#is-sensitive-checkbox:checked + .checkbox-label,
#add-url-checkbox:checked + .checkbox-label,
#add-drawing-status-checkbox:checked + .checkbox-label {
    background-color:#6364ff;
    color:#EBECFF;
    filter: none;
}
.submit-button {
    padding: 0px;
    width: 90px;
    height: 42px;
    margin-left: auto;
    background-color: #6364ff;
    color: white;
    font-size: 16px;
    font-weight: bold;    
    border: none;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}
.submit-button:hover {
    background-color: #563ACC;
}
.submit-button:disabled,
#timelapse-export-button {
    width: 120px;
}
#timelapse-export-button:disabled {
    background-color: #8a8a8a;
    color: #e0e0e0;
    cursor: default;
    pointer-events: none;
    opacity: 0.8;
}
#timelapse-preview-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 360px;
    height: 480px;
    border: 0px solid #cfc;
    margin-top: 0px;
    margin-bottom: 16px;
    margin-left: auto;
    margin-right: auto; 
}
#timelapse-preview-canvas {
    position: static;
    display: block;
    width: 360px;
    height: 480px;
    border-radius: 8px;
    border: 0px solid  rgb(18, 18, 21);
    background-color: #fff;
}
#timelapse-fps-select {
    width: 96px;
    height: 42px;
    border: 0px solid #ddd;
    border-radius: 4px;
    background-color: rgb(41, 41, 56);
    font-size: 16px;
    color: #DDD9E8;
    font-weight: bold;
    cursor: pointer;
}

.timelapse-text {
    font-size: 14px; 
    color: #9e9ba7;
}

/* スマートフォン向けの調整（画面幅が480px以下の場合） */
@media screen and (max-width: 480px) {
    .controls-top-button {
        height: 64px; 
        width: 64px;  
        padding: 8px; 
    }
}