:root{
  --surface-page:#f5f7fb;
  --surface-panel:#fff;
  --surface-toolbar:#f8fafc;
  --surface-box:#fbfcff;
  --surface-card:#fff;
  --surface-input:#fff;
  --surface-code:#f7f9fd;
  --surface-hover:#f8fbff;
  --surface-soft:#f1f4f9;
  --text:#182033;
  --muted:#667085;
  --border:#dfe4ee;
  --border-strong:#c8d1e0;
  --border-card:#d3def2;
  --accent:#215cff;
  --accent-soft:#eaf0ff;
  --danger:#b42318;
  --radius:8px;
  --shadow:0 1px 2px rgba(16,24,40,.05);

}

*{box-sizing:border-box}
html,body{
  margin:0;
  background:var(--surface-page);
  color:var(--text);
  font:14px/1.45 system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,"Noto Sans",sans-serif;
  max-width:100%;
  overflow-x:hidden;
}

.tvip-wrap{
  width:min(1180px,calc(100% - 32px));
  margin:24px auto 36px;
}

[hidden]{
  display:none !important;
}

.tvip-topbar{
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:10px;
  min-width:0;
  margin-bottom:10px;
  padding:4px;
  border:1px solid var(--border);
  border-radius:var(--radius);
  background:var(--surface-input);
}

.tvip-topbar > *{
  min-width:0;
}

.tvip-topbar h1{
  margin:0;
  font-size:22px;
  line-height:1.2;
  overflow-wrap:anywhere;
}

.tvip-work-tabs{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  align-items:center;
  gap:6px;
  width:100%;
  min-width:0;
}

.tvip-work-tabs button{
  appearance:none;
  min-width:0;
  border:0;
  border-radius:6px;
  background:transparent;
  color:var(--muted);
  padding:9px 12px;
  font-weight:800;
  cursor:pointer;
  white-space:nowrap;
  overflow-wrap:anywhere;
}

.tvip-topbar .tvip-status-pill{
  align-self:flex-end;
}

@media (min-width:561px){
  .tvip-topbar{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:center;
  }

  .tvip-work-tabs{
    grid-template-columns:repeat(2,minmax(0,max-content));
    width:auto;
  }
}

.tvip-work-tabs button.active{
  background:var(--accent);
  color:#fff;
}

.tvip-work-tabs button[data-workspace="check"]{
  border:1px solid #b8c7ff;
  background:#f6f8ff;
  color:#2447a8;
}

.tvip-work-tabs button[data-workspace="check"].active{
  border-color:var(--accent);
  background:var(--accent);
  color:#fff;
}

.tvip-statusbar{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
  margin-bottom:14px;
}

.tvip-statusbar span{
  display:inline-flex;
  align-items:center;
  min-width:0;
  max-width:100%;
  min-height:28px;
  border:1px solid var(--border);
  border-radius:999px;
  background:var(--surface-input);
  color:var(--muted);
  padding:5px 10px;
  font-size:12px;
  font-weight:800;
  overflow-wrap:anywhere;
}

.tvip-status-pill{
  display:inline-flex;
  align-items:center;
  min-width:0;
  max-width:100%;
  min-height:28px;
  border:1px solid var(--border);
  border-radius:999px;
  background:var(--surface-input);
  color:var(--muted);
  padding:5px 10px;
  font-size:12px;
  font-weight:800;
  overflow-wrap:anywhere;
  justify-self:end;
  white-space:nowrap;
}

.tvip-statusbar .is-ok{
  border-color:#a6d8b6;
  background:#ecfdf3;
  color:#067647;
}

.tvip-status-pill.is-ok{
  border-color:#a6d8b6;
  background:#ecfdf3;
  color:#067647;
}

.tvip-statusbar .is-warning{
  border-color:#fedf89;
  background:#fffaeb;
  color:#b54708;
}

.tvip-status-pill.is-warning{
  border-color:#fedf89;
  background:#fffaeb;
  color:#b54708;
}

.tvip-statusbar .is-error{
  border-color:#fecdca;
  background:#fef3f2;
  color:#b42318;
}

.tvip-status-pill.is-error{
  border-color:#fecdca;
  background:#fef3f2;
  color:#b42318;
}

.tvip-card{
  min-width:0;
  max-width:100%;
  background:var(--surface-panel);
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  overflow:visible;
}

.tvip-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  min-width:0;
  padding:14px 16px;
  border-bottom:1px solid var(--border);
}

#tvip-panel-form > .tvip-header{
  justify-content:flex-end;
}

#tvip-panel-form > .tvip-header > .tvip-status-pill{
  width:auto;
  align-self:flex-end;
}

.tvip-header > *{
  min-width:0;
  max-width:100%;
}

.tvip-header > div:first-child{
  flex:1 1 auto;
}

.tvip-header > .tvip-sub{
  flex:0 0 auto;
  text-align:right;
}

.tvip-header h2,
.tvip-header h3{
  display:block;
  width:100%;
  margin:0;
  line-height:1.25;
  max-width:100%;
  white-space:normal;
  word-break:break-word;
  overflow-wrap:anywhere;
}

