* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
	font-family: Roboto, system-ui, -apple-system, "Segoe UI", sans-serif;
	background: #F4F4F4;
	color: #002147;
	font-size: 14px;
	line-height: 1.35;
	-webkit-font-smoothing: antialiased;
	min-height: 100vh;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; }
svg { display: inline-block; vertical-align: middle; flex: 0 0 auto; }
[hidden] { display: none !important; }

.shell { max-width: 760px; margin: 0 auto; min-height: 100vh; position: relative; }

.top { position: sticky; top: 0; z-index: 10; background: #002147; padding-top: env(safe-area-inset-top); }
.embed .top { display: none; }
.topbar {
	height: 56px; padding: 0 8px 0 4px;
	display: flex; align-items: center; gap: 4px;
	color: #fff;
}
.topbar h1 { font-size: 20px; font-weight: 700; flex: 1; margin-left: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .btn { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 50%; color: #fff; }
.topbar .btn:active { background: rgba(255,255,255,.12); }
.topbar .q {
	flex: 1; height: 40px; border-radius: 20px; border: 0; padding: 0 14px; margin-left: 4px;
	background: rgba(255,255,255,.14); color: #fff; outline: none; font-size: 15px;
}
.topbar .q::placeholder { color: rgba(255,255,255,.6); }

.tabs { display: flex; padding: 0 8px; }
.tabs a {
	flex: 1; text-align: center; color: rgba(255,255,255,.7); text-decoration: none;
	font-size: 13px; font-weight: 500; padding: 12px 0 10px;
	border-bottom: 3px solid transparent; white-space: nowrap;
}
.tabs a.on { color: #fff; border-color: #FF9B35; }

main { padding: 12px 12px calc(96px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 10px; }

.card {
	background: #fff; border-radius: 14px; padding: 14px;
	box-shadow: 0 1px 2px rgba(0,33,71,.08);
}
a.card { display: block; text-decoration: none; color: inherit; }
a.card:active { background: #F9FAFC; }
.card h3 { font-size: 16px; font-weight: 700; margin-bottom: 10px; }
.card.alert { box-shadow: inset 4px 0 0 #E5484D, 0 1px 2px rgba(0,33,71,.08); }
.card.warn { box-shadow: inset 4px 0 0 #FF9B35, 0 1px 2px rgba(0,33,71,.08); }

.o-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; gap: 8px; }
.o-time { font-size: 18px; font-weight: 700; }
.o-time small { font-size: 13px; color: #4A5A73; font-weight: 500; margin-left: 6px; }
.o-route { font-size: 14px; margin-bottom: 6px; }
.o-route b { font-weight: 600; }
.o-meta { font-size: 12.5px; color: #4A5A73; display: flex; gap: 4px 10px; flex-wrap: wrap; }
.o-note { margin-top: 8px; font-size: 12.5px; font-weight: 600; }
.o-note.red { color: #D13438; }
.o-note.orange { color: #C76A00; }

.pill { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.p-new { background: #E8ECF2; color: #4A5A73; }
.p-sent { background: #E1EEFF; color: #0B5CD5; }
.p-accepted { background: #DDF5E4; color: #13803A; }
.p-declined { background: #FDE2E2; color: #C42B2F; }
.p-completed, .p-cancelled { background: #E6E6E6; color: #555; }

.day { font-size: 12px; font-weight: 700; color: #4A5A73; text-transform: uppercase; letter-spacing: .6px; margin: 6px 4px 0; }
.empty { text-align: center; color: #4A5A73; padding: 48px 16px; font-size: 15px; }

.fab {
	position: fixed; right: max(16px, calc(50vw - 364px)); bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 5;
	height: 56px; padding: 0 22px 0 18px; border-radius: 16px;
	background: #FF9B35; color: #002147; font-weight: 700; font-size: 14px; text-decoration: none;
	display: flex; align-items: center; gap: 8px;
	box-shadow: 0 4px 12px rgba(0,0,0,.2);
	text-transform: uppercase; letter-spacing: .6px;
}

/* form */
.field { position: relative; display: block; flex: 1; min-width: 0; }
.field > span {
	position: absolute; top: -8px; left: 10px; padding: 0 4px; z-index: 1;
	background: #fff; font-size: 12px; color: #4A5A73; pointer-events: none;
}
.field input, .field select, .field textarea {
	display: block; width: 100%; height: 52px; padding: 0 14px;
	border: 1px solid #D9D9D9; border-radius: 8px; background: #fff;
	font-size: 15px; outline: none; -webkit-appearance: none; appearance: none;
}
.field input[type=date], .field input[type=time] { line-height: 50px; }
.field input::-webkit-date-and-time-value { text-align: left; }
.field select {
	padding-right: 36px;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='%234A5A73'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E") no-repeat right 10px center;
}
.field textarea { height: 96px; padding: 14px; resize: vertical; line-height: 1.4; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #002147; border-width: 2px; padding-left: 13px; }
.field textarea:focus { padding-top: 13px; }
.field.err input, .field.err select, .field.err textarea { border-color: #D13438; border-width: 2px; }
.hint { font-size: 12px; color: #4A5A73; margin-top: -6px; }

.sug {
	position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 20;
	background: #fff; border-radius: 10px; box-shadow: 0 6px 20px rgba(0,33,71,.2);
	max-height: 320px; overflow-y: auto;
}
.sug button { display: block; width: 100%; text-align: left; padding: 10px 14px; border-bottom: 1px solid #EEF1F5; }
.sug button:last-child { border-bottom: 0; }
.sug button.on, .sug button:hover { background: #F2F5FA; }
.sug b { display: block; font-weight: 600; font-size: 14.5px; }
.sug small { display: block; color: #4A5A73; font-size: 12.5px; margin-top: 1px; }

.route-info { font-size: 13.5px; color: #4A5A73; margin-top: -4px; padding: 0 2px; }
.route-info b { color: #002147; font-size: 15px; }
.route-info a { color: #1F5FD1; font-weight: 500; text-decoration: none; white-space: nowrap; }
.route-info ol { margin: 6px 0 0 18px; font-size: 12.5px; }
.route-info.err { color: #D13438; font-weight: 500; }
.route-map { height: 260px; border-radius: 10px; overflow: hidden; background: #EEF1F5; }

.sub { font-size: 12px; font-weight: 700; color: #4A5A73; text-transform: uppercase; letter-spacing: .6px; }
.seg { display: flex; gap: 3px; padding: 3px; border-radius: 10px; background: #EEF1F5; }
.seg button { flex: 1; padding: 8px 4px; border-radius: 8px; font-size: 12.5px; font-weight: 500; color: #4A5A73; line-height: 1.2; }
.seg button.on { background: #fff; color: #002147; font-weight: 700; box-shadow: 0 1px 2px rgba(0,33,71,.15); }
.tfs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.tf {
	display: flex; flex-direction: column; gap: 1px; text-align: left; min-width: 0;
	padding: 6px 10px; border: 1.5px solid #D9D9D9; border-radius: 8px; background: #fff;
}
.tf.on { border-color: #FF9B35; box-shadow: inset 0 0 0 1px #FF9B35; background: #FFF8F0; }
.tf b { font-size: 12.5px; font-weight: 500; color: #4A5A73; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tf-p { font-size: 14.5px; font-weight: 700; white-space: nowrap; }

.row { display: flex; gap: 8px; align-items: center; }
.circ {
	width: 36px; height: 36px; border-radius: 50%; flex: 0 0 36px;
	display: flex; align-items: center; justify-content: center;
	background: #FF9B35; color: #002147; font-size: 22px; font-weight: 500; line-height: 1;
}
.circ.minus { background: #727272; color: #fff; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.hr { height: 1px; background: #D9D9D9; margin: 2px 0; }
.chk { display: flex; align-items: center; gap: 12px; font-size: 15px; padding: 4px 2px; cursor: pointer; user-select: none; }
.chk input { position: absolute; opacity: 0; pointer-events: none; }
.box {
	width: 20px; height: 20px; border: 2px solid #002147; border-radius: 3px; flex: 0 0 20px;
	display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 13px; color: transparent;
}
.chk input:checked + .box { background: #FF9B35; border-color: #FF9B35; color: #002147; }
.chk input:focus-visible + .box { outline: 2px solid #0B5CD5; outline-offset: 2px; }

.btn-main {
	height: 52px; border-radius: 8px; background: #FF9B35; color: #002147; width: 100%;
	font-weight: 700; font-size: 14px; letter-spacing: .8px; text-transform: uppercase; text-decoration: none;
	display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-out {
	height: 48px; border-radius: 8px; border: 1.5px solid #002147; color: #002147; width: 100%;
	font-weight: 600; font-size: 14px; text-decoration: none; padding: 0 10px;
	display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-out.red { border-color: #D13438; color: #D13438; }
.btn-main:disabled, .btn-out:disabled { opacity: .5; cursor: default; }
.btn-row { display: flex; gap: 8px; }
.btn-row > * { flex: 1; }
.btn-row .btn-out { height: 52px; }

.kv { display: grid; grid-template-columns: 110px 1fr; gap: 8px 10px; font-size: 14px; }
.kv dt { color: #4A5A73; }
.kv dd { font-weight: 500; word-break: break-word; white-space: pre-line; }
.kv dd a { color: #0B5CD5; text-decoration: none; }

.route { position: relative; padding-left: 22px; display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.route::before { content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 2px; background: #D9D9D9; }
.route div { position: relative; }
.route div::before {
	content: ""; position: absolute; left: -21px; top: 4px; width: 12px; height: 12px;
	border-radius: 50%; background: #fff; border: 3px solid #002147; box-sizing: border-box;
}
.route div.reg::before { border-color: #8a96a8; }
.route div.end::before { background: #FF9B35; border-color: #FF9B35; }
.route small { display: block; color: #4A5A73; font-size: 12px; }

.drv { display: flex; gap: 12px; align-items: center; min-width: 0; }
.ava {
	width: 44px; height: 44px; border-radius: 50%; background: #E1E7F0; flex: 0 0 44px;
	display: flex; align-items: center; justify-content: center; font-weight: 700; color: #002147;
}
.drv .nm { font-weight: 700; font-size: 15px; }
.drv .sub { font-size: 12.5px; color: #4A5A73; }

.link-box {
	margin-top: 12px; background: #F4F6F9; border: 1px dashed #B8C3D3; border-radius: 8px;
	padding: 10px 12px; font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; color: #002147;
	word-break: break-all; user-select: all;
}
.link-meta { font-size: 12px; color: #4A5A73; margin-top: 6px; }
.notice { margin-top: 10px; padding: 10px 12px; border-radius: 8px; font-size: 13px; font-weight: 500; }
.notice.orange { background: #FFF1E2; color: #8A4B00; }
.notice.red { background: #FDE2E2; color: #A3262A; }
.notice.green { background: #DDF5E4; color: #0E6A30; }
.notice.blue { background: #E8F0FE; color: #1F3B70; }
.notice.blue a { color: #1F5FD1; font-weight: 600; }

.timeline { display: flex; flex-direction: column; gap: 10px; }
.timeline div { display: flex; gap: 10px; font-size: 13.5px; align-items: flex-start; }
.timeline time { color: #4A5A73; width: 42px; flex: 0 0 42px; font-variant-numeric: tabular-nums; }
.timeline time small { display: block; font-size: 11px; }
.dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 4px; flex: 0 0 10px; background: #8a96a8; }
.dot.blue { background: #0B5CD5; }
.dot.green { background: #13803A; }
.dot.red { background: #C42B2F; }
.dot.orange { background: #FF9B35; }

/* bottom sheet, drawer */
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 20; animation: fade .15s; }
.sheet {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 21; background: #fff;
	max-width: 560px; margin: 0 auto; max-height: 90vh; overflow: auto;
	border-radius: 20px 20px 0 0; padding: 10px 18px calc(24px + env(safe-area-inset-bottom));
	animation: up .2s ease-out;
}
.grip { width: 36px; height: 4px; background: #ccc; border-radius: 2px; margin: 0 auto 14px; }
.sheet h4 { font-size: 16px; font-weight: 700; margin-bottom: 10px; }
.msg-prev {
	background: #F4F6F9; border-radius: 10px; padding: 12px; font-size: 13.5px; margin-bottom: 18px;
	white-space: pre-line; word-break: break-word;
}
.msg-prev a { color: #0B5CD5; text-decoration: none; word-break: break-all; }
.apps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; text-align: center; font-size: 12px; color: #333; }
.apps > * { display: block; text-decoration: none; color: inherit; }
.apps i {
	display: flex; width: 56px; height: 56px; border-radius: 16px; margin: 0 auto 6px;
	align-items: center; justify-content: center; color: #fff; font-style: normal; font-weight: 800; font-size: 18px;
}
.drawer {
	position: fixed; top: 0; bottom: 0; left: 0; width: 280px; max-width: 85vw; z-index: 21;
	background: #fff; padding: calc(16px + env(safe-area-inset-top)) 0 16px; animation: slide .2s ease-out;
	display: flex; flex-direction: column;
}
.drawer .who { padding: 8px 20px 16px; border-bottom: 1px solid #EEE; margin-bottom: 8px; }
.drawer .who b { display: block; font-size: 17px; }
.drawer .who small { color: #4A5A73; }
.drawer a, .drawer button { display: flex; align-items: center; gap: 14px; padding: 14px 20px; font-size: 15px; text-decoration: none; text-align: left; width: 100%; }
.drawer a.on { background: #FFF1E2; font-weight: 700; }
.drawer .sp { flex: 1; }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
@keyframes slide { from { transform: translateX(-100%); } }

.search {
	height: 48px; border-radius: 24px; background: #fff; border: 1px solid #D9D9D9;
	display: flex; align-items: center; gap: 10px; padding: 0 16px; color: #8a96a8;
}
.search input { border: 0; outline: none; flex: 1; font-size: 15px; background: none; min-width: 0; }
.list { background: #fff; border-radius: 14px; overflow: hidden; }
.list .it { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-bottom: 1px solid #EEE; text-decoration: none; cursor: pointer; width: 100%; text-align: left; }
.list .it:last-child { border-bottom: 0; }
.list .it.off { opacity: .55; }
.list .it .rt { margin-left: auto; font-size: 12px; color: #4A5A73; text-align: right; flex: 0 0 auto; max-width: 40%; }
.list .it .rt.bad { color: #C42B2F; }
.list .it .rt.free { color: #13803A; }
.radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid #4A5A73; flex: 0 0 20px; }
.it.sel .radio { border: 6px solid #FF9B35; }

.set { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid #EEE; font-size: 15px; }
.set:last-child { border-bottom: 0; }
.set small { display: block; color: #4A5A73; font-size: 12.5px; margin-top: 2px; }
.set input {
	width: 72px; height: 40px; border: 1px solid #D9D9D9; border-radius: 8px; text-align: center;
	font-weight: 700; font-size: 15px; outline: none;
}
.set input:focus { border-color: #002147; }
.set .unit { display: inline-block; width: 30px; color: #4A5A73; font-size: 13px; margin-left: 6px; }

.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: #002147; }
.login form { width: 100%; max-width: 360px; }
.login .logo { color: #fff; text-align: center; margin-bottom: 24px; }
.login .logo b { display: block; font-size: 24px; }
.login .logo small { color: #FF9B35; font-size: 14px; letter-spacing: .5px; }
.form-err { color: #D13438; font-size: 13.5px; font-weight: 500; }

.toast {
	position: fixed; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 30;
	background: #1F2A3A; color: #fff; padding: 12px 18px; border-radius: 10px; font-size: 14px;
	max-width: calc(100vw - 32px); box-shadow: 0 4px 16px rgba(0,0,0,.25); animation: fade .15s;
}
.toast.bad { background: #A3262A; }
.loading { text-align: center; padding: 40px; color: #8a96a8; }
