@import url('https://fonts.googleapis.com/css2?family=Titillium+Web:wght@300;400;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Roboto+Condensed&family=Roboto&family=Noto+Sans&display=swap');

:root {
    /* Mapped from recipe.css */
    --kk-font: 'Titillium Web', sans-serif;
    --kk-page-bg: #f6eddf;
    --kk-card-bg: #fffdf8;
    --kk-card-border: #e4cfb1;
    --kk-shadow: 0 15px 35px rgba(123, 84, 46, 0.12);
    --kk-brown: #6b4c2e;
    --kk-brown-dark: #4b2c16;
    --kk-gold: #e5b543;
    --kk-gold-muted: #f4e3c3;
    --kk-table-head: #a66a2c;
    --kk-table-alt: #fbf4e8;
    --kk-table-alt-strong: #f5ead7;
    --kk-border: #eadbc6;

    /* Legacy/Derived or specific to Editor */
    --kk-primary: var(--kk-brown);
    --kk-accent: var(--kk-gold);
    --kk-header-bg: var(--kk-table-head);
    --kk-edit-bg: #fff8e1;
    /* --kk-shadow overridden above */
    /* --kk-border overridden above */
    /* --kk-card-bg overridden above */
    --kk-level1: #b65723;
    --kk-level2: #d27d13;
}

body.page-template-page-my-recipes {
    background: var(--kk-page-bg);
    font-family: var(--kk-font);
    color: var(--kk-brown-dark);
}

/* Recipe footer buttons (single recipe page) */
.kk-recipe-footer-btn {
    display: inline-block;
    padding: 12px 26px;
    background: #f4c84b;
    color: #6b3a00;
    border: 2px solid #d9a743;
    border-radius: 10px;
    text-decoration: none;
    font-family: 'Roboto', Arial, sans-serif;
    font-size: 15px;
    margin: 0 8px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.kk-recipe-footer-btn:hover,
.kk-recipe-footer-btn:focus {
    background: #8b4a00;
    color: #fff3df;
    border-color: #8b4a00;
}

.kk-my-recipes-page {
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px 12px 32px;
    box-sizing: border-box;
}

#recipe-output {
    display: flex;
    justify-content: center;
}

.kk-recipe-container-box {
    width: min(100%, 800px);
    background: #ffffff;
    border: 1px solid var(--kk-border);
    border-radius: 12px;
    box-shadow: var(--kk-shadow);
    padding: 16px 18px 18px;
}

#kk-my-recipe-editor {
    position: relative;
}

/* Toolbar */
#kk-my-recipe-editor .toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    padding: 10px 16px;
    background: #f4f4f4;
    border: 1px solid #d6d6d6;
    border-radius: 10px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

#kk-my-recipe-editor .toolbar .left,
#kk-my-recipe-editor .toolbar .right {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
}

/* Stack label above control (applies everywhere, not just on .php page) */
#kk-my-recipe-editor .toolbar .kk-control {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
}

#kk-my-recipe-editor .toolbar label,
#kk-my-recipe-editor .kk-control-label {
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

#kk-my-recipe-editor .toolbar select,
#kk-my-recipe-editor .toolbar input,
#kk-my-recipe-editor .kk-control select,
#kk-my-recipe-editor .kk-control input {
    padding: 6px 12px;
    border: 1px solid #cccccc;
    border-radius: 8px;
    height: 36px;
    font-size: 15px;
    background: #fff;
}

#kk-my-recipe-editor .toolbar button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 700;
    font-size: 14px;
    transition: 0.2s;
}

#kk-my-recipe-start-edit {
    background: var(--kk-header-bg);
    color: #fff;
}

#kk-my-recipe-start-edit:hover {
    background: #8d6a3e;
}

#kk-my-recipe-save {
    background: #4caf50;
    color: #fff;
}

#kk-my-recipe-save:hover {
    background: #45a049;
}

#kk-my-recipe-cancel {
    background: #9e9e9e;
    color: #fff;
}

#kk-my-recipe-cancel:hover {
    background: #757575;
}

/* Editor controls (buttons, drag, add menu) pulled from original REZ16 styles */
#kk-my-recipe-editor .btn-row {
    border: none;
    background: #ddd;
    color: #555;
    border-radius: 3px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    font-weight: bold;
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

#kk-my-recipe-editor .btn-row:hover:not(:disabled) {
    background: #ccc;
}

#kk-my-recipe-editor .btn-row:disabled {
    opacity: 0.3;
    cursor: default;
    background: #eee;
    color: #bbb;
}

#kk-my-recipe-editor .btn-add {
    background: #81c784;
    color: white;
}

#kk-my-recipe-editor .btn-row[data-action="deleteRow"] {
    background: #e57373;
    color: white;
}

#kk-my-recipe-editor .btn-sum {
    background: #1976d2;
    color: white;
    border: none;
    border-radius: 3px;
    width: 22px;
    height: 26px;
    cursor: pointer;
    font-weight: bold;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

#kk-my-recipe-editor .btn-sum:hover {
    background: #1565c0;
}

#kk-my-recipe-editor .drag-handle {
    cursor: grab;
    color: #aaa;
    font-size: 35px !important;
    user-select: none;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    padding-top: 2px;
}

#kk-my-recipe-editor .drag-handle:active {
    cursor: grabbing;
    color: var(--kk-primary);
}

#kk-my-recipe-editor tr.dragging {
    opacity: 0.4;
    background: #f0f0f0;
}

#kk-my-recipe-editor tr.drop-target {
    border-top: 4px solid #d32f2f !important;
}

#kk-my-recipe-editor .btn-group-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1px;
    flex-wrap: nowrap;
}

#kk-my-recipe-editor .basis-with-sum {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 2px;
    width: 100%;
}

#kk-my-recipe-editor .basis-with-sum input.input-display {
    width: 60px;
    min-width: 60px;
    text-align: right;
    padding: 4px 4px;
}

#kk-my-recipe-editor .kk-row-type {
    color: white;
    border: none;
    border-radius: 3px;
    width: 32px !important;
    height: 32px !important;
    padding: 0 !important;
    flex-shrink: 0;
    cursor: pointer;
    font-size: 16px;
    margin-top: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

#kk-my-recipe-editor .kk-row-type.kk-type-ingredient {
    font-size: 16px;
}

#kk-my-recipe-editor .kk-row-type.kk-type-spacer {
    width: 24px !important;
    height: 24px !important;
    margin-top: 0;
}

#kk-my-recipe-editor .kk-row-type img {
    width: 20px;
    height: 20px;
    min-width: 20px;
    object-fit: contain;
    display: block;
}

#kk-my-recipe-editor .kk-row-main {
    display: flex;
    align-items: flex-start;
    gap: 5px;
    width: 100%;
}

#kk-my-recipe-add-menu {
    display: none;
    position: absolute;
    background: white;
    border: 1px solid #ccc;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    z-index: 1000;
    padding: 5px 0;
    max-width: 200px;
}

#kk-my-recipe-add-menu button {
    display: block;
    width: 100%;
    padding: 8px 15px;
    text-align: left;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 14px;
    color: #333;
}

#kk-my-recipe-add-menu button:hover {
    background-color: #f0f0f0;
    color: var(--kk-primary);
}

/* Header */
#kk-my-recipe-editor .header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-bottom: 24px;
    text-align: center;
}

#kk-my-recipe-titleInput {
    flex: 0 1 auto;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    border-radius: 0;
    font-size: 48px !important;
    text-align: center;
    font-weight: 700;
    color: #8d4514 !important;
    font-family: 'Roboto', Arial, sans-serif;
    outline: none;
    min-width: 50px;
}

#kk-my-recipe-subtitleInput {
    flex: 0 1 auto;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    border-radius: 0;
    font-size: 24px !important;
    text-align: center;
    font-weight: 400;
    color: #4e342e !important;
    font-family: 'Roboto', Arial, sans-serif;
    outline: none;
    font-style: italic;
    min-width: 50px;
}

#kk-my-recipe-titleInput[readonly],
#kk-my-recipe-subtitleInput[readonly] {
    cursor: default;
    text-overflow: ellipsis;
}

#kk-my-recipe-editor.editing #kk-my-recipe-titleInput,
#kk-my-recipe-editor.editing #kk-my-recipe-subtitleInput {
    padding: 6px;
    border: 1px solid var(--kk-accent);
    background: var(--kk-edit-bg);
    border-radius: 4px;
}

/* Table base - Aligned with recipe.css */
.recipe-table {
    width: 100%;
    border-collapse: separate;
    /* Required for border-radius on TR/TH */
    border-spacing: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.1);
    table-layout: fixed;
    border: 1px solid #d5c4ad;
    overflow: hidden;
}