.tvip-header h2{font-size:20px}
.tvip-header h3{font-size:16px}
.tvip-mobile-break{display:none}
.tvip-sub,.tvip-muted{
  color:var(--muted);
  overflow-wrap:anywhere;
}
.tvip-sub{font-size:12px}

.tvip-content{padding:16px}

.tvip-create-layout{
  display:grid;
  grid-template-columns:210px minmax(0,1fr);
  gap:16px;
  align-items:start;
}

.tvip-section-nav{
  position:sticky;
  top:10px;
  display:flex;
  flex-direction:column;
  gap:6px;
  min-width:0;
}

.tvip-section-btn{
  appearance:none;
  position:relative;
  width:100%;
  min-width:0;
  border:1px solid var(--border);
  border-radius:var(--radius);
  background:var(--surface-input);
  color:var(--muted);
  padding:9px 32px 9px 10px;
  text-align:left;
  font-weight:800;
  cursor:pointer;
  overflow-wrap:anywhere;
}

.tvip-section-btn.active{
  border-color:#9fb5ff;
  background:var(--accent-soft);
  color:var(--text);
}

.tvip-section-btn::after{
  content:attr(data-count);
  position:absolute;
  top:50%;
  right:9px;
  min-width:18px;
  height:18px;
  border-radius:999px;
  transform:translateY(-50%);
  background:transparent;
  color:transparent;
  font-size:11px;
  line-height:18px;
  text-align:center;
}

.tvip-section-btn.has-error::after{
  background:#fef3f2;
  color:#b42318;
}

.tvip-section-btn.has-warning::after{
  background:#fffaeb;
  color:#b54708;
}

.tvip-section-hidden{
  display:none !important;
}

.tvip-section-group-label{
  margin:10px 4px 2px;
  color:var(--muted);
  font-size:11px;
  font-weight:900;
  letter-spacing:0;
  text-transform:uppercase;
}

.tvip-section-group-label:first-child{
  margin-top:0;
}

body[data-active-form-section="features"] .tvip-create-layout{
  grid-template-columns:210px minmax(0,1fr);
}

body[data-active-form-section="features"] #tvip-form{
  min-width:0;
}

body[data-active-form-section="features"] #wrap-features_base_list,
body[data-active-form-section="features"] #wrap-prefs_visible_list{
  grid-column:auto;
}

body[data-active-form-section="features"] #tvip-basics-footer{
  width:100%;
  min-width:0;
}

.tvip-tabs{
  display:flex;
  gap:6px;
  padding:10px 10px 0;
  border-bottom:1px solid var(--border);
  overflow-x:auto;
}

.tvip-tabs button{
  appearance:none;
  border:1px solid var(--border);
  border-bottom:none;
  background:var(--surface-input);
  color:var(--muted);
  border-radius:8px 8px 0 0;
  padding:9px 14px;
  cursor:pointer;
  font-weight:700;
  white-space:nowrap;
}

.tvip-tabs button.active{
  color:var(--text);
  background:var(--accent-soft);
  border-color:#cbd8ff;
}

#tvip-form{
  display:flex;
  flex-direction:column;
  gap:14px;
}

.tvip-row{
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:12px;
  align-items:start;
}

.tvip-field{
  display:flex;
  flex-direction:column;
  grid-column:span 3;
  min-width:0;
  gap:6px;
}

.tvip-field.full,
.tvip-span-full{
  grid-column:1 / -1;
}

#wrap-tz_region,
#wrap-timezone,
#wrap-time_format{
  grid-column:span 2;
}

.tvip-field label,
.tvip-label,
.android-app-card .field>label{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:6px;
  min-width:0;
  margin:0;
  color:var(--muted);
  font-size:12px;
  font-weight:700;
}

.tvip-label{
  min-height:18px;
}

.tvip-field label span,
.tvip-label span,
.android-app-card .field>label span{
  min-width:0;
  overflow-wrap:anywhere;
}

.tvip-input,
.tvip-select,
.tvip-textarea,
.android-app-card input[type=text],
.android-app-card select{
  width:100%;
  min-width:0;
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:10px 11px;
  background:var(--surface-input);
  color:var(--text);
  outline:none;
}

.tvip-textarea{
  resize:vertical;
  min-height:112px;
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
}

.tvip-input:focus,
.tvip-select:focus,
.tvip-textarea:focus,
.android-app-card input[type=text]:focus,
.android-app-card select:focus{
  border-color:#9fb5ff;
  box-shadow:0 0 0 3px rgba(33,92,255,.13);
}

.tvip-field.is-error .tvip-input,
.tvip-field.is-error .tvip-select,
.tvip-field.is-error .tvip-textarea{
  border-color:#f04438;
  box-shadow:0 0 0 3px rgba(240,68,56,.12);
}

.tvip-field.is-warning .tvip-input,
.tvip-field.is-warning .tvip-select,
.tvip-field.is-warning .tvip-textarea{
  border-color:#f79009;
  box-shadow:0 0 0 3px rgba(247,144,9,.12);
}

.tvip-field-msg{
  display:none;
  color:#b42318;
  font-size:12px;
  font-weight:600;
}

