.course-history{max-width:100%;margin:auto}.history-controls{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;align-items:end}.course-history label{display:grid;gap:5px}.course-history select,.course-history input,.course-history button{box-sizing:border-box;width:100%;min-width:0;min-height:44px;border:1px solid var(--line);border-radius:9px;background:white;color:var(--ink);padding:8px;font:inherit}.course-history form:not([hidden]){display:grid;gap:10px;margin-top:14px}.course-history [data-history-notice]{font-size:13px;line-height:1.6;color:var(--muted)}.course-history h3{font-size:16px;margin:20px 0 10px}.course-history .period-card{margin-bottom:12px}.history-warning{font-size:13px;color:#875514}

.course-history [data-history-notice]:empty{display:none}.history-query-help{grid-column:1/-1;width:100%;margin:0 0 8px;font-size:12px;line-height:1.6}

.course-history .history-controls select,.course-history .history-controls button,.course-history .history-single-subject{height:44px;min-height:44px;max-height:44px;margin:0;box-sizing:border-box}.course-history .history-single-subject{display:flex;align-items:center;padding:8px;border:1px solid var(--line);border-radius:9px;background:#fff;color:var(--ink)}.course-history [hidden]{display:none!important}.course-history form[data-history-form]:not([hidden]){grid-template-columns:minmax(0,1fr) 84px;align-items:end}.course-history form[data-history-form] label{min-width:0}.course-history form[data-history-form] input,.course-history form[data-history-form] button{height:44px;min-height:44px;max-height:44px;margin:0;box-sizing:border-box}.course-history input[type=date]{max-width:100%;width:100%}

/* Keep the iPhone native date editor inside a fixed-size grid item. */
.course-history form[data-history-form] .history-date-label{display:flex;flex-direction:column;gap:5px;min-width:0;width:100%;margin:0}
.course-history .history-date-box{display:block;position:relative;box-sizing:border-box;width:100%;min-width:0;height:44px;flex:0 0 44px;overflow:hidden;border:1px solid var(--line);border-radius:9px;background:#fff}
.course-history form[data-history-form] .history-date-box input[type=date]{display:block;position:absolute;inset:0;appearance:none;-webkit-appearance:none;box-sizing:border-box;width:100%;min-width:0;max-width:100%;height:100%;min-height:0;max-height:100%;margin:0;padding:8px;border:0;border-radius:0;font-size:16px;line-height:26px;background:transparent}
.course-history .history-date-box input::-webkit-date-and-time-value{min-height:26px;text-align:left}
.course-history .history-date-box input::-webkit-datetime-edit{padding:0}
.course-history form[data-history-form]>button{align-self:end;width:100%;min-width:0}

.half-hour-entry{display:block;padding:5px 0;border-bottom:1px dashed #b7c9c1;overflow-wrap:anywhere}.half-hour-entry:last-child{border-bottom:0}