.recipe-table th {
    background-color: var(--kk-border);
    /* Matches #eadbc6 */
    color: #4e342e;
    font-weight: 700;
    font-family: 'Roboto', Arial, sans-serif;
    font-size: 14px;
    padding: 6px 16px;
    letter-spacing: 0.06em;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    text-align: left;
}

#kk-my-recipe-editor .recipe-table th,
#kk-my-recipe-editor .recipe-table td {
    border-left: none;
    border-right: none;
}

.recipe-table-scroll {
    width: 100%;
    overflow-x: auto;
}

/* Apply the shared REZ16 table styling to view-mode tables */
#recipe-output .recipe-table th,
#recipe-output .recipe-table td {
    border-left: none;
    border-right: none;
}

/* Column Specifics - Aligned with recipe.css using classes */
#recipe-output .recipe-table .col-drag {
    width: 0 !important;
    padding: 0 !important;
    visibility: collapse;
}

#recipe-output .recipe-table .col-fold {
    width: 24px !important;
    /* Slight increase for touch/click */
    min-width: 24px !important;
    padding: 0 !important;
    text-align: center !important;
}

#recipe-output .recipe-table .col-name {
    text-align: left !important;
    padding-left: 16px !important;
    font-family: 'Roboto Condensed', Arial, sans-serif !important;
    font-size: 1.18rem !important;
    /* Allow wrapping per recipe.css */
    white-space: normal !important;
    line-height: 1.1 !important;
}

#recipe-output .recipe-table .col-basis,
#recipe-output .recipe-table .col-perc,
#recipe-output .recipe-table .col-amount {
    text-align: right !important;
    padding-right: 12px !important;
    font-family: 'Noto Sans', Arial, sans-serif !important;
    white-space: nowrap !important;
}

#recipe-output .recipe-table .col-basis {
    width: 16% !important;
}

#recipe-output .recipe-table .col-perc {
    width: 14% !important;
}

#recipe-output .recipe-table .col-amount {
    width: 16% !important;
}

#recipe-output .recipe-table td {
    padding: 4px 16px;
    font-size: 16px;
    line-height: 1.0;
    vertical-align: middle;
    color: #4e342e;
    font-variant-numeric: tabular-nums;
    background: #fff;
}

/* Input display adjustment for Editor to look like Text */
#recipe-output .input-display {
    border: none;
    background: transparent;
    padding: 0;
    margin: 0;
    width: 100%;
    font: inherit;
    color: inherit;
    line-height: inherit;
    outline: none;
}

#recipe-output .recipe-table .col-name .input-display {
    padding-left: 0;
}

/* Fold Button */
#recipe-output .recipe-table .btn-fold {
    background: #fff;
    border: 1px solid #ccc;
    color: #666;
    width: 20px;
    height: 20px;
    border-radius: 3px;
    font-weight: 700;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
}

#recipe-output .recipe-table .btn-fold:hover {
    background: #eee;
    color: #6b4c2e;
    border-color: #6b4c2e;
}

#recipe-output .recipe-table .recipe-fold-slot {
    width: 16px;
    min-width: 16px;
    max-width: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

#recipe-output .recipe-table .recipe-fold-slot:empty {
    width: 0;
    min-width: 0;
    max-width: 0;
}

#recipe-output .recipe-table .recipe-name {
    display: inline-block;
    flex: 1 1 auto;
}

#recipe-output .recipe-table td.recipe-base,
#recipe-output .recipe-table td.recipe-percent {
    font-size: 16px;
    font-family: 'Noto Sans', Arial, sans-serif;
}

#recipe-output .recipe-table td.col-basis.recipe-base,
#recipe-output .recipe-table td.col-basis.recipe-base .input-display {
    font-size: 16px;
}

#recipe-output .recipe-table tr.item-row:hover td {
    background: #ffe0b2;
}

#recipe-output .recipe-table tr.item-row.selected td {
    background: #f7e5bf;
}

#recipe-output .recipe-table .group-row td.group-header {
    background: #fafafa;
    padding: 12px 16px 6px;
    font-weight: 700;
    font-size: 14px;
    color: #555;
    font-style: italic;
}


#recipe-output .recipe-table tfoot td {
    background: #fff3e0;
    font-weight: 700;
    font-size: 22px;
    color: #4e342e;
    padding: 4px 16px;
}

#recipe-output .recipe-table .recipe-ingredient .kk-sub-plus {
    background: none;
    border: 1px solid #ccc;
    color: #666;
    width: 16px;
    height: 16px;
    border-radius: 3px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    margin-right: 6px;
}

#recipe-output .recipe-table .recipe-ingredient .kk-sub-plus:hover {
    background: #eee;
    color: var(--kk-primary);
    border-color: var(--kk-primary);
}

/* Notes styling for view-only recipes */
#recipe-output .recipe-notes {
    background: #fffde7;
    padding: 20px 22px 20px 28px;
    border-left: 5px solid var(--kk-primary);
    border-radius: 0 12px 12px 0;
    font-family: 'Roboto Condensed', Arial, sans-serif;
    font-size: 1.1rem;
    line-height: 1.5;
    margin-top: 16px;
}

#recipe-output .recipe-notes p {
    margin: 0 0 10px;
}

#recipe-output .recipe-notes p:last-child {
    margin-bottom: 0;
}

/* Footer links styling */
.kk-recipe-footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 16px auto 0;
    font-family: 'Roboto', Arial, sans-serif;
}

body.single-recipe .kk-recipe-footer-links,
body.post-type-recipe .kk-recipe-footer-links {
    padding-bottom: 32px;
}

.kk-recipe-footer-btn {
    color: var(--kk-primary);
    font-weight: 600;
    text-decoration: none;
    padding: 8px 12px;
    border: 1px solid var(--kk-border);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.06);
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.kk-recipe-footer-btn:hover {
    background: #fff8e9;
    border-color: var(--kk-primary);
    color: var(--kk-primary);
}

.kk-recipe-footer-links .sep {
    color: #9c6b30;
}

/* VISIBILITY TOGGLES - use visibility:collapse to properly collapse table columns */
#kk-my-recipe-editor:not(.editing) .col-drag,
#kk-my-recipe-editor:not(.editing) .col-actions {
    visibility: collapse !important;
    width: 0 !important;
    padding: 0 !important;
    border: none !important;
}

#kk-my-recipe-editor:not(.editing) .col-fold {
    visibility: visible !important;
}

#kk-my-recipe-editor.editing .col-fold {
    visibility: collapse !important;
    width: 0 !important;
    padding: 0 !important;
    border: none !important;
}

/* =========================================
   VIEW MODE (not editing)
   ========================================= */
#kk-my-recipe-editor:not(.editing) .recipe-table {
    table-layout: fixed;
}

#kk-my-recipe-editor:not(.editing) th,
#kk-my-recipe-editor:not(.editing) td {
    padding: 4px 16px;
    text-align: left;
    font-size: 16px;
    line-height: 1.0;
    vertical-align: middle;
}

#kk-my-recipe-editor:not(.editing) th.col-fold,
\n#kk-my-recipe-editor:not(.editing) td.col-fold {
    width: 40px;
    min-width: 40px;
    max-width: 40px;
    text-align: center;
    padding: 0;
}

#kk-my-recipe-editor:not(.editing) th.col-name,
#kk-my-recipe-editor:not(.editing) td.col-name {
    width: auto;
    text-align: left;
}

#kk-my-recipe-editor:not(.editing) th.col-basis,
#kk-my-recipe-editor:not(.editing) td.col-basis {
    width: 115px;
    text-align: right;
}

#kk-my-recipe-editor:not(.editing) th.col-perc,
#kk-my-recipe-editor:not(.editing) td.col-perc {
    width: 115px;
    text-align: right;
    white-space: nowrap;
}

#kk-my-recipe-editor:not(.editing) th.col-amount,
#kk-my-recipe-editor:not(.editing) td.col-amount {
    width: 105px;
    text-align: right;
}

#kk-my-recipe-editor:not(.editing) .input-display {
    border: none;
    background: transparent;
    pointer-events: none;
    width: 100%;
    color: inherit;
    padding: 0;
    margin: 0;
    font-family: inherit;
    font-size: inherit;
    resize: none;
    overflow: hidden;
    line-height: inherit;
}

#kk-my-recipe-editor:not(.editing) td.col-name .input-display {
    font-size: 1.377em;
    font-family: 'Roboto Condensed', sans-serif;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
}

