:root{
  --bg:#f2f2f7;
  --card:#ffffff;
  --text:#111;
  --muted:#8e8e93;
  --accent:#000;
}

*{
  box-sizing:border-box;
  -webkit-tap-highlight-color:transparent;
}

body{
  margin:0;
  font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background:var(--bg);
  color:var(--text);
}

/* HEADER */

header{
  position:sticky;
  top:0;
  z-index:10;

  background:rgba(242,242,247,0.7);
  backdrop-filter:blur(20px);

  padding:24px 16px 12px;
}

.header-inner{
  max-width:500px;
  margin:0 auto;
}

header h1{
  margin:0;
  font-size:34px;
  font-weight:700;
  letter-spacing:-0.02em;
}

header .subtitle{
  font-size:13px;
  color:var(--muted);
  margin-top:6px;
}

.header-row{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
}

.topbar{
  margin-top:14px;
  display:flex;
  align-items:center;
  gap:10px;
  opacity:0.9;
}

.topbar select{
  padding:10px 14px;
  border-radius:12px;
  border:none;
  background:#e9e9ee;

  font-size:14px;
}

.topbar span{
  font-size:14px;
  color:#8e8e93;
}

.status{
  font-size:13px;
  color:var(--muted);
}

.modal{
  position:fixed;
  inset:0;
  z-index:100;
}

.hidden{
  display:none;
}

.modal-backdrop{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,0.3);
}

.modal-content{
  position:absolute;
  bottom:0;
  left:0;
  right:0;

  background:#fff;
  border-radius:20px 20px 0 0;

  padding:10px 0;
  max-height:70%;
  overflow:auto;
  box-shadow:0 -4px 20px rgba(0,0,0.1);
}

.modal-header{
  text-align:center;
  font-size:15px;
  font-weight:600;
  padding:10px 0 14px;
  color:#8e8e93;
}

.member-row{
  padding:18px 16px;
  font-size:17px;
  border-bottom:1px solid #e5e5ea;
  cursor:pointer;
}

.member-row:active{
  background:#e5e5ea;
}

.active-member{
  background:#f2f2f7;
  border-radius:12px;
  font-weight:600;
}

.profile-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  min-width: 220px;
  z-index: 1000;
  overflow: hidden;
}

.profile-menu-info {
  padding: 14px 16px 10px;
}

.profile-menu-name {
  font-weight: 600;
  font-size: 15px;
}

.profile-menu-email {
  font-size: 12px;
  color: #888;
  margin-top: 2px;
}

