/* StudyTickApp Group Timer — ultra-compact layout, 2026-10-29.
   Only density/spacing is changed. No controls, states, content or events are hidden.
   Keep overrides after visual-refresh-20261029.css so palette tokens remain authoritative. */
html[data-theme] body.group-timer-page {
  --gt-dense-gap: 10px;
  --gt-dense-control: 40px;
}
html[data-theme] body.group-timer-page .group-header {
  padding-block: 9px;
  gap: 10px;
}
html[data-theme] body.group-timer-page .group-wrap {
  padding-block: 14px 28px;
  padding-inline: clamp(12px, 2vw, 24px);
}
html[data-theme] body.group-timer-page .group-page-intro-row {
  gap: 12px;
  padding-bottom: 12px;
  margin-bottom: 12px;
}
html[data-theme] body.group-timer-page .group-intro .group-kicker { margin-bottom: 3px; }
html[data-theme] body.group-timer-page .group-intro h1 {
  font-size: clamp(28px, 3vw, 37px);
  line-height: 1.13;
  margin-bottom: 3px;
}
html[data-theme] body.group-timer-page .group-intro>p:last-child {
  font-size: 13px;
  line-height: 1.4;
}
html[data-theme] body.group-timer-page .group-page-intro-row .group-social-actions { gap: 7px; }
html[data-theme] body.group-timer-page .group-social-nav-btn {
  min-height: 40px;
  padding: 4px 10px 4px 5px;
  gap: 6px;
  border-radius: 10px;
}
html[data-theme] body.group-timer-page .group-social-icon-badge {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}
html[data-theme] body.group-timer-page .group-social-symbol { width: 18px; height: 18px; }
html[data-theme] body.group-timer-page .group-install-entry { margin-block: 8px; }

/* Create/join/public session pages, including the invitation-only state. */
html[data-theme] body.group-timer-page .group-setup { gap: 10px; }
html[data-theme] body.group-timer-page .group-create-column { gap: 10px; }
html[data-theme] body.group-timer-page :is(.group-setup .group-card,.group-side .group-card,.group-collab-card) {
  padding: 14px !important;
  border-radius: 14px !important;
}
html[data-theme] body.group-timer-page .group-setup .group-card h2 {
  font-size: 19px;
  line-height: 1.2;
  margin-bottom: 5px;
}
html[data-theme] body.group-timer-page .group-setup .group-muted { margin-bottom: 9px; line-height: 1.4; }
html[data-theme] body.group-timer-page .group-setup label { margin-bottom: 4px; }
html[data-theme] body.group-timer-page .group-setup :is(input:not([type="checkbox"]),select) {
  min-height: var(--gt-dense-control);
  padding-block: 7px;
  margin-bottom: 8px;
}
html[data-theme] body.group-timer-page .group-setup form .group-primary { min-height: 42px; margin-top: 4px; }
html[data-theme] body.group-timer-page .group-setup .group-small { margin-top: 6px; line-height: 1.35; }
html[data-theme] body.group-timer-page .group-cycle-inline { padding: 8px 10px; margin: 5px 0; gap: 7px; }
html[data-theme] body.group-timer-page .group-public-list { margin-top: 8px; gap: 7px; }
html[data-theme] body.group-timer-page .group-public-list li { padding: 9px 10px; gap: 8px; }