.tvip-field.is-error .tvip-field-msg,
.tvip-field.is-warning .tvip-field-msg,
.tvip-section.is-error .tvip-field-msg,
.tvip-section.is-warning .tvip-field-msg{
  display:block;
}

.tvip-field.is-warning .tvip-field-msg,
.tvip-section.is-warning .tvip-field-msg{
  color:#b54708;
}

.tvip-section.is-error .android-apps-head{
  border-color:#f04438;
  box-shadow:0 0 0 3px rgba(240,68,56,.12);
}

.tvip-section.is-warning .android-apps-head{
  border-color:#f79009;
  box-shadow:0 0 0 3px rgba(247,144,9,.12);
}

.tvip-info,
.tvip-hint{
  position:relative;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  width:18px;
  height:18px;
  border:1px solid #b9c7dc;
  border-radius:50%;
  background:var(--surface-input);
  color:var(--accent);
  padding:0;
  font:700 11px/1 system-ui,-apple-system,Segoe UI,sans-serif;
  cursor:help;
}

.tvip-info::after,
.tvip-hint::after{
  content:attr(data-hint);
  position:absolute;
  left:50%;
  bottom:calc(100% + 8px);
  width:max-content;
  max-width:min(320px,calc(100vw - 24px));
  padding:8px 10px;
  border-radius:8px;
  background:#121826;
  color:#fff;
  box-shadow:0 10px 24px rgba(16,24,40,.24);
  font:500 12px/1.35 system-ui,-apple-system,Segoe UI,sans-serif;
  text-transform:none;
  letter-spacing:0;
  white-space:normal;
  opacity:0;
  pointer-events:none;
  transform:translate(-50%,4px);
  transition:opacity .12s ease,transform .12s ease;
  z-index:30;
}

.tvip-info:hover::after,
.tvip-info:focus-visible::after,
.tvip-hint:hover::after,
.tvip-hint:focus-visible::after{
  opacity:1;
  transform:translate(-50%,0);
}

.tvip-group-title .tvip-info::after,
.tvip-label .tvip-info::after{
  left:auto;
  right:0;
  transform:translateY(4px);
}

.tvip-group-title .tvip-info:hover::after,
.tvip-group-title .tvip-info:focus-visible::after,
.tvip-label .tvip-info:hover::after,
.tvip-label .tvip-info:focus-visible::after{
  transform:translateY(0);
}

.tvip-toolbar{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  min-width:0;
  padding:12px 16px;
  border-top:1px solid var(--border);
  background:var(--surface-toolbar);
}

.tvip-btn{
  appearance:none;
  max-width:100%;
  border:1px solid var(--border-strong);
  background:var(--surface-input);
  color:var(--text);
  border-radius:var(--radius);
  padding:10px 14px;
  cursor:pointer;
  font-weight:700;
  overflow-wrap:anywhere;
}

.tvip-btn:hover{border-color:#9fb5ff}
.tvip-btn:disabled{opacity:.55;cursor:not-allowed}
.tvip-primary{background:var(--accent);border-color:var(--accent);color:#fff}

.tvip-code{
  margin:0;
  max-height:420px;
  overflow:auto;
  white-space:pre;
  border:1px solid var(--border);
  border-radius:var(--radius);
  background:var(--surface-code);
  padding:12px;
  font:12.5px/1.45 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
}

#tvip-issues{
  background:var(--surface-card);
  max-height:200px;
}

.tvip-toolbar-inline{
  margin:10px 0;
  padding:0;
  border-top:0;
  background:transparent;
}

.tvip-xml-check-input{
  min-height:240px;
}

.tvip-check-card{
  border-color:#b8c7ff;
}

.tvip-check-card .tvip-header{
  background:#f6f8ff;
}

.tvip-xml-check-issues,
.tvip-xml-check-output{
  margin-top:10px;
  max-height:260px;
}

.tvip-xml-check-issues:empty,
.tvip-xml-check-output:empty{
  display:none;
}

.tvip-xml-check-active #tvip-preview-card{
  display:none;
}

.tvip-row-2,
#row-config-sections,
#tvip-basics-footer{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}

.tvip-row-2{margin-top:2px}
.tvip-col{display:flex;flex-direction:column;gap:12px;min-width:0}

#row-config-sections{
  grid-template-columns:1fr;
}

.tvip-group-box{
  grid-column:auto;
  min-width:0;
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:12px;
  background:var(--surface-box);
}

.tvip-group-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  cursor:pointer;
  border-radius:6px;
}

.tvip-group-header:hover,
#tvip-basics-footer .tvip-footer-title:hover{
  color:var(--text);
}

.tvip-group-title{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:6px;
  min-width:0;
  color:var(--muted);
  font-size:12px;
  font-weight:800;
  text-transform:uppercase;
}

.tvip-group-box.is-collapsed{
  padding-bottom:12px;
}

.tvip-group-body{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  margin-top:12px;
}

.tvip-group-header .tvip-field{margin:0}

#tvip-update-box .tvip-group-body{
  grid-template-columns:1fr;
}

#tvip-tr69-box{
  grid-column:1 / -1;
}

