* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f4f4f4;
    color: #151515;
    padding-bottom: 86px;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #111;
    color: #fff;
    padding: 14px 16px;
    box-shadow: 0 3px 18px rgba(0,0,0,.18);
}

.brand {
    color: #fff;
    text-decoration: none;
    font-weight: 900;
    font-size: 20px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.brand-mark {
    font-size: 24px;
}

.app {
    max-width: 780px;
    margin: 0 auto;
    padding: 18px 14px;
}

h1 {
    font-size: 32px;
    line-height: 1.1;
    margin: 10px 0 16px;
    font-weight: 900;
}

h2 {
    font-size: 20px;
    margin: 22px 0 12px;
    font-weight: 900;
}

p {
    line-height: 1.45;
}

.hero {
    background: linear-gradient(135deg, #111, #9e1111);
    color: #fff;
    border-radius: 26px;
    padding: 24px;
    margin-bottom: 18px;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
}

.hero p {
    opacity: .92;
}

.card,
.quick-card,
.form-card,
.exercise-card,
.list-item,
.plan-block,
.empty,
.alert,
.detail-head {
    background: #fff;
    border-radius: 22px;
    padding: 18px;
    box-shadow: 0 8px 24px rgba(0,0,0,.06);
}

.detail-head {
    margin-bottom: 14px;
}

.detail-head p {
    margin: 0;
    color: #666;
    font-size: 17px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 18px;
    padding: 15px 18px;
    font-size: 17px;
    font-weight: 900;
    text-decoration: none;
    cursor: pointer;
}

.btn-primary {
    background: #e01818;
    color: #fff;
}

.btn-secondary {
    background: #222;
    color: #fff;
}

.full {
    width: 100%;
    margin-top: 14px;
}

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

.stat span {
    display: block;
    font-size: 34px;
    font-weight: 900;
    color: #b30000;
}

.stat small {
    color: #555;
}

.quick-grid {
    display: grid;
    gap: 12px;
    margin: 16px 0;
}

.quick-card {
    display: block;
    text-decoration: none;
    color: #111;
}

.quick-card b {
    display: block;
    font-size: 19px;
}

.quick-card span,
.list-item span {
    display: block;
    color: #666;
    margin-top: 6px;
}

.list-item {
    display: block;
    margin-bottom: 12px;
    text-decoration: none;
    color: #111;
}

.form-card {
    display: grid;
    gap: 15px;
}

label {
    font-weight: 900;
}

input,
select {
    width: 100%;
    margin-top: 7px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 17px;
    font-size: 17px;
    background: #fff;
}

.label-title {
    font-weight: 900;
    margin-top: 4px;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 11px;
}

.chip {
    display: flex;
    gap: 8px;
    align-items: center;
    background: #eeeeee;
    border-radius: 999px;
    padding: 11px 14px;
    font-weight: 900;
}

.chip input {
    width: auto;
    margin: 0;
}

.exercise-card {
    margin-bottom: 12px;
}

.exercise-card small {
    color: #b30000;
    font-weight: 900;
    text-transform: uppercase;
}

.exercise-card h2 {
    margin: 6px 0;
}

.error {
    background: #ffecec;
    color: #8a0000;
}

.plan-block {
    display: grid;
    grid-template-columns: 112px 1fr;
    gap: 16px;
    margin-bottom: 14px;
    align-items: center;
}

.plan-block .time {
    background: #111;
    color: #fff;
    border-radius: 22px;
    width: 112px;
    min-width: 112px;
    min-height: 112px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 10px;
}

.timer-time {
    display: block;
    font-size: 28px;
    font-weight: 900;
    line-height: 1.05;
    margin-bottom: 7px;
}

.plan-block .time small {
    display: block;
    font-size: 15px;
    font-weight: 800;
    opacity: .9;
}

.plan-block h2 {
    margin: 0 0 7px;
    font-size: 21px;
    line-height: 1.15;
}

.plan-block p {
    margin: 0;
    color: #444;
    font-size: 17px;
}

.timer-card {
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, outline .15s ease;
}

.timer-card:active {
    transform: scale(.98);
}

.timer-card.running {
    outline: 5px solid #111;
}

.timer-card.running .time {
    background: #e01818;
    animation: pulse 1s infinite;
}

.timer-card.done {
    outline: 5px solid #15803d;
}

.timer-card.done .time {
    background: #15803d;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.04); }
    100% { transform: scale(1); }
}

.training-card {
    display: block;
}

.training-link {
    display: block;
    text-decoration: none;
    color: #111;
}

.training-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.training-actions form {
    flex: 1;
}

.mini-btn {
    width: 100%;
    border: 0;
    border-radius: 14px;
    padding: 11px;
    font-weight: 900;
    background: #eeeeee;
    color: #111;
    cursor: pointer;
}

.mini-btn.danger {
    background: #ffe5e5;
    color: #a00000;
}
.legal-footer {
    max-width: 780px;
    margin: 8px auto 18px;
    padding: 0 14px;
    text-align: center;
    font-size: 14px;
}

.legal-footer a {
    color: #555;
    text-decoration: none;
    font-weight: 700;
}

.legal-footer a:hover,
.legal-footer a:focus {
    color: #a00000;
    text-decoration: underline;
}
.bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: #111;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    z-index: 20;
    box-shadow: 0 -4px 18px rgba(0,0,0,.18);
}

.bottom-nav a {
    color: #fff;
    text-align: center;
    text-decoration: none;
    padding: 15px 2px;
    font-size: 13px;
    font-weight: 900;
    white-space: nowrap;
}

.bottom-nav a:active {
    background: #222;
}

@media (max-width: 420px) {
    h1 {
        font-size: 30px;
    }

    .plan-block {
        grid-template-columns: 100px 1fr;
        gap: 14px;
        padding: 14px;
    }

    .plan-block .time {
        width: 100px;
        min-width: 100px;
        min-height: 100px;
    }

    .timer-time {
        font-size: 24px;
    }

    .plan-block h2 {
        font-size: 20px;
    }

    .plan-block p {
        font-size: 16px;
    }

    .bottom-nav a {
        font-size: 12px;
    }
}

@media (min-width: 700px) {
    .app {
        padding: 28px;
    }

    .quick-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    h1 {
        font-size: 38px;
    }
}
.plan-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.exercise-info {
    border: 0;
    background: #111;
    color: #fff;
    border-radius: 999px;
    min-width: 34px;
    height: 34px;
    font-size: 18px;
    font-weight: 900;
    cursor: pointer;
}

.exercise-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.65);
    z-index: 100;
    padding: 18px;
    align-items: center;
    justify-content: center;
}