/* Active room, countdown and hourglass. */
html[data-theme] body.group-timer-page #groupRoom .group-session-summary {
  padding: 12px 14px;
  border-radius: 14px !important;
}
html[data-theme] body.group-timer-page #groupRoom :is(.group-room-heading,.group-room-heading-inner) { gap: 10px; }
html[data-theme] body.group-timer-page #groupRoom .group-room-name {
  padding-inline-end: 10px;
}
html[data-theme] body.group-timer-page #groupRoom .group-room-name .group-kicker { margin-bottom: 2px; }
html[data-theme] body.group-timer-page #groupRoom .group-room-name h2 {
  font-size: clamp(23px, 2.8vw, 31px);
  line-height: 1.15;
}
html[data-theme] body.group-timer-page #groupRoom .group-room-details .group-muted {
  margin-bottom: 2px;
  line-height: 1.35;
}
html[data-theme] body.group-timer-page #groupRoom #groupAccountAccess { margin-top: 4px !important; }
html[data-theme] body.group-timer-page #groupRoom #groupHostLabel { margin-top: 5px; }
html[data-theme] body.group-timer-page #groupRoom .group-online {
  min-height: 32px;
  padding: 5px 9px;
}
html[data-theme] body.group-timer-page #groupRoom .group-columns {
  gap: 10px;
  margin-top: 10px;
}
html[data-theme] body.group-timer-page #groupRoom .group-clock-card {
  padding: 14px 13px !important;
  border-radius: 14px !important;
}
html[data-theme] body.group-timer-page #groupRoom .group-status { margin-bottom: 3px; }
html[data-theme] body.group-timer-page #groupRoom .group-hourglass-stage {
  width: min(185px, 55vw);
  margin-bottom: 4px;
}
html[data-theme] body.group-timer-page #groupRoom .group-clock {
  font-size: clamp(48px, 6vw, 66px);
  letter-spacing: -.025em;
  line-height: 1.06;
}
html[data-theme] body.group-timer-page #groupRoom .group-track {
  margin: 11px auto 8px;
  height: 6px;
}
html[data-theme] body.group-timer-page #groupRoom #groupDurationLabel { margin: 4px 0 0; }
html[data-theme] body.group-timer-page #groupRoom .group-cycle-phase { margin: 3px 0 4px; }
html[data-theme] body.group-timer-page #groupRoom .group-wake-status { margin-top: 5px; }