.profile-menu-role {
  font-size: 11px;
  color: #aaa;
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.profile-menu-divider {
  border: none;
  border-top: 1px solid #f0f0f0;
  margin: 0;
}

.profile-menu-item {
  padding: 12px 16px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s;
}

.profile-menu-item:hover {
  background: #f5f5f5;
}

.profile-menu-logout {
  color: #e53e3e;
}

/* MAIN */

main{
  padding:16px;
  padding-bottom:120px;
  max-width:500px;
  margin:0 auto;
}

/* CARD */

.card{
  background:var(--card);
  border-radius:18px;
  padding:16px;
  margin-bottom:16px;
}

/* HERO CARD */

.card.next{
  padding:20px;
  border-radius:22px;

  box-shadow:
    0 6px 16px rgba(0,0,0,0.08),
    0 20px 40px rgba(0,0,0,0.10);
}
.card.next b{
  font-size:20px;
  line-height:1.2;
}

.card + .card{
  margin-top:12px;
}

/* TEXT */

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

h3{
  font-size:13px;
  color:var(--muted);
  margin:20px 0 6px;
  text-transform:uppercase;
  letter-spacing:0.05em;
}

.small{
  font-size:14px;
  color:var(--muted);
}

.section-title{
  font-size:13px;
  color:var(--muted);
  font-weight:600;
  margin:20px 0 6px;
}

/* BULLETIN */

.bulletin p{
  margin:8px 0 0;
  line-height:1.5;
}

/* CONCERT LIST */

.concert-row{
  display:flex;
  justify-content:space-between;
  align-items:center;

  padding:12px 14px;
  border-radius:14px;
  margin-bottom:8px;

  background:#fff;
  box-shadow:0 2px 6px rgba(0,0,0,0.05);
}
.concert-row b{
  font-size:15px;
}

.concert-row.muted{
  opacity:0.4;
}

.swipe-wrapper{
  position: relative;
  border-radius: 18px;
  margin-bottom: 12px;
  overflow: hidden;
  background: transparent;
  transition: background 0.1s;
}

.swipe-bg{
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  border-radius: 18px;
  pointer-events: none;
}

.swipe-bg-left{
  position: absolute;
  left: 20px;
  color: #1a7a3a;
  font-weight: 700;
  font-size: 15px;
  opacity: 0;
  transition: opacity 0.15s;
}

.swipe-bg-right{
  position: absolute;
  right: 20px;
  color: #c00;
  font-weight: 700;
  font-size: 15px;
  opacity: 0;
  transition: opacity 0.15s;
}

.swipe-wrapper.swiping-right{
  background: #d4f5e2;
}

.swipe-wrapper.swiping-right .swipe-bg-left{
  opacity: 1;
}

.swipe-wrapper.swiping-left{
  background: #fde8e8;
}

.swipe-wrapper.swiping-left .swipe-bg-right{
  opacity: 1;
}

.swipe-card{
  position: relative;
  margin-bottom: 0;
  border-radius: 18px;
  cursor: pointer;
  touch-action: pan-y;
  background: #fff;
  will-change: transform;
}

/* BUTTONS */

button{
  display:inline-flex;
  align-items:center;
  gap:6px;

  padding:10px 14px;
  border-radius:12px;
  border:none;

  font-size:14px;
  font-weight:600;

  background:#f2f2f7;
  color:#007aff;
}

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

button:active{
  transform:scale(0.96);
}

/* STATUS BUTTON COLORS */

.btn-yes{
  background:#e6f4ea;
  color:#34c759;
}

.btn-maybe{
  background:#fff3cd;
  color:#ff9f0a;
}

.btn-no{
  background:#fdecea;
  color:#ff3b30;
}

.profile-btn{
  width:44px;
  height:44px;
  border-radius:50%;

  background:#e5e5ea;
  color:#000;

  display:flex;
  align-items:center;
  justify-content:center;

  font-weight:600;
  font-size:14px;

  margin-top:4px;

  cursor:pointer;

  box-shadow:0 2px 6px rgba(0,0,0,0.1);
}
/* NAV */

.bottom-wrap{
  position:fixed;
  bottom:12px;
  left:0;
  right:0;
  display:flex;
  justify-content:center;
  z-index:20;
}

.bottom-wrap{
  position:fixed;
  bottom:0;
  left:0;
  right:0;

  display:flex;
  justify-content:center;

  padding-bottom:calc(12px + env(safe-area-inset-bottom));
  pointer-events:none;
}

.bottom{
  display:flex;
  justify-content:space-between; /* 🔥 klíčové */

  width:100%;           /* 👉 roztáhne */
  max-width:420px;      /* 👉 iPhone šířka */
  
  margin:12px;
  padding:6px;

  background:linear-gradient(
    to bottom,
    rgba(255,255,255,0.9),
    rgba(255,255,255,0.6)
  );
  backdrop-filter:blur(30px);
  -webkit-backdrop-filter:blur(20px);
  border:1px solid rgba(255,255,255,0.4);
  border-radius:24px;
  box-shadow:0 8px 30px rgba(0,0,0,0.12);

  pointer-events:auto;
}

.bottom button{
  flex:1; /* 🔥 rovnoměrná šířka */

  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;

  gap:4px;

  border:none;
  background:transparent;

  padding:8px 4px;
  border-radius:18px;

  font-size:12px;
  color:#6b6b70;

  transition:all 0.2s ease;
}

.bottom button.active{
  background:rgba(0,122,255,0.08); /* jemnější */
  color:#007aff;

  transform:none; /* 🔥 vypnout scale */
}

.bottom button.active .icon svg{
  stroke:#007aff;
  transform:scale(1.1);
}

.bottom button span{
  font-size:18px;
}

.bottom button small{
  margin-top:2px;
}

select{
  width:100%;
  padding:12px 14px;        /* 🔥 větší */
  font-size:15px;           /* iOS standard */
  border-radius:10px;
  border:none;
  background:#f2f2f7;
}

input{
  width:100%;
  padding:12px 14px;        /* 🔥 větší */
  font-size:15px;
  border-radius:10px;
  border:1px solid #ddd;
  background:#fff;
}

input[type="date"],
input[type="time"]{
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  border-radius: 10px;
  border: 1px solid #ddd;
  background: #fff;
  appearance: none;
  -webkit-appearance: none;
}

input:focus,
select:focus{
  outline:none;
  border:1px solid #007aff;
  box-shadow:0 0 0 2px rgba(0,122,255,0.15);
}

.card label{
  display:block;
  margin-top:16px;
}

/* NOTICE */

.notice{
  color:var(--muted);
}
.season-title{
  margin:28px 0 10px;
  font-size:12px;
  color:#8e8e93;
  text-transform:uppercase;
  letter-spacing:0.08em;
}

/* EVENTS */

.event-card{
  background:#fff;
  border-radius:18px;
  padding:16px;
  margin-bottom:14px;

  box-shadow:
    0 2px 6px rgba(0,0,0,0.04),
    0 10px 25px rgba(0,0,0,0.06);
}

.event-card.main{
  padding:20px;
}

.event-title{
  font-size:22px;
  font-weight:700;
  margin-bottom:6px;
}

.event-meta{
  font-size:14px;
  color:#6b6b70;
}

.event-place{
  margin-top:4px;
  font-size:14px;
  color:#8e8e93;
}

.event-label{
  font-size:12px;
  text-transform:uppercase;
  color:#8e8e93;
  margin-bottom:10px;
  letter-spacing:0.05em;
}

.event-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:10px 0;
  border-bottom:1px solid #eee;
}