#tvip-tr69-box .tvip-group-body{
  grid-template-columns:repeat(2,minmax(0,1fr));
}

.tvip-compact-editor{
  grid-column:1 / -1;
  min-width:0;
  max-width:100%;
  border:1px solid var(--border);
  border-radius:var(--radius);
  background:var(--surface-box);
  padding:12px;
}

.tvip-compact-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  min-width:0;
  margin-bottom:10px;
}

.tvip-collapsible-editor .tvip-compact-head{
  cursor:pointer;
  border:0;
  border-radius:0;
  background:transparent;
  padding:0;
}

.tvip-collapsible-editor .tvip-compact-head:hover{
  color:var(--accent);
}

.tvip-collapsible-editor .tvip-compact-head[aria-expanded="false"],
#wrap-android_apps_section .android-apps-head[aria-expanded="false"]{
  margin-bottom:0;
}

.tvip-compact-title h3{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:6px;
  min-width:0;
  margin:0;
  color:var(--muted);
  font-size:12px;
  font-weight:800;
  text-transform:uppercase;
}

.tvip-collapsible-editor .tvip-compact-title{
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  column-gap:8px;
  align-items:center;
}

.tvip-collapsible-editor .tvip-collapse-indicator{
  grid-row:1 / span 2;
}

.tvip-collapsible-editor .tvip-compact-title h3,
.tvip-collapsible-editor .tvip-compact-sub{
  grid-column:2;
}

.tvip-collapse-indicator{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:22px;
  height:22px;
  border:1px solid var(--border);
  border-radius:6px;
  background:var(--surface-input);
  color:var(--muted);
  font-weight:900;
}

.tvip-compact-sub{
  margin-top:3px;
  color:var(--muted);
  font-size:12px;
}

.tvip-compact-body,
.tvip-compact-list{
  display:grid;
  gap:10px;
}

.tvip-compact-row-card{
  border:1px solid var(--border-card);
  border-radius:var(--radius);
  background:var(--surface-card);
  padding:12px;
}

.tvip-compact-row-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}

.tvip-compact-row-title{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
  color:var(--text);
  font-weight:800;
}

.tvip-compact-row-title .idx{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:24px;
  height:24px;
  border-radius:6px;
  background:#e9eef8;
  color:#31558f;
  font-size:12px;
}

.tvip-compact-grid{
  display:grid;
  gap:10px;
}

.tvip-compact-grid.two{
  grid-template-columns:minmax(180px,.45fr) minmax(260px,1fr);
}

.tvip-compact-grid.six{
  grid-template-columns:minmax(90px,.6fr) minmax(160px,1fr) minmax(220px,1.35fr);
}

.tvip-compact-grid.six .field:nth-child(n+4){
  grid-row:2;
}

.tvip-compact-grid .field{
  min-width:0;
}

.tvip-compact-grid .field>label{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:6px;
  min-width:0;
  color:var(--muted);
  font-size:12px;
  font-weight:800;
  margin-bottom:6px;
}

.tvip-compact-grid .field>label span{
  min-width:0;
  overflow-wrap:anywhere;
}

.tvip-compact-grid input[type=text],
.tvip-compact-grid select{
  width:100%;
  min-width:0;
  min-height:38px;
  border:1px solid var(--border);
  border-radius:var(--radius);
  background:var(--surface-input);
  color:var(--text);
  padding:9px 10px;
  font:inherit;
}

.tvip-compact-note{
  margin-top:8px;
  color:var(--muted);
  font-size:12px;
}

.update-types-section{
  min-width:0;
}

.update-types-list{
  grid-template-columns:1fr;
}

.update-type-list{
  display:grid;
  gap:8px;
}

.update-type-row{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
  align-items:end;
  border:1px solid var(--border);
  border-radius:var(--radius);
  background:var(--surface-input);
  padding:10px;
}

.update-type-row .remove{
  min-height:38px;
}

.tvip-chk-single{
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:40px;
}

.tvip-chk-single input[type="checkbox"]{
  appearance:none;
  position:relative;
  flex:0 0 auto;
  width:42px;
  height:24px;
  margin:0;
  border-radius:999px;
  border:1px solid var(--border-strong);
  background:#edf2f7;
  cursor:pointer;
}

.tvip-chk-single input[type="checkbox"]::before{
  content:"";
  position:absolute;
  top:2px;
  left:2px;
  width:18px;
  height:18px;
  border-radius:50%;
  background:var(--surface-input);
  border:1px solid var(--border-strong);
  transition:transform .15s ease;
}

.tvip-chk-single input[type="checkbox"]:checked{
  background:#dbe7ff;
  border-color:#9fb5ff;
}

.tvip-chk-single input[type="checkbox"]:checked::before{
  transform:translateX(18px);
}

.tvip-checks,
.tvip-features-vd,
.tvip-prefs-vd{
  display:grid;
  grid-template-columns:1fr;
  gap:8px;
}

.tvip-chk,
.tvip-feature-item{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
  min-height:68px;
  border:1px solid var(--border);
  border-radius:var(--radius);
  background:var(--surface-input);
  padding:10px 12px;
  cursor:pointer;
}

