/* Class sessions (Google Drive links) - v4.19.16 */
.sth-sessions,.sth-session-manager{margin:28px 0;padding:clamp(22px,4vw,42px);border:1px solid #b9d0c9;border-radius:26px;background:#f7faf8;color:#001c18!important;-webkit-text-fill-color:#001c18;box-shadow:0 18px 45px rgba(0,28,24,.09);box-sizing:border-box}
.sth-session-heading>span{color:#168bb8!important;-webkit-text-fill-color:#168bb8;font-size:.74rem;font-weight:900;letter-spacing:.17em}
.sth-session-heading h2{margin:8px 0!important;color:#001c18!important;-webkit-text-fill-color:#001c18;font-size:clamp(1.7rem,4vw,2.7rem)!important}
.sth-session-heading p{color:#48645d!important;-webkit-text-fill-color:#48645d}
.sth-session-list{display:grid;gap:14px;margin-top:24px}
.sth-session-card,.sth-session-empty,.sth-session-row{display:flex;gap:16px;align-items:center;justify-content:space-between;flex-wrap:wrap;padding:20px;border:1px solid #ccdbd6;border-radius:18px;background:#fff;color:#001c18!important;-webkit-text-fill-color:#001c18}
.sth-session-empty{display:block;margin-top:24px}
.sth-session-card>div{flex:1 1 260px;min-width:0}
.sth-session-card span{display:inline-block;color:#168bb8!important;-webkit-text-fill-color:#168bb8;font-size:.78rem;font-weight:800;letter-spacing:.06em}
.sth-session-card h3{margin:4px 0 6px!important;color:#001c18!important;-webkit-text-fill-color:#001c18;font-size:1.15rem!important;overflow-wrap:anywhere}
.sth-session-card p,.sth-session-empty p,.sth-session-hint{margin:6px 0 0!important;color:#48645d!important;-webkit-text-fill-color:#48645d;overflow-wrap:anywhere}
.sth-session-open{display:inline-block;padding:12px 20px;border-radius:999px;background:#001c18;color:#e3fb76!important;-webkit-text-fill-color:#e3fb76;font-weight:800;text-decoration:none!important;white-space:nowrap}
.sth-session-open:hover{background:#0b3a33}
.sth-session-form{display:grid;gap:14px;margin-top:18px}
.sth-session-form label{display:grid;gap:6px;color:#001c18!important;-webkit-text-fill-color:#001c18;font-weight:700}
.sth-session-form input,.sth-session-form select,.sth-session-form textarea{width:100%;box-sizing:border-box;padding:12px 14px;border:1px solid #b9d0c9;border-radius:12px;background:#fff!important;color:#001c18!important;-webkit-text-fill-color:#001c18;font:inherit;font-size:16px}
.sth-session-actions{display:flex;gap:14px;align-items:center;flex-wrap:wrap}
.sth-session-save{padding:12px 22px;border:0;border-radius:999px;background:#001c18;color:#e3fb76!important;-webkit-text-fill-color:#e3fb76;font-weight:800;cursor:pointer}
.sth-session-actions a{color:#168bb8!important;-webkit-text-fill-color:#168bb8;font-weight:700}
.sth-session-admin-list{display:grid;gap:12px;margin-top:28px}
.sth-session-admin-list h3{margin:0!important;color:#001c18!important;-webkit-text-fill-color:#001c18}
.sth-session-row strong{display:block;color:#001c18!important;-webkit-text-fill-color:#001c18;overflow-wrap:anywhere}
.sth-session-row small{display:block;margin:4px 0;color:#48645d!important;-webkit-text-fill-color:#48645d}
.sth-session-row a{color:#168bb8!important;-webkit-text-fill-color:#168bb8;font-size:.85rem;font-weight:700}
.sth-session-row>div:first-child{flex:1 1 260px;min-width:0}
.sth-session-row-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.sth-session-row-actions form{margin:0}
.sth-session-btn{display:inline-block;padding:9px 16px;border:1px solid #001c18;border-radius:12px;background:#fff;color:#001c18!important;-webkit-text-fill-color:#001c18;font:800 .85rem Arial,sans-serif;text-decoration:none!important;cursor:pointer}
.sth-session-btn.is-danger{background:#9b1c1c;border-color:#9b1c1c;color:#fff!important;-webkit-text-fill-color:#fff}
.sth-session-notice{margin:14px 0 0!important;padding:12px 16px;border-radius:12px;font-weight:700}
.sth-session-notice.is-success{background:#e3fb76;color:#001c18!important;-webkit-text-fill-color:#001c18}
.sth-session-notice.is-error{background:#fde2e2;color:#7a1212!important;-webkit-text-fill-color:#7a1212}
@media (max-width:740px){.sth-session-open{width:100%;text-align:center;box-sizing:border-box}.sth-session-row-actions{width:100%}}

/* v4.19.16 dedicated page, access requests */
.sth-sessions-page{max-width:1100px;margin:0 auto;padding:0 clamp(16px,4vw,28px)}
.sth-session-dashboard-card{display:flex;gap:18px;align-items:center;justify-content:space-between;flex-wrap:wrap}
.sth-session-dashboard-card .sth-session-heading h2{font-size:clamp(1.3rem,3vw,1.9rem)!important}
.sth-session-request{display:grid;gap:10px;flex:1 1 280px;max-width:440px}
.sth-session-request label{display:grid;gap:6px;color:#001c18!important;-webkit-text-fill-color:#001c18;font-weight:700;font-size:.92rem}
.sth-session-request input{width:100%;box-sizing:border-box;padding:12px 14px;border:1px solid #b9d0c9;border-radius:12px;background:#fff!important;color:#001c18!important;-webkit-text-fill-color:#001c18;font:inherit;font-size:16px}
.sth-session-request button{border:0;cursor:pointer;font:800 1rem Arial,sans-serif}
.sth-session-status{flex:1 1 260px;max-width:440px;margin:0!important;padding:12px 16px;border-radius:12px;background:#fff7d6;color:#5a4500!important;-webkit-text-fill-color:#5a4500;font-weight:700;overflow-wrap:anywhere}
.sth-session-form .sth-session-check{display:flex;gap:10px;align-items:flex-start;font-weight:700}
.sth-session-form .sth-session-check input{width:auto;margin-top:4px}
.sth-session-row{align-items:flex-start}
.sth-session-requests{flex:1 1 100%;margin-top:6px;padding-top:12px;border-top:1px dashed #ccdbd6}
.sth-session-requests h4{margin:0 0 8px!important;color:#001c18!important;-webkit-text-fill-color:#001c18}
.sth-session-request-row{display:flex;gap:12px;justify-content:space-between;align-items:center;flex-wrap:wrap;padding:10px 0;border-bottom:1px solid #eef3f1}
.sth-session-request-row>div:first-child{flex:1 1 240px;min-width:0}
.sth-session-request-row em{color:#48645d!important;-webkit-text-fill-color:#48645d;font-size:.82rem}
.sth-session-request-row code{display:block;margin:2px 0;padding:3px 8px;border-radius:8px;background:#eef7f4;color:#001c18!important;-webkit-text-fill-color:#001c18;overflow-wrap:anywhere;user-select:all}

/* v4.19.16 Telegram link, locked registered email, all screen sizes */
.sth-session-card>.sth-session-access{flex:0 1 auto;display:flex;flex-wrap:wrap;gap:10px;align-items:center;justify-content:flex-end}
.sth-session-access .sth-session-request{flex:1 1 280px;max-width:440px}
.sth-session-telegram{display:inline-flex;align-items:center;justify-content:center;gap:8px;background:#229ed9;color:#fff!important;-webkit-text-fill-color:#fff}
.sth-session-telegram:hover{background:#1b86b9}
.sth-session-telegram svg{flex:0 0 auto}
.sth-session-request input[readonly]{background:#eef7f4!important;color:#001c18!important;-webkit-text-fill-color:#001c18;cursor:not-allowed;opacity:1}
.sth-session-email-note{margin:0!important;color:#48645d!important;-webkit-text-fill-color:#48645d;font-size:.84rem;line-height:1.45}
.sth-session-row>div:first-child a{display:block;margin-top:2px}
.sth-session-card,.sth-session-row,.sth-session-request-row{box-sizing:border-box;max-width:100%}

/* Desktop (>=1101px): comfortable reading width, two-column card */
@media (min-width:1101px){
  .sth-sessions-page{max-width:1180px}
  .sth-session-list{grid-template-columns:repeat(2,minmax(0,1fr))}
  .sth-session-card{align-items:flex-start;flex-direction:column}
  .sth-session-card>.sth-session-access{justify-content:flex-start;width:100%}
}
/* Tablet (741-1100px): single column, actions beside the text */
@media (min-width:741px) and (max-width:1100px){
  .sth-sessions-page{max-width:100%;padding:0 28px}
  .sth-session-list{grid-template-columns:1fr}
  .sth-session-form{grid-template-columns:1fr 1fr}
  .sth-session-form>label:first-of-type,.sth-session-form>label:nth-of-type(n+4),.sth-session-form>.sth-session-hint,.sth-session-form>.sth-session-actions{grid-column:1/-1}
}
/* Mobile (<=740px): stacked, full-width buttons, 16px inputs (no iOS zoom) */
@media (max-width:740px){
  .sth-sessions-page{padding:0 14px}
  .sth-sessions,.sth-session-manager{margin:18px 0;border-radius:20px}
  .sth-session-card,.sth-session-row{padding:16px;flex-direction:column;align-items:stretch}
  .sth-session-card>div,.sth-session-card>.sth-session-access{flex:1 1 auto;width:100%}
  .sth-session-card>.sth-session-access{flex-direction:column;align-items:stretch;justify-content:flex-start}
  .sth-session-access .sth-session-request{max-width:none;width:100%}
  .sth-session-telegram,.sth-session-access>.sth-session-open{width:100%;box-sizing:border-box}
  .sth-session-status{max-width:none}
  .sth-session-request-row{flex-direction:column;align-items:stretch}
  .sth-session-save{width:100%;min-height:48px}
  .sth-session-btn{min-height:44px}
  .sth-session-dashboard-card{flex-direction:column;align-items:stretch}
  .sth-session-dashboard-card .sth-session-open{width:100%;box-sizing:border-box;text-align:center}
}

/* v4.19.16 "Watch here" player: works in portrait and landscape, rotates with the phone */
.sth-session-watch{border:0;cursor:pointer;font:800 1rem Arial,sans-serif;background:#168bb8;color:#fff!important;-webkit-text-fill-color:#fff}
.sth-session-watch:hover{background:#0f6f94}
.sth-session-player{flex:1 1 100%;width:100%;box-sizing:border-box;margin-top:4px;padding:12px;border-radius:16px;background:#001c18;color:#fff}
.sth-session-player[hidden]{display:none!important}
.sth-session-player-bar{display:flex;gap:10px;align-items:center;justify-content:space-between;flex-wrap:wrap;margin-bottom:10px}
.sth-session-player-bar strong{color:#e3fb76!important;-webkit-text-fill-color:#e3fb76;overflow-wrap:anywhere;min-width:0}
.sth-session-player-bar span{display:flex;gap:8px}
.sth-session-player-frame{position:relative;width:100%;aspect-ratio:16/9;max-height:80vh;border-radius:12px;overflow:hidden;background:#000}
.sth-session-player-frame iframe{position:absolute;inset:0;width:100%;height:100%;border:0}
.sth-session-player-help{margin:10px 0 0!important;color:#cfe3dd!important;-webkit-text-fill-color:#cfe3dd;font-size:.84rem}
.sth-session-player:fullscreen{width:100vw;height:100vh;margin:0;padding:8px;border-radius:0;display:flex;flex-direction:column}
.sth-session-player:-webkit-full-screen{width:100vw;height:100vh;margin:0;padding:8px;border-radius:0;display:flex;flex-direction:column}
.sth-session-player:fullscreen .sth-session-player-frame,.sth-session-player:-webkit-full-screen .sth-session-player-frame{flex:1;aspect-ratio:auto;max-height:none;border-radius:0}
.sth-session-player:fullscreen .sth-session-player-help,.sth-session-player:-webkit-full-screen .sth-session-player-help{display:none}
@media (max-width:740px){
  .sth-session-watch{width:100%;box-sizing:border-box}
  .sth-session-player{padding:8px;border-radius:12px}
  .sth-session-player-frame{aspect-ratio:16/10;max-height:70vh}
}
@media (orientation:landscape) and (max-height:520px){.sth-session-player-frame{max-height:88vh}}

/* Folder view inside the player: taller, no 16:9 crop */
.sth-session-player.is-folder .sth-session-player-frame{aspect-ratio:auto;height:min(70vh,560px);max-height:none}
@media (max-width:740px){.sth-session-player.is-folder .sth-session-player-frame{aspect-ratio:auto;height:65vh}}

/* In-site player (site fetches from Google Drive): video + file list, portrait and landscape */
.sth-session-player.is-api .sth-session-player-frame{aspect-ratio:auto;max-height:none;height:auto;overflow:visible;background:transparent;position:static}
.sth-session-stage video,.sth-session-stage audio{display:block;width:100%;max-height:72vh;border-radius:12px;background:#000;object-fit:contain}
.sth-session-now{margin:0 0 8px!important;color:#e3fb76!important;-webkit-text-fill-color:#e3fb76;font-weight:700;overflow-wrap:anywhere}
.sth-session-files-bar{margin:10px 0 0}
.sth-session-files{display:grid;gap:8px;margin-top:10px}
.sth-session-files-msg{margin:0!important;padding:10px 0;color:#cfe3dd!important;-webkit-text-fill-color:#cfe3dd}
.sth-session-file{display:flex;gap:12px;align-items:center;width:100%;box-sizing:border-box;min-height:48px;padding:10px 14px;border:1px solid rgba(255,255,255,.18);border-radius:12px;background:rgba(255,255,255,.07);color:#fff!important;-webkit-text-fill-color:#fff;font:700 .95rem Arial,sans-serif;text-align:left;cursor:pointer}
.sth-session-file:hover,.sth-session-file:focus-visible{background:rgba(227,251,118,.16);border-color:#e3fb76}
.sth-session-file-icon{flex:0 0 auto;font-size:1.1rem}
.sth-session-file-name{min-width:0;overflow-wrap:anywhere}
.sth-session-drive-box{margin:18px 0;padding:16px 18px;border:1px dashed #b9d0c9;border-radius:16px;background:#fff}
.sth-session-drive-box h3{margin:0 0 6px!important;color:#001c18!important;-webkit-text-fill-color:#001c18;font-size:1.05rem!important}
.sth-session-drive-box code{overflow-wrap:anywhere;user-select:all}
.sth-session-drive-box textarea{width:100%;box-sizing:border-box;font:13px/1.4 monospace;padding:10px 12px;border:1px solid #b9d0c9;border-radius:12px}
.sth-session-player:fullscreen .sth-session-stage video,.sth-session-player:-webkit-full-screen .sth-session-stage video{max-height:calc(100vh - 150px)}
.sth-session-player:fullscreen .sth-session-player-frame,.sth-session-player:-webkit-full-screen .sth-session-player-frame{overflow:auto}

/* ===== v4.19.16 layout pass: one card system for phone, tablet and desktop ===== */
.sth-sessions-page{max-width:1240px}
.sth-session-toolbar{display:flex;flex-wrap:wrap;gap:12px;align-items:center;justify-content:space-between;margin:20px 0 0}
.sth-session-count{display:inline-block;padding:6px 14px;border-radius:999px;background:#e3fb76;color:#001c18!important;-webkit-text-fill-color:#001c18;font-size:.82rem;font-weight:800}
.sth-session-search{flex:1 1 220px;max-width:360px;box-sizing:border-box;min-height:44px;padding:10px 16px;border:1px solid #b9d0c9;border-radius:999px;background:#fff!important;color:#001c18!important;-webkit-text-fill-color:#001c18;font:inherit;font-size:16px}
.sth-session-search:focus{outline:3px solid #28c2f3;outline-offset:2px}

/* Grid: 1 column on phones, 2 on tablets, 3 on wide desktops - cards share equal height */
.sth-sessions-page .sth-session-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,310px),1fr));gap:16px;margin-top:16px;align-items:stretch}
.sth-sessions-page .sth-session-card{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;flex-wrap:nowrap;gap:16px;padding:20px;border:1px solid #ccdbd6;border-top:4px solid #168bb8;border-radius:20px;background:#fff;box-shadow:0 8px 24px rgba(0,28,24,.06);min-width:0}
.sth-sessions-page .sth-session-card[hidden]{display:none}
.sth-sessions-page .sth-session-card.is-playing{grid-column:1/-1}
.sth-sessions-page .sth-session-card>.sth-session-info{flex:1 1 auto;min-width:0}
.sth-session-badges{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:10px}
.sth-session-badge{display:inline-block;padding:3px 10px;border-radius:999px;background:#eef7f4;color:#215348!important;-webkit-text-fill-color:#215348;font-size:.72rem!important;font-weight:800;letter-spacing:.04em;text-transform:uppercase}
.sth-session-badge.is-date{background:#001c18;color:#e3fb76!important;-webkit-text-fill-color:#e3fb76}
.sth-session-badge.is-telegram{background:#dff2fb;color:#0f6f94!important;-webkit-text-fill-color:#0f6f94}
.sth-session-badge.is-locked{background:#fff3c4;color:#5a4500!important;-webkit-text-fill-color:#5a4500}
.sth-sessions-page .sth-session-card h3{margin:0 0 6px!important;font-size:1.2rem!important;line-height:1.3}
.sth-session-note{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;cursor:pointer}
.sth-session-note.is-open{display:block;-webkit-line-clamp:unset}

/* Actions: one consistent button size; primary first, Drive second, Telegram third */
.sth-sessions-page .sth-session-card>.sth-session-access{display:grid;grid-template-columns:1fr;gap:10px;margin-top:auto;flex:0 0 auto;width:100%;justify-content:stretch}
.sth-session-access .sth-session-open{display:flex;align-items:center;justify-content:center;gap:8px;box-sizing:border-box;width:100%;min-height:48px;padding:12px 18px;border-radius:14px;text-align:center;white-space:normal;font-size:.98rem;line-height:1.2}
.sth-session-access .sth-session-watch{order:1}
.sth-session-access .sth-session-drive{order:2}
.sth-session-access .sth-session-telegram{order:3}
.sth-session-access .sth-session-request,.sth-session-access .sth-session-status{order:1;max-width:none;width:100%;box-sizing:border-box}
.sth-session-request input[readonly]{min-height:46px;border-radius:12px}

/* Player spans the whole row when open */
.sth-sessions-page .sth-session-card>.sth-session-player{margin-top:0}
.sth-session-noresult{grid-column:1/-1;margin:0!important;padding:18px;border:1px dashed #b9d0c9;border-radius:14px;color:#48645d!important;-webkit-text-fill-color:#48645d;text-align:center}

/* Tablet: buttons can sit two across on a wide single card; owner form in two columns */
@media (min-width:741px) and (max-width:1100px){
  .sth-sessions,.sth-session-manager{padding:28px}
  .sth-sessions-page .sth-session-card.is-playing>.sth-session-access{grid-template-columns:repeat(auto-fit,minmax(180px,1fr))}
  .sth-session-row{padding:18px}
}
/* Desktop: roomier cards, owner form in two columns, hover lift only where hover exists */
@media (min-width:1101px){
  .sth-sessions,.sth-session-manager{padding:40px 44px}
  .sth-sessions-page .sth-session-list{gap:20px}
  .sth-sessions-page .sth-session-card{padding:24px}
  .sth-sessions-page .sth-session-card.is-playing>.sth-session-access{grid-template-columns:repeat(auto-fit,minmax(200px,1fr))}
  .sth-session-form{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 20px}
  .sth-session-form>label:first-of-type,.sth-session-form>label:has(textarea),.sth-session-form>.sth-session-hint,.sth-session-form>.sth-session-check,.sth-session-form>.sth-session-actions{grid-column:1/-1}
}
@media (hover:hover){
  .sth-sessions-page .sth-session-card{transition:transform .18s ease,box-shadow .18s ease}
  .sth-sessions-page .sth-session-card:hover{transform:translateY(-3px);box-shadow:0 16px 36px rgba(0,28,24,.12)}
  .sth-sessions-page .sth-session-card.is-playing:hover{transform:none}
}
/* Phone: tight padding, big tap targets, search full width */
@media (max-width:740px){
  .sth-sessions-page .sth-session-list{grid-template-columns:1fr;gap:14px}
  .sth-sessions-page .sth-session-card{padding:18px;border-radius:18px}
  .sth-session-search{max-width:none;flex-basis:100%}
  .sth-session-form{gap:12px}
}
@media (prefers-reduced-motion:reduce){.sth-sessions-page .sth-session-card{transition:none}.sth-sessions-page .sth-session-card:hover{transform:none}}
