:root {
    --bg: #0f172a;
    --panel: #111827;
    --muted: #1f2937;
    --border: #374151;
    --text: #e5e7eb;
    --accent: #ffffff;
    --accent-2: #34d399;
    --warn: #f59e0b;
    --danger: #ef4444;
    --chip: #0b1224
}

html,
body {
    background: var(--bg);
    color: var(--text);
    margin: 0;
    font: 16px/1.5 system-ui, -apple-system, Segoe UI, Roboto
}

a {
    color: var(--accent);
    text-decoration: none
}

a:hover {
    text-decoration: underline
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 16px
}

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px
}

.header h1 {
    margin: 0;
    font-size: 24px
}

.menu-panel {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .35);
    backdrop-filter: saturate(1.1);
    margin-bottom: 16px;
}

.menu-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px
}

.toolbar-actions {
    display: flex;
    gap: 8px;
    align-items: center
}

.nav-btn {
    font-weight: 700;
    width: 40px;
    height: 34px;
    border-radius: 999px;
    padding: 0;
    display: grid;
    place-items: center
}

.nav-prev {
    margin-right: 4px
}

.nav-next {
    margin-left: 4px
}

.btn {
    cursor: pointer;
    border: 1px solid var(--border);
    background: linear-gradient(180deg, #111827, #0b1020);
    color: var(--text);
    padding: 8px 12px;
    border-radius: 10px;
    font-weight: 600;
    transition: transform .05s
}

.btn:hover {
    transform: translateY(-1px)
}

.btn-primary {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent) inset
}

.btn-danger {
    border-color: var(--danger);
    color: #fecaca
}

.btn-ghost {
    background: transparent
}

.week-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px
}

.day {
    background: var(--muted);
    border: 1px dashed var(--border);
    border-radius: 12px;
    min-height: 120px;
    padding: 10px;
    display: flex;
    flex-direction: column
}

.day.dragover {
    outline: 2px dashed var(--accent);
    outline-offset: -6px
}

.day-head {
    font-weight: 700;
    font-size: 14px;
    opacity: .9;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px
}

.day-actions {
    display: flex;
    gap: 6px
}

.day-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px
}

.chip {
    position: relative;
    display: inline-flex;
    align-items: flex-start;
    gap: 6px;
    padding: 2px 2px 2px 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    max-width: 100%;
    font-size: 14px;
    line-height: 1.35;
}

.chip a {
    color: var(--text);
    text-decoration: none
}

.chip a:hover {
    text-decoration: underline
}

.chip .x {
    position: absolute;
    top: 1px;
    right: -1px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    background: #0a0f1f;
    color: var(--text);
    font-weight: 700;
    line-height: 1;
    opacity: .85;
    cursor: pointer;
}

.chip .x:hover {
    background: #101735
}

.chip-note .note-text {
    font-style: italic;
    opacity: .95;
}

.chip-note {
    line-height: 1.2;
    padding: 6px 28px 6px 0;
}

.chip-note .x {
    top: -2px;
    right: -2px;
}

.recipe-draggable {
    display: inline-block;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px 10px;
    margin: 6px 4px;
    background: #0b1020;
    cursor: grab;
    user-select: none
}

.recipe-draggable:active {
    cursor: grabbing
}

.modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .55);
    z-index: 200
}

.modal.open {
    display: flex
}

.modal-card {
    width: min(800px, 92vw);
    max-height: 80vh;
    overflow: auto;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px
}

.modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px
}

.modal-body {
    font-size: 15px
}

.list {
    columns: 2;
    column-gap: 24px
}

.list li {
    break-inside: avoid;
    margin: 2px 0
}

.warn {
    color: var(--warn)
}

.sr-only {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden
}

.errors {
    margin-top: 8px;
    font-size: 13px;
    opacity: .9
}

.day-actions [data-day-note] {
    padding: 2px 6px;
    font-size: 12px;
    border-radius: 6px;
    line-height: 1.2;
}

.day-actions [data-day-note].btn.btn-ghost {
    border-color: transparent;
    background: transparent;
}

.day-head {
    margin-bottom: 6px;
}

.day-actions {
    gap: 4px;
}

.no-recipe {
    display: inline-block;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px 10px;
    margin: 6px 4px;
    background: #0b1020;
    cursor: grab;
    user-select: none;
}

.chip-title {
    display: inline-block;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px 10px;
    margin: 6px 4px;
    background: #0b1020;
    cursor: grab;
    user-select: none
}

.no-recipe:active {
    cursor: grabbing;
}

.chip {
    cursor: grab;
}

.chip:active {
    cursor: grabbing;
}