:root{
  --bg:#eef3f8;
  --card:#ffffff;
  --muted:#6b7280;
  --text:#111827;
  --line:#e5e7eb;
  --accent:#2563eb;
  --good:#10b981;
  --danger:#ef4444;
  --chip:#f1f5f9;
}

*{box-sizing:border-box}
html, body{\n  background:var(--bg);
  padding:0;
  background:#2c5f7c;height:100%;margin:0;padding:0;}
html{background:var(--bg);}
body{\n  background:var(--bg);
  padding:0;
  background:#2c5f7c;
  margin:0;
  padding-top:0;
  font-family: "Pretendard", "SUIT", "Noto Sans KR", system-ui, -apple-system, Segoe UI, Roboto;
  background:var(--bg);
  color:var(--text);
  min-height:100vh;
  display:flex;
  flex-direction:column;
}

header{
  padding:0;
  margin:0;
  border-bottom:none;
  background:transparent;
}

.header-hero{
  width:100%;
  margin:0;
  left:0;
  right:0;
  background:linear-gradient(135deg, #2c5f7c 0%, #1e3a52 100%);
  box-shadow:0 2px 8px rgba(0,0,0,0.08);
  position:fixed;
  top:0;
  z-index:1000;
}

.header-container{
  max-width:none;
  width:100%;
  margin:0;
  padding:26px 22px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
}
.brand-section{display:flex; align-items:center;}
.brand-reload{
  display:flex;
  align-items:center;
  gap:16px;
  background:transparent;
  border:0;
  padding:0;
  color:inherit;
  cursor:pointer;
}
.brand-reload:focus-visible{
  outline:2px solid rgba(255,255,255,0.9);
  outline-offset:4px;
  border-radius:10px;
}
.logo-wrapper{display:flex; align-items:center; gap:16px;}
.logo-icon{width:40px; height:40px; color:#fff; filter:drop-shadow(0 2px 4px rgba(0,0,0,0.1));}
.brand-text{display:flex; flex-direction:column;}
.brand-title{font-size:24px; font-weight:700; color:#fff; margin:0; letter-spacing:-0.5px;}
.brand-subtitle{font-size:14px; color:rgba(255,255,255,0.85); margin:0; font-weight:400;}
.header-actions{display:flex; align-items:center; gap:16px;}
.header-auth{display:flex; align-items:center;}

.help-button{
  display:flex;
  align-items:center;
  gap:8px;
  padding:8px 14px;
  background:rgba(255,255,255,0.15);
  border:1px solid rgba(255,255,255,0.25);
  border-radius:8px;
  color:#fff;
  font-size:14px;
  font-weight:500;
  cursor:pointer;
  transition:all .3s ease;
  backdrop-filter:blur(10px);
}
.help-button:hover{background:rgba(255,255,255,0.25); transform:translateY(-1px);}

.login-button{
  display:flex;
  align-items:center;
  gap:8px;
  padding:10px 18px;
  border:none;
  border-radius:8px;
  font-size:14px;
  font-weight:600;
  cursor:pointer;
  transition:all .3s ease;
  background:rgba(255,255,255,0.15);
  border:1px solid rgba(255,255,255,0.25);
  color:#fff;
  backdrop-filter:blur(10px);
}
.login-button:hover{background:rgba(255,255,255,0.25); transform:translateY(-1px);}

.user-dropdown-wrapper{position:relative;}
.user-button{
  display:flex;
  align-items:center;
  gap:8px;
  padding:8px 14px;
  background:rgba(255,255,255,0.95);
  border:none;
  border-radius:999px;
  box-shadow:0 2px 8px rgba(0,0,0,0.1);
  cursor:pointer;
  transition:all .3s ease;
}
.user-button:hover{background:#fff; box-shadow:0 4px 12px rgba(0,0,0,0.15);}
.user-icon{color:#2c5f7c;}
.user-name{font-weight:600; color:#1e3a52; font-size:14px;}
.dropdown-arrow{color:#64748b; transition:transform .3s ease;}
.user-button:hover .dropdown-arrow{transform:translateY(2px);}

.user-dropdown-menu{
  position:absolute;
  top:calc(100% + 8px);
  right:0;
  min-width:180px;
  background:#fff;
  border-radius:12px;
  box-shadow:0 4px 20px rgba(0,0,0,0.15);
  opacity:1;
  visibility:visible;
  transform:translateY(0);
  transition:all .3s ease;
  overflow:hidden;
}
.user-dropdown-menu.hidden{
  opacity:0;
  visibility:hidden;
  transform:translateY(-10px);
}
.dropdown-item{
  display:flex;
  align-items:center;
  gap:12px;
  width:100%;
  padding:14px 20px;
  background:#fff;
  border:none;
  color:#1e3a52;
  font-size:14px;
  font-weight:500;
  cursor:pointer;
  transition:all .2s ease;
  text-align:left;
}
.dropdown-item:hover{background:#f1f5f9;}
.dropdown-item svg{color:#2c5f7c; flex-shrink:0;}
.dropdown-item.logout{border-top:1px solid #e2e8f0; color:#dc2626;}
.dropdown-item.logout svg{color:#dc2626;}
.dropdown-item.logout:hover{background:#fef2f2;}

.header-hero.is-compact .header-container{
  max-width:none;
  width:100%;
  margin:0;
  padding:6px 22px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
}

.header-hero.is-compact .logo-icon{width:22px; height:22px;}
.header-hero.is-compact .brand-title{font-size:15px;}
.header-hero.is-compact .brand-subtitle{font-size:10px;}
.header-hero.is-compact .help-button{padding:2px 6px;}
.header-hero.is-compact .login-button{padding:4px 6px;}
.header-hero.is-compact .user-button{padding:2px 6px;}
.header-hero.is-compact .help-button span{display:none;}
.header-hero.is-compact .user-name{display:none;}
.header-hero.is-compact .login-button span{display:none;}
.header-hero.is-compact .header-actions{gap:10px;}
.header-hero.is-compact .brand-text{
  flex-direction:row;
  align-items:center;
  gap:8px;
}
.header-hero.is-compact .brand-subtitle{
  margin:0;
}

@media (max-width: 768px){
  .header-container{
  max-width:none;
  width:100%;
  margin:0;
  padding:26px 22px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
}
  .brand-title{font-size:20px;}
  .brand-subtitle{font-size:12px;}
  .help-button span{display:none;}
  .header-actions{gap:10px;}
  .login-button span{display:none;}
  .login-button{padding:10px;}
  .user-name{display:none;}
  .header-hero.is-compact .header-container{
  max-width:none;
  width:100%;
  margin:0;
  padding:6px 22px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
}

  .header-hero.is-compact .logo-icon{width:24px; height:24px;}
  .header-hero.is-compact .brand-title{font-size:15px;}
  .header-hero.is-compact .brand-subtitle{font-size:10px;}
}

.auth-bar{

  margin-top:12px;
  display:flex;
  justify-content:center;
}
.auth-row{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
  justify-content:center;
  padding:8px 10px;
  border:1px dashed rgba(15,23,42,.12);
  border-radius:12px;
  background:rgba(248,250,252,.7);
}
.auth-status{
  font-size:13px;
  font-weight:700;
  color:#0f172a;
}
.input.small{
  height:34px;
  font-size:13px;
  padding:6px 10px;
  min-width:140px;
}
.input.tiny-input{
  width:50px;
  min-width:0;
  padding:4px 6px;
  text-align:center;
}

.wrap{max-width:1100px; margin:0 auto; padding:0 12px;}
.wrap--main{max-width:none; margin:0; padding:0 12px;}
h1{font-size:18px; margin:0 0 6px 0;}
.sub{color:var(--muted); font-size:13px;}

  main{padding:20px 0 40px; flex:1;}
  .header-hero + main{padding-top:90px;}

.scroll-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #f6f7f8;
  border: none;
  color: #757575;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  opacity: 0;
  visibility: hidden;
  z-index: 999;
  font-size: 18px;
}

.scroll-to-top:hover {
  background: #eceff1;
  color: #424242;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.scroll-to-top.show {
  opacity: 1;
  visibility: visible;
  animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px){
  .scroll-to-top {
    right: 16px;
    bottom: 16px;
  }
}

.site-footer{
  border-top:1px solid var(--line);
  background:transparent;
  padding:10px 0;
  font-size:12px;
  color:#6b7280;
  margin-top:auto;
}
.site-footer-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  flex-wrap:wrap;
}
.footer-links{
  display:flex;
  align-items:center;
  gap:6px;
}
.site-footer a{
  color:#475569;
  text-decoration:none;
  font-weight:600;
}
.site-footer a:hover{
  text-decoration:underline;
}
.footer-divider{
  color:#cbd5f5;
}
.footer-copy{
  color:#94a3b8;
  font-size:11px;
}
@media (max-width: 680px){
  .site-footer-inner{
    justify-content:center;
    text-align:center;
  }
  .footer-links{
    width:100%;
    justify-content:center;
  }
}

.grid{
  display:grid;
  grid-template-columns: 520px minmax(520px, 1fr) minmax(360px, 520px);
  gap:12px;
  align-items:start;
}
@media (max-width: 980px){ .grid{grid-template-columns:1fr;} }
.stack{
  display:flex;
  flex-direction:column;
  gap:12px;
}
.calendar-card{
  min-height: auto;
}
.schedule-card{
    min-height: 820px;
    background:#f8fafc;
    border-color:transparent;
    box-shadow:none;
    margin-bottom:15px;
  }
body.is-empty-schedule .schedule-card{
  min-height: auto;
}
.schedule-panel{
  background:#f8fafc;
}
.schedule-head{
  background:#ffffff;
}
.map-card{
  min-height: 820px;
  display:flex;
  flex-direction:column;
}
.hidden{ display:none !important; }

#mapCanvas{
  flex:1;
  min-height:0;
  border:1px solid var(--line);
  border-radius:12px;
}
.map-summary{
  margin-top:10px;
  padding:10px 12px;
  border-radius:12px;
  background:#f8fafc;
  border:1px solid var(--line);
  color:var(--text);
  font-size:14px;
}
#driveSummary{
  display:none;
  margin-top:12px;
}
.calendar-card,
.schedule-card{
  min-width: 0;
}
.schedule-card{
  display:flex;
  flex-direction:column;
}
.schedule-card #scheduleCards{
  flex:1;
  min-height:0;
  overflow:auto;
}
@media (max-width: 980px){
  .grid{grid-template-columns:1fr;}
  .calendar-card,
  .schedule-card{
    min-height: auto;
  }
  .map-card{
    min-height: 420px;
  }
  .schedule-card #scheduleCards{
    overflow: visible;
  }
}

.card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:12px;
  padding:10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.06);
}
.memo-card{
  position:relative;
}
.memo-save-btn{
  position:absolute;
  right:8px;
  top:56px;
  width:22px;
  height:22px;
  padding:0;
  border-radius:6px;
  font-size:11px;
  background:#f8fafc;
  color:#6b7280;
}
.memo-card textarea{
  padding-top:18px;
}

.card h2{font-size:13px; margin:0 0 8px 0; display:flex; align-items:center; gap:8px;}
.summary-title{font-size:12px; color:var(--muted); margin-bottom:4px;}
.summary-title-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin-bottom:4px;
}
.date-summary-line{font-size:13px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.collapse-card summary{cursor:pointer; font-size:14px; font-weight:700;}
.collapse-card .collapse-body{\n  background:var(--bg);
  padding:0;
  background:#2c5f7c;margin-top:10px;}
.btn-group-right{margin-left:auto; display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end;}
.mode-badge{
  padding:4px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
  background:#eef2ff;
  color:#3730a3;
  border:1px solid rgba(67,56,202,.2);
}
.mode-badge.edit{
  background:#ecfdf3;
  color:#065f46;
  border-color:rgba(16,185,129,.35);
}
.mode-select{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:7px 10px;
  border-radius:10px;
  border:1px solid var(--line);
  background:#ffffff;
  color:#0f172a;
  font-size:12px;
  font-weight:700;
  cursor:pointer;
  transition:.12s ease;
}
.mode-select:hover{
  border-color:rgba(37,99,235,.35);
  background:#f8fafc;
}
.mode-select.is-edit{
  background:#ecfdf3;
  border-color:rgba(16,185,129,.35);
  color:#065f46;
}
.mode-select-label{
  white-space:nowrap;
}
.mode-select-caret{
  font-size:11px;
  opacity:.7;
}
.step-row-compact{
  gap:8px;
}
.step-inline{
  gap:8px;
  align-items:center;
  margin-left:auto;
}
.step-check{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:12px;
  font-weight:600;
  color:var(--text);
}
.step-min{
  display:inline-flex;
  align-items:center;
  gap:4px;
}
.ktx-near{
  display:flex;
  align-items:center;
  gap:10px;
  margin-top:8px;
}
.ktx-near-label{
  min-width:140px;
  font-size:13px;
  font-weight:700;
  color:var(--text);
}
.ktx-near-input{
  display:flex;
  align-items:center;
  gap:6px;
  flex:1;
}
.ktx-near-input .input{
  flex:1;
}
.ktx-near-result{
  font-size:12px;
  color:var(--muted);
  margin-top:8px;
}
.search-row{
  display:flex;
  align-items:center;
  gap:8px;
  justify-content:space-between;
}
.search-row .input{
  flex:1;
  max-width:none;
}
.ktx-near-loading{
  display:flex;
  align-items:center;
  gap:8px;
  font-size:12px;
  color:var(--muted);
  margin-top:6px;
}
.spin{
  width:14px;
  height:14px;
  border:2px solid #e5e7eb;
  border-top-color:#3b82f6;
  border-radius:50%;
  display:inline-block;
  animation:spin 0.8s linear infinite;
}
.spin.tiny{
  width:12px;
  height:12px;
  border-width:2px;
}
@keyframes spin{
  to { transform:rotate(360deg); }
}
.mini-toggle{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 10px;
  border-radius:10px;
  border:1px solid var(--line);
  background:#ffffff;
  color:#0f172a;
  font-size:12px;
  font-weight:700;
  cursor:pointer;
  transition:.12s ease;
  user-select:none;
}
.mini-toggle:hover{
  border-color:rgba(37,99,235,.35);
  background:#f8fafc;
}
.mini-toggle input{
  position:absolute;
  opacity:0;
  pointer-events:none;
}
.mini-toggle input:checked + span{
  color:#065f46;
}
.mini-toggle input:checked ~ span{
  color:#065f46;
}
.mini-toggle:has(input:checked){
  background:#ecfdf3;
  border-color:rgba(16,185,129,.35);
}
.schedule-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.schedule-title-row{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  margin-top:6px;
  background:#ffffff;
}
.schedule-title{
  font-size:20px;
  font-weight:900;
  letter-spacing:.3px;
  color:#0b1220;
  padding:6px 12px;
  border-radius:12px;
  background:#f1f5ff;
  border:2px solid rgba(37,99,235,.22);
  line-height:1;
  display:inline-flex;
  align-items:center;
  height:32px;
  margin:0;
}
.schedule-count-pill{
  display:inline-flex;
  align-items:center;
  height:28px;
  padding:0 10px;
  border-radius:999px;
  background:#f3f4f6;
  color:#111827;
  font-size:12px;
  font-weight:700;
  border:1px solid #e5e7eb;
}
.schedule-title-row .btn.small{
  height:32px;
  padding:0 10px;
  margin-top:-7px;
}
.mode-inline{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  background:#ffffff;
}
.mode-inline .btn.ghost{
  background:transparent;
  border:1px solid rgba(15,23,42,.15);
  color:#0f172a;
}
.mode-inline .btn.ghost:hover{
  background:#eef2ff;
}
.mode-inline .btn.hide{
  display:none !important;
}
.schedule-panel{
  display:flex;
  flex-direction:column;
  gap:20px;
  margin-top:10px;
}
.panel-section{
  padding:12px;
  border-radius:12px;
  border:1px solid #e6eaf4;
  background:#f8fafc;
}
.panel-section.section-card{
  padding:24px;
  border:0;
  background:transparent;
}
.panel-title{
  font-size:13px;
  font-weight:800;
  color:#111827;
  display:flex;
  align-items:center;
  gap:8px;
  margin-bottom:10px;
}
.panel-row{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.panel-divider{
  height:1px;
  background:#e5e7eb;
  border-radius:999px;
}
.panel-options{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.option-row{
  display:flex;
  align-items:center;
  gap:10px;
  justify-content:space-between;
  flex-wrap:wrap;
}
.option-input{
  display:flex;
  align-items:center;
  gap:6px;
}
.visit-section .visit-list{
  display:flex;
  flex-direction:column;
  gap:12px;
}
.visit-section .section-header{
  display:flex;
  align-items:center;
  gap:8px;
  padding:0;
  margin:0;
  border-bottom:none;
  background:transparent;
  min-height:24px;
}



.visit-section.section-card{
  padding-top:16px;
  padding-bottom:16px;
}
.visit-section.edit-disclose{
  overflow:visible;
}
.visit-section .visit-list,
.visit-section #scheduleCards{
  overflow:visible;
}
.visit-section.edit-disclose.reveal-in{
  animation:none !important;
}
.visit-count{
  display:inline-block;
  background:#f3f4f6;
  color:#6b7280;
  font-size:13px;
  font-weight:600;
  padding:4px 10px;
  border-radius:12px;
  margin-left:8px;
}
.visit-empty{
  border:1px solid #e5e7eb;
  border-radius:14px;
  padding:16px;
  background:#ffffff;
  text-align:center;
  display:flex;
  flex-direction:column;
  gap:12px;
}
.visit-empty.read-only{
  text-align:left;
  gap:0;
  padding:0;
  background:transparent;
  border:0;
  box-shadow:none;
}
.visit-empty-title{
  font-size:13px;
  font-weight:700;
  color:#6b7280;
}
.visit-empty.read-only .visit-empty-title{
  font-size:13px;
  color:#6b7280;
}
.visit-empty-btn{
  width:100%;
  border:1px dashed #94a3b8;
  border-radius:10px;
  padding:10px 12px;
  background:transparent;
  color:#111827;
  font-size:13px;
  font-weight:700;
  cursor:pointer;
}
.visit-empty.read-only .visit-empty-btn{
  border-style:dashed;
}
.visit-empty-btn:hover{
  background:#eef2ff;
  border-color:#7c9dff;
}
.visit-empty.read-only .visit-empty-btn:hover{ background:#eef2ff; }

.empty-state{
  text-align:center;
  padding:60px 20px;
}
.empty-icon{
  width:80px;
  height:80px;
  margin:0 auto 20px;
  background:linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:36px;
  animation:float 3s ease-in-out infinite;
  will-change:transform;
}
@keyframes float{
  0%, 100% { transform:translateY(0); }
  50% { transform:translateY(-10px); }
}
.empty-title{
  font-size:16px;
  font-weight:600;
  color:#374151;
  margin-bottom:8px;
}
.empty-description{
  font-size:14px;
  color:#9ca3af;
  margin-bottom:32px;
  line-height:1.5;
}
.add-visit-btn,
.add-btn{
  display:inline-flex;
  align-items:center;
  gap:8px;
  background:#ffffff;
  border:2px dashed #d1d5db;
  color:#6b7280;
  font-size:14px;
  font-weight:600;
  padding:14px 32px;
  border-radius:12px;
  cursor:pointer;
  transition:all 0.2s ease;
  position:relative;
  overflow:hidden;
  will-change:transform;
}
.add-visit-btn::before,
.add-btn::before{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
  opacity:0;
  transition:opacity 0.2s ease;
}
.add-visit-btn:hover::before,
.add-btn:hover::before{ opacity:1; }
.add-visit-btn:hover,
.add-btn:hover{
  border-color:#818cf8;
  color:#4f46e5;
  transform:translateY(-2px);
  box-shadow:0 4px 12px rgba(79, 70, 229, 0.15);
}
.add-visit-btn:active,
.add-btn:active{ transform:translateY(0); }
.add-visit-btn span,
.add-btn span{
  position:relative;
  z-index:1;
}
.btn-icon{
  font-size:18px;
  position:relative;
  z-index:1;
}
.helper-text{
  margin-top:16px;
  font-size:13px;
  color:#9ca3af;
}
.helper-text strong{
  color:#6b7280;
  font-weight:600;
}
@media (max-width: 768px){
  .empty-state{ padding:40px 16px; }
  .empty-icon{ width:64px; height:64px; font-size:28px; }
  .empty-title{ font-size:14px; }
  .empty-description{ font-size:13px; }
  .add-visit-btn,
  .add-btn{ width:100%; justify-content:center; }
}
@media (prefers-reduced-motion: reduce){
  .empty-icon{ animation:none; }
  .add-visit-btn,
  .add-btn{ transition:none; }
}
@media (prefers-color-scheme: dark){
  .empty-title{ color:#f9fafb; }
  .empty-description{ color:#9ca3af; }
  .add-visit-btn,
  .add-btn{
    background:#1f2937;
    color:#d1d5db;
  }
}
.visit-add-btn{
  width:100%;
  background:#ffffff;
  border:2px dashed #e5e7eb;
  color:#9ca3af;
  font-size:14px;
  font-weight:600;
  padding:14px 24px;
  border-radius:12px;
  cursor:pointer;
  transition:all 0.2s;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
}
.visit-add-btn:hover{
  border-color:#d1d5db;
  background:#fafafa;
  color:#6b7280;
}
.visit-add-btn:active{
  transform:scale(0.98);
}
.panel-footer{
    background:#ffffff;
    border-radius:16px;
    padding:20px 24px;
    box-shadow:0 2px 8px rgba(0, 0, 0, 0.04);
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:12px;
  }
.edit-only{
  display:none;
}
.edit-disclose{
  overflow:hidden;
}
.edit-disclose.reveal-in{
  animation:disclose-in .24s ease;
}
@keyframes disclose-in{
  from{opacity:0; transform:translateY(-6px); max-height:0;}
  to{opacity:1; transform:translateY(0); max-height:800px;}
}
.panel-footer .btn.small{
  height:auto;
  padding:12px 24px;
  border-radius:10px;
  font-size:14px;
  font-weight:600;
  border:none;
  transition:all 0.2s;
}
#optimizeBtn:active,
#recalcBtn:active{
  transform:scale(0.98);
}
#optimizeBtn{
  background:#f9fafb;
  color:#6b7280;
  border:1.5px solid #e5e7eb;
}
#optimizeBtn:hover{
  background:#f3f4f6;
  border-color:#d1d5db;
  color:#374151;
}
#recalcBtn{
  background:#3b82f6;
  color:#ffffff;
  border:1.5px solid #3b82f6;
  box-shadow:0 2px 4px rgba(59, 130, 246, 0.2);
}
#recalcBtn:hover{
  background:#2563eb;
  border-color:#2563eb;
  box-shadow:0 4px 12px rgba(59, 130, 246, 0.3);
}

.section-card{
  background:#ffffff;
  border-radius:16px;
  padding:24px;
  box-shadow:0 2px 8px rgba(0, 0, 0, 0.04);
  transition:box-shadow 0.2s;
}
.section-card:hover{
  box-shadow:0 4px 12px rgba(0, 0, 0, 0.08);
}
/* keep cards white inside schedule area */
.schedule-card .section-card{
  background:#ffffff;
}

/* schedule list area background */
.schedule-card #scheduleCards{
  background:#f9fbfe;
}
.section-header{
  display:flex;
  align-items:center;
  gap:8px;
  padding:0;
  margin:0;
  border-bottom:none;
  background:transparent;
  min-height:24px;
}



.section-icon{
  font-size:20px;
  line-height:1;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:20px;
  height:20px;
}


.section-title{
  font-size:18px;
  font-weight:700;
  color:#111827;
  line-height:1;
  margin:0;
}



.required-badge{
  background:#fee2e2;
  color:#dc2626;
  font-size:11px;
  font-weight:700;
  padding:3px 8px;
  border-radius:6px;
  margin-left:8px;
  line-height:1;
  display:inline-flex;
  align-items:center;
  height:18px;
}



.input-group{ margin-bottom:0; }
.input-label{
  font-size:14px;
  color:#6b7280;
  margin-bottom:10px;
  display:block;
  font-weight:500;
}
.time-input-wrapper{
  display:flex;
  align-items:center;
  gap:12px;
  background:#f9fafb;
  border:2px solid #e5e7eb;
  border-radius:12px;
  padding:14px 16px;
  transition:all 0.2s;
}
.time-input-wrapper:focus-within{
  background:#ffffff;
  border-color:#818cf8;
  box-shadow:0 0 0 3px rgba(129, 140, 248, 0.1);
}
.time-input{
  flex:1;
  border:none;
  background:transparent;
  font-size:15px;
  font-weight:600;
  color:#111827;
  outline:none;
}
.time-icon{
  color:#9ca3af;
  font-size:18px;
}
.toggle-group{
  display:flex;
  flex-direction:column;
  gap:12px;
}
.toggle-item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:16px;
  background:#f9fafb;
  border-radius:12px;
  transition:all 0.2s;
}
.toggle-item:hover{ background:#f3f4f6; }
.toggle-label{
  font-size:14px;
  font-weight:600;
  color:#374151;
}
.toggle-right{
  display:flex;
  align-items:center;
  gap:12px;
}
.toggle-switch{
  position:relative;
  width:48px;
  height:28px;
  background:#d1d5db;
  border-radius:14px;
  cursor:pointer;
  transition:background 0.3s;
}
.toggle-switch.active{ background:#10b981; }
.toggle-switch::after{
  content:"";
  position:absolute;
  width:22px;
  height:22px;
  background:#ffffff;
  border-radius:50%;
  top:3px;
  left:3px;
  transition:transform 0.3s;
  box-shadow:0 2px 4px rgba(0, 0, 0, 0.2);
}
.toggle-switch.active::after{ transform:translateX(20px); }
.toggle-switch.is-disabled{
  opacity:0.5;
  cursor:not-allowed;
}
.number-input{
  width:60px;
  padding:8px 12px;
  border:2px solid #e5e7eb;
  border-radius:8px;
  text-align:center;
  font-size:14px;
  font-weight:600;
  color:#111827;
  background:#ffffff;
  transition:border-color 0.2s;
}
.number-input:focus{
  outline:none;
  border-color:#818cf8;
}
.unit-text{
  font-size:13px;
  color:#6b7280;
  font-weight:500;
}
.trip-mode-options{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}
.mode-card{
  background:#ffffff;
  border:2px solid #e5e7eb;
  border-radius:12px;
  padding:14px 12px;
  cursor:pointer;
  transition:all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position:relative;
  overflow:hidden;
}
.mode-card::before{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
  opacity:0;
  transition:opacity 0.3s;
}
.mode-card:hover::before{ opacity:1; }
.mode-card:hover{
  border-color:#818cf8;
  transform:translateY(-2px);
  box-shadow:0 4px 12px rgba(129, 140, 248, 0.15);
}
.mode-card:active{ transform:translateY(0); }
.mode-card-content{
  position:relative;
  z-index:1;
  text-align:center;
}
.mode-card-icon{
  font-size:26px;
  margin-bottom:6px;
  display:block;
  transition:transform 0.3s;
}
.mode-card:hover .mode-card-icon{ transform:scale(1.1); }
.mode-card-title{
  font-size:13px;
  font-weight:700;
  color:#111827;
}
.mode-card.selected{
  border-color:#4f46e5;
  background:linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
  box-shadow:0 2px 8px rgba(79, 70, 229, 0.15);
}
.mode-card.selected .mode-card-title{ color:#4f46e5; }
.mode-card.selected::after{
  content:"??;
  position:absolute;
  top:8px;
  right:8px;
  width:22px;
  height:22px;
  background:#4f46e5;
  color:#ffffff;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:13px;
  font-weight:700;
  z-index:2;
  animation:checkmark 0.3s ease-out;
}
@keyframes checkmark{
  0% { transform:scale(0); opacity:0; }
  50% { transform:scale(1.2); }
  100% { transform:scale(1); opacity:1; }
}
@media (max-width: 640px){
  .trip-mode-options{ grid-template-columns:1fr; gap:12px; }
  .mode-card{ padding:16px; }
  .mode-card-icon{ font-size:28px; }
}
@media (max-width: 768px){
  .section-card{ padding:20px; margin-bottom:16px; }
  .time-input-wrapper{ padding:12px 14px; }
  .toggle-item{ padding:14px; }
  .toggle-label{ font-size:13px; }
  .number-input{ width:50px; padding:6px 10px; }
  #ktxPanel .row{ grid-template-columns:1fr; }
  #ktxPanel .row .muted{ display:none; }
  #ktxPanel select.input{ padding:12px 14px; font-size:15px; }
  .ktx-block{ margin-top:20px; padding-top:16px; }
}
.empty-hint{
  padding:16px 12px;
  border:1px dashed var(--line);
  border-radius:12px;
  color:#64748b;
  background:#f8fafc;
  text-align:center;
  font-size:13px;
}
.modal-overlay{
  position:fixed;
  inset:0;
  background:rgba(15,23,42,.45);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:16px;
  z-index:9998;
}
.modal-card{
  width:min(920px, 100%);
  max-height:min(86vh, 860px);
  overflow:auto;
  background:var(--card);
  border:1px solid var(--line);
  border-radius:14px;
  padding:14px;
  box-shadow:0 18px 50px rgba(0,0,0,.2);
}
.modal-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:6px;
}
.modal-title{
  font-weight:800;
}
.trip-settings-head{
  display:grid;
  grid-template-columns: 1fr auto 1fr;
  align-items:center;
  gap:10px;
  padding-bottom:8px;
  border-bottom:1px solid #e5e7eb;
}
.trip-settings-title{
  font-size:16px;
  font-weight:800;
  color:#111827;
}
.trip-settings-head .pill{
  justify-self:center;
  background:#f3f4f6;
  color:#111827;
}
.trip-settings-head .btn{
  justify-self:end;
}
.trip-settings-body{
  background:var(--bg);
  padding:0;
  padding-top:12px;
  display:flex;
  flex-direction:column;
  gap:12px;
}
.settings-section{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.settings-section .section-title{
  font-size:18px;
  font-weight:700;
  color:#111827;
  line-height:1;
  margin:0;
}



.settings-divider{
  height:1px;
  background:#e5e7eb;
  border-radius:999px;
}
.settings-divider.tight{
  margin:8px 0;
}
.segmented{
  display:flex;
  gap:6px;
  padding:4px;
  border-radius:8px;
  background:#f3f4f6;
  border:1px solid #e5e7eb;
}
.seg-btn{
  flex:1;
  border:none;
  background:transparent;
  padding:8px 10px;
  border-radius:6px;
  font-size:13px;
  font-weight:700;
  color:#6b7280;
  cursor:pointer;
  transition:all .2s ease-in-out;
}
.segmented.is-neutral .seg-btn{
  background:#f3f4f6;
  color:#9ca3af;
  box-shadow:none;
}
.seg-btn.is-active{
  background:#ffffff;
  color:#2563eb;
  box-shadow:0 4px 10px rgba(15,23,42,.08);
}
.segmented.is-neutral .seg-btn.is-active{
  background:#f3f4f6;
  color:#9ca3af;
  box-shadow:none;
}
.visually-hidden{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  border:0;
  white-space:nowrap;
}
.time-input-row{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}
.time-label{
  font-size:12px;
  font-weight:700;
  color:#6b7280;
}
.ktx-panel{
  box-shadow:none;
  border:1px solid #e6eaf4;
  background:#f8fafc;
}
.ktx-near-input{
  display:flex;
  align-items:center;
  gap:12px;
  background:#f9fafb;
  border:2px solid #e5e7eb;
  border-radius:12px;
  padding:12px 16px;
  transition:all 0.2s;
  margin-bottom:24px;
}
.ktx-near-input:focus-within{
  background:#ffffff;
  border-color:#818cf8;
  box-shadow:0 0 0 3px rgba(129, 140, 248, 0.1);
}
#ktxNearQuery{
  flex:1;
  border:none;
  background:transparent;
  font-size:14px;
  color:#111827;
  outline:none;
}
#ktxNearQuery::placeholder{ color:#9ca3af; }
#ktxNearSearchBtn{
  border:none;
  background:transparent;
  color:#9ca3af;
  font-size:18px;
  padding:0;
  min-width:auto;
  height:auto;
}
.ktx-block{
  margin-top:24px;
  padding-top:20px;
  border-top:1px solid #f3f4f6;
}
.ktx-block:first-of-type{
  border-top:none;
  padding-top:0;
  margin-top:0;
}
.ktx-block-title{
  font-size:14px;
  font-weight:600;
  color:#374151;
  margin-bottom:12px;
  display:flex;
  align-items:center;
  gap:6px;
}
.ktx-block-title span{ font-size:16px; }
#ktxPanel .row{
  display:grid;
  grid-template-columns:1fr 1fr 2fr;
  gap:12px;
}
#ktxPanel .row .muted{
  font-size:12px;
  color:#6b7280;
  font-weight:500;
  margin-bottom:8px;
}
#ktxPanel select.input{
  padding:10px 12px;
  border:2px solid #e5e7eb;
  border-radius:8px;
  font-size:14px;
  font-weight:500;
  color:#111827;
  background:#ffffff;
  cursor:pointer;
  transition:all 0.2s;
  appearance:none;
  background-image:url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%236B7280' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right 12px center;
  padding-right:32px;
}
#ktxPanel select.input:hover{ border-color:#d1d5db; }
#ktxPanel select.input:focus{
  outline:none;
  border-color:#818cf8;
  box-shadow:0 0 0 3px rgba(129, 140, 248, 0.1);
}
.modal-footer{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  padding-top:4px;
}
.login-card{
  width:min(420px, 100%);
}
.login-body{\n  background:var(--bg);
  padding:0;
  background:#2c5f7c;
  display:flex;
  flex-direction:column;
  gap:12px;
}
.auth-row.login{
  flex-direction:column;
  align-items:stretch;
}
.auth-row.login .input.small{
  width:100%;
}
.auth-row.login .btn.small{
  width:100%;
  justify-content:center;
}
.login-footer{
  font-size:12px;
  color:var(--muted);
  text-align:center;
}
.login-footer-row{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:6px;
  flex-wrap:wrap;
}
.login-footer-row + .login-footer-row{
  margin-top:6px;
}
.link-btn{
  border:none;
  background:transparent;
  color:var(--accent);
  font-weight:700;
  cursor:pointer;
  padding:0 2px;
  text-decoration:none;
}
.link-btn:hover{
  text-decoration:underline;
}
.favorites-card{
  width:min(760px, 100%);
}
.favorites-body{\n  background:var(--bg);
  padding:0;
  background:#2c5f7c;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.favorites-add{
  display:grid;
  grid-template-columns: 1fr 2fr auto;
  gap:8px;
}
.favorites-list{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.fav-row{
  display:grid;
  grid-template-columns: 60px 1fr 2fr auto auto;
  gap:8px;
  align-items:center;
  padding:8px;
  border:1px solid var(--line);
  border-radius:10px;
  background:#f8fafc;
}
.fav-tag{
  font-size:11px;
  font-weight:800;
  color:#1e293b;
  background:#e2e8f0;
  border-radius:999px;
  padding:4px 8px;
  text-align:center;
}
.fav-box{
  margin-top:8px;
  padding:8px;
  border:1px dashed rgba(15,23,42,.12);
  border-radius:10px;
  background:#f8fafc;
}
.fav-label{
  font-size:11px;
  font-weight:800;
  color:#0f172a;
  margin-bottom:6px;
}
.fav-buttons{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}
@media (max-width: 680px){
  .favorites-add{
    grid-template-columns: 1fr;
  }
  .fav-row{
    grid-template-columns: 1fr;
  }
}

@media print{
  body.print-schedule-only *{
    visibility:hidden !important;
  }
  body.print-schedule-only .schedule-card,
  body.print-schedule-only .schedule-card *{
    visibility:visible !important;
  }
  body.print-schedule-only .schedule-card{
    position:absolute;
    left:0;
    top:0;
    width:100%;
    margin:0;
    box-shadow:none !important;
    border:none !important;
  }
  body.print-schedule-only .schedule-head{
    display:none !important;
  }
  body.print-schedule-only .schedule-print-summary{
    display:block !important;
  }
}
.schedule-print-summary{
  display:none;
  padding:8px 0 12px 0;
  border-bottom:1px solid var(--line);
  font-size:13px;
  font-weight:800;
  color:#0f172a;
  background:#f8fafc;
}
body.capture-schedule-only .schedule-head{
  display:none !important;
}
body.capture-schedule-only .schedule-print-summary{
  display:block !important;
}
.pin-match{
  font-size:12px;
  font-weight:700;
  text-align:right;
  display:none;
  margin-top:-2px;
}
.pin-match.show{
  display:block;
}
.help-body{\n  background:var(--bg);
  padding:0;
  background:#2c5f7c;
  display:flex;
  flex-direction:column;
  gap:12px;
}
.help-title{
  font-size:16px;
  font-weight:900;
  color:#0f172a;
  padding-bottom:6px;
  border-bottom:1px solid var(--line);
}
.help-step-title{
  font-size:13px;
  font-weight:800;
  color:#0f172a;
  margin-bottom:4px;
}
.help-step-text{
  font-size:12px;
  color:#334155;
  line-height:1.55;
}
.help-sub{
  margin-top:6px;
  padding:8px 10px;
  border-radius:10px;
  background:#f8fafc;
  border:1px solid var(--line);
}
.help-sub-title{
  font-size:12px;
  font-weight:800;
  color:#0f172a;
  margin-bottom:4px;
}
.help-list{
  margin:0;
  padding-left:16px;
  color:#475569;
  font-size:12px;
  line-height:1.5;
}
.help-note{
  margin-top:6px;
  font-size:12px;
  color:#64748b;
}
.help-tip{
  margin-top:4px;
  padding:10px 12px;
  border-radius:12px;
  background:#eef2ff;
  border:1px solid rgba(37,99,235,.18);
}
.help-tip-title{
  font-size:12px;
  font-weight:900;
  color:#1d4ed8;
  margin-bottom:4px;
}
.card-readonly{
  padding:10px 12px;
  box-shadow:none;
  border-color:#e9edf5;
}
.ro-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}
.ro-title{
  display:flex;
  align-items:center;
  gap:8px;
  font-weight:700;
  font-size:13px;
}
.ro-sub{
  margin-top:4px;
  font-size:12px;
  color:#334155;
}
.ro-meta{
  margin-top:4px;
  font-size:11px;
  color:#64748b;
}
label{font-size:12px; color:var(--muted); display:block; margin:10px 0 6px;}