/* Host timer controls, focus/break cycle and per-user preferences. */
html[data-theme] body.group-timer-page #groupRoom .group-timer-control-stack {
  margin-top: 10px;
  gap: 8px;
  width: 100%;
  max-width: 540px;
}
html[data-theme] body.group-timer-page #groupRoom :is(.group-host-controls,.group-quick-settings) {
  padding: 10px;
  border-radius: 12px;
}
html[data-theme] body.group-timer-page #groupRoom :is(.group-host-disclosure-toggle,.group-quick-settings-toggle) {
  min-height: 40px;
  gap: 8px;
}
html[data-theme] body.group-timer-page #groupRoom .group-section-heading {
  margin: 0;
  font-size: 12px;
  line-height: 1.2;
}
html[data-theme] body.group-timer-page #groupRoom .group-quick-settings-action { gap: 6px; }
html[data-theme] body.group-timer-page #groupRoom :is(.group-host-timer-details,.group-quick-settings)[open]>summary { margin-bottom: 7px; }
html[data-theme] body.group-timer-page #groupRoom .group-playback-controls {
  display: flex;
  flex-wrap: nowrap !important;
  gap: 6px;
}
html[data-theme] body.group-timer-page #groupRoom .group-playback-controls>button {
  flex: 1 1 0;
  width: auto;
  min-width: 0;
  min-height: var(--gt-dense-control);
  height: auto;
  padding: 7px 5px;
  font-size: 13px;
  line-height: 1.2;
  white-space: normal;
  overflow-wrap: anywhere;
}
html[data-theme] body.group-timer-page #groupRoom .group-host-controls .group-adjust {
  grid-template-columns: minmax(0,1fr) 88px auto;
  gap: 7px;
  padding-top: 8px;
  margin-top: 8px;
}
html[data-theme] body.group-timer-page #groupRoom .group-host-controls .group-length-field>input {
  min-height: var(--gt-dense-control);
  padding-block: 6px;
}
html[data-theme] body.group-timer-page #groupRoom .group-host-controls #groupChange {
  min-width: 70px;
  min-height: var(--gt-dense-control);
  padding-inline: 9px;
}
html[data-theme] body.group-timer-page #groupRoom .group-cycle-settings {
  gap: 6px;
  margin: 7px 0 0;
  padding: 8px 10px;
  border-radius: 10px;
}
html[data-theme] body.group-timer-page #groupRoom .group-cycle-settings[open]>summary { margin-bottom: 5px; }
html[data-theme] body.group-timer-page #groupRoom .group-cycle-body { gap: 6px; }
html[data-theme] body.group-timer-page #groupRoom .group-cycle-setting-row { gap: 7px; }
html[data-theme] body.group-timer-page #groupRoom .group-cycle-setting-row :is(input,button) {
  min-height: var(--gt-dense-control);
  margin: 0;
  padding-block: 6px;
}
html[data-theme] body.group-timer-page #groupRoom .group-quick-settings-body { display: grid; gap: 8px; }
html[data-theme] body.group-timer-page #groupRoom .group-alert-settings {
  gap: 2px;
  padding: 2px 0 8px;
}
html[data-theme] body.group-timer-page #groupRoom .group-alert-settings>strong {
  font-size: 13px;
  line-height: 1.3;
  margin-bottom: 2px;
}
html[data-theme] body.group-timer-page #groupRoom .group-alert-choice {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 4px 0;
  margin: 0;
  font-size: 13px;
  line-height: 1.25;
}
html[data-theme] body.group-timer-page #groupRoom .group-alert-choice input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: 18px;
  flex: 0 0 18px;
  margin: 0;
  padding: 0;
}
html[data-theme] body.group-timer-page #groupRoom .group-alert-settings .group-small {
  margin: 2px 0 0;
  font-size: 11.5px;
  line-height: 1.35;
}
html[data-theme] body.group-timer-page #groupRoom .group-timer-preferences { gap: 8px; }
html[data-theme] body.group-timer-page #groupRoom .group-timer-preferences #groupTimerAppearance {
  min-height: var(--gt-dense-control);
  margin: 0;
  padding-block: 6px;
}
html[data-theme] body.group-timer-page #groupRoom .group-personal-sound {
  margin: 0;
  padding: 9px;
  border-radius: 10px;
}
html[data-theme] body.group-timer-page #groupRoom .group-personal-sound label { margin-bottom: 4px; }
html[data-theme] body.group-timer-page #groupRoom .group-personal-sound #groupPersonalSound {
  min-height: var(--gt-dense-control);
  padding-block: 6px;
}
html[data-theme] body.group-timer-page #groupRoom .group-personal-sound #groupPersonalSoundHint { margin-top: 3px; }
html[data-theme] body.group-timer-page #groupRoom .group-utility-actions {
  margin-top: 0;
  gap: 7px;
}
html[data-theme] body.group-timer-page #groupRoom .group-utility-actions>button {
  min-height: var(--gt-dense-control);
  padding: 7px 9px;
}
html[data-theme] body.group-timer-page #groupRoom #groupMiniStatus { margin-top: 0; line-height: 1.3; }

