
.tool-page-hero {
    background:
        radial-gradient(circle at top left, rgba(255,255,255,0.45), transparent 32%),
        linear-gradient(135deg, #5b4fd6, #8b7cff, #f3a6d7, #fbc2eb);
    padding: 60px 20px;
    text-align: center;
    color: #fff;
    border-bottom-left-radius: 36px;
    border-bottom-right-radius: 36px;
    box-shadow: 0 8px 22px rgba(0,0,0,0.16);
}

.tool-page-hero h1 {
    font-size: 42px;
    margin: 0 0 12px;
    text-shadow: 0 3px 10px rgba(0,0,0,0.18);
}

.tool-page-hero p {
    max-width: 760px;
    margin: 0 auto 24px;
    font-size: 20px;
}

.planner-box {
    max-width: 1000px;
    margin: 40px auto;
    padding: 30px;
    border-radius: 28px;
    background:
        radial-gradient(circle at top left, rgba(255,255,255,0.95), transparent 35%),
        linear-gradient(135deg, #ffffff, #f4edff, #fff0fa);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    color: #5b4fd6;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    box-sizing: border-box;
    border: 2px solid #e3dcff;
    border-radius: 14px;
    padding: 12px;
    outline: none;
    font-family: inherit;
    font-size: 16px;
}

.form-group input:focus,
.routine-input:focus,
.routine-time:focus {
    border-color: #8b7cff;
}

.routine-inputs {
    display: grid;
    gap: 10px;
    margin-top: 10px;
}

.routine-row {
    display: grid;
    grid-template-columns: 56px 1fr 105px;
    gap: 9px;
    align-items: center;
}

.routine-number {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    background: #f4edff;
    color: #5b4fd6;
    font-weight: bold;
}

.routine-input,
.routine-time {
    width: 100%;
    box-sizing: border-box;
    border: 2px solid #e3dcff;
    border-radius: 13px;
    padding: 11px 12px;
    outline: none;
    font-family: inherit;
    font-size: 16px;
}

.task-buttons,
.generator-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.task-buttons button,
.generator-buttons button {
    border: none;
    background: #4a6cf7;
    color: #fff;
    padding: 11px 17px;
    border-radius: 999px;
    font-family: inherit;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 5px 14px rgba(0,0,0,0.14);
}

.task-buttons button.secondary {
    background: #f4edff;
    color: #5b4fd6;
}

.task-buttons button:hover,
.generator-buttons button:hover {
    background: #5b4fd6;
    transform: translateY(-2px);
}

.task-buttons button.secondary:hover {
    background: #e7dcff;
}

.routine-preview-wrap {
    max-width: 1000px;
    margin: 0 auto 40px;
    padding: 4px;
}

.routine-preview {
    background: #fff;
    color: #333;
    border: 5px solid #8b7cff;
    border-radius: 25px;
    padding: 28px;
    box-shadow: 0 8px 22px rgba(0,0,0,0.12);
}

.routine-title {
    margin: 0 0 6px;
    text-align: center;
    color: #5b4fd6;
    font-size: 32px;
}

.routine-subtitle {
    margin: 0 0 22px;
    text-align: center;
    color: #6d5316;
    font-weight: bold;
}

.routine-list {
    display: grid;
    gap: 11px;
}

.routine-item {
    display: grid;
    grid-template-columns: 45px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 14px;
    border: 2px solid #e4dcff;
    border-radius: 17px;
    background: linear-gradient(135deg, #fff, #f8f5ff);
}

.routine-check {
    width: 31px;
    height: 31px;
    border: 2px solid #8b7cff;
    border-radius: 9px;
    cursor: pointer;
    background: #fff;
}

.routine-check.done {
    background: #8b7cff;
    position: relative;
}

.routine-check.done::after {
    content: "✓";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: bold;
}

.routine-task {
    font-size: 18px;
    font-weight: bold;
}

.routine-preview-time {
    color: #5b4fd6;
    font-weight: bold;
}

.bedtime-message {
    margin-top: 20px;
    padding: 16px;
    border-radius: 17px;
    background: linear-gradient(135deg, #f4edff, #fff0fa);
    text-align: center;
    color: #5b4fd6;
    font-size: 17px;
    font-weight: bold;
}

.helper-box {
    max-width: 930px;
    margin: 28px auto;
    padding: 22px;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
    text-align: center;
}

@media (max-width: 760px) {
    .tool-page-hero {
        padding: 34px 16px;
    }

    .tool-page-hero h1 {
        font-size: 30px;
        margin-bottom: 8px;
    }

    .tool-page-hero p {
        margin-bottom: 16px;
        font-size: 16px;
    }

    .planner-box {
        margin: 18px auto;
        padding: 18px 14px;
        border-radius: 20px;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .routine-row {
        grid-template-columns: 45px 1fr;
    }

    .routine-time {
        grid-column: 2;
    }

    .routine-number {
        width: 40px;
        height: 40px;
        border-radius: 13px;
    }

    .task-buttons button,
    .generator-buttons button {
        width: 100%;
        max-width: 280px;
    }

    .routine-preview {
        padding: 18px 14px;
        border-radius: 20px;
    }

    .routine-title {
        font-size: 27px;
    }

    .routine-item {
        grid-template-columns: 38px 1fr;
        gap: 10px;
        padding: 12px;
    }

    .routine-preview-time {
        grid-column: 2;
        font-size: 14px;
    }

    .routine-task {
        font-size: 16px;
    }
}

@media print {
    @page {
        size: A4 portrait;
        margin: 10mm;
    }

    body {
        margin: 0 !important;
        padding: 0 !important;
        background: #fff !important;
    }

    body * {
        visibility: hidden !important;
    }

    .routine-preview-wrap,
    .routine-preview-wrap * {
        visibility: visible !important;
    }

    .routine-preview-wrap {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .routine-preview {
        width: 100% !important;
        box-sizing: border-box !important;
        box-shadow: none !important;
        border: 3px solid #8b7cff !important;
        padding: 18px !important;
    }
}