.event-row:last-child{
  border-bottom:none;
}

.ios-textarea{
  width:100%;
  border-radius:12px;
  border:1px solid #ddd;
  padding:12px;
  font-size:15px;
  margin-bottom:10px;
}

.primary-btn{
  background:#007aff;
  color:#fff;
  border:none;
  padding:10px 14px;
  border-radius:10px;
}

.attendance-buttons button{
  flex:1;
  justify-content:center;
  padding:12px 10px;
  border-radius:14px;
}

.back-btn{
  margin-bottom:10px;
  background:none;
  color:#007aff;
  font-weight:500;
}

.status-Přijdu{
  color:#34c759;
}

.status-Možná{
  color:#ff9f0a;
}

.status-Nepřijdu{
  color:#ff3b30;
}

.icon{
  width:22px;
  height:22px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

.icon svg{
  width:100%;
  height:100%;
  fill:none;
  stroke:currentColor;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.bottom button.active .icon svg{
  stroke:#007aff;
}

/* HEATMAPA */
.heatmap{
  border-collapse: collapse;
  font-size: 12px;
  white-space: nowrap;
}
.heatmap-event-col{
  min-width: 120px;
}
.heatmap-th{
  padding: 4px 6px;
  text-align: center;
  font-weight: 600;
  color: var(--muted);
}
.heatmap-label{
  padding: 6px 8px 6px 0;
  font-size: 12px;
  color: var(--text);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.heatmap-date{
  color: var(--muted);
  font-size: 11px;
}
.heatmap-cell{
  width: 28px;
  height: 28px;
  text-align: center;
  border-radius: 6px;
  font-size: 11px;
  color: #555;
}

/* ANIMACE */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
