/* ─── 3-DOT MENU ─── */
.more-menu-wrap{position:relative;flex-shrink:0}
.more-menu-btn{
  height:100%;min-width:40px;border:1.5px solid var(--bor);border-radius:var(--r);
  background:var(--bg);color:var(--t2);
  display:flex;align-items:center;justify-content:center;
  font-size:18px;letter-spacing:1px;line-height:1;
  box-shadow:var(--sh0);touch-action:manipulation;
  transition:background .15s,color .15s,border-color .15s;
}
@media(hover:hover){.more-menu-btn:hover{background:var(--hov);color:var(--t1)}}
.more-menu-btn:active{transform:scale(.94)}
.more-menu-drop{
  position:absolute;top:calc(100% + 6px);right:0;z-index:400;
  background:var(--bg);border:1px solid var(--bor);border-radius:var(--r);
  box-shadow:0 8px 24px rgba(0,0,0,.12),0 2px 6px rgba(0,0,0,.06);
  min-width:184px;overflow:hidden;
  animation:dropIn .16s cubic-bezier(0.34,1.15,0.64,1) both;
}
@keyframes dropIn{from{opacity:0;transform:translateY(-8px) scale(.96)}to{opacity:1;transform:none}}
.more-menu-drop.hidden{display:none}
.mmd-item{
  display:flex;align-items:center;gap:10px;
  width:100%;border:none;background:transparent;
  padding:11px 14px;font-size:13px;font-weight:700;font-family:inherit;
  color:var(--t1);text-align:left;cursor:pointer;
  transition:background .12s;
}
@media(hover:hover){.mmd-item:hover{background:var(--hov)}}
.mmd-item svg{flex-shrink:0;color:var(--t2)}
.mmd-item span{min-width:0}
.mmd-sep{height:1px;background:var(--bor);margin:2px 0}