#kk-my-recipe-editor:not(.editing) td.col-amount .input-display {
    font-size: 1.377em;
    font-family: 'Noto Sans', sans-serif;
    font-weight: 400;
    text-align: right;
}

#kk-my-recipe-editor:not(.editing) td.col-basis .input-display,
#kk-my-recipe-editor:not(.editing) td.col-perc .input-display {
    font-size: 1em;
    font-family: 'Noto Sans', sans-serif;
    text-align: right;
    white-space: nowrap;
}

#kk-my-recipe-editor:not(.editing) tbody tr:hover {
    background-color: #ffe0b2;
}

#kk-my-recipe-editor:not(.editing) tbody tr.highlighted {
    background-color: #f7e5bf !important;
}

#kk-my-recipe-editor:not(.editing) tr.item-row.selected td {
    background-color: #f7e5bf;
}

#kk-my-recipe-editor:not(.editing) .level-1 td.col-name .input-display {
    color: var(--kk-level1);
    padding-left: 35px;
}

#kk-my-recipe-editor:not(.editing) .level-1 td.col-amount .input-display {
    font-size: 1.212em;
}

#kk-my-recipe-editor:not(.editing) .level-2 td.col-name .input-display {
    color: var(--kk-level2);
    padding-left: 70px;
}

#kk-my-recipe-editor:not(.editing) .level-2 td.col-amount .input-display {
    font-size: 1.377em;
}

#kk-my-recipe-editor:not(.editing) tr.type-text td {
    background: #fafafa;
    font-weight: bold;
    color: #555;
}

#kk-my-recipe-editor:not(.editing) tr.type-text td.col-name .input-display {
    font-style: italic;
    color: #333;
    font-size: 1.1em;
    padding-left: 0;
    white-space: pre-wrap;
}

#kk-my-recipe-editor:not(.editing) tr.type-text.level-1 td.col-name .input-display {
    color: var(--kk-level1);
    padding-left: 35px;
}

#kk-my-recipe-editor:not(.editing) tr.type-text.level-2 td.col-name .input-display {
    color: var(--kk-level2);
    padding-left: 70px;
}

#kk-my-recipe-editor:not(.editing) tr.type-spacer {
    height: 20px;
    background: transparent !important;
}

#kk-my-recipe-editor .btn-fold {
    background: none;
    border: 1px solid #ccc;
    color: #666;
    width: 20px;
    height: 20px;
    border-radius: 3px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#kk-my-recipe-editor .btn-fold:hover {
    background: #eee;
    color: var(--kk-primary);
    border-color: var(--kk-primary);
}

#kk-my-recipe-editor .hidden-row {
    display: none;
}

/* =========================================
   EDIT MODE
   ========================================= */
#kk-my-recipe-editor.editing .recipe-table {
    border: 2px solid var(--kk-accent);
    table-layout: fixed;
    width: 100%;
}

#kk-my-recipe-editor.editing .col-fold {
    visibility: collapse !important;
    width: 0 !important;
    padding: 0 !important;
}

#kk-my-recipe-editor.editing .col-drag,
#kk-my-recipe-editor.editing .col-actions {
    visibility: visible !important;
}

#kk-my-recipe-editor.editing th,
#kk-my-recipe-editor.editing td {
    padding: 4px 8px;
    vertical-align: middle;
    border-bottom: 1px solid #e0e0e0;
}

#kk-my-recipe-editor.editing .col-drag {
    width: 50px !important;
    text-align: center;
    padding: 4px 2px;
}

#kk-my-recipe-editor.editing .col-name {
    width: auto !important;
}

#kk-my-recipe-editor.editing td.col-name.recipe-ingredient {
    width: auto !important;
}

#kk-my-recipe-editor.editing .col-basis {
    width: 100px !important;
    text-align: right;
}

#kk-my-recipe-editor.editing .col-perc,
#kk-my-recipe-editor.editing .col-amount {
    display: none !important;
}

#kk-my-recipe-editor.editing th.col-actions,
#kk-my-recipe-editor.editing td.col-actions {
    width: 145px !important;
}

#kk-my-recipe-editor.editing td.col-actions {
    text-align: right;
}

/* Ensure ingredient name input takes full width */
#kk-my-recipe-editor.editing td.col-name .kk-row-main {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 4px;
}

#kk-my-recipe-editor.editing td.col-name .kk-row-main input.input-display,
#kk-my-recipe-editor.editing td.col-name .kk-row-main textarea.input-display {
    flex: 1 1 auto;
    min-width: 0;
    width: 95% !important;
    font-size: 16px;
    padding-left: 8px;
}

/* Ensure perc and amount inputs fit in their columns */
#kk-my-recipe-editor.editing td.col-perc .input-display {
    width: 100%;
    text-align: right;
    padding: 4px 2px;
    font-size: 0.9em;
}

#kk-my-recipe-editor.editing td.col-amount input.input-display {
    width: 100%;
    text-align: right;
    padding: 4px 2px;
}

#kk-my-recipe-editor.editing .input-display {
    width: 100%;
    border: 1px solid #ccc;
    background: white;
    font-size: 1em;
    font-family: 'Roboto', sans-serif;
    padding: 4px;
    border-radius: 4px;
}

#kk-my-recipe-editor.editing .input-display:focus {
    border-color: var(--kk-primary);
    outline: none;
    background: var(--kk-edit-bg);
}

#kk-my-recipe-editor.editing .input-readonly {
    background: #eee;
    color: #aaa;
    border-color: #ddd;
    pointer-events: none;
    user-select: none;
}

#kk-my-recipe-editor.editing .level-1 td.col-name {
    border-left: 4px solid var(--kk-level1) !important;
    padding-left: 40px !important;
}

#kk-my-recipe-editor.editing .level-2 td.col-name {
    border-left: 4px solid var(--kk-level2) !important;
    padding-left: 80px !important;
}

#kk-my-recipe-editor.editing .level-1 td.col-name input.input-display {
    color: var(--kk-level1);
    font-weight: 500;
}

#kk-my-recipe-editor.editing .level-2 td.col-name input.input-display {
    color: var(--kk-level2);
    font-weight: 500;
}

#kk-my-recipe-editor.editing tr.type-text td.col-name textarea {
    font-style: italic;
    font-weight: bold;
    background: #f0f4c3;
    border-color: #dce775;
}

#kk-my-recipe-editor.editing tr.type-spacer td {
    background: #eee;
    height: 10px;
}

#kk-my-recipe-editor.editing tr.type-spacer td.col-name {
    opacity: 0.5;
    font-size: 0.8em;
    text-align: center;
    letter-spacing: 2px;
    padding-top: 0;
}

/* Footer */
#kk-my-recipe-editor tfoot tr {
    border-top: 2px solid var(--kk-primary);
}

#kk-my-recipe-editor tfoot td {
    background: #fff3e0;
    font-weight: 700;
    font-size: 22px;
    color: #4e342e;
    padding: 4px 16px;
}

#kk-my-recipe-editor tfoot td.col-basis,
#kk-my-recipe-editor tfoot td.col-perc {
    font-size: 16px;
}

#kk-my-recipe-totalBase {
    font-size: 22px;
    font-family: 'Noto Sans', sans-serif;
    text-align: right;
}

#kk-my-recipe-totalAmount {
    font-family: 'Noto Sans', sans-serif;
    font-size: 22px;
    text-align: right;
    padding-right: 16px;
    font-weight: 700;
}

#kk-my-recipe-dateStr {
    font-size: 22px;
    font-weight: normal;
    color: #666;
    text-align: left;
}

/* Notes */
#kk-my-recipe-editor:not(.editing) #kk-my-recipe-explanationInput.recipe-notes,
#kk-my-recipe-editor:not(.editing) .recipe-notes {
    background: #fffde7 !important;
    padding: 20px 22px 20px 28px !important;
    border-left: 5px solid var(--kk-primary) !important;
    border-radius: 0 12px 12px 0 !important;
    font-family: 'Roboto Condensed', Arial, sans-serif !important;
    font-size: 1.1rem !important;
    line-height: 1.5 !important;
    color: #4e342e !important;
    box-sizing: border-box !important;
    display: block;
}

#kk-my-recipe-explanationInput {
    width: 100%;
    min-height: 120px;
    border: none;
    resize: none;
    outline: none;
}

#kk-my-recipe-editor.editing #kk-my-recipe-explanationInput {
    padding: 16px 18px;
    border: 2px solid var(--kk-accent);
    background: var(--kk-edit-bg);
    border-radius: 8px;
    resize: vertical;
    font-size: 19px;
    line-height: 1.5;
}

