/* Schedule editor. Plain system fonts, no outside files (the page's security policy allows only this site). */
:root { --navy: #041831; --bronze: #9a5c18; --peach: #fdc58a; --line: #d9d4ca; --bg: #f7f4ee; --text: #1a1f29; --muted: #5b6270; --red: #a32020; --green: #1f6b3a; }
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--text); background: var(--bg); padding-bottom: 6rem; }
h1, h2, h3 { line-height: 1.25; margin: 0; }
h1 { font-size: 1.25rem; }
h2 { font-size: 1.1rem; }
a { color: var(--bronze); }
:focus-visible { outline: 3px solid var(--bronze); outline-offset: 2px; }
[hidden] { display: none !important; }
.muted { color: var(--muted); margin: 0; font-size: .9rem; }

.top { background: var(--navy); color: #fff; }
.top .muted { color: #c9d1dd; }
.top a { color: var(--peach); }
.top__inner { max-width: 60rem; margin: 0 auto; padding: .9rem 1rem; display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; }
.top__user { margin-left: auto; display: flex; gap: 1rem; align-items: center; font-size: .9rem; }

main { max-width: 60rem; margin: 0 auto; padding: 1rem; }
.notice { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 1rem; }
.notice--error { border-color: var(--red); color: var(--red); }
.help { color: var(--muted); }

.tabs { display: flex; gap: .3rem; flex-wrap: wrap; border-bottom: 2px solid var(--line); margin-bottom: 1rem; }
.tabs [role="tab"] { font: inherit; border: 0; background: none; padding: .7rem 1rem; cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; color: var(--muted); }
.tabs [aria-selected="true"] { color: var(--text); border-bottom-color: var(--bronze); font-weight: 600; }

.card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.1rem; margin: 0 0 1rem; }
.card__head { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-bottom: .6rem; }
.card__head h3 { font-size: 1.05rem; margin-right: auto; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: .8rem 1rem; }
.field { display: flex; flex-direction: column; gap: .25rem; }
.field--wide { grid-column: 1 / -1; }
.field > span { font-weight: 600; font-size: .9rem; }
.field small, .hint { color: var(--muted); font-size: .82rem; }
input[type="text"], input[type="url"], input[type="date"], input[type="time"], select, textarea {
  font: inherit; padding: .5rem .6rem; border: 1px solid #b9b2a5; border-radius: 8px; background: #fff; min-height: 2.6rem; width: 100%; }
textarea { min-height: 4.5rem; resize: vertical; }
.check { display: flex; gap: .5rem; align-items: center; font-weight: 600; font-size: .9rem; min-height: 2.6rem; }
.check input { width: 1.2rem; height: 1.2rem; }
.months { display: grid; grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr)); gap: .2rem .8rem; }
.months .check { font-weight: 400; min-height: 2rem; }
.row { display: flex; gap: .5rem; align-items: center; margin-bottom: .4rem; }
.row input { max-width: 22rem; }
details { margin-top: .9rem; border-top: 1px solid var(--line); padding-top: .6rem; }
summary { cursor: pointer; font-weight: 600; }
.address { font-family: ui-monospace, Consolas, monospace; font-size: .85rem; }

.btn { font: inherit; padding: .55rem 1rem; border-radius: 999px; border: 1px solid var(--bronze); background: #fff; color: var(--bronze); cursor: pointer; min-height: 2.6rem; }
.btn:hover { background: #fbf3e8; }
.btn--small { padding: .3rem .8rem; min-height: 2.2rem; font-size: .9rem; }
.btn--primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn--primary:hover { background: #0a2547; }
.btn--danger { border-color: var(--red); color: var(--red); }

.invalid { border-color: var(--red) !important; }
.field-error { color: var(--red); font-size: .85rem; margin: .15rem 0 0; }
.errors { border: 2px solid var(--red); background: #fff5f5; border-radius: 10px; padding: .8rem 1rem; margin-bottom: 1rem; }
.errors ul { margin: .4rem 0 0; padding-left: 1.2rem; }
.errors a { color: var(--red); }

.preview-title { margin-top: 1.5rem; }
.preview { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 1rem; margin-top: .6rem; }
.preview article { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: .8rem 1rem; }
.preview ul { margin: .4rem 0 0; padding-left: 1.1rem; }

.savebar { position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--line); padding: .7rem 1rem; display: flex; gap: 1rem; align-items: center; justify-content: flex-end; box-shadow: 0 -6px 20px -12px rgba(0,0,0,.3); }
.savebar__status { margin: 0 auto 0 0; max-width: 40rem; }
.savebar__status.is-ok { color: var(--green); }
.savebar__status.is-error { color: var(--red); }

.confirm { border: 0; border-radius: 12px; padding: 1.2rem 1.4rem; max-width: 30rem; }
.confirm::backdrop { background: rgba(1, 6, 15, .5); }
.confirm__buttons { display: flex; gap: .6rem; justify-content: flex-end; margin-top: 1rem; }

@media (max-width: 600px) { .savebar { justify-content: space-between; } .top__user { margin-left: 0; } }