.tvip-feature-item:hover,
.tvip-chk:hover{
  border-color:#cbd8ff;
  box-shadow:0 1px 4px rgba(16,24,40,.06);
}

.tvip-feature-checkbox{flex:0 0 auto}
.tvip-feature-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  width:30px;
  height:30px;
  border-radius:8px;
  background:var(--surface-soft);
}
.tvip-feature-textcol{
  display:flex;
  flex-direction:column;
  justify-content:center;
  min-width:0;
}
.tvip-feature-title{font-weight:700}
.tvip-feature-sub{font-size:12px;color:var(--muted)}

#tvip-basics-footer{
  display:grid;
  grid-template-columns:1fr;
  gap:12px;
  margin-top:0;
  padding:12px;
  align-items:start;
}

#tvip-basics-footer.tvip-features-panel{
  grid-column:1 / -1;
  grid-template-columns:repeat(2,minmax(0,1fr));
  border:1px solid var(--border);
  background:var(--surface-box);
}

#tvip-basics-footer > .tvip-field{
  grid-column:auto;
  min-width:0;
}

#wrap-feature_vod_enabled,
#wrap-feature_timeshift_enabled,
#wrap-feature_appstore_enabled{
  grid-column:1 / -1;
}

#wrap-feature_vod_enabled,
#wrap-feature_timeshift_enabled,
#wrap-feature_appstore_enabled{
  grid-column:auto;
}

.tvip-feature-toggle.tvip-chk-single{
  width:100%;
  margin:0;
}

.tvip-feature-toggle.tvip-chk-single input[type="checkbox"]{
  appearance:auto;
  width:auto;
  height:auto;
  margin:0;
  border-radius:0;
}

.tvip-feature-toggle.tvip-chk-single input[type="checkbox"]::before{
  content:none;
}

.tvip-feature-toggle.tvip-chk-single input[type="checkbox"]:checked{
  background:initial;
  border-color:initial;
}

.tvip-feature-toggle.tvip-chk-single input[type="checkbox"]:checked::before{
  transform:none;
}

.tvip-feature-item:has(input:checked){
  border-color:#9fb5ff;
  background:#f4f7ff;
}

#wrap-features_base_list,
#wrap-prefs_visible_list{
  grid-column:auto;
  align-self:start;
  min-width:0;
}

#wrap-features_base_list .tvip-features-vd,
#wrap-prefs_visible_list .tvip-features-vd{
  grid-template-columns:1fr;
}

#wrap-features_base_list .tvip-label,
#wrap-prefs_visible_list .tvip-label{
  margin-bottom:6px;
}

#tvip-basics-footer .tvip-footer-title{
  grid-column:1 / -1;
  margin:0;
  color:var(--muted);
  font-size:12px;
  font-weight:800;
  text-transform:uppercase;
}

.tvip-preferences-table-section{
  grid-column:1 / -1;
}

#tvip-basics-footer > #wrap-preferences_table_section{
  grid-column:1 / -1;
}

.tvip-preferences-table-section .tvip-pref-panel-head{
  margin-bottom:0;
}

.tvip-preferences-table-section .tvip-compact-title{
  color:var(--muted);
  font-size:12px;
  font-weight:800;
  text-transform:uppercase;
}

.tvip-preferences-table-section .tvip-compact-title > span:not(.tvip-collapse-indicator){
  grid-column:2;
}

.tvip-pref-content{
  display:grid;
  gap:12px;
  margin-top:12px;
}

.tvip-preferences-table{
  display:grid;
  grid-template-columns:1fr;
  gap:12px;
}

.tvip-pref-note{
  color:var(--muted);
  font-size:12px;
  max-width:none;
  padding:10px 12px;
  border:1px solid #dbe5f5;
  border-radius:var(--radius);
  background:var(--surface-card);
}

.tvip-pref-toolbar{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:flex-start;
  gap:12px;
  margin-top:12px;
}

.tvip-pref-tabs{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(150px,1fr));
  gap:6px;
}

.tvip-pref-tab{
  appearance:none;
  position:relative;
  border:1px solid var(--border);
  border-radius:7px;
  background:var(--surface-input);
  color:var(--muted);
  padding:9px 30px 9px 10px;
  font-weight:800;
  cursor:pointer;
  text-align:left;
}

.tvip-pref-tab.active{
  border-color:#9fb5ff;
  background:#eef3ff;
  color:var(--text);
}

.tvip-pref-tab::after{
  content:attr(data-count);
  position:absolute;
  top:50%;
  right:7px;
  transform:translateY(-50%);
  min-width:16px;
  height:16px;
  border-radius:999px;
  background:#dbe7ff;
  color:#2447a8;
  font-size:10px;
  line-height:16px;
  text-align:center;
  font-weight:900;
}

.tvip-pref-tab:not([data-count])::after{
  display:none;
}

.tvip-pref-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:wrap;
  gap:8px;
}

.tvip-pref-summary{
  color:var(--muted);
  font-size:12px;
  font-weight:800;
  white-space:nowrap;
}

.tvip-btn-small{
  min-height:34px;
  padding:7px 10px;
  font-size:12px;
}