#kk-my-recipe-explanationInput[readonly] {
    cursor: default;
}

/* List view */
.kk-my-recipes-list-wrap .kk-recipe-container-box {
    width: min(100%, 800px);
    /* Expanded to match main site */
    margin: 0 auto;
}

/* ---------------------------------------------------------------
   OVERVIEW TOOLBAR (search + reset) — matches /recipes/ design
--------------------------------------------------------------- */
.kk-ro-toolbar {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 200px 200px 46px;
    gap: 14px;
    align-items: stretch;
    background: #fffdf8;
    border: 1px solid #eadbc6;
    border-radius: 26px;
    padding: 18px 20px;
    box-shadow: 0 15px 30px rgba(123, 84, 46, 0.08);
    margin-bottom: 24px;
}

/* 2-column variant (search + reset) when no categories defined */
.kk-ro-toolbar--my-recipes {
    grid-template-columns: 1fr 46px;
}

/* 3-column variant (search + category filter + reset) */
.kk-ro-toolbar--my-recipes.kk-ro-toolbar--has-cats {
    grid-template-columns: 1fr 200px 46px;
}

.kk-ro-field {
    position: relative;
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #eadbc6;
    border-radius: 999px;
    padding-left: 44px;
}

.kk-ro-field input,
.kk-ro-field select {
    width: 100%;
    height: 46px;
    border: none;
    border-style: none !important;
    background: transparent;
    font-size: 15px;
    color: #4b2c16;
    padding: 0 16px 0 0;
    outline: none;
}

.kk-ro-field select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='none' stroke='%236b4c2e' stroke-width='1.5' d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: calc(100% - 20px) 50%;
    padding-right: 44px;
    line-height: 1.6;
}

.kk-ro-field-icon {
    position: absolute;
    left: 18px;
    width: 18px;
    height: 18px;
    background-size: contain;
    background-repeat: no-repeat;
}

.kk-ro-field-search .kk-ro-field-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%236b4c2e' stroke-width='1.6' stroke-linecap='round'%3E%3Ccircle cx='8' cy='8' r='4.8'/%3E%3Cpath d='M11.5 11.5L16 16'/%3E%3C/svg%3E");
}

.kk-ro-reset {
    width: 46px;
    height: 46px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 14px;
    border: none;
    background: #f1c24b;
    color: #4b2c16;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transition: transform 0.2s ease;
}

.kk-ro-reset:hover {
    transform: translateY(-1px);
}

.kk-ro-reset:focus {
    outline: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 0 0 2px rgba(75, 44, 22, 0.2);
}

.kk-ro-field input:focus,
.kk-ro-field select:focus {
    box-shadow: none;
}

/* Groups */
.kk-ro-groups {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.kk-ro-group {
    overflow: hidden;
}

.kk-ro-group.no-visible {
    display: none;
}

.kk-ro-group-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    background: #d8cfb0;
    border: 1px solid #cabf9c;
    border-bottom: none;
    border-left: 6px solid #8D4514;
    color: #4b2c16;
    padding: 18px 26px;
    text-align: left;
    cursor: default;
    border-radius: 10px;
}

.kk-ro-group-heading {
    display: flex;
    align-items: flex-start;
}

.kk-ro-group-title {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.kk-ro-group-label-text {
    font-family: var(--kk-font);
    font-size: 18px;
    font-weight: 700;
    color: #4b2c16;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    display: block;
}

.kk-ro-group-count {
    font-size: 16px;
    text-transform: uppercase;
    color: #71542c;
    letter-spacing: 0.12em;
    flex-shrink: 0;
}

.kk-ro-group-body {
    background: transparent;
    width: 100%;
    border-top: none;
    border-radius: 0 0 10px 10px;
    padding: 16px 0 4px 0;
}

/* Hidden item class (set by recipe-overview.js filter) */
.kk-ro-item.is-hidden {
    display: none;
}

/* Tag pills */
.kk-ro-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
}

.kk-ro-tag {
    background: #edf2ff;
    color: #8D4514;
    font-size: 11px;
    line-height: 11px;
    padding: 3px 10px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* Accessible hidden labels */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Responsive toolbar */
@media (max-width: 600px) {
    .kk-ro-toolbar,
    .kk-ro-toolbar--my-recipes,
    .kk-ro-toolbar--my-recipes.kk-ro-toolbar--has-cats {
        grid-template-columns: 1fr;
        border-radius: 16px;
    }

    .kk-ro-group-toggle {
        padding: 14px 16px;
    }
}

/* Header styling aligned with recipe.css */
.kk-my-recipes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #ebe4cf;
}

.kk-my-recipes-title {
    font-family: 'Titillium Web', sans-serif;
    font-size: 34px;
    font-weight: 700;
    color: #4b2c16;
    margin: 0 0 32px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #ebe4cf;
    /* Add separator line for consistency */
}

.kk-my-recipes-count {
    font-family: 'Titillium Web', sans-serif;
    font-size: 14px;
    color: #8D4514;
    background: #fff7ed;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid #ebe4cf;
}

.kk-my-recipes-empty {
    text-align: center;
    padding: 60px 20px;
    background: #fffdf8;
    border: 1px solid #ebe4cf;
    border-radius: 12px;
    color: #6d4a2a;
    font-size: 16px;
}

/* List container */
.kk-my-recipes-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Copied from recipe.css for visual consistency */
.kk-ro-item {
    display: flex;
    gap: 20px;
    justify-content: space-between;
    align-items: center;
    padding: 16px 22px 16px 36px;
    border: 1px solid #ebe4cf;
    background: #fffdf8;
    box-shadow: 0 8px 18px rgba(74, 50, 20, 0.04);
    /* Slightly lighter shadow */
    margin-bottom: 14px;
    border-radius: 0;
    /* Override any defaults */
}

.kk-ro-item:last-child {
    margin-bottom: 0;
}

.kk-ro-item-details {
    flex: 1;
}

.kk-ro-item-title {
    margin: 0 0 4px;
    font-family: 'Titillium Web', sans-serif;
    font-size: 23px;
    font-weight: 700;
    color: #4b2c16;
}

.kk-ro-item-description {
    margin: 0 0 10px;
    font-family: 'Roboto', Arial, sans-serif;
    font-size: 14px;
    color: #6d4a2a;
    font-style: italic;
}

.kk-ro-item-link {
    flex-shrink: 0;
    border: 1px solid #f1c24b;
    color: #4b2c16;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 18px;
    line-height: 1.2;
    background: #f1c24b;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    display: inline-block;
    cursor: pointer;
}

.kk-ro-item-link:hover {
    background: #8c4818;
    border-color: #8c4818;
    color: #fff;
}

/* Actions wrapper: Open → button + gear button */
.kk-ro-item-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.kk-ro-item-settings-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid #d5c4ad;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    color: #6b4c2e;
    flex-shrink: 0;
    transition: background 0.2s, border-color 0.2s;
}

.kk-ro-item-settings-btn:hover {
    background: #f4ede3;
    border-color: #b8936a;
}

/* Dropdown menu */
.kk-ro-settings-dropdown {
    background: #fff;
    border: 1px solid #e0d5c5;
    border-radius: 10px;
    box-shadow: 0 6px 24px rgba(0,0,0,.15);
    min-width: 190px;
    overflow: hidden;
}

.kk-ro-settings-dropdown button {
    display: block;
    width: 100%;
    padding: 12px 18px;
    text-align: left;
    background: none;
    border: none;
    border-bottom: 1px solid #f0e8dc;
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
    color: #3a2510;
}

.kk-ro-settings-dropdown button:last-child {
    border-bottom: none;
}

.kk-ro-settings-dropdown button:hover {
    background: #faf5ef;
    color: #3a2510;
}

.kk-ro-settings-dropdown button.kk-action-delete {
    color: #c62828;
}

.kk-ro-settings-dropdown button.kk-action-delete:hover {
    background: #fff5f5;
    color: #c62828;
}

/* Modal cancel buttons (dynamically inserted, no hover inline style possible) */
#kk-cat-modal-cancel:hover,
#kk-cat-action-cancel:hover {
    background: #f5f5f5 !important;
    color: #333 !important;
}

@media (max-width: 600px) {
    .kk-ro-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px;
        gap: 12px;
    }

    .kk-ro-item-actions {
        width: 100%;
    }

    .kk-ro-item-link {
        flex: 1;
        text-align: center;
        box-sizing: border-box;
    }
}

.kk-my-recipes-message {
    margin: 0;
    color: #6d4a2a;
}

