@import url('/assets/fonts.css');

:root {
  font-family: Inter, 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  color: #1d2e44;
  background: #f6f9fc;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --blue: #168fe0;
  --blue-deep: #1265a8;
  --orange: #f69529;
  --ink: #1d2e44;
  --muted: #8191a3;
  --line: #e7edf2;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body { min-width: 320px; min-height: 100vh; margin: 0; display: flex; flex-direction: column; background: linear-gradient(180deg, #fff 0%, #f8fbfd 44%, #f6f9fc 100%); -webkit-font-smoothing: antialiased; }
body::before { position: fixed; z-index: 0; inset: 0; pointer-events: none; content: ''; opacity: .35; background-image: radial-gradient(#a2bed533 .65px, transparent .65px); background-size: 21px 21px; mask-image: linear-gradient(#0005, transparent 65%); }
button, input, select { font: inherit; }
button { border: 0; cursor: pointer; color: inherit; }
a { color: inherit; text-decoration: none; }
svg { display: block; width: 20px; height: 20px; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
img { display: block; }
[hidden] { display: none !important; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #73bdf1; outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

.site-header { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; width: min(1190px, calc(100% - 88px)); height: 136px; margin: 0 auto; border-bottom: 1px solid #e8edf2; }
.brand { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 90px; }
.brand-logo { position: relative; z-index: 31; padding: 0; background: transparent; touch-action: none; user-select: none; }
.brand-logo img { width: 82px; height: 82px; object-fit: contain; mix-blend-mode: multiply; }
.brand-logo.ready img { filter: drop-shadow(0 5px 12px #176ba344); }
.brand-logo.dragging { opacity: .9; cursor: grabbing; }
.brand-name { font-size: 15px; font-weight: 750; letter-spacing: 2px; }
.emergency-contact { display: flex; align-items: center; gap: 13px; padding: 10px 16px 10px 13px; border: 1px solid #f2e4d5; border-radius: 10px; background: #fffdfa; transition: border-color .2s, transform .2s, box-shadow .2s; }
.emergency-contact:hover { transform: translateY(-2px); border-color: #e8bf93; box-shadow: 0 8px 18px #763e1010; }
.phone-icon { display: grid; width: 35px; height: 35px; place-items: center; border-radius: 9px; color: #d87523; background: #fff0df; }
.phone-icon svg { width: 17px; height: 17px; }
.emergency-contact > span:nth-child(2) { display: flex; flex-direction: column; gap: 2px; }
.emergency-label { color: #8792a1; font-size: 11px; letter-spacing: .35px; }
.emergency-contact strong { color: #ad5e21; font-size: 16px; font-weight: 700; letter-spacing: 1.15px; }
.contact-arrow { margin-left: 10px; color: #c5a487; }
.contact-arrow svg { width: 15px; height: 15px; }

main { position: relative; z-index: 1; flex: 1; width: min(1010px, calc(100% - 56px)); margin: 0 auto; }
.home-view { padding: 82px 0 55px; }
.home-intro { margin-bottom: 42px; text-align: center; }
.home-intro h1 { margin: 0; color: #173750; font-size: clamp(37px, 5.3vw, 55px); font-weight: 730; letter-spacing: 1.3px; line-height: 1.35; }
.home-intro h1 span { color: var(--blue); }
.home-intro p { margin: 14px 0 0; color: #8593a2; font-size: 15px; letter-spacing: .8px; }
.service-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; max-width: 790px; margin: 0 auto; }
.service-tile { position: relative; display: flex; min-height: 320px; aspect-ratio: 1.1; flex-direction: column; justify-content: space-between; overflow: hidden; padding: 26px 29px 23px; border: 1px solid #e4edf4; border-radius: 16px; background: #fff; text-align: left; box-shadow: 0 10px 30px #193d5510; transition: transform .28s var(--ease), box-shadow .28s, border-color .28s; }
.service-tile:hover { transform: translateY(-5px); border-color: #beddf2; box-shadow: 0 18px 38px #193d5517; }
.clinic-tile { --tile-color: #168fe0; --tile-pale: #e9f5fd; }
.field-tile { --tile-color: #e88224; --tile-pale: #fff2e6; }
.tile-top, .tile-bottom { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; }
.tile-number { color: #95a1ae; font-size: 10px; font-weight: 600; letter-spacing: 1.5px; }
.tile-symbol { display: grid; width: 43px; height: 43px; place-items: center; border-radius: 12px; color: var(--tile-color); background: var(--tile-pale); }
.tile-symbol svg { width: 22px; height: 22px; }
.tile-copy { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 9px; margin-top: auto; margin-bottom: 31px; }
.tile-copy strong { color: #223d53; font-size: 35px; font-weight: 700; letter-spacing: 3px; }
.tile-copy small { color: #8491a0; font-size: 13px; letter-spacing: .3px; }
.tile-bottom { padding-top: 16px; border-top: 1px solid #edf1f5; color: #718399; font-size: 11px; letter-spacing: .5px; }
.tile-arrow { display: grid; width: 31px; height: 31px; place-items: center; border: 1px solid #e9eef2; border-radius: 50%; color: var(--tile-color); transition: transform .22s var(--ease), background .2s; }
.tile-arrow svg { width: 16px; height: 16px; }
.service-tile:hover .tile-arrow { transform: translateX(3px); background: var(--tile-pale); }
.tile-watermark { position: absolute; right: -7px; bottom: 24px; opacity: .045; color: var(--tile-color); transform: rotate(-12deg); }
.tile-watermark svg { width: 118px; height: 118px; stroke-width: 1.05; }
.home-note { display: flex; align-items: center; justify-content: center; gap: 9px; margin-top: 35px; color: #92a1af; font-size: 12px; letter-spacing: .5px; }
.home-note svg { width: 16px; height: 16px; color: #67a7cc; }

.schedule-view { padding: 28px 0 53px; }
.back-button { display: flex; align-items: center; gap: 7px; padding: 7px 0; background: transparent; color: #76879a; font-size: 12px; }
.back-button:hover { color: var(--blue-deep); }
.back-button svg { width: 17px; height: 17px; }
.schedule-heading { display: flex; align-items: end; justify-content: space-between; margin: 21px 0 20px; }
.schedule-heading h1 { margin: 0; color: #173750; font-size: 34px; letter-spacing: 1px; }
.schedule-heading p { margin: 7px 0 0; color: #8b98a6; font-size: 13px; }
.service-switch { display: inline-flex; padding: 4px; border: 1px solid #e8edf2; border-radius: 9px; background: #f1f5f8; }
.service-switch button { min-width: 59px; padding: 7px 13px; border-radius: 6px; color: #718093; background: transparent; font-size: 12px; }
.service-switch button.active { color: #1978bb; background: #fff; box-shadow: 0 1px 5px #203b5214; }
.notice { display: flex; align-items: center; gap: 11px; margin: 0 0 21px; padding: 13px 16px; border: 1px solid #f2e1ca; border-radius: 9px; background: #fffaf3; color: #9b6e3a; }
.notice svg { width: 17px; height: 17px; flex: 0 0 auto; color: #cf8635; }
.notice p { margin: 0; font-size: 12px; line-height: 1.7; }
.roster-topline { display: flex; align-items: end; justify-content: space-between; padding: 0 1px 12px; }
.roster-topline > div { display: flex; align-items: baseline; gap: 11px; }
.roster-topline strong { color: #2b4358; font-size: 15px; font-weight: 650; }
.roster-topline > div span, #date-range { color: #9aa6b2; font-size: 11px; }
.roster-table-wrap { overflow: hidden; border: 1px solid #e6edf2; border-radius: 11px; background: #fff; box-shadow: 0 5px 20px #2441580a; }
.roster-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.roster-table .date-col { width: 33%; }
.roster-table .add-col { width: 17%; }
.roster-table thead { background: #f5f8fa; }
.roster-table th { height: 42px; padding: 0 17px; border-bottom: 1px solid #e7edf2; color: #8996a3; font-size: 10px; font-weight: 600; letter-spacing: .8px; text-align: left; }
.roster-table td { height: 43px; padding: 4px 17px; border-bottom: 1px solid #edf1f4; vertical-align: middle; }
.roster-table tr:last-child td { border-bottom: 0; }
.roster-table tbody tr { transition: background .15s; }
.roster-table tbody tr:hover { background: #fafdff; }
.slot-date { display: inline-block; min-width: 137px; color: #40556a; font-size: 12px; font-weight: 570; }
.slot-period { display: inline-block; min-width: 37px; color: #81909e; font-size: 11px; }
.add-cell { text-align: left; }
.add-entry { display: grid; width: 27px; height: 27px; place-items: center; border: 1px solid #dbeaf5; border-radius: 7px; color: #1887d2; background: #f2f9fd; transition: transform .18s, background .18s, border-color .18s; }
.add-entry:hover { transform: scale(1.06); border-color: #a9d5f2; background: #e6f5ff; }
.add-entry:disabled { cursor: wait; opacity: .45; }
.entry-list { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 3px 0; }
.entry-chip { max-width: 100%; overflow-wrap: anywhere; }
.entry-chip > span { min-width: 0; }
.entry-chip > svg { flex-shrink: 0; }
.day-start:not(:first-child) td { border-top: 1px solid #dce6ed; }
.add-entry svg { width: 15px; height: 15px; }
.booked-label { display: inline-flex; align-items: center; gap: 5px; color: #66a181; font-size: 10px; }
.booked-label svg { width: 14px; height: 14px; }
.entry-chip { display: inline-flex; align-items: center; gap: 9px; min-height: 29px; padding: 3px 9px; border: 1px solid #e4edf2; border-radius: 7px; color: #354b5e; background: #f8fbfd; font-size: 12px; text-align: left; }
.entry-chip.editable { transition: border-color .18s, background .18s; }
.entry-chip.editable:hover { border-color: #b7d8ed; background: #eff8fe; }
.entry-chip svg { width: 13px; height: 13px; color: #8496a6; }
.entry-class { color: #3282b4; font-size: 11px; }
.empty-entry { color: #c0cad2; font-size: 11px; }
.table-foot { display: flex; align-items: center; justify-content: space-between; height: 39px; padding: 0 16px; border-top: 1px solid #e9eef2; color: #9aa5b0; background: #fafcfd; font-size: 10px; }
.status-dot { display: inline-block; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: #69b38d; vertical-align: 1px; }
.table-note { margin: 12px 1px 0; color: #96a2ad; font-size: 11px; }
.table-note span { color: var(--blue); font-weight: 700; }
.admin-bar { display: flex; align-items: center; justify-content: space-between; margin: -7px 1px 13px; color: #49846c; font-size: 11px; }
.admin-bar > span { display: flex; align-items: center; gap: 6px; }
.admin-bar svg { width: 14px; height: 14px; }
.admin-bar button { padding: 5px 9px; border: 1px solid #dcebe2; border-radius: 6px; color: #74877c; background: #fff; font-size: 10px; }
.connection-message { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 15px; padding: 10px 13px; border: 1px solid #f2e1ca; border-radius: 7px; color: #9b6e3a; background: #fffaf3; font-size: 11px; }
.connection-message button { color: #1978bb; background: transparent; font-size: 11px; white-space: nowrap; }

.site-footer { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; width: min(1190px, calc(100% - 88px)); min-height: 66px; margin: auto auto 0; border-top: 1px solid #e6edf2; color: #98a3ae; font-size: 10px; letter-spacing: .3px; }
.site-footer > span:first-child { color: #61778b; font-size: 11px; font-weight: 650; }
.footer-slash { padding: 0 8px; color: #c3cdd6; font-weight: 400; }
.footer-domain { color: #9cabb8; font-weight: 450; }
#today-label { color: #718398; }
.byline { color: #718398; font-size: 10px; letter-spacing: .4px; }

.drag-target { position: fixed; z-index: 25; right: max(35px, calc((100vw - 1190px) / 2)); top: 20px; width: 190px; height: 82px; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 4px; border: 1.5px dashed #78b8df; border-radius: 12px; color: #318ac2; background: #f4fbff; box-shadow: 0 7px 22px #235a8017; pointer-events: none; animation: appear .2s var(--ease); }
.dragging-logo { position: fixed; z-index: 40; width: 54px; height: 54px; pointer-events: none; opacity: .85; filter: drop-shadow(0 5px 8px #176ba344); }
.drag-target svg { width: 18px; height: 18px; }
.drag-target > span:nth-child(2) { font-size: 11px; }
.drag-target small { color: #8aabba; font-size: 9px; }
.drag-target.hover { transform: scale(1.04); border-color: #188cdb; background: #e4f5ff; }

.modal { width: 390px; max-width: calc(100% - 32px); padding: 0; overflow: visible; border: 1px solid #e5ebef; border-radius: 16px; color: var(--ink); box-shadow: 0 20px 75px #17344e28; }
.modal[open] { animation: appear .22s var(--ease); }
.modal::backdrop { background: #172f4355; backdrop-filter: blur(5px); }
.modal-content { position: relative; padding: 30px; }
.modal-close { position: absolute; top: 13px; right: 13px; display: grid; width: 31px; height: 31px; place-items: center; border-radius: 7px; color: #8997a4; background: transparent; }
.modal-close:hover { color: #3b556a; background: #f1f5f8; }
.modal-close svg { width: 16px; height: 16px; }
.modal-mark { display: grid; width: 43px; height: 43px; margin-bottom: 18px; place-items: center; border-radius: 11px; color: #188cda; background: #eaf5fc; }
.modal-mark svg { width: 20px; height: 20px; }
.modal h2 { margin: 0 0 7px; color: #213c51; font-size: 22px; letter-spacing: .4px; }
.modal-description { margin: 0 0 21px; color: #8996a3; font-size: 12px; line-height: 1.7; }
.modal-content label { display: block; margin: 12px 0 7px; color: #728191; font-size: 11px; }
.modal-content input, .modal-content select { width: 100%; height: 43px; padding: 0 12px; border: 1px solid #dfe7ed; border-radius: 7px; outline-offset: 1px; color: #30495e; background: #fff; font-size: 13px; }
.modal-content input::placeholder { color: #b2bdc6; }
.form-error { margin: 10px 0 0; padding: 9px 11px; border-radius: 6px; color: #ae5154; background: #fff3f2; font-size: 11px; line-height: 1.6; }
.submit-button { display: flex; align-items: center; justify-content: space-between; width: 100%; height: 43px; margin-top: 20px; padding: 0 15px; border-radius: 7px; color: #fff; background: #1887ce; font-size: 12px; font-weight: 600; letter-spacing: .3px; transition: background .2s, transform .2s; }
.submit-button:hover { transform: translateY(-1px); background: #126fad; }
.submit-button:disabled, .delete-button:disabled { cursor: wait; opacity: .6; transform: none; }
.submit-button svg { width: 16px; height: 16px; }
.edit-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; margin-top: 17px; }
.edit-actions .submit-button { flex: 1; margin-top: 0; }
.delete-button, .secondary-button { min-height: 38px; padding: 0 12px; border: 1px solid #e7e9eb; border-radius: 7px; color: #7d8994; background: white; font-size: 11px; }
.delete-button { border-color: #f0dbdc; color: #bb5e61; background: #fff8f8; }
.delete-button:hover { background: #fff0ef; }
.secondary-button:hover { background: #f5f7f9; }
.modal-content #delete-title { margin: 10px 0; font-size: 20px; }
.toast { position: fixed; z-index: 50; right: 25px; bottom: 22px; max-width: calc(100% - 40px); padding: 11px 17px; border: 1px solid #34485b; border-radius: 8px; color: #fff; background: #263d50ed; box-shadow: 0 7px 22px #19314826; font-size: 12px; animation: appear .2s var(--ease); }

@keyframes appear { from { opacity: 0; translate: 0 7px; } to { opacity: 1; translate: 0 0; } }
@media (min-width: 1500px) {
  .home-view { padding-top: 103px; }
  .service-tile { min-height: 300px; }
}
@media (max-width: 700px) {
  .site-header, .site-footer { width: calc(100% - 38px); }
  .site-header { height: 106px; }
  .brand { gap: 1px; min-width: 75px; }
  .brand-logo img { width: 65px; height: 65px; }
  .brand-name { font-size: 13px; letter-spacing: 1.5px; }
  .emergency-contact { gap: 8px; padding: 7px 10px; }
  .phone-icon { width: 29px; height: 29px; }
  .emergency-label { font-size: 9px; }
  .emergency-contact strong { font-size: 13px; }
  .contact-arrow { display: none; }
  main { width: calc(100% - 38px); }
  .home-view { padding: 66px 0 45px; }
  .home-intro { margin-bottom: 31px; }
  .home-intro h1 { font-size: clamp(34px, 8vw, 43px); }
  .home-intro p { font-size: 12px; }
  .service-choices { gap: 14px; }
  .service-tile { min-height: 225px; aspect-ratio: auto; padding: 19px 17px 16px; border-radius: 13px; }
  .tile-number { font-size: 8px; letter-spacing: .8px; }
  .tile-symbol { width: 36px; height: 36px; }
  .tile-copy { gap: 7px; margin-bottom: 24px; }
  .tile-copy strong { font-size: 29px; }
  .tile-copy small { font-size: 10px; line-height: 1.6; }
  .tile-bottom { padding-top: 12px; font-size: 9px; }
  .tile-arrow { width: 27px; height: 27px; }
  .home-note { font-size: 10px; }
  .schedule-view { padding-top: 21px; }
  .schedule-heading { align-items: flex-start; gap: 10px; flex-direction: column; margin-top: 14px; }
  .schedule-heading h1 { font-size: 29px; }
  .schedule-heading p { font-size: 11px; }
  .service-switch { align-self: flex-end; margin-top: -44px; }
  .notice { align-items: flex-start; padding: 11px; }
  .notice p { font-size: 10px; }
  .roster-topline { align-items: flex-start; gap: 8px; flex-direction: column; }
  .roster-topline strong { font-size: 13px; }
  .roster-topline > div span, #date-range { font-size: 9px; }
  .roster-table th { height: 39px; padding: 0 9px; font-size: 9px; letter-spacing: .2px; }
  .roster-table .date-col { width: 48%; }
  .roster-table .add-col { width: 16%; }
  .roster-table td { height: 47px; padding: 4px 9px; }
  .slot-date { min-width: 0; width: 100%; font-size: 10px; }
  .slot-period { min-width: 0; margin-top: 3px; font-size: 9px; }
  .entry-chip { flex-wrap: wrap; gap: 4px 6px; padding: 4px 6px; font-size: 10px; }
  .entry-class { font-size: 9px; }
  .booked-label { font-size: 8px; }
  .booked-label svg { width: 11px; height: 11px; }
  .add-entry { width: 25px; height: 25px; }
  .table-foot { height: 35px; padding: 0 10px; font-size: 8px; }
  .table-note { font-size: 9px; line-height: 1.7; }
  .site-footer { min-height: 56px; gap: 8px; flex-wrap: wrap; font-size: 8px; }
  .site-footer > span:first-child { font-size: 9px; }
  .site-footer > span:nth-child(2), #today-label { display: none; }
  .byline { font-size: 9px; }
  .drag-target { top: 10px; right: 16px; width: 155px; height: 73px; }
}
@media (max-width: 390px) {
  .site-header, .site-footer, main { width: calc(100% - 28px); }
  .brand-name { font-size: 12px; }
  .emergency-contact { padding: 6px 7px; }
  .emergency-label { font-size: 8px; }
  .emergency-contact strong { font-size: 12px; }
  .service-choices { gap: 9px; }
  .service-tile { min-height: 207px; padding-inline: 12px; }
  .tile-copy strong { font-size: 26px; }
  .tile-copy small { font-size: 9px; }
  .tile-number { letter-spacing: .4px; }
  .roster-table .date-col { width: 46%; }
  .roster-table .add-col { width: 17%; }
  .roster-table td, .roster-table th { padding-inline: 7px; }
  .modal-content { padding: 27px 22px 22px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