.tvip-pref-group{
  border:1px solid var(--border);
  border-radius:var(--radius);
  overflow:hidden;
  background:var(--surface-card);
}

.tvip-pref-group[hidden]{
  display:none;
}

.tvip-pref-group-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px 12px;
  border-bottom:1px solid var(--border);
}

.tvip-pref-group-head code,
.tvip-pref-name code{
  color:var(--muted);
  font-size:12px;
}

.tvip-pref-grid{
  display:grid;
  grid-template-columns:1fr;
}

.tvip-pref-row{
  display:grid;
  grid-template-columns:minmax(320px,1fr) minmax(160px,.3fr) minmax(160px,.3fr);
  gap:12px;
  align-items:center;
  padding:10px 12px;
  border-top:1px solid rgba(223,228,238,.7);
}

.tvip-pref-row:first-child{
  border-top:0;
}

.tvip-pref-row-header{
  color:var(--muted);
  font-size:12px;
  font-weight:800;
  background:var(--surface-code);
}

.tvip-pref-name{
  display:flex;
  flex-direction:column;
  gap:2px;
  min-width:0;
}

.tvip-pref-bool{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:6px;
  min-width:0;
}

.tvip-pref-bool-btn{
  appearance:none;
  min-height:38px;
  border:1px solid var(--border);
  border-radius:7px;
  background:var(--surface-input);
  color:var(--muted);
  padding:8px 10px;
  font:inherit;
  font-size:12px;
  font-weight:800;
  cursor:pointer;
}

.tvip-pref-bool-btn.active{
  border-color:#8eaaff;
  background:#eef3ff;
  color:var(--text);
}

.tvip-pref-bool-btn:hover{
  border-color:#a9bfff;
}

.android-apps-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  min-width:0;
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:12px 14px;
  background:var(--surface-box);
}

.tvip-collapsible-editor .android-apps-head{
  cursor:pointer;
}

.tvip-collapsible-editor .android-apps-head:hover{
  border-color:#a9bfff;
  background:var(--surface-hover);
  color:var(--accent);
}

#wrap-android_apps_section{
  grid-column:1 / -1;
  min-width:0;
  max-width:100%;
  border:1px solid var(--border);
  border-radius:var(--radius);
  background:var(--surface-box);
  padding:12px;
}

#wrap-android_apps_section .android-apps-head{
  border:0;
  border-radius:0;
  padding:0;
  background:transparent;
}

#wrap-android_apps_section .android-apps-head:hover{
  border-color:transparent;
  background:transparent;
}

.android-apps-title{
  display:flex;
  flex-direction:column;
  gap:2px;
  min-width:0;
  max-width:100%;
}

#wrap-android_apps_section .android-apps-title{
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  column-gap:8px;
  row-gap:2px;
  align-items:center;
}

.android-apps-title h3{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:6px;
  margin:0;
  font-size:15px;
  min-width:0;
}

.android-apps-sub,
.android-apps-hint,
.empty-sub,
.android-app-note{
  color:var(--muted);
  font-size:12px;
}

.android-apps-sub{
  min-width:0;
  overflow-wrap:anywhere;
}

#wrap-android_apps_section .android-apps-sub{
  grid-column:2;
}

.android-apps-toggle{
  display:flex;
  align-items:center;
  gap:8px;
  color:var(--muted);
  font-weight:700;
}

.android-apps-body{margin-top:12px}
.android-apps-bar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
  color:var(--muted);
  font-size:12px;
  font-weight:800;
}

.android-apps-list{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(min(360px,100%),1fr));
  gap:12px;
  align-items:start;
  min-width:0;
}

.tvip-add-inline{
  justify-self:start;
  margin-top:10px;
  background:var(--surface-input);
}
.android-app-card{
  min-width:0;
  max-width:100%;
  border:1px solid var(--border-card);
  border-radius:var(--radius);
  background:var(--surface-card);
  padding:10px;
}
.android-app-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}
.android-app-title{display:flex;align-items:center;gap:8px;min-width:0}
.android-app-title b{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.android-app-title .idx{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  width:24px;
  height:24px;
  border:1px solid var(--border);
  border-radius:7px;
  font-size:11px;
}
.android-app-grid{
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:10px;
  min-width:0;
}
.android-app-card .field{
  display:flex;
  flex-direction:column;
  grid-column:span 3;
  gap:5px;
  min-width:0;
}
.android-app-card .field:nth-child(3){
  grid-column:span 4;
}
.android-app-card .field:nth-child(4),
.android-app-card .field:nth-child(5){
  grid-column:span 2;
}
.android-app-card .field:nth-child(6){
  grid-column:1 / -1;
}
.android-app-card .cb{display:inline-flex;align-items:center;gap:8px;color:var(--text)}
.android-app-note{
  margin-top:10px;
  padding-top:8px;
  border-top:1px solid var(--border);
}
.android-apps-empty{
  min-width:0;
  max-width:100%;
  border:1px dashed var(--border-strong);
  border-radius:var(--radius);
  padding:16px;
  text-align:center;
  background:var(--surface-box);
}
.empty-title{font-weight:800;margin-bottom:4px}

#tvip-versionbar{
  width:min(1180px,calc(100% - 32px));
  margin:16px auto 8px !important;
}