textarea{
  width:100%;
  background:#fff;
  color:var(--text);
  border:1px solid var(--line);
  border-radius:10px;
  padding:10px 10px;
  outline:none;
  resize: vertical;
}
textarea:focus{border-color: rgba(37,99,235,.55); box-shadow:0 0 0 3px rgba(37,99,235,.12);}

.btn{
  background:#fff;
  border:1px solid var(--line);
  color:var(--text);
  border-radius:10px;
  padding:10px 12px;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  transition:.12s ease;
  user-select:none;
}
.btn:hover{transform:translateY(-1px); border-color:rgba(37,99,235,.35); background:#f9fafb;}
.btn.small{padding:6px 9px; border-radius:8px; font-size:12px;}
.btn.busy{opacity:.6; pointer-events:none;}

.btn.good{
  background:rgba(16,185,129,.10);
  border-color:rgba(16,185,129,.28);
}
.visit-num{
  background:#2563eb;
  color:#fff;
  border-radius:999px;
  width:22px;
  height:22px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:12px;
  font-weight:700;
  box-shadow:0 2px 6px rgba(0,0,0,.18);
}
.btn.danger{
  background:rgba(239,68,68,.08);
  border-color:rgba(239,68,68,.25);
  color:var(--danger);
}
.btn.primary{
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
  border-color:#1d4ed8;
  color:#fff;
  box-shadow: 0 8px 18px rgba(37,99,235,.25);
}
.btn.primary:hover{
  background: linear-gradient(180deg, #4f8ef7 0%, #1e5dd8 100%);
  border-color:#1e40af;
  color:#fff;
}
.btn.primary:active{
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(37,99,235,.18);
}
.btn.save-soft{
  background:#e8f0ff;
  border-color:#c7dcff;
  color:#1e3a8a;
}
.btn.save-soft:hover{
  background:#dfeaff;
  border-color:#b7d2ff;
}

.row{display:flex; gap:6px; flex-wrap:wrap; align-items:center;}
#scheduleCards{margin-top:12px;}
.pill{
  background:var(--chip);
  border:1px solid var(--line);
  border-radius:999px;
  padding:7px 10px;
  font-size:12px;
  color:var(--muted);
}
.hr{height:1px; background:var(--line); margin:12px 0;}
.muted{color:var(--muted); font-size:12px;}
.tiny{font-size:12px; color:var(--muted); line-height:1.55; padding-left:18px;}

/* ??캘린???????(??빠져??깨졌??부? */
.cal-head{
  display:grid;
  grid-template-columns: 44px 1fr 44px;
  gap:8px;
  align-items:center;
  margin-bottom:10px;
}
.cal-title{font-weight:700; text-align:center;}

.dow{
  display:grid;
  grid-template-columns: repeat(7, 1fr);
  color:var(--muted);
  font-size:12px;
  margin-bottom:6px;
}
.dow > div{padding:6px 0; text-align:center;}

.cal-grid{
  display:grid;
  grid-template-columns: repeat(7, 1fr);
  gap:6px;
}

.day{
  border:1px solid var(--line);
  background:#fff;
  border-radius:12px;
  min-height:56px;
  padding:8px;
  cursor:pointer;
  position:relative;
  transition:.12s ease;


  
}

.day.today{
  border-color: rgba(17,24,39,.22);   /* ??????*/
  background: #f8fafc;               /* ???? 배경 */
}

.day.selected.today{
  background:#fff;
  box-shadow: inset 0 0 0 1px rgba(16,185,129,.35);
}


.day:hover{
  transform:translateY(-1px);
  border-color:rgba(37,99,235,.35);
  box-shadow:0 6px 18px rgba(0,0,0,.06);
}
.day.mutedDay{
  opacity:.45;
  cursor:default;
  background:#f9fafb;
}
.day.selected{
  border-color:rgba(37,99,235,.65);
  box-shadow:0 0 0 3px rgba(37,99,235,.10);
}
.day .num{font-size:12px; font-weight:700;}

/* 기존 .dot ??????? */
.badge{
  min-width:18px;
  height:18px;
  padding:0 6px;
  border-radius:999px;
  background:transparent;
  color:#111827;
  font-size:11px;
  font-weight:700;
  display:flex;
  align-items:center;
  justify-content:center;

  position:absolute;
  right:8px;
  top:8px;

  box-shadow:none;
  display:none;
}
.day.hasSave .badge{display:flex;}
.day.count-green .badge{
  background:rgba(16,185,129,.95);
  color:#fff;
  box-shadow:0 0 0 3px rgba(16,185,129,.12);
}
.day.count-blue .badge{
  background:rgba(37,99,235,.95);
  color:#fff;
  box-shadow:0 0 0 3px rgba(37,99,235,.12);
}
.day.count-orange .badge{
  background:rgba(249,115,22,.95);
  color:#fff;
  box-shadow:0 0 0 3px rgba(249,115,22,.12);
}


/* KPI */
.kpi{display:grid; grid-template-columns:repeat(3, 1fr); gap:8px;}
@media (max-width: 680px){ .kpi{grid-template-columns:1fr;} }
.kpi .box{
  background:#fff;
  border:1px solid var(--line);
  border-radius:12px;
  padding:10px;
}
.kpi .label{color:var(--muted); font-size:12px; margin-bottom:6px;}
.kpi .value{font-size:14px; font-weight:700;}
.mono{font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;}

/* ????*/
.toast{
  position:fixed;
  left:50%;
  top:18%;
  transform:translate(-50%, -10px);
  background:rgba(255,255,255,.96);
  border:1px solid var(--line);
  color:var(--text);
  border-radius:999px;
  padding:12px 20px;
  font-size:14px;
  box-shadow:0 14px 40px rgba(0,0,0,.18);
  opacity:0;
  pointer-events:none;
  transition:.18s ease;
  max-width:min(640px, calc(100vw - 28px));
  text-align:center;
  z-index:9999;
}
.toast.show{opacity:1; transform:translate(-50%, 0);}
.toast.important{
  background:#0f172a;
  color:#fff;
  border-color:#0f172a;
  box-shadow:0 12px 30px rgba(15,23,42,.35);
  font-weight:700;
  letter-spacing:.2px;
}

.input{
  width:100%;
  padding:8px 10px;
  border:1px solid #ddd;
  border-radius:10px;
  outline:none;
  background:#fff;
}
.input:focus{
  border-color:#bbb;
}
.btn.small{
  padding:6px 10px;
  border-radius:10px;
}

/* ???카드: ????구분 */
.lunch-card{
  background: #fbfbfd;          /* 거의 ????가까운 ???? ??*/
  border: 1px solid #e6e8ef;    /* 기본 card보다 ?????*/
  box-shadow: none;             /* ??????? */
  position: relative;
}

.lunch-card::before{
  content: "";
  position: absolute;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 3px;
  background: #d9dcea;          /* ???????????*/
}


/* =========================
   湮 ī ŸƲ
========================= */
.visit-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:6px;
}
.visit-title{
  font-size:14px;
  font-weight:800;
  display:flex;
  align-items:center;
  gap:8px;
}
.visit-tag{
  font-size:11px;
  padding:4px 8px;
  border-radius:999px;
  border:1px solid var(--line);
  background:#fff;
  color:var(--muted);
}

/* ī (//湮//) */
.card-start{
  background:#f3f7ff;
  border-color:rgba(37,99,235,.20);
}
.card-end{
  background:#f3f7ff;
  border-color:rgba(37,99,235,.20);
}
.card-place{
  background:#ffffff;
}
.card-lunch{
  background:#fffaf0;
  border-color:rgba(245,158,11,.22);
}
.card-station{
  background:#f8fafc;
  border-color:rgba(148,163,184,.35);
}

/* 좌측 ???????구분? */
.card-start, .card-end, .card-place, .card-lunch, .card-station{
  position:relative;
}
.card-start::before,
.card-end::before,
.card-place::before,
.card-lunch::before,
.card-station::before{
  content:"";
  position:absolute;
  left:12px;
  top:12px;
  bottom:12px;
  width:3px;
  border-radius:3px;
  background:#d9dcea; /* 기본 */
}
.card-start::before{ background: rgba(37,99,235,.45); }
.card-end::before{ background: rgba(37,99,235,.45); }
.card-place::before{ background: rgba(16,185,129,.35); }
.card-lunch::before{ background: rgba(245,158,11,.40); }
.card-station::before{ background: rgba(148,163,184,.7); }

/* 카드 ?? ??? ???공간 ??*/
.card-start, .card-end, .card-place, .card-lunch, .card-station{
  padding-left:22px;
}
.card-station{
  padding-top:10px;
  padding-bottom:10px;
}

/* ??구? 카드 ????????*/
.travel-line{
  display:flex;
  align-items:center;
  gap:10px;
  padding:6px 8px;
  margin:2px 0 10px;
  color:var(--muted);
  font-size:12px;
}
.travel-line .arrow{
  font-weight:900;
  color:#111827;
}
.travel-line .meta b{
  color:#111827;
}
.travel-pill{
  font-size:11px;
  padding:4px 8px;
  border-radius:999px;
  background:var(--chip);
  border:1px solid var(--line);
  color:var(--muted);
  white-space:nowrap;
}
.time-strong{
  color:#1d4ed8;
  font-weight:800;
}
.travel-line .meta b.time-strong{
  color:#1d4ed8;
}

/* 출발/? 카드???불필???????간결??*/
.compact-grid{
  display:grid;
  gap:8px;
  margin-top:10px;
}


/* ??구???????*/
.travel-line{
  justify-content:space-between;
}
.travel-line .left{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}
.travel-line .meta{
  white-space:normal;
  overflow:visible;
  text-overflow:clip;
  line-height:1.35;
}
.travel-line .right{
  display:flex;
  align-items:center;
  gap:8px;
  flex-shrink:0;
}
.travel-mode{
  font-size:12px;
  font-weight:800;
  color:#0f172a;
  padding:4px 6px;
  border-radius:8px;
  background:#f1f5f9;
  border:1px solid var(--line);
}
.travel-select{
  padding:6px 10px;
  border-radius:10px;
  border:1px solid var(--line);
  background:#fff;
  color:var(--text);
  font-size:12px;
  outline:none;
}
.travel-select:focus{
  border-color: rgba(37,99,235,.35);
  box-shadow:0 0 0 3px rgba(37,99,235,.10);
}
.travel-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:28px;
  height:28px;
  border-radius:8px;
  border:1px solid var(--line);
  background:#fff;
  color:#0f172a;
  text-decoration:none;
  font-size:14px;
}
.travel-link:hover{
  background:#f8fafc;
}
.fixed-arrival-row{
  display:flex;
  align-items:center;
  gap:8px;
  margin-top:6px;
  flex-wrap:wrap;
}
.fixed-chip{
  font-size:12px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--line);
  background:#fff;
  color:#0f172a;
}
.fixed-chip.on{
  border-color:rgba(239,68,68,.45);
  background:rgba(239,68,68,.08);
  color:#b91c1c;
}
.fixed-time{
  max-width:130px;
}
.card-fixed{
  border-color:rgba(239,68,68,.25);
  box-shadow:0 0 0 2px rgba(239,68,68,.06);
}
.fixed-warning{
  margin-top:6px;
  font-size:12px;
  color:#b91c1c;
}
.time-row{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:10px;
}
.time-actions{
  display:flex;
  align-items:flex-end;
  gap:6px;
  margin-top:5px;
}
.btn.move-btn{
  padding:4px 6px;
  border-radius:8px;
  font-size:12px;
  background:#f8fafc;
  color:#6b7280;
}