.exercise-window {
    background: #fff;
    width: 100%;
    max-width: 520px;
    max-height: 88vh;
    overflow-y: auto;
    border-radius: 24px;
    padding: 22px;
    position: relative;
}

#closeModal {
    position: sticky;
    top: 0;
    float: right;
    border: 0;
    background: #111;
    color: #fff;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    font-size: 18px;
    font-weight: 900;
    cursor: pointer;
}
/* ==========================
   TOOLS
========================== */

.tools-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
    gap:20px;
    margin-top:25px;
    margin-bottom:90px;
}

.tool-card{
    display:block;
    background:#fff;
    border-radius:18px;
    padding:24px;
    text-decoration:none;
    color:#222;
    box-shadow:0 8px 25px rgba(0,0,0,.08);
    transition:.2s;
    border:1px solid #ececec;
}

.tool-card:hover{
    transform:translateY(-4px);
    box-shadow:0 12px 35px rgba(0,0,0,.14);
}

.tool-icon{
    width:64px;
    height:64px;
    border-radius:16px;
    background:#b40000;
    color:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:30px;
    margin-bottom:18px;
}

.tool-card h3{
    margin:0 0 10px;
    font-size:24px;
    font-weight:700;
    color:#111;
}

.tool-card p{
    margin:0;
    color:#666;
    line-height:1.5;
    font-size:15px;
}

@media (max-width:700px){

    .tools-grid{
        grid-template-columns:1fr;
        gap:16px;
    }

    .tool-card{
        padding:18px;
    }

    .tool-icon{
        width:56px;
        height:56px;
        font-size:26px;
    }

    .tool-card h3{
        font-size:20px;
    }

}
.time-adjust{
    width:34px;
    height:30px;
    border:0;
    border-radius:10px;
    background:#fff;
    color:#111;
    font-size:22px;
    font-weight:900;
    line-height:1;
    cursor:pointer;
    margin:2px 0;
}

.time-adjust:active{
    transform:scale(.94);
}

.plan-block .time{
    gap:4px;
}

@media(max-width:420px){
    .time-adjust{
        width:30px;
        height:28px;
        font-size:20px;
    }
}
/* ==========================
   SUCHE IN DER KOPFLEISTE
========================== */

.topbar-inner{
    width:100%;
    max-width:1180px;
    margin:0 auto;
    display:flex;
    align-items:center;
    gap:22px;
}

.topbar .brand{
    flex:0 0 auto;
    white-space:nowrap;
}

.topbar-search{
    flex:1;
    max-width:680px;
    margin-left:auto;
    display:flex;
    align-items:center;
    background:#fff;
    border-radius:16px;
    overflow:hidden;
}

.topbar-search input{
    width:100%;
    min-width:0;
    height:46px;
    border:0;
    outline:0;
    padding:0 16px;
    background:#fff;
    color:#111;
    font-size:16px;
}

.topbar-search input::placeholder{
    color:#777;
}

.topbar-search-button{
    flex:0 0 48px;
    width:48px;
    height:40px;
    margin-right:4px;
    border:0;
    border-radius:12px;
    background:transparent;
    color:#222;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:28px;
    font-weight:700;
    line-height:1;
    cursor:pointer;
}

.topbar-search-button:hover{
    background:#f1f1f1;
}

.topbar-search-button:active{
    transform:scale(.94);
}

@media(max-width:700px){

    .topbar{
        padding:10px 12px;
    }

    .topbar-inner{
        gap:10px;
    }

    .topbar .brand{
        font-size:0;
        gap:0;
    }

    .topbar .brand-mark{
        font-size:28px;
    }

    .topbar-search{
        max-width:none;
        border-radius:13px;
    }

    .topbar-search input{
        height:42px;
        padding:0 12px;
        font-size:15px;
    }

    .topbar-search-button{
        flex-basis:42px;
        width:42px;
        height:36px;
        margin-right:3px;
        font-size:25px;
    }
}

@media(max-width:390px){

    .topbar-search input{
        font-size:14px;
    }

    .topbar-search input::placeholder{
        color:transparent;
    }
}