/* Social sharing + practice session responsive layer
   Breakpoints:
   mobile <= 620px
   tablet 621-900px
   desktop >= 901px
*/

.gc-share-practice{width:100%;min-height:48px;margin:0}

/* ---------- Session detail ---------- */
.gc-run-detail-modal{
  width:min(720px,calc(100vw - 36px));
  max-height:min(820px,calc(100dvh - 36px));
  overflow:auto;
}
.gc-run-detail-modal .gc-modal__head{padding:24px 24px 14px}
.gc-run-detail-modal .gc-modal__title{font-size:clamp(26px,3vw,32px);line-height:1.05}
.gc-run-detail-modal .gc-modal__sub{line-height:1.45}
.gc-run-detail__list{display:grid;gap:10px;padding:4px 24px 0}
.gc-run-detail__item{
  display:grid;
  grid-template-columns:38px minmax(0,1fr);
  gap:13px;
  align-items:start;
  min-width:0;
  padding:15px 16px;
  border:1px solid var(--border);
  border-radius:17px;
  background:rgba(255,255,255,.026);
}
.gc-run-detail__item>div:last-child{min-width:0}
.gc-run-detail__item strong{
  display:block;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:16px;
  line-height:1.25;
}
.gc-run-detail__item .gc-row__meta{margin-top:4px;line-height:1.45}
.gc-run-detail__index{
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:rgba(83,228,199,.12);
  color:var(--accent);
  font-weight:850;
  font-variant-numeric:tabular-nums;
}
.gc-run-detail__actions{padding:16px 24px 24px;margin:0}
.gc-run-detail__quick-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.gc-detail-action{
  min-height:54px;
  padding:0 14px;
  border:1px solid var(--border);
  border-radius:15px;
  background:rgba(255,255,255,.035);
  color:var(--text);
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  font:inherit;
  font-size:13px;
  font-weight:780;
  cursor:pointer;
}
.gc-detail-action:hover{border-color:var(--border-strong);background:rgba(89,225,176,.07)}
.gc-detail-action__icon{display:block;font-size:18px;line-height:1;font-weight:650;color:var(--text-2)}
.gc-detail-action--share{border-color:rgba(83,228,199,.28);background:rgba(83,228,199,.065)}
.gc-detail-action--share .gc-detail-action__icon{color:var(--accent,#53e4c7)}
.gc-run-detail__secondary-actions{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:9px;
  margin-top:10px;
  padding-top:10px;
  border-top:1px solid var(--border);
}
.gc-detail-secondary{width:100%;min-height:44px;font-size:12.5px;margin:0}
.gc-run-detail__quick-actions .gc-share-practice{width:auto;margin:0;min-height:54px}

/* ---------- Final "Practice logged" screen ---------- */
.gc-summary.gc-summary--share-ready{
  width:min(100%,660px);
  max-width:660px;
  margin:auto;
  gap:15px;
  padding:24px 0 18px;
}
.gc-summary.gc-summary--share-ready .gc-summary__check{margin:0 auto 4px}
.gc-summary.gc-summary--share-ready .gc-heading-sm{
  margin:0;
  text-align:center;
  font-size:clamp(28px,4vw,38px);
  letter-spacing:-.035em;
}
.gc-summary.gc-summary--share-ready>.gc-subtitle{
  max-width:580px;
  margin:0 auto;
  text-align:center;
  line-height:1.45;
}
.gc-summary.gc-summary--share-ready .gc-session-log{
  width:100%;
  max-width:620px;
  margin:4px auto 0;
  padding:8px 16px;
}
.gc-summary.gc-summary--share-ready .gc-session-log__row{
  display:grid;
  grid-template-columns:24px minmax(0,1fr) auto 34px;
  gap:10px;
  align-items:center;
  min-height:50px;
}
.gc-summary.gc-summary--share-ready .gc-session-log__row>span{
  width:22px;
  height:22px;
}
.gc-summary.gc-summary--share-ready .gc-session-log__main{min-width:0}
.gc-summary.gc-summary--share-ready .gc-session-log__row small{margin:0}
.gc-summary.gc-summary--share-ready .gc-summary-title{
  width:100%;
  max-width:620px;
  margin:2px auto 0;
}
.gc-summary-share-actions{
  width:100%;
  max-width:520px;
  margin:4px auto 0;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}
.gc-summary.gc-summary--share-ready .gc-summary-share-actions .gc-primary,
.gc-summary.gc-summary--share-ready .gc-summary-share-actions .gc-secondary{
  width:100%;
  max-width:none;
  min-height:50px;
  margin:0;
  justify-self:stretch;
}

/* ---------- Share composer ---------- */
.gc-social-share-layer{
  position:fixed;
  inset:0;
  z-index:120;
  display:grid;
  place-items:center;
  padding:18px;
  background:rgba(1,6,5,.82);
  backdrop-filter:blur(16px);
  -webkit-backdrop-filter:blur(16px);
}
.gc-social-share{
  width:min(940px,calc(100vw - 36px));
  max-height:min(780px,calc(100dvh - 36px));
  overflow:auto;
  border:1px solid var(--border-strong);
  border-radius:var(--radius-xl);
  background:linear-gradient(160deg,#0b1916,#06100e);
  box-shadow:var(--shadow-lg);
  padding:18px;
}
.gc-social-share__head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  margin-bottom:15px;
}
.gc-social-share__head>div{min-width:0}
.gc-social-share__head h2{margin:0;color:var(--text);font-size:24px;line-height:1.15}
.gc-social-share__head p{margin:5px 0 0;color:var(--text-3);font-size:12.5px;line-height:1.45}
.gc-social-share__body{
  display:grid;
  grid-template-columns:minmax(0,620px) minmax(210px,1fr);
  gap:18px;
  align-items:start;
}
.gc-social-share__visual{min-width:0}
.gc-social-share__track{
  display:flex;
  gap:12px;
  overflow-x:auto;
  scroll-snap-type:x mandatory;
  scroll-behavior:smooth;
  overscroll-behavior-x:contain;
  scrollbar-width:none;
}
.gc-social-share__track::-webkit-scrollbar{display:none}
.gc-social-share__slide{flex:0 0 100%;scroll-snap-align:start}
.gc-social-share__preview{
  display:block;
  width:100%;
  aspect-ratio:1/1;
  object-fit:cover;
  border-radius:20px;
  border:1px solid var(--border);
  background:var(--bg-deep);
}
.gc-social-share__body[data-share-loading] .gc-social-share__preview{animation:gc-share-preparing 1.1s ease-in-out infinite alternate}
@keyframes gc-share-preparing{from{opacity:.45}to{opacity:.9}}
@media(prefers-reduced-motion:reduce){.gc-social-share__body[data-share-loading] .gc-social-share__preview{animation:none;opacity:.6}}
.gc-social-share__dots{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  height:38px;
}
.gc-social-share__dot{
  width:8px;
  height:8px;
  padding:0;
  border:0;
  border-radius:999px;
  background:rgba(247,247,243,.22);
  cursor:pointer;
  transition:.18s ease;
}
.gc-social-share__dot.is-active{width:22px;background:#53e4c7}
.gc-social-share__actions{
  display:grid;
  grid-template-columns:1fr;
  gap:10px;
  align-content:start;
  position:sticky;
  top:0;
}
.gc-social-share__actions .gc-primary,
.gc-social-share__actions .gc-secondary{
  width:100%;
  margin:0;
  min-height:54px;
  padding:0 16px;
  border-radius:15px;
}
.gc-share-action{
  display:flex;
  flex-direction:row;
  align-items:center;
  justify-content:center;
  gap:8px;
  font-size:13px;
  line-height:1.1;
}
.gc-share-action__icon{font-size:18px;line-height:1}

/* ---------- Tablet ---------- */
@media(min-width:621px) and (max-width:900px){
  .gc-run-detail-modal{width:min(680px,calc(100vw - 44px));max-height:calc(100dvh - 44px)}
  .gc-run-detail__list{padding-inline:22px}
  .gc-run-detail__actions{padding:16px 22px 22px}

  .gc-summary.gc-summary--share-ready{max-width:620px;padding-block:20px}
  .gc-summary-share-actions{max-width:500px}

  .gc-social-share{width:min(700px,calc(100vw - 44px));max-height:calc(100dvh - 44px)}
  .gc-social-share__body{display:block}
  .gc-social-share__visual{width:min(100%,520px);margin:0 auto}
  .gc-social-share__actions{
    position:static;
    width:min(100%,520px);
    margin:2px auto 0;
    grid-template-columns:1.25fr 1fr;
  }
}

/* ---------- Mobile ---------- */
@media(max-width:620px){
  .gc-detail-layer{align-items:end!important;padding:0!important}
  .gc-run-detail-modal{
    width:100%;
    max-height:92dvh;
    border-radius:26px 26px 0 0;
    overflow:auto;
  }
  .gc-run-detail-modal .gc-modal__head{
    position:sticky;
    top:0;
    z-index:3;
    padding:18px 18px 13px;
    background:linear-gradient(180deg,rgba(13,31,26,.99),rgba(13,31,26,.95));
    border-bottom:1px solid rgba(255,255,255,.05);
  }
  .gc-run-detail-modal .gc-modal__title{font-size:26px}
  .gc-run-detail-modal .gc-modal__sub{font-size:12.5px}
  .gc-run-detail__list{gap:8px;padding:12px 14px 2px}
  .gc-run-detail__item{
    grid-template-columns:34px minmax(0,1fr);
    gap:10px;
    padding:13px 12px;
    border-radius:15px;
  }
  .gc-run-detail__index{width:30px;height:30px;font-size:13px}
  .gc-run-detail__item strong{font-size:15px;white-space:normal}
  .gc-run-detail__item .gc-row__meta{font-size:12px}
  .gc-run-detail__actions{
    position:sticky;
    bottom:0;
    z-index:2;
    padding:12px 14px calc(14px + env(safe-area-inset-bottom));
    background:linear-gradient(180deg,rgba(7,17,15,.5),rgba(7,17,15,.98) 20%);
    backdrop-filter:blur(12px);
  }
  .gc-run-detail__quick-actions{grid-template-columns:1fr 1fr}
  .gc-detail-action{min-height:50px;border-radius:14px}
  .gc-run-detail__secondary-actions{grid-template-columns:1fr 1fr}
  .gc-detail-secondary{min-height:42px;padding-inline:8px}

  .gc-summary.gc-summary--share-ready{
    max-width:100%;
    margin:0 auto;
    padding:12px 0 calc(10px + env(safe-area-inset-bottom));
    gap:12px;
  }
  .gc-summary.gc-summary--share-ready .gc-summary__check{
    width:48px;
    height:48px;
    font-size:25px;
    margin-bottom:0;
  }
  .gc-summary.gc-summary--share-ready .gc-heading-sm{font-size:29px}
  .gc-summary.gc-summary--share-ready>.gc-subtitle{font-size:13px;padding-inline:8px}
  .gc-summary.gc-summary--share-ready .gc-session-log{
    width:100%;
    padding:5px 12px;
    border-radius:15px;
  }
  .gc-summary.gc-summary--share-ready .gc-session-log__head{padding-top:8px}
  .gc-summary.gc-summary--share-ready .gc-session-log__row{
    grid-template-columns:22px minmax(0,1fr) 32px;
    grid-template-rows:auto auto;
    gap:3px 9px;
    padding:10px 0;
  }
  .gc-summary.gc-summary--share-ready .gc-session-log__main{grid-column:2;grid-row:1}
  .gc-summary.gc-summary--share-ready .gc-session-log__row small{
    grid-column:2;
    grid-row:2;
    justify-self:start;
    white-space:normal;
    line-height:1.35;
  }
  .gc-summary.gc-summary--share-ready .gc-log-edit{
    grid-column:3;
    grid-row:1/3;
    align-self:center;
  }
  .gc-summary.gc-summary--share-ready .gc-summary-title{margin-top:0}
  .gc-summary-share-actions{
    grid-template-columns:1fr;
    gap:8px;
    max-width:100%;
    margin-top:2px;
  }

  .gc-social-share-layer{padding:12px;place-items:center}
  .gc-social-share{
    width:min(100%,540px);
    max-height:calc(100dvh - 24px);
    border-radius:24px;
    padding:12px 12px calc(12px + env(safe-area-inset-bottom));
    overflow:auto;
  }
  .gc-social-share__head{margin-bottom:10px;align-items:center}
  .gc-social-share__head h2{font-size:22px}
  .gc-social-share__head p{display:none}
  .gc-social-share__body{display:block}
  .gc-social-share__visual{
    width:min(100%,52dvh);
    max-width:520px;
    margin:0 auto;
  }
  .gc-social-share__preview{border-radius:17px}
  .gc-social-share__dots{height:32px}
  .gc-social-share__actions{
    position:static;
    grid-template-columns:1.2fr 1fr;
    gap:7px;
    width:100%;
    margin-top:0;
  }
  .gc-social-share__actions .gc-primary,
  .gc-social-share__actions .gc-secondary{min-height:52px}
  .gc-share-action{font-size:12.5px}
}

/* ---------- Wide desktop ---------- */
@media(min-width:901px){
  .gc-run-detail-modal{
    width:min(760px,calc(100vw - 64px));
    display:block;
    overflow:auto;
  }
  .gc-run-detail-modal>.gc-modal__head{
    width:min(100%,680px);
    margin-inline:auto;
    box-sizing:border-box;
  }
  .gc-run-detail__list{
    width:min(100%,680px);
    margin-inline:auto;
    padding:4px 0 0;
    box-sizing:border-box;
  }
  .gc-run-detail__actions{
    width:min(100%,680px);
    margin-inline:auto;
    padding:16px 0 24px;
    box-sizing:border-box;
  }
  .gc-run-detail__quick-actions{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .gc-run-detail__secondary-actions{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .gc-detail-action{justify-content:center}
  .gc-detail-secondary{text-align:center}

  .gc-summary.gc-summary--share-ready{padding-block:30px}
}

/* Familiar system-style action icon sizing */
.gc-detail-action__icon svg,
.gc-share-action__icon svg{width:20px;height:20px;display:block}
.gc-detail-action__icon{display:grid;place-items:center}
.gc-share-action__icon{display:grid;place-items:center}
.gc-summary-share-actions .gc-share-practice{display:flex;align-items:center;justify-content:center;gap:8px}
.gc-summary-share-actions .gc-share-practice svg{width:18px;height:18px}

/* Session-detail alignment hardening */
.gc-run-detail-modal,
.gc-run-detail-modal *,
.gc-social-share,
.gc-social-share *{box-sizing:border-box}
.gc-run-detail__list,
.gc-run-detail__actions{min-width:0}
.gc-run-detail__item{width:100%;margin-inline:auto}
.gc-run-detail__quick-actions,
.gc-run-detail__secondary-actions{width:100%;min-width:0}
.gc-run-detail__quick-actions>*,
.gc-run-detail__secondary-actions>*{min-width:0}
@media(max-width:900px){
  .gc-run-detail__list,
  .gc-run-detail__actions{width:100%;margin-inline:auto}
}

@media(max-width:620px) and (max-height:700px){
  .gc-social-share-layer{padding:0;align-items:end;justify-items:stretch}
  .gc-social-share{width:100%;max-height:calc(100dvh - env(safe-area-inset-top,0px));border-radius:24px 24px 0 0;border-bottom:0}
  .gc-social-share__visual{width:min(100%,46dvh)}
}