/* KTX ???강조 */
.travel-pill.ktx {
  background: rgba(148, 163, 184, 0.18);
  border-color: rgba(148, 163, 184, 0.55);
  color: #475569;
  font-weight: 700;
}

.travel-line.ktx {
  background: linear-gradient(
    to right,
    rgba(148, 163, 184, 0.14),
    rgba(148, 163, 184, 0.05)
  );
  border-radius: 10px;
  padding: 8px 10px;
}


/* Calendar + memo redesign (left sidebar) */
.grid{
  grid-template-columns: 400px minmax(520px, 1fr) minmax(360px, 520px);
}
.grid > .stack{
  background:#f8fafc;
  padding:24px;
  border-radius:16px;
  gap:16px;
  max-height:calc(100vh - 120px);
  overflow-y:auto;
}

.calendar-card{
  background:#fff;
  border-radius:16px;
  padding:20px;
  box-shadow:0 2px 8px rgba(0,0,0,0.06);
}
.calendar-card h2{display:none;}
.cal-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:12px;
  gap:8px;
}
.cal-head .btn.small{
  width:32px;
  height:32px;
  min-width:32px;
  padding:0;
  border:none;
  background:#f1f5f9;
  border-radius:8px;
  color:#64748b;
  box-shadow:none;
}
.cal-head .btn.small:hover{
  background:#e2e8f0;
  color:#2c5f7c;
}
.cal-title{
  font-size:18px;
  font-weight:700;
  color:#1e3a52;
  margin:0;
}
.dow{
  display:grid;
  grid-template-columns: repeat(7, 1fr);
  gap:4px;
  margin-bottom:4px;
  color:#64748b;
  font-size:12px;
  font-weight:600;
}
.dow > div{padding:4px 0; text-align:center;}
.cal-grid{
  display:grid;
  grid-template-columns: repeat(7, 1fr);
  gap:4px;
}
.day{
  height:44px;
  min-height:44px;
  border:2px solid transparent;
  background:transparent;
  border-radius:8px;
  cursor:pointer;
  position:relative;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  padding:4px 2px;
  gap:2px;
  transition:all .2s ease;
  box-shadow:none;
}
.day:hover{background:#f1f5f9; transform:none; border-color:transparent;}
.day.today{
  border:2px solid #93c5fd;
  box-shadow:0 0 0 1px rgba(147,197,253,0.3);
  background:transparent;
}
.day.today:hover{
  border-color:#60a5fa;
  box-shadow:0 0 0 1px rgba(96,165,250,0.4);
}
.day.selected{
  background:#2c5f7c;
  border-color:#2c5f7c;
  box-shadow:0 0 0 1px rgba(44,95,124,0.3);
}
.day.selected .num{color:#fff;}
.day.selected:hover{background:#1e3a52; border-color:#1e3a52;}
.day.selected.today{
  background:#2c5f7c;
  border:2px solid #60a5fa;
  box-shadow:0 0 0 2px rgba(96,165,250,0.3);
}
.day.mutedDay{
  opacity:.35;
  cursor:default;
  background:transparent;
}
.day .num{
  font-size:14px;
  font-weight:600;
  color:#475569;
  line-height:1;
}
.badge{
  min-width:20px;
  height:14px;
  padding:0 4px;
  border-radius:7px;
  font-size:10px;
  font-weight:700;
  display:flex;
  align-items:center;
  justify-content:center;
  line-height:1;
  position:static;
  box-shadow:none;
  margin-top:1px;
}
.day.hasSave .badge{display:flex;}
.day.count-green .badge{
  background:#dbeafe;
  color:#1e40af;
}
.day.selected.count-green .badge{
  background:#bfdbfe;
  color:#1e3a8a;
}
.day.count-blue .badge{
  background:#fed7aa;
  color:#c2410c;
}
.day.selected.count-blue .badge{
  background:#fdba74;
  color:#9a3412;
}
.day.count-orange .badge{
  background:#fecaca;
  color:#dc2626;
  font-weight:800;
}
.day.selected.count-orange .badge{
  background:#fca5a5;
  color:#991b1b;
}

.memo-card{
  background:#fff;
  border-radius:16px;
  padding:24px;
  box-shadow:0 2px 8px rgba(0,0,0,0.06);
  position:relative;
  display:flex;
  flex-direction:column;
  gap:12px;
}
.memo-card .summary-title-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:4px;
}
.memo-card .summary-title{
  display:flex;
  align-items:center;
  gap:8px;
  font-size:16px;
  font-weight:700;
  color:#1e3a52;
  margin:0;
}
#approvalBtn{
  display:flex;
  align-items:center;
  gap:6px;
  padding:8px 12px;
  background:#f1f5f9;
  color:#475569;
  border:1px solid #e2e8f0;
  border-radius:8px;
  font-size:13px;
  font-weight:600;
  cursor:pointer;
  transition:all .2s ease;
}
#approvalBtn:hover{
  background:#e2e8f0;
  color:#1e3a52;
  border-color:#cbd5e1;
}
.date-summary-line{
  display:flex;
  align-items:center;
  gap:8px;
  padding:10px 12px;
  background:#f8fafc;
  border-radius:8px;
  font-size:13px;
  color:#475569;
  font-weight:500;
  white-space:normal;
}
#note{
  width:100%;
  padding:12px;
  border:1px solid #e2e8f0;
  border-radius:8px;
  font-size:13px;
  color:#1e293b;
  resize:vertical;
  transition:all .2s ease;
  font-family:inherit;
  order:2;
}
#note:focus{
  outline:none;
  border-color:#2c5f7c;
  box-shadow:0 0 0 3px rgba(44,95,124,0.1);
}
#note::placeholder{color:#94a3b8;}
.memo-save-btn{
  position:static;
  order:3;
  width:100%;
  padding:12px;
  background:#2c5f7c;
  color:#fff;
  border:none;
  border-radius:8px;
  font-size:13px;
  font-weight:600;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  box-shadow:none;
}
.memo-save-btn:hover{
  background:#1e3a52;
  box-shadow:0 4px 12px rgba(44,95,124,0.2);
}
.memo-save-btn:active{transform:translateY(0);}

