* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; background: #fff; }
body, button, input, select, textarea {
    font-family: "Malgun Gothic", "Apple SD Gothic Neo", Arial, sans-serif;
    letter-spacing: 0;
}
body {
    padding: 0 20px;
    color: #222;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}
button, input, select, textarea { -webkit-tap-highlight-color: transparent; }

#wrap { width: 100%; max-width: 570px; min-height: 100vh; margin: 0 auto; }
#top { width: 100%; height: 45px; }
#middle { width: 100%; height: 305px; margin: 0 0 20px; }
#middle p { margin: 1em 0; font-size: 20px; line-height: 1.5; }
#bottom { width: 100%; min-height: 20px; margin: 20px 0; }

#image_file {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}
.website-field {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

.button {
    width: 100%;
    max-width: 570px;
    height: 50px;
    padding: 10px 21px;
    border: 1px solid #0a3c59;
    border-radius: 4px;
    background: #3e779d;
    background: -webkit-linear-gradient(top, #65a9d7, #3e779d);
    background: linear-gradient(to bottom, #65a9d7, #3e779d);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 1px 2px rgba(0,0,0,.12);
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    text-shadow: 0 1px 0 #386480;
    cursor: pointer;
}
.button:active { background: #3e779d; }

.screen {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(20, 25, 30, .78);
}

.insert_pop {
    display: none;
    position: fixed;
    z-index: 1500;
    top: 50%;
    left: 50%;
    width: 340px;
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - 20px);
    overflow-y: auto;
    border: 1px solid #b9d9ec;
    border-top: 5px solid #3e9bd2;
    border-radius: 10px;
    background: #fff;
    transform: translate(-50%, -50%);
    box-shadow: 0 18px 48px rgba(15, 42, 61, .3);
}

.popup-head {
    position: relative;
    min-height: 78px;
    padding: 15px 18px 13px 84px;
    display: block;
    border-bottom: 1px solid #e4edf3;
    background: #f7fbfe;
}
.popup-head-copy { min-width: 0; flex: 1; }
.popup-head strong,
.popup-head span { display: block; }
.popup-head strong { color: #244b64; font-size: 17px; }
.popup-head span { margin-top: 4px; color: #718796; font-size: 12px; }
.popup-head small { max-width: 220px; margin-top: 3px; display: block; overflow: hidden; color: #526979; font-size: 10px; line-height: 14px; text-overflow: ellipsis; white-space: nowrap; }
.selected-preview { position: absolute; top: 12px; left: 18px; z-index: 2; width: 54px; height: 54px; overflow: hidden; border-radius: 5px; cursor: pointer; }
.popup-head > .selected-preview { top: 50%; transform: translateY(-50%); }
.selected-preview img { width: 54px; height: 54px; display: block; border: 1px solid #d6e1e8; border-radius: 5px; background: #fff; object-fit: contain; object-position: center center; }
.selected-preview:hover img, .selected-preview:focus img { border-color: #3e9bd2; box-shadow: 0 0 0 2px rgba(62,155,210,.18); }
.selected-preview > span { display: none !important; }
#popmiddle { padding: 15px 0 4px; text-align: left; }
#popmiddle .middlediv { margin-right: 18px; margin-left: 18px; }
#popmiddle .null { height: 7px; }
.guide {
    margin-top: 13px !important;
    margin-bottom: 7px !important;
    color: #466579;
    font-size: 12px;
    font-weight: 700;
}
.guide:first-child { margin-top: 0 !important; }

.phone-row {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #8aa0ae;
    white-space: nowrap;
}
.phone-row select,
.phone-row input {
    height: 42px;
    border: 1px solid #cbd9e2;
    border-radius: 7px;
    background: #fff;
    color: #243746;
    font-size: 16px;
    text-align: center;
}
.phone-row select { width: 76px; padding-left: 5px; }
.phone-row input { width: 82px; padding: 4px; }

#customer_name,
#room_name,
#request_note {
    width: 100%;
    border: 1px solid #cbd9e2;
    border-radius: 7px;
    outline: none;
    background: #fff;
    font-size: 18px;
    color: #243746;
    text-align: left;
}
#customer_name,
#room_name { height: 42px; padding: 5px 11px; }
#room_name { margin-top: 7px; }
#request_note {
    height: 90px;
    margin-top: 8px;
    padding: 10px 11px;
    resize: none;
    line-height: 1.35;
}
#customer_name:focus,
#room_name:focus,
#request_note:focus,
.phone-row select:focus,
.phone-row input:focus { border-color: #3e9bd2; box-shadow: 0 0 0 1px #b8def4; }

.option-box {
    min-height: 38px;
    margin-top: 5px !important;
    padding: 6px 8px;
    border: 0;
    border-top: 1px solid #dfe8ee;
    border-bottom: 1px solid #dfe8ee;
    border-radius: 0;
    background: #f8fbfd;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: center;
    column-gap: 8px;
    white-space: nowrap;
}
.option-box label {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #344e60;
    font-size: 14px;
    cursor: pointer;
}
.option-box input { width: 16px; height: 16px; margin: 0; accent-color: #3e9bd2; }

#popbottom { padding: 12px 18px 17px; display: flex; align-items: center; justify-content: center; }
.button1 {
    width: 100%;
    height: 46px;
    padding: 8px 20px;
    border: 1px solid #327faa;
    border-radius: 7px;
    background: #3e9bd2;
    background: -webkit-linear-gradient(top, #55a9d9, #3e8fbe);
    background: linear-gradient(to bottom, #55a9d9, #3e8fbe);
    box-shadow: 0 2px 5px rgba(62,155,210,.25);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    text-shadow: 0 1px 0 rgba(25,83,116,.55);
    cursor: pointer;
}
.button1:active { background: #367fa9; }
.button1:disabled { opacity: .55; }

.upload_msg_pop {
    display: none;
    position: fixed;
    z-index: 1600;
    top: 50%;
    left: 50%;
    width: 230px;
    padding: 28px 20px;
    border: 3px solid #3e9bd2;
    background: #fff;
    text-align: center;
    transform: translate(-50%, -50%);
}
.upload_msg_pop strong,
.upload_msg_pop span { display: block; }
.upload_msg_pop strong { margin-top: 15px; font-size: 18px; }
.upload_msg_pop span { margin-top: 5px; color: #555; font-size: 15px; }
.loading-spinner {
    width: 58px;
    height: 58px;
    margin: 0 auto;
    border: 7px solid #dcecf5;
    border-top-color: #3e9bd2;
    border-radius: 50%;
    animation: loading-spin .8s linear infinite;
}
@keyframes loading-spin { to { transform: rotate(360deg); } }

@media (max-width: 340px) {
    body { padding-right: 12px; padding-left: 12px; }
    #middle p { font-size: 18px; }
    .insert_pop { width: calc(100vw - 20px); }
    #popmiddle .middlediv { margin-right: 14px; margin-left: 14px; }
    .popup-head { padding-right: 14px; padding-left: 14px; }
    .phone-row select { width: 70px; }
    .phone-row input { width: 72px; }
}

@media (max-height: 620px) {
    .insert_pop { top: 10px; transform: translateX(-50%); }
}
