.h-value-wrap, .h-date-wrap { position: relative; display: inline-block; max-width: 100%; width: 100%; }
.h-value-wrap > input, .h-date-wrap > input { width: 100%; }
.h-value-display, .h-date-display { position: absolute; inset: 0; display: flex; align-items: center; padding-inline: .7em; pointer-events: auto; white-space: nowrap; overflow: hidden; color: inherit; cursor: text; }
.h-value-wrap:not(.h-editing) > input { color: transparent !important; caret-color: transparent; }
.h-value-wrap.h-editing > .h-value-display { display: none; }
.h-value-wrap.h-empty > .h-value-display { opacity: .5; }
.h-value-wrap > input.text-white + .h-value-display { color: #fff; }
.h-date-wrap > input { color: transparent !important; caret-color: transparent; cursor: pointer; }
.h-date-display { cursor: pointer; }
.h-picker { position: fixed; z-index: 100000; width: min(304px, calc(100vw - 16px)); max-height: min(410px, calc(100vh - 16px)); overflow: auto; padding: 12px; border: 1px solid #cbd5e1; border-radius: 12px; background: #fff; color: #172033; box-shadow: 0 12px 36px #0003; font-size: 14px; line-height: 1.5; }
.h-picker-head, .h-picker-actions, .h-time-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.h-picker-head { margin-bottom: 10px; }
.h-picker-jump { display: flex; gap: 8px; margin-bottom: 10px; }
.h-picker-jump select, .h-picker-jump input { min-width: 0; width: 50%; padding: 5px 8px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; color: #172033; }
.h-picker-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; text-align: center; }
.h-picker button { min-height: 36px; min-width: 34px; padding: 4px; border: 0; border-radius: 8px; background: transparent; color: inherit; cursor: pointer; }
.h-picker button:hover, .h-picker button:focus-visible { background: #dbeafe; outline: 2px solid #2563eb; }
.h-picker .h-today { box-shadow: inset 0 0 0 1px #2563eb; }
.h-picker .h-selected { background: #2563eb; color: #fff; }
.h-picker-actions { margin-top: 10px; border-top: 1px solid #e2e8f0; padding-top: 8px; }
.h-date-picker, .h-time-picker { width: min(390px, calc(100vw - 16px)); overflow: visible; }
.h-time-picker { width: min(310px, calc(100vw - 16px)); }
.h-wheel-title { display: block; text-align: center; margin: 4px 0 12px; }
.h-wheels { position: relative; display: flex; gap: 4px; height: 244px; direction: inherit; }
.h-wheels::after { content: ''; position: absolute; top: 110px; left: 0; right: 0; height: 44px; pointer-events: none; border-block: 1px solid #93c5fd; border-radius: 8px; background: #3b82f614; }
.h-wheel-frame { position: relative; display: flex; flex: 1; min-width: 0; flex-direction: column; align-items: stretch; }
.h-wheel-caption { height: 24px; text-align: center; font-size: 12px; color: #64748b; }
.h-wheel { min-width: 0; width: calc(100% - 26px); height: 220px; overflow-y: auto; overscroll-behavior: contain; scroll-snap-type: y mandatory; scrollbar-width: none; text-align: center; touch-action: pan-y; -webkit-overflow-scrolling: touch; direction: ltr; }
.h-wheel-controls { position: absolute; top: 72px; inset-inline-end: 0; display: flex; flex-direction: column; gap: 22px; }
.h-picker .h-wheel-controls button { min-width: 24px; min-height: 30px; padding: 0; font-size: 11px; color: #2563eb; }
.h-wheel::-webkit-scrollbar { display: none; }
.h-wheel-spacer { height: 88px; flex: none; }
.h-wheel-item { height: 44px; line-height: 44px; scroll-snap-align: center; cursor: pointer; color: #64748b; user-select: none; direction: ltr; }
.h-wheel-item.h-wheel-current { color: #0f172a; font-size: 18px; font-weight: 700; }
.h-wheel:focus-visible { outline: 2px solid #2563eb; border-radius: 8px; }
.h-time-row select { flex: 1; padding: 9px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; color: #172033; }
.dark .h-picker { border-color: #475569; background: #1e293b; color: #f8fafc; }
.dark .h-picker-jump select, .dark .h-picker-jump input, .dark .h-time-row select { border-color: #475569; background: #0f172a; color: #f8fafc; }
.dark .h-picker-actions { border-color: #475569; }
.dark .h-wheel-item { color: #94a3b8; }
.dark .h-wheel-item.h-wheel-current { color: #f8fafc; }
@media (max-width: 640px) {
    .h-date-picker, .h-time-picker { top: auto !important; bottom: max(8px, env(safe-area-inset-bottom)); left: 8px !important; width: calc(100vw - 16px); max-height: calc(100vh - 16px); }
    .h-wheel { width: 100%; }
    .h-wheel-controls { display: none; }
}