/* ─── QUICK ADD HELP ─── */
.quick-help-modal{
  position:fixed;inset:0;z-index:1500;
  background:rgba(0,0,0,.34);
  display:flex;align-items:center;justify-content:center;
  padding:20px 14px;
  backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);
  animation:liveIn .2s ease both;
  overflow:hidden;
}
.quick-help-modal.hidden{display:none}
.quick-help-card{
  width:100%;max-width:470px;background:#fff;border-radius:22px;
  box-shadow:0 24px 72px rgba(0,0,0,.2);
  max-height:calc(100dvh - 40px);
  display:flex;flex-direction:column;min-height:0;
  overflow:hidden;animation:liveIn .24s cubic-bezier(0.34,1.12,0.64,1) both;
}
.qh-header{
  flex-shrink:0;
  background:#f5eee2;
  border-bottom:1px solid #e8ddce;
  padding:16px 20px 14px;
  display:flex;align-items:center;justify-content:space-between;gap:14px;
}
.widget-copy-header{
  background:#f5eee2;
}
.qh-header-title{
  display:block;font-size:11px;font-weight:850;letter-spacing:.14em;
  text-transform:uppercase;color:#9a8467;
}
.qh-header-sub{display:block;margin-top:2px;font-size:14px;font-weight:850;color:#2c261d}
.qh-header-close{
  width:32px;height:32px;border-radius:50%;border:none;
  background:#eee3d4;color:#5e4e39;
  font-size:18px;line-height:1;display:flex;align-items:center;justify-content:center;
}
.qh-body{
  min-height:0;overflow-y:auto;overscroll-behavior:contain;
  padding:18px 20px 20px;background:#fff;
  -webkit-overflow-scrolling:touch;
}
.qh-lead{
  margin:0 0 14px;font-size:13px;font-weight:700;line-height:1.45;color:#555;
}
.qh-examples{display:flex;flex-direction:column;gap:8px}
.qh-example{
  border:1px solid #ebe8e3;border-radius:8px;background:#faf9f7;
  padding:11px 12px;display:flex;flex-direction:column;gap:4px;
}
.qh-example strong{font-size:14px;font-weight:850;color:#1d1d1b}
.qh-example span{font-size:12px;font-weight:700;color:#777;line-height:1.35}
.qh-rules{
  display:grid;grid-template-columns:1fr;gap:1px;
  border:1px solid #ebe8e3;border-radius:8px;overflow:hidden;margin-top:14px;
}
.widget-copy-rules{margin-top:0}
.qh-rules div{background:#fff;padding:11px 12px;display:flex;flex-direction:column;gap:3px}
.qh-rules b{font-size:11px;font-weight:900;color:#2d6b55}
.qh-rules span{font-size:12px;font-weight:700;color:#666;line-height:1.4}
.qh-lines{
  margin-top:14px;display:flex;flex-direction:column;gap:6px;
  color:#4d5a52;font-size:12px;font-weight:800;
}
.qh-lines span{
  display:block;padding:8px 10px;border-radius:8px;background:#eef7f1;
}

/* ─── SETTINGS ─── */
.settings-card{
  max-width:430px;
  background:#fff;
  border:1px solid #e8ddce;
}
.settings-header{
  background:#f5eee2;
}
.settings-body{
  background:#fff;
  padding:16px 18px 18px;
}
.settings-row{
  display:flex;align-items:center;justify-content:space-between;gap:16px;
  padding:16px;
  border:1px solid #ebe8e3;border-radius:14px;background:#faf9f7;
}
.settings-copy{display:flex;flex-direction:column;gap:4px;min-width:0}
.settings-copy strong{font-size:14px;font-weight:850;color:#2c261d}
.settings-copy span{font-size:12px;font-weight:650;line-height:1.45;color:#7c6a51}
.settings-note{
  margin:10px 4px 0;
  font-size:12px;font-weight:700;color:#8a7658;
}
.settings-note + .settings-row{margin-top:14px}
.settings-switch{
  position:relative;display:block;width:50px;height:30px;flex-shrink:0;
}
.settings-switch input{
  position:absolute;opacity:0;pointer-events:none;
}
.settings-switch span{
  position:absolute;inset:0;border-radius:100px;
  background:#e1d4c1;border:1px solid #d5c4ad;
  transition:background .16s,border-color .16s;
}
.settings-switch span::after{
  content:"";position:absolute;top:3px;left:3px;
  width:22px;height:22px;border-radius:50%;background:#fff;
  box-shadow:0 1px 4px rgba(0,0,0,.16);
  transition:transform .18s cubic-bezier(0.34,1.3,0.64,1);
}
.settings-switch input:checked + span{
  background:#2c261d;border-color:#2c261d;
}
.settings-switch input:checked + span::after{transform:translateX(20px)}

/* ─── NOTIFICATION CENTER SETTINGS ─── */
.notification-settings-card{max-width:480px;background:#fff;border:1px solid #e8ddce}
.notification-settings-body{background:#fff}
.nsc-grid{display:grid;grid-template-columns:1fr;gap:10px}
.nsc-field{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:12px;border:1px solid #ebe8e3;border-radius:12px;background:#faf9f7;
}
.nsc-field span,.nsc-check span{
  font-size:12px;font-weight:800;color:#5e4e39;line-height:1.35;
}
.nsc-field input,.nsc-field select,.nsc-test input,.nsc-test textarea{
  border:1px solid #dfd0bb;border-radius:9px;background:#fff;
  color:#2c261d;font:inherit;font-size:13px;font-weight:750;
  padding:8px 9px;min-width:0;
}
.nsc-field input,.nsc-field select{max-width:132px}
.nsc-check{
  display:flex;align-items:center;gap:8px;margin-top:10px;
  padding:10px 12px;border:1px solid #ebe8e3;border-radius:12px;background:#faf9f7;
}
.nsc-check input{width:16px;height:16px;accent-color:#2c261d;flex-shrink:0}
.nsc-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:12px}
.nsc-main-actions{justify-content:space-between}

/* test toggle button */
.nsc-test-open-btn{
  border:1.5px solid #ebe8e3;border-radius:var(--rs);background:#faf9f7;
  color:#5e4e39;font:inherit;font-size:12px;font-weight:700;
  padding:8px 13px;cursor:pointer;touch-action:manipulation;
  transition:background .12s,border-color .12s;
  display:flex;align-items:center;gap:5px;
}
@media(hover:hover){.nsc-test-open-btn:hover{background:#f0ebe2;border-color:#d5c4aa}}
.nsc-test-open-btn.active{background:#2c261d;color:#fff;border-color:#2c261d}

.nsc-test{
  margin-top:14px;padding:14px;border:1px solid #ebe8e3;border-radius:12px;background:#faf9f7;
  display:flex;flex-direction:column;gap:9px;
}
.nsc-test.hidden{display:none}
.nsc-test-row{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.nsc-test input,.nsc-test textarea{
  border:1px solid #dfd0bb;border-radius:9px;background:#fff;
  color:#2c261d;font:inherit;font-size:13px;font-weight:750;
  padding:8px 9px;min-width:0;
}
.nsc-test textarea{resize:none;min-height:58px}

/* template editing section */
.nsc-section{
  margin-top:16px;padding-top:16px;border-top:1px solid #ebe8e3;
}
.nsc-section-head{
  margin-bottom:12px;
}
.nsc-section-head strong{
  display:block;font-size:12px;font-weight:900;color:#2c261d;
}
.nsc-section-head span{
  display:block;font-size:11px;font-weight:600;color:#9a8467;margin-top:2px;
}
.nsc-tmpl-group{
  margin-bottom:10px;
}
.nsc-tmpl-label{
  font-size:11px;font-weight:800;color:#5e4e39;margin-bottom:5px;
  letter-spacing:.02em;
}
.nsc-tmpl-ta{
  width:100%;border:1px solid #dfd0bb;border-radius:9px;background:#fff;
  color:#2c261d;font:inherit;font-size:13px;font-weight:650;
  padding:9px 10px;resize:none;line-height:1.6;
}
.nsc-tmpl-ta:focus{outline:none;border-color:#9a8467}
.nsc-tmpl-ta::placeholder{color:#c5bdb0;font-weight:500}

/* bottom reset */
.nsc-bottom-reset{
  margin-top:16px;padding-top:14px;border-top:1px solid #ebe8e3;
}
.nsc-reset-btn{
  width:100%;border:1.5px solid #e0d8cc;border-radius:var(--rs);background:transparent;
  color:#9a8467;font:inherit;font-size:12px;font-weight:700;
  padding:10px 16px;cursor:pointer;touch-action:manipulation;
  transition:background .12s,border-color .12s,color .12s;
}
@media(hover:hover){.nsc-reset-btn:hover{background:#fff1e0;border-color:#c8a87a;color:#6e4f2a}}

/* ─── FLIGHT BOARD ─── */
#flight-board-root{
  max-width:680px;margin:10px auto 2px;padding:0 14px;
}
#flight-board-root:empty{display:none}
.flight-board{
  background:var(--bg);border:1px solid var(--bor);border-radius:var(--r);
  box-shadow:var(--sh0);overflow:hidden;
  animation:liveIn .22s cubic-bezier(0.34,1.1,0.64,1) both;
}
.fb-row{
  display:flex;align-items:center;gap:10px;
  padding:10px 12px;cursor:pointer;
  border-bottom:1px solid var(--bor);transition:background .12s;
}
.fb-row:last-child{border-bottom:none}
@media(hover:hover){.fb-row:hover{background:var(--hov)}}
.fb-row:active{background:var(--sur2)}
.fb-icon-col{
  width:28px;height:28px;border-radius:8px;background:var(--sur2);
  display:flex;align-items:center;justify-content:center;flex-shrink:0;
  color:var(--t2);
}
.fb-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.fb-top{display:flex;align-items:center;gap:6px}
.fb-flight{font-size:13px;font-weight:800;color:var(--t1)}
.fb-route{font-size:13px;font-weight:500;color:var(--t2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fb-meta{font-size:11px;color:var(--t3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fb-right{flex-shrink:0;display:flex;flex-direction:column;align-items:flex-end;gap:3px}
.fb-time{font-size:13px;font-weight:700;color:var(--t1)}
.fb-gate-chip{
  font-size:10px;font-weight:800;padding:2px 7px;border-radius:100px;
  background:var(--sur2);color:var(--t2);letter-spacing:.04em;
}

/* ─── TICKET MODAL ─── */
.ticket-modal{
  position:fixed;inset:0;z-index:1500;
  background:rgba(0,0,0,.38);
  display:flex;align-items:center;justify-content:center;
  padding:20px 14px;
  backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);
  animation:liveIn .2s ease both;
  overflow-y:auto;
}
.ticket-modal.hidden{display:none}
.ticket-card{
  width:100%;max-width:440px;
  background:#fff;border-radius:22px;
  box-shadow:0 24px 72px rgba(0,0,0,.22);
  overflow:hidden;
  animation:liveIn .24s cubic-bezier(0.34,1.12,0.64,1) both;
  flex-shrink:0;
}

/* Card header */
.tc-header{
  background:#f5eee2;
  border-bottom:1px solid #e8ddce;
  padding:16px 20px 14px;
  display:flex;align-items:center;justify-content:space-between;
}
.tc-header-left{display:flex;flex-direction:column;gap:2px}
.tc-header-title{
  font-size:11px;font-weight:850;letter-spacing:.14em;
  text-transform:uppercase;color:#9a8467;
}
.tc-header-sub{font-size:13px;font-weight:750;color:#2c261d}
.tc-header-close{
  width:32px;height:32px;border-radius:50%;border:none;
  background:#eee3d4;color:#5e4e39;
  font-size:18px;line-height:1;display:flex;align-items:center;justify-content:center;
}

/* Route section */
.tc-routes{
  display:flex;align-items:center;gap:8px;
  padding:20px 20px 16px;background:#fff;
}
.tc-airport{
  flex:1;min-width:0;display:flex;flex-direction:column;align-items:center;gap:4px;
}
.tc-airport.right{align-items:flex-end;text-align:right}
.tc-airport.left{align-items:flex-start}
.tca-code{
  width:80px;border:none;border-bottom:2px solid #e5e3df;
  font-size:36px;font-weight:900;letter-spacing:.02em;text-transform:uppercase;
  color:#1a1a1a;background:transparent;text-align:center;
  font-family:inherit;
}
.tca-code::placeholder{color:#c8c6c2;font-size:28px}
.tca-code:focus{outline:none;border-bottom-color:#2a5ba8}
.tca-city{
  width:100%;border:none;border-bottom:1px solid #eeece9;
  font-size:11px;font-weight:700;color:#666;background:transparent;
  text-align:center;padding:2px 4px;font-family:inherit;
}
.tca-city::placeholder{color:#bbb}
.tca-city:focus{outline:none;border-bottom-color:#2a5ba8}
.tca-label{font-size:9px;font-weight:850;letter-spacing:.1em;text-transform:uppercase;color:#aaa;margin-top:2px}
.tc-plane{
  flex-shrink:0;display:flex;flex-direction:column;align-items:center;gap:6px;
  padding:0 4px;
}
.tc-plane svg{color:#2a5ba8;flex-shrink:0}
.tc-flight-input{
  width:72px;border:1px solid #e5e3df;border-radius:6px;
  font-size:11px;font-weight:850;letter-spacing:.06em;text-transform:uppercase;
  color:#333;background:#f8f7f5;text-align:center;padding:4px 6px;font-family:inherit;
}
.tc-flight-input:focus{outline:none;border-color:#2a5ba8;background:#fff}
.ticket-card.view-mode input{
  pointer-events:none;cursor:default;
}
.ticket-card.view-mode input:focus{outline:none}

/* Time row */
.tc-times{
  display:flex;align-items:center;gap:6px;
  padding:0 20px 16px;background:#fff;
}
.tc-time-block{flex:1;display:flex;flex-direction:column;align-items:center;gap:3px}
.tc-time-block.mid{align-items:center;flex-shrink:0;width:90px}
.tcb-label{font-size:9px;font-weight:850;letter-spacing:.1em;text-transform:uppercase;color:#aaa}
.tcb-input{
  width:100%;border:1px solid #e5e3df;border-radius:8px;
  font-size:20px;font-weight:800;color:#1a1a1a;background:#f8f7f5;
  text-align:center;padding:7px 6px;font-family:inherit;
}
.tcb-input[type="date"]{font-size:12px;font-weight:700;color:#444;padding:8px 4px}
.tcb-input:focus{outline:none;border-color:#2a5ba8;background:#fff}

/* Perforated divider */
.tc-perf{
  position:relative;margin:0 0 0;
  display:flex;align-items:center;
  padding:0 20px;
}
.tc-perf::before,.tc-perf::after{
  content:"";position:absolute;top:50%;transform:translateY(-50%);
  width:22px;height:22px;border-radius:50%;background:#f6f5f3;
  border:1px solid #e5e3df;
}
.tc-perf::before{left:-11px}
.tc-perf::after{right:-11px}
.tc-perf-line{
  flex:1;border-top:2px dashed #e5e3df;
}

/* Details grid */
.tc-details{
  display:grid;grid-template-columns:1fr 1fr 1fr;
  gap:1px;background:#eeece9;
  margin:14px 0 0;
  border-top:1px solid #eeece9;
}
.tc-detail{
  background:#fff;padding:12px 14px;
  display:flex;flex-direction:column;gap:4px;
}
.tc-detail.full{grid-column:1/-1}
.tc-detail.half{grid-column:span 2}
.tcd-label{font-size:9px;font-weight:850;letter-spacing:.1em;text-transform:uppercase;color:#aaa}
.tcd-input{
  border:none;border-bottom:1px solid #e5e3df;background:transparent;
  font-size:14px;font-weight:750;color:#1a1a1a;font-family:inherit;
  padding:2px 0;width:100%;
}
.tcd-input::placeholder{color:#ccc;font-weight:500}
.tcd-input:focus{outline:none;border-bottom-color:#2a5ba8}

/* Card actions */
.tc-actions{
  display:flex;align-items:center;gap:8px;
  padding:14px 20px 18px;background:#fff;
  border-top:1px solid #eeece9;
}
.tc-btn-cancel{
  border:1.5px solid var(--bor);border-radius:var(--rs);background:var(--bg);
  color:var(--t2);font-size:13px;font-weight:750;font-family:inherit;
  padding:9px 16px;touch-action:manipulation;transition:background .13s;
}
@media(hover:hover){.tc-btn-cancel:hover{background:var(--hov)}}
.tc-btn-save{
  flex:1;border:none;border-radius:var(--rs);background:#2a5ba8;
  color:#fff;font-size:13px;font-weight:850;font-family:inherit;
  padding:9px 16px;touch-action:manipulation;transition:opacity .13s;
}
@media(hover:hover){.tc-btn-save:hover{opacity:.88}}
.tc-btn-edit{
  flex:1;border:none;border-radius:var(--rs);background:#2a5ba8;
  color:#fff;font-size:13px;font-weight:850;font-family:inherit;
  padding:10px 16px;touch-action:manipulation;transition:opacity .13s;
}
@media(hover:hover){.tc-btn-edit:hover{opacity:.88}}
.tc-btn-delete{
  border:1.5px solid var(--red);border-radius:var(--rs);background:transparent;
  color:var(--red);font-size:13px;font-weight:750;font-family:inherit;
  padding:9px 12px;touch-action:manipulation;transition:background .13s;
}
@media(hover:hover){.tc-btn-delete:hover{background:var(--red-bg)}}
.tc-actions .hidden{display:none}

@media(max-width:480px){
  .fb-thead,.fb-row{grid-template-columns:64px 1fr 0 50px 50px 42px}
  .fb-date{display:none}
  .tca-code{font-size:28px;width:66px}
  .tcb-input{font-size:17px}
}
