:root{
--bg:#f5f5f5;
--card:#ffffff;
--text:#2b2b2b;
--muted:#6b7280;
--accent:#3b82f6;
--border:#e5e7eb;
}

*{
box-sizing:border-box;
}

body{
margin:0;
font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
background:var(--bg);
color:var(--text);
line-height:1.5;
display:flex;
flex-direction:column;
min-height:100vh;
}

/* hlavička */
header{
background:white;
border-bottom:1px solid var(--border);
padding:26px 16px;
text-align:center;
}

header h1{
margin:0;
font-size:28px;
font-weight:600;
}

header p{
margin-top:6px;
color:var(--muted);
}

/* layout */
.container{
max-width:900px;
margin:40px auto;
padding:0 18px;
flex:1;
}

/* mobilní optimalizace */
@media (max-width:768px){
  header{
    padding:16px 12px;
  }
  
  header h1{
    font-size:22px;
  }
  
  header p{
    font-size:14px;
  }
  
  .container{
    margin:12px auto;
    padding:0 6px;
  }
}

@media (max-width:480px){
  header h1{
    font-size:20px;
  }
  
  header p{
    font-size:13px;
    margin-top:4px;
  }
  
  .container{
    margin:8px auto;
    padding:0 4px;
  }
}

.grid{
display:grid;
grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
gap:18px;
}

/* karty nástrojů */
.card{
background:var(--card);
border:1px solid var(--border);
border-radius:12px;
padding:20px;
transition:0.15s ease;
}

.card:hover{
transform:translateY(-2px);
box-shadow:0 6px 16px rgba(0,0,0,0.08);
}

/* card jako tlačítko */
.card-button{
display:block;
padding:20px;
background:var(--card);
border:1px solid var(--border);
border-radius:12px;
text-decoration:none;
color:var(--text);
font-size:18px;
font-weight:600;
transition:0.15s ease;
text-align:center;
}

.card-button:hover{
transform:translateY(-2px);
box-shadow:0 6px 16px rgba(0,0,0,0.08);
}

.card-button-desc{
font-size:13px;
color:var(--muted);
font-weight:400;
margin-top:6px;
}

/* mobilní optimalizace kart */
@media (max-width:768px){
  .card-button{
    padding:20px;
    font-size:18px;
  }
  
  .card-button-desc{
    font-size:13px;
  }
}

@media (max-width:480px){
  .card-button{
    padding:22px;
    font-size:18px;
  }
  
  .card-button-desc{
    font-size:13px;
    margin-top:6px;
  }
}

.card h3{
margin:0 0 6px 0;
font-size:18px;
}

.card p{
margin:0 0 14px 0;
color:var(--muted);
font-size:14px;
}

/* tlačítko */
.button{
display:inline-block;
padding:10px 14px;
background:var(--accent);
color:white;
text-decoration:none;
border-radius:8px;
font-size:14px;
}

.button:hover{
opacity:0.9;
}

/* patička */
footer{
text-align:center;
padding:30px 10px;
color:var(--muted);
font-size:13px;
margin-top:auto;
}

.back-button{
display:block;
background:var(--accent);
color:white;
padding:14px 22px;
border-radius:8px;
text-decoration:none;
font-size:16px;
transition:0.15s ease;
margin-top:24px;
text-align:center;
}

.back-button:hover{
opacity:0.9;
}

/* mobilní optimalizace tlačítka */
@media (max-width:480px){
  .back-button{
    padding:16px 18px;
    font-size:15px;
    margin-top:18px;
  }
}
/* extra mobilni optimalizace <420px */
@media (max-width:420px){
  .container{
    margin:0;
    padding:0;
  }

  .card{
    width:100%;
    border-radius:0;
  }
}
/* formulář kalkulačky */
.calc-card{
max-width:1210px;
margin:30px auto;
background:white;
border:1px solid var(--border);
border-radius:12px;
padding:47px;
}

/* mobilní optimalizace kalkulačky */
@media (max-width:768px){
  .calc-card{
    width:100%;
    max-width:100%;
    margin:14px auto;
    padding:46px;
  }
}

@media (max-width:480px){
  .calc-card{
    width:100%;
    max-width:100%;
    margin:6px auto;
    padding:51px;
  }
}

.row{
display:flex;
justify-content:space-between;
align-items:center;
margin:14px 0;
gap:14px;
flex-wrap:wrap;
}

.price-grid{
display:grid;
grid-template-columns:1fr;
gap:16px;
margin-bottom:24px;
}

.price-grid .row{
margin:0;
flex-direction:row;
align-items:center;
justify-content:space-between;
}

.price-grid .row label{
flex:1;
margin-bottom:0;
font-size:16px;
min-width:unset;
}

.price-grid .row input{
width:150px;
font-size:16px;
}

.price-grid .row select{
width:150px;
font-size:16px;
}

.section-title{
font-size:22px;
font-weight:600;
}

h3.section-title{
margin:20px 0 10px 0;
}

label.section-title{
margin:0;
}

.row.diameter-row label{
flex:1;
margin-bottom:0;
min-width:unset;
}

.row.diameter-row{
background:#f8fafc;
border:1px solid var(--border);
border-radius:10px;
padding:14px 16px;
}

.row.diameter-row select{
width:150px;
font-size:16px;
}

.row-inline{
flex-direction:row;
}

.row label{
font-size:16px;
flex:1;
min-width:180px;
}

.row input,
.row select{
padding:9px;
border:1px solid var(--border);
border-radius:6px;
width:170px;
font-size:16px;
}

/* mobilní optimalizace formulare */
@media (max-width:768px){
  .row{
    flex-direction:column;
    align-items:flex-start;
  }

  .row.row-inline{
    flex-direction:row;
    align-items:center;
  }

  .row.diameter-row{
    flex-direction:row;
    align-items:center;
  }
  
  .row label{
    width:100%;
    margin-bottom:4px;
    font-size:15px;
  }

  .row.diameter-row label{
    width:auto;
    margin-bottom:0;
  }
  
  .row input,
  .row select{
    width:100%;
    padding:10px;
    font-size:18px;
  }

  .row.diameter-row select{
    width:150px;
    padding:9px;
    font-size:16px;
  }
}

.result{
display:flex;
justify-content:space-between;
align-items:center;
margin-top:24px;
font-weight:600;
gap:16px;
font-size:18px;
}

.price{
font-size:28px;
color:#15803d;
font-weight:700;
}
