:root {
    --border: #b9c1ca;
    --muted: #5f6b76;
    --text: #17202a;
    --background: #ffffff;
    --surface: #f6f8fa;
    --busy: #d8e8ff;
    --busy-border: #3b6fb6;
    --hour-line: rgba(23, 32, 42, 0.08);
    --radius: 6px;
    --space-sm: 0.5rem;
    --space-md: 1rem;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--background);
    color: var(--text);
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    line-height: 1.4;
}

main {
    width: min(1180px, calc(100% - 2rem));
    margin: 2rem auto;
}

h1 {
    margin: 0 0 0.25rem;
    font-size: 1.8rem;
}

p {
    margin: 0 0 1rem;
    color: var(--muted);
}

button,
select {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: white;
    color: black;
    font: inherit;
    padding: 0.35rem 0.55rem;
}

button {
    cursor: pointer;
}

button:hover {
    background: var(--surface);
}

.panel {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--space-md);
}

.summary-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.status {
    font-weight: 600;
}

.meta {
    color: var(--muted);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.timezone {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--muted);
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin: var(--space-md) 0;
}

.calendar {
    display: grid;
    grid-template-columns: 3.75rem repeat(7, minmax(7rem, 1fr));
    overflow-x: auto;
    border-top: 1px solid var(--border);
    border-left: 1px solid var(--border);
}

.time-column,
.day-heading,
.day-column {
    border-right: 1px solid var(--border);
}

.day-heading {
    min-width: 7rem;
    padding: var(--space-sm);
    text-align: center;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}

.grid-times {
    display: grid;
    grid-template-rows: repeat(24, 2.25rem);
    color: var(--muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.75rem;
    text-align: right;
}

.grid-times div {
    height: 2.25rem;
    padding-right: var(--space-sm);
    border-bottom: 1px solid var(--hour-line);
}

.day-column {
    position: relative;
    display: grid;
    grid-template-rows: repeat(24, 2.25rem);
    min-width: 7rem;
    background: white;
}

.hour-line {
    border-bottom: 1px solid var(--hour-line);
}

.busy-block {
    position: absolute;
    left: 0.25rem;
    right: 0.25rem;
    overflow: hidden;
    border: 1px solid var(--busy-border);
    border-radius: 4px;
    background: var(--busy);
    color: black;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.75rem;
    line-height: 1.2;
    padding: 0.2rem;
}

.now-line {
    position: absolute;
    left: 0;
    right: 0;
    z-index: 2;
    height: 0;
    border-top: 2px solid #d12b2b;
    pointer-events: none;
}

.now-line span {
    position: absolute;
    left: -0.3rem;
    top: -0.3rem;
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: #d12b2b;
}

@media (max-width: 720px) {
    main {
        width: calc(100% - 1rem);
        margin: 1rem auto;
    }

    .panel {
        padding: var(--space-sm);
    }
}