/* Participants, invitation links, host settings and shared collaboration. */
html[data-theme] body.group-timer-page #groupRoom .group-side { gap: 10px; }
html[data-theme] body.group-timer-page #groupRoom .group-members-title { padding-bottom: 7px; }
html[data-theme] body.group-timer-page #groupRoom #groupMembers {
  margin: 8px 0 4px;
  gap: 6px;
}
html[data-theme] body.group-timer-page #groupRoom #groupMembers li { gap: 7px; line-height: 1.35; }
html[data-theme] body.group-timer-page #groupRoom #groupPresenceNote { margin-top: 5px; }
html[data-theme] body.group-timer-page #groupRoom .group-collapsible>summary { min-height: 40px; gap: 7px; }
html[data-theme] body.group-timer-page #groupRoom :is(.group-invite-content,.group-host-settings-content) {
  padding-top: 9px;
}
html[data-theme] body.group-timer-page #groupRoom .group-invite-content {
  display: grid;
  gap: 10px;
}
html[data-theme] body.group-timer-page #groupRoom .group-invite-content .group-muted { margin: 0; }
html[data-theme] body.group-timer-page #groupRoom .group-invite-field { min-width: 0; }
html[data-theme] body.group-timer-page #groupRoom .group-invite-field label { display: block; margin: 0 0 5px; }
html[data-theme] body.group-timer-page #groupRoom .group-invite-content .group-copy input {
  min-width: 0;
  margin: 0;
  text-overflow: ellipsis;
}
html[data-theme] body.group-timer-page #groupRoom .group-invite-content .group-copy button {
  min-height: 40px;
  padding-inline: 10px;
}
html[data-theme] body.group-timer-page #groupRoom .group-invite-link-actions {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 6px;
  margin-top: 6px;
}
html[data-theme] body.group-timer-page #groupRoom .group-invite-link-actions>button {
  min-width: 0;
  min-height: 44px;
  width: 100%;
  margin: 0 !important;
  padding: 6px 8px !important;
  white-space: normal;
  overflow-wrap: anywhere;
}
html[data-theme] body.group-timer-page #groupRoom .group-invite-status {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--sc-muted,inherit);
  overflow-wrap: anywhere;
}
html[data-theme] body.group-timer-page #groupRoom .group-invite-status[data-kind="success"] {
  color: var(--sc-accent-strong,inherit);
}
html[data-theme] body.group-timer-page #groupRoom .group-copy { gap: 6px; }
html[data-theme] body.group-timer-page #groupRoom .group-copy :is(input,button) { min-height: 44px; }
html[data-theme] body.group-timer-page #groupRoom .group-collab-workspace {
  gap: 10px;
  margin-top: 10px;
}
html[data-theme] body.group-timer-page #groupRoom .group-collab-access {
  gap: 8px;
  padding: 8px 10px;
}
html[data-theme] body.group-timer-page #groupRoom .group-collab-card {
  min-height: 0;
  padding: 13px !important;
}
html[data-theme] body.group-timer-page #groupRoom .group-collab-heading {
  min-height: 0;
  gap: 7px;
  margin-bottom: 8px;
}
html[data-theme] body.group-timer-page #groupRoom .group-collab-progress {
  min-height: 24px;
  padding: 3px 8px;
}
html[data-theme] body.group-timer-page #groupRoom .group-collab-form { gap: 6px; }
html[data-theme] body.group-timer-page #groupRoom .group-collab-form :is(input,button) {
  min-height: var(--gt-dense-control);
}
html[data-theme] body.group-timer-page #groupRoom #groupTaskList {
  min-height: 0;
  max-height: 230px;
}
html[data-theme] body.group-timer-page #groupRoom .group-task-person+.group-task-person {
  margin-top: 8px;
  padding-top: 8px;
}
html[data-theme] body.group-timer-page #groupRoom .group-task-item { min-height: 36px; padding-block: 4px; }
html[data-theme] body.group-timer-page #groupRoom .group-collab-chat-notice { margin-bottom: 6px; }
html[data-theme] body.group-timer-page #groupRoom #groupChatList {
  min-height: 124px;
  max-height: 240px;
  padding: 9px;
  margin-bottom: 8px;
  gap: 6px;
}
html[data-theme] body.group-timer-page #groupRoom .group-chat-entry { padding: 6px 9px; }
html[data-theme] body.group-timer-page #groupRoom .group-leave { margin-top: 10px; }
html[data-theme] body.group-timer-page .group-discord-community {
  gap: 9px;
  padding: 10px 12px;
  margin-top: 12px;
}