/* Single recipe view (read-only) should reuse the REZ16 visuals from My Recipes */
body.single-recipe,
body.post-type-recipe {
    background: #f6ecdc;
    font-family: 'Roboto', Arial, sans-serif;
    color: #4e342e;
}

body.single-recipe .kk-recipe-wrapper,
body.post-type-recipe .kk-recipe-wrapper {
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    padding: 18px 24px 0;
    box-sizing: border-box;
}

body.single-recipe .kk-recipe-breadcrumbs,
body.post-type-recipe .kk-recipe-breadcrumbs {
    font-size: 13px;
    margin-bottom: 6px;
    color: #9c6b30;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

body.single-recipe .kk-recipe-breadcrumbs a,
body.post-type-recipe .kk-recipe-breadcrumbs a {
    color: inherit;
    text-decoration: none;
}

body.single-recipe h1.kk-recipe-main-title,
body.post-type-recipe h1.kk-recipe-main-title {
    text-align: center;
    font-size: clamp(32px, 4.6vw, 40px);
    font-weight: 700;
    color: #6b4c2e;
    padding: 8px 0 2px;
    margin: 0;
}

body.single-recipe .kk-recipe-top-controls-bar,
body.post-type-recipe .kk-recipe-top-controls-bar {
    background: #f4f4f4;
    border: 1px solid #d6d6d6;
    border-radius: 10px;
    padding: 10px 16px;
    margin: 8px auto 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

body.single-recipe .kk-recipe-top-controls,
body.post-type-recipe .kk-recipe-top-controls {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

body.single-recipe .kk-control,
body.post-type-recipe .kk-control {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

body.single-recipe .kk-control-label,
body.post-type-recipe .kk-control-label {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}

body.single-recipe .kk-control select,
body.single-recipe .kk-control input,
body.post-type-recipe .kk-control select,
body.post-type-recipe .kk-control input {
    height: 36px;
    padding: 6px 12px;
    font-size: 15px;
    border: 1px solid #cccccc;
    border-radius: 8px;
    background: #fff;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
}

body.single-recipe .kk-control input#recipe-multiplier,
body.post-type-recipe .kk-control input#recipe-multiplier {
    width: 110px;
    font-variant-numeric: tabular-nums;
}

body.single-recipe #recipe-output,
body.post-type-recipe #recipe-output {
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    padding: 0 12px 32px;
    display: flex;
    justify-content: center;
    box-sizing: border-box;
}

body.single-recipe #recipe-output>.kk-recipe-container-box,
body.post-type-recipe #recipe-output>.kk-recipe-container-box {
    width: min(100%, 800px);
    margin: 0 auto 18px;
    background: #ffffff;
    border: 1px solid var(--kk-border);
    border-radius: 12px;
    box-shadow: var(--kk-shadow);
    padding: 16px 18px 18px;
    box-sizing: border-box;
    overflow: hidden;
}

body.single-recipe .recipe-table,
body.post-type-recipe .recipe-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--kk-border);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--kk-shadow);
    table-layout: fixed;
    background: #fff;
}

body.single-recipe .recipe-table th,
body.post-type-recipe .recipe-table th {
    background: var(--kk-header-bg);
    color: #fff;
    font-weight: 500;
    font-size: 14px;
    height: 40px;
}

body.single-recipe .recipe-table th:nth-child(1),
body.post-type-recipe .recipe-table th:nth-child(1) {
    width: auto;
}

body.single-recipe .recipe-table th:nth-child(2),
body.single-recipe .recipe-table td:nth-child(2),
body.post-type-recipe .recipe-table th:nth-child(2),
body.post-type-recipe .recipe-table td:nth-child(2) {
    width: 16%;
}

body.single-recipe .recipe-table th:nth-child(3),
body.single-recipe .recipe-table td:nth-child(3),
body.post-type-recipe .recipe-table th:nth-child(3),
body.post-type-recipe .recipe-table td:nth-child(3) {
    width: 10%;
    white-space: nowrap;
}

body.single-recipe .recipe-table th:nth-child(4),
body.single-recipe .recipe-table td:nth-child(4),
body.post-type-recipe .recipe-table th:nth-child(4),
body.post-type-recipe .recipe-table td:nth-child(4) {
    width: 16%;
}

body.single-recipe .recipe-table th:nth-child(n+2),
body.single-recipe .recipe-table td:nth-child(n+2),
body.post-type-recipe .recipe-table th:nth-child(n+2),
body.post-type-recipe .recipe-table td:nth-child(n+2) {
    text-align: right;
    white-space: nowrap;
    padding-left: 6px;
    padding-right: 12px;
}

body.single-recipe .recipe-table td,
body.post-type-recipe .recipe-table td {
    padding: 4px 16px;
    border-bottom: none !important;
    font-size: 16px;
    line-height: 1.0;
    vertical-align: middle;
    color: #4e342e;
    font-variant-numeric: tabular-nums;
}

body.single-recipe .recipe-table td.recipe-ingredient,
body.post-type-recipe .recipe-table td.recipe-ingredient {
    text-align: left;
    font-family: 'Roboto Condensed', Arial, sans-serif;
    font-size: 22px;
    line-height: 1.0;
    white-space: normal;
}

body.single-recipe .recipe-table td.recipe-base,
body.single-recipe .recipe-table td.recipe-percent,
body.post-type-recipe .recipe-table td.recipe-base,
body.post-type-recipe .recipe-table td.recipe-percent {
    font-size: 16px;
    font-family: 'Noto Sans', Arial, sans-serif;
}

body.single-recipe .recipe-table tr.item-row:hover td,
body.post-type-recipe .recipe-table tr.item-row:hover td {
    background: #ffe0b2;
}

body.single-recipe .recipe-table tr.item-row.selected td,
body.post-type-recipe .recipe-table tr.item-row.selected td {
    background: #f7e5bf;
}

body.single-recipe .recipe-table tfoot td,
body.post-type-recipe .recipe-table tfoot td {
    background: #fff3e0;
    font-weight: 700;
    font-size: 22px;
    color: #4e342e;
    padding: 4px 16px;
}

body.single-recipe .recipe-table .recipe-ingredient .kk-sub-plus,
body.post-type-recipe .recipe-table .recipe-ingredient .kk-sub-plus {
    background: none;
    border: 1px solid #ccc;
    color: #666;
    width: 16px;
    height: 16px;
    border-radius: 3px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    margin-right: 6px;
}

body.single-recipe .recipe-table .recipe-ingredient .kk-sub-plus:hover,
body.post-type-recipe .recipe-table .recipe-ingredient .kk-sub-plus:hover {
    background: #eee;
    color: var(--kk-primary);
    border-color: var(--kk-primary);
}

body.single-recipe .recipe-table .recipe-percent,
body.post-type-recipe .recipe-table .recipe-percent {
    white-space: nowrap;
}

@media (max-width: 768px) {
    .kk-my-recipes-page {
        padding: 12px 10px 24px;
    }

    .kk-recipe-container-box {
        padding: 14px 14px 16px;
    }

    #kk-my-recipe-editor .toolbar {
        flex-direction: column;
        align-items: flex-start;
    }

    #kk-my-recipe-editor:not(.editing) th,
    #kk-my-recipe-editor:not(.editing) td {
        padding: 6px 10px;
    }

    #kk-my-recipe-editor:not(.editing) th.col-basis,
    #kk-my-recipe-editor:not(.editing) td.col-basis {
        width: 18%;
    }

    #kk-my-recipe-editor:not(.editing) th.col-perc,
    #kk-my-recipe-editor:not(.editing) td.col-perc {
        width: 12%;
        white-space: nowrap;
    }

    #kk-my-recipe-editor:not(.editing) th.col-amount,
    #kk-my-recipe-editor:not(.editing) td.col-amount {
        width: 18%;
    }

    #kk-my-recipe-editor:not(.editing) td.col-name .input-display,
    #kk-my-recipe-editor:not(.editing) td.col-amount .input-display,
    #kk-my-recipe-editor:not(.editing) td.col-basis .input-display,
    #kk-my-recipe-editor:not(.editing) td.col-perc .input-display {
        font-size: 18px;
    }

    body.single-recipe .recipe-table th,
    body.single-recipe .recipe-table td,
    body.post-type-recipe .recipe-table th,
    body.post-type-recipe .recipe-table td {
        padding: 6px 10px;
    }

    body.single-recipe .recipe-table th:nth-child(2),
    body.single-recipe .recipe-table td:nth-child(2),
    body.post-type-recipe .recipe-table th:nth-child(2),
    body.post-type-recipe .recipe-table td:nth-child(2) {
        width: 18%;
    }

    body.single-recipe .recipe-table th:nth-child(3),
    body.single-recipe .recipe-table td:nth-child(3),
    body.post-type-recipe .recipe-table th:nth-child(3),
    body.post-type-recipe .recipe-table td:nth-child(3) {
        width: 12%;
        white-space: nowrap;
    }

    body.single-recipe .recipe-table th:nth-child(4),
    body.single-recipe .recipe-table td:nth-child(4),
    body.post-type-recipe .recipe-table th:nth-child(4),
    body.post-type-recipe .recipe-table td:nth-child(4) {
        width: 18%;
    }

    body.single-recipe .recipe-table td,
    body.post-type-recipe .recipe-table td {
        font-size: 18px;
    }

    body.single-recipe .kk-recipe-top-controls-bar,
    body.post-type-recipe .kk-recipe-top-controls-bar {
        flex-direction: column;
        text-align: center;
        row-gap: 14px;
    }

    body.single-recipe .kk-recipe-top-controls,
    body.post-type-recipe .kk-recipe-top-controls {
        flex-direction: column;
        align-items: center;
        gap: 14px;
    }
}