.tvip-embed body{
  background:transparent;
}

.tvip-embed .tvip-wrap{
  width:100%;
  margin:0;
  padding:8px;
}

.tvip-embed .tvip-topbar{
  margin-bottom:8px;
}

.tvip-embed .tvip-topbar h1{
  font-size:18px;
}

.tvip-embed .tvip-statusbar{
  margin-bottom:10px;
}

.tvip-embed .tvip-card{
  border-radius:6px;
  box-shadow:none;
}

.tvip-embed .tvip-header{
  padding:10px 12px;
}

.tvip-embed .tvip-header h2{
  font-size:17px;
}

.tvip-embed .tvip-content{
  padding:12px;
}

.tvip-embed .tvip-tabs{
  padding:8px 8px 0;
}

.tvip-embed .tvip-tabs button{
  padding:7px 11px;
}

.tvip-embed .tvip-toolbar{
  padding:10px 12px;
}

.tvip-embed .tvip-row,
.tvip-embed .tvip-row-2,
.tvip-embed .tvip-group-body,
.tvip-embed .android-app-grid,
.tvip-embed .tvip-compact-grid{
  gap:10px;
}

.tvip-embed #tvip-basics-footer{
  grid-template-columns:repeat(2,minmax(0,1fr));
}

.tvip-embed #wrap-features_base_list,
.tvip-embed #wrap-prefs_visible_list{
  grid-column:auto;
}

.tvip-embed .android-apps-list{
  grid-template-columns:repeat(auto-fit,minmax(min(320px,100%),1fr));
}

.tvip-embed .tvip-input,
.tvip-embed .tvip-select,
.tvip-embed .tvip-textarea,
.tvip-embed .android-app-card input[type=text],
.tvip-embed .android-app-card select,
.tvip-embed .tvip-compact-grid input[type=text],
.tvip-embed .tvip-compact-grid select{
  padding:8px 10px;
}

.tvip-embed .tvip-code{
  max-height:300px;
}

.tvip-embed #tvip-versionbar{
  display:none;
}

@media (max-width:720px){
  .tvip-embed .tvip-create-layout{
    grid-template-columns:1fr;
  }

  .tvip-embed .tvip-section-nav{
    position:static;
    display:grid;
    grid-template-columns:repeat(2,minmax(min(150px,100%),1fr));
  }

  .tvip-embed .tvip-row,
  .tvip-embed .tvip-row-2,
  .tvip-embed #row-config-sections,
  .tvip-embed .tvip-group-body,
  .tvip-embed .android-app-grid,
  .tvip-embed #tvip-basics-footer{
    grid-template-columns:1fr;
  }

  .tvip-embed .tvip-field,
  .tvip-embed #wrap-tz_region,
  .tvip-embed #wrap-timezone,
  .tvip-embed #wrap-time_format{
    grid-column:auto;
  }
}

@media (max-width:560px){
  .tvip-embed .tvip-section-nav,
  .tvip-embed #tvip-basics-footer{
    grid-template-columns:1fr;
  }

  .tvip-embed .tvip-header h2,
  .tvip-embed .tvip-header h3{
    width:calc(100vw - 48px);
    max-width:100%;
  }

  .tvip-embed .tvip-mobile-break{
    display:block;
  }

  .tvip-embed .android-apps-list,
  .tvip-embed .android-app-grid,
  .tvip-embed .update-type-row,
  .tvip-embed .tvip-compact-grid.two,
  .tvip-embed .tvip-compact-grid.six{
    grid-template-columns:1fr;
  }

  .tvip-embed .android-app-card .field,
  .tvip-embed .android-app-card .field:nth-child(3),
  .tvip-embed .android-app-card .field:nth-child(4),
  .tvip-embed .android-app-card .field:nth-child(5),
  .tvip-embed .android-app-card .field:nth-child(6){
    grid-column:1 / -1;
  }

  .tvip-embed .tvip-work-tabs{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    width:100%;
  }

  .tvip-embed .tvip-work-tabs button{
    width:100%;
    white-space:normal;
  }

  .tvip-embed .tvip-btn{
    width:100%;
  }

  .tvip-embed .tvip-info::after,
  .tvip-embed .tvip-hint::after,
  .tvip-embed .tvip-group-title .tvip-info::after,
  .tvip-embed .tvip-label .tvip-info::after{
    position:fixed;
    left:12px;
    right:12px;
    bottom:auto;
    top:12px;
    width:auto;
    max-width:none;
    transform:translateY(-4px);
    z-index:1000;
  }

  .tvip-embed .tvip-info:hover::after,
  .tvip-embed .tvip-info:focus-visible::after,
  .tvip-embed .tvip-hint:hover::after,
  .tvip-embed .tvip-hint:focus-visible::after,
  .tvip-embed .tvip-group-title .tvip-info:hover::after,
  .tvip-embed .tvip-group-title .tvip-info:focus-visible::after,
  .tvip-embed .tvip-label .tvip-info:hover::after,
  .tvip-embed .tvip-label .tvip-info:focus-visible::after{
    transform:translateY(0);
  }
}