@media (max-width: 980px){
  .grid{grid-template-columns:1fr;}
  .grid > .stack{
    max-height:none;
    padding:16px;
  }
}

@media (max-width: 1200px){
  .grid{
    grid-template-columns: 370px minmax(520px, 1fr) minmax(360px, 520px);
  }
}

@media (max-width: 768px){
  .grid{grid-template-columns:1fr;}
  .grid > .stack{
    max-height:none;
    padding:16px;
  }
  .summary-title-row{
    flex-direction:column;
    align-items:flex-start;
    gap:12px;
  }
  #approvalBtn{
    width:100%;
    justify-content:center;
  }
}


/* remove left accent line in schedule cards */
.card-start::before,
.card-end::before,
.card-place::before,
.card-lunch::before,
.card-station::before{
  content:none !important;
  display:none !important;
}

/* ý Է ̺ */
.taxi-row-header,
.taxi-row{
  display:flex;
  gap:8px;
  align-items:center;
  justify-content:center;
}
.taxi-row-header{
  padding:0;
  margin:0;
  border-bottom:none;
  background:transparent;
}

.taxi-row{
  margin-bottom:6px;
}
.taxi-col-num{
  width:40px;
  font-size:12px;
  color:#6b7280;
  text-align:center;
}
.taxi-col-from,
.taxi-col-to{
  flex:1 1 0;
  min-width:0;
}
.taxi-col-amt{
  width:120px;
  text-align:center;
}
.taxi-col-kakao{
  width:120px;
  display:flex;
  align-items:center;
  gap:6px;
  font-size:12px;
  color:#6b7280;
  justify-content:center;
  text-align:center;
}
.taxi-kakao{
  cursor:pointer;
}
.taxi-summary-row{
  display:flex;
  align-items:center;
  gap:8px;
  justify-content:space-between;
  margin-top:4px;
}
.taxi-summary-row span{
  flex:1;
}