@media (max-width: 520px) {

    /* Let columns breathe and avoid text clipping on very small screens */
    .recipe-table {
        table-layout: auto;
    }

    #kk-my-recipe-editor:not(.editing) th,
    #kk-my-recipe-editor:not(.editing) td {
        padding: 4px 8px;
    }

    #kk-my-recipe-editor:not(.editing) th.col-basis,
    #kk-my-recipe-editor:not(.editing) td.col-basis {
        width: 20%;
    }

    #kk-my-recipe-editor:not(.editing) th.col-perc,
    #kk-my-recipe-editor:not(.editing) td.col-perc {
        width: 14%;
        white-space: nowrap;
    }

    #kk-my-recipe-editor:not(.editing) th.col-amount,
    #kk-my-recipe-editor:not(.editing) td.col-amount {
        width: 20%;
    }

    #kk-my-recipe-editor:not(.editing) td.col-name .input-display,
    #kk-my-recipe-editor:not(.editing) td.col-amount .input-display,
    #kk-my-recipe-editor:not(.editing) td.col-basis .input-display,
    #kk-my-recipe-editor:not(.editing) td.col-perc .input-display {
        font-size: 16px;
    }

    body.single-recipe .recipe-table {
        table-layout: auto;
    }

    body.single-recipe .recipe-table th,
    body.single-recipe .recipe-table td,
    body.post-type-recipe .recipe-table th,
    body.post-type-recipe .recipe-table td {
        padding: 4px 8px;
    }

    body.single-recipe .recipe-table th:nth-child(2),
    body.single-recipe .recipe-table td:nth-child(2),
    body.post-type-recipe .recipe-table th:nth-child(2),
    body.post-type-recipe .recipe-table td:nth-child(2) {
        width: 20%;
    }

    body.single-recipe .recipe-table th:nth-child(3),
    body.single-recipe .recipe-table td:nth-child(3),
    body.post-type-recipe .recipe-table th:nth-child(3),
    body.post-type-recipe .recipe-table td:nth-child(3) {
        width: 14%;
        white-space: nowrap;
    }

    body.single-recipe .recipe-table th:nth-child(4),
    body.single-recipe .recipe-table td:nth-child(4),
    body.post-type-recipe .recipe-table th:nth-child(4),
    body.post-type-recipe .recipe-table td:nth-child(4) {
        width: 20%;
    }

    body.single-recipe .recipe-table td,
    body.post-type-recipe .recipe-table td {
        font-size: 16px;
    }
}

/* --- BATCH RECORDING SECTION (Added 17.01.2026) --- */
.kk-batch-wrapper {
    display: none;
    margin-top: 20px;
    width: 100%;
}

.kk-batch-wrapper.active {
    display: block;
}

.kk-batch-container {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: #fdfdfd;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    max-width: 900px;
    margin: 0 auto;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
}

@media (max-width: 600px) {
    .kk-batch-container {
        padding: 15px;
        border: none;
    }

    .kk-batch-container h2 {
        font-size: 1.5rem;
    }
}

.kk-batch-container h2 {
    color: #333;
    margin-bottom: 20px;
    word-wrap: break-word;
    border-bottom: none;
}

.kk-batch-container h3 {
    color: #333;
    border-bottom: 2px solid #eebb00;
    padding-bottom: 8px;
    margin-bottom: 20px;
    margin-top: 30px;
}

.kk-batch-container label {
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
    color: #555;
}

/* --- TEXT AREAS & INPUTS --- */
.kk-text-box textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.4;
    resize: vertical;
    background: #fafafa;
    min-height: 100px;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

#batch-story {
    background: #fff;
    min-height: 80px;
}

.kk-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

/* --- ALLERGENE --- */
.kk-allergen-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    padding: 0 10px;
    font-weight: bold;
    font-size: 0.85em;
    color: #333;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.kk-allergen-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.kk-allergen-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    align-items: center;
    background: #fff;
    border: 1px solid #eee;
    padding: 8px 10px;
    border-radius: 4px;
    transition: background 0.2s;
}

.kk-allergen-row:hover {
    background: #fcfcfc;
}

@media (max-width: 500px) {

    .kk-allergen-header,
    .kk-allergen-row {
        grid-template-columns: 1.5fr 1fr 1fr;
        font-size: 0.8rem;
    }

    .kk-allergen-header div:nth-child(2),
    .kk-allergen-header div:nth-child(3) {
        font-size: 0.7rem;
        line-height: 1.1;
    }
}

/* --- KEINE ALLERGENE ZEILE --- */
.kk-no-allergen-row {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #f4fdf4;
    border: 1px solid #c8e6c9;
    padding: 10px 15px;
    margin-top: 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.kk-no-allergen-row:hover {
    background: #e8f5e9;
}

.kk-no-allergen-text {
    font-weight: bold;
    color: #2e7d32;
    line-height: 1.3;
}

/* FEHLER ANIMATION */
@keyframes shake {
    0% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    50% {
        transform: translateX(5px);
    }

    75% {
        transform: translateX(-5px);
    }

    100% {
        transform: translateX(0);
    }
}

.kk-error-flash {
    border: 2px solid #d32f2f !important;
    background-color: #ffebee !important;
    animation: shake 0.4s ease-in-out;
}

.kk-input-error {
    border: 2px solid #d32f2f !important;
    background-color: #fff0f0 !important;
    animation: shake 0.3s ease-in-out;
}

/* --- ICONS --- */
.kk-col-center {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    min-height: 44px;
    min-width: 44px;
}

img.kk-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
    filter: grayscale(100%) opacity(0.2);
    transition: all 0.3s ease;
    cursor: pointer;
}

img.kk-icon.trace-size {
    width: 28px;
    height: 28px;
}

img.kk-icon.active-main {
    filter: invert(29%) sepia(55%) saturate(2352%) hue-rotate(356deg) brightness(94%) contrast(89%);
    opacity: 1;
    transform: scale(1.1);
}

img.kk-icon.active-trace {
    filter: invert(86%) sepia(31%) saturate(5458%) hue-rotate(323deg) brightness(101%) contrast(96%);
    opacity: 1;
}

.kk-icon-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: flex-start;
}

@media (max-width: 600px) {
    .kk-icon-grid {
        justify-content: space-around;
    }
}

.kk-icon-wrapper {
    text-align: center;
    cursor: pointer;
    width: max-content !important;
}

.kk-icon-wrapper span {
    display: block;
    font-size: 0.8em;
    margin-top: 5px;
    color: #777;
    word-wrap: break-word;
}

.kk-icon-wrapper img.active {
    filter: invert(29%) sepia(55%) saturate(2352%) hue-rotate(356deg) brightness(94%) contrast(89%);
    opacity: 1;
}

/* --- METADATEN (2 Spalten Layout) --- */
.kk-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

