* { box-sizing: border-box; font-family: sans-serif; }
body { background-color: #f7f9fa; color: #333; margin: 0; padding: 10px; display: flex; flex-direction: column; align-items: center; }
.container { width: 100%; max-width: 600px; background: #ffffff; padding: 10px; border-radius: 10px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05); }
h1 { font-size: clamp(16px, 11px + 1.48vw, 28px); color: #2c3e50; text-align: center; white-space: nowrap; margin: 0px 10px 10px 10px; }
h2 { font-size: clamp(13px, 8.00px + 1.56vw, 20px); color: #2c3e50; }
.alert { padding: 12px; border-radius: 8px; margin-bottom: 15px; font-size: 14px; font-weight: bold; text-align: center; }
.alert-success { background-color: #e8f5e9; color: #2e7d32; border: 1px solid #c8e6c9; }
.alert-danger { background-color: #ffebee; color: #c62828; border: 1px solid #ffcdd2; }
.form-group { margin-bottom: 10px; }
.form-group label { display: block; font-size: 12px; font-weight: bold; color: #666; margin-bottom: 4px; }
input[type="text"], input[type="email"], input[type="password"] { width: 100%; padding: 12px; box-sizing: border-box; border: 1px solid #ccc; border-radius: 8px; font-size: 15px; background-color: #fafafa; transition: border-color 0.2s, background-color 0.2s; }
input[type="text"]:focus, input[type="email"]:focus, input[type="password"]:focus { border-color: #4caf50; background-color: #ffffff; outline: none; }
button, .btn { display: block; width: 100%; padding: 12px 6px; line-height: 1.2; vertical-align: middle; box-sizing: border-box; border: none; border-radius: 8px; font-size: 16px; font-weight: bold; cursor: pointer; text-align: center; text-decoration: none; transition: opacity 0.2s; }
button:hover, .btn:hover { background: #357837; opacity: 0.85; }
button[type="submit"] { background-color: #4caf50; color: #ffffff; box-shadow: 0 3px 6px rgba(76, 175, 80, 0.2); }
.btn-danger { background-color: #ff5722; color: #ffffff; }
.btn-secondary { background-color: #e0e0e0; color: #444444; }
.btnx { margin-top: 10px; }
.cal-header { display: flex; justify-content: space-between; align-items: center; background-color: #f7f9f6; padding: 10px; border-radius: 10px; margin-bottom: 15px; }
.cal-title { text-align: center; font-size: 14px; font-weight: bold; color: #444; line-height: 1.4; }
.cal-btn { text-decoration: none; color: #ffffff; font-weight: bold; padding: 6px 12px; border: 1px solid #4caf50; border-radius: 6px; background-color: #3498db; font-size: 13px; transition: background-color 0.2s; }
.cal-btn:hover { background-color: #076eb3; }
.calendar-table { width: 100%; border-collapse: collapse; table-layout: fixed; margin-bottom: 15px; }
.calendar-table th { padding: 8px 0; font-size: 12px; background-color: #f5f5f5; border: 1px solid #e0e0e0; text-align: center; color: #555; }
.calendar-table td { position: relative; height: 110px; border: 1px solid #e0e0e0; text-align: center; vertical-align: top; padding: 0; box-sizing: border-box; }
.calendar-table td.sunday { background-color: #fbe9e7; }
.calendar-table td.saturday { background-color: #e1f5fe; }
.day-num { position: absolute; top: 2px; left: 4px; font-size: 12px; font-weight: 700; z-index: 4; pointer-events: none; }
.calendar-table td.sunday .day-num { color: #d32f2f; }
.calendar-table td.saturday .day-num { color: #0288d1; }
.time-slot-container { display: flex; flex-direction: column; width: 100%; height: 100%; padding-top: 18px; box-sizing: border-box; }
.time-slot-item { position: relative; flex: 1; display: flex; align-items: center; justify-content: center; border-top: 1px dashed #eee; box-sizing: border-box; z-index: 1; }
.time-slot-container .time-slot-item:first-child { border-top: none; }
.day-checkbox { position: absolute; width: 100% !important; height: 100% !important; top: 0 !important; left: 0 !important; margin: 0 !important; padding: 0 !important; opacity: 0 !important; cursor: pointer !important; z-index: 10 !important; display: block !important; -webkit-appearance: checkbox !important; }
.slot-label { font-size: 10px; color: #888; font-weight: bold; z-index: 1; pointer-events: none; margin-right: 4px; vertical-align: middle; }
.icon-wrap { display: inline-block; vertical-align: middle; z-index: 1; pointer-events: none; }
.kusuri-icon { width: 16px !important; height: 16px !important; object-fit: contain; opacity: 0.10; transform: scale(0.9); transition: opacity 0.2s, transform 0.2s; }
.time-slot-item:has(.day-checkbox:checked) { background-color: #e8f5e9 !important; }
.day-checkbox:checked + .icon-wrap .kusuri-icon { opacity: 1.0 !important; transform: scale(1.15) !important; }
.day-checkbox:checked ~ .slot-label { color: #2e7d32 !important; }
.toggle-switch-area { background: #fcfcfc; border: 1px dashed #ccc; padding: 10px; border-radius: 5px; margin-top: 20px; }
#pass_toggle { -webkit-appearance: none; appearance: none; width: 40px; height: 22px; background-color: #ccc; border-radius: 11px; position: relative; cursor: pointer; outline: none; transition: background-color 0.2s; }
#pass_toggle:checked { background-color: #4caf50; }
#pass_toggle::before { content: ""; position: absolute; width: 18px; height: 18px; background-color: #ffffff; border-radius: 50%; top: 2px; left: 2px; transition: transform 0.2s; }
#pass_toggle:checked::before { transform: translateX(18px); }
.footer-actions { margin-top: 10px; border-top: 1px solid #eee; padding-top: 15px; display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; }
.footer-actions .btn, .footer-actions button { margin: 0; }
.footer-actions form { margin: 0; width: 100%; }
@media screen and (min-width: 1024px) {
    .container { max-width: 800px; padding: 25px; }
    .calendar-table td { height: 130px; }
    .slot-label { font-size: 12px; }
}
@media (min-width: 835px) and (max-width: 1023px) {
    .container { zoom: 1.2; max-width: 750px; padding: 20px; }
    .calendar-table td { height: 120px; }
    .slot-label { font-size: 11px; }
}
@media (min-width: 744px) and (max-width: 834px) {
    .container { zoom: 1.3; max-width: 700px; padding: 18px; }
    .calendar-table td { height: 115px; }
}
@media (min-width: 541px) and (max-width: 743px) {
    .container { zoom: 1.2; max-width: 520px; padding: 15px; }
    .calendar-table td { height: 110px; }
}
@media (min-width: 441px) and (max-width: 540px) {
    body { padding: 8px; }
    .container { max-width: 100%; padding: 12px; }
    .calendar-table td { height: 105px; }
    .slot-label { font-size: 9.5px; }
}
@media (min-width: 391px) and (max-width: 440px) {
    body { padding: 6px; }
    .container { padding: 10px; }
    .calendar-table th { padding: 6px 0; font-size: 11px; }
    .calendar-table td { height: 100px; }
    .slot-label { font-size: 9px; margin-right: 2px; }
    .kusuri-icon { width: 14px !important; height: 14px !important; }
}
@media (min-width: 381px) and (max-width: 390px) {
    body { padding: 5px; }
    .container { padding: 8px; }
    .calendar-table th { font-size: 10.5px; }
    .calendar-table td { height: 95px; }
    .day-num { top: 1px; left: 2px; font-size: 11px; }
    .slot-label { font-size: 8.5px; margin-right: 1px; }
    .kusuri-icon { width: 13px !important; height: 13px !important; }
}
@media (min-width: 375px) and (max-width: 380px) {
    body { padding: 4px; }
    .container { padding: 8px; border-radius: 8px; }
    .cal-header { padding: 8px; margin-bottom: 10px; }
    .cal-title { font-size: 12px; }
    .cal-btn { padding: 4px 8px; font-size: 11px; }
    .calendar-table th { font-size: 10px; padding: 4px 0; }
    .calendar-table td { height: 90px; }
    .day-num { top: 1px; left: 2px; font-size: 10.5px; }
    .time-slot-container { padding-top: 15px; }
    .slot-label { font-size: 8px; margin-right: 1px; }
    .kusuri-icon { width: 12px !important; height: 12px !important; }
}
@media (max-width: 374px) {
    body { padding: 2px; }
    .container { padding: 6px; border-radius: 6px; }
    .cal-header { padding: 6px; margin-bottom: 8px; flex-direction: column; gap: 5px; }
    .cal-title { font-size: 11px; }
    .cal-btn { padding: 4px 6px; font-size: 10px; width: 100%; text-align: center; }
    .calendar-table th { font-size: 9px; padding: 4px 0; }
    .calendar-table td { height: 85px; }
    .day-num { top: 1px; left: 2px; font-size: 10px; }
    .time-slot-container { padding-top: 14px; }
    .slot-label { font-size: 7.5px; margin-right: 0px; }
    .kusuri-icon { width: 11px !important; height: 11px !important; }
    .alert { padding: 8px; font-size: 12px; }
}