/*  ˾ Ÿ (scoped) */
.approval-modal .approval-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  background:#fff;
  border-radius:16px;
  padding:16px 18px;
  margin-bottom:16px;
  box-shadow:0 2px 8px rgba(0,0,0,0.04);
}
.approval-modal .approval-title{
  display:flex;
  align-items:center;
  gap:8px;
  font-size:18px;
  font-weight:700;
  color:#111827;
}
.approval-modal .approval-title-icon{font-size:20px;}
.approval-modal .approval-actions{display:flex; gap:8px; flex-wrap:wrap;}
.approval-modal .header-btn{
  padding:10px 18px;
  border-radius:8px;
  font-size:14px;
  font-weight:600;
  cursor:pointer;
  transition:all .2s ease;
  border:1.5px solid #e5e7eb;
  background:#fff;
  color:#6b7280;
}
.approval-modal .header-btn:hover{background:#f9fafb; border-color:#d1d5db;}
.approval-modal .header-btn.primary{background:#3b82f6; border-color:#3b82f6; color:#fff;}
.approval-modal .header-btn.primary:hover{background:#2563eb;}
.approval-modal .header-btn.close{
  width:36px;
  height:36px;
  padding:0;
  font-size:16px;
  line-height:1;
  display:flex;
  align-items:center;
  justify-content:center;
}

.approval-modal .section-card{
  background:#fff;
  border-radius:16px;
  padding:20px 22px;
  margin-bottom:16px;
  box-shadow:0 2px 8px rgba(0,0,0,0.04);
}
.approval-modal .section-title{
  font-size:18px;
  font-weight:700;
  color:#111827;
  line-height:1;
  margin:0;
}




.approval-modal .ktx-route-item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:10px 12px;
  background:#f9fafb;
  border-radius:10px;
  margin-bottom:8px;
}
.approval-modal .ktx-route-label{font-size:14px; color:#6b7280; font-weight:600;}
.approval-modal .ktx-route-value{display:flex; align-items:center; gap:8px;}
.approval-modal .ktx-price-input{
  width:120px;
  padding:8px 10px;
  border:1.5px solid #e5e7eb;
  border-radius:8px;
  font-size:14px;
  font-weight:600;
  text-align:right;
}
.approval-modal .ktx-summary{
  margin-top:10px;
  padding:12px 14px;
  background:#eef2ff;
  border-radius:10px;
  border-left:4px solid #4f46e5;
}
.approval-modal .ktx-summary-text{font-size:14px; color:#4f46e5; font-weight:600;}
.approval-modal .ktx-summary-line{
  display:flex;
  align-items:center;
  gap:8px;
  justify-content:space-between;
}
.approval-modal .ktx-total{
  margin-top:6px;
  font-size:13px;
  color:#6b7280;
  display:flex;
  align-items:center;
  gap:8px;
  width:100%;
  justify-content:space-between;
}
.approval-modal .ktx-total .ktx-total-copy{margin-left:auto;}

.approval-modal .add-row-btn{
  width:100%;
  padding:10px;
  border:2px dashed #e5e7eb;
  background:#fff;
  border-radius:8px;
  color:#9ca3af;
  font-size:13px;
  font-weight:600;
  cursor:pointer;
}
.approval-modal .add-row-btn:hover{border-color:#d1d5db; background:#fafafa; color:#6b7280;}

.approval-modal .taxi-row-header,
.approval-modal .taxi-row{
  display:flex;
  gap:8px;
  align-items:center;
  justify-content:center;
}
.approval-modal .taxi-row-header{
  font-size:12px;
  color:#6b7280;
  margin-bottom:6px;
  text-align:center;
}
.approval-modal .taxi-row{margin-bottom:6px;}
.approval-modal .taxi-col-num{
  width:40px;
  font-size:12px;
  color:#6b7280;
  text-align:center;
}
.approval-modal .taxi-col-from,
.approval-modal .taxi-col-to{flex:1 1 0; min-width:0;}
.approval-modal .taxi-col-amt{width:120px; text-align:center;}
.approval-modal .taxi-col-kakao{
  width:120px;
  display:flex;
  align-items:center;
  gap:6px;
  font-size:12px;
  color:#6b7280;
  justify-content:center;
  text-align:center;
}
.approval-modal .taxi-kakao{cursor:pointer;}

.approval-modal .taxi-summary{
  background:#f9fafb;
  border:2px solid #e5e7eb;
  border-radius:12px;
  padding:12px 14px;
  margin-top:12px;
  font-size:14px;
  color:#111827;
  line-height:1.5;
}
.approval-modal .taxi-summary #taxiSummaryTotal{font-weight:700;color:#111827;}
.approval-modal .taxi-summary #taxiSummaryList{color:#374151;}
.approval-modal .taxi-summary-row{
  display:flex;
  align-items:center;
  gap:10px;
  justify-content:space-between;
  margin-top:4px;
}
.approval-modal .taxi-summary-row span{font-weight:500;}

.approval-modal .expense-item{
  padding:12px 14px;
  background:#f9fafb;
  border-radius:10px;
  font-size:15px;
  font-weight:600;
  color:#111827;
}

.approval-modal .memo-textarea{
  width:100%;
  min-height:90px;
  padding:12px;
  border:1.5px solid #e5e7eb;
  border-radius:10px;
  font-size:14px;
  font-family:inherit;
  resize:vertical;
}