@media (max-width: 700px) {
    .kk-meta-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* --- CONFIRM & BUTTON --- */
.kk-confirm-box {
    background-color: #fff8e1;
    border-left: 5px solid #eebb00;
    padding: 15px;
    margin: 30px 0;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    transition: all 0.3s;
}

.kk-confirm-box input {
    margin-top: 5px;
    transform: scale(1.3);
    cursor: pointer;
    flex-shrink: 0;
}

.kk-confirm-box span {
    font-size: 0.95em;
    color: #333;
    line-height: 1.4;
    cursor: pointer;
}

.kk-btn-wrapper {
    display: block;
    width: 100%;
    cursor: pointer;
}

.kk-btn-save {
    background: #333;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.1em;
    cursor: pointer;
    width: 100%;
    border-radius: 4px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: background 0.3s, opacity 0.3s;
    pointer-events: none;
}

.kk-btn-save:not(:disabled) {
    pointer-events: auto;
}

.kk-btn-save:hover {
    background: #555;
}

.kk-btn-save:disabled {
    background: #ccc;
    color: #888;
    cursor: not-allowed;
    opacity: 0.7;
}

#kk-result {
    display: none;
    text-align: center;
    margin-top: 30px;
    padding: 20px;
    border: 2px dashed #eebb00;
    background: #fff;
    word-wrap: break-word;
}

.kk-batch-code {
    font-family: monospace;
    font-size: 2em;
    color: #d32f2f;
    font-weight: bold;
    margin: 10px 0;
}

.kk-batch-container.embedded {
    box-shadow: none;
    border: none;
    padding: 20px 0 0;
    max-width: 100%;
}

/* ==========================================================================
   MOBILE RESPONSIVENESS OVERRIDES
   ========================================================================== */
@media screen and (max-width: 768px) {

    /* Reduce container padding */
    .kk-my-recipes-page {
        padding: 10px 5px !important;
    }

    .kk-recipe-container-box {
        padding: 12px 8px !important;
        border-radius: 8px !important;
    }

    /* Stack toolbar for better access */
    #kk-my-recipe-editor .toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
        padding: 12px;
    }

    #kk-my-recipe-editor .toolbar .left,
    #kk-my-recipe-editor .toolbar .right {
        width: 100%;
        justify-content: center;
        gap: 10px;
    }

    #kk-my-recipe-editor .toolbar .kk-control {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    #kk-my-recipe-editor .toolbar select,
    #kk-my-recipe-editor .toolbar input {
        width: 100%;
        text-align: center;
    }

    /* Fix Header Inputs Sizing */
    #kk-my-recipe-titleInput {
        font-size: 28px !important;
        margin-bottom: 5px !important;
    }

    #kk-my-recipe-subtitleInput {
        font-size: 16px !important;
    }

    /* Compress Table Columns to allow Ingredient Name visibility */
    /* Overriding inline styles with !important */
    .recipe-table .col-fold {
        width: 30px !important;
    }

    .recipe-table .col-basis {
        width: 70px !important;
    }

    .recipe-table .col-perc {
        width: 55px !important;
    }

    .recipe-table .col-amount {
        width: 65px !important;
    }

    /* Adjust inputs inside table cells */
    .basis-with-sum input.input-display {
        width: 100% !important;
        min-width: 40px !important;
        padding: 4px 2px !important;
        font-size: 13px !important;
    }

    /* Table headers text adjustment */
    .recipe-table th {
        padding: 4px 2px !important;
        font-size: 11px !important;
    }

    .recipe-table td {
        padding: 4px 2px !important;
    }

    /* Shorten header labels if needed */
    #kk-my-recipe-headerAmount {
        font-size: 11px;
    }

    /* Buttons in footer/toolbar */
    #kk-my-recipe-editor .toolbar button {
        flex: 1;
        padding: 10px;
        font-size: 13px;
        white-space: nowrap;
    }

    /* Hide some less critical buttons text if extremely small? No, better wrap */
}

/* ==========================================================================
   MOBILE RESPONSIVENESS OVERRIDES (Moved from Inline)
   ========================================================================== */
/* Ensure the table can scroll horizontally on small screens */
.recipe-table-scroll {
    overflow-x: auto;
    width: 100%;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 5px;
    margin-bottom: 15px;
    /* Space for scrollbar */
}

@media screen and (max-width: 850px) {

    .kk-recipe-wrapper,
    .kk-sub-header-wrapper {
        padding-left: 8px;
        padding-right: 8px;
    }

    .kk-recipe-container-box {
        padding: 10px 4px !important;
        border-radius: 6px !important;
    }

    /* Stack toolbar */
    #kk-my-recipe-editor .toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 8px;
    }

    #kk-my-recipe-editor .toolbar .left,
    #kk-my-recipe-editor .toolbar .right {
        width: 100%;
        justify-content: center;
        gap: 6px;
    }

    /* Fix Header Inputs Sizing with Clamp */
    #kk-my-recipe-titleInput {
        font-size: clamp(24px, 5vw, 32px) !important;
        margin-bottom: 5px !important;
    }

    #kk-my-recipe-subtitleInput {
        font-size: clamp(14px, 3.5vw, 16px) !important;
    }

    /* Table Responsiveness: Smart Scaling + Scroll */
    .recipe-table {
        min-width: 600px !important;
        /* Ensure shape is maintained */
        width: 100%;
        table-layout: fixed;
        /* STRICTLY ENFORCE COLUMN WIDTHS */
    }

    /* Column Widths & Fonts with Clamp */
    .recipe-table th,
    .recipe-table td {
        padding: 6px 3px !important;
        box-sizing: border-box;
        /* Crucial for width calculations */
    }

    .recipe-table th {
        font-size: clamp(10px, 2.5vw, 12px) !important;
        white-space: nowrap;
        vertical-align: middle;
    }

    /* Prevent Ingredient Row Wrapping "Under" */
    #kk-my-recipe-editor .kk-row-main {
        flex-wrap: nowrap !important;
        width: 100%;
        align-items: center;
        max-width: 100%;
        /* CONTAINMENT */
    }

    #kk-my-recipe-editor .kk-row-main input.input-display {
        flex: 1 1 auto !important;
        min-width: 100px !important;
        /* Smaller min-width to fit 170px cell */
        width: 100% !important;
        /* Fill available space but don't force overflow */
        max-width: 100% !important;
    }

    /* Input sizing */
    .recipe-table input,
    .recipe-table select,
    .basis-with-sum input.input-display {
        font-size: clamp(11px, 2.5vw, 14px) !important;
        padding: 4px 2px !important;
        height: auto !important;
        min-height: 32px;
    }

    /* Specific Column Tweaks */
    .recipe-table .col-drag {
        display: none !important;
    }

    /* Hide drag column completely to prevent offset issues */
    .recipe-table .col-fold {
        width: 30px !important;
    }

    .recipe-table .col-name {
        width: 170px !important;
    }

    .recipe-table .col-basis {
        width: 110px !important;
    }

    .recipe-table .col-perc {
        width: 50px !important;
    }

    .recipe-table .col-amount {
        width: 65px !important;
    }

    #kk-my-recipe-editor.editing th.col-actions,
    #kk-my-recipe-editor.editing td.col-actions,
    .recipe-table .col-actions {
        width: 70px !important;
    }

    /* Limit actions width */

    /* Ensure actions don't overflow */
    #kk-my-recipe-editor .btn-group-actions {
        flex-wrap: nowrap !important;
        gap: 0 !important;
    }

    #kk-my-recipe-editor .btn-group-actions button {
        padding: 0 !important;
        width: 18px !important;
        /* Smaller buttons */
        height: 24px !important;
        font-size: 10px !important;
    }

    /* Ensure basis input fits with the button */
    #kk-my-recipe-editor .basis-with-sum input.input-display {
        min-width: 30px !important;
        /* Allow shrinking to prevent left overflow */
        flex: 1 !important;
        width: auto !important;
    }

    #kk-my-recipe-editor .basis-with-sum {
        gap: 1px !important;
        /* Tighten gap */
    }

    /* Sticky First Columns */
    .recipe-table td.col-fold,
    .recipe-table td.col-name {
        position: sticky;
        left: 0;
        z-index: 100 !important;
        /* Force high z-index to stay on top */
        background: #fff !important;
        /* Ensure opacity */
        box-shadow: 2px 0 5px -2px rgba(0, 0, 0, 0.1);
        overflow: hidden;
    }

    .recipe-table th.col-fold,
    .recipe-table th.col-name {
        position: sticky;
        left: 0;
        z-index: 102 !important;
        /* Higher than content */
        box-shadow: 2px 0 5px -2px rgba(0, 0, 0, 0.1);
    }

    .recipe-table tr {
        background: #fff;
    }

    #kk-my-recipe-editor .toolbar button {
        flex: 1;
        padding: 10px 5px;
        font-size: 13px;
    }
}

@media screen and (max-width: 550px) {
    #kk-my-recipe-editor.editing .recipe-table {
        min-width: 0 !important;
    }

    #kk-my-recipe-editor.editing .col-perc,
    #kk-my-recipe-editor.editing .col-amount {
        display: none !important;
    }
}

