:root {
            --primary: #0284c7;
            --bg-page: #f1f5f9;
            --bg-card: #ffffff;
            --text-main: #0f172a;
            --text-muted: #64748b;
            --line-light: #e2e8f0;
            --note-color: #be123c;
            --trolej: #0284c7;
            --bus: #ee5d5d;            
        }

        @font-face {
          font-family: 'Skeleton';
          src: url('Skeleton.ttf') format('woff2')
          font-weight: normal;
          font-style: normal;
          font-display: swap; 
        }

        body {
            font-family: 'Inter', system-ui, sans-serif;
            background-color: var(--bg-page);
            padding: 20px;
            margin: 0;
            display: flex;
            justify-content: center;
        }

        a {
            color: inherit;
            text-decoration: none; /* Optional: removes the underline */
        }
        
        .timetable-wrapper {
            display: flex;
            background: var(--bg-card);
            max-width: 1050px;
            width: 100%;
            border-radius: 12px;
            overflow: hidden;
            box-shadow: 0 4px 15px rgba(0,0,0,0.05);
            border: 1px solid var(--line-light);
        }

        /* LEVÝ SLOUPEC: TRASA */
        .route-column {
            flex: 0.8;
            background: #fafafa;
            padding: 12px 15px;
            border-right: 1px solid var(--line-light);
        }

        .route-column h2 { font-size: 11px; text-transform: uppercase; color: var(--text-muted); margin-bottom: 7px; padding-left: 10px; }

        .route-list { list-style: none; padding: 0; margin: 0; position: relative; }
        
        .route-list::before {
            content: ''; position: absolute; left: 55px; top: 10px; bottom: 10px;
            width: 2px; background: var(--line-light);
        }

        .route-stop { display: flex; align-items: center; margin-bottom: 6px; position: relative; }
        .route-stop:hover {
            cursor: pointer;
            background-color: var(--line-light);
        }
        .route-list a {text-decoration: none; }
        .reverse-footer {text-align: center; margin: 10px;}
        .route-column-footer {padding: 10px; border-top: 1px solid #ccc; text-align: center; }
        
        .direction-button
        {
            background-color: #f0f9ff;
        color: #1A365D;
    
    /* Structure: Matches the crisp table borders */
        padding: 5px 10px;
    border: 1px solid #1A365D;
    border-radius: 4px;
    
    /* Interaction */
    transition: all 0.2s ease;
    text-align: center;
    cursor: pointer;
    
        }
        
        .direction-button:hover {
    background-color: #1A365D;
    color: #FFFFFF;
    text-decoration: none; /* Ensures underline doesn't reappear */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  }

        
        .dist { width: 35px; font-size: 11px; font-weight: 600; color: var(--text-muted); text-align: right; padding-right: 15px; }
        .stop-dot { position: absolute; left: 51px; width: 10px; height: 10px; background: white; border: 2px solid #cbd5e1; border-radius: 50%; z-index: 2; }
        .stop-name { padding-left: 30px; font-size: 13px; font-weight: 500; }
        .current { color: var(--note-color); font-weight: 700; }
        .current .stop-dot { background: var(--primary); border-color: var(--primary); }
        .passed {opacity: 0.5;}

        /* PRAVÝ SLOUPEC: ODJEZDY */
        .schedule-column { flex: 2; display: flex; flex-direction: column; }
        .header { padding: 20px 25px; border-bottom: 1px solid var(--line-light); display: flex; justify-content: space-between; align-items: center; }
        .line-badge-tr, .line-badge-aut { font-size: 24px; font-weight: 800; background: var(--primary); color: white; padding: 4px 12px; border-radius: 6px; }
        .line-badge-tr  {background: var(--trolej);}
        .line-badge-aut {background: var(--bus);}

        .stop-timetable { width: 100%; border-collapse: collapse; }
        .stop-timetable th { text-align: left; font-size: 12px; text-transform: uppercase; text-align: center; border-right: 2px solid #f1f5f9;  color: var(--text-muted); padding: 12px 20px; background: #fcfcfc; border-bottom: 1px solid var(--line-light); }
        .stop-timetable td { padding: 8px 20px; border-bottom: 1px solid #f8fafc; border-right: 2px solid #f1f5f9; }
        .hour-cell { font-weight: 800; font-size: 18px; width: 25px; color: #475569;  }
        .minutes-cell { font-size: 16px; padding-left: 20px !important; }
        
        /* Styl pro poznámky u čísel */
        .idx { font-size: 14px; vertical-align: super; color: var(--note-color); font-weight: bold; margin-left: 1px; }

        /* LEGENDA A VYSVĚTLIVKY */
        .legend-section {            
            padding: 20px 25px;
            background: #f8fafc;
            border-top: 1px solid var(--line-light);
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 15px;
        }

        .legend-group h3 { font-size: 10px; text-transform: uppercase; color: var(--text-muted); margin: 0 0 10px 0; letter-spacing: 0.5px; }
        .legend-item { font-size: 12px; margin-bottom: 5px; display: flex; align-items: flex-start; gap: 8px; color: var(--text-main); }
        .symbol_zast { font-family: 'Skeleton'; font-weight: bold; min-width: 15px; }
        .symbol_norm { font-weight: bold; min-width: 15px; }
        
        .extra
        {     
            font-size: 13px;            
            margin: 5px;
            padding: 5px;
            text-align: center;
            line-height: 1.4em;
            
        }
        .extra a
        {
            text-decoration: underline;
        }
       /*  .symbol { font-weight: bold; min-width: 15px; }*/
         
        @media print {
            body { background: white; padding: 0; }
            .timetable-wrapper { box-shadow: none; border: 1px solid #000; width: 100%; }
            .route-column, .legend-section { background: white !important; border-color: #000 !important; }
            .hour-cell { background: #f3f4f6 !important; -webkit-print-color-adjust: exact; }
            .line-badge-tr, .line-badge-aut { background: #000 !important; color: white !important; -webkit-print-color-adjust: exact; }
            .current .stop-dot { background: #000 !important; }
            .direction-button {visibility:hidden !important; }
        }

        @media (max-width: 800px) { .timetable-wrapper { flex-direction: column-reverse; } .legend-section { grid-template-columns: 1fr; } }