@media (min-width:1020px){
  #row-config-sections{grid-template-columns:repeat(2,minmax(0,1fr))}
}

@media (max-width:860px){
  .tvip-wrap{width:min(1180px,calc(100% - 20px));margin-top:10px}
  .tvip-work-tabs{
    width:auto;
    max-width:100%;
    overflow-x:auto;
  }
  .tvip-create-layout{
    grid-template-columns:1fr;
  }
  .tvip-section-nav{
    position:static;
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .tvip-section-group-label{
    grid-column:1 / -1;
  }
  body[data-active-form-section="features"] .tvip-create-layout{
    grid-template-columns:1fr;
  }
  .tvip-header{align-items:flex-start;flex-direction:column}
  .tvip-header > *{
    width:100%;
  }
  .tvip-header > .tvip-sub{
    text-align:left;
  }
  #tvip-panel-form > .tvip-header > .tvip-status-pill{
    width:auto;
    align-self:flex-end;
  }
  .tvip-row,
  .tvip-row-2,
  #row-config-sections,
  .tvip-group-body,
  .update-type-row,
  .android-app-grid,
  .tvip-compact-grid.two,
  .tvip-compact-grid.six{
    grid-template-columns:1fr;
  }
  .tvip-compact-grid.six .field:nth-child(n+4){
    grid-row:auto;
  }
  .tvip-field,
  #wrap-tz_region,
  #wrap-timezone,
  #wrap-time_format{
    grid-column:auto;
  }
  .tvip-field.full,
  .tvip-span-full,
  #tvip-basics-footer .tvip-footer-title{
    grid-column:auto;
  }
  .tvip-pref-row{
    grid-template-columns:1fr;
  }
  .tvip-pref-row-header{
    display:none;
  }
  .tvip-pref-toolbar,
  .tvip-pref-actions{
    align-items:stretch;
  }
  .tvip-pref-toolbar{
    grid-template-columns:1fr;
  }
  .tvip-pref-actions{
    justify-content:flex-start;
  }
  .tvip-pref-summary{
    white-space:normal;
  }
  .tvip-pref-tabs{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .tvip-pref-tab{
    width:100%;
    text-align:left;
  }
  .android-apps-head,
  .android-apps-bar,
  .android-app-head{
    align-items:flex-start;
    flex-direction:column;
  }
}

@media (max-width:860px){
  #tvip-basics-footer{
    grid-template-columns:1fr;
  }

  #tvip-basics-footer .tvip-footer-title{
    grid-column:1 / -1;
  }

  .android-app-card .field{
    grid-column:1 / -1;
  }

  .android-app-card .field:nth-child(3),
  .android-app-card .field:nth-child(4),
  .android-app-card .field:nth-child(5),
  .android-app-card .field:nth-child(6){
    grid-column:1 / -1;
  }
}

@media (max-width:560px){
  .tvip-topbar{
    display:flex;
    flex-direction:column;
    align-items:stretch;
  }

  .tvip-status-pill{
    align-self:flex-end;
  }

  .tvip-section-nav{
    grid-template-columns:1fr;
  }

  .tvip-header h2,
  .tvip-header h3{
    width:calc(100vw - 48px);
    max-width:100%;
  }

  .tvip-mobile-break{
    display:block;
  }

  #tvip-basics-footer,
  .tvip-embed #tvip-basics-footer,
  .android-apps-list{
    grid-template-columns:1fr;
  }
  .tvip-pref-tabs{
    grid-template-columns:1fr;
  }

  .tvip-work-tabs{
    display:flex;
    width:100%;
    overflow:visible;
  }

  .tvip-work-tabs button{
    flex:1 1 0;
    min-width:0;
    width:auto;
    white-space:normal;
  }

  .tvip-btn{
    width:100%;
  }

  .tvip-info::after,
  .tvip-hint::after,
  .tvip-group-title .tvip-info::after,
  .tvip-label .tvip-info::after{
    position:fixed;
    left:12px;
    right:12px;
    bottom:auto;
    top:12px;
    width:auto;
    max-width:none;
    transform:translateY(-4px);
    z-index:1000;
  }

  .tvip-info:hover::after,
  .tvip-info:focus-visible::after,
  .tvip-hint:hover::after,
  .tvip-hint:focus-visible::after,
  .tvip-group-title .tvip-info:hover::after,
  .tvip-group-title .tvip-info:focus-visible::after,
  .tvip-label .tvip-info:hover::after,
  .tvip-label .tvip-info:focus-visible::after{
    transform:translateY(0);
  }
}

@media (max-width:720px){
  .tvip-embed .tvip-topbar{
    display:flex !important;
    flex-direction:column !important;
    align-items:stretch !important;
  }

  .tvip-embed .tvip-work-tabs{
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    width:100% !important;
    min-width:0 !important;
  }

  .tvip-embed .tvip-work-tabs button{
    min-width:0 !important;
    width:auto !important;
    white-space:normal !important;
  }

  .tvip-embed .tvip-status-pill{
    align-self:flex-end !important;
  }
}