/* Phones and tablets: compact but usable 40–44px tap targets, no horizontal overflow. */
@media (max-width: 900px) {
  html[data-theme] body.group-timer-page .group-page-intro-row {
    gap: 9px;
    margin-bottom: 10px;
    padding-bottom: 10px;
  }
  html[data-theme] body.group-timer-page #groupRoom .group-collab-workspace { gap: 10px; }
}
@media (max-width: 650px) {
  html[data-theme] body.group-timer-page { --gt-dense-control: 42px; }
  html[data-theme] body.group-timer-page .group-header { padding: 9px 12px; }
  html[data-theme] body.group-timer-page .group-wrap { padding: 11px 11px 23px; }
  html[data-theme] body.group-timer-page .group-intro h1 { font-size: 29px; }
  html[data-theme] body.group-timer-page .group-social-nav-btn { min-height: 42px; }
  html[data-theme] body.group-timer-page :is(.group-setup .group-card,.group-side .group-card,.group-collab-card) {
    padding: 11px !important;
  }
  html[data-theme] body.group-timer-page #groupRoom .group-session-summary { padding: 10px 11px; }
  html[data-theme] body.group-timer-page #groupRoom .group-room-heading-inner { gap: 6px; }
  html[data-theme] body.group-timer-page #groupRoom .group-room-name {
    padding-inline-end: 0;
    padding-bottom: 7px;
  }
  html[data-theme] body.group-timer-page #groupRoom .group-clock-card { padding: 12px 10px !important; }
  html[data-theme] body.group-timer-page #groupRoom .group-hourglass-stage { width: min(157px, 48vw); }
  html[data-theme] body.group-timer-page #groupRoom .group-clock { font-size: clamp(43px, 11vw, 59px); }
  html[data-theme] body.group-timer-page #groupRoom .group-timer-control-stack { margin-top: 8px; gap: 7px; }
  html[data-theme] body.group-timer-page #groupRoom :is(.group-host-controls,.group-quick-settings) {
    padding: 8px;
  }
  html[data-theme] body.group-timer-page #groupRoom .group-host-controls .group-adjust {
    grid-template-columns: minmax(0,1fr) 78px auto;
    gap: 5px;
  }
  html[data-theme] body.group-timer-page #groupRoom .group-playback-controls { gap: 5px; }
  html[data-theme] body.group-timer-page #groupRoom .group-playback-controls>button {
    min-height: 42px;
    padding-inline: 3px;
    font-size: 12.5px;
  }
  html[data-theme] body.group-timer-page #groupRoom .group-timer-preferences {
    grid-template-columns: minmax(0, .95fr) minmax(135px, 1.1fr);
  }
  html[data-theme] body.group-timer-page #groupRoom .group-collab-card { padding: 11px !important; }
}
@media (max-width: 400px) {
  /* Three social shortcuts previously left the last link orphaned at half width.
     Full-width final row prevents long translated labels from clipping. */
  html[data-theme] body.group-timer-page .group-page-intro-row .group-social-actions > :last-child {
    grid-column: 1 / -1;
  }
  html[data-theme] body.group-timer-page .group-page-intro-row .group-social-nav-label {
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.25;
    text-align: start;
  }
  html[data-theme] body.group-timer-page #groupRoom .group-host-controls .group-adjust {
    grid-template-columns: minmax(0,1fr) 77px 72px;
  }
  /* Keep translated focus-length labels visible on narrow phones. */
  html[data-theme] body.group-timer-page #groupRoom .group-host-controls .group-adjust>label {
    grid-column: 1 / -1;
    font-size: 12px;
    min-width: 0;
    overflow-wrap: anywhere;
  }
  html[data-theme] body.group-timer-page #groupRoom .group-timer-preferences {
    grid-template-columns: minmax(0,1fr);
    gap: 4px;
  }
  /* Keep the short code and its copy action on a single compact row. */
  html[data-theme] body.group-timer-page #groupRoom .group-invite-content .group-copy {
    flex-wrap: nowrap;
    min-width: 0;
    align-items: stretch;
  }
  html[data-theme] body.group-timer-page #groupRoom .group-invite-content .group-copy input {
    flex: 1 1 auto;
    flex-basis: 0;
    min-width: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  html[data-theme] body.group-timer-page .group-social-nav-btn { transition: none; }
}


/* Later shared control and invitation styles set !important dimensions.
   Override only dimensions; their palette colors, state and hover semantics win. */