@media screen and (max-width: 400px) {
    #kk-my-recipe-editor.editing .col-basis {
        width: 83px !important;
    }
}

/* PRINT STYLES */
@media print {
    body.kk-print-recipe * {
        visibility: hidden;
    }
    
    body.kk-print-recipe {
        background: #fff !important; 
        color: #000 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
    }

    /* Force visibility of parent containers that might be hidden by other print styles (Elementor) */
    body.kk-print-recipe #recipe-output,
    body.kk-print-recipe .kk-my-recipes-page,
    body.kk-print-recipe .kk-recipe-container-box,
    body.kk-print-recipe .elementor-section,
    body.kk-print-recipe .elementor-column,
    body.kk-print-recipe .elementor-widget,
    body.kk-print-recipe main {
        display: block !important;
        visibility: visible !important;
        margin: 0 !important;
        padding: 0 !important;
        height: auto !important;
        width: 100% !important;
        position: static !important; /* Let them flow, we absolute position the children we want */
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
    }

    /* Logo - Absolute Top */
    body.kk-print-recipe .kk-print-logo {
        display: flex !important;
        visibility: visible !important;
        position: absolute;
        top: 0 !important; /* Reset to top, previous edit put it below content due to confusing copy-paste */
        left: 0;
        width: 100%;
        height: 100px;
        align-items: center;
        justify-content: center;
        z-index: 999999;
        background: transparent !important;
    }
    body.kk-print-recipe .kk-print-logo img {
        height: 80px;
        object-fit: contain;
    }

    /* ==========================================================================
       PRINT OVERLAY STRATEGY - REPLACING OLD ABSOLUTE METHODS
       ========================================================================== */
    @media print {
        /* HIDE NORMAL CONTENT */
        body > * { display: none !important; }

        /* SHOW ONLY PRINT OVERLAY */
        body > #kk-print-overlay {
            display: block !important;
            visibility: visible !important;
            position: absolute !important;
            top: 0 !important;
            left: 0 !important;
            width: 100% !important;
            height: auto !important; /* Allow growth */
            background: #fff !important;
            z-index: 2147483647; /* Max z-index */
            margin: 0 !important;
            padding: 20px !important;
        }

        #kk-print-overlay * {
            visibility: visible !important;
            opacity: 1 !important;
        }
        
        /* Layout Improvements for Cloned Content */
        #kk-print-overlay table {
            width: 100% !important;
            border-collapse: collapse;
        }
        #kk-print-overlay th, #kk-print-overlay td {
            border-bottom: 1px solid #ddd;
            padding: 6px;
            color: #000;
        }
        
        /* Hide unnecessary controls in the clone */
        #kk-print-overlay button,
        #kk-print-overlay .col-fold,
        #kk-print-overlay .col-drag,
        #kk-print-overlay .col-actions,
        #kk-print-overlay .toolbar,
        #kk-print-overlay .kk-recipe-top-controls-bar,
        #kk-print-overlay .kk-recipe-footer-links,
        #kk-print-overlay .kk-recipe-footer-text,
        #kk-print-overlay .kk-recipe-breadcrumbs,
        #kk-print-overlay nav,
        #kk-print-overlay header,
        #kk-print-overlay footer {
            display: none !important;
        }
        
        /* Fix Input appearance */
        #kk-print-overlay input,
        #kk-print-overlay textarea,
        #kk-print-overlay select {
            border: none !important;
            background: transparent !important;
            box-shadow: none !important;
            color: #000 !important;
            appearance: none;
            -webkit-appearance: none;
            padding: 0;
            margin: 0;
            width: 100%;
        }
        
        /* Force title visibility */
        #kk-print-overlay h1, #kk-print-overlay h2, #kk-print-overlay h3 {
            color: #000 !important;
            display: block !important;
            text-align: center;
        }
        
        /* --- CUSTOM PRINT TYPOGRAPHY --- */
        
        /* 1) Headline (Recipe Name) - Medium weight, smaller size */
        #kk-print-overlay #kk-my-recipe-titleInput,
        #kk-print-overlay .kk-recipe-main-title,
        #kk-print-overlay h2#kk-my-recipe-title {
            font-size: 20pt !important;
            font-weight: 600 !important;
            text-transform: none !important;
            text-align: center;
            height: auto;
            margin-bottom: 2px !important;
            padding-bottom: 0 !important;
            color: #000 !important;
        }
        #kk-print-overlay #kk-my-recipe-subtitleInput,
        #kk-print-overlay #kk-my-recipe-subtitle {
             font-size: 12pt !important;
             font-weight: 400 !important;
             font-style: italic;
             text-align: center;
             margin-bottom: 20px;
             color: #555 !important;
        }

        /* 3) Level 1 (Root) - Bigger font, tight line-spacing */
        #kk-print-overlay tr.depth-1 td,
        #kk-print-overlay tr.depth-1 input,
        #kk-print-overlay tr.depth-1 .input-display {
            font-size: 12.5pt !important;
            font-weight: 700 !important;
            line-height: 1.2 !important; 
            color: #000 !important;
            padding-top: 3px !important;
            padding-bottom: 3px !important;
        }

        #kk-print-overlay tr.depth-1 td {
             height: auto !important;
        }
        
        /* Ensure table header is visible and styled */
        #kk-print-overlay thead {
             display: table-header-group !important;
        }
        #kk-print-overlay thead tr, 
        #kk-print-overlay thead th {
             visibility: visible !important;
             opacity: 1 !important;
             background-color: #eadbc6 !important;
             color: #000 !important;
             -webkit-print-color-adjust: exact;
             print-color-adjust: exact;
             border-bottom: 1px solid #000 !important;
             font-size: 10pt !important;
        }

        /* 2) Level 2 (Child) - Dark Brown, smaller */
        #kk-print-overlay tr.depth-2 td,
        #kk-print-overlay tr.depth-2 input,
        #kk-print-overlay tr.depth-2 .input-display {
            font-size: 11pt !important;
            font-weight: 600 !important;
            line-height: 1.1 !important;
            color: #5d4037 !important; /* Dark Brown */
            padding-top: 4px !important;
            padding-bottom: 4px !important;
        }

        /* 2) Level 3 (Grandchild) - Lighter Brown, smaller */
        #kk-print-overlay tr.depth-3 td,
        #kk-print-overlay tr.depth-3 input,
        #kk-print-overlay tr.depth-3 .input-display {
            font-size: 10pt !important;
            font-weight: 500 !important;
            line-height: 1.1 !important;
            color: #8d6e63 !important; /* Lighter Brown */
            padding-top: 5px !important;
            padding-bottom: 5px !important;
        }
        
        /* Adjust indent spacing for print */
        #kk-print-overlay tr.depth-2 td.col-name, 
        #kk-print-overlay tr.depth-2 td.col-name .input-display { padding-left: 15px !important; }
        
        #kk-print-overlay tr.depth-3 td.col-name, 
        #kk-print-overlay tr.depth-3 td.col-name .input-display { padding-left: 30px !important; }

        /* Columns 2 & 3 (Basis & %) - Less important, lighter, smaller */
        #kk-print-overlay tr td.col-basis,
        #kk-print-overlay tr td.col-perc,
        #kk-print-overlay tr td.col-basis .input-display,
        #kk-print-overlay tr td.col-perc .input-display {
             font-weight: 300 !important;
             font-size: 10pt !important;
        }

    }}

/* ── Section blocks (Preparation, Tips & Variations) ──────────────────── */

#kk-my-recipe-editor .kk-section-block {
    margin-top: 16px;
}

#kk-my-recipe-editor .kk-section-title {
    margin: 0 0 6px;
    font-family: 'Roboto Condensed', Arial, sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #6b4c2e;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* The textareas inside section blocks no longer need their own top margin —
   the wrapper handles spacing. */
#kk-my-recipe-editor #kk-my-recipe-explanationInput,
#kk-my-recipe-editor #kk-my-recipe-explanationDisplay,
#kk-my-recipe-editor #kk-my-recipe-tipsInput,
#kk-my-recipe-editor #kk-my-recipe-tipsDisplay {
    margin-top: 0 !important;
}

/* Tips display box (view mode) — a softer green tint to distinguish from
   the explanation/notes box above it. */
#kk-my-recipe-editor:not(.editing) .kk-tips-display {
    background: #e8f5e9;
    border-left-color: #43a047;
}

/* Tips textarea (edit mode) inherits .recipe-notes layout; tweak font and
   give it the matching greenish tint when active. */
#kk-my-recipe-editor.editing .kk-tips-input {
    font-size: 19px;
    line-height: 1.5;
    background: #f1f8e9;
}