html[data-theme] body.group-timer-page #groupRoom .group-playback-controls {
  gap: 6px !important;
}
html[data-theme] body.group-timer-page #groupRoom .group-playback-controls>button {
  min-height: var(--gt-dense-control) !important;
  padding: 7px 5px !important;
  font-size: 13px !important;
  line-height: 1.2 !important;
}
html[data-theme] body.group-timer-page #groupRoom .group-utility-actions>button {
  min-height: var(--gt-dense-control) !important;
  padding: 7px 9px !important;
}
html[data-theme] body.group-timer-page #groupRoom .group-host-controls .group-length-field>input {
  min-height: var(--gt-dense-control) !important;
}
html[data-theme] body.group-timer-page #groupRoom .group-host-controls #groupChange {
  min-height: var(--gt-dense-control) !important;
  padding-inline: 9px !important;
}
html[data-theme] body.group-timer-page .group-social-actions .group-social-nav-btn {
  min-height: var(--gt-dense-control) !important;
  padding: 4px 10px 4px 5px !important;
  gap: 6px;
}
@media (max-width: 650px) {
  html[data-theme] body.group-timer-page .group-social-actions .group-social-nav-btn {
    min-height: 42px !important;
  }
  html[data-theme] body.group-timer-page #groupRoom .group-playback-controls>button {
    font-size: 12.5px !important;
    padding-inline: 3px !important;
  }
}

/* iOS installed-PWA notch and home indicator: keep social drawer controls
   inside the safe area without disabling scrolling or changing the palette. */
@media (max-width: 650px) {
  html[data-theme] body.group-timer-page .group-social-panel {
    padding-block-start: calc(16px + env(safe-area-inset-top,0px));
    padding-block-end: calc(16px + env(safe-area-inset-bottom,0px));
  }
}


/* Compact room summary: retain all status, host, reward and account controls. */
html[data-theme] body.group-timer-page #groupRoom .group-session-summary{
 padding:10px 14px;
}
html[data-theme] body.group-timer-page #groupRoom .group-room-heading{
 gap:12px;
}
html[data-theme] body.group-timer-page #groupRoom .group-room-heading-inner{
 display:flex;
 flex-wrap:wrap;
 align-items:center;
 gap:6px 18px;
}
html[data-theme] body.group-timer-page #groupRoom .group-room-name{
 padding-inline-end:0;
 border:0;
 align-self:center;
}
html[data-theme] body.group-timer-page #groupRoom .group-room-name h2{
 font-size:clamp(19px,2vw,25px);
 letter-spacing:-.025em;
 line-height:1.2;
}
html[data-theme] body.group-timer-page #groupRoom .group-room-details{
 display:flex;
 flex-direction:row;
 align-items:center;
 flex-wrap:wrap;
 gap:5px 12px;
}
html[data-theme] body.group-timer-page #groupRoom .group-room-details #groupRole{
 font-size:12px;
 font-weight:600;
 margin:0;
}
html[data-theme] body.group-timer-page #groupRoom #hourglassCollection{
 display:inline-flex;
 align-items:center;
 max-width:100%;
 padding:4px 9px;
 border:1px solid var(--gt-auth-line);
 border-radius:999px;
 background:var(--gt-auth-panel);
 color:var(--gt-auth-ink);
 font-size:12px;
 line-height:1.3;
 white-space:nowrap;
 margin:0;
}
html[data-theme] body.group-timer-page #groupRoom #hourglassCollection .st-silver-hourglass-icon{
 margin-inline-end:4px;
}
html[data-theme] body.group-timer-page #groupRoom .group-online{
 min-height:29px;
 padding:4px 9px;
 font-size:12px;
}
@media(max-width:650px){
 html[data-theme] body.group-timer-page #groupRoom .group-room-heading-inner{
  align-items:start;
  gap:8px;
 }
 html[data-theme] body.group-timer-page #groupRoom .group-room-details{
  gap:6px 10px;
 }